lychee/js/modules/modal.js
Tobias Reich 2abf49ac38 V1.3.1
- Twitter Cards and Open Graph support for shared photos
- Option to set album-password directly after clicking "Make Public"
- Download Album works again
2013-09-08 19:50:31 +02:00

37 lines
699 B
JavaScript

/**
* @name modal.js
* @author Philipp Maurer
* @author Tobias Reich
* @copyright 2013 by Philipp Maurer, Tobias Reich
*
* Modal Module
* Build, show and hide a modal.
*/
modal = {
fns: null,
show: function(title, text, buttons) {
if (!buttons) {
var buttons = [];
buttons[0] = ["", function() {}];
buttons[1] = ["", function() {}];
}
modal.fns = [buttons[0][1], buttons[1][1]];
$("body").append(build.modal(title, text, buttons));
$(".message input").focus();
},
close: function() {
modal.fns = null;
$(".message_overlay").removeClass("fadeIn").css("opacity", 0);
setTimeout(function() { $(".message_overlay").remove() }, 300);
}
}