mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
wip: js modularization of lightbox and cleanup
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user