Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Table: Remove superfluous and markup-whise invalid "locked" attribute
Browse files Browse the repository at this point in the history
Closes gh-7379
Fixes gh-7381
  • Loading branch information
Gabriel Schulhof committed May 27, 2014
1 parent 805ff49 commit 00fb4e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 0 additions & 8 deletions js/widgets/table.columntoggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
13 changes: 12 additions & 1 deletion tests/unit/table/table_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
});

asyncTest( "Toggle column", function() {
expect( 6 );
expect( 9 );

var initial, post,
input = $( "#toggle-column-test-popup input:nth(1)" ),
Expand Down Expand Up @@ -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();
}
]);
Expand Down

0 comments on commit 00fb4e2

Please sign in to comment.