From 5213200768898e4b8322beb079810f8bc05f44c3 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Tue, 24 Jun 2014 17:59:00 +0200 Subject: [PATCH] Fixed issue #08028: File upload dialog function can be updated Dev: Add openUploadModalDialog js function, only when doc ready Dev: Fix the dialog width and heigth according to windows actual width and heigth Dev: Quick fix: all system must be rewrite without a iframe --- scripts/modaldialog.js | 113 +++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/scripts/modaldialog.js b/scripts/modaldialog.js index 819cad1c34c..6235cb212e6 100644 --- a/scripts/modaldialog.js +++ b/scripts/modaldialog.js @@ -1,63 +1,66 @@ -$(document).ready(function() { - // $('#basic').hide(); - // var jsonstring = $('#".$ia[1]."').val(); - // var filecount = $('#".$ia[1]."_filecount').val(); - // displayUploadedFiles(jsonstring, filecount, fieldname, show_title, show_comment, pos); - - $(function() { - $('.upload').click(function(e) { - e.preventDefault(); - var $this = $(this); - - var show_title = getQueryVariable('show_title', this.href); - var show_comment = getQueryVariable('show_comment', this.href); - var pos = getQueryVariable('pos', this.href); - var fieldname = getQueryVariable('fieldname', this.href); - var buttonsOpts = {}; - buttonsOpts[translt.returnTxt] = function() { - $(this).dialog("close"); - }; +$(function() { + openUploadModalDialog(); +}); - var horizontalPadding = 30; - var verticalPadding = 20; - $('#uploader').dialog('destroy').remove(); // destroy the old modal dialog - $('