aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_profile_photo.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-25 19:25:00 -0800
committerzotlabs <mike@macgirvin.com>2018-02-25 19:25:00 -0800
commit04ec35d9cc39cbf62c8db2818574c1f6d56f2a20 (patch)
tree1bdd2e6ac197395ca2c38e59a57dd9c37606263c /view/js/mod_profile_photo.js
parentd406e2aae20f20a7df6fc77d9317323de043c0f6 (diff)
downloadvolse-hubzilla-04ec35d9cc39cbf62c8db2818574c1f6d56f2a20.tar.gz
volse-hubzilla-04ec35d9cc39cbf62c8db2818574c1f6d56f2a20.tar.bz2
volse-hubzilla-04ec35d9cc39cbf62c8db2818574c1f6d56f2a20.zip
hubzilla issue #979 - alter image selection widget to accept/submit on choose (jot, wiki, cover_photo, profile_photo)
Diffstat (limited to 'view/js/mod_profile_photo.js')
-rw-r--r--view/js/mod_profile_photo.js23
1 files changed, 10 insertions, 13 deletions
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']);
}