Skip to content

Commit

Permalink
dojox/form: api doc format fixes, refs #13101 !strict.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.dojotoolkit.org/src/dojox/trunk@28677 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
wkeese committed May 28, 2012
1 parent 8674af2 commit 74b80f0
Show file tree
Hide file tree
Showing 31 changed files with 579 additions and 621 deletions.
7 changes: 1 addition & 6 deletions form/BusyButton.js
Expand Up @@ -9,11 +9,7 @@ define([
"dojo/i18n!dijit/nls/loading",
"dojo/_base/declare"
], function(lang, domAttr, domClass, Button, DropDownButton, ComboButton, i18n, nlsLoading, declare){
/*=====
Button = dijit.form.Button;
DropDownButton = dijit.form.DropDownButton;
ComboButton = dijit.form.ComboButton;
=====*/

var _BusyButtonMixin = declare("dojox.form._BusyButtonMixin", null, {

isBusy: false,
Expand Down Expand Up @@ -85,7 +81,6 @@ var _BusyButtonMixin = declare("dojox.form._BusyButtonMixin", null, {
// this.inherited(arguments); FIXME: throws an Unknown runtime error

// Begin IE hack
// summary: reset the label (text) of the button; takes an HTML string
this.label = content;
// remove children
while(this.containerNode.firstChild){
Expand Down
36 changes: 14 additions & 22 deletions form/CheckedMultiSelect.js
Expand Up @@ -23,20 +23,12 @@ define([
"dijit/form/CheckBox" // template
], function(declare, lang, array, event, domGeometry, domClass, domConstruct, i18n, Widget, TemplatedMixin, WidgetsInTemplateMixin, registry, Menu, MenuItem, Tooltip, FormSelectWidget, ComboButton, CheckedMultiSelectMenuItem, CheckedMultiSelectItem, CheckedMultiSelect, nlsCheckedMultiSelect){

// module:
// dojox/form/CheckedMultiSelect
// summary:
// Extends the core dojox.form.CheckedMultiSelect to provide a "checkbox" selector
//

/*=====
Widget = dijit._Widget;
TemplatedMixin = dijit._TemplatedMixin;
WidgetsInTemplateMixin = dijit._WidgetsInTemplateMixin;
Menu = dijit.Menu;
MenuItem = dijit.MenuItem;
FormSelectWidget = dijit.form._FormSelectWidget;
=====*/
// module:
// dojox/form/CheckedMultiSelect
// summary:
// Extends the core dojox.form.CheckedMultiSelect to provide a "checkbox" selector


var formCheckedMultiSelectItem = declare("dojox.form._CheckedMultiSelectItem", [Widget, TemplatedMixin, WidgetsInTemplateMixin], {
// summary:
// The individual items for a CheckedMultiSelect
Expand Down Expand Up @@ -130,10 +122,9 @@ var formCheckedMultiSelectItem = declare("dojox.form._CheckedMultiSelectItem", [
var formCheckedMultiSelectMenu = declare("dojox.form._CheckedMultiSelectMenu", Menu, {
// summary:
// An internally-used menu for dropdown that allows us a vertical scrollbar

multiple: false,

// summary:
// An internally-used menu for dropdown that allows us a vertical scrollbar
buildRendering: function(){
// summary:
// Stub in our own changes, so that our domNode is not a table
Expand Down Expand Up @@ -224,9 +215,9 @@ var formCheckedMultiSelectMenuItem = declare("dojox.form._CheckedMultiSelectMenu
_iconClass: "",

postMixInProperties: function(){
// summary:
// Set the appropriate _subClass value - based on if we are multi-
// or single-select
// summary:
// Set the appropriate _subClass value - based on if we are multi-
// or single-select
if(this.parent.multiple){
this._iconClass = "dojoxCheckedMultiSelectMenuCheckBoxItemIcon";
this._type = {type: "checkbox"};
Expand Down Expand Up @@ -432,7 +423,7 @@ var formCheckedMultiSelect = declare("dojox.form.CheckedMultiSelect", FormSelect
// notification that an item as been added to this dijit.
},

_addOptionItem: function(/* dojox.form.__SelectOption */ option){
_addOptionItem: function(/*dojox.form.__SelectOption*/ option){
var item;
if(this.dropDown){
item = new formCheckedMultiSelectMenuItem({
Expand Down Expand Up @@ -463,7 +454,7 @@ var formCheckedMultiSelect = declare("dojox.form.CheckedMultiSelect", FormSelect
},

reset: function(){
// summary: Overridden so that the state will be cleared.
// Overridden so that the state will be cleared.
this.inherited(arguments);
Tooltip.hide(this.domNode);
},
Expand Down Expand Up @@ -499,7 +490,8 @@ var formCheckedMultiSelect = declare("dojox.form.CheckedMultiSelect", FormSelect
},

invertSelection: function(onChange){
// summary: Invert the selection
// summary:
// Invert the selection
// onChange: Boolean
// If null, onChange is not fired.
if(this.multiple){
Expand Down
13 changes: 6 additions & 7 deletions form/DateTextBox.js
Expand Up @@ -10,17 +10,16 @@ define([
], function(kernel, lang, domStyle, Calendar, CalendarViews, _DateTimeTextBox, TextBox, declare){
kernel.experimental("dojox.form.DateTextBox");

/*=====
_DateTimeTextBox = dijit.form._DateTimeTextBox;
=====*/

var DateTextBox = declare( "dojox.form.DateTextBox", _DateTimeTextBox,
{
// summary:
// A validating, serializable, range-bound date text box with a popup calendar

// popupClass: String
// The popup widget to use. In this case, a calendar with Day, Month and Year views.
// The popup widget to use. In this case, a calendar with Day, Month and Year views.
popupClass: "dojox.widget.Calendar",

_selector: "date",

openDropDown: function(){
Expand All @@ -37,7 +36,7 @@ declare( "dojox.form.DayTextBox", DateTextBox,
// A validating, serializable, range-bound date text box with a popup calendar that contains just months.

// popupClass: String
// The popup widget to use. In this case, a calendar with just a Month view.
// The popup widget to use. In this case, a calendar with just a Month view.
popupClass: "dojox.widget.DailyCalendar",

parse: function(displayVal){
Expand Down Expand Up @@ -81,7 +80,7 @@ declare( "dojox.form.MonthTextBox", DateTextBox,
// A validating, serializable, range-bound date text box with a popup calendar that contains only years

// popupClass: String
// The popup widget to use. In this case, a calendar with just a Year view.
// The popup widget to use. In this case, a calendar with just a Year view.
popupClass: "dojox.widget.MonthlyCalendar",

selector: "date",
Expand Down Expand Up @@ -179,7 +178,7 @@ declare( "dojox.form.YearTextBox", DateTextBox,
});
},

parse: function(/*String*/value, /*dojo.date.locale.__FormatOptions*/constraints){
parse: function(/*String*/ value, /*dojo.date.locale.__FormatOptions*/ constraints){
return value || (this._isEmpty(value) ? null : undefined); // Date
},

Expand Down
13 changes: 6 additions & 7 deletions form/DropDownStack.js
Expand Up @@ -3,12 +3,11 @@ define([
"./_SelectStackMixin",
"dojo/_base/declare"
], function(Select, _SelectStackMixin, declare){
/*=====
Select = dijit.form.Select;
_SelectStackMixin = dojox.form._SelectStackMixin;
=====*/
return declare("dojox.form.DropDownStack", [ Select, _SelectStackMixin ], {
// summary: A dropdown-based select stack.

});
// module:
// dojox/form/DropDownStack
// summary:
// A dropdown-based select stack.

return declare("dojox.form.DropDownStack", [ Select, _SelectStackMixin ]);
});
42 changes: 22 additions & 20 deletions form/FileInput.js
Expand Up @@ -11,33 +11,33 @@ define([
function(declare, kernel, fx, domAttr, domClass, template, FormWidget, Templated){
kernel.experimental("dojox.form.FileInput");

/*=====
FormWidget = dijit.form._FormWidget;
=====*/
declare("dojox.form.FileInput", FormWidget,
return declare("dojox.form.FileInput", FormWidget,
{
// summary: A styled input type="file"
// summary:
// A styled input type="file"
//
// description: A input type="file" form widget, with a button for uploading to be styled via css,
// a cancel button to clear selection, and FormWidget mixin to provide standard dijit.form.Form
// support (FIXME: maybe not fully implemented)
// description:
// A input type="file" form widget, with a button for uploading to be styled via css,
// a cancel button to clear selection, and FormWidget mixin to provide standard dijit.form.Form
// support (FIXME: maybe not fully implemented)

// label: String
// the title text of the "Browse" button
// the title text of the "Browse" button
label: "Browse ...",

// cancelText: String
// the title of the "Cancel" button
// the title of the "Cancel" button
cancelText: "Cancel",

// name: String
// ugh, this should be pulled from this.domNode
// ugh, this should be pulled from this.domNode
name: "uploadFile",

templateString: template,

startup: function(){
// summary: listen for changes on our real file input
// summary:
// listen for changes on our real file input
this._listener = this.connect(this.fileInput,"onchange","_matchValue");
this._keyListener = this.connect(this.fileInput,"onkeyup","_matchValue");
},
Expand All @@ -47,22 +47,25 @@ declare("dojox.form.FileInput", FormWidget,
postCreate: function(){},

_matchValue: function(){
// summary: set the content of the upper input based on the semi-hidden file input
// summary:
// set the content of the upper input based on the semi-hidden file input
this.inputNode.value = this.fileInput.value;
if(this.inputNode.value){
this.cancelNode.style.visibility = "visible";
fx.fadeIn({ node: this.cancelNode, duration:275 }).play();
}
},

setLabel: function(/* String */label,/* String? */cssClass){
// summary: method to allow use to change button label
setLabel: function(/*String*/ label, /*String?*/ cssClass){
// summary:
// method to allow use to change button label
this.titleNode.innerHTML = label;
},

reset: function(/* Event */e){
// summary: on click of cancel button, since we can't clear the input because of
// security reasons, we destroy it, and add a new one in it's place.
reset: function(/*Event*/ e){
// summary:
// on click of cancel button, since we can't clear the input because of
// security reasons, we destroy it, and add a new one in it's place.
this.disconnect(this._listener);
this.disconnect(this._keyListener);
if(this.fileInput){
Expand All @@ -73,7 +76,7 @@ declare("dojox.form.FileInput", FormWidget,
// should we use cloneNode()? can we?
this.fileInput = document.createElement('input');
// domAttr.set(this.fileInput,{
// "type":"file", "id":this.id, "name": this.name
// "type":"file", "id":this.id, "name": this.name
//});
this.fileInput.setAttribute("type","file");
this.fileInput.setAttribute("id", this.id);
Expand All @@ -88,5 +91,4 @@ declare("dojox.form.FileInput", FormWidget,

});

return dojox.form.FileInput;
});

0 comments on commit 74b80f0

Please sign in to comment.