Skip to content

Commit

Permalink
Spacing fixes and module summaries, refs #12672 !strict. Most of the …
Browse files Browse the repository at this point in the history
…modules indent inside the define() block but some don't; I didn't standardize that.

git-svn-id: http://svn.dojotoolkit.org/src/dijit/trunk@24783 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
wkeese committed May 10, 2011
1 parent 3410dab commit c36b0d1
Show file tree
Hide file tree
Showing 40 changed files with 609 additions and 654 deletions.
2 changes: 1 addition & 1 deletion Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ define([
// if mouse out occurs moving from <td> to <span> inside <td>, ignore it
if(evt.relatedTarget && evt.relatedTarget.parentNode == this._currentNode){ return; }
var cls = "dijitCalendarHoveredDate";
if(dojo.hasClass(this._currentNode, "dijitCalendarActiveDate")) {
if(dojo.hasClass(this._currentNode, "dijitCalendarActiveDate")){
cls += " dijitCalendarActiveDate";
}
dojo.removeClass(this._currentNode, cls);
Expand Down
34 changes: 16 additions & 18 deletions ColorPalette.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
define([
"dojo",
".",
"dojo/text!./templates/ColorPalette.html",
"./_Widget",
"./_TemplatedMixin",
"dojo/colors",
"dojo/i18n",
"./_PaletteMixin",
"dojo/i18n!dojo/nls/colors"], function(dojo, dijit) {
// module:
// dijit/ColorPalette
// summary:
// TODOC


dojo.declare("dijit.ColorPalette",
[dijit._Widget, dijit._TemplatedMixin, dijit._PaletteMixin],
{
"dojo",
".",
"dojo/text!./templates/ColorPalette.html",
"./_Widget",
"./_TemplatedMixin",
"dojo/colors",
"dojo/i18n",
"./_PaletteMixin",
"dojo/i18n!dojo/nls/colors"], function(dojo, dijit){

// module:
// dijit/ColorPalette
// summary:
// A keyboard accessible color-picking widget

dojo.declare("dijit.ColorPalette", [dijit._Widget, dijit._TemplatedMixin, dijit._PaletteMixin], {
// summary:
// A keyboard accessible color-picking widget
// description:
Expand Down
25 changes: 11 additions & 14 deletions Declaration.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
define([
"dojo",
".",
"./_Widget",
"./_TemplatedMixin",
"./_WidgetsInTemplateMixin"], function(dojo, dijit) {
"dojo",
".",
"./_Widget",
"./_TemplatedMixin",
"./_WidgetsInTemplateMixin"], function(dojo, dijit){

// module:
// dijit/Declaration
// summary:
// TODOC

// The Declaration widget allows a developer to declare new widget
// classes directly from a snippet of markup.

dojo.declare(
"dijit.Declaration",
dijit._Widget,
{
dojo.declare("dijit.Declaration", dijit._Widget, {
// summary:
// The Declaration widget allows a developer to declare new widget
// classes directly from a snippet of markup.
Expand Down Expand Up @@ -97,9 +95,8 @@ dojo.declare(
dojo.connect(wc.prototype, evt, func);
});
}
}
);
});


return dijit.Declaration;
return dijit.Declaration;
});
24 changes: 10 additions & 14 deletions DialogUnderlay.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
define([
"dojo",
".",
"dojo/window",
"./_Widget",
"./_TemplatedMixin"], function(dojo, dijit) {
"dojo",
".",
"dojo/window",
"./_Widget",
"./_TemplatedMixin"], function(dojo, dijit){

// module:
// dijit/DialogUnderlay
// summary:
// TODOC

// The component that blocks the screen behind a `dijit.Dialog`

dojo.declare(
"dijit.DialogUnderlay",
[dijit._Widget, dijit._TemplatedMixin],
{
dojo.declare("dijit.DialogUnderlay", [dijit._Widget, dijit._TemplatedMixin], {
// summary:
// The component that blocks the screen behind a `dijit.Dialog`
//
Expand Down Expand Up @@ -101,9 +98,8 @@ dojo.declare(
delete this.bgIframe;
this.domNode.style.display = "none";
}
}
);
});


return dijit.DialogUnderlay;
return dijit.DialogUnderlay;
});
76 changes: 37 additions & 39 deletions DropDownMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,55 @@ define([
".",
"dojo/text!./templates/Menu.html",
"./_OnDijitClickMixin",
"./_MenuBase"], function(dojo, dijit) {
"./_MenuBase"], function(dojo, dijit){

// module:
// dijit/DropDownMenu
// summary:
// dijit.DropDownMenu widget

dojo.declare("dijit.DropDownMenu",
[dijit._MenuBase, dijit._OnDijitClickMixin],
{
// summary:
// A menu, without features for context menu (Meaning, drop down menu)
dojo.declare("dijit.DropDownMenu", [dijit._MenuBase, dijit._OnDijitClickMixin], {
// summary:
// A menu, without features for context menu (Meaning, drop down menu)

templateString: dojo.cache("dijit", "templates/Menu.html"),
templateString: dojo.cache("dijit", "templates/Menu.html"),

baseClass: "dijitMenu",
baseClass: "dijitMenu",

postCreate: function(){
var k = dojo.keys, l = this.isLeftToRight();
this._openSubMenuKey = l ? k.RIGHT_ARROW : k.LEFT_ARROW;
this._closeSubMenuKey = l ? k.LEFT_ARROW : k.RIGHT_ARROW;
this.connectKeyNavHandlers([k.UP_ARROW], [k.DOWN_ARROW]);
},
postCreate: function(){
var k = dojo.keys, l = this.isLeftToRight();
this._openSubMenuKey = l ? k.RIGHT_ARROW : k.LEFT_ARROW;
this._closeSubMenuKey = l ? k.LEFT_ARROW : k.RIGHT_ARROW;
this.connectKeyNavHandlers([k.UP_ARROW], [k.DOWN_ARROW]);
},

_onKeyPress: function(/*Event*/ evt){
// summary:
// Handle keyboard based menu navigation.
// tags:
// protected

if(evt.ctrlKey || evt.altKey){ return; }

switch(evt.charOrCode){
case this._openSubMenuKey:
this._moveToPopup(evt);
dojo.stopEvent(evt);
break;
case this._closeSubMenuKey:
if(this.parentMenu){
if(this.parentMenu._isMenuBar){
this.parentMenu.focusPrev();
_onKeyPress: function(/*Event*/ evt){
// summary:
// Handle keyboard based menu navigation.
// tags:
// protected

if(evt.ctrlKey || evt.altKey){ return; }

switch(evt.charOrCode){
case this._openSubMenuKey:
this._moveToPopup(evt);
dojo.stopEvent(evt);
break;
case this._closeSubMenuKey:
if(this.parentMenu){
if(this.parentMenu._isMenuBar){
this.parentMenu.focusPrev();
}else{
this.onCancel(false);
}
}else{
this.onCancel(false);
dojo.stopEvent(evt);
}
}else{
dojo.stopEvent(evt);
}
break;
break;
}
}
}
});
});

return dijit.DropDownMenu;
return dijit.DropDownMenu;
});
95 changes: 45 additions & 50 deletions Editor.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
define([
"dojo",
".",
"./_editor/RichText",
"./Toolbar",
"./ToolbarSeparator",
"./_editor/_Plugin",
"./_editor/plugins/EnterKeyHandling",
"./_editor/range",
"./_Container",
"dojo/i18n",
"./layout/_LayoutWidget",
"dojo/i18n!./_editor/nls/commands",
"./form/ToggleButton"], function(dojo, dijit) {
"dojo",
".",
"./_editor/RichText",
"./Toolbar",
"./ToolbarSeparator",
"./_editor/_Plugin",
"./_editor/plugins/EnterKeyHandling",
"./_editor/range",
"./_Container",
"dojo/i18n",
"./layout/_LayoutWidget",
"dojo/i18n!./_editor/nls/commands",
"./form/ToggleButton"], function(dojo, dijit){

// module:
// dijit/Editor
// summary:
// TODOC

// A rich text Editing widget

dojo.declare(
"dijit.Editor",
dijit._editor.RichText,
{
dojo.declare("dijit.Editor", dijit._editor.RichText, {
// summary:
// A rich text Editing widget
//
Expand Down Expand Up @@ -77,7 +74,7 @@ dojo.declare(
}
},

postMixInProperties: function() {
postMixInProperties: function(){
// summary:
// Extension to make sure a deferred is in place before certain functions
// execute, like making sure all the plugins are properly inserted.
Expand Down Expand Up @@ -794,35 +791,33 @@ dojo.declare(
}
}catch(e){ /* Squelch any errors caused by focus change if hidden during a state change */}
}
}
);

// Register the "default plugins", ie, the built-in editor commands
dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
if(o.plugin){ return; }
var args = o.args, p;
var _p = dijit._editor._Plugin;
var name = args.name;
switch(name){
case "undo": case "redo": case "cut": case "copy": case "paste": case "insertOrderedList":
case "insertUnorderedList": case "indent": case "outdent": case "justifyCenter":
case "justifyFull": case "justifyLeft": case "justifyRight": case "delete":
case "selectAll": case "removeFormat": case "unlink":
case "insertHorizontalRule":
p = new _p({ command: name });
break;

case "bold": case "italic": case "underline": case "strikethrough":
case "subscript": case "superscript":
p = new _p({ buttonClass: dijit.form.ToggleButton, command: name });
break;
case "|":
p = new _p({ button: new dijit.ToolbarSeparator(), setEditor: function(editor) {this.editor = editor;} });
}
// console.log('name',name,p);
o.plugin=p;
});

});

// Register the "default plugins", ie, the built-in editor commands
dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
if(o.plugin){ return; }
var args = o.args, p;
var _p = dijit._editor._Plugin;
var name = args.name;
switch(name){
case "undo": case "redo": case "cut": case "copy": case "paste": case "insertOrderedList":
case "insertUnorderedList": case "indent": case "outdent": case "justifyCenter":
case "justifyFull": case "justifyLeft": case "justifyRight": case "delete":
case "selectAll": case "removeFormat": case "unlink":
case "insertHorizontalRule":
p = new _p({ command: name });
break;

case "bold": case "italic": case "underline": case "strikethrough":
case "subscript": case "superscript":
p = new _p({ buttonClass: dijit.form.ToggleButton, command: name });
break;
case "|":
p = new _p({ button: new dijit.ToolbarSeparator(), setEditor: function(editor){this.editor = editor;} });
}
// console.log('name',name,p);
o.plugin=p;
});

return dijit.Editor;
return dijit.Editor;
});
38 changes: 18 additions & 20 deletions InlineEditBox.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
define([
"dojo",
".",
"dojo/text!./templates/InlineEditBox.html",
"dojo/i18n",
"./_Widget",
"./_TemplatedMixin",
"./_WidgetsInTemplateMixin",
"./_Container",
"./form/Button",
"./form/TextBox",
"dojo/i18n!./nls/common"], function(dojo, dijit) {
// module:
// dijit/InlineEditBox
// summary:
// TODOC


dojo.declare("dijit.InlineEditBox",
dijit._Widget,
{
"dojo",
".",
"dojo/text!./templates/InlineEditBox.html",
"dojo/i18n",
"./_Widget",
"./_TemplatedMixin",
"./_WidgetsInTemplateMixin",
"./_Container",
"./form/Button",
"./form/TextBox",
"dojo/i18n!./nls/common"], function(dojo, dijit){

// module:
// dijit/InlineEditBox
// summary:
// An element with in-line edit capabilites

dojo.declare("dijit.InlineEditBox", dijit._Widget, {
// summary:
// An element with in-line edit capabilites
//
Expand Down
Loading

0 comments on commit c36b0d1

Please sign in to comment.