Ignore:
Timestamp:
Aug 27, 2010, 2:55:56 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #738: Implement file upload as a pure servlet

It is not the file upload itself that is the real problem, it is the fact that the upload is sent to a hidden frame and that it is difficult to handle errors (eg. show them to the user). The new solution is to simply let the error be generated in the hidden frame and then use a javascript callback in the parent window to re-size the frames so that the upload-frame becomes visible instead.

I have also got rid of the non-ajax version of progress reporter since this could also cause problems. The progress reporting is no longer responsible for any error handling (since it is possible for an error to happen before the progress reporting infrastructure has been setup).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/exception/duplicate_wizard.jsp

    r4510 r5395  
    4848%>
    4949<base:page type="default" menu="exception" title="Another plug-in wizard is active">
    50 <base:head>
     50<base:head scripts="exception.js">
    5151  <script language="JavaScript">
    52   function fixWindow()
    53   {
    54     if (window.opener != null)
    55     {
    56       // popup window --> Hide menubar
    57       Main.hide('menubar');
    58       var width = Main.getWindowWidth();
    59       var height = Main.getWindowHeight();
    60       if (height < 400) height = 400;
    61       if (width < 600) width = 600; // >
    62       window.resizeTo(width, height);
    63     }
    64     else
    65     {
    66       // Hide close button
    67       Main.hide('close');
    68       // If inside a second frameset, hide menubar
    69       if (window.parent != window.top)
    70       {
    71         Main.hide('menubar');
    72       }
    73     }
    74   }
    7552  function goNext()
    7653  {
     
    8259  </script>
    8360</base:head>
    84 <base:body onload="fixWindow()">
     61<base:body onload="Exception.fixWindow(false)">
    8562
    8663  <div align="center">
     
    9370  <tr>
    9471    <td id="next" width="50%"><base:button onclick="goNext();" title="Continue" image="gonext.gif" /></td>
    95     <td id="close" width="50%"><base:button onclick="window.close();" title="Cancel" /></td>
     72    <td id="close" width="50%"><base:button onclick="window.top.close();" title="Cancel" /></td>
    9673  </tr>
    9774  </table>
Note: See TracChangeset for help on using the changeset viewer.