Permalink
Browse files

Table: Remove superfluous and markup-whise invalid "locked" attribute

Closes gh-7379
Fixes gh-7381
  • Loading branch information...
gabrielschulhof committed May 8, 2014
1 parent 805ff49 commit 00fb4e295d9d0f0c7681d4b4ddfbdbc9b996a19c
Showing with 12 additions and 9 deletions.
  1. +0 −8 js/widgets/table.columntoggle.js
  2. +12 −1 tests/unit/table/table_core.js
@@ -126,14 +126,6 @@ $.widget( "mobile.table", $.mobile.table, {
input.jqmData( "cells" )
.toggleClass( "ui-table-cell-hidden", !checked )
.toggleClass( "ui-table-cell-visible", checked );
if ( input[ 0 ].getAttribute( "locked" ) ) {
input.removeAttr( "locked" );
this._unlockCells( input.jqmData( "cells" ) );
} else {
input.attr( "locked", true );
}
},
_unlockCells: function( cells ) {
@@ -174,7 +174,7 @@
});
asyncTest( "Toggle column", function() {
expect( 6 );
expect( 9 );
var initial, post,
input = $( "#toggle-column-test-popup input:nth(1)" ),
@@ -224,6 +224,17 @@
post = checkColumn( "After clicking: " );
deepEqual( initial !== post, true,
"Visibility was toggled by clicking the checkbox" );
input.prop( "checked", false ).checkboxradio( "refresh" ).trigger( "change" );
post = initial;
},
{
change: { src: input, event: "change.toggleColumn2" }
},
function() {
post = checkColumn( "After unchecking checkbox via its 'checked' property" );
deepEqual( initial === post, true,
"Unchecking already unchecked checkbox via its 'checked' property does " +
"not affect column visibility" );
start();
}
]);

0 comments on commit 00fb4e2

Please sign in to comment.