Permalink
Browse files

Added a build version

  • Loading branch information...
1 parent 35d70d4 commit 842fd2c66f438dc3358b7c6cb9b2089d69865520 Ben Smith committed with bharat Apr 17, 2010
Showing with 22,657 additions and 229 deletions.
  1. +19 −0 modules/gwtorganise/.externalToolBuilders/New_Builder.launch
  2. +10 −0 modules/gwtorganise/.project
  3. +1 −1 modules/gwtorganise/.settings/com.google.gwt.eclipse.core.prefs
  4. +21 −0 modules/gwtorganise/build.xml
  5. +67 −7 modules/gwtorganise/controllers/json_album.php
  6. +9 −0 modules/gwtorganise/helpers/revision.php
  7. +1 −1 modules/gwtorganise/src/com/gloopics/g3viewer/client/Album.java
  8. +1 −13 modules/gwtorganise/src/com/gloopics/g3viewer/client/AlbumItemDropContainer.java
  9. +73 −0 modules/gwtorganise/src/com/gloopics/g3viewer/client/ConfirmDialogBox.java
  10. +26 −3 modules/gwtorganise/src/com/gloopics/g3viewer/client/G3Viewer.java
  11. +185 −176 modules/gwtorganise/src/com/gloopics/g3viewer/client/HttpDialogBox.java
  12. +21 −13 modules/gwtorganise/src/com/gloopics/g3viewer/client/Item.java
  13. +31 −0 modules/gwtorganise/src/com/gloopics/g3viewer/client/MyPickupDragController.java
  14. +1 −0 modules/gwtorganise/src/com/gloopics/g3viewer/client/UploadFile.java
  15. +16 −0 modules/gwtorganise/src/com/gloopics/g3viewer/client/Utils.java
  16. +77 −11 modules/gwtorganise/src/com/gloopics/g3viewer/client/View.java
  17. +1 −0 modules/gwtorganise/views/gwtorganise_view.html.php
  18. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$1.class
  19. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$10.class
  20. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$11.class
  21. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$12.class
  22. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2$1.class
  23. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$2.class
  24. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$3.class
  25. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4$1.class
  26. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$4.class
  27. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5$1.class
  28. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$5.class
  29. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$6.class
  30. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$7.class
  31. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$8.class
  32. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album$9.class
  33. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Album.class
  34. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumItemDropContainer.class
  35. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree$1.class
  36. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTree.class
  37. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/AlbumTreeDropController.class
  38. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncResizer.class
  39. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/AsyncRunner.class
  40. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/DropZoneController.class
  41. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1$1.class
  42. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$1.class
  43. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$2.class
  44. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog$1.class
  45. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$ErrorDialog.class
  46. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer$SimplePanelEx.class
  47. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/G3Viewer.class
  48. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$1.class
  49. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$2.class
  50. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$3.class
  51. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$4.class
  52. BIN ...organise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox$RequestCallbackImpl.class
  53. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogBox.class
  54. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpDialogHandler.class
  55. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/HttpSuccessHandler.class
  56. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$1.class
  57. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$2.class
  58. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox$3.class
  59. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/ImageDialogBox.class
  60. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1$1.class
  61. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar$1.class
  62. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/InformationBar.class
  63. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$1.class
  64. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$2.class
  65. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$3.class
  66. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4$1.class
  67. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$4.class
  68. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5$1.class
  69. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$5.class
  70. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6$1.class
  71. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$6.class
  72. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7$1.class
  73. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$7.class
  74. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8$1.class
  75. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$8.class
  76. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item$9.class
  77. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Item.class
  78. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseCallback.class
  79. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/JSONResponseTextHandler.class
  80. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Loading.class
  81. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/NoGears.class
  82. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/ResizeOptions.class
  83. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadControl.class
  84. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$1.class
  85. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$2.class
  86. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$3.class
  87. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile$ProgressBar.class
  88. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/UploadFile.class
  89. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/Utils.class
  90. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/View$1.class
  91. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/View.class
  92. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Canvas.class
  93. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/Factory.class
  94. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$1.class
  95. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter$2.class
  96. BIN modules/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/canvas/ResizeFilter.class
  97. BIN ...les/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropBase.class
  98. BIN ...les/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFile.class
  99. BIN ...s/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDropFileIE.class
  100. BIN ...organise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DesktopDroppableWidget.class
  101. BIN ...s/gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactory.class
  102. BIN ...gwtorganise/war/WEB-INF/classes/com/gloopics/g3viewer/client/dnddesktop/DndDesktopFactoryIE.class
  103. +1,728 −0 modules/gwtorganise/war/g3viewer/0D97DF37194D1924CC80394AAA96B9A3.cache.html
  104. +1,733 −0 modules/gwtorganise/war/g3viewer/27AC86F0820D8F960DBF73C151C0332B.cache.html
  105. +1,840 −0 modules/gwtorganise/war/g3viewer/4AFE598FDFDF189DD61F57E554328B10.cache.html
  106. +1,821 −0 modules/gwtorganise/war/g3viewer/4E8EC2279CB4B46228EFF0682ED166A4.cache.html
  107. +1,862 −0 modules/gwtorganise/war/g3viewer/4F7AD7D8299143D876CB4071BE00BF02.cache.html
  108. +1,835 −0 modules/gwtorganise/war/g3viewer/6462B363383D23B8418857B7A6FAD85B.cache.html
  109. +1,687 −0 modules/gwtorganise/war/g3viewer/71ED95F3DFB964762667E45E2922704D.cache.html
  110. +1,701 −0 modules/gwtorganise/war/g3viewer/884CB866FECF37EDDE4914CA60AF2511.cache.html
  111. +1,706 −0 modules/gwtorganise/war/g3viewer/9DC95FB4BEC084EF810751F04B440FD7.cache.html
  112. +1,863 −0 modules/gwtorganise/war/g3viewer/A8FBB0ADAFEE7F8EA1CDB15765D13A7F.cache.html
  113. +1,868 −0 modules/gwtorganise/war/g3viewer/CE15F73DB4EDED1CF8F93F95A728792D.cache.html
  114. +1,729 −0 modules/gwtorganise/war/g3viewer/D096B0ED44CBABF1A6B1F2C2D31F4FCC.cache.html
  115. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/1.cache.js
  116. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/2.cache.js
  117. +54 −0 modules/gwtorganise/war/g3viewer/deferredjs/0D97DF37194D1924CC80394AAA96B9A3/3.cache.js
  118. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/1.cache.js
  119. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/2.cache.js
  120. +54 −0 modules/gwtorganise/war/g3viewer/deferredjs/27AC86F0820D8F960DBF73C151C0332B/3.cache.js
  121. +7 −0 modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/1.cache.js
  122. +6 −0 modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/2.cache.js
  123. +35 −0 modules/gwtorganise/war/g3viewer/deferredjs/4AFE598FDFDF189DD61F57E554328B10/3.cache.js
  124. +7 −0 modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/1.cache.js
  125. +6 −0 modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/2.cache.js
  126. +35 −0 modules/gwtorganise/war/g3viewer/deferredjs/4E8EC2279CB4B46228EFF0682ED166A4/3.cache.js
  127. +7 −0 modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/1.cache.js
  128. +6 −0 modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/2.cache.js
  129. +35 −0 modules/gwtorganise/war/g3viewer/deferredjs/4F7AD7D8299143D876CB4071BE00BF02/3.cache.js
  130. +7 −0 modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/1.cache.js
  131. +6 −0 modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/2.cache.js
  132. +35 −0 modules/gwtorganise/war/g3viewer/deferredjs/6462B363383D23B8418857B7A6FAD85B/3.cache.js
  133. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/1.cache.js
  134. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/2.cache.js
  135. +54 −0 modules/gwtorganise/war/g3viewer/deferredjs/71ED95F3DFB964762667E45E2922704D/3.cache.js
  136. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/884CB866FECF37EDDE4914CA60AF2511/1.cache.js
  137. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/884CB866FECF37EDDE4914CA60AF2511/2.cache.js
  138. +54 −0 modules/gwtorganise/war/g3viewer/deferredjs/884CB866FECF37EDDE4914CA60AF2511/3.cache.js
  139. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/1.cache.js
  140. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/2.cache.js
  141. +54 −0 modules/gwtorganise/war/g3viewer/deferredjs/9DC95FB4BEC084EF810751F04B440FD7/3.cache.js
  142. +7 −0 modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/1.cache.js
  143. +6 −0 modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/2.cache.js
  144. +35 −0 modules/gwtorganise/war/g3viewer/deferredjs/A8FBB0ADAFEE7F8EA1CDB15765D13A7F/3.cache.js
  145. +7 −0 modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/1.cache.js
  146. +6 −0 modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/2.cache.js
  147. +35 −0 modules/gwtorganise/war/g3viewer/deferredjs/CE15F73DB4EDED1CF8F93F95A728792D/3.cache.js
  148. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/1.cache.js
  149. +9 −0 modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/2.cache.js
  150. +54 −0 modules/gwtorganise/war/g3viewer/deferredjs/D096B0ED44CBABF1A6B1F2C2D31F4FCC/3.cache.js
  151. +4 −4 modules/gwtorganise/war/g3viewer/g3viewer.nocache.js
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/gwtorganise/build.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="gwtorganise"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/gwtorganise/build.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/gwtorganise}"/>
+</launchConfiguration>
@@ -30,6 +30,16 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/New_Builder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
@@ -1,4 +1,4 @@
-#Thu Feb 11 15:27:06 NZDT 2010
+#Fri Mar 26 11:43:34 NZDT 2010
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generate a java class with the current svn revision number -->
+<project>
+ <echo>Generate build info class...</echo>
+ <tstamp>
+ <format property="TODAY" pattern="EEE, d-MMMM-yyyy HH:mm:ss z" locale="ENGLISH, GERMANY"/>
+ </tstamp>
+ <echo>Virtual PVT Cell Revision: ${svn.revision}</echo>
+ <echo>Time stamp ${TODAY}</echo>
+ <echo>Write build info to file ${basedir}\helpers\BuildInfo.java</echo>
+ <!-- the source code of the java class -->
+ <echo file="${basedir}\helpers\revision.php">
+&#60;?php defined("SYSPATH") or die("No direct script access.");
+class revision_Core {
+ static function getTimeStamp(){
+ return "${TODAY}";
+ }
+}
+
+ </echo>
+</project>
@@ -73,13 +73,21 @@ function move_to($target_album_id) {
access::verify_csrf();
$target_album = ORM::factory("item", $target_album_id);
+ access::required("view", $target_album);
+ access::required("add", $target_album);
- $js = json_decode($_REQUEST["sourceids"]);
+ $source_album = null;
+ $js = json_decode($_REQUEST["sourceids"]);
$i = 0;
+ $source_album = null;
foreach ($js as $source_id) {
$source = ORM::factory("item", $source_id);
+ if (empty($source_album)) { // get the source_album
+ $source_album = $source->parent();
+ }
if (!$source->contains($target_album)) {
+ access::required("edit", $source);
item::move($source, $target_album);
}
$i++;
@@ -226,12 +234,7 @@ public function make_album_cover($id) {
print json_encode(array("result" => "success"));
}
- public function rotate($id, $dir) {
- access::verify_csrf();
- $item = model_cache::get("item", $id);
- access::required("view", $item);
- access::required("edit", $item);
-
+ public function p_rotate($item, $dir){
$degrees = 0;
switch($dir) {
case "ccw":
@@ -262,6 +265,63 @@ public function rotate($id, $dir) {
}
}
+ return $item;
+ }
+
+ public function delete_many($id) {
+
+ access::verify_csrf();
+
+ $js = json_decode($_REQUEST["sourceids"]);
+
+ $i = 0;
+ $toreturn = array();
+ foreach ($js as $item_id) {
+ $item = ORM::factory("item", $item_id);
+ access::required("view", $item);
+ access::required("edit", $item);
+ if ($item->is_album()) {
+ $msg = t("Deleted album <b>%title</b>", array("title" => html::purify($item->title)));
+ } else {
+ $msg = t("Deleted photo <b>%title</b>", array("title" => html::purify($item->title)));
+ }
+ $parent = $item->parent();
+ $item->delete();
+ message::success($msg);
+ }
+
+ print json_encode(array("result" => "success"));
+
+ }
+
+ public function rotate_many($dir) {
+ access::verify_csrf();
+
+ $js = json_decode($_REQUEST["sourceids"]);
+
+ $i = 0;
+ $toreturn = array();
+ foreach ($js as $item_id) {
+ $item = ORM::factory("item", $item_id);
+ access::required("view", $item);
+ access::required("edit", $item);
+ $item = $this->p_rotate($item, $dir);
+ $toreturn[$item_id] = self::child_json_encode($item);
+ $i++;
+ }
+
+ print json_encode($toreturn);
+ }
+
+
+ public function rotate($id, $dir) {
+ access::verify_csrf();
+ $item = model_cache::get("item", $id);
+ access::required("view", $item);
+ access::required("edit", $item);
+
+ $item = $this->p_rotate($item, $dir);
+
print json_encode(self::child_json_encode($item));
}
@@ -0,0 +1,9 @@
+
+<?php defined("SYSPATH") or die("No direct script access.");
+class revision_Core {
+ static function getTimeStamp(){
+ return "Fri, 16-April-2010 14:55:28 NZST";
+ }
+}
+
+
@@ -27,6 +27,7 @@
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.Widget;
/**
* encapsulates an album
@@ -189,7 +190,6 @@ public void success(String aResult) {
popupMenuBar.addItem(addAlbum);
popupMenuBar.addItem(userPermissions);
-
popupMenuBar.setVisible(true);
popupPanel.add(popupMenuBar);
@@ -28,19 +28,7 @@ public Widget getDropTarget() {
@Override
public void onDrop(DragContext context) {
- JSONArray jsa = new JSONArray();
-
- int i = 0;
- for (Widget widget : context.selectedWidgets){
- if (widget instanceof Item){
- jsa.set(i, new JSONNumber(((Item)widget).getID()));
- i++;
- }
- }
- m_Album.moveTo(jsa);
- // context.
- // TODO Auto-generated method stub
-
+ m_Album.moveTo(Utils.extractIds(context));
}
@Override
@@ -0,0 +1,73 @@
+package com.gloopics.g3viewer.client;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.RequestException;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.DockPanel;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HTML;
+
+
+public class ConfirmDialogBox extends DialogBox {
+
+ public ConfirmCallBack m_Callback;
+ private final HTML m_Dialog;
+
+ public interface ConfirmCallBack{
+ void ok();
+ }
+
+ public ConfirmDialogBox(G3Viewer a_Parent){
+ m_Dialog = new HTML("Empty");
+ initComponents();
+ }
+
+ public void initComponents(){
+ setModal(true);
+ addStyleName("dialog");
+ setAnimationEnabled(true);
+ setText("Confirm");
+
+ Button close = new Button("Cancel", new ClickHandler() {
+
+ public void onClick(ClickEvent event) {
+ ConfirmDialogBox.this.hide();
+
+ }
+ });
+
+
+ Button ok = new Button("ok", new ClickHandler() {
+
+ public void onClick(ClickEvent event) {
+ if (m_Callback!=null)
+ {
+ m_Callback.ok();
+ }
+
+ ConfirmDialogBox.this.hide();
+ }
+ });
+
+ FlowPanel fp = new FlowPanel();
+ fp.add(ok);
+ fp.add(close);
+ fp.addStyleName("dButtons");
+ DockPanel dp = new DockPanel();
+ dp.add(m_Dialog , DockPanel.CENTER);
+ dp.add(fp, DockPanel.SOUTH);
+ dp.addStyleName("dContents");
+ add(dp);
+
+ }
+
+ public void doDialog(String a_Message, ConfirmCallBack a_Callback){
+ m_Callback = a_Callback;
+ m_Dialog.setHTML(a_Message);
+ show();
+ }
+
+}
@@ -17,6 +17,8 @@
import com.allen_sauer.gwt.dnd.client.PickupDragController;
+import com.gloopics.g3viewer.client.ConfirmDialogBox.ConfirmCallBack;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.InputElement;
import com.google.gwt.dom.client.Style.Unit;
@@ -134,10 +136,21 @@ public void onClick(ClickEvent event) {
public static final String ROTATE_URL = BASE_URL + "index.php/json_album/rotate/";
/**
+ * rotate url
+ */
+ public static final String ROTATE_ALL_URL = BASE_URL + "index.php/json_album/rotate_many/";
+
+ /**
* Resize details URL
*/
public static final String RESIZE_DETAILS_URL = BASE_URL + "index.php/json_album/resize_config";
+ /**
+ * Resize details URL
+ */
+ public static final String DELETE_ALL_URL = BASE_URL + "index.php/json_album/delete_many/";
+
+
/*
* tree
*/
@@ -158,6 +171,11 @@ public void onClick(ClickEvent event) {
*/
private final HttpDialogBox m_HttpDialogBox= new HttpDialogBox(this);
+ /**
+ * the only confirmation dialog box
+ */
+ private final ConfirmDialogBox m_ConfirmDialogBox = new ConfirmDialogBox(this);
+
private class SimplePanelEx extends SimplePanel
{
public SimplePanelEx()
@@ -223,7 +241,7 @@ public void onBrowserEvent(Event event) {
/**
* the drag controller
*/
- private final PickupDragController m_DragController;
+ private final MyPickupDragController m_DragController;
/**
* the upload control
@@ -235,7 +253,7 @@ public void onBrowserEvent(Event event) {
*/
public G3Viewer(){
- m_DragController = new PickupDragController(RootPanel.get(),false);
+ m_DragController = new MyPickupDragController(RootPanel.get(),false);
m_DragController.setBehaviorMultipleSelection(true);
m_DragController.setBehaviorDragStartSensitivity(5);
m_DragController.setBehaviorDragProxy(true);
@@ -307,7 +325,7 @@ public static void displayError(String errorType, String errorMessage) {
/**
* returns the drag controller
*/
- public PickupDragController getDragController(){
+ public MyPickupDragController getDragController(){
return m_DragController;
}
@@ -328,6 +346,11 @@ public void doDialog(String a_Url, HttpDialogHandler a_Handler)
m_HttpDialogBox.doDialog(BASE_URL + a_Url, a_Handler);
}
+ public void doConfirm(String a_Text, ConfirmCallBack a_Handler)
+ {
+ m_ConfirmDialogBox.doDialog(a_Text, a_Handler);
+ }
+
public void showImage(String a_Url)
{
m_ImageDialogBox.doDialog( a_Url);
Oops, something went wrong.

0 comments on commit 842fd2c

Please sign in to comment.