Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dijit / _editor / plugins / TabIndent.js

History | View | Annotate | Download (1.09 KB)

1 9 andrej.cim
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6
7
8
if(!dojo._hasResource["dijit._editor.plugins.TabIndent"]){
9
dojo._hasResource["dijit._editor.plugins.TabIndent"]=true;
10
dojo.provide("dijit._editor.plugins.TabIndent");
11
dojo.experimental("dijit._editor.plugins.TabIndent");
12
dojo.require("dijit._editor._Plugin");
13
dojo.require("dijit.form.ToggleButton");
14
dojo.declare("dijit._editor.plugins.TabIndent",dijit._editor._Plugin,{useDefaultCommand:false,buttonClass:dijit.form.ToggleButton,command:"tabIndent",_initButton:function(){
15
this.inherited(arguments);
16
var e=this.editor;
17
this.connect(this.button,"onChange",function(_1){
18
e.set("isTabIndent",_1);
19
});
20
this.updateState();
21
},updateState:function(){
22
this.button.set("checked",this.editor.isTabIndent,false);
23
}});
24
dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){
25
if(o.plugin){
26
return;
27
}
28
switch(o.args.name){
29
case "tabIndent":
30
o.plugin=new dijit._editor.plugins.TabIndent({command:o.args.name});
31
}
32
});
33
}