@ -434,7 +434,28 @@ $(function () {
|
||||
start();
|
||||
}, timeout);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
test("'display' returning html only (img)", function () {
|
||||
var c = 0,
|
||||
html = '<img src="../src/img/clear.png">',
|
||||
html_br = '<br>',
|
||||
e = $('<a href="#" data-pk="1" data-type="text" data-name="text1">0</a>').appendTo('#qunit-fixture').editable({
|
||||
display: function(value, response) {
|
||||
$(this).html(c == 0 ? html : html_br);
|
||||
}
|
||||
});
|
||||
|
||||
equal(e.html(), html, 'html ok');
|
||||
|
||||
c = 1;
|
||||
e.click()
|
||||
var p = tip(e);
|
||||
p.find('input').val(1);
|
||||
p.find('form').submit();
|
||||
|
||||
equal(e.html(), $.fn.editable.defaults.emptytext, 'html br --> emptytext ok');
|
||||
});
|
||||
|
||||
test("password", function () {
|
||||
var v = '123', v1 = '456';
|
||||
|
Reference in New Issue
Block a user