diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-26 10:42:13 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-26 10:42:13 +0100 |
commit | 4781a8cb6bbd6d0e379b404c455844ddbc7e2812 (patch) | |
tree | edf2dbb22428c90b3f3ec5875e95edc3334e3db7 /view/js | |
parent | a38c8cc75c67b240140cb815e66393d9c6daba09 (diff) | |
parent | d2ed3a9abbb5c68d1a02eae629bc103aa43a1263 (diff) | |
download | volse-hubzilla-4781a8cb6bbd6d0e379b404c455844ddbc7e2812.tar.gz volse-hubzilla-4781a8cb6bbd6d0e379b404c455844ddbc7e2812.tar.bz2 volse-hubzilla-4781a8cb6bbd6d0e379b404c455844ddbc7e2812.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/mod_cover_photo.js | 23 | ||||
-rw-r--r-- | view/js/mod_profile_photo.js | 23 |
2 files changed, 20 insertions, 26 deletions
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']); } |