Jelajahi Sumber

NPD MOBILE

model detail 集成视频播放功能。
Ray Zhang 9 tahun lalu
induk
melakukan
b8530143f0
23 mengubah file dengan 809 tambahan dan 435 penghapusan
  1. TEMPAT SAMPAH
      Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate
  2. 4 0
      RA Image/RA Image.xcodeproj/project.pbxproj
  3. TEMPAT SAMPAH
      RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
  4. 152 137
      RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. 0 14
      RedAnt ERP Mobile/common/CartUtils.m
  6. 1 56
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m
  7. 1 15
      RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m
  8. 10 3
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.h
  9. 65 18
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  10. 137 66
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m
  11. 3 1
      RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m
  12. 5 0
      RedAnt ERP Mobile/common/ImageUtils.h
  13. 79 0
      RedAnt ERP Mobile/common/ImageUtils.m
  14. 4 2
      RedAnt ERP Mobile/common/RAUtils.h
  15. 39 55
      RedAnt ERP Mobile/common/RAUtils.m
  16. 6 1
      RedAnt ERP Mobile/common/photoStack/PhotoStackView.h
  17. 95 59
      RedAnt ERP Mobile/common/photoStack/PhotoStackView.m
  18. 49 0
      RedAnt ERP Mobile/common/photoStack/photostack_image.html
  19. 49 0
      RedAnt ERP Mobile/common/photoStack/photostack_video.html
  20. 8 4
      RedAnt ERP Mobile/iSales-NPD.xcodeproj/project.pbxproj
  21. 4 4
      RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard
  22. 49 0
      RedAnt ERP Mobile/iSales-NPD/photostack_image.html
  23. 49 0
      RedAnt ERP Mobile/iSales-NPD/photostock_video.html

TEMPAT SAMPAH
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 4 - 0
RA Image/RA Image.xcodeproj/project.pbxproj

@@ -785,12 +785,14 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				INFOPLIST_FILE = "RA Image/Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = "usai.redant.RA-Image";
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE_SPECIFIER = "";
 			};
 			name = Debug;
 		};
@@ -798,12 +800,14 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				INFOPLIST_FILE = "RA Image/Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = "usai.redant.RA-Image";
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE_SPECIFIER = "";
 			};
 			name = Release;
 		};

TEMPAT SAMPAH
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 152 - 137
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3,51 +3,19 @@
    type = "0"
    version = "2.0">
    <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "common/Functions/home/HomeViewController.m"
-            timestampString = "509016258.96323"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "29"
-            endingLineNumber = "29"
-            landmarkName = "-dealloc"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509016263.749445"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "30"
-            endingLineNumber = "30"
-            landmarkName = "-dealloc"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509016598.436406"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "39"
-            endingLineNumber = "39"
-            landmarkName = "-stopTimmer"
+            startingLineNumber = "1010"
+            endingLineNumber = "1010"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -57,13 +25,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509272040.783552"
+            filePath = "common/Functions/modelDetail/DetailHeaderCell.m"
+            timestampString = "519547902.606104"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "160"
-            endingLineNumber = "160"
-            landmarkName = "-initWithFrame:"
+            startingLineNumber = "1071"
+            endingLineNumber = "1071"
+            landmarkName = "-photoStackView:contentForIndex:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -73,13 +41,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509253605.182088"
+            filePath = "common/Functions/modelDetail/DetailHeaderCell.m"
+            timestampString = "519544763.00783"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "37"
-            endingLineNumber = "37"
-            landmarkName = "-stopTimmer"
+            startingLineNumber = "1062"
+            endingLineNumber = "1062"
+            landmarkName = "-numberOfPhotosInPhotoStackView:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -89,14 +57,61 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509253749.410417"
+            filePath = "common/Functions/modelDetail/DetailHeaderCell.m"
+            timestampString = "519544940.57881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "29"
-            endingLineNumber = "29"
-            landmarkName = "-dealloc"
+            startingLineNumber = "1070"
+            endingLineNumber = "1070"
+            landmarkName = "-photoStackView:contentForIndex:"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[DetailHeaderCell photoStackView:contentForIndex:]"
+                  moduleName = "NPD Mobile"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/RedAnt%20ERP%20Mobile/common/Functions/modelDetail/DetailHeaderCell.m"
+                  timestampString = "519544940.584431"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1071"
+                  endingLineNumber = "1071"
+                  offsetFromSymbolStart = "57">
+               </Location>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__Block_byref_object_copy_"
+                  moduleName = "NPD Mobile"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/RedAnt%20ERP%20Mobile/common/Functions/modelDetail/DetailHeaderCell.m"
+                  timestampString = "519544940.590885"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1071"
+                  endingLineNumber = "1071"
+                  offsetFromSymbolStart = "16">
+               </Location>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__Block_byref_object_dispose_"
+                  moduleName = "NPD Mobile"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/RedAnt%20ERP%20Mobile/common/Functions/modelDetail/DetailHeaderCell.m"
+                  timestampString = "519544940.595069"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1071"
+                  endingLineNumber = "1071"
+                  offsetFromSymbolStart = "16">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -105,13 +120,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509254160.096735"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "52"
-            endingLineNumber = "52"
-            landmarkName = "-animationDuration:"
+            startingLineNumber = "1387"
+            endingLineNumber = "1387"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -121,13 +136,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "259"
-            endingLineNumber = "259"
-            landmarkName = "-scrollViewDidScroll:"
+            startingLineNumber = "1416"
+            endingLineNumber = "1416"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -137,13 +152,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509272779.120718"
+            filePath = "common/Functions/modelDetail/DetailHeaderCell.m"
+            timestampString = "519552793.217402"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "180"
-            endingLineNumber = "180"
-            landmarkName = "-configContentViews"
+            startingLineNumber = "1378"
+            endingLineNumber = "1378"
+            landmarkName = "-AddStackContent:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -153,13 +168,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailHeaderCell.m"
+            timestampString = "519548249.348925"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "261"
-            endingLineNumber = "261"
-            landmarkName = "-scrollViewDidScroll:"
+            startingLineNumber = "1063"
+            endingLineNumber = "1063"
+            landmarkName = "-numberOfPhotosInPhotoStackView:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -169,13 +184,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailHeaderCell.m"
+            timestampString = "519552793.217402"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "266"
-            endingLineNumber = "266"
-            landmarkName = "-scrollViewDidScroll:"
+            startingLineNumber = "1427"
+            endingLineNumber = "1427"
+            landmarkName = "-setup"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -185,13 +200,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "275"
-            endingLineNumber = "275"
-            landmarkName = "-scrollViewDidEndDecelerating:"
+            startingLineNumber = "1390"
+            endingLineNumber = "1390"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -201,13 +216,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "265"
-            endingLineNumber = "265"
-            landmarkName = "-scrollViewDidScroll:"
+            startingLineNumber = "1441"
+            endingLineNumber = "1441"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -217,13 +232,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274411.914611"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "170"
-            endingLineNumber = "170"
-            landmarkName = "-configContentViews"
+            startingLineNumber = "1392"
+            endingLineNumber = "1392"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -233,13 +248,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519552550.118396"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "193"
-            endingLineNumber = "193"
-            landmarkName = "-setScrollViewContentDataSource"
+            startingLineNumber = "148"
+            endingLineNumber = "148"
+            landmarkName = "-reload"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -249,13 +264,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "215"
-            endingLineNumber = "215"
-            landmarkName = "-setScrollViewContentDataSource"
+            startingLineNumber = "1395"
+            endingLineNumber = "1395"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -265,13 +280,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509274640.651951"
+            filePath = "common/RAUtils.m"
+            timestampString = "519552926.61651"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "212"
-            endingLineNumber = "212"
-            landmarkName = "-setScrollViewContentDataSource"
+            startingLineNumber = "921"
+            endingLineNumber = "921"
+            landmarkName = "+htmlForVideo:template:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -281,13 +296,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/AutoScrollImage/CycleScrollView.m"
-            timestampString = "509275459.323293"
+            filePath = "common/Functions/modelDetail/DetailViewController.m"
+            timestampString = "519553581.091549"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "258"
-            endingLineNumber = "258"
-            landmarkName = "-scrollViewDidScroll:"
+            startingLineNumber = "1397"
+            endingLineNumber = "1397"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -297,13 +312,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/Functions/home/HomeViewController.m"
-            timestampString = "509332766.690153"
+            filePath = "common/photoStack/PhotoStackView.m"
+            timestampString = "519555118.914511"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "58"
-            endingLineNumber = "58"
-            landmarkName = "-viewWillAppear:"
+            startingLineNumber = "308"
+            endingLineNumber = "308"
+            landmarkName = "-indexOfTopPhoto"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -313,13 +328,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/Functions/cart/CartViewController.m"
-            timestampString = "510041351.481276"
+            filePath = "common/photoStack/PhotoStackView.m"
+            timestampString = "519555118.914511"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1923"
-            endingLineNumber = "1923"
-            landmarkName = "-tableView:editActionsForRowAtIndexPath:"
+            startingLineNumber = "308"
+            endingLineNumber = "308"
+            landmarkName = "-indexOfTopPhoto"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -329,13 +344,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/Functions/cart/CartViewController.m"
-            timestampString = "510041357.515178"
+            filePath = "common/photoStack/PhotoStackView.m"
+            timestampString = "519555118.914511"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1933"
-            endingLineNumber = "1933"
-            landmarkName = "-tableView:editActionsForRowAtIndexPath:"
+            startingLineNumber = "313"
+            endingLineNumber = "313"
+            landmarkName = "-topPhoto"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -345,13 +360,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/Functions/modelDetail/DetailViewController.m"
-            timestampString = "519200124.134795"
+            filePath = "common/photoStack/PhotoStackView.m"
+            timestampString = "519554395.604837"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1320"
-            endingLineNumber = "1320"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            startingLineNumber = "114"
+            endingLineNumber = "114"
+            landmarkName = "-setHighlighted:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -361,13 +376,13 @@
             shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "common/Functions/modelDetail/DetailViewController.m"
-            timestampString = "519207412.75191"
+            filePath = "common/photoStack/PhotoStackView.m"
+            timestampString = "519555118.914511"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1321"
-            endingLineNumber = "1321"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            startingLineNumber = "316"
+            endingLineNumber = "316"
+            landmarkName = "-topPhoto"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 0 - 14
RedAnt ERP Mobile/common/CartUtils.m

@@ -42,22 +42,8 @@
                     [holder performSelector:addtocart];
 
 
-                    //    [self ReloadData];
 
 
-                    //                    if(self.shopCartBlock!=nil)
-                    //                    {
-                    //                        UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
-                    //
-                    //
-                    //                        CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
-                    //                        UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
-                    //                        iv.image = img;
-                    //                        //                        [self.contentView addSubview:iv];
-                    //                        self.shopCartBlock(iv);
-                    //
-                    //                    }
-
                 }
             }
             else

+ 1 - 56
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -2608,62 +2608,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     
     
 }
-//-(void) neworder
-//{
-//
-//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
-//    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-//
-//        NSDictionary* return_json = [iSalesNetwork new_Order];
-//
-//        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-//
-//
-//            if([[return_json valueForKey:@"result"] intValue]==2)
-//            {
-//                int result=[[return_json valueForKey:@"result"] intValue];
-//                if(result==2)
-//                {
-//                    //successed.
-//
-//                    NSString* order_code = [return_json valueForKey:@"orderCode"];
-//                    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-//                    appDelegate.order_code = order_code;
-//
-//
-//                    [self addtocart];
-//
-//
-//                    //    [self ReloadData];
-//
-//
-//                    //                    if(self.shopCartBlock!=nil)
-//                    //                    {
-//                    //                        UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
-//                    //
-//                    //
-//                    //                        CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
-//                    //                        UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
-//                    //                        iv.image = img;
-//                    //                        //                        [self.contentView addSubview:iv];
-//                    //                        self.shopCartBlock(iv);
-//                    //
-//                    //                    }
-//
-//                }
-//            }
-//            else
-//            {
-//                [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:self] ;
-//            }
-//
-//
-//
-//
-//        });
-//    });
-//}
+
 -(void) addtocart:(NSString*) modelname
 {
     

+ 1 - 15
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m

@@ -500,21 +500,7 @@
                     [self addtocart];
                     
                     
-                    //    [self ReloadData];
-                    
-                    
-                    //                    if(self.shopCartBlock!=nil)
-                    //                    {
-                    //                        UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
-                    //
-                    //
-                    //                        CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
-                    //                        UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
-                    //                        iv.image = img;
-                    //                        //                        [self.contentView addSubview:iv];
-                    //                        self.shopCartBlock(iv);
-                    //
-                    //                    }
+
                     
                 }
             }

+ 10 - 3
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.h

@@ -37,7 +37,10 @@
 @property (strong, nonatomic) IBOutlet PhotoStackView *photoStack;
 @property (weak, nonatomic) IBOutlet UIPageControl *pageControl;
 -(void)setup;
-@property (nonatomic, strong) NSArray *photos;
+//@property (nonatomic, strong) NSArray *photos;
+
+@property (nonatomic, strong) NSArray *stack_content;
+//@property (nonatomic, strong) NSMutableDictionary *stack_content;
 
 @property (nonatomic, strong) NSArray *urls;
 @property (nonatomic, strong) NSString *product_id;
@@ -83,13 +86,17 @@
 @property (nonatomic,copy)  void(^set_update_data)(bool bupdate);
 @property (nonatomic,copy)  void(^WatchlistBlock)(UIImageView *imageView);
 @property (nonatomic,copy)  void(^PortfolioBlock)(UIImageView *imageView);
-- (void)AddPhoto :(UIImage*)photo ;
+- (void)AddStackContent :(NSString*)html ;
+
+-(void) resetStack;
+//-(void) setStack_content:(NSMutableDictionary*) content;
+//- (void)AddPhoto :(UIImage*)photo ;
 @property (strong, nonatomic) IBOutlet UILabel *selector_label;
 @property (strong, nonatomic) IBOutlet UIButton *introduceBtn;
 @property (nonatomic,copy) void(^introduceBlock)(UIButton *sender);
 -(void)Hide_selector:(bool) bhide;
 
--(void)ClearPhotos;
+//-(void)ClearPhotos;
 @property int cqty;
 @property int step;
 @property int quantity;

+ 65 - 18
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -1058,18 +1058,38 @@
 #pragma mark Deck DataSource Protocol Methods
 
 -(NSUInteger)numberOfPhotosInPhotoStackView:(PhotoStackView *)photoStack {
-    return [self.photos count];
+    
+  //  return [self.stack_content[@"count"] intValue];
+    return [self.stack_content count];
 }
 
--(UIImage *)photoStackView:(PhotoStackView *)photoStack photoForIndex:(NSUInteger)index {
+
+- (NSString *)photoStackView:(PhotoStackView *)photoStack contentForIndex:(NSUInteger)index
+{
     
     
-    if(self.photos.count==0)
-        return nil;
-    return [self.photos objectAtIndex:index];
+        if(self.stack_content.count==0)
+            return nil;
+        return [self.stack_content objectAtIndex:index];
+    
 }
 
 
+-(UIImage *)photoStackView:(PhotoStackView *)photoStack photoForIndex:(NSUInteger)index {
+
+    return nil;
+    
+//    if(self.photos.count==0)
+//        return nil;
+//    return [self.photos objectAtIndex:index];
+}
+
+/*
+- (NSString *)photoStackView:(PhotoStackView *)photoStack contentForIndex:(NSUInteger)index
+{
+ 
+}
+*/
 
 #pragma mark -
 #pragma mark Deck Delegate Protocol Methods
@@ -1097,7 +1117,7 @@
 //    }
     
     // 调用展示窗口
-    ImageScrollerViewController *imgShow = [[ImageScrollerViewController alloc] initWithSourceData:[self.photos mutableCopy] withIndex:index];
+    ImageScrollerViewController *imgShow = [ImageScrollerViewController new];//[[ImageScrollerViewController alloc] initWithSourceData:[self.photos mutableCopy] withIndex:index];
     
     UIViewController *vc= [RAUtils getViewController:self];
     [vc.navigationController pushViewController:imgShow animated:true];
@@ -1330,6 +1350,7 @@
 
 #pragma mark -
 #pragma mark Actions
+/*
 -(void)ClearPhotos
 {
     NSMutableArray *photosMutable = [self.photos mutableCopy];
@@ -1340,6 +1361,32 @@
 
 
 }
+*/
+
+-(void) resetStack
+{
+    
+    [[self.stack_content mutableCopy] removeAllObjects];
+
+        [self.photoStack reloadData];
+}
+
+
+
+- (void)AddStackContent :(NSString*)html {
+    
+    NSMutableArray *photosMutable = [self.stack_content mutableCopy];
+    [photosMutable addObject:html];
+    self.stack_content = photosMutable;
+    [self.photoStack reloadData];
+    self.pageControl.numberOfPages = [self.stack_content count];
+    if(self.stack_content.count<2)
+    self.photoStack.showBorder=false;
+    else
+        self.photoStack.showBorder=true;
+}
+
+/*
 - (void)AddPhoto :(UIImage*)photo {
     
     NSMutableArray *photosMutable = [self.photos mutableCopy];
@@ -1347,13 +1394,13 @@
     self.photos = photosMutable;
     [self.photoStack reloadData];
     self.pageControl.numberOfPages = [self.photos count];
-    if(self.photos.count<2-1)//1 for qrcode;
+    if(self.photos.count<2-1)1 for qrcode;
         self.photoStack.showBorder=false;
     else
         self.photoStack.showBorder=true;
         
 }
-
+*/
 
 
 #pragma mark -
@@ -1361,7 +1408,7 @@
 -(void)setup {
     
     
-//    int availability = [self.count_Label.text intValue];
+    int availability = [self.count_Label.text intValue];
     self.stepper.minimumValue= self.step;
     self.stepper.maximumValue = INTMAX_MAX;
     
@@ -1377,21 +1424,21 @@
     if(true)//(self.photos==nil)
     {
         
-        self.photos = [NSArray array];
+        self.stack_content = [NSArray new];
     }
-    if(true)//(self.photoStack==nil)
+    if(true)
     {
-        //       if(self.photoStack!=nil)
-        //           [self.photoStack removeFromSuperview];
-        //  self.photoStack = [[PhotoStackView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
-        //        self.photoStack.backgroundColor =[UIColor redColor];
-        //    self.photoStack.center = CGPointMake(self.center.x, 220);
+         //      if(self.photoStack!=nil)
+       //            [self.photoStack removeFromSuperview];
+       //   self.photoStack = [[PhotoStackView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
+      //          self.photoStack.backgroundColor =[UIColor redColor];
+      //      self.photoStack.center = CGPointMake(self.center.x, 220);
         self.photoStack.dataSource = self;
         self.photoStack.delegate = self;
         
         
-        //    [self addSubview:self.photoStack];
-        self.pageControl.numberOfPages = [self.photos count];
+  //          [self addSubview:self.photoStack];
+        self.pageControl.numberOfPages = self.stack_content.count;
     }
 }
 

+ 137 - 66
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -25,6 +25,7 @@
 #import "JKMessageBoxController.h"
 
 #import "CartUtils.h"
+#import "ImageUtils.h"
 #import "PDFViewController.h"
 
 #define  DEF_CELL_HEIGHT 44
@@ -124,7 +125,7 @@ dispatch_async(dispatch_get_main_queue(), ^{
                 
                 self.detail_data = [detail_json mutableCopy];
                 self.product_id = [NSString stringWithFormat:@"%d",[[detail_json valueForKey:@"product_id"] intValue] ];
-                NSDictionary* imgsection = [detail_json objectForKey:@"img_section"];
+                NSMutableDictionary* imgsection = [[detail_json objectForKey:@"img_section"] mutableCopy];
                 //          AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 if(/*appDelegate.user_type==USER_ROLE_CUSTOMER*/true)
                     self.quantity =[[imgsection valueForKey:@"stockUom"] intValue];
@@ -143,6 +144,47 @@ dispatch_async(dispatch_get_main_queue(), ^{
                 
                  NSString* img_url = self.detail_data[@"img_section"][@"model_s_img"];
                 
+                NSMutableDictionary* images=[self.detail_data[@"img_section"][@"images"] mutableCopy];
+                NSMutableDictionary* videos=[self.detail_data[@"img_section"][@"videos"] mutableCopy];
+                
+                NSMutableDictionary* contents = [NSMutableDictionary new];
+                int count = 0;
+                
+                
+                {
+                    for(int ic=0;ic<[images[@"img_count"] intValue];ic++)
+                    {
+                        NSMutableDictionary* item = [images[[NSString stringWithFormat:@"img_%d",ic]] mutableCopy];
+                        item[@"type"]=@"image";
+                        contents[[NSString stringWithFormat:@"item_%d",count]]=item;
+                        count++;
+                    }
+                    
+                    NSString* qrpath = [ImageUtils generateQRCodeFile:model_name width:350 height:350];
+//                    UIImage* qrimg=[QRCodeGenerator qrImageForString:model_name imageSize:350];
+                    if(qrpath!=nil)
+                    {
+                        NSMutableDictionary* item =[@{@"type":@"image",@"is_localfile":@(true),@"l":qrpath,@"s":qrpath} mutableCopy];
+                        
+                        contents[[NSString stringWithFormat:@"item_%d",count]]=item ;
+                        count++;
+                    }
+                }
+                
+                {
+                    for(int ic=0;ic<[videos[@"count"] intValue];ic++)
+                    {
+                        NSString* videocode = videos[[NSString stringWithFormat:@"video_%d",ic]];
+                        NSMutableDictionary* item =[@{@"type":@"video",@"code":videocode} mutableCopy];
+                        
+                        contents[[NSString stringWithFormat:@"item_%d",count]]=item;
+                        count++;
+                    }
+                }
+                contents[@"count"]=@(count);
+                imgsection[@"stack_contents"]=contents;
+                self.detail_data[@"img_section"] = imgsection;
+//                self.detail_data[@"img_section"][@"stack_contents"]=contents;
                 
                 NSMutableDictionary* item = [[NSMutableDictionary alloc]init];
                 [item setValue:self.product_id forKey:@"product_id"];
@@ -1326,10 +1368,11 @@ self.isrefreshing=false;
         cell.product_id = self.product_id;
 //        cell.itemIDLabel.text = [NSString stringWithFormat:@"Item id:%d",3947105];
         [cell setup];
-        [cell ClearPhotos];
-         NSDictionary* imgs_json = [section_json objectForKey:@"images"];
-        int count = [[imgs_json valueForKey:@"img_count"]intValue];
-        if(count<2-1)//1 for qrcode;
+        [cell resetStack];
+//         NSDictionary* imgs_json = [section_json objectForKey:@"images"];
+        NSMutableDictionary* contents_json = [section_json objectForKey:@"stack_contents"];
+        int count = [[contents_json valueForKey:@"count"]intValue];
+        if(count<2)//1 for qrcode;
             cell.pageControl.hidden = true;
         else
             cell.pageControl.hidden = false;
@@ -1337,90 +1380,118 @@ self.isrefreshing=false;
        // NSMutableArray* urls= [[NSMutableArray alloc]init];
         
        // cell.urls = urls;
+        
+//        cell.stack_content = contents_json;//
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            
+ 
             for(int i=0;i<count;i++)
             {
                 
-                NSDictionary* img_json=[imgs_json objectForKey:[NSString stringWithFormat:@"img_%d",i]];
-                
-                NSString* img_url = [img_json valueForKey:@"s"];
+                NSDictionary* item_json=[contents_json objectForKey:[NSString stringWithFormat:@"item_%d",i]];
                 
-                
-            //    NSString* img_url_l = [img_json valueForKey:@"l"];
-            //    if(img_url_l.length>0)
-             //      [urls addObject:img_url_l];
-                NSString* file_name=[img_url lastPathComponent];
-                NSData* img_data=[iSalesDB load_cached_img:file_name loadFrom:img_url];
-                if(img_data!=nil)
+                NSString* type = item_json[@"type"];
+                if([type isEqualToString:@"video"])
                 {
-                    dispatch_async(dispatch_get_main_queue(), ^{
-                        UIImage * img =[UIImage imageWithData:img_data];
-                        [cell AddPhoto:img];
-                        
-                        
-                    if(i==count-1)
-                    {
-                        UIImage* qrimg=[QRCodeGenerator qrImageForString:[section_json valueForKey:@"model_name"] imageSize:350];
-                        if(qrimg!=nil)
-                            [cell AddPhoto:qrimg];
-                    }
-//                        if(i==0)
-//                        cell.imageView.image = img;
-                    });
+                    NSString* code = [item_json valueForKey:@"code"];
+                    NSString* html=[RAUtils htmlForVideo:code template:nil];
+                    [cell AddStackContent:html];
                 }
-                else
+                else if([type isEqualToString:@"image"])
                 {
-                    NSData*  downloadimg_data = nil;
-                    if (!appDelegate.offline_mode) {
-                        downloadimg_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:img_url]];
-                    }
-                    dispatch_async(dispatch_get_main_queue(), ^{
-                        
-                        
-                        
-                        if(downloadimg_data!=nil)
-                        {
-                            
-                            [iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
+                    NSString* img_url = [item_json valueForKey:@"s"];
+                    
+                    
+                    //    NSString* img_url_l = [img_json valueForKey:@"l"];
+                    //    if(img_url_l.length>0)
+                    //      [urls addObject:img_url_l];
+                    NSString* file_name=[img_url lastPathComponent];
+                    NSData* img_data=nil;
+                    if([item_json[@"is_localfile"] boolValue])
+                        img_data = [NSData dataWithContentsOfFile:img_url];
+                    else
+                        [iSalesDB load_cached_img:file_name loadFrom:img_url];
+                    if(img_data!=nil)
+                    {
+                        dispatch_async(dispatch_get_main_queue(), ^{
+                            UIImage * img =[UIImage imageWithData:img_data];
                             
-                            UIImage * img =[UIImage imageWithData:downloadimg_data];
-                            [cell AddPhoto:img];
+                            NSString* html=[RAUtils htmlForImage:img template:nil];
+                            [cell AddStackContent:html];
                             
-                            if(i==count-1)
-                            {
-                                UIImage* qrimg=[QRCodeGenerator qrImageForString:[section_json valueForKey:@"model_name"] imageSize:350];
-                                if(qrimg!=nil)
-                                    [cell AddPhoto:qrimg];
-                            }
-//                            if(i==0)
-//                                cell.imageView.image = img;
+//                            if(i==count-1)
+//                            {
+//                                UIImage* qrimg=[QRCodeGenerator qrImageForString:[section_json valueForKey:@"model_name"] imageSize:350];
+//                                if(qrimg!=nil)
+//                                    [cell AddPhoto:qrimg];
+//                            }
+                            //                        if(i==0)
+                            //                        cell.imageView.image = img;
+                        });
+                    }
+                    else
+                    {
+                        NSData*  downloadimg_data = nil;
+                        if (!appDelegate.offline_mode) {
+                            downloadimg_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:img_url]];
                         }
-                        else
-                        {
+                        dispatch_async(dispatch_get_main_queue(), ^{
                             
                             
-                            UIImage * img =[UIImage imageNamed:@"notfound_l"];
-                            [cell AddPhoto:img];
                             
-                            if(i==count-1)
+                            if(downloadimg_data!=nil)
                             {
-                                UIImage* qrimg=[QRCodeGenerator qrImageForString:[section_json valueForKey:@"model_name"] imageSize:350];
-                                if(qrimg!=nil)
-                                    [cell AddPhoto:qrimg];
+                                
+                                [iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
+                                
+                                UIImage * img =[UIImage imageWithData:downloadimg_data];
+                                NSString* html=[RAUtils htmlForImage:img template:nil];
+                                [cell AddStackContent:html];
+
+                                
+//                                if(i==count-1)
+//                                {
+//                                    UIImage* qrimg=[QRCodeGenerator qrImageForString:[section_json valueForKey:@"model_name"] imageSize:350];
+//                                    if(qrimg!=nil)
+//                                        [cell AddPhoto:qrimg];
+//                                }
+                                //                            if(i==0)
+                                //                                cell.imageView.image = img;
                             }
-//                            if(i==0)
-//                                cell.imageView.image = img;
-                        }
-                        
-                    });
+                            else
+                            {
+                                
+                                
+                                UIImage * img =[UIImage imageNamed:@"notfound_l"];
+                                NSString* html=[RAUtils htmlForImage:img template:nil];
+                                [cell AddStackContent:html];
+
+                                
+//                                if(i==count-1)
+//                                {
+//                                    UIImage* qrimg=[QRCodeGenerator qrImageForString:[section_json valueForKey:@"model_name"] imageSize:350];
+//                                    if(qrimg!=nil)
+//                                        [cell AddPhoto:qrimg];
+//                                }
+                                //                            if(i==0)
+                                //                                cell.imageView.image = img;
+                            }
+                            
+                        });
+                    }
                 }
+                
+                
+                
+                
+
             }
             
 
 
             
         });
+        
+        
        // cell.backgroundColor = [UIColor whiteColor];
         
         __weak typeof(self) weakself = self;

+ 3 - 1
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -19,6 +19,8 @@
 #import "Singleton.h"
 #import "QRCodeGenerator.h"
 #import "config.h"
+#import "ImageUtils.h"
+
 @interface OLDataProvider ()
 
 @end
@@ -656,7 +658,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     NSString* temp = NSTemporaryDirectory();
     NSString* filename =[NSString stringWithFormat:@"%@.png", [[NSUUID UUID] UUIDString]];
     NSString* qrpath=[temp stringByAppendingPathComponent:filename];
-    UIImage* qrimg=[RAUtils generateBarCode:order_code width:480 height:44];//[QRCodeGenerator qrImageForString:order_code imageSize:240];
+    UIImage* qrimg=[ImageUtils generateBarCode:order_code width:480 height:44];//[QRCodeGenerator qrImageForString:order_code imageSize:240];
     bool bwrite=[UIImagePNGRepresentation(qrimg)writeToFile: qrpath    atomically:YES];
     data[@"img_barcode"]=qrpath;
     data[@"so_id"]=order_code;

+ 5 - 0
RedAnt ERP Mobile/common/ImageUtils.h

@@ -15,4 +15,9 @@
 + (NSData*) load_cached_img:(NSString*) filename loadFrom:(NSString*) path;
 + (NSData*) load_img:(NSString*) filename ;
 + (NSData*) load_cached_img:(NSString*) filename loadFrom:(NSString*) path size:(CGSize)size allow_enlarge:(bool)allow_enlarge;
+
++(UIImage*)generateBarCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height;
++(UIImage*)generateQRCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height;
++(NSString*)generateBarCodeFile:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height;
++(NSString*)generateQRCodeFile:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height;
 @end

+ 79 - 0
RedAnt ERP Mobile/common/ImageUtils.m

@@ -177,4 +177,83 @@
     return data;
     
 }
+
+
++(UIImage*)generateBarCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height
+{
+    //return nil;
+    // 生成二维码图片
+    CIImage *barcodeImage;
+    NSData *data = [barCodeStr dataUsingEncoding:NSISOLatin1StringEncoding allowLossyConversion:false];
+    CIFilter *filter = [CIFilter filterWithName:@"CICode128BarcodeGenerator"];
+    
+    [filter setValue:data forKey:@"inputMessage"];
+    barcodeImage = [filter outputImage];
+    
+    // 消除模糊
+    CGFloat scaleX = width / barcodeImage.extent.size.width; // extent 返回图片的frame
+    CGFloat scaleY = height / barcodeImage.extent.size.height;
+    CIImage *transformedImage = [barcodeImage imageByApplyingTransform:CGAffineTransformScale(CGAffineTransformIdentity, scaleX, scaleY)];
+    CIContext *context = [CIContext contextWithOptions:nil];
+    CGImageRef cgImage = [context createCGImage:transformedImage fromRect:[transformedImage extent]];
+    
+    UIImage* ret = [UIImage imageWithCGImage:cgImage];
+    
+    
+    CGImageRelease(cgImage);
+    
+    return ret;
+    
+}
++(NSString*)generateBarCodeFile:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height
+{
+    UIImage* img = [self generateBarCode:barCodeStr width:width height:height];
+    NSString* qrpath=nil;
+    NSString* temp = NSTemporaryDirectory();
+    NSString* filename =[NSString stringWithFormat:@"%@.png", [[NSUUID UUID] UUIDString]];
+    qrpath=[temp stringByAppendingPathComponent:filename];
+    
+    [UIImagePNGRepresentation(img)writeToFile: qrpath    atomically:YES];
+    return qrpath;
+}
++(NSString*)generateQRCodeFile:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height
+{
+    
+    UIImage* img = [self generateQRCode:barCodeStr width:width height:height];
+    NSString* qrpath=nil;
+    NSString* temp = NSTemporaryDirectory();
+    NSString* filename =[NSString stringWithFormat:@"%@.png", [[NSUUID UUID] UUIDString]];
+    qrpath=[temp stringByAppendingPathComponent:filename];
+    
+    [UIImagePNGRepresentation(img)writeToFile: qrpath    atomically:YES];
+    return qrpath;
+}
++(UIImage*)generateQRCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height
+{
+    {
+        // 生成二维码图片
+        CIImage *barcodeImage;
+        NSData *data = [barCodeStr dataUsingEncoding:NSISOLatin1StringEncoding allowLossyConversion:false];
+        CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
+        
+        [filter setValue:data forKey:@"inputMessage"];
+        barcodeImage = [filter outputImage];
+        
+        // 消除模糊
+        CGFloat scaleX = width / barcodeImage.extent.size.width; // extent 返回图片的frame
+        CGFloat scaleY = height / barcodeImage.extent.size.height;
+        CIImage *transformedImage = [barcodeImage imageByApplyingTransform:CGAffineTransformScale(CGAffineTransformIdentity, scaleX, scaleY)];
+        
+        CIContext *context = [CIContext contextWithOptions:nil];
+        CGImageRef cgImage = [context createCGImage:transformedImage fromRect:[transformedImage extent]];
+        
+        UIImage* ret = [UIImage imageWithCGImage:cgImage];
+        
+        
+        CGImageRelease(cgImage);
+        
+        return ret;
+        
+    }
+}
 @end

+ 4 - 2
RedAnt ERP Mobile/common/RAUtils.h

@@ -54,8 +54,8 @@
 +(UIImage*)img_compress:(UIImage*)image kbsize:(float) size;
 +(NSString* )current_date;
 +(NSMutableArray*)dictionary2array:(NSDictionary*)json count_fields:(NSString*) count_fields item_mark:(NSString*) item_mark items_mark:(NSString* )items_mark;
-+(UIImage*)generateBarCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height;
-+(UIImage*)generateQRCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height;
+
+
 //+(void) add_recent_model:(NSDictionary*) model;
 + (long long) freeDiskSpaceInMegaBytes;
 
@@ -70,5 +70,7 @@
 + (NSString *)appCacheDirectory;
 +(NSString*)md5WithFile:(NSString*)path;
 + (BOOL)fileExistsAtPath:(NSString *)path;
++ (NSString *)htmlForVideo:(NSString*) iframeCode template:(NSString*) path;
++ (NSString *)htmlForImage:(UIImage *)image template:(NSString*) path;
 
 @end

+ 39 - 55
RedAnt ERP Mobile/common/RAUtils.m

@@ -233,61 +233,6 @@
     
 }
 
-+(UIImage*)generateBarCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height
-{
-    //return nil;
-    // 生成二维码图片
-    CIImage *barcodeImage;
-    NSData *data = [barCodeStr dataUsingEncoding:NSISOLatin1StringEncoding allowLossyConversion:false];
-    CIFilter *filter = [CIFilter filterWithName:@"CICode128BarcodeGenerator"];
-    
-    [filter setValue:data forKey:@"inputMessage"];
-    barcodeImage = [filter outputImage];
-    
-    // 消除模糊
-    CGFloat scaleX = width / barcodeImage.extent.size.width; // extent 返回图片的frame
-    CGFloat scaleY = height / barcodeImage.extent.size.height;
-    CIImage *transformedImage = [barcodeImage imageByApplyingTransform:CGAffineTransformScale(CGAffineTransformIdentity, scaleX, scaleY)];
-    CIContext *context = [CIContext contextWithOptions:nil];
-    CGImageRef cgImage = [context createCGImage:transformedImage fromRect:[transformedImage extent]];
-    
-    UIImage* ret = [UIImage imageWithCGImage:cgImage];
-    
-
-    CGImageRelease(cgImage);
-    
-    return ret;
-    
-}
-
-+(UIImage*)generateQRCode:(NSString*)barCodeStr width:(CGFloat)width height:(CGFloat)height
-{
-    {
-        // 生成二维码图片
-        CIImage *barcodeImage;
-        NSData *data = [barCodeStr dataUsingEncoding:NSISOLatin1StringEncoding allowLossyConversion:false];
-        CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
-        
-        [filter setValue:data forKey:@"inputMessage"];
-        barcodeImage = [filter outputImage];
-        
-        // 消除模糊
-        CGFloat scaleX = width / barcodeImage.extent.size.width; // extent 返回图片的frame
-        CGFloat scaleY = height / barcodeImage.extent.size.height;
-        CIImage *transformedImage = [barcodeImage imageByApplyingTransform:CGAffineTransformScale(CGAffineTransformIdentity, scaleX, scaleY)];
-        
-        CIContext *context = [CIContext contextWithOptions:nil];
-        CGImageRef cgImage = [context createCGImage:transformedImage fromRect:[transformedImage extent]];
-        
-        UIImage* ret = [UIImage imageWithCGImage:cgImage];
-        
-        
-        CGImageRelease(cgImage);
-        
-        return ret;
-        
-    }
-}
 
 +(NSString*) get_config_path
 {
@@ -968,6 +913,45 @@ done:
     
     return NO;
 }
++ (NSString *)htmlForVideo:(NSString*) iframeCode template:(NSString*) path
+{
+    
+    if(path==nil)
+        path=[[NSBundle mainBundle] pathForResource:@"photostack_video" ofType:@"html"];
+    NSString* tempate = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
+    
+    if(tempate==nil)
+        return @"";
+    
+//    NSData *imageData = UIImageJPEGRepresentation(image,1.0);
+//    NSString *imageSource = [NSString stringWithFormat:@"data:image/jpg;base64,%@",[imageData base64Encoding]];
+//    imageSource=[NSString stringWithFormat:@"<img src = \"%@\" />", imageSource];
+    
+    
+    tempate= [tempate stringByReplacingOccurrencesOfString:@"##replacement##" withString:iframeCode];
+    
+    return tempate;
+}
+
++ (NSString *)htmlForImage:(UIImage *)image template:(NSString*) path
+{
+    
+    if(path==nil)
+        path=[[NSBundle mainBundle] pathForResource:@"photostack_image" ofType:@"html"];
+    NSString* tempate = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
+    
+    if(tempate==nil)
+        return @"";
+    
+    NSData *imageData = UIImageJPEGRepresentation(image,1.0);
+    NSString *imageSource = [NSString stringWithFormat:@"data:image/jpg;base64,%@",[imageData base64Encoding]];
+    imageSource=[NSString stringWithFormat:@"<img src = \"%@\" />", imageSource];
+    
+    
+    tempate= [tempate stringByReplacingOccurrencesOfString:@"##replacement##" withString:imageSource];
+    
+    return tempate;
+}
 
 @end
 

+ 6 - 1
RedAnt ERP Mobile/common/photoStack/PhotoStackView.h

@@ -14,8 +14,11 @@
 
     @required
     - (NSUInteger)numberOfPhotosInPhotoStackView:(PhotoStackView *)photoStack;
-    - (UIImage *)photoStackView:(PhotoStackView *)photoStack photoForIndex:(NSUInteger)index;
 
+//This method has been replaced by -(NSString *)photoStackView:(PhotoStackView *)photoStack contentForIndex:(NSUInteger)index
+//    - (UIImage *)photoStackView:(PhotoStackView *)photoStack photoForIndex:(NSUInteger)index NS_DEPRECATED_IOS(2_0, 6_0);
+
+    - (NSString *)photoStackView:(PhotoStackView *)photoStack contentForIndex:(NSUInteger)index;
     @optional
     - (CGSize)photoStackView:(PhotoStackView *)photoStack photoSizeForIndex:(NSUInteger)index;
 
@@ -61,4 +64,6 @@
     -(void)flipToNextPhoto;
     -(void)reloadData;
 
+
+//+ (NSString *)htmlForJPGImage:(UIImage *)image template:(NSString*) path;
 @end

+ 95 - 59
RedAnt ERP Mobile/common/photoStack/PhotoStackView.m

@@ -113,7 +113,11 @@ static CGFloat const PhotoRotationOffsetDefault = 4.0f;
 -(void)setHighlighted:(BOOL)highlighted {
     [super setHighlighted:highlighted];
     
-    UIImageView *topPhoto = [[self topPhoto].subviews lastObject];
+    // !!!!!!!!! BUG ATTENTION!!!!!!!!!!
+    return;
+//    UIImageView *topPhoto = [[self topPhoto].subviews lastObject];
+    
+    UIWebView *topPhoto = [[self topPhoto].subviews lastObject];
     
     if(highlighted) {
         
@@ -324,73 +328,105 @@ static CGFloat const PhotoRotationOffsetDefault = 4.0f;
 
 -(void)reloadData {
     
-    if (!self.dataSource) {
-        //exit if data source has not been set up yet
-        self.photoViews = nil;
-        return;
-    }
-    
-    NSInteger numberOfPhotos = [self.dataSource numberOfPhotosInPhotoStackView:self];
-    NSInteger topPhotoIndex  = [self indexOfTopPhoto]; // Keeping track of current photo's top index so that it remains on top if new photos are added
-    
-    if(numberOfPhotos >= 0) {
-
-        NSMutableArray *photoViewsMutable   = [[NSMutableArray alloc] initWithCapacity:numberOfPhotos];
-        UIImage *borderImage                = [self.borderImage resizableImageWithCapInsets:UIEdgeInsetsMake(self.borderWidth, self.borderWidth, self.borderWidth, self.borderWidth)];
+    dispatch_async(dispatch_get_main_queue(), ^{
         
-        for (NSUInteger index = 0; index < numberOfPhotos; index++) {
-
+        
+        if (!self.dataSource) {
+            //exit if data source has not been set up yet
+            self.photoViews = nil;
+            return;
+        }
+        
+        NSInteger numberOfPhotos = [self.dataSource numberOfPhotosInPhotoStackView:self];
+        NSInteger topPhotoIndex  = [self indexOfTopPhoto]; // Keeping track of current photo's top index so that it remains on top if new photos are added
+        
+        if(numberOfPhotos >= 0) {
             
-            UIImage *image = [self.dataSource photoStackView:self photoForIndex:index];
-            CGSize imageSize = image.size;
-            if([self.dataSource respondsToSelector:@selector(photoStackView:photoSizeForIndex:)]){
-                imageSize = [self.dataSource photoStackView:self photoSizeForIndex:index];
-            }
-            UIImageView *photoImageView     = [[UIImageView alloc] initWithFrame:(CGRect){CGPointZero, self.frame.size}];
-            photoImageView.image            = image;
-            UIView *view                    = [[UIView alloc] initWithFrame:photoImageView.frame];
-            view.layer.rasterizationScale   = [[UIScreen mainScreen] scale];            
-            view.layer.shouldRasterize      = YES; // rasterize the view for faster drawing and smooth edges
-
-            if (self.showBorder) {
+            NSMutableArray *photoViewsMutable   = [[NSMutableArray alloc] initWithCapacity:numberOfPhotos];
+            UIImage *borderImage                = [self.borderImage resizableImageWithCapInsets:UIEdgeInsetsMake(self.borderWidth, self.borderWidth, self.borderWidth, self.borderWidth)];
+            
+            for (NSUInteger index = 0; index < numberOfPhotos; index++) {
                 
-                // Add the background image
-                if (borderImage) {
-                    // If there is a border image, we need to add a background image view, and add some padding around the photo for the border
-
-                    CGRect photoFrame                = photoImageView.frame;
-                    photoFrame.origin                = CGPointMake(self.borderWidth, self.borderWidth);
-                    photoImageView.frame             = photoFrame;
-
-                    view.frame                       = CGRectMake(0, 0, photoImageView.frame.size.width+(self.borderWidth*2), photoImageView.frame.size.height+(self.borderWidth*2));
-                    UIImageView *backgroundImageView = [[UIImageView alloc] initWithFrame:view.frame];
-                    backgroundImageView.image        = borderImage;
+                
+                //            UIImage *image = [self.dataSource photoStackView:self photoForIndex:index];
+                
+                NSString* html =  [self.dataSource photoStackView:self contentForIndex:index];
+                //            CGSize imageSize = image.size;
+                //            if([self.dataSource respondsToSelector:@selector(photoStackView:photoSizeForIndex:)]){
+                //                imageSize = [self.dataSource photoStackView:self photoSizeForIndex:index];
+                //            }
+                //            UIImageView *photoImageView     = [[UIImageView alloc] initWithFrame:(CGRect){CGPointZero, self.frame.size}];
+                //            photoImageView.image            = image;
+                UIWebView* contentView = [[UIWebView alloc] initWithFrame:(CGRect){CGPointZero, self.frame.size}];
+                contentView.scrollView.scrollEnabled = false;
+                //            NSString *html = [self htmlForJPGImage:image template:nil];
+                
+                //
+                //            NSString *contentImg = [NSString stringWithFormat:@"%@", stringImage];
+                //            NSString *content =[NSString stringWithFormat:
+                //                                @"<html>"
+                //                                "<style type=\"text/css\">"
+                //                                "<!--"
+                //                                "body{font-size:40pt;line-height:60pt;}"
+                //                                "-->"
+                //                                "</style>"
+                //                                "<body>"
+                //                                "%@"
+                //                                "</body>"
+                //                                "</html>"
+                //                                , contentImg];
+                
+                //让self.contentWebView加载content
+                [contentView loadHTMLString:html baseURL:nil];
+                
+                
+                UIView *view                    = [[UIView alloc] initWithFrame:contentView.frame];
+                view.layer.rasterizationScale   = [[UIScreen mainScreen] scale];
+                view.layer.shouldRasterize      = YES; // rasterize the view for faster drawing and smooth edges
+                
+                if (self.showBorder) {
                     
-                    [view addSubview:backgroundImageView];
-                } else {
-                    // if there is no boarder image draw one with the CALayer
-                    view.layer.borderWidth        = self.borderWidth;
-                    view.layer.borderColor        = [[UIColor whiteColor] CGColor];
-                    view.layer.shadowOffset       = CGSizeMake(0, 0);
-                    view.layer.shadowOpacity      = 0.5;
+                    // Add the background image
+                    if (borderImage) {
+                        // If there is a border image, we need to add a background image view, and add some padding around the photo for the border
+                        
+                        CGRect photoFrame                = contentView.frame;
+                        photoFrame.origin                = CGPointMake(self.borderWidth, self.borderWidth);
+                        contentView.frame             = photoFrame;
+                        
+                        view.frame                       = CGRectMake(0, 0, contentView.frame.size.width+(self.borderWidth*2), contentView.frame.size.height+(self.borderWidth*2));
+                        UIImageView *backgroundImageView = [[UIImageView alloc] initWithFrame:view.frame];
+                        backgroundImageView.image        = borderImage;
+                        
+                        [view addSubview:backgroundImageView];
+                    } else {
+                        // if there is no boarder image draw one with the CALayer
+                        view.layer.borderWidth        = self.borderWidth;
+                        view.layer.borderColor        = [[UIColor whiteColor] CGColor];
+                        view.layer.shadowOffset       = CGSizeMake(0, 0);
+                        view.layer.shadowOpacity      = 0.5;
+                    }
                 }
+                
+                [view addSubview:contentView];
+                
+                view.tag    = index;
+                view.center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds));
+                
+                [photoViewsMutable addObject:view];
+                
             }
-
-            [view addSubview:photoImageView];
-
-            view.tag    = index;
-            view.center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds));
-
-            [photoViewsMutable addObject:view];
+            
+            // Photo views are added to subview in the photoView setter
+            self.photoViews = photoViewsMutable;
+            //photoViewsMutable = nil;
+            [self goToPhotoAtIndex:topPhotoIndex];
             
         }
 
-        // Photo views are added to subview in the photoView setter
-        self.photoViews = photoViewsMutable;
-        //photoViewsMutable = nil;
-        [self goToPhotoAtIndex:topPhotoIndex];
-        
-    }
+    });
+    
+    
     
 }
 

+ 49 - 0
RedAnt ERP Mobile/common/photoStack/photostack_image.html

@@ -0,0 +1,49 @@
+
+
+<!DOVTYPE html><!--告诉解析器,解析HTML文件(这是一个HTML5文件,版本也会在这里,html默认是H5) -->
+<html><!-- html标签是最外围的标签,除了上面的解析的标签其他的都在它的内部 -->
+<head><!-- 页面的“头”,不可或缺,页面的名称,属性,等等都在他这里。 -->
+    <meta lang="en"><!-- 语言en是英语,网上有可以查到 -->
+    <meta charset="UTF-8"><!-- 解析编码推荐utf-8 -->
+    <title>video</title><!-- 页面的名称 -->
+
+    <style>
+    <!-- css样式也可以写在这里 -->
+    body{
+    margin:0;/* 外边距0 */
+    padding:0;/* 内边距0 */
+    }
+
+    
+    /* 这个规则规定了iframe父元素容器的尺寸,我们要去它的宽高比应该是 25:14 */
+.aspect-ratio {
+  position: relative;
+  width: 100%;
+  height: 100%;
+
+
+}
+
+/* 设定iframe的宽度和高度,让iframe占满整个父元素容器 */
+.aspect-ratio img {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+
+  background-color:#ffffff;
+}
+
+
+    </style>
+</head>
+<body><!-- 页面上看到的所有东西都在这里了 -->
+
+
+<div class="aspect-ratio">
+##replacement##
+</div>
+
+</body>
+</html>

+ 49 - 0
RedAnt ERP Mobile/common/photoStack/photostack_video.html

@@ -0,0 +1,49 @@
+
+
+<!DOVTYPE html><!--告诉解析器,解析HTML文件(这是一个HTML5文件,版本也会在这里,html默认是H5) -->
+<html><!-- html标签是最外围的标签,除了上面的解析的标签其他的都在它的内部 -->
+<head><!-- 页面的“头”,不可或缺,页面的名称,属性,等等都在他这里。 -->
+    <meta lang="en"><!-- 语言en是英语,网上有可以查到 -->
+    <meta charset="UTF-8"><!-- 解析编码推荐utf-8 -->
+    <title>video</title><!-- 页面的名称 -->
+
+    <style>
+    <!-- css样式也可以写在这里 -->
+    body{
+    margin:0;/* 外边距0 */
+    padding:0;/* 内边距0 */
+    }
+
+    
+    /* 这个规则规定了iframe父元素容器的尺寸,我们要去它的宽高比应该是 25:14 */
+.aspect-ratio {
+  position: relative;
+  width: 100%;
+  height: 100%;
+
+
+}
+
+/* 设定iframe的宽度和高度,让iframe占满整个父元素容器 */
+.aspect-ratio iframe {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+
+  background-color:#ffffff;
+}
+
+
+    </style>
+</head>
+<body><!-- 页面上看到的所有东西都在这里了 -->
+
+
+<div class="aspect-ratio">
+##replacement##
+</div>
+
+</body>
+</html>

+ 8 - 4
RedAnt ERP Mobile/iSales-NPD.xcodeproj/project.pbxproj

@@ -71,7 +71,6 @@
 		712AFEE21DBA077F00254965 /* pdfCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFEE11DBA077F00254965 /* pdfCreator.m */; };
 		712AFEE51DBDAF0300254965 /* pdfcreator.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 712AFEE41DBDAF0300254965 /* pdfcreator.xcassets */; };
 		712AFEE71DBDB48000254965 /* portfolio_3x2.json in Resources */ = {isa = PBXBuildFile; fileRef = 712AFEE61DBDB48000254965 /* portfolio_3x2.json */; };
-		712BA22D1EF2847600EC1571 /* video.html in Resources */ = {isa = PBXBuildFile; fileRef = 712BA22C1EF2847600EC1571 /* video.html */; };
 		712BABF31C897E3A0007466B /* CategorySearchFilterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 712BABF21C897E3A0007466B /* CategorySearchFilterViewController.m */; };
 		712C40B61C7310F4000E6831 /* CartGeneralNotesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 712C40B51C7310F4000E6831 /* CartGeneralNotesViewController.m */; };
 		712C40B91C731126000E6831 /* ItemNotesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 712C40B81C731126000E6831 /* ItemNotesViewController.m */; };
@@ -191,6 +190,8 @@
 		7162A5E31C5877CE00AB630E /* WatchListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A5E21C5877CE00AB630E /* WatchListViewController.m */; };
 		7162A5E61C58781000AB630E /* iSalesNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A5E51C58781000AB630E /* iSalesNavigationController.m */; };
 		7162A5E91C5899F700AB630E /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A5E81C5899F700AB630E /* MainViewController.m */; };
+		7165662E1EF3ACD900CB897F /* photostack_image.html in Resources */ = {isa = PBXBuildFile; fileRef = 7165662C1EF3ACD900CB897F /* photostack_image.html */; };
+		7165662F1EF3ACD900CB897F /* photostack_video.html in Resources */ = {isa = PBXBuildFile; fileRef = 7165662D1EF3ACD900CB897F /* photostack_video.html */; };
 		716961B519594E1000B19FB4 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 716961B419594E1000B19FB4 /* libsqlite3.dylib */; };
 		716AF8E11D7AA0E0001188E0 /* SelectUploadOrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716AF8E01D7AA0E0001188E0 /* SelectUploadOrderViewController.m */; };
 		716AF8E71D7AA398001188E0 /* SelectOrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 716AF8E51D7AA398001188E0 /* SelectOrderTableViewCell.m */; };
@@ -382,7 +383,6 @@
 		712AFEE11DBA077F00254965 /* pdfCreator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = pdfCreator.m; path = common/pdfCreator/pdfCreator.m; sourceTree = SOURCE_ROOT; };
 		712AFEE41DBDAF0300254965 /* pdfcreator.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = pdfcreator.xcassets; sourceTree = "<group>"; };
 		712AFEE61DBDB48000254965 /* portfolio_3x2.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = portfolio_3x2.json; sourceTree = "<group>"; };
-		712BA22C1EF2847600EC1571 /* video.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = video.html; sourceTree = "<group>"; };
 		712BABF11C897E3A0007466B /* CategorySearchFilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CategorySearchFilterViewController.h; path = common/Functions/category/CategorySearchFilterViewController.h; sourceTree = SOURCE_ROOT; };
 		712BABF21C897E3A0007466B /* CategorySearchFilterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CategorySearchFilterViewController.m; path = common/Functions/category/CategorySearchFilterViewController.m; sourceTree = SOURCE_ROOT; };
 		712C40B41C7310F4000E6831 /* CartGeneralNotesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CartGeneralNotesViewController.h; path = common/Functions/cart/CartGeneralNotesViewController.h; sourceTree = SOURCE_ROOT; };
@@ -606,6 +606,8 @@
 		7162A5E71C5899F700AB630E /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = common/Functions/MainViewController.h; sourceTree = SOURCE_ROOT; };
 		7162A5E81C5899F700AB630E /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = common/Functions/MainViewController.m; sourceTree = SOURCE_ROOT; };
 		716387D3195408E7006E65E6 /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		7165662C1EF3ACD900CB897F /* photostack_image.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = photostack_image.html; path = common/photoStack/photostack_image.html; sourceTree = SOURCE_ROOT; };
+		7165662D1EF3ACD900CB897F /* photostack_video.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = photostack_video.html; path = common/photoStack/photostack_video.html; sourceTree = SOURCE_ROOT; };
 		716961B419594E1000B19FB4 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
 		716AF8DF1D7AA0E0001188E0 /* SelectUploadOrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SelectUploadOrderViewController.h; path = common/Functions/offline/SelectUploadOrderViewController.h; sourceTree = SOURCE_ROOT; };
 		716AF8E01D7AA0E0001188E0 /* SelectUploadOrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SelectUploadOrderViewController.m; path = common/Functions/offline/SelectUploadOrderViewController.m; sourceTree = SOURCE_ROOT; };
@@ -1295,6 +1297,8 @@
 			children = (
 				71DF748F1C57614C00F2789C /* PhotoBorder.png */,
 				71DF74901C57614C00F2789C /* PhotoBorder@2x.png */,
+				7165662C1EF3ACD900CB897F /* photostack_image.html */,
+				7165662D1EF3ACD900CB897F /* photostack_video.html */,
 				71DF74911C57614C00F2789C /* PhotoStackView.h */,
 				71DF74921C57614C00F2789C /* PhotoStackView.m */,
 				71DF74931C57614C00F2789C /* PhotoStackViewController.h */,
@@ -1389,7 +1393,6 @@
 		716387D2195408DA006E65E6 /* config */ = {
 			isa = PBXGroup;
 			children = (
-				712BA22C1EF2847600EC1571 /* video.html */,
 				716387D3195408E7006E65E6 /* config.h */,
 				71E5A00F1DC99370005BF655 /* config.plist */,
 			);
@@ -1825,6 +1828,7 @@
 				713F76C21929F4A7006A7305 /* Images.xcassets in Resources */,
 				42E489611EE63F4E007256A0 /* more_color_64.png in Resources */,
 				713F76B41929F4A7006A7305 /* InfoPlist.strings in Resources */,
+				7165662F1EF3ACD900CB897F /* photostack_video.html in Resources */,
 				7162A5A01C58733400AB630E /* status_filter_cadedate_open.json in Resources */,
 				71D30A211CFBEDC6006F9477 /* default_appearance.json in Resources */,
 				71D5016C1DC32C3300971FBB /* portfolio_2x3.json in Resources */,
@@ -1832,7 +1836,6 @@
 				42A51BF61D62F9AB00F13667 /* orderDetail.json in Resources */,
 				7161FEB71D61B24900157EE1 /* orderinfo.html in Resources */,
 				42C9FB151D5B28FA001DCA8B /* contactAdvanceSearch.json in Resources */,
-				712BA22D1EF2847600EC1571 /* video.html in Resources */,
 				7161FEB51D61B24900157EE1 /* creditcardpayment.html in Resources */,
 				71777FC61C8AC97300DA2511 /* debug_category_filter.json in Resources */,
 				71073AE61DD41DD8001BC653 /* so_thumb.json in Resources */,
@@ -1855,6 +1858,7 @@
 				7111E5721C76C557004763B3 /* customer_info_template_edit.json in Resources */,
 				7161FEB61D61B24900157EE1 /* normalpayment.html in Resources */,
 				71DF74961C57614C00F2789C /* PhotoBorder@2x.png in Resources */,
+				7165662E1EF3ACD900CB897F /* photostack_image.html in Resources */,
 				712AFEE51DBDAF0300254965 /* pdfcreator.xcassets in Resources */,
 				7162A55E1C58724700AB630E /* customer_advanced_search.json in Resources */,
 				7162A5A11C58733400AB630E /* offline_status_filter_cadedate.json in Resources */,

+ 4 - 4
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -968,10 +968,10 @@
                                 <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                 <prototypes>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DetailHeaderCell" rowHeight="550" id="PCZ-Ci-oQf" customClass="DetailHeaderCell">
-                                        <rect key="frame" x="0.0" y="55.5" width="768" height="550"/>
+                                        <rect key="frame" x="0.0" y="56" width="768" height="550"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PCZ-Ci-oQf" id="DiR-eY-PiR">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="549.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="549"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="USD 123.45" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fD8-Km-IT3">
@@ -1225,7 +1225,7 @@
                                         <rect key="frame" x="0.0" y="605.5" width="768" height="600"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zzF-db-bsq" id="rZ0-x8-h3B">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="599.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="599"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Refreshing...
Please wait." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bSP-hh-M2A">
@@ -1296,7 +1296,7 @@
                                         </tableViewCellContentView>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DetailInfoCell" rowHeight="44" id="hYM-aE-rjR" customClass="DetailKVCell">
-                                        <rect key="frame" x="0.0" y="1805.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="1806" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hYM-aE-rjR" id="o59-aa-UU2">
                                             <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>

+ 49 - 0
RedAnt ERP Mobile/iSales-NPD/photostack_image.html

@@ -0,0 +1,49 @@
+
+
+<!DOVTYPE html><!--告诉解析器,解析HTML文件(这是一个HTML5文件,版本也会在这里,html默认是H5) -->
+<html><!-- html标签是最外围的标签,除了上面的解析的标签其他的都在它的内部 -->
+<head><!-- 页面的“头”,不可或缺,页面的名称,属性,等等都在他这里。 -->
+    <meta lang="en"><!-- 语言en是英语,网上有可以查到 -->
+    <meta charset="UTF-8"><!-- 解析编码推荐utf-8 -->
+    <title>video</title><!-- 页面的名称 -->
+
+    <style>
+    <!-- css样式也可以写在这里 -->
+    body{
+    margin:0;/* 外边距0 */
+    padding:0;/* 内边距0 */
+    }
+
+    
+    /* 这个规则规定了iframe父元素容器的尺寸,我们要去它的宽高比应该是 25:14 */
+.aspect-ratio {
+  position: relative;
+  width: 100%;
+  height: 100%;
+
+
+}
+
+/* 设定iframe的宽度和高度,让iframe占满整个父元素容器 */
+.aspect-ratio iframe {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+
+  background-color:#ffffff;
+}
+
+
+    </style>
+</head>
+<body><!-- 页面上看到的所有东西都在这里了 -->
+
+
+<div class="aspect-ratio">
+<iframe width="854" height="480" src="https://www.youtube.com/embed/QBqowbVZDW0" frameborder="0" allowfullscreen></iframe>
+</div>
+
+</body>
+</html>

+ 49 - 0
RedAnt ERP Mobile/iSales-NPD/photostock_video.html

@@ -0,0 +1,49 @@
+
+
+<!DOVTYPE html><!--告诉解析器,解析HTML文件(这是一个HTML5文件,版本也会在这里,html默认是H5) -->
+<html><!-- html标签是最外围的标签,除了上面的解析的标签其他的都在它的内部 -->
+<head><!-- 页面的“头”,不可或缺,页面的名称,属性,等等都在他这里。 -->
+    <meta lang="en"><!-- 语言en是英语,网上有可以查到 -->
+    <meta charset="UTF-8"><!-- 解析编码推荐utf-8 -->
+    <title>video</title><!-- 页面的名称 -->
+
+    <style>
+    <!-- css样式也可以写在这里 -->
+    body{
+    margin:0;/* 外边距0 */
+    padding:0;/* 内边距0 */
+    }
+
+    
+    /* 这个规则规定了iframe父元素容器的尺寸,我们要去它的宽高比应该是 25:14 */
+.aspect-ratio {
+  position: relative;
+  width: 100%;
+  height: 100%;
+
+
+}
+
+/* 设定iframe的宽度和高度,让iframe占满整个父元素容器 */
+.aspect-ratio iframe {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+
+  background-color:#ffffff;
+}
+
+
+    </style>
+</head>
+<body><!-- 页面上看到的所有东西都在这里了 -->
+
+
+<div class="aspect-ratio">
+<iframe width="854" height="480" src="https://www.youtube.com/embed/QBqowbVZDW0" frameborder="0" allowfullscreen></iframe>
+</div>
+
+</body>
+</html>