diff options
author | Derrell Lipman <derrell@samba.org> | 2007-02-06 03:31:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:39 -0500 |
commit | 0a5d888c24c925222dd94cdd80a29e09b235b795 (patch) | |
tree | 8504a9842030e9163192484402c49ff79754e4bd /webapps | |
parent | ef256c958066c19bb10cbe9745bdf96b6514762d (diff) | |
download | samba-0a5d888c24c925222dd94cdd80a29e09b235b795.tar.gz samba-0a5d888c24c925222dd94cdd80a29e09b235b795.tar.bz2 samba-0a5d888c24c925222dd94cdd80a29e09b235b795.zip |
r21168: - Step 2: Update swat for the latest qooxdoo version. The build now copies
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)
Diffstat (limited to 'webapps')
16 files changed, 107 insertions, 247 deletions
diff --git a/webapps/swat/Makefile b/webapps/swat/Makefile index c61f0a3287..f59a309c1a 100644 --- a/webapps/swat/Makefile +++ b/webapps/swat/Makefile @@ -1,241 +1,98 @@ -################################################################################### -# 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" diff --git a/webapps/swat/source/class/swat/main/AbstractModule.js b/webapps/swat/source/class/swat/main/AbstractModule.js index 3fd94165ae..01aae703c3 100644 --- a/webapps/swat/source/class/swat/main/AbstractModule.js +++ b/webapps/swat/source/class/swat/main/AbstractModule.js @@ -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; diff --git a/webapps/swat/source/class/swat/main/AbstractModuleFsm.js b/webapps/swat/source/class/swat/main/AbstractModuleFsm.js index 5ff8e69f40..273c9ad8a3 100644 --- a/webapps/swat/source/class/swat/main/AbstractModuleFsm.js +++ b/webapps/swat/source/class/swat/main/AbstractModuleFsm.js @@ -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} diff --git a/webapps/swat/source/class/swat/main/Authenticate.js b/webapps/swat/source/class/swat/main/Authenticate.js index d586ea1f4a..83e20ce97a 100644 --- a/webapps/swat/source/class/swat/main/Authenticate.js +++ b/webapps/swat/source/class/swat/main/Authenticate.js @@ -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; diff --git a/webapps/swat/source/class/swat/main/Gui.js b/webapps/swat/source/class/swat/main/Gui.js index 689edf33d5..142b8dcba2 100644 --- a/webapps/swat/source/class/swat/main/Gui.js +++ b/webapps/swat/source/class/swat/main/Gui.js @@ -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; diff --git a/webapps/swat/source/class/swat/main/Main.js b/webapps/swat/source/class/swat/main/Main.js index 0ec3fccda2..bf90f32068 100644 --- a/webapps/swat/source/class/swat/main/Main.js +++ b/webapps/swat/source/class/swat/main/Main.js @@ -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); diff --git a/webapps/swat/source/class/swat/main/Module.js b/webapps/swat/source/class/swat/main/Module.js index 1e5c6c9daf..160e6f6ec7 100644 --- a/webapps/swat/source/class/swat/main/Module.js +++ b/webapps/swat/source/class/swat/main/Module.js @@ -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. * diff --git a/webapps/swat/source/class/swat/module/documentation/Documentation.js b/webapps/swat/source/class/swat/module/documentation/Documentation.js index acd7e90400..696a7f0161 100644 --- a/webapps/swat/source/class/swat/module/documentation/Documentation.js +++ b/webapps/swat/source/class/swat/module/documentation/Documentation.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/documentation/Fsm.js b/webapps/swat/source/class/swat/module/documentation/Fsm.js index 184b438520..b58f57cf1f 100644 --- a/webapps/swat/source/class/swat/module/documentation/Fsm.js +++ b/webapps/swat/source/class/swat/module/documentation/Fsm.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js b/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js index b58f4bbaf6..cb62c1f976 100644 --- a/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js +++ b/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js b/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js index 161b99b19a..eb3e6add28 100644 --- a/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js +++ b/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js b/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js index abccbff2d0..935eb18dcd 100644 --- a/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js +++ b/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js b/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js index 6967a7c353..209aac4d33 100644 --- a/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js +++ b/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js @@ -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 */ diff --git a/webapps/swat/source/class/swat/module/statistics/Fsm.js b/webapps/swat/source/class/swat/module/statistics/Fsm.js index a6e56c6842..c23cfb0feb 100644 --- a/webapps/swat/source/class/swat/module/statistics/Fsm.js +++ b/webapps/swat/source/class/swat/module/statistics/Fsm.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/statistics/Gui.js b/webapps/swat/source/class/swat/module/statistics/Gui.js index b5e11d4533..bad55b71c0 100644 --- a/webapps/swat/source/class/swat/module/statistics/Gui.js +++ b/webapps/swat/source/class/swat/module/statistics/Gui.js @@ -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; diff --git a/webapps/swat/source/class/swat/module/statistics/Statistics.js b/webapps/swat/source/class/swat/module/statistics/Statistics.js index f15e180cba..99528605a1 100644 --- a/webapps/swat/source/class/swat/module/statistics/Statistics.js +++ b/webapps/swat/source/class/swat/module/statistics/Statistics.js @@ -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; |