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

Commit 21ea9dd

Browse files
author
Gabriel Schulhof
committed
Table: Remove superfluous and markup-whise invalid "locked" attribute
(cherry picked from commit 00fb4e2) Closes gh-7379 Fixes gh-7381
1 parent 180f875 commit 21ea9dd

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

js/widgets/table.columntoggle.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ $.widget( "mobile.table", $.mobile.table, {
126126
input.jqmData( "cells" )
127127
.toggleClass( "ui-table-cell-hidden", !checked )
128128
.toggleClass( "ui-table-cell-visible", checked );
129-
130-
if ( input[ 0 ].getAttribute( "locked" ) ) {
131-
input.removeAttr( "locked" );
132-
133-
this._unlockCells( input.jqmData( "cells" ) );
134-
} else {
135-
input.attr( "locked", true );
136-
}
137129
},
138130

139131
_unlockCells: function( cells ) {

tests/unit/table/table_core.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
});
175175

176176
asyncTest( "Toggle column", function() {
177-
expect( 6 );
177+
expect( 9 );
178178

179179
var initial, post,
180180
input = $( "#toggle-column-test-popup input:nth(1)" ),
@@ -224,6 +224,17 @@
224224
post = checkColumn( "After clicking: " );
225225
deepEqual( initial !== post, true,
226226
"Visibility was toggled by clicking the checkbox" );
227+
input.prop( "checked", false ).checkboxradio( "refresh" ).trigger( "change" );
228+
post = initial;
229+
},
230+
{
231+
change: { src: input, event: "change.toggleColumn2" }
232+
},
233+
function() {
234+
post = checkColumn( "After unchecking checkbox via its 'checked' property" );
235+
deepEqual( initial === post, true,
236+
"Unchecking already unchecked checkbox via its 'checked' property does " +
237+
"not affect column visibility" );
227238
start();
228239
}
229240
]);

0 commit comments

Comments
 (0)