r21168: - Step 2: Update swat for the latest qooxdoo version. The build now copies
authorDerrell Lipman <derrell@samba.org>
Tue, 6 Feb 2007 03:31:23 +0000 (03:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:44:39 +0000 (14:44 -0500)
  only those icons which are actually used.  This means that instead of a few
  thousand files getting copied to /usr/local/samba/share/webapps (or
  wherever), the number is less than an order of magnitude fewer.  This should
  make Andrew happier yet.
(This used to be commit 754c4fe01f91ecdbf156c757804118ef301bffe3)

16 files changed:
webapps/swat/Makefile
webapps/swat/source/class/swat/main/AbstractModule.js
webapps/swat/source/class/swat/main/AbstractModuleFsm.js
webapps/swat/source/class/swat/main/Authenticate.js
webapps/swat/source/class/swat/main/Gui.js
webapps/swat/source/class/swat/main/Main.js
webapps/swat/source/class/swat/main/Module.js
webapps/swat/source/class/swat/module/documentation/Documentation.js
webapps/swat/source/class/swat/module/documentation/Fsm.js
webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js
webapps/swat/source/class/swat/module/ldbbrowse/Gui.js
webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js
webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js
webapps/swat/source/class/swat/module/statistics/Fsm.js
webapps/swat/source/class/swat/module/statistics/Gui.js
webapps/swat/source/class/swat/module/statistics/Statistics.js

index c61f0a328784417b9618b0c47243a10b745f9358..f59a309c1aafbbd317cd28901444390474ab1273 100644 (file)
-###################################################################################
-# PUBLIC VARIABLES
-###################################################################################
-
-QOOXDOO = ../qooxdoo-0.6.3-sdk
-SCRIPTNAME = swat.js
-APPCLASS = swat.main.Main
-INCLUDEALL = false
-OPTIMIZESTRINGS = false
-OPTIMIZEVARIABLES = false
-SOURCELOADER=
-NICE=10
-
-
-###################################################################################
-# PRIVATE VARIABLES
-###################################################################################
-
-FRONTEND = $(QOOXDOO)/frontend
-FRAMEWORK = $(FRONTEND)/framework
-API = $(FRONTEND)/api
-CACHE = $(FRAMEWORK)/.cache
-GENERATOR = $(FRAMEWORK)/tool/generator.py
-
-
-ifeq ($(INCLUDEALL),false)
-  INCLUDE = --include $(APPCLASS)
-else
-  INCLUDE =
-endif
-
-ifeq ($(OPTIMIZESTRINGS),true)
-  OPTIMIZESTR = --optimize-strings
-else
-  OPTIMIZESTR =
-endif
-
-ifeq ($(OPTIMIZEVARIABLES),true)
-  OPTIMIZEVAR = --optimize-variables
-else
-  OPTIMIZEVAR =
-endif
-
-ifneq ($(SOURCELOADER),)
-  SOURCELDR = --source-loader-type $(SOURCELOADER)
-else
-  SOURCELDR =
-endif
-
-
-###################################################################################
-# DEFAULT TARGET
-###################################################################################
-
-all: build
+################################################################################
+# REQUIRED SETTINGS
+################################################################################
 
+#
+# Path to the folder of your qooxdoo distribution.
+# Can either be
+# a) a path relative to the location of this Makefile (preferred) or
+# b) an absolute path starting at the root of your file system
+# Example: If you put the skeleton folder next to the qooxdoo SDK folder,
+# you can use the following relative path:
+# QOOXDOO_PATH = ../qooxdoo-0.6.5-sdk
+#
+QOOXDOO_PATH = ../qooxdoo-0.6.5-sdk
 
+#
+# Similar to above, but from the webserver point of view.
+# Starting point is now the application HTML file of the source folder
+# (source/index.html by default). In most cases just prepend a "../" to
+# QOOXDOO_PATH from above.
+# Example: QOOXDOO_URI = ../../qooxdoo-0.6.5-sdk
+#
+QOOXDOO_URI = ../../qooxdoo-0.6.5-sdk
 
-###################################################################################
-# COMMON TARGETS
-###################################################################################
 
-source: info-source \
-       generate-script-source \
-       generate-api-data
 
-build: info-build \
-       generate-script-build \
-       generate-api-data \
-       copy-build-files \
-       fix-build-rights
 
-swat-only: \
-       info-build \
-       generate-script-build \
-       copy-build-files \
-       fix-build-rights
 
-api: generate-api-build generate-api-data
-       @echo
-       @echo "  CREATE COPY OF HTML FILE"
-       @echo "----------------------------------------------------------------------------"
-       @echo "  * Copying file..."
-       @cp -f $(API)/source/index.html api/index.html
 
-pretty: generate-pretty
-fix: generate-fix
+################################################################################
+# BASIC SETTINGS
+################################################################################
 
+#
+# Full namespace of your application
+#
+APPLICATION_NAMESPACE = swat
 
+#
+# Titles used in your API viewer and during the build process
+#
+APPLICATION_MAKE_TITLE = SWAT
+APPLICATION_API_TITLE = Swat
 
-###################################################################################
-# CLEANUP TARGETS
-###################################################################################
+#
+# Additional static files of your application (space separated list)
+#
+APPLICATION_FILES = index.html
 
-clean:
-       @echo
-       @echo "  CLEANUP OF GENERATED FILES"
-       @echo "----------------------------------------------------------------------------"
-       @echo "  * Deleting files..."
-       @rm -f source/script/$(SCRIPTNAME) build/script/$(SCRIPTNAME)
+#
+# Locales to build (space separated list)
+# To set a specific locale like "en_US" the generic locale "en" has to be added as well
+# Example: APPLICATION_LOCALES = en en_US de de_DE es
+#
+APPLICATION_LOCALES =
 
-realclean: clean
-       @echo
-       @echo "  CLEANUP OF GENERATED FILES (REAL)"
-       @echo "----------------------------------------------------------------------------"
-       @echo "  * Deleting files..."
-       @nice -n $(NICE) rm -rf build
 
-distclean: realclean
-       @echo
-       @echo "  CLEANUP OF GENERATED FILES (DIST)"
-       @echo "----------------------------------------------------------------------------"
-       @echo "  * Deleting files..."
-       @nice -n $(NICE) find . -name "*~" -o -name "*.bak" -o -name "*.old" | xargs rm -rf
-       @nice -n $(NICE) rm -rf $(CACHE)
 
 
 
-###################################################################################
-# GENERATOR TARGETS
-###################################################################################
 
-generate-script-source:
-       @$(GENERATOR) \
-         --script-input $(FRAMEWORK)/source/class \
-         --source-script-path ../$(FRAMEWORK)/source/class \
-         --script-input $(API)/source/class \
-         --source-script-path ../$(API)/source/class \
-         --script-input source/class \
-         --source-script-path class \
-         --generate-source-script $(SOURCELDR) \
-         $(INCLUDE) \
-         --source-script-file source/script/$(SCRIPTNAME) \
-         --define-runtime-setting qx.manager.object.AliasManager.resourceUri:../$(FRAMEWORK)/source/resource \
-         --cache-directory $(CACHE) \
-         --add-new-lines
+################################################################################
+# ADVANCED SETTINGS
+################################################################################
 
 #
-# djl: --script-input begins a set for which --resource-input and
-#      --resource-output apply.  Since there is a --resource-input and a
-#      --resource-output defined for one set, it must be defined for each set
+# Please take a look at $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk
+# for an overview of available options
 #
-generate-script-build:
-       @$(GENERATOR) \
-         --script-input $(FRAMEWORK)/source/class \
-         --resource-input $(FRAMEWORK)/source/resource \
-         --resource-output build/resource \
-         --script-input $(API)/source/class \
-         --resource-input $(API)/source/resource \
-         --resource-output build/resource \
-         --script-input source/class \
-         --resource-input source/resource \
-         --resource-output build/resource \
-         --generate-compiled-script \
-         $(INCLUDE) $(OPTIMIZESTR) $(OPTIMIZEVAR) \
-         --compiled-script-file build/script/$(SCRIPTNAME) \
-         --copy-resources \
-         --define-runtime-setting qx.manager.object.AliasManager.resourceUri:./resource \
-         --cache-directory $(CACHE) \
-         --add-new-lines
-
-generate-api-build:
-       @$(GENERATOR) \
-         --script-input $(FRAMEWORK)/source/class \
-         --resource-input $(FRAMEWORK)/source/resource \
-         --resource-output api/resource/qooxdoo \
-         --script-input $(API)/source/class \
-         --resource-input $(API)/source/resource \
-         --resource-output api/resource \
-         --include api \
-         $(OPTIMIZESTR) $(OPTIMIZEVAR) \
-         --generate-compiled-script \
-         --compiled-script-file api/script/api.js \
-         --define-runtime-setting qx.manager.object.AliasManager.resourceUri:resource/qooxdoo \
-         --define-runtime-setting api.Viewer.title:Swat \
-         --copy-resources \
-         --cache-directory $(CACHE)
-
-generate-api-data:
-       @$(GENERATOR) \
-         --script-input $(FRAMEWORK)/source/class \
-         --script-input $(API)/source/class \
-         --script-input source/class \
-         --generate-api-documentation \
-         --api-documentation-json-file build/script/data.js \
-         --cache-directory $(CACHE)
-
-generate-pretty:
-       @$(GENERATOR) \
-         --script-input source/class \
-         --script-input $(FRAMEWORK)/source/class \
-         --include-without-dependencies api.* \
-         --pretty-print \
-         --cache-directory $(CACHE)
-
-generate-fix:
-       @$(GENERATOR) \
-         --script-input source/class \
-         --script-input $(FRAMEWORK)/source/class \
-         --include-without-dependencies api.* \
-         --fix-source \
-         --cache-directory $(CACHE)
-
-
-
-###################################################################################
-# ADDITIONAL TARGETS
-###################################################################################
-
-copy-build-files:
-       @echo
-       @echo "  CREATE COPY OF HTML FILE"
-       @echo "----------------------------------------------------------------------------"
-       @echo "  * Copying file..."
-       @cp -f source/index.html build/index.html
-
-fix-build-rights:
-       @echo
-       @echo "  FIX RIGHTS ON BUILD FILES"
-       @echo "----------------------------------------------------------------------------"
-       @echo "  * Fixing file rights..."
-       @nice -n $(NICE) find build -type d | xargs chmod a+rx
-       @nice -n $(NICE) find build -type f | xargs chmod a+r
-
-
-
-
-
-###################################################################################
-# INFO TARGETS
-###################################################################################
-
-info-build:
-       @echo "****************************************************************************"
-       @echo "  GENERATING SWAT WEB APPLICATION BUILD"
-       @echo "****************************************************************************"
-
-info-source:
-       @echo "****************************************************************************"
-       @echo "  GENERATING SWAT WEB APPLICATION SOURCE"
-       @echo "****************************************************************************"
+
+include $(QOOXDOO_PATH)/frontend/framework/tool/make/apiviewer.mk
+
+APPLICATION_CLASSNAME = $(APPLICATION_NAMESPACE).main.Main
+APPLICATION_LINEBREAKS_BUILD = true
+APPLICATION_LINEBREAKS_SOURCE = true
+APPLICATION_OPTIMIZE_STRINGS = false
+APPLICATION_OPTIMIZE_VARIABLES = false
+APPLICATION_ADDITIONAL_CLASS_PATH = \
+  --class-path $(APIVIEWER_PATH)/source/class
+APPLICATION_ADDITIONAL_RESOURCE = \
+  --resource-input $(APIVIEWER_PATH)/source/resource \
+  --resource-output $(APPLICATION_BUILD_PATH)/resource/apiviewer \
+  --define-runtime-setting apiviewer.resourceUri:$(APPLICATION_PAGE_TO_TOPLEVEL)/resource/apiviewer
+APPLICATION_RESOURCE_FILTER = true
+APPLICATION_COMPLETE_SOURCE = false
+
+
+################################################################################
+# INCLUDE CORE
+################################################################################
+
+ifneq ($(QOOXDOO_PATH),PLEASE_DEFINE_QOOXDOO_PATH)
+       include $(QOOXDOO_PATH)/frontend/framework/tool/make/targets.mk
+       include $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk
+endif
+
+error:
+       @echo "  * Please configure QOOXDOO_PATH"
index 3fd94165ae57407af9ffa08ec76515413fd45b58..01aae703c379366a9c3efffad6a59cd989b61136 100644 (file)
@@ -151,4 +151,4 @@ qx.Proto.finalize = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index 5ff8e69f401f8e1caa9774e858cd49ba37894455..273c9ad8a3360850bf1b098fd38f3b191a437105 100644 (file)
@@ -472,10 +472,10 @@ qx.Proto.addAwaitRpcResultState = function(module, blockedEvents)
  * @param fsm {qx.util.fsm.FiniteStateMachine}
  *   The finite state machine issuing this remote procedure call.
  *
- * @param service {string}
+ * @param service {String}
  *   The name of the remote service which provides the specified method.
  *
- * @param method {string}
+ * @param method {String}
  *   The name of the method within the specified service.
  *
  * @param params {Array}
index d586ea1f4ac07fc266cf82a4fc1f9655fd9e2918..83e20ce97afa8c8e0130ccacc0b0b033d0075678 100644 (file)
@@ -150,4 +150,4 @@ qx.Proto.setInfo = function(info)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index 689edf33d57d16fa78cb7d1bb4880e96387660e0..142b8dcba257c94f918eb182a155c5d0bc52c9f0 100644 (file)
@@ -105,7 +105,7 @@ qx.Class.buildGui = function(moduleList)
   for (moduleName in moduleList)
   {
     // create a radio button menu item
-    o = new qx.ui.menu.RadioButton(moduleName, null, command);
+    o = new qx.ui.menu.RadioButton(moduleName, command, false);
 
     // Associate this button menu item with the module list
     o.moduleName = moduleName;
index 0ec3fccda2842c046076bf107aa16860e91065d2..bf90f3206888ca86ef9f92d51d847f26e4a1dcf1 100644 (file)
@@ -36,7 +36,7 @@ new swat.main.Module("LDB Browser",
                      swat.module.ldbbrowse.LdbBrowse);
 
 //#require(swat.module.documentation.Documentation)
-//#require(api.Viewer)
+//#require(apiviewer.Viewer)
 new swat.main.Module("API Documentation",
                      swat.module.documentation.Documentation);
 
index 1e5c6c9daf5b18767441272d856b3201ce98b3e2..160e6f6ec70f7fee92b74d8baeefb4ed9c602ea6 100644 (file)
@@ -26,7 +26,7 @@
  *   class -
  *     The class for this module
  *
- * @param moduleName {string}
+ * @param moduleName {String}
  *   The name of the module being registered.  This is the name that will
  *   appear in the Modules menu.
  *
index acd7e9040049435348d08090012cb31a6b10f8b8..696a7f0161ecbae563e2f0d1a7e6db5360c66c8c 100644 (file)
@@ -7,6 +7,12 @@
  *   LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/
  */
 
+/*
+#embed(apiviewer.css/*)
+#embed(apiviewer.image/*)
+*/
+
+
 /**
  * Swat statistics class
  */
@@ -30,21 +36,18 @@ function()
  */
 qx.Proto.initialAppear = function(module)
 {
-  qx.manager.object.AliasManager.getInstance().add("api", "./resource/image");
+  // Define alias for custom resource path
+  var am = qx.manager.object.AliasManager.getInstance();
+  am.add("api", qx.Settings.getValueOfClass("apiviewer", "resourceUri"));
 
-  // Include CSS file.
-  // (This is the hard way; I can't get qx.dom.StyleSheet.includeFile to load)
-  var el = document.createElement("link");
-  el.type = "text/css";
-  el.rel = "stylesheet";
-  el.href = "./resource/css/apiviewer.css";
-  var head = document.getElementsByTagName("head")[0];
-  head.appendChild(el);
+  // Include CSS file
+  qx.html.StyleSheet.includeFile(am.resolvePath("api/css/apiviewer.css"));
+  am.add("apiviewer", "./resource/image");
 
   // avoid redundant naming by api viewer
   qx.Settings.setCustomOfClass("apiviewer.Viewer", "title", ""); 
 
-  var viewer = new api.Viewer();
+  var viewer = new apiviewer.Viewer();
   module.canvas.add(viewer);
   viewer.load("script/data.js");
 
@@ -56,4 +59,4 @@ qx.Proto.initialAppear = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index 184b438520e060622244243cb10f5190103721cb..b58f57cf1f32678db1bb66518b09412133ac5f2b 100644 (file)
@@ -67,4 +67,4 @@ qx.Proto.buildFsm = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index b58f4bbaf66a69f0e3f45c3a724c38a60f925358..cb62c1f976ad941440ac697f33ab433f0d880f81 100644 (file)
@@ -453,4 +453,4 @@ qx.Proto.buildFsm = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index 161b99b19a0443b876b58ea208b81f70769ee0c5..eb3e6add280c6fe7a06d2d4ff853daea3870e303 100644 (file)
@@ -668,4 +668,4 @@ qx.Proto._clearAllFields = function(module, rpcRequest)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index abccbff2d0468ad1ccfe44aef37e4758c431dfc4..935eb18dcddbd147e80e88b211e60a332bb90d8e 100644 (file)
@@ -49,4 +49,4 @@ qx.Proto.initialAppear = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index 6967a7c353006b78addd728976de2b05cfc44f23..209aac4d33ce0b5fbc4c92269610e084b0c5a8ef 100644 (file)
@@ -69,7 +69,7 @@ qx.OO.addProperty({ name : "basedn", type : "string" });
  * @param type {String}
  *   A string containing "new" or "modify"
  *
- * @param data {object}
+ * @param data {Object}
  *   An LDB object with the current object parameters
  *   Used only if type = "modify"
  *
@@ -84,7 +84,7 @@ qx.Proto.isActive = function() {
 /** 
  * Set the base of the object to add
  *
- * @param type {string}
+ * @param type {String}
  *   A string containing the base DN
  */
 
index a6e56c6842ad41c6d02f5231254566c8ebcf549d..c23cfb0feb6dd3bf1be888f33c450294fcb70c22 100644 (file)
@@ -227,4 +227,4 @@ qx.Proto.buildFsm = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index b5e11d453323c9a9a2980cee5f2e05e8bdf9dab7..bad55b71c04d2df1d5a12394d55c30fc8f325486 100644 (file)
@@ -466,4 +466,4 @@ qx.Proto.displayData = function(module, result)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;
index f15e180cba30e8b3ea6c11e31e9bf6c1f27c0956..99528605a1f8825038bf8d6e2c6f3ac8cefa56fd 100644 (file)
@@ -41,4 +41,4 @@ qx.Proto.initialAppear = function(module)
 /**
  * Singleton Instance Getter
  */
-qx.Class.getInstance = qx.util.Return.returnInstance;
+qx.Class.getInstance = qx.lang.Function.returnInstance;