wip: js modularization of lightbox and cleanup

This commit is contained in:
Florian BLOUET
2016-02-29 17:31:29 +01:00
parent 203521d991
commit ab368a7dee
21 changed files with 966 additions and 991 deletions

View File

@@ -1,8 +1,23 @@
;
var dialogModule = (function ($) {
var $body = null;
var bodySize = {};
var _dialog = {};
$('document').ready(function(){
$body = $('body');
$(window).on('resize', function () {
bodySize.y = $body.height();
bodySize.x = $body.width();
//@TODO modal resize should be in a stream
$('.overlay').height(bodySize.y).width(bodySize.x);
//_resizeAll();
});
});
function getLevel(level) {
level = parseInt(level);
@@ -79,6 +94,10 @@ var dialogModule = (function ($) {
height = dimension[1];
width = dimension[0];
} else {
bodySize.y = $body.height();
bodySize.x = $body.width();
switch (this.options.size) {
case 'Full':
height = bodySize.y - 30;