Changeset 154

Show
Ignore:
Timestamp:
31-05-11 12:06:41 (3 years ago)
Author:
tjeerd@…
Message:

#42 is closed by this commit

Location:
nugoctdwebapp/web
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • nugoctdwebapp/web/index.jsp

    r141 r154  
    2626        <script type="text/javascript" src="./scripts/swfobject.js"></script> 
    2727        <script type="text/javascript" src="./scripts/jquery.uploadify.v2.1.4.min.js"></script> 
     28        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> 
     29        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> 
    2830    </head> 
    2931    <jsp:useBean id="login" scope="session" class="ctd.services.loginGSCF"/> 
  • nugoctdwebapp/web/scripts/uploadscripts.js

    r153 r154  
    1515        $('#spanstep1').html("<b>No Flash plugin found</b><br/>Your browser needs to support Flash in order to be able to use this upload."); 
    1616    } else { 
     17        loaddiag(); 
    1718        $('#spanstep1').html("<input type='file' id='file_upload' name='file_upload' />"); 
    1819        $('#file_upload').uploadify({ 
     
    4445} 
    4546 
    46 function showdiag() { 
    47   launchWindow("#dialog"); 
    48 } 
    49  
    50 function closediag() { 
    51     $('#mask').hide(); 
    52     $('.window').hide(); 
     47function loaddiag() { 
     48    $("#dialog").dialog({ 
     49      autoOpen: false, 
     50      open: function(event, ui) { 
     51          $(this).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide(); 
     52      }, 
     53      closeOnEscape: false, 
     54      draggable: false, 
     55      modal: true, 
     56      resizable: false 
     57    }); 
    5358} 
    5459 
     
    230235    document.getElementById("submitdata").disabled = true; 
    231236    document.getElementById("correct").disabled = true; 
    232     centerPopup(); 
    233     loadPopup(); 
     237    $("#dialog").dialog('open') 
    234238    $("#spanstep1").html('File uploaded: <i>'+document.getElementById("filename").innerHTML+'</i>'); 
    235239 
     
    255259      context: document.body, 
    256260      success: function(data){ 
    257         $("#diagprocessing").html("<b>Finished</b><br />Your data has been processed, normalized and stored.<br /><a href='#' onClick='closePopup()'>Ok</a>") 
     261        $("#dialog").dialog( "option", "title", 'Finished' ); 
     262        $("#dialog").html("Your data has been processed, normalized and stored."); 
     263        $("#dialog").dialog( "option", "buttons", [ 
     264            { 
     265                text: "Ok", 
     266                click: function() { 
     267                    $(this).dialog('close') 
     268                    window.location = "./index.jsp?p=overview"; 
     269                } 
     270            } 
     271        ] ); 
    258272      } 
    259273    }); 
    260274} 
    261  
    262 /* POP UP */ 
    263  
    264 //SETTING UP OUR POPUP 
    265 //0 means disabled; 1 means enabled; 
    266 var popupStatus = 0; 
    267  
    268  
    269 //loading popup with jQuery magic! 
    270 function loadPopup(){ 
    271     //loads popup only if it is disabled 
    272     if(popupStatus==0){ 
    273         $("#mask").css({ 
    274         "opacity": "0.7" 
    275         }); 
    276         $("#mask").fadeIn("slow"); 
    277         $("#diagprocessing").fadeIn("slow"); 
    278         popupStatus = 1; 
    279     } 
    280 } 
    281  
    282 //disabling popup with jQuery magic! 
    283 function closePopup(){ 
    284     //disables popup only if it is enabled 
    285     if(popupStatus==1){ 
    286         $("#mask").fadeOut("slow"); 
    287         $("#diagprocessing").fadeOut("slow"); 
    288         popupStatus = 0; 
    289         window.location = "./index.jsp?p=overview"; 
    290     } 
    291 } 
    292  
    293 //centering popup 
    294 function centerPopup(){ 
    295     //request data for centering 
    296     var windowWidth = document.documentElement.clientWidth; 
    297     var windowHeight = document.documentElement.clientHeight; 
    298     var popupHeight = $("#diagprocessing").height(); 
    299     var popupWidth = $("#diagprocessing").width(); 
    300     //centering 
    301     $("#diagprocessing").css({ 
    302         "position": "absolute", 
    303         "top": windowHeight/2-popupHeight/2, 
    304         "left": windowWidth/2-popupWidth/2 
    305     }); 
    306     //only need force for IE6 
    307  
    308     $("#mask").css({ 
    309      "height": windowHeight 
    310     }); 
    311 } 
  • nugoctdwebapp/web/style.css

    r148 r154  
    189189    font-size: 8pt; 
    190190} 
    191  
    192 /** Wait box **/ 
    193 /* Z-index of #mask must lower than #boxes .window */ 
    194 #mask { 
    195     position:absolute; 
    196     z-index:9000; 
    197     display:none; 
    198     _position:absolute; /* hack for internet explorer 6*/ 
    199     height:100%; 
    200     width:100%; 
    201     top:0; 
    202     left:0; 
    203     background:#000000; 
    204     border:1px solid #cecece; 
    205     z-index:1; 
    206 } 
    207  
    208 #boxes .window { 
    209     position:absolute; 
    210     width:440px; 
    211     height:200px; 
    212     display:none; 
    213     z-index:9999; 
    214     padding:20px; 
    215 } 
    216  
    217  
    218 /* Customize your modal window here, you can add background image too */ 
    219 #boxes #diagprocessing { 
    220     background-color: #FFF; 
    221     width:375px; 
    222     height:203px; 
    223     border-width: 1px; 
    224     border-style: double; 
    225 } 
  • nugoctdwebapp/web/upload3.jsp

    r144 r154  
    3333<div id="tempfolder" style="display: none"></div> 
    3434<script type="text/javascript">init_step1();</script> 
    35 <div id="boxes"> 
    36     <div id="diagprocessing" class="window"> 
    37         <b>Your data is being processed</b><br /> 
    38         The time needed for processing depends on the number of files you submitted. If the number of files is smaller than 50, processing should be finished in a couple of minutes.<br /> 
    39         <img src="./images/wait.gif"/> 
    40     </div> 
    41     <div id="mask"></div> 
     35<div id="dialog" style="display: none;" title="Your data is being processed"> 
     36The time needed for processing depends on the number of files you submitted. If the number of files is smaller than 50, processing should be finished in a couple of minutes.<br /> 
     37    <img src="./images/wait.gif"/> 
    4238</div>