From f5f7d81146da7fc947af27f01be5f6260cac633d Mon Sep 17 00:00:00 2001 From: Bill Keese Date: Tue, 13 Oct 2009 16:26:09 +0000 Subject: [PATCH] Fix style errors (spacing) in top level widgets plus some miscellaneous files, refs #10048 !strict. git-svn-id: http://svn.dojotoolkit.org/src/dijit/trunk@20569 560b804f-0ae3-0310-86f3-f6aa0a117693 --- Calendar.js | 6 +-- ColorPalette.js | 50 +++++++++++------------ Declaration.js | 6 +-- Dialog.js | 66 +++++++++++++++--------------- DialogUnderlay.js | 13 +++--- InlineEditBox.js | 24 +++++------ Menu.js | 26 ++++++------ MenuItem.js | 4 +- ProgressBar.js | 12 +++--- TitlePane.js | 10 ++--- Tooltip.js | 10 ++--- TooltipDialog.js | 14 +++---- _Container.js | 6 +-- _HasDropDown.js | 88 +++++++++++++++++++-------------------- _Templated.js | 22 +++++----- _TimePicker.js | 26 ++++++------ _Widget.js | 95 ++++++++++++++++++++++--------------------- dijit-all.js | 5 ++- dijit.js | 5 ++- resources/_modules.js | 9 ++-- robot.js | 8 ++-- 21 files changed, 256 insertions(+), 249 deletions(-) diff --git a/Calendar.js b/Calendar.js index 62493a20d..6caa8fb6e 100644 --- a/Calendar.js +++ b/Calendar.js @@ -26,7 +26,7 @@ dojo.declare( // example: // | var calendar = new dijit.Calendar({}, dojo.byId("calendarNode")); // - // example: + // example: // |
templateString: dojo.cache("dijit", "templates/Calendar.html"), @@ -165,7 +165,7 @@ dojo.declare( clazz = clazz2 + " " + clazz; } - template.className = clazz + "Month dijitCalendarDateTemplate"; + template.className = clazz + "Month dijitCalendarDateTemplate"; template.dijitDateValue = date.valueOf(); var label = dojo.query(".dijitCalendarDateLabel", template)[0], text = date.getDateLocalized ? date.getDateLocalized(this.lang) : date.getDate(); @@ -211,7 +211,7 @@ dojo.declare( var dateClass = (args.datePackage && (args.datePackage != "dojo.date"))? args.datePackage + ".Date" : "Date"; this.dateClassObj = dojo.getObject(dateClass, false); this.datePackage = args.datePackage || this.datePackage; - this.dateFuncObj = dojo.getObject(this.datePackage, false); + this.dateFuncObj = dojo.getObject(this.datePackage, false); this.dateLocaleModule = dojo.getObject(this.datePackage + ".locale", false); }, diff --git a/ColorPalette.js b/ColorPalette.js index 7b185ca06..fd7747f84 100644 --- a/ColorPalette.js +++ b/ColorPalette.js @@ -68,7 +68,7 @@ dojo.declare("dijit.ColorPalette", "3x4": [["white", "lime", "green", "blue"], ["silver", "yellow", "fuchsia", "navy"], - ["gray", "red", "purple", "black"]] + ["gray", "red", "purple", "black"]] }, @@ -85,7 +85,7 @@ dojo.declare("dijit.ColorPalette", _paletteCoords: { "leftOffset": 3, "topOffset": 3, "cWidth": 20, "cHeight": 20 - + }, // templateString: String @@ -107,25 +107,25 @@ dojo.declare("dijit.ColorPalette", // A name has to be given to the colorMap, this needs to be unique per Palette. dojo.mixin(this.divNode.style, this._paletteDims[this.palette]); this.imageNode.setAttribute("src", this._imagePaths[this.palette].toString()); - var choices = this._palettes[this.palette]; + var choices = this._palettes[this.palette]; this.domNode.style.position = "relative"; - this._cellNodes = []; + this._cellNodes = []; this.colorNames = dojo.i18n.getLocalization("dojo", "colors", this.lang); var url = this._blankGif, - colorObject = new dojo.Color(), - coords = this._paletteCoords; + colorObject = new dojo.Color(), + coords = this._paletteCoords; for(var row=0; row < choices.length; row++){ var rowNode = dojo.create("div", { role: "row" }); dojo.place(rowNode, this.divNode); - for(var col=0; col < choices[row].length; col++) { + for(var col=0; col < choices[row].length; col++){ - var color = choices[row][col], - colorValue = colorObject.setColor(dojo.Color.named[color]) + var color = choices[row][col], + colorValue = colorObject.setColor(dojo.Color.named[color]) ; - var cellNode = dojo.create("span", { + var cellNode = dojo.create("span", { "class":"dijitPaletteCell", tabIndex:"-1", title: this.colorNames[color], @@ -134,28 +134,28 @@ dojo.declare("dijit.ColorPalette", left: coords.leftOffset + (col * coords.cWidth) + "px" } }); - + var imgNode = dojo.create("img",{ - src: url, + src: url, "class":"dijitPaletteImg", alt: this.colorNames[color] }, cellNode); - + // FIXME: color is an attribute of img? imgNode.color = colorValue.toHex(); var imgStyle = imgNode.style; imgStyle.color = imgStyle.backgroundColor = imgNode.color; - dojo.forEach(["Dijitclick", "MouseEnter", "Focus"], function(handler) { - this.connect(cellNode, "on" + handler.toLowerCase(), "_onCell" + handler); - }, this); + dojo.forEach(["Dijitclick", "MouseEnter", "Focus"], function(handler){ + this.connect(cellNode, "on" + handler.toLowerCase(), "_onCell" + handler); + }, this); dojo.place(cellNode, rowNode); - dijit.setWaiRole(cellNode, "gridcell"); - cellNode.index = this._cellNodes.length; - this._cellNodes.push(cellNode); - } + dijit.setWaiRole(cellNode, "gridcell"); + cellNode.index = this._cellNodes.length; + this._cellNodes.push(cellNode); + } } this._xDim = choices[0].length; this._yDim = choices.length; @@ -165,11 +165,11 @@ dojo.declare("dijit.ColorPalette", // The palette itself is navigated to with the tab key on the keyboard // Keyboard navigation within the Palette is with the arrow keys // Spacebar selects the color. - // For the up key the index is changed by negative the x dimension. + // For the up key the index is changed by negative the x dimension. var keyIncrementMap = { UP_ARROW: -this._xDim, - // The down key the index is increase by the x dimension. + // The down key the index is increase by the x dimension. DOWN_ARROW: this._xDim, // Right and left move the index by 1. RIGHT_ARROW: 1, @@ -256,7 +256,7 @@ dojo.declare("dijit.ColorPalette", // private var target = evt.currentTarget; - if (this._currentFocus != target.index){ + if(this._currentFocus != target.index){ this._currentFocus = target.index; window.setTimeout(function(){dijit.focus(target)}, 0); } @@ -300,7 +300,7 @@ dojo.declare("dijit.ColorPalette", // protected this._removeCellHighlight(this._currentFocus); this._currentFocus = node.index; - dojo.addClass(node, "dijitPaletteCellHighlight"); + dojo.addClass(node, "dijitPaletteCellHighlight"); }, _removeCellHighlight: function(index){ @@ -311,7 +311,7 @@ dojo.declare("dijit.ColorPalette", dojo.removeClass(this._cellNodes[index], "dijitPaletteCellHighlight"); }, - _selectColor: function(selectNode){ + _selectColor: function(selectNode){ // summary: // This selects a color. It triggers the onChange event // area: diff --git a/Declaration.js b/Declaration.js index 82d410b93..cfdd582ab 100644 --- a/Declaration.js +++ b/Declaration.js @@ -35,7 +35,7 @@ dojo.declare( regularConnects = dojo.query("> script[type^='dojo/connect']", src).orphan(), srcType = src.nodeName; - var propList = this.defaults||{}; + var propList = this.defaults || {}; // For all methods defined like // diff --git a/resources/_modules.js b/resources/_modules.js index fbefc9260..e75636f1c 100644 --- a/resources/_modules.js +++ b/resources/_modules.js @@ -2,14 +2,17 @@ // dijit fallback for key summaries otherwise not covered by the doc parser dijit.demos = { - // summary: Home of the official dijit demo code + // summary: + // Home of the official dijit demo code }; dijit.form = { - // summary: Form and input related widgets + // summary: + // Form and input related widgets }; dijit.layout = { - // summary: Layout related widgets + // summary: + // Layout related widgets }; =====*/ diff --git a/robot.js b/robot.js index 31988e8ac..e243c9718 100644 --- a/robot.js +++ b/robot.js @@ -32,8 +32,8 @@ dojo.mixin(doh.robot,{ p2.r = p2.x+view.w; p2.b = p2.y+view.h; p = {x: M(p.x+p2.x,p2.x)+b.l, // clip left edge of node wrt the iframe - y: M(p.y+p2.y,p2.y)+b.t, // top edge - r: m(p.x+p2.x+p.w,p2.r)+b.l, // right edge (to compute width) + y: M(p.y+p2.y,p2.y)+b.t, // top edge + r: m(p.x+p2.x+p.w,p2.r)+b.l, // right edge (to compute width) b: m(p.y+p2.y+p.h,p2.b)+b.t}; // bottom edge (to compute height) // save a few bytes by computing width and height from r and b p.w = p.r-p.x; @@ -69,7 +69,7 @@ dojo.mixin(doh.robot,{ y: p.y+p2.y+b.t, w: p.w, h: p.h}; - + } // scroll the parent window so that the node translated into the parent window's coordinate space is in view dijit.scrollIntoView(n,p); @@ -94,6 +94,6 @@ dojo.mixin(doh.robot,{ var cW = dijit.getDocumentWindow(n.ownerDocument); var arr=[cW]; var f = cW.frameElement; - return (cW==dojo.global || f==null)? arr : arr.concat(doh.robot._getWindowChain(f)); + return (cW == dojo.global || f == null)? arr : arr.concat(doh.robot._getWindowChain(f)); } });