added `do not close popup when it is saving value, fix

This commit is contained in:
vitalets
2013-06-15 20:58:36 +04:00
parent 025c4c20cb
commit 9cbcb0e99c
4 changed files with 58 additions and 2 deletions

@ -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');