Just another blog
Posts tagged dojo
Dijit.form.combobox widget with loading image
Dec 23rd
I needed some feedback on my dijit.form.combox and a queryreadstore to fetch the list.
If you press the dropdown button it would be nice to display a loading image.
Nice website to create your loading image: ajaxload.info
The following widget extends the default combobox:
dojo.provide("myWidgets.ComboBox");
dojo.declare
(
"myWidgets.ComboBox",
[dijit.form.ComboBox],
{
// summary:
// extended version of the dijit form ComboBox widget with a loading image.
// Loading image will appear on the start search and will disappear on the show result list.
dropdownbutton: "",
loadingImg: "
",
/* *********************************************************** postCreate */
postCreate: function()
{
this.inherited(arguments);
//store the current dropdownbutton
this.dropdownbutton = this.downArrowNode.innerHTML;
},
/* ********************************************************* _startSearch */
_startSearch: function(evt)
{
this._updateButtonStateLoading();
this.inherited(arguments);
},
/* ****************************************************** _showResultList */
_showResultList: function(evt)
{
this._updateButtonStateDefault();
this.inherited(arguments);
},
/* ******************************************** _updateButtonStateLoading */
_updateButtonStateLoading: function()
{
//set the loading image
this.downArrowNode.innerHTML = this.loadingImg;
},
/* ******************************************** _updateButtonStateDefault */
_updateButtonStateDefault: function()
{
//set default dropdown button back
this.downArrowNode.innerHTML = this.dropdownbutton;
}
}
);
Disable the close button of dijit.Dialog
Dec 9th
Just found this javascript to disable the close and escape button of the DOJO dijit.Dialog (source)



