fix checklist checked display for single value
This commit is contained in:
parent
c7a223be2f
commit
500223ca92
@ -4,6 +4,7 @@ X-editable changelog
|
||||
|
||||
Version 1.4.4 wip
|
||||
----------------------------
|
||||
[bug] checklist don't show checked for single value (vitalets)
|
||||
[enh #188] added bootstrap datetime (adeg, vitalets)
|
||||
[bug] editable-poshytip on inline mode tries to write in $.Poshytip (vitalets)
|
||||
|
||||
|
@ -64,6 +64,8 @@ $(function(){
|
||||
value = str.split(reg);
|
||||
} else if($.isArray(str)) {
|
||||
value = str;
|
||||
} else {
|
||||
value = [str];
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
@ -61,6 +61,17 @@ $(function () {
|
||||
e.remove();
|
||||
start();
|
||||
}, timeout);
|
||||
});
|
||||
});
|
||||
|
||||
test("should show checked for single value", function () {
|
||||
var e = $('<a href="#" data-type="checklist" data-value="1"></a>').appendTo('#qunit-fixture').editable({
|
||||
pk: 1,
|
||||
source: groupsArr
|
||||
});
|
||||
|
||||
e.click();
|
||||
var p = tip(e);
|
||||
equal(p.find('input[type="checkbox"]:checked').length, 1, 'checked count ok');
|
||||
});
|
||||
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user