2020-09-27 18:36:33 +02:00
|
|
|
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
|
2017-08-28 14:29:11 +02:00
|
|
|
|
2021-01-22 14:38:44 +01:00
|
|
|
$(document).ready(function () {
|
2023-05-14 01:54:35 +02:00
|
|
|
$("#contact_allow, #contact_deny, #circle_allow, #circle_deny")
|
2021-01-22 14:38:44 +01:00
|
|
|
.change(function () {
|
|
|
|
var selstr;
|
|
|
|
$(
|
2023-05-14 01:54:35 +02:00
|
|
|
"#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected",
|
2021-01-22 14:38:44 +01:00
|
|
|
).each(function () {
|
|
|
|
selstr = $(this).html();
|
|
|
|
$("#jot-perms-icon").removeClass("unlock").addClass("lock");
|
|
|
|
$("#jot-public").hide();
|
|
|
|
});
|
|
|
|
if (selstr == null) {
|
|
|
|
$("#jot-perms-icon").removeClass("lock").addClass("unlock");
|
|
|
|
$("#jot-public").show();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.trigger("change");
|
2017-08-28 14:29:11 +02:00
|
|
|
|
2018-09-05 18:24:04 +02:00
|
|
|
// Click event listener for the album edit link/button.
|
2021-01-22 14:38:44 +01:00
|
|
|
$("body").on("click", "#album-edit-link", function () {
|
2018-09-05 18:24:04 +02:00
|
|
|
var modalUrl = $(this).attr("data-modal-url");
|
2017-08-28 14:29:11 +02:00
|
|
|
|
2018-09-05 18:24:04 +02:00
|
|
|
if (typeof modalUrl !== "undefined") {
|
2021-01-22 14:38:44 +01:00
|
|
|
addToModal(modalUrl, "photo-album-edit-wrapper");
|
2018-09-05 18:24:04 +02:00
|
|
|
}
|
|
|
|
});
|
2019-05-02 01:36:14 +02:00
|
|
|
|
|
|
|
// Click event listener for the album drop link/button.
|
2021-01-22 14:38:44 +01:00
|
|
|
$("body").on("click", "#album-drop-link", function () {
|
2019-05-02 01:36:14 +02:00
|
|
|
var modalUrl = $(this).attr("data-modal-url");
|
|
|
|
|
|
|
|
if (typeof modalUrl !== "undefined") {
|
|
|
|
addToModal(modalUrl);
|
|
|
|
}
|
|
|
|
});
|
2017-08-28 14:29:11 +02:00
|
|
|
});
|
|
|
|
|
2021-01-22 14:38:44 +01:00
|
|
|
$(window).load(function () {
|
2017-08-28 14:29:11 +02:00
|
|
|
// Get picture dimensions
|
|
|
|
var pheight = $("#photo-photo img").height();
|
|
|
|
var pwidth = $("#photo-photo img").width();
|
|
|
|
|
2023-03-22 04:17:29 +01:00
|
|
|
// Append the dimensions of the picture to the css of the photo-photo div
|
2017-08-28 14:29:11 +02:00
|
|
|
// we do this to make it possible to have overlay navigation buttons for the photo
|
|
|
|
$("#photo-photo").css({
|
2021-01-22 14:38:44 +01:00
|
|
|
width: pwidth,
|
|
|
|
height: pheight,
|
2017-08-28 14:29:11 +02:00
|
|
|
});
|
|
|
|
});
|
2020-09-27 18:36:33 +02:00
|
|
|
// @license-end
|