this.wrap = this.el.wrap({cls: 'x-form-daypick-item '});
- var r1 = '<table><tr>'
+ var r1 = '<table><tr>';
var r2 = '<tr class="x-form-daypick-icons">';
for (var i=0; i < 7; i++) {
r1+= '<td><div>' + Date.dayNames[i].substring(0,3) + '</div></td>';
this.viewEl = viewEl;
-
+ // this will not work on Chrome!!!
this.el.on('DOMAttrModified', this.setFromHidden, this); //ff
this.el.on('propertychange', this.setFromHidden, this); //ie
* @return {Boolean} True if checked, else false
*/
getValue : function(){
- return '';
+ return this.el.dom.value;
},
{
var val = '';
this.viewEl.select('img',true).each(function(e,i,n) {
- val += e.is(".x-menu-item-checked") ? String(n) : ' ';
+ val += e.is(".x-menu-item-checked") ? String(n) : '';
});
this.setValue(val, true);
},
* @param {Boolean/String} suppressEvent - whether to suppress the checkchange event.
*/
setValue : function(v,suppressEvent){
- if (!this.el.dom.value) {
+ if (!this.el.dom) {
return;
}
var old = this.el.dom.value ;
if (suppressEvent) {
return ;
}
+
// update display..
this.viewEl.select('img',true).each(function(e,i,n) {
var on = e.is(".x-menu-item-checked");
- var newv = v.substring(n,1) == n;
+ var newv = v.indexOf(String(n)) > -1;
if (on != newv) {
e.toggleClass('x-menu-item-checked');
}