Debian Codegraph @

dojox/editor/plugins/ToolbarLineBreak.js

raw symbols SCIP
1 define([
2 "dojo",
3 "dijit",
4 "dojox",
5 "dijit/_Widget",
6 "dijit/_TemplatedMixin",
7 "dijit/_editor/_Plugin",
8 "dojo/_base/declare"
9 ], function(dojo, dijit, dojox, _Widget, _TemplatedMixin, _Plugin, declare) {
10
11 var ToolbarLineBreak = declare("dojox.editor.plugins.ToolbarLineBreak",
12 [ _Widget, _TemplatedMixin ],
13 {
14 // summary:
15 // A 'line break' between two `dijit.Toolbar` items so that very
16 // long toolbars can be organized a bit.
17 templateString: "<span class='dijit dijitReset'><br></span>",
18 postCreate: function(){
19 dojo.setSelectable(this.domNode, false);
20 },
21 isFocusable: function(){
22 // summary:
23 // This widget isn't focusable, so pass along that fact.
24 // tags:
25 // protected
26 return false;
27 }
28 });
29
30
31 // Register this plugin.
32 dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
33 if(o.plugin){ return; }
34 var name = o.args.name.toLowerCase();
35 if(name === "||" || name === "toolbarlinebreak"){
36 o.plugin = new _Plugin({
37 button: new ToolbarLineBreak(),
38 setEditor: function(editor){
39 this.editor = editor;
40 }
41 });
42 }
43 });
44
45 return ToolbarLineBreak;
46
47 });