diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/acl.js | 4 | ||||
-rw-r--r-- | view/js/mod_cover_photo.js | 23 | ||||
-rw-r--r-- | view/js/mod_profile_photo.js | 23 |
3 files changed, 22 insertions, 28 deletions
diff --git a/view/js/acl.js b/view/js/acl.js index c8f7c7180..a5fae19bc 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -173,7 +173,7 @@ ACL.prototype.on_custom = function(event) { that.deny_cid = []; that.deny_gid = []; - datasrc2src('#acl-list-content .acl-list-item img[data-src]'); + datasrc2src('#acl-list-content .list-group-item img[data-src]'); that.update_view('custom'); that.on_submit(); @@ -399,7 +399,7 @@ ACL.prototype.get = function(start, count, search) { ACL.prototype.populate = function(data) { $(data.items).each(function(){ - html = "<div class='acl-list-item {4} {7} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>"; + html = "<div class='list-group-item clearfix acl-list-item {4} {7} {5}' id='{2}{3}'>"+that.item_tpl+"</div>"; html = html.format(this.photo, this.name, this.type, this.xid, '', this.self, this.link, this.taggable); if (this.uids !== undefined) { that.group_uids[this.xid] = this.uids; diff --git a/view/js/mod_cover_photo.js b/view/js/mod_cover_photo.js index b9af8ce5c..5b64b8b91 100644 --- a/view/js/mod_cover_photo.js +++ b/view/js/mod_cover_photo.js @@ -27,13 +27,7 @@ if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); + var href = $(imageparent).attr('href'); $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { @@ -42,13 +36,16 @@ window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); } return false; - }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } diff --git a/view/js/mod_profile_photo.js b/view/js/mod_profile_photo.js index 832da764b..c05c8e25e 100644 --- a/view/js/mod_profile_photo.js +++ b/view/js/mod_profile_photo.js @@ -27,13 +27,7 @@ if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); + var href = $(imageparent).attr('href'); $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { @@ -44,13 +38,16 @@ window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); } return false; - }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } |