Parcourir la source

【图章】图章列表删除新增确认逻辑

niehaoyu il y a 7 mois
Parent
commit
e319347deb

+ 15 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.swift

@@ -930,6 +930,21 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
     }
     
     @objc func tableCellCloseButton_Click(_ button: NSButton) {
+        let alert = NSAlert()
+        alert.alertStyle = .warning
+        alert.messageText = ""
+        alert.informativeText = NSLocalizedString("Are you sure to delete?", comment: "")
+        alert.addButton(withTitle: NSLocalizedString("Delete", comment: ""))
+        alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+        alert.beginSheetModal(for: NSApp.mainWindow!) { (response) in
+            if response == .alertFirstButtonReturn {
+                self.deleteTableCell(button)
+            }
+        }
+    }
+    
+    func deleteTableCell(_ button: NSButton) {
+        
         let index = button.tag
         
         if annotationStampType == .type_default {

+ 1 - 0
PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings

@@ -1490,6 +1490,7 @@
 "Are you sure to delete the selected pages?" = "确定删除已选页面?";
 "You can’t undo this action." = "您无法撤销该动作";
 "Are you sure to delete page %@ ?" = "您确定要删除第 %@ 页?";
+"Are you sure to delete?" = "您确定要删除吗?";
 "Warning" = "警告";
 
 //insert

+ 1 - 0
PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

@@ -2539,6 +2539,7 @@
 
 "Remove All Watermark Templates" = "移除所有浮水印範本";
 "Are you sure to delete all templates?" = "您確定要移除所有範本嗎?";
+"Are you sure to delete?" = "您確定要移除嗎?";
 "Batch Add Header & Footer" = "批次插入頁首頁尾";
 "Batch Add Bates Numbers" = "批次新增Bates編號";
 "Remove All Header & Footer Templates" = "移除所有頁首頁尾範本";