diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/sketch/_Plugin.js | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-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/dojox/sketch/_Plugin.js')
-rw-r--r-- | includes/js/dojox/sketch/_Plugin.js | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/includes/js/dojox/sketch/_Plugin.js b/includes/js/dojox/sketch/_Plugin.js deleted file mode 100644 index fb7cb93..0000000 --- a/includes/js/dojox/sketch/_Plugin.js +++ /dev/null @@ -1,83 +0,0 @@ -if(!dojo._hasResource["dojox.sketch._Plugin"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.sketch._Plugin"] = true; -dojo.provide("dojox.sketch._Plugin"); -//dojo.require("dojox.sketch"); -dojo.require("dijit.form.Button"); - -dojo.declare("dojox.sketch._Plugin", null, { - // summary - // This represents a "plugin" to the dojox.sketch.Figure, which is basically - // a single button on the Toolbar and some associated code - constructor: function(/*Object?*/args){ - if(args){ - dojo.mixin(this, args); - } - this._connects=[]; - }, - - figure: null, - iconClassPrefix: "dojoxSketchIcon", - itemGroup: 'toolsGroup', - button: null, - queryCommand: null, - shape: "", - useDefaultCommand: true, - buttonClass: dijit.form.ToggleButton, - _initButton: function(){ - if(this.shape.length){ - //TODO: i18n -// var label = dojox.sketch.shapes[this.shape]; - var className = this.iconClassPrefix+" "+this.iconClassPrefix + this.shape.charAt(0).toUpperCase() + this.shape.substr(1); - if(!this.button){ - var props = { - label: this.shape, - showLabel: false, - iconClass: className, - dropDown: this.dropDown, - tabIndex: "-1" - }; - this.button = new this.buttonClass(props); - this.connect(this.button,'onClick','activate'); - } - } - }, - attr: function(name,/*?*/value){ - if(arguments.length>1){ - this.button.setAttribute(name,value); - }else{ - this.button.getAttribute(name); - } - }, - onActivate: function(){}, - activate: function(/*?*/e){ - this.onActivate(); - this.figure.setTool(this); - this.attr('checked',true); - }, - onMouseDown: function(e){}, - onMouseMove: function(e){}, - onMouseUp: function(e){}, - destroy: function(f){ - dojo.forEach(this._connects,dojo.disconnect); - }, - connect: function(o,f,tf){ - this._connects.push(dojo.connect(o,f,this,tf)); - }, - setFigure: function(/*Widget*/figure){ - // FIXME: detatch from previous figure!! - this.figure = figure; - - // FIXME: prevent creating this if we don't need to (i.e., figure can't handle our command) - this._initButton(); - }, - setToolbar: function(/*Widget*/toolbar){ - if(this.button){ - toolbar.addChild(this.button); - } - if(this.itemGroup){ - toolbar.addGroupItem(this,this.itemGroup); - } - } -}); - -} |