aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dijit/Declaration.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dijit/Declaration.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dijit/Declaration.js')
-rw-r--r--includes/js/dijit/Declaration.js76
1 files changed, 0 insertions, 76 deletions
diff --git a/includes/js/dijit/Declaration.js b/includes/js/dijit/Declaration.js
deleted file mode 100644
index 2b18cfe..0000000
--- a/includes/js/dijit/Declaration.js
+++ /dev/null
@@ -1,76 +0,0 @@
-if(!dojo._hasResource["dijit.Declaration"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Declaration"] = true;
-dojo.provide("dijit.Declaration");
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit.Declaration",
- dijit._Widget,
- {
- // summary:
- // The Declaration widget allows a user to declare new widget
- // classes directly from a snippet of markup.
-
- _noScript: true,
- widgetClass: "",
- replaceVars: true,
- defaults: null,
- mixins: [],
- buildRendering: function(){
- var src = this.srcNodeRef.parentNode.removeChild(this.srcNodeRef);
- var preambles = dojo.query("> script[type='dojo/method'][event='preamble']", src).orphan();
- var scripts = dojo.query("> script[type^='dojo/']", src).orphan();
- var srcType = src.nodeName;
-
- var propList = this.defaults||{};
-
- // map array of strings like [ "dijit.form.Button" ] to array of mixin objects
- // (note that dojo.map(this.mixins, dojo.getObject) doesn't work because it passes
- // a bogus third argument to getObject(), confusing it)
- this.mixins = this.mixins.length ?
- dojo.map(this.mixins, function(name){ return dojo.getObject(name); } ) :
- [ dijit._Widget, dijit._Templated ];
-
- if(preambles.length){
- // we only support one preamble. So be it.
- propList.preamble = dojo.parser._functionFromScript(preambles[0]);
- }
-
- var parsedScripts = dojo.map(scripts, function(s){
- var evt = s.getAttribute("event")||"postscript";
- return {
- event: evt,
- func: dojo.parser._functionFromScript(s)
- };
- });
-
- // do the connects for each <script type="dojo/connect" event="foo"> block and make
- // all <script type="dojo/method"> tags execute right after construction
- this.mixins.push(function(){
- dojo.forEach(parsedScripts, function(s){
- dojo.connect(this, s.event, this, s.func);
- }, this);
- });
-
- propList.widgetsInTemplate = true;
- propList._skipNodeCache = true;
- propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint")||'')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent")||'')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">";
- // console.debug(propList.templateString);
-
- // strip things so we don't create stuff under us in the initial setup phase
- dojo.query("[dojoType]", src).forEach(function(node){
- node.removeAttribute("dojoType");
- });
-
- // create the new widget class
- dojo.declare(
- this.widgetClass,
- this.mixins,
- propList
- );
- }
- }
-);
-
-}