introduce datasrc2src(selector) js function

This commit is contained in:
Mario Vavti 2018-01-10 11:34:37 +01:00
parent ef7225b4f6
commit d6ff8dc9b6
2 changed files with 8 additions and 5 deletions

View File

@ -173,11 +173,7 @@ ACL.prototype.on_custom = function(event) {
that.deny_cid = [];
that.deny_gid = [];
$("#acl-list-content .acl-list-item img[data-src]").each(function(i, el) {
//Replace data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
$(el).removeAttr("data-src");
});
datasrc2src('#acl-list-content .acl-list-item img[data-src]');
that.update_view('custom');
that.on_submit();

View File

@ -92,6 +92,13 @@ $(document).ready(function() {
});
function datasrc2src(selector) {
$(selector).each(function(i, el) {
$(el).attr("src", $(el).data("src"));
$(el).removeAttr("data-src");
});
}
function confirmDelete() {
return confirm(aStr.delitem);
}