Procházet zdrojové kódy

eSign 20170407

更新合同模板
新增agent 签名验证功能
新增签名清除功能

新增合同编辑功能 未完成
新增离线功能 未完成
Ray Zhang před 9 roky
rodič
revize
285c727872
30 změnil soubory, kde provedl 2179 přidání a 187 odebrání
  1. binární
      Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate
  2. 512 48
      Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 4 4
      Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Expressions.xcexplist
  4. 20 7
      Ants Contract/AntsContract/AntsContract/Base.lproj/Main.storyboard
  5. 8 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj
  6. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/.DS_Store
  7. 23 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/Contents.json
  8. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/appicon-1.png
  9. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/appicon-2.png
  10. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/appicon.png
  11. 21 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_l.imageset/Contents.json
  12. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_l.imageset/granitew.png
  13. 21 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_p.imageset/Contents.json
  14. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_p.imageset/graniteh.png
  15. 1035 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017 Update.json
  16. binární
      Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017 Update.pdf
  17. 4 1
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Info.plist
  18. 1 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/config.h
  19. 4 1
      Ants Contract/common/ACNetwork.h
  20. 37 3
      Ants Contract/common/ACNetwork.m
  21. 4 1
      Ants Contract/common/AppDelegate.h
  22. 5 1
      Ants Contract/common/AppDelegate.m
  23. 92 6
      Ants Contract/common/DocumentListViewController.m
  24. 9 0
      Ants Contract/common/DocumentPageViewController.h
  25. 2 2
      Ants Contract/common/DocumentPageViewController.m
  26. 3 0
      Ants Contract/common/PDFPageView.m
  27. 2 0
      Ants Contract/common/PageViewController.h
  28. 273 108
      Ants Contract/common/PageViewController.m
  29. 4 0
      Ants Contract/common/RootViewController.h
  30. 95 5
      Ants Contract/common/RootViewController.m

binární
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 512 - 48
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -10,11 +10,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "508061004.568315"
+            timestampString = "513069199.384237"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "737"
-            endingLineNumber = "737"
+            startingLineNumber = "789"
+            endingLineNumber = "789"
             landmarkName = "-CheckButtonClicked:"
             landmarkType = "7">
          </BreakpointContent>
@@ -26,11 +26,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "508061004.568315"
+            timestampString = "513069199.384237"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "730"
-            endingLineNumber = "730"
+            startingLineNumber = "782"
+            endingLineNumber = "782"
             landmarkName = "-CheckButtonClicked:"
             landmarkType = "7">
          </BreakpointContent>
@@ -42,11 +42,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "508065299.082579"
+            timestampString = "513069199.384237"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1074"
-            endingLineNumber = "1074"
+            startingLineNumber = "1126"
+            endingLineNumber = "1126"
             landmarkName = "-textViewDidEndEditing:"
             landmarkType = "7">
          </BreakpointContent>
@@ -58,11 +58,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "508065299.082579"
+            timestampString = "513069199.384237"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "995"
-            endingLineNumber = "995"
+            startingLineNumber = "1047"
+            endingLineNumber = "1047"
             landmarkName = "-textViewDidBeginEditing:"
             landmarkType = "7">
          </BreakpointContent>
@@ -74,11 +74,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "508065299.082579"
+            timestampString = "513069199.384237"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "989"
-            endingLineNumber = "989"
+            startingLineNumber = "1041"
+            endingLineNumber = "1041"
             landmarkName = "-textViewDidBeginEditing:"
             landmarkType = "7">
          </BreakpointContent>
@@ -90,11 +90,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "508065299.082579"
+            timestampString = "513069199.384237"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1001"
-            endingLineNumber = "1001"
+            startingLineNumber = "1053"
+            endingLineNumber = "1053"
             landmarkName = "-textViewDidBeginEditing:"
             landmarkType = "7">
          </BreakpointContent>
@@ -410,11 +410,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
-            timestampString = "508231481.933812"
+            timestampString = "513225550.025969"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "336"
-            endingLineNumber = "336"
+            startingLineNumber = "337"
+            endingLineNumber = "337"
             landmarkName = "+SavePDF:source:window_rect:name:"
             landmarkType = "7">
          </BreakpointContent>
@@ -522,11 +522,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509945420.022045"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "700"
-            endingLineNumber = "700"
+            startingLineNumber = "747"
+            endingLineNumber = "747"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -538,11 +538,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509945420.022045"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "740"
-            endingLineNumber = "740"
+            startingLineNumber = "787"
+            endingLineNumber = "787"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -554,11 +554,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509945420.022045"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "682"
-            endingLineNumber = "682"
+            startingLineNumber = "729"
+            endingLineNumber = "729"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -570,11 +570,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509945420.022045"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "656"
-            endingLineNumber = "656"
+            startingLineNumber = "703"
+            endingLineNumber = "703"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -586,11 +586,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509945420.022045"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "689"
-            endingLineNumber = "689"
+            startingLineNumber = "736"
+            endingLineNumber = "736"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -602,11 +602,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "511065890.736989"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "953"
-            endingLineNumber = "953"
+            startingLineNumber = "1000"
+            endingLineNumber = "1000"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
             <Locations>
@@ -650,11 +650,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "511070075.3357"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1009"
-            endingLineNumber = "1009"
+            startingLineNumber = "1056"
+            endingLineNumber = "1056"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1544,11 +1544,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/RootViewController.m"
-            timestampString = "510741344.532136"
+            timestampString = "512623627.812779"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "293"
-            endingLineNumber = "293"
+            startingLineNumber = "347"
+            endingLineNumber = "347"
             landmarkName = "-OnSigninClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1592,11 +1592,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "511069732.84451"
+            timestampString = "511148129.577539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "235"
-            endingLineNumber = "235"
+            startingLineNumber = "282"
+            endingLineNumber = "282"
             landmarkName = "-refresh_btn_click:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1681,5 +1681,469 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentListViewController.m"
+            timestampString = "511148119.309126"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "107"
+            endingLineNumber = "107"
+            landmarkName = "-onAddClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentListViewController.m"
+            timestampString = "511148174.499188"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "105"
+            endingLineNumber = "105"
+            landmarkName = "-onAddClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/AddExtDocumentViewController.m"
+            timestampString = "511150615.678087"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "262"
+            endingLineNumber = "262"
+            landmarkName = "-onUploadClicked:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/ACNetwork.m"
+            timestampString = "511152139.979635"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "524"
+            endingLineNumber = "524"
+            landmarkName = "+packfiles2zip:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/AppDelegate.m"
+            timestampString = "511166888.879856"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "28"
+            endingLineNumber = "28"
+            landmarkName = "-application:didFinishLaunchingWithOptions:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "512553042.54084"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "40"
+            endingLineNumber = "40"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1071"
+            endingLineNumber = "1071"
+            landmarkName = "-textViewDidEndEditing:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "336"
+            endingLineNumber = "336"
+            landmarkName = "-addTextView:destView:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "326"
+            endingLineNumber = "326"
+            landmarkName = "-addTextView:destView:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "339"
+            endingLineNumber = "339"
+            landmarkName = "-addTextView:destView:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "337"
+            endingLineNumber = "337"
+            landmarkName = "-addTextView:destView:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "513066470.077689"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "114"
+            endingLineNumber = "114"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
+            timestampString = "512641560.824727"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "73"
+            endingLineNumber = "73"
+            landmarkName = "+loadControl:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/customUI/TouchImageView.m"
+            timestampString = "513063723.603014"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "67"
+            endingLineNumber = "67"
+            landmarkName = "@implementation TouchImageView"
+            landmarkType = "3">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/customUI/TouchImageView.m"
+            timestampString = "513063262.890064"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "53"
+            endingLineNumber = "53"
+            landmarkName = "-touchesEnded:withEvent:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1388"
+            endingLineNumber = "1388"
+            landmarkName = "-TouchImageViewOnLongPress:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513071382.654335"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1434"
+            endingLineNumber = "1434"
+            landmarkName = "-TouchImageViewOnTouche:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/customUI/TouchImageView.m"
+            timestampString = "513063434.615358"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "38"
+            endingLineNumber = "38"
+            landmarkName = "-awakeFromNib"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/customUI/TouchImageView.m"
+            timestampString = "513063437.145221"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "22"
+            endingLineNumber = "22"
+            landmarkName = "-initWithFrame:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513069199.384237"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "36"
+            endingLineNumber = "36"
+            landmarkName = "@implementation PageViewController"
+            landmarkType = "3">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513071382.654335"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1408"
+            endingLineNumber = "1408"
+            landmarkName = "@implementation PageViewController"
+            landmarkType = "3">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513071382.654335"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1409"
+            endingLineNumber = "1409"
+            landmarkName = "@implementation PageViewController"
+            landmarkType = "3">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "513071382.654335"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1415"
+            endingLineNumber = "1415"
+            landmarkName = "-touchImageClear:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
+            timestampString = "513158741.590871"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "579"
+            endingLineNumber = "579"
+            landmarkName = "-Draw:dataSource:ParentRect:startX:startY:flipHeight:range:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/ACNetwork.m"
+            timestampString = "513160732.447474"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "670"
+            endingLineNumber = "670"
+            landmarkName = "+prepareUploadFile:json:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/ACNetwork.m"
+            timestampString = "513160989.54884"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "211"
+            endingLineNumber = "211"
+            landmarkName = "+save_document:isnew:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/ACNetwork.m"
+            timestampString = "513229001.163784"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "190"
+            endingLineNumber = "190"
+            landmarkName = "+save_document:isnew:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/AppDelegate.m"
+            timestampString = "513238525.397772"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "252"
+            endingLineNumber = "252"
+            landmarkName = "-Login:pwd:canModify:offPrefix:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/AppDelegate.m"
+            timestampString = "513238528.287058"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "264"
+            endingLineNumber = "264"
+            landmarkName = "-Logout"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 4 - 4
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Expressions.xcexplist

@@ -22,10 +22,10 @@
          contextName = "-[PageViewController initControl]:PageViewController.m">
          <PersistentStrings>
             <PersistentString
-               value = "self.editControlView.frame">
+               value = "self.editControlView.bounds">
             </PersistentString>
             <PersistentString
-               value = "self.editControlView.bounds">
+               value = "self.editControlView.frame">
             </PersistentString>
          </PersistentStrings>
       </ContextState>
@@ -110,10 +110,10 @@
          contextName = "-[PDFPageView MyDisplayPDFPage:index:]:PDFPageView.m">
          <PersistentStrings>
             <PersistentString
-               value = "92.5714416*0.952380955">
+               value = "self.bounds">
             </PersistentString>
             <PersistentString
-               value = "(self.frame.size.width-mediabox.size.width*scale)/2">
+               value = "self.frame.size">
             </PersistentString>
          </PersistentStrings>
       </ContextState>

+ 20 - 7
Ants Contract/AntsContract/AntsContract/Base.lproj/Main.storyboard

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="UmP-Fl-ZUI">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="UmP-Fl-ZUI">
     <device id="ipad9_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -16,7 +16,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_bg" id="V7m-G1-ogb">
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_bg_p" id="V7m-G1-ogb">
                                 <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                             </imageView>
@@ -55,16 +55,20 @@
                                 <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                 <subviews>
-                                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="home_bg" id="74h-ia-SzF">
+                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="home_bg_p" id="74h-ia-SzF">
                                         <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                     </imageView>
                                 </subviews>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                             </view>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="home_bg_icon" id="V9T-Cq-Gk2">
+                                <rect key="frame" x="42" y="110" width="188" height="77"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WPb-xH-q9X">
                                 <rect key="frame" x="42" y="200" width="187" height="21"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
@@ -84,8 +88,10 @@
                     <connections>
                         <outlet property="btnCustomerPerDoc" destination="tLn-KD-7Jb" id="NU1-qA-M7n"/>
                         <outlet property="btnNewCustomer" destination="VoO-EQ-M9h" id="U9J-M1-26G"/>
+                        <outlet property="coverBG" destination="74h-ia-SzF" id="3El-ao-Ke2"/>
                         <outlet property="coverView" destination="WlE-9f-0pQ" id="WdQ-tM-RPW"/>
                         <outlet property="ibSignin" destination="A9f-vj-ZDF" id="nwF-qz-pqH"/>
+                        <outlet property="imageBG" destination="V7m-G1-ogb" id="yvL-Se-ZpI"/>
                         <outlet property="labelVer" destination="WPb-xH-q9X" id="hrQ-cR-Ac5"/>
                         <outlet property="welcomeLabel" destination="QNm-bw-hPi" id="76Y-sU-MT9"/>
                     </connections>
@@ -367,6 +373,12 @@
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                 <items>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="9H2-6O-Ty3"/>
+                                    <barButtonItem title="Add" id="Zbn-CL-t1c">
+                                        <connections>
+                                            <action selector="onAddClick:" destination="kYv-Xx-xIY" id="bzO-kX-EWX"/>
+                                        </connections>
+                                    </barButtonItem>
+                                    <barButtonItem width="42" style="plain" systemItem="fixedSpace" id="HIj-hx-1lX"/>
                                     <barButtonItem title="Filter" id="wfX-co-eMN">
                                         <connections>
                                             <action selector="onFilterClick:" destination="kYv-Xx-xIY" id="h5E-Qa-xAT"/>
@@ -701,7 +713,7 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="93T-5h-JKV">
-                                                    <rect key="frame" x="15" y="5" width="33" height="21"/>
+                                                    <rect key="frame" x="15" y="5" width="34" height="21"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
@@ -995,7 +1007,8 @@
         <image name="checkbox" width="16" height="16"/>
         <image name="close" width="40" height="40"/>
         <image name="file_icon" width="20" height="20"/>
-        <image name="home_bg" width="768" height="1024"/>
+        <image name="home_bg_icon" width="188" height="77"/>
+        <image name="home_bg_p" width="768" height="1024"/>
         <image name="note_icon" width="20" height="20"/>
         <image name="picture_icon" width="20" height="20"/>
     </resources>

+ 8 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj

@@ -68,6 +68,8 @@
 		717243441E1CCCEC00800678 /* CustomIOSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 717243431E1CCCEC00800678 /* CustomIOSAlertView.m */; };
 		7172434A1E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */; };
 		718403A51E67F8A000C66873 /* RAMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 718403A41E67F8A000C66873 /* RAMenu.m */; };
+		7188C2891E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json in Resources */ = {isa = PBXBuildFile; fileRef = 7188C2881E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json */; };
+		7188C28B1E8E437900938FFC /* GEIC - Home Improvement Contract 2017 Update.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 7188C28A1E8E437900938FFC /* GEIC - Home Improvement Contract 2017 Update.pdf */; };
 		71B152EF1E66C87F00D2E5EC /* AddExtDocumentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B152EE1E66C87F00D2E5EC /* AddExtDocumentViewController.m */; };
 		71B152F41E67EA5D00D2E5EC /* MenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B152F31E67EA5D00D2E5EC /* MenuViewController.m */; };
 		71BBFC371E6419D4008668A7 /* ExtDocumentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BBFC361E6419D4008668A7 /* ExtDocumentsViewController.m */; };
@@ -190,6 +192,8 @@
 		717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = "GEIC - Home Improvement Contract 2017.pdf"; path = "Granite Expo eSign/GEIC - Home Improvement Contract 2017.pdf"; sourceTree = "<group>"; };
 		718403A31E67F8A000C66873 /* RAMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAMenu.h; path = ../../../common/RAMenu.h; sourceTree = "<group>"; };
 		718403A41E67F8A000C66873 /* RAMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAMenu.m; path = ../../../common/RAMenu.m; sourceTree = "<group>"; };
+		7188C2881E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "GEIC - Home Improvement Contract 2017 Update.json"; path = "Granite Expo eSign/GEIC - Home Improvement Contract 2017 Update.json"; sourceTree = "<group>"; };
+		7188C28A1E8E437900938FFC /* GEIC - Home Improvement Contract 2017 Update.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = "GEIC - Home Improvement Contract 2017 Update.pdf"; path = "Granite Expo eSign/GEIC - Home Improvement Contract 2017 Update.pdf"; sourceTree = "<group>"; };
 		71B152ED1E66C87F00D2E5EC /* AddExtDocumentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddExtDocumentViewController.h; path = ../../common/AddExtDocumentViewController.h; sourceTree = "<group>"; };
 		71B152EE1E66C87F00D2E5EC /* AddExtDocumentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AddExtDocumentViewController.m; path = ../../common/AddExtDocumentViewController.m; sourceTree = "<group>"; };
 		71B152F21E67EA5D00D2E5EC /* MenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MenuViewController.h; path = ../../../common/MenuViewController.h; sourceTree = "<group>"; };
@@ -425,8 +429,10 @@
 			isa = PBXGroup;
 			children = (
 				7115D41E1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json */,
+				7188C2881E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json */,
 				714B870A1E24CAE200A40D18 /* debug.json */,
 				717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */,
+				7188C28A1E8E437900938FFC /* GEIC - Home Improvement Contract 2017 Update.pdf */,
 			);
 			name = "pdf resource";
 			sourceTree = "<group>";
@@ -515,7 +521,9 @@
 				7115D41F1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json in Resources */,
 				7128C24B1E124F4500FF635B /* Assets.xcassets in Resources */,
 				7128C26F1E124FF200FF635B /* Main.storyboard in Resources */,
+				7188C28B1E8E437900938FFC /* GEIC - Home Improvement Contract 2017 Update.pdf in Resources */,
 				7128C2701E124FF200FF635B /* LaunchScreen.storyboard in Resources */,
+				7188C2891E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json in Resources */,
 				7115D45F1E16326C00EF4E4C /* CommonEditor.storyboard in Resources */,
 				7172434A1E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf in Resources */,
 				7128C27D1E12500B00FF635B /* signature.storyboard in Resources */,

binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/.DS_Store


+ 23 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "appicon.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "appicon-1.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "appicon-2.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/appicon-1.png


binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/appicon-2.png


binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_icon.imageset/appicon.png


+ 21 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_l.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "granitew.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_l.imageset/granitew.png


+ 21 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_p.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "graniteh.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/home_bg_p.imageset/graniteh.png


+ 1035 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017 Update.json

@@ -0,0 +1,1035 @@
+{
+    "count": 4,
+    "signature_name": [
+                       "Customer Initial",
+                       "Decision Maker",
+                       "Agent Of Contractor",
+                       "Homeowner",
+                       "Homeowner Print Name",
+                       "Date"
+                       ],
+    "page_0": {
+        "count": 22,
+        "control_0": {
+            "type": "Ignor",
+            "required": false,
+            "pos_x": 122,
+            "pos_y": 132,
+            "width": 522,
+            "height": 80,
+            "field": "team",
+            "title": "team button",
+            "single_select": true,
+            "show_detail": true,
+            "marker_size": 8,
+            "cadedate": [
+                         [
+                          [
+                           "T&C",
+                           "Tan & Chan Construction Lic. B1010166, 2827 22nd Street, Oakland, CA 94606"
+                           ],
+                          [
+                           127,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "W",
+                           "WMA Construction Lic. B988052, 2888 Darius Way, San Leandro, CA 94577"
+                           ],
+                          [
+                           236,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "X",
+                           "JimXu Builder Lic. B975007, 1034 Sutter St. #5, San Francisco, CA 94109"
+                           ],
+                          [
+                           336,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "F",
+                           "F Huang Construction Inc. Lic. B1011198, 3726 Rosalee Court, Castro Valley, CA 94546"
+                           ],
+                          [
+                           428,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "GE",
+                           "Granite Expo Installation Inc. Lic. B896945, 3401 Mandela Pkwy, Oakland, CA 94608"
+                           ],
+                          [
+                           533,
+                           143
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_21": {
+            "aname": "Invoice Number",
+            "type": "TextView","margin_left":"4",
+            "margin_top":"1",
+            
+            "required": false,
+            "pos_x": 222,
+            "pos_y": 253,
+            "width": 422,
+            "height": 25,
+            "field": "invoice_number",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Customer Name",
+            "type": "TextView","margin_left":"4",
+            "margin_top":"1",
+            
+            "required": true,
+            "pos_x": 222,
+            "pos_y": 280,
+            "width": 183,
+            "height": 30,
+            "field": "customer_name",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Job Date",
+            "type": "DatePicker","margin_left":"4",
+            "required": false,
+            "pos_x": 488,
+            "pos_y": 280,
+            "width": 156,
+            "height": 30,
+            "field": "job_date",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Jobsite Address",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "tv_vmargin":0.6,
+            "margin_top": "3",
+            "pos_x": 248,
+            "pos_y": 311,
+            "width": 397,
+            "height": 15,
+            "field": "job_addr",
+            "value": ""
+        },
+        "control_15": {
+            "aname": "Jobsite City",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "margin_top": "-1",
+            "tv_vmargin":0.3,
+            "pos_x": 248,
+            "pos_y": 326,
+            "width": 152,
+            "height": 15,
+            "field": "job_city",
+            "value": ""
+        },
+        "control_16": {
+            "aname": "Jobsite State",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "tv_vmargin":0.3,
+            "margin_top": "-1",
+            "capital":"charater",
+            "pos_x": 432,
+            "pos_y": 326,
+            "width": 115,
+            "height": 15,
+            "field": "job_state",
+            "value": "CA"
+        },
+        "control_17": {
+            "aname": "Jobsite Zipcode",
+            "margin_top": "-1",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "tv_vmargin":0.3,
+            "pos_x": 570,
+            "pos_y": 326,
+            "width": 74,
+            "height": 15,
+            "field": "job_zip",
+            "value": ""
+        },
+        "control_4": {
+            "aname": "Telephone",
+            "format": "us_tel",
+            "keyboard":"tel",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "pos_x": 222,
+            "pos_y": 344,
+            "width": 183,
+            "height": 30,
+            "field": "tel",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Today's Date","margin_left":"4",
+            "type": "DatePicker",
+            "required": true,
+            "pos_x": 488,
+            "pos_y": 344,
+            "width": 156,
+            "height": 30,
+            "field": "today_date",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Contract Price",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "pos_x": 222,
+            "pos_y": 376,
+            "width": 183,
+            "keyboard":"number",
+            "value_type":"float",
+            "height": 30,
+            "format": "price",
+            "prefix_str":"$ ",
+            "field": "contract_price",
+            "action": {
+                "set_val": {
+                    "condition": "true",
+                    "count": 2,
+                    "item_0": {
+                        "control": "control_7",
+                        "value": "*0.1"
+                    },
+                    "item_1": {
+                        "control": "control_8",
+                        "value": "*0.9"
+                    }
+                }
+            },
+            "value": ""
+        },
+        "control_7": {
+            "aname": "Labor Deposit",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "pos_x": 488,
+            "pos_y": 376,
+            "width": 85,
+            "height": 30,
+            "keyboard":"number",
+            "field": "labor_deposit",
+            "value_type":"float",
+            "format": "price",
+            "prefix_str":"$ ",
+            "disable": true,
+            "action": {
+                "set_val": {
+                    "condition": "true",
+                    "count": 1,
+                    "item_0": {
+                        "control": "control_8",
+                        "value": "control_6-control_7"
+                    }
+                }
+            },
+            "value": ""
+        },
+        "control_18": {
+            "type": "Check",
+            "required": true,
+            "pos_x": 584,
+            "pos_y": 382,
+            "width": 40,
+            "height": 20,
+            "field": "deposit_percent",
+            "title": "team button",
+            "single_select": true,
+            "show_detail": false,
+            "size": "10",
+            "cadedate": [
+                         [
+                          [
+                           "10%"
+                           ],
+                          [],
+                          {
+                          "memo": "action",
+                          "disable": [
+                                      "control_7"
+                                      ],
+                          "set_val": {
+                          "condition": "true",
+                          "count": 2,
+                          "item_0": {
+                          "control": "control_7",
+                          "value": "*0.1"
+                          },
+                          "item_1": {
+                          "control": "control_8",
+                          "value": "*0.9"
+                          }
+                          }
+                          }
+                          ],
+                         [
+                          [
+                           "Other"
+                           ],
+                          [],
+                          {
+                          "memo": "action",
+                          "enable": [
+                                     "control_7"
+                                     ]
+                          }
+                          ]
+                         ],
+            "value": [
+                      0
+                      ]
+        },
+        "control_8": {
+            "aname": "Balance on Account",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "prefix_str":"$ ",
+            "value_type":"float",
+            "pos_x": 222,
+            "pos_y": 408,
+            "width": 183,
+            "height": 40,
+            "field": "balance",
+            "disable": true,
+            "value": ""
+        },
+        "control_9": {
+            "aname": "Service",
+            "type": "Check",
+            "required": true,
+            "pos_x": 122,
+            "pos_y": 564,
+            "width": 522,
+            "height": 70,
+            "field": "service",
+            "title": "service button",
+            "single_select": false,
+            "show_detail": false,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          [
+                           "Installation of Cabinetry.",
+                           ""
+                           ],
+                          [
+                           133,
+                           571
+                           ]
+                          ],
+                         [
+                          [
+                           "Installation of Granite, Marble or Quartz Countertop(s).",
+                           ""
+                           ],
+                          [
+                           133,
+                           583
+                           ]
+                          ],
+                         [
+                          [
+                           "Installation of Plywood.",
+                           ""
+                           ],
+                          [
+                           133,
+                           595
+                           ]
+                          ],
+                         [
+                          [
+                           "Demolition Work.",
+                           ""
+                           ],
+                          [
+                           133,
+                           607
+                           ]
+                          ],
+                         [
+                          [
+                           "Other / Include Description:",
+                           ""
+                           ],
+                          [
+                           133,
+                           619
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_10": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 718,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_11": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 755,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_12": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 804,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_13": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 820,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_14": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 864,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_20": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_19": {
+
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_1": {
+        "count": 22,
+        "control_21": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 69,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_0": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 117,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Decision Maker",
+            "linewidth":5,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 230,
+            "pos_y": 125,
+            "width": 200,
+            "height": 20,
+            "name": "Decision Maker",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 185,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 205,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_4": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 232,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 269,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 317,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_7": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 344,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_8": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 370,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_20": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 407,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_9": {
+            "aname": "Joint Seams Option",
+            "type": "Check",
+            "required": true,
+            "pos_x": 135,
+            "pos_y": 501,
+            "width": 475,
+            "height": 50,
+            "field": "joint_seams",
+            "title": "joint seams",
+            "single_select": true,
+            "show_detail": true,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          [
+                           "OPTION A:",
+                           "Unpolished joint seams, which the Undersigned understands may not be smooth."
+                           ],
+                          [
+                           149,
+                           514
+                           ]
+                          ],
+                         [
+                          [
+                           "OPTION B",
+                           "Polished joint seams, which the Undersigned understands that color dullness or shade variation may occur."
+                           ],
+                          [
+                           149,
+                           526
+                           ]
+                          ],
+                         [
+                          [
+                           "OPTION C",
+                           "The Decision Maker will determine on-site with the assistance of the Contractor."
+                           ],
+                          [
+                           149,
+                           537
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_10": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 445,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_11": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 471,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_12": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 533,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_13": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 570,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_14": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 629,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_15": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 646,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_16": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 662,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_19": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_18": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_2": {
+        "count": 10,
+        "control_0": {
+            "aname": "Agent Signature",
+            "linewidth":8,
+            "type": "Signature",
+            "required": true,
+            "required_validation":true,
+            "validation_code":"1111",
+            "pos_x": 163,
+            "pos_y": 791,
+            "width": 146,
+            "height": 24,
+            "name": "Agent Of Contractor",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Homeowner Signature",
+            "linewidth":8,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 405,
+            "pos_y": 791,
+            "width": 146,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Agent Name",
+            "type": "TextView",
+            "textAlignment":"center",
+            "margin_top": "2",
+            "size":"10",
+            "tv_vmargin":0.5,
+            "required": true,
+            "pos_x": 194,
+            "pos_y": 838,
+            "width": 160,
+            "height": 14,
+            "field": "agent_name",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Print Name",
+            "tv_vmargin":0.5,
+            "type": "TextView",
+            "textAlignment":"center",
+            "margin_top": "2",
+            "size":"10",
+            "required": true,
+            "pos_x": 472,
+            "pos_y": 838,
+            "width": 165,
+            "height": 14,
+            "field": "customer_name_1",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Ignor",
+            "required": false,
+            "pos_x": 194,
+            "pos_y": 854,
+            "width": 160,
+            "height": 14,
+            "field": "signor_name",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Homeowner Name",
+            "tv_vmargin":0.5,
+            "type": "TextView",
+            "textAlignment":"center",
+            "required": true,
+            "size":"10",
+            "pos_x": 472,
+            "pos_y": 854,
+            "width": 165,
+            "height": 14,
+            "field": "owner_name",
+            "margin_top": "2",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Telephone Number",
+            "tv_vmargin":0.5,
+            "format": "us_tel",
+            "keyboard":"tel",
+            "type": "TextView",
+            "textAlignment":"center",
+            "size":"10",
+            "margin_top": "2",
+            "required": true,
+            "pos_x": 472,
+            "pos_y": 869,
+            "width": 165,
+            "height": 14,
+            "field": "tel1",
+            "value": ""
+        },
+        "control_9": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_8": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_3": {
+        "count": 10,
+        "control_0": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 669,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 685,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 712,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 749,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_4": {
+            "aname": "Initial","linewidth":8,"can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 787,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Homeowner Signature",
+            "linewidth":8,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 150,
+            "pos_y": 833,
+            "width": 146,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Demolition Print name",
+            "type": "TextView",
+            "margin_left":"4",
+            "margin_top":"1",
+            "required": true,
+            "pos_x": 345,
+            "pos_y": 833,
+            "width": 195,
+            "height": 24,
+            "field": "demolition_printname",
+            "value": ""
+        },
+        "control_7": {
+            "aname": "Demolition Date",
+            "type": "DatePicker",
+            "margin_left":"4",
+            "margin_top":"1",
+            "required": true,
+            "pos_x": 563,
+            "pos_y": 833,
+            "width": 60,
+            "height": 24,
+            "field": "demolition_date",
+            "value": ""
+        },
+        "control_9": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_8": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_4_ignor": {
+        "count": 5,
+        "control_0": {
+            "aname": "Homeowner Signature",
+            "linewidth":8,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 127,
+            "pos_y": 553,
+            "width": 146,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Handwrite Print Name",
+            "linewidth":5,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 326,
+            "pos_y": 553,
+            "width": 148,
+            "height": 24,
+            "name": "Homeowner Print Name",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Handwrite date",
+            "linewidth":5,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 552,
+            "pos_y": 553,
+            "width": 60,
+            "height": 24,
+            "name": "Date",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_3": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    }
+}

binární
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017 Update.pdf


+ 4 - 1
Ants Contract/Granite Expo eSign/Granite Expo eSign/Info.plist

@@ -36,7 +36,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>1.30</string>
 	<key>CFBundleVersion</key>
-	<string>31727</string>
+	<string>31728</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>NSAppTransportSecurity</key>
@@ -61,6 +61,9 @@
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 	</array>
 </dict>
 </plist>

+ 1 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/config.h

@@ -52,6 +52,7 @@
     #define  URL_LOGOUT  @"https://www.thegraniteexpo.com/admin.php"
     #define  URL_REQUEST_DOC  @"https://www.thegraniteexpo.com/admin.php"
     #define  URL_NEW_DOCUMENT  @"https://www.thegraniteexpo.com/admin.php"
+    #define  URL_UPDATE_NOTES  @"https://www.thegraniteexpo.com/admin.php"
 #endif
 
 #endif /* config_h */

+ 4 - 1
Ants Contract/common/ACNetwork.h

@@ -18,10 +18,13 @@
 +(NSDictionary*)request_DocList:(NSMutableDictionary*) params;
 +(NSDictionary*)new_document;
 
-+(NSDictionary*)save_document:(NSString*)file;
++(NSDictionary*)save_document:(NSString*)file isnew:(bool)isNewDocument;
 
 +(NSString *) packfiles2zip:(NSMutableArray*) arr_file;
 
 +(NSDictionary *) updateNotes:(NSString*) doc_number notes:(NSString*)notes;
 +(NSDictionary*)upload_file:(NSString*)file params:(NSMutableDictionary*) params;
+
+
++(NSString *) offline_docnumber;
 @end

+ 37 - 3
Ants Contract/common/ACNetwork.m

@@ -182,7 +182,7 @@
     DebugLog(@"upload_file result:%d",result);
     return jsobj;
 }
-+(NSDictionary*)save_document:(NSString*)file
++(NSDictionary*)save_document:(NSString*)file isnew:(bool)isNewDocument
 {
     
     
@@ -196,7 +196,7 @@
 //    if(appDelegate.password!=nil)
 //        [params setValue:appDelegate.password forKey:@"password"];
     params[@"_operate"]=@"deviceMain";
-    
+    params[@"modify_document"]=[NSNumber numberWithBool:!isNewDocument];
     if(![self IsNetworkAvailable])
     {
         DebugLog(@"NET ERR");
@@ -341,6 +341,9 @@
             return RESULT_FALSE;
             
         }
+        
+        NSString* offPrefix = jsobj[@"offPrefix"];
+        bool canModify = [jsobj[@"can_modify"] boolValue];
 //        NSDictionary* objheader = [jsobj objectForKey:@"header"];
 //        
 //        NSString* required_ver=[jsobj objectForKey:@"min_ver"] ;
@@ -370,7 +373,7 @@
 //        appDelegate.bLogin = true;
         
         
-        [appDelegate Login:user pwd:password];
+        [appDelegate Login:user pwd:password canModify:canModify offPrefix:offPrefix];
         
         
 //        
@@ -641,6 +644,23 @@
     result = [zip addFileToZip:jsonpath newname:[jsonpath lastPathComponent]];
 
     
+//    for(int l=0;l<[json[@"count"] intValue];l++)
+//    {
+//        
+//        NSMutableDictionary * page_json = json[[NSString stringWithFormat:@"page_%d",l] ];
+//        
+//        for(int p=0;p<[page_json[@"count"] intValue];p++)
+//        {
+//            NSMutableDictionary * control_json = page_json[[NSString stringWithFormat:@"control_%d",p] ];
+//            if([control_json[@"type"] isEqualToString:@"Signature"] )
+//            {
+//                NSString* signature_path = control_json[@"value"];
+//                if(signature_path.length>0)
+//                    result = [zip addFileToZip:signature_path newname:[signature_path lastPathComponent]];
+//            }
+//        }
+//    }
+    
     if( ![zip CloseZipFile2] )
     {
         zippath = @"";
@@ -720,4 +740,18 @@
     return jsobj;
 
 }
++(NSString *) offline_docnumber
+{
+    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    
+    
+            NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+    long docint=[defaults integerForKey:appDelegate.offPrefix];
+    docint++;
+            [defaults removeObjectForKey:appDelegate.offPrefix];
+           [defaults setInteger:docint forKey:appDelegate.offPrefix];
+            [defaults synchronize];
+    
+    return [NSString stringWithFormat:@"%@%6ld",appDelegate.offPrefix,docint ];
+}
 @end

+ 4 - 1
Ants Contract/common/AppDelegate.h

@@ -14,11 +14,14 @@
 
 @property bool bEnable_Cache;
 @property bool bLogin;
+@property bool bCanModify;
+@property (strong,nonatomic) NSString* offPrefix;
+
 @property (strong,nonatomic) NSString* user;
 @property (strong,nonatomic) NSString * password;
 @property (strong,nonatomic) NSString* build;
 -(void) Logout;
--(void) Login:(NSString* )user pwd:(NSString*) pwd;
+-(void) Login:(NSString* )user pwd:(NSString*) pwd canModify:(bool) canModify offPrefix:(NSString*) offPrefix;
 @property (strong,nonatomic) NSString* printerURL;
 @property (strong,nonatomic) NSMutableDictionary* shareFile;
 

+ 5 - 1
Ants Contract/common/AppDelegate.m

@@ -247,8 +247,10 @@
 - (void)applicationWillTerminate:(UIApplication *)application {
     // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
 }
--(void) Login:(NSString* )user pwd:(NSString*) pwd
+-(void) Login:(NSString* )user pwd:(NSString*) pwd canModify:(bool) canModify offPrefix:(NSString*) offPrefix
 {
+    self.bCanModify = canModify;
+    self.offPrefix = offPrefix;
     self.user = user;
     self.password = pwd;
     self.bLogin = true;
@@ -262,6 +264,8 @@
 //    [main_vc hideMenu];
 //    [main_vc switchToHome];
     self.user = nil;
+    self.bCanModify = false;
+    self.offPrefix = nil;
     self.password=nil;
     self.bLogin = false;
     

+ 92 - 6
Ants Contract/common/DocumentListViewController.m

@@ -16,7 +16,7 @@
 #import "ExtDocumentsViewController.h"
 #import "DocnotesViewController.h"
 
-
+#import "AddExtDocumentViewController.h"
 
 @interface DocumentListViewController ()
 
@@ -86,6 +86,53 @@
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
 }
+- (IBAction)onAddClick:(id)sender {
+    
+    
+    __weak typeof(self) weakself = self;
+    {
+        
+        
+        
+        AddExtDocumentViewController * addVC;
+        
+        
+        
+        addVC = [ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"AddExtDocumentViewController"];
+        addVC.is_present = true;
+        addVC.doc_number = nil;
+        addVC.uploadSuccess = ^(NSMutableArray* arr_upload){
+            if(arr_upload.count>0)
+                [weakself loadpage];
+
+            
+        };
+        //addVC.arr_documents = [NSMutableArray arrayWithObjects:appDelegate.shareFile, nil];
+        //appDelegate.shareFile=nil;
+        
+        //        notesVC.docNotes = notes;
+        
+        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:addVC] ;
+        
+        
+        
+        
+        
+        
+        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
+        [self presentViewController:navi animated:YES completion:^{
+            
+            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+            
+            DebugLog(@"filter present.........");
+            
+            //   self.btop = false;
+            //  <#code#>
+        }];
+        
+        
+    }
+}
 - (IBAction)onFilterClick:(id)sender {
     
     
@@ -1000,17 +1047,51 @@
     docAction.backgroundColor = UIColorFromRGB(0xff9933);
     
     
+    UITableViewRowAction *modifyAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"   Modify        " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
+        
+        DebugLog(@"modify click");
+        
+
+//        [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
+//        DocnotesViewController * notesVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"DocnotesViewController"];
+//
+//        notesVC.docNumber = doc_number;
+//        notesVC.docNotes = notes;
+//
+//        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:notesVC] ;
+//        
+//        
+//        
+//        
+//        
+//        
+//        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
+//        [self presentViewController:navi animated:YES completion:^{
+//            
+//            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+//            
+//            DebugLog(@"filter present.........");
+//            
+//            //   self.btop = false;
+//            //  <#code#>
+//        }];
+        
+    }];
+
+    modifyAction.backgroundColor = UIColorFromRGB(0x9BBF5A);
+    
+    
     UITableViewRowAction *noteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"   Note        " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
         DebugLog(@"note click");
         
-
+        
         [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
         DocnotesViewController * notesVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"DocnotesViewController"];
-
+        
         notesVC.docNumber = doc_number;
         notesVC.docNotes = notes;
-
+        
         UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:notesVC] ;
         
         
@@ -1030,10 +1111,15 @@
         }];
         
     }];
-
+    
     noteAction.backgroundColor = UIColorFromRGB(0x336699);
     
-    return @[docAction,noteAction];
+    
+    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    if(appDelegate.bCanModify)
+        return @[modifyAction,docAction,noteAction];
+    else
+        return @[docAction,noteAction];
 
     
 }

+ 9 - 0
Ants Contract/common/DocumentPageViewController.h

@@ -8,6 +8,14 @@
 
 #import <UIKit/UIKit.h>
 
+
+typedef NS_ENUM(NSInteger, PDFEditAction) {
+    PDFEditActionNew = 0,
+    PDFEditActionModify = 1
+};
+
+
+
 @interface DocumentPageViewController : UIViewController <UIPageViewControllerDelegate , UIPageViewControllerDataSource>
 
 @property (strong, nonatomic) UIPageViewController *pageViewController;
@@ -24,4 +32,5 @@
 @property long current_page;
 
 @property (nonatomic , copy) void (^OnSave)(NSString * file, NSString* subject );
+@property (assign) PDFEditAction action;
 @end

+ 2 - 2
Ants Contract/common/DocumentPageViewController.m

@@ -382,7 +382,7 @@
     
    // for(int l=0;l<1;l++)
     {
-        pdffile = [PDFUtils SavePDF:self.controlTemplate source:self.document window_rect:CGRectMake(0, 0, 768, 960) name:self.docment_id];
+        pdffile = [PDFUtils SavePDF:self.controlTemplate source:self.document window_rect:CGRectMake(0, 0, 768, 960) name:self.docment_id isnew:self.action==PDFEditActionNew];
     
     
      zipfile=[ACNetwork prepareUploadFile:pdffile json:self.controlTemplate];
@@ -400,7 +400,7 @@
             
             
             
-            json = [ACNetwork save_document:zipfile];
+            json = [ACNetwork save_document:zipfile isnew:self.action==PDFEditActionNew];
             
             dispatch_async(dispatch_get_main_queue(), ^{
                 

+ 3 - 0
Ants Contract/common/PDFPageView.m

@@ -33,6 +33,9 @@
 -(void) MyDisplayPDFPage:(CGContextRef) myContext index:(size_t)pageNumber //file:(NSString*) filename//(,  , const char *filename)
 {
     
+//    double vwidth=self.frame.size.width;
+//    double vheight = self.frame.size.height;
+    
     
     {
     CGPDFPageRef page = self.pageRef;

+ 2 - 0
Ants Contract/common/PageViewController.h

@@ -29,4 +29,6 @@
 @property bool keyboard_show;
 @property int keyboard_h;
 -(void)EndEditing;
+@property (assign, nonatomic) long  tiv_index;
+
 @end

+ 273 - 108
Ants Contract/common/PageViewController.m

@@ -20,7 +20,7 @@
 #import "CheckSelectorViewController.h"
 #import "DatePickerViewController.h"
 
-
+#import "RAUtils.h"
 
 //#import "TouchImageView.h"
 @interface PageViewController ()
@@ -28,6 +28,23 @@
 @end
 
 @implementation PageViewController
+- (BOOL)canBecomeFirstResponder{
+    return YES;
+}
+//- (IBAction)onBtnClick:(id)sender {
+//    [self becomeFirstResponder];
+//    UIView* v = sender;
+//    
+//    UIMenuItem *detail = [[UIMenuItem alloc] initWithTitle:@"abc" action:@selector(showDetail:)];
+//    //    [detail setValue:_id forKey:@"_id"];
+//    
+//    UIMenuController *menu = [UIMenuController sharedMenuController];
+//    
+//    [menu setMenuItems:[NSArray arrayWithObjects:detail, nil]];
+//    
+//    [menu setTargetRect:v.frame inView:v.superview];
+//    [menu setMenuVisible:YES animated:YES];
+//}
 
 - (void)viewDidLoad {
     [super viewDidLoad];
@@ -244,7 +261,40 @@
 {
     [[self view] endEditing:YES];
 }
+-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
+{
+    for (UIView * v in self.editControlView.subviews)
+    {
+        [v removeFromSuperview ];
+    }
+}
+-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+{
+    
 
+    
+
+    [self initControl];
+//    [self.pdfPageView setNeedsLayout];
+    [self.pdfPageView setNeedsDisplay];
+//    UIDeviceOrientation dev_ori = [[UIDevice currentDevice]orientation];
+    
+//    UIApplication * app = [UIApplication sharedApplication];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    [appDelegate didRotated];
+    
+    //    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+    //    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
+    //    {
+    //        self.orientation = orientation;
+    //        [self.collectionview.collectionViewLayout invalidateLayout];
+    //        DebugLog(@"routed");
+    //    }
+    
+    
+    
+    
+}
 
 #pragma mark add controls
 -(bool) checkActionCondition:(NSString*) condition
@@ -616,6 +666,8 @@
     
     self.pdfScrollView.contentSize =contentSize;
     self.pdfScrollView.contentOffset=contentOffsetPoint;
+    
+        [self.pdfPageView setNeedsDisplay];
 }
 //- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale {
 //
@@ -1192,145 +1244,258 @@
  */
 #pragma mark signature clicked 
 //touchimageview Delegate
-- (void)TouchImageViewOnTouche:(TouchImageView *)touchImageView
+-(void) signature:(TouchImageView *)touchImageView
 {
+    __weak __typeof(self)weakSelf = self;
     
-    NSLog(@"signature button clicked;");
     
-    __weak __typeof(self)weakSelf = self;
-    {
     
-        long index = touchImageView.tag - CONTROL_BASE;
+    long index = touchImageView.tag - CONTROL_BASE;
+    
+    
+    NSMutableDictionary* control_json = self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ];
+
+    
+    //    CGRect cellrect_screen = [RAUtils relativeFrameForScreenWithView:trigger];
+    //
+    //
+    //    CGRect rect1=[self.view convertRect:cellrect_screen fromView:[[[UIApplication sharedApplication] delegate] window]];
+    //
+    //    DebugLog(@"convert1 %@",NSStringFromCGRect(rect1));
+    SignatureListViewController *signatureVC = [ [UIStoryboard storyboardWithName:@"signature" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"SignatureListViewController"];
+    signatureVC.title=@"Signatures";
+    signatureVC.signatureData = self.signatureData;
+    signatureVC.subType = control_json[@"name"];
+    signatureVC.can_fill= [control_json[@"can_fill"] boolValue];
+    signatureVC.signature_ratio= touchImageView.frame.size;
+    
+    //        signatureVC.imageView = touchImageView;
+    
+    signatureVC.blk_Select =^(NSString* file)
+    {
         
         
-        NSMutableDictionary* control_json = self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ];
-
         
+        //            NSString* file_name=[file lastPathComponent];
+        
+        NSData* img_data=[ImageUtils load_img:file];
+        
+        if(img_data!=nil)
+        {
+            
+            UIImage* image=[UIImage imageWithData:img_data];
+            touchImageView.image = image;
+            
+            long index = touchImageView.tag - CONTROL_BASE;
+            weakSelf.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = file;
+            
+        }
+        
+    };
+    signatureVC.blk_Fill =^(NSString* file,bool fillFullDoc)
+    {
         
-        //    CGRect cellrect_screen = [RAUtils relativeFrameForScreenWithView:trigger];
+        if(weakSelf.blk_Fill)
+            weakSelf.blk_Fill(file,control_json[@"name"],fillFullDoc);
+        //            for(int j=0;j<[self.controlTemplate[@"count"] intValue];j++)
+        //            {
+        //                NSMutableDictionary* dest =self.controlTemplate[[NSString stringWithFormat:@"control_%d",j]];
+        //                NSString* type = dest[@"type"];
+        //                if(![type isEqualToString:@"Signature"])
+        //                    continue;
+        //                if([dest[@"name"] isEqualToString:control_json[@"name"]])
+        //                {
+        //                    dest[@"value"]=file;
+        //                }
+        //            }
+        [weakSelf refreshControl];
+        
+        //            //            NSString* file_name=[file lastPathComponent];
         //
+        //            NSData* img_data=[ImageUtils load_img:file];
         //
-        //    CGRect rect1=[self.view convertRect:cellrect_screen fromView:[[[UIApplication sharedApplication] delegate] window]];
+        //            if(img_data!=nil)
+        //            {
         //
-        //    DebugLog(@"convert1 %@",NSStringFromCGRect(rect1));
-        SignatureListViewController *signatureVC = [ [UIStoryboard storyboardWithName:@"signature" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"SignatureListViewController"];
-        signatureVC.title=@"Signatures";
-        signatureVC.signatureData = self.signatureData;
-        signatureVC.subType = control_json[@"name"];
-        signatureVC.can_fill= [control_json[@"can_fill"] boolValue];
-        signatureVC.signature_ratio= touchImageView.frame.size;
+        //                UIImage* image=[UIImage imageWithData:img_data];
+        //                touchImageView.image = image;
+        //
+        //                long index = touchImageView.tag - CONTROL_BASE;
+        //                self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = file;
+        //
+        //            }
         
-//        signatureVC.imageView = touchImageView;
+    };
+    signatureVC.blk_Add = ^()
+    {
         
-        signatureVC.blk_Select =^(NSString* file)
+        __block UIImage* signimg=nil;
+        SignatureViewController * vc =[ [UIStoryboard storyboardWithName:@"signature" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"SignatureViewController"];
+        vc.title =[NSString stringWithFormat:@"Signature: %@",control_json[@"name"]];
+        vc.signature_ratio= touchImageView.frame.size;
+        vc.linewidth = [control_json[@"linewidth"] intValue];
+        vc.onReturnImg = ^(UIImage* img)
         {
             
             
+            signimg = img;
             
-//            NSString* file_name=[file lastPathComponent];
-            
-            NSData* img_data=[ImageUtils load_img:file];
-            
-            if(img_data!=nil)
+            if(signimg!=nil)
             {
-                
-                UIImage* image=[UIImage imageWithData:img_data];
-                touchImageView.image = image;
-                
+                NSString* file=[PDFUtils addSignature:signimg to:self.signatureData subType:control_json[@"name"]];
                 long index = touchImageView.tag - CONTROL_BASE;
-                weakSelf.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = file;
-                
+                self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = file;
+                touchImageView.image = signimg;
             }
-
-        };
-        signatureVC.blk_Fill =^(NSString* file,bool fillFullDoc)
-        {
             
-            if(weakSelf.blk_Fill)
-                weakSelf.blk_Fill(file,control_json[@"name"],fillFullDoc);
-//            for(int j=0;j<[self.controlTemplate[@"count"] intValue];j++)
-//            {
-//                NSMutableDictionary* dest =self.controlTemplate[[NSString stringWithFormat:@"control_%d",j]];
-//                NSString* type = dest[@"type"];
-//                if(![type isEqualToString:@"Signature"])
-//                    continue;
-//                if([dest[@"name"] isEqualToString:control_json[@"name"]])
-//                {
-//                    dest[@"value"]=file;
-//                }
-//            }
-            [weakSelf refreshControl];
-            
-//            //            NSString* file_name=[file lastPathComponent];
-//            
-//            NSData* img_data=[ImageUtils load_img:file];
-//            
-//            if(img_data!=nil)
-//            {
-//                
-//                UIImage* image=[UIImage imageWithData:img_data];
-//                touchImageView.image = image;
-//                
-//                long index = touchImageView.tag - CONTROL_BASE;
-//                self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = file;
-//                
-//            }
             
         };
-        signatureVC.blk_Add = ^()
-        {
-            
-            __block UIImage* signimg=nil;
-            SignatureViewController * vc =[ [UIStoryboard storyboardWithName:@"signature" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"SignatureViewController"];
-            vc.title =[NSString stringWithFormat:@"Signature: %@",control_json[@"name"]];
-            vc.signature_ratio= touchImageView.frame.size;
-            vc.linewidth = [control_json[@"linewidth"] intValue];
-            vc.onReturnImg = ^(UIImage* img)
-            {
-                
-                
-                signimg = img;
-                
-                if(signimg!=nil)
-                {
-                    NSString* file=[PDFUtils addSignature:signimg to:self.signatureData subType:control_json[@"name"]];
-                        long index = touchImageView.tag - CONTROL_BASE;
-                        self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = file;
-                    touchImageView.image = signimg;
-                }
-                
-                
-            };
-            //    orderinfoVC.url_type = URL_REMOTE;
-            //    orderinfoVC.request_url=URL_CARTDELIVERY;
-            //
-            //    orderinfoVC.params = params;
-            //
-            //    orderinfoVC.delegate=self;
-            //
-            //    if(checked.count==count)
-            //    {
-            //    orderinfoVC.have_tail = true
-            //    }
+        //    orderinfoVC.url_type = URL_REMOTE;
+        //    orderinfoVC.request_url=URL_CARTDELIVERY;
+        //
+        //    orderinfoVC.params = params;
+        //
+        //    orderinfoVC.delegate=self;
+        //
+        //    if(checked.count==count)
+        //    {
+        //    orderinfoVC.have_tail = true
+        //    }
+        
+        [self.navigationController pushViewController:vc animated:true];
+        
+        
+        
+    };
+    
+    UINavigationController * navi = [[UINavigationController alloc] initWithRootViewController:signatureVC];
+    navi.modalPresentationStyle=UIModalPresentationPopover;
+    
+    UIPopoverPresentationController* popPc = navi.popoverPresentationController;
+    popPc.permittedArrowDirections = UIPopoverArrowDirectionAny;
+    popPc.sourceView = touchImageView;
+    popPc.delegate = nil;
+    
+    
+    
+    [self presentViewController:navi animated:true completion:nil];
+}
+- (void) TouchImageViewOnLongPress:(TouchImageView *)touchImageView
+{
+    if(touchImageView.image!=nil)
+    {
+        NSLog(@"long press");
+        
+        
+        [self becomeFirstResponder];
+        UIView* v = touchImageView;
+        
+        self.tiv_index = v.tag;
+        UIMenuItem *clear = [[UIMenuItem alloc] initWithTitle:@"Clear" action:@selector(touchImageClear:)];
+//        UIMenuItem *modify = [[UIMenuItem alloc] initWithTitle:@"Modify" action:@selector(touchImageModify:)];
+        //    [detail setValue:_id forKey:@"_id"];
+        
+        UIMenuController *menu = [UIMenuController sharedMenuController];
+        
+        
+        [menu setMenuItems:[NSArray arrayWithObjects:clear,/*modify,*/ nil]];
+        
+        [menu setTargetRect:v.frame inView:v.superview];
+        [menu setMenuVisible:YES animated:YES];
+    }
+}
+//- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
+//{
+//    if (action == @selector(showDetail:))
+//        return YES;//显示
+//    else
+//        return NO;//不显示
+//}
+- (void) touchImageClear:(id) sender
+{
+    long index = self.tiv_index - CONTROL_BASE;
+    
+    for(UIView*v in self.editControlView.subviews)
+    {
+        if(v.tag==self.tiv_index)
+            ((UIImageView*)v).image = nil;
+    }
+//    NSMutableDictionary* control_json = self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ];
+    
+    self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ][@"value"] = @"";
+}
+- (void) touchImageModify:(id) sender
+{
+    
+}
+- (void)TouchImageViewOnTouche:(TouchImageView *)touchImageView
+{
+    
+    NSLog(@"signature button clicked;");
+    
+//    
+//    __weak __typeof(self)weakSelf = self;
+//    
+//    
+//    
+        long index = touchImageView.tag - CONTROL_BASE;
+    
+        
+        NSMutableDictionary* control_json = self.controlTemplate [[NSString stringWithFormat:@"control_%ld",index] ];
+
+    bool bvalidation=[control_json[@"required_validation"] boolValue];
+    NSString* pwd= control_json[@"validation_code"];
+    if(bvalidation&& pwd.length>0)
+    {
+        
+        
+        //UIAlertControllerStyle两种类型UIAlertControllerStyleAlert类似UIAlertView
+        //UIAlertControllerStyleActionSheet类似UIActionSheet
+        UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:@"Authorization Verification" message:@"Please enter authorization code." preferredStyle:UIAlertControllerStyleAlert];
+        //block代码块取代了delegate
+        
+        
+        [alertControl addTextFieldWithConfigurationHandler:^(UITextField *textField) {
             
-            [self.navigationController pushViewController:vc animated:true];
             
             
+        }];
+        
+        UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
             
-        };
+            UITextField *name = alertControl.textFields.firstObject;
+            if(![name.text isEqualToString:pwd])
+            {
+                [RAUtils message_alert:@"You are not authorized to change this field" title:@"Authorization verification failed." controller:self];
+                return;
+            }
+            else
+            {
+                [self signature:touchImageView];
+            }
+           
+        }];
+        
+        UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+            DebugLog(@"Cancel");
+            return;
+        }];
+        [alertControl addAction:actionOne];
+        
+        [alertControl addAction:alertthree];
         
-        UINavigationController * navi = [[UINavigationController alloc] initWithRootViewController:signatureVC];
-        navi.modalPresentationStyle=UIModalPresentationPopover;
+        //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
         
-        UIPopoverPresentationController* popPc = navi.popoverPresentationController;
-        popPc.permittedArrowDirections = UIPopoverArrowDirectionAny;
-        popPc.sourceView = touchImageView;
-        popPc.delegate = nil;
         
+        [self presentViewController:alertControl animated:YES completion:nil];
         
         
-        [self presentViewController:navi animated:true completion:nil];
         
+    }
+    else
+    {
+        [self signature:touchImageView];
+    }
         ////    menu.selector = self.selector;
         ////
         ////    menu.selectordelegate = self;
@@ -1354,7 +1519,7 @@
         //
         // [self performSegueWithIdentifier:@"selector_popover" sender:self];
         
-    }
+    
     //    __block int tag = touchImageView.tag;
     //    UIViewController* vc=[RAUtils getViewController :touchImageView];
     //

+ 4 - 0
Ants Contract/common/RootViewController.h

@@ -19,5 +19,9 @@
 @property (strong, nonatomic) IBOutlet UIButton *btnCustomerPerDoc;
 @property (strong, nonatomic) IBOutlet UILabel *labelVer;
 -(void) presentLogin:(id)sender;
+
+@property (weak, nonatomic) IBOutlet UIImageView *imageBG;
+@property (weak, nonatomic) IBOutlet UIImageView *coverBG;
+
 @end
 

+ 95 - 5
Ants Contract/common/RootViewController.m

@@ -32,7 +32,7 @@
     self.buttonSRL.enabled = false;
     self.coverView.hidden = false;
     
-    
+     [self reloadBG];
     
     NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
@@ -245,8 +245,8 @@
                 DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
                 
 //                dvc.templateName = @"debug.json";
-                dvc.templateName = @"GEIC - Home Improvement Contract 2017.json";
-                dvc.pdfName = @"GEIC - Home Improvement Contract 2017.pdf";
+                dvc.templateName = @"GEIC - Home Improvement Contract 2017 Update.json";
+                dvc.pdfName = @"GEIC - Home Improvement Contract 2017 Update.pdf";
                 dvc.docment_id = json[@"doc_number"];
                 dvc.OnSave=^(NSString* file, NSString* subject)
                 {
@@ -258,7 +258,43 @@
             }
             else
             {
-                [RAUtils message_alert:[json valueForKey:@"err_msg"]  title:@"Create Customer" controller:self] ;
+//                [RAUtils message_alert:[json valueForKey:@"err_msg"]  title:@"Create Customer" controller:self] ;
+                
+                UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:@"Create Customer" message:@"Can not create new customer on server, do you want to create an offline document?" preferredStyle:UIAlertControllerStyleAlert];
+
+                
+                UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
+                    
+                    DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
+                    
+                    //                dvc.templateName = @"debug.json";
+                    dvc.templateName = @"GEIC - Home Improvement Contract 2017 Update.json";
+                    dvc.pdfName = @"GEIC - Home Improvement Contract 2017 Update.pdf";
+                    dvc.docment_id = [ACNetwork offline_docnumber];
+                    dvc.OnSave=^(NSString* file, NSString* subject)
+                    {
+                        
+                        [weakSelf previewPDF:file title:json[@"doc_number"] subject:subject];
+                    };
+                    
+                    [self.navigationController pushViewController:dvc animated:true];
+                    
+                    
+                }];
+                
+                UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+                    DebugLog(@"Cancel");
+                }];
+                [alertControl addAction:actionOne];
+                
+                [alertControl addAction:alertthree];
+                
+                //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
+                
+                
+                [self presentViewController:alertControl animated:YES completion:nil];
+                
+                
             }
             
             
@@ -284,8 +320,62 @@
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
 }
+-(void) reloadBG
+{
+    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+    
+    switch (orientation) {
+        case UIInterfaceOrientationPortrait:
+        case UIInterfaceOrientationPortraitUpsideDown:
+        {
+            self.coverBG.image = [UIImage imageNamed:@"home_bg_p"];
+            self.imageBG.image = [UIImage imageNamed:@"home_bg_p"];
+            break;
+        }
+            
+            
+        case UIInterfaceOrientationLandscapeLeft:
+        case UIInterfaceOrientationLandscapeRight:
+        {
+            self.coverBG.image = [UIImage imageNamed:@"home_bg_l"];
+            self.imageBG.image = [UIImage imageNamed:@"home_bg_l"];
+            break;
+        }
+            
+        default:
+            self.coverBG.image = [UIImage imageNamed:@"home_bg_p"];
+            self.imageBG.image = [UIImage imageNamed:@"home_bg_p"];
+            break;
+    }
+}
+-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+{
+    
+    [self reloadBG];
+    
+    
+//    [self initControl];
+//    //    [self.pdfPageView setNeedsLayout];
+//    [self.pdfPageView setNeedsDisplay];
+//    //    UIDeviceOrientation dev_ori = [[UIDevice currentDevice]orientation];
+//    
+//    //    UIApplication * app = [UIApplication sharedApplication];
+//    //    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    //    [appDelegate didRotated];
+//    
 
-
+    
+//    //    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
+//    //    {
+//    //        self.orientation = orientation;
+//    //        [self.collectionview.collectionViewLayout invalidateLayout];
+//    //        DebugLog(@"routed");
+//    //    }
+    
+    
+    
+    
+}
 
 - (IBAction)OnSigninClick:(id)sender {