From e44a7e37b6c7b5961adaffc62b9042b8d442938e Mon Sep 17 00:00:00 2001
From: mensonge
Date: Thu, 13 Nov 2008 09:49:11 +0000
Subject: New feature: basic Ajax suggestion for tags and implementation of
Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
---
includes/js/dojox/layout/BorderContainer.js | 7 +
includes/js/dojox/layout/ContentPane.js | 479 +++++++++
includes/js/dojox/layout/DragPane.js | 65 ++
includes/js/dojox/layout/ExpandoPane.js | 208 ++++
includes/js/dojox/layout/FloatingPane.js | 394 ++++++++
includes/js/dojox/layout/README | 75 ++
includes/js/dojox/layout/RadioGroup.js | 233 +++++
includes/js/dojox/layout/ResizeHandle.js | 271 +++++
includes/js/dojox/layout/ScrollPane.js | 114 +++
includes/js/dojox/layout/resources/ExpandoPane.css | 99 ++
.../layout/resources/ExpandoPane.css.commented.css | 116 +++
.../js/dojox/layout/resources/ExpandoPane.html | 9 +
.../js/dojox/layout/resources/FloatingPane.css | 152 +++
.../resources/FloatingPane.css.commented.css | 183 ++++
.../js/dojox/layout/resources/FloatingPane.html | 14 +
includes/js/dojox/layout/resources/RadioGroup.css | 40 +
.../layout/resources/RadioGroup.css.commented.css | 45 +
.../js/dojox/layout/resources/ResizeHandle.css | 28 +
.../resources/ResizeHandle.css.commented.css | 34 +
includes/js/dojox/layout/resources/ScrollPane.css | 21 +
.../layout/resources/ScrollPane.css.commented.css | 24 +
includes/js/dojox/layout/resources/ScrollPane.html | 6 +
.../js/dojox/layout/resources/icons/resize.png | Bin 0 -> 319 bytes
includes/js/dojox/layout/tests/ContentPane.html | 1059 ++++++++++++++++++++
includes/js/dojox/layout/tests/_bottomPane.html | 53 +
includes/js/dojox/layout/tests/_expando.css | 477 +++++++++
.../dojox/layout/tests/_expando.css.commented.css | 64 ++
includes/js/dojox/layout/tests/_floating.html | 48 +
includes/js/dojox/layout/tests/_lorem.html | 11 +
includes/js/dojox/layout/tests/_script.html | 9 +
includes/js/dojox/layout/tests/doc0.html | 14 +
includes/js/dojox/layout/tests/images/blank.gif | Bin 0 -> 43 bytes
includes/js/dojox/layout/tests/images/dojoLogo.png | Bin 0 -> 14712 bytes
.../js/dojox/layout/tests/images/gridUnderlay.png | Bin 0 -> 915 bytes
.../js/dojox/layout/tests/images/testImage.gif | Bin 0 -> 14171 bytes
.../js/dojox/layout/tests/remote/getResponse.php | 108 ++
includes/js/dojox/layout/tests/test_DragPane.html | 93 ++
.../js/dojox/layout/tests/test_ExpandoPane.html | 307 ++++++
.../dojox/layout/tests/test_ExpandoPane_code.html | 98 ++
.../dojox/layout/tests/test_ExpandoPane_more.html | 114 +++
.../js/dojox/layout/tests/test_FloatingPane.html | 167 +++
.../js/dojox/layout/tests/test_RadioGroup.html | 61 ++
.../js/dojox/layout/tests/test_ResizeHandle.html | 134 +++
.../js/dojox/layout/tests/test_ScrollPane.html | 129 +++
.../dojox/layout/tests/test_ScrollPaneSingle.html | 71 ++
.../js/dojox/layout/tests/test_SizingPane.html | 170 ++++
46 files changed, 5804 insertions(+)
create mode 100644 includes/js/dojox/layout/BorderContainer.js
create mode 100644 includes/js/dojox/layout/ContentPane.js
create mode 100644 includes/js/dojox/layout/DragPane.js
create mode 100644 includes/js/dojox/layout/ExpandoPane.js
create mode 100644 includes/js/dojox/layout/FloatingPane.js
create mode 100644 includes/js/dojox/layout/README
create mode 100644 includes/js/dojox/layout/RadioGroup.js
create mode 100644 includes/js/dojox/layout/ResizeHandle.js
create mode 100644 includes/js/dojox/layout/ScrollPane.js
create mode 100644 includes/js/dojox/layout/resources/ExpandoPane.css
create mode 100644 includes/js/dojox/layout/resources/ExpandoPane.css.commented.css
create mode 100644 includes/js/dojox/layout/resources/ExpandoPane.html
create mode 100644 includes/js/dojox/layout/resources/FloatingPane.css
create mode 100644 includes/js/dojox/layout/resources/FloatingPane.css.commented.css
create mode 100644 includes/js/dojox/layout/resources/FloatingPane.html
create mode 100644 includes/js/dojox/layout/resources/RadioGroup.css
create mode 100644 includes/js/dojox/layout/resources/RadioGroup.css.commented.css
create mode 100644 includes/js/dojox/layout/resources/ResizeHandle.css
create mode 100644 includes/js/dojox/layout/resources/ResizeHandle.css.commented.css
create mode 100644 includes/js/dojox/layout/resources/ScrollPane.css
create mode 100644 includes/js/dojox/layout/resources/ScrollPane.css.commented.css
create mode 100644 includes/js/dojox/layout/resources/ScrollPane.html
create mode 100644 includes/js/dojox/layout/resources/icons/resize.png
create mode 100644 includes/js/dojox/layout/tests/ContentPane.html
create mode 100644 includes/js/dojox/layout/tests/_bottomPane.html
create mode 100644 includes/js/dojox/layout/tests/_expando.css
create mode 100644 includes/js/dojox/layout/tests/_expando.css.commented.css
create mode 100644 includes/js/dojox/layout/tests/_floating.html
create mode 100644 includes/js/dojox/layout/tests/_lorem.html
create mode 100644 includes/js/dojox/layout/tests/_script.html
create mode 100644 includes/js/dojox/layout/tests/doc0.html
create mode 100644 includes/js/dojox/layout/tests/images/blank.gif
create mode 100644 includes/js/dojox/layout/tests/images/dojoLogo.png
create mode 100644 includes/js/dojox/layout/tests/images/gridUnderlay.png
create mode 100644 includes/js/dojox/layout/tests/images/testImage.gif
create mode 100644 includes/js/dojox/layout/tests/remote/getResponse.php
create mode 100644 includes/js/dojox/layout/tests/test_DragPane.html
create mode 100644 includes/js/dojox/layout/tests/test_ExpandoPane.html
create mode 100644 includes/js/dojox/layout/tests/test_ExpandoPane_code.html
create mode 100644 includes/js/dojox/layout/tests/test_ExpandoPane_more.html
create mode 100644 includes/js/dojox/layout/tests/test_FloatingPane.html
create mode 100644 includes/js/dojox/layout/tests/test_RadioGroup.html
create mode 100644 includes/js/dojox/layout/tests/test_ResizeHandle.html
create mode 100644 includes/js/dojox/layout/tests/test_ScrollPane.html
create mode 100644 includes/js/dojox/layout/tests/test_ScrollPaneSingle.html
create mode 100644 includes/js/dojox/layout/tests/test_SizingPane.html
(limited to 'includes/js/dojox/layout')
diff --git a/includes/js/dojox/layout/BorderContainer.js b/includes/js/dojox/layout/BorderContainer.js
new file mode 100644
index 0000000..7fa5393
--- /dev/null
+++ b/includes/js/dojox/layout/BorderContainer.js
@@ -0,0 +1,7 @@
+if(!dojo._hasResource["dojox.layout.BorderContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.layout.BorderContainer"] = true;
+dojo.provide("dojox.layout.BorderContainer");
+
+console.error("dojox.layout.BorderContainer moved to dijit.layout.BorderContainer");
+
+}
diff --git a/includes/js/dojox/layout/ContentPane.js b/includes/js/dojox/layout/ContentPane.js
new file mode 100644
index 0000000..d60202c
--- /dev/null
+++ b/includes/js/dojox/layout/ContentPane.js
@@ -0,0 +1,479 @@
+if(!dojo._hasResource["dojox.layout.ContentPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.layout.ContentPane"] = true;
+dojo.provide("dojox.layout.ContentPane");
+
+dojo.require("dijit.layout.ContentPane");
+
+(function(){ // private scope, sort of a namespace
+
+ // TODO: should these methods be moved to dojox.html.cssPathAdjust or something?
+
+ // css at-rules must be set before any css declarations according to CSS spec
+ // match:
+ // @import 'http://dojotoolkit.org/dojo.css';
+ // @import 'you/never/thought/' print;
+ // @import url("it/would/work") tv, screen;
+ // @import url(/did/you/now.css);
+ // but not:
+ // @namespace dojo "http://dojotoolkit.org/dojo.css"; /* namespace URL should always be a absolute URI */
+ // @charset 'utf-8';
+ // @media print{ #menuRoot {display:none;} }
+
+
+ // we adjust all paths that dont start on '/' or contains ':'
+ //(?![a-z]+:|\/)
+
+ if(dojo.isIE){
+ var alphaImageLoader = /(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;
+ }
+
+ var cssPaths = /(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;
+
+ function adjustCssPaths(cssUrl, cssText){
+ // summary:
+ // adjusts relative paths in cssText to be relative to cssUrl
+ // a path is considered relative if it doesn't start with '/' and not contains ':'
+ // description:
+ // Say we fetch a HTML page from level1/page.html
+ // It has some inline CSS:
+ // @import "css/page.css" tv, screen;
+ // ...
+ // background-image: url(images/aplhaimage.png);
+ //
+ // as we fetched this HTML and therefore this CSS
+ // from level1/page.html, these paths needs to be adjusted to:
+ // @import 'level1/css/page.css' tv, screen;
+ // ...
+ // background-image: url(level1/images/alphaimage.png);
+ //
+ // In IE it will also adjust relative paths in AlphaImageLoader()
+ // filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/alphaimage.png');
+ // will be adjusted to:
+ // filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='level1/images/alphaimage.png');
+ //
+ // Please note that any relative paths in AlphaImageLoader in external css files wont work, as
+ // the paths in AlphaImageLoader is MUST be declared relative to the HTML page,
+ // not relative to the CSS file that declares it
+
+ if(!cssText || !cssUrl){ return; }
+
+ // support the ImageAlphaFilter if it exists, most people use it in IE 6 for transparent PNGs
+ // We are NOT going to kill it in IE 7 just because the PNGs work there. Somebody might have
+ // other uses for it.
+ // If user want to disable css filter in IE6 he/she should
+ // unset filter in a declaration that just IE 6 doesn't understands
+ // like * > .myselector { filter:none; }
+ if(alphaImageLoader){
+ cssText = cssText.replace(alphaImageLoader, function(ignore, pre, delim, url, post){
+ return pre + (new dojo._Url(cssUrl, './'+url).toString()) + post;
+ });
+ }
+
+ return cssText.replace(cssPaths, function(ignore, delimStr, strUrl, delimUrl, urlUrl, media){
+ if(strUrl){
+ return '@import "' + (new dojo._Url(cssUrl, './'+strUrl).toString()) + '"' + media;
+ }else{
+ return 'url(' + (new dojo._Url(cssUrl, './'+urlUrl).toString()) + ')' + media;
+ }
+ });
+ }
+
+ // attributepaths one tag can have multiple paths, example:
+ // or
+ //
+ var htmlAttrPaths = /(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;
+
+ function adjustHtmlPaths(htmlUrl, cont){
+ var url = htmlUrl || "./";
+
+ return cont.replace(htmlAttrPaths,
+ function(tag, start, name, delim, relUrl, delim2, cssText, end){
+ return start + (name ?
+ (name + '=' + delim + (new dojo._Url(url, relUrl).toString()) + delim)
+ : ('style=' + delim2 + adjustCssPaths(url, cssText) + delim2)
+ ) + end;
+ }
+ );
+ }
+
+ function secureForInnerHtml(cont){
+ /********* remove .. tag **********/
+ // khtml is picky about dom faults, you can't attach a
+
+
+
+
+
+
dojox.layout.ContentPane
+ As dojox ContentPane is derived from dijit ContentPane, make sure that the dijit test passes before running this test
+ Test relies on a php page as backend, so you need php installed on your server
+
+
+ |
+ |