added `do not close popup when it is saving value, fix #224
This commit is contained in:
@ -180,6 +180,33 @@ $(function () {
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
asyncTest("hide when saving value", function () {
|
||||
var newVal = 2,
|
||||
e = $('<a href="#" data-pk="1" data-type="select" data-url="post.php" data-name="text" data-value="1"></a>')
|
||||
.appendTo(fx)
|
||||
.editable({
|
||||
source: groupsArr
|
||||
});
|
||||
|
||||
e.click();
|
||||
var p = tip(e);
|
||||
p.find('select').val(2);
|
||||
p.find('form').submit();
|
||||
|
||||
e.parent().click();
|
||||
|
||||
ok(p.is(':visible'), 'popover still visible');
|
||||
|
||||
setTimeout(function() {
|
||||
equal(e.data('editable').value, newVal, 'new value saved');
|
||||
ok(!p.is(':visible'), 'popover closed');
|
||||
|
||||
e.remove();
|
||||
start();
|
||||
}, timeout);
|
||||
|
||||
});
|
||||
|
||||
test("show/hide/toggle methods", function () {
|
||||
var e = $('<a href="#" data-pk="1" data-url="post.php" data-name="text1">abc</a>').appendTo('#qunit-fixture').editable();
|
||||
e.editable('show');
|
||||
|
Reference in New Issue
Block a user