mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix regression
This commit is contained in:
@@ -737,14 +737,17 @@ print '</form>';
|
||||
print '<script type="text/javascript">
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("#dialogforpopup").dialog(
|
||||
{ closeOnEscape: true, classes: { "ui-dialog": "highlight" },
|
||||
maxHeight: window.innerHeight-60, height: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? 400 : 700).',
|
||||
modal: true,
|
||||
autoOpen: false }).css("z-index: 5000");
|
||||
jQuery("#dialogforpopup").dialog({
|
||||
closeOnEscape: true,
|
||||
classes: { "ui-dialog": "highlight" },
|
||||
maxHeight: window.innerHeight-60,
|
||||
height: window.innerHeight-60,
|
||||
width: '.($conf->browser->layout == 'phone' ? 400 : 700).',
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
}).css("z-index: 5000");
|
||||
|
||||
$("a[rel=show-info]").click(function() {
|
||||
|
||||
console.log("We click on tooltip, we open popup and get content using an ajax call");
|
||||
|
||||
var fk_block = $(this).attr("data-blockid");
|
||||
|
||||
@@ -6198,8 +6198,7 @@ class Form
|
||||
$formconfirm .= "/* Code for the jQuery('#dialogforpopup').dialog() */\n";
|
||||
$formconfirm .= 'jQuery(document).ready(function() {
|
||||
$(function() {
|
||||
$( "#' . $dialogconfirm . '" ).dialog(
|
||||
{
|
||||
$( "#' . $dialogconfirm . '" ).dialog({
|
||||
autoOpen: ' . ($autoOpen ? "true" : "false") . ',';
|
||||
if ($newselectedchoice == 'no') {
|
||||
$formconfirm .= '
|
||||
|
||||
@@ -1054,11 +1054,12 @@ function document_preview(file, type, title)
|
||||
|
||||
if ($.inArray(type, ValidImageTypes) < 0) {
|
||||
/* Not an image */
|
||||
var width = '85%';
|
||||
var object_width = '100%';
|
||||
var height = ($( window ).height() - 60) * 0.90;
|
||||
var object_height = '98%';
|
||||
|
||||
var popupWidth = '85%';
|
||||
var popupHeight = $( window ).height() * 0.90 - 100;
|
||||
|
||||
show_preview('notimage');
|
||||
|
||||
} else {
|
||||
@@ -1076,13 +1077,13 @@ function document_preview(file, type, title)
|
||||
/* Complete title with size of image */
|
||||
title = title + ' (' + object_width + ' x ' + object_height + ')';
|
||||
|
||||
popupWidth = $( window ).width() * 0.9 - 50;
|
||||
popupWidth = $( window ).width() * 0.85 - 50;
|
||||
console.log("object_width="+object_width+" popup window width="+popupWidth);
|
||||
if (object_width < popupWidth) {
|
||||
console.log("Object width is small, we set width of popup according to image width.");
|
||||
popupWidth = object_width + 50
|
||||
}
|
||||
popupHeight = $( window ).height() * 0.85 - 100;
|
||||
popupHeight = $( window ).height() * 0.90 - 100;
|
||||
console.log("object_height="+object_height+" popup window height="+popupHeight);
|
||||
if (object_height < (popupHeight - 100)) {
|
||||
console.log("Object height is small, we set height of popup according to image height.");
|
||||
@@ -1665,6 +1666,7 @@ $(document).ready(function() {
|
||||
|
||||
/**
|
||||
* Function called when an item is moved to a different column
|
||||
*
|
||||
* @param {jQuery} item - The dragged item
|
||||
* @param {jQuery} newColumn - The new column
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user