Permalink
Browse files

Table: Implement _setOptions() for "disabled"

  • Loading branch information...
gabrielschulhof authored and arschmitz committed May 7, 2014
1 parent 53d7cbf commit afb0a3da2d4dbf8c7f55db6625a879906714f861
Showing with 21 additions and 0 deletions.
  1. +14 −0 js/widgets/table.columntoggle.js
  2. +7 −0 js/widgets/table.js
@@ -80,6 +80,20 @@ return $.widget( "mobile.table", $.mobile.table, {
this._setToggleState();
},
_setOptions: function( options ) {
if ( options.disabled !== undefined && this.options.mode === "columntoggle" ) {
this._ui.popup.popup( "option", "disabled", options.disabled );
this._ui.button.toggleClass( "ui-state-disabled", options.disabled );
if( options.disabled ) {
this._ui.button.attr( "tabindex", -1 );
} else {
this._ui.button.removeAttr( "tabindex" );
}
}
return this._super( options );
},
_id: function() {
return ( this.element.attr( "id" ) || ( this.widgetName + this.uuid ) );
},
View
@@ -55,6 +55,13 @@ return $.widget( "mobile.table", {
this._refresh( true );
},
_setOptions: function( options ) {
if ( options.disabled !== undefined ) {
this.element.toggleClass( "ui-state-disabled", options.disabled );
}
return this._super( options );
},
_setHeaders: function() {
this.headers = this.element.find( "tr:eq(0)" ).children();
this.allHeaders = this.element.find( "thead tr" ).children().add( this.headers );

0 comments on commit afb0a3d

Please sign in to comment.