- Author:
- David Nickerson <nickerso@users.sourceforge.net>
- Date:
- 2010-05-04 12:37:19+12:00
- Desc:
- adding initial version of SED-ML L1V1 file reproducing what is in graphs/BR-INa-variants.xml
- Permanent Source URI:
- https://models.cellml.org/workspace/a1/rawfile/a80b964384c0c7683d7c5d07b73a5af7a973d46c/dojo-presentation/js/dojo/dijit/_editor/plugins/TextColor.js
dojo.provide("dijit._editor.plugins.TextColor");
dojo.require("dijit._editor._Plugin");
dojo.require("dijit.ColorPalette");
dojo.declare("dijit._editor.plugins.TextColor",
dijit._editor._Plugin,
{
// summary:
// This plugin provides dropdown color pickers for setting text color and background color
//
// description:
// The commands provided by this plugin are:
// * foreColor - sets the text color
// * hiliteColor - sets the background color
buttonClass: dijit.form.DropDownButton,
//TODO: set initial focus/selection state?
constructor: function(){
this.dropDown = new dijit.ColorPalette();
this.connect(this.dropDown, "onChange", function(color){
this.editor.execCommand(this.command, color);
});
}
}
);
dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
if(o.plugin){ return; }
switch(o.args.name){
case "foreColor": case "hiliteColor":
o.plugin = new dijit._editor.plugins.TextColor({command: o.args.name});
}
});