Skip to content
Snippets Groups Projects
Commit 81aedff9 authored by gloas's avatar gloas
Browse files

Popup: setup width and height valeurs par defaut

parent 4b4a31ef
Branches
Tags
No related merge requests found
var popupDialog = null;
function opacShowModal(url, width, height, returnFunc, showCloseBox, titleDialog) {
var modal_size = initModalSize(width, height);
popupDialog = $('<iframe src="'+url+'" style="min-width:95%"></div>')
.dialog({width: width, height: height, close: returnFunc, modal:true, title: titleDialog});
.dialog({width: modal_size['width'], height: modal_size['height'], close: returnFunc, modal:true, title: titleDialog});
}
function opacHideModal() {
$(popupDialog).dialog('close');
}
function opacShowModalConnection(data, returnFunc) {
opacShowModal(data['redirect'], 500, 345, returnFunc);
function opacShowModalConnection(data, returnFunc ,width ,height ) {
var modal_size = initModalSize(width, height);
opacShowModal(data['redirect'],modal_size['width'] , modal_size['height'], returnFunc);
}
function opacDialog(container, data, dialogClass, closeFunc, openFunc) {
function opacDialog(container, data, dialogClass, closeFunc, openFunc, width, height) {
var modal_size = initModalSize(width, height);
var titre = container.html(data['title']).html();
var modal = container.html(data['content']).dialog({
width:500,
width:modal_size['width'],
height:modal_size['height'],
modal:true,
title: titre,
dialogClass: dialogClass,
......@@ -24,3 +28,11 @@ function opacDialog(container, data, dialogClass, closeFunc, openFunc) {
});
return modal;
}
function initModalSize(width, height) {
var common_width = '500';
var common_height = '300';
var size = {'width' : width || common_width,
'height' : height || common_height };
return size;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment