[qooxdoo-commit] SF.net SVN: qooxdoo: [3649] branches/namespaces/qooxdoo/frontend/api
Brought to you by:
ecker,
martinwittemann
From: <wp...@us...> - 2006-07-31 17:18:44
|
Revision: 3649 Author: wpbasti Date: 2006-07-31 10:18:26 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/qooxdoo/?rev=3649&view=rev Log Message: ----------- Fixed api viewer Modified Paths: -------------- branches/namespaces/qooxdoo/frontend/api/Makefile branches/namespaces/qooxdoo/frontend/api/source/class/api/DetailViewer.js branches/namespaces/qooxdoo/frontend/api/source/class/api/Viewer.js branches/namespaces/qooxdoo/frontend/api/source/index.html Modified: branches/namespaces/qooxdoo/frontend/api/Makefile =================================================================== --- branches/namespaces/qooxdoo/frontend/api/Makefile 2006-07-31 16:49:41 UTC (rev 3648) +++ branches/namespaces/qooxdoo/frontend/api/Makefile 2006-07-31 17:18:26 UTC (rev 3649) @@ -1,9 +1,53 @@ +################################################################################### +# VARIABLES +################################################################################### + +FRAMEWORK=../framework +GENERATE=../framework/tool/generate/generate.py +CACHE=../.cache + + + +################################################################################### +# DEFAULT TARGET +################################################################################### + all: source build -generate-source: - @../tools/generate/generate.py \ - --script-input ../source/class \ - --source-script-path ../../source/class \ + + +################################################################################### +# COMMON TARGETS +################################################################################### + +source: generate-script-source generate-data-source + +build: generate-script-build generate-data-build + cp -f source/index.html build/index.html + + + +################################################################################### +# CLEANUP TARGETS +################################################################################### + +clean: + rm -f source/script/api.js source/script/data.js + rm -f build/script/api.js build/script/data.js + +realclean: clean + rm -rf build + + + +################################################################################### +# GENERATE TARGETS +################################################################################### + +generate-script-source: + @$(GENERATE) \ + --script-input $(FRAMEWORK)/source/class \ + --source-script-path ../$(FRAMEWORK)/source/class \ --script-input source/class \ --source-script-path class \ --include api \ @@ -12,15 +56,15 @@ --include qx.theme.widget.WindowsWidgetTheme \ --generate-source-script \ --source-script-file source/script/api.js \ - --define-runtime-setting qx.theme.icon.CrystalSvgIconTheme.imageUri:../../source/resource/icon/crystalsvg \ - --define-runtime-setting qx.theme.widget.WindowsWidgetTheme.imageUri:../../source/resource/widget/windows \ - --define-runtime-setting qx.manager.object.ImageManager.staticUri:../../source/resource/static \ - --cache-directory ../.cache + --define-runtime-setting qx.theme.icon.CrystalSvgIconTheme.imageUri:../$(FRAMEWORK)/source/resource/icon/crystalsvg \ + --define-runtime-setting qx.theme.widget.WindowsWidgetTheme.imageUri:../$(FRAMEWORK)/source/resource/widget/windows \ + --define-runtime-setting qx.manager.object.ImageManager.staticUri:../$(FRAMEWORK)/source/resource/static \ + --cache-directory $(CACHE) -generate-build: - @../tools/generate/generate.py \ - --script-input ../source/class \ - --resource-input ../source/resource \ +generate-script-build: + @$(GENERATE) \ + --script-input $(FRAMEWORK)/source/class \ + --resource-input $(FRAMEWORK)/source/resource \ --resource-output build/resource/qooxdoo \ --script-input source/class \ --resource-input source/resource \ @@ -35,16 +79,18 @@ --define-runtime-setting qx.theme.widget.WindowsWidgetTheme.imageUri:resource/qooxdoo/widget/windows \ --define-runtime-setting qx.manager.object.ImageManager.staticUri:resource/qooxdoo/static \ --copy-resource \ - --cache-directory ../.cache + --cache-directory $(CACHE) -source: generate-source +generate-data-source: + @$(GENERATE) \ + --script-input $(FRAMEWORK)/source/class \ + --generate-api-documentation \ + --api-documentation-json-file source/script/data.js \ + --cache-directory $(CACHE) -build: generate-build - cp -f source/index.html build/index.html - -clean: - rm -f source/script/api.js - rm -f build/script/api.js - -realclean: clean - rm -rf build +generate-data-build: + @$(GENERATE) \ + --script-input $(FRAMEWORK)/source/class \ + --generate-api-documentation \ + --api-documentation-json-file build/script/data.js \ + --cache-directory $(CACHE) Modified: branches/namespaces/qooxdoo/frontend/api/source/class/api/DetailViewer.js =================================================================== --- branches/namespaces/qooxdoo/frontend/api/source/class/api/DetailViewer.js 2006-07-31 16:49:41 UTC (rev 3648) +++ branches/namespaces/qooxdoo/frontend/api/source/class/api/DetailViewer.js 2006-07-31 17:18:26 UTC (rev 3649) @@ -145,7 +145,8 @@ + '<label for="chk_' + nodeType + '">Show inherited</label></span>'; } - html += '<img class="openclose" src="resources/images/' + (isOpen ? 'close.gif' : 'open.gif') + '"' + html += '<img class="openclose" src="' + + qx.manager.object.ImageManager.buildUri('api/' + (isOpen ? 'close.gif' : 'open.gif')) + '"' + " onclick=\"document._detailViewer._onShowInfoPanelBodyClicked(" + nodeType + ")\"/> " + '<span ' + " onclick=\"document._detailViewer._onShowInfoPanelBodyClicked(" + nodeType + ")\">" @@ -223,10 +224,10 @@ this._currentClassHierarchy = classHierarchy; // Add the class hierarchy - classHtml += DetailViewer.createImageHtml("resources/images/class18.gif") + "Object<br/>"; + classHtml += DetailViewer.createImageHtml("api/class18.gif") + "Object<br/>"; var indent = 0; for (var i = classHierarchy.length - 1; i >= 0; i--) { - classHtml += DetailViewer.createImageHtml("resources/images/nextlevel.gif", null, "margin-left:" + indent + "px") + classHtml += DetailViewer.createImageHtml("api/nextlevel.gif", null, "margin-left:" + indent + "px") + DetailViewer.createImageHtml(api.TreeUtil.getIconUrl(classHierarchy[i])); if (i != 0) { classHtml += this._createItemLinkHtml(classHierarchy[i].attributes.fullName, null, false); @@ -386,7 +387,7 @@ if (typeInfo.hasDetailDecider.call(this, node, nodeType, fromClassNode)) { // This node has details -> Show the detail button - html += '<img src="resources/images/open.gif"' + html += '<img src="' + qx.manager.object.ImageManager.buildUri("api/open.gif") + '"' + " onclick=\"document._detailViewer._onShowItemDetailClicked(" + nodeType + ",'" + node.attributes.name + "'" + ((fromClassNode != this._currentClassDocNode) ? ",'" + fromClassNode.attributes.fullName + "'" : "") @@ -479,7 +480,7 @@ // Update the close/open image var opencloseImgElem = textDiv.parentNode.previousSibling.firstChild; - opencloseImgElem.src = showDetails ? 'resources/images/close.gif' : 'resources/images/open.gif'; + opencloseImgElem.src = qx.manager.object.ImageManager.buildUri(showDetails ? 'api/close.gif' : 'api/open.gif'); // Update content var info = typeInfo.infoFactory.call(this, node, nodeType, fromClassNode, showDetails); @@ -524,7 +525,7 @@ typeInfo.isOpen = !typeInfo.isOpen; var imgElem = typeInfo.infoTitleElem.getElementsByTagName("img")[0]; - imgElem.src = typeInfo.isOpen ? 'resources/images/close.gif' : 'resources/images/open.gif'; + imgElem.src = qx.manager.object.ImageManager.buildUri(typeInfo.isOpen ? 'api/close.gif' : 'api/open.gif'); this._updateInfoPanel(nodeType); } catch (exc) { @@ -562,7 +563,7 @@ */ qx.Proto._selectItem = function(itemName) { try { - api.ApiViewer.instance.selectItem(itemName); + api.Viewer.instance.selectItem(itemName); qx.ui.core.Widget.flushGlobalQueues(); } catch (exc) { this.error("Selecting item '" + itemName + "' failed", exc); @@ -578,7 +579,7 @@ */ qx.Proto._getClassDocNode = function(className) { if (className) { - return api.TreeUtil.getClassDocNode(api.ApiViewer.instance.getDocTree(), className); + return api.TreeUtil.getClassDocNode(api.Viewer.instance.getDocTree(), className); } else { return null; } Modified: branches/namespaces/qooxdoo/frontend/api/source/class/api/Viewer.js =================================================================== --- branches/namespaces/qooxdoo/frontend/api/source/class/api/Viewer.js 2006-07-31 16:49:41 UTC (rev 3648) +++ branches/namespaces/qooxdoo/frontend/api/source/class/api/Viewer.js 2006-07-31 17:18:26 UTC (rev 3649) @@ -1,7 +1,7 @@ /* #module(api) #resource(css:css) -#resource(images:images) +#resource(images:image) */ /** @@ -29,15 +29,15 @@ this._detailViewer = new api.DetailViewer; this.add(this._detailViewer); - this._currentTreeType = api.ApiViewer.PACKAGE_TREE; + this._currentTreeType = api.Viewer.PACKAGE_TREE; // Workaround: Since navigating in qx.ui.tree.Tree doesn't work, we've to // maintain a hash that keeps the tree nodes for class names this._classTreeNodeHash = {}; - this._classTreeNodeHash[api.ApiViewer.PACKAGE_TREE] = {}; - this._classTreeNodeHash[api.ApiViewer.INHERITENCE_TREE] = {}; + this._classTreeNodeHash[api.Viewer.PACKAGE_TREE] = {}; + this._classTreeNodeHash[api.Viewer.INHERITENCE_TREE] = {}; - api.ApiViewer.instance = this; + api.Viewer.instance = this; qx.client.History.init(); qx.client.History.addEventListener("request", this._onHistoryRequest, this); Modified: branches/namespaces/qooxdoo/frontend/api/source/index.html =================================================================== --- branches/namespaces/qooxdoo/frontend/api/source/index.html 2006-07-31 16:49:41 UTC (rev 3648) +++ branches/namespaces/qooxdoo/frontend/api/source/index.html 2006-07-31 17:18:26 UTC (rev 3649) @@ -2,18 +2,18 @@ <head> <title>qooxdoo API documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link type="text/css" rel="stylesheet" href="resources/css/apiviewer.css"/> - <script type="text/javascript" src="dist/api.js"></script> + <link type="text/css" rel="stylesheet" href="resource/css/apiviewer.css"/> + <script type="text/javascript" src="script/api.js"></script> <script type="text/javascript"> qx.dev.log.Logger.ROOT_LOGGER.setMinLevel(qx.dev.log.Logger.LEVEL_ERROR); qx.core.Init.defineInitialize(function() { - qx.manager.object.ImageManager.defineAlias("api", "resources/images"); + qx.manager.object.ImageManager.defineAlias("api", "resource/image"); }); qx.core.Init.defineMain(function() { - this.add(new api.Viewer("dist/data.js")); + this.add(new api.Viewer("script/data.js")); }); </script> </head> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |