Changeset 6309
- Timestamp:
- Aug 21, 2013, 1:42:30 PM (9 years ago)
- Location:
- trunk/www
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/exception/duplicate_wizard.jsp
r6136 r6309 48 48 %> 49 49 <base:page type="popup" menu="exception" title="Another plug-in wizard is active"> 50 <base:head scripts="exception.js"> 51 <script> 52 function goNext() 53 { 54 if (confirm('Are you sure? Unsaved settings in the other wizard will be lost.')) 55 { 56 location.replace(location.href + '&warnIfOpen=0'); 57 } 58 } 59 </script> 60 </base:head> 61 <base:body onload="Exception.fixWindow(false)"> 50 <base:head scripts="exception.js" /> 51 <base:body> 62 52 63 53 <h1>Another plug-in configuration wizard is open</h1> … … 72 62 73 63 <base:buttongroup subclass="dialogbuttons"> 74 <base:button onclick="goNext();" title="Continue" image="gonext.png" />75 <base:button onclick="window.top.close();" title="Cancel" />64 <base:button id="continuePluginWizard" title="Continue" image="gonext.png" /> 65 <base:button id="close" title="Cancel" /> 76 66 </base:buttongroup> 77 67 -
trunk/www/exception/exception.jsp
r6139 r6309 111 111 <base:page type="default" menu="exception" title="Unexpected error"> 112 112 <base:head scripts="exception.js" styles="popup.css" /> 113 <base:body onload="Exception.fixWindow(true)">113 <base:body data-resize-if-popup="1"> 114 114 <h1><%=exceptionClassName + " on page "+request.getAttribute("javax.servlet.error.request_uri")%></h1> 115 115 116 <div class="content bottomborder" style="bottom: 3em;"> 116 117 <table class="fullform outlined topborder"> … … 197 198 } 198 199 %> 199 <span id="more_detail"> 200 <base:icon image="gonext.png" /> 201 <a href="javascript:Main.show('error_detail');Main.hide('more_detail');"><%=st.length-i%> more...</a> 202 </span> 203 200 <base:icon 201 id="showMoreDetails" 202 data-show-id="error_detail" 203 image="gonext.png"><%=st.length-i%> more...</base:icon> 204 204 </td> 205 205 </table> … … 207 207 208 208 <base:buttongroup subclass="dialogbuttons"> 209 <base:button id="goback" onclick="<%="history.go(-1)"%>"title="Back"/>210 <base:button id="close" onclick="<%="window.top.close()"%>"title="Close"/>211 <base:button id="reportbug" onclick="<%="window.open('"+reportbuglink+"','Reportbug')"%>"212 title="Report bug…" image="bug.png"213 visible="<%=HTML.isValidUrl(reportbuglink)%>"/>209 <base:button id="goback" title="Back"/> 210 <base:button id="close" title="Close"/> 211 <base:button id="reportbug" title="Report bug…" image="bug.png" 212 data-report-link="<%=HTML.encodeTags(reportbuglink) %>" 213 visible="<%=HTML.isValidUrl(reportbuglink)%>"/> 214 214 </base:buttongroup> 215 215 -
trunk/www/exception/invalid_data.jsp
r5956 r6309 60 60 <base:page type="default" menu="exception" title="Invalid data"> 61 61 <base:head scripts="exception.js" styles="popup.css"/> 62 <base:body onload="Exception.fixWindow(false)">62 <base:body> 63 63 <h1><%=exceptionClassName + " on page "+request.getAttribute("javax.servlet.error.request_uri")%></h1> 64 64 … … 70 70 71 71 <base:buttongroup subclass="dialogbuttons"> 72 <base:button onclick="history.go(-1);" title="Back" />73 <base:button onclick="window.top.close();" title="Close" />72 <base:button id="goback" title="Back" /> 73 <base:button id="close" title="Close" /> 74 74 </base:buttongroup> 75 75 -
trunk/www/exception/not_logged_in.jsp
r6167 r6309 51 51 final String redirect = Values.getString((String)request.getAttribute("redirect")); 52 52 %> 53 <base:page type="default" menu="exception" title=" ">53 <base:page type="default" menu="exception" title="Not logged in"> 54 54 <base:head scripts="exception.js,/login.js" styles="login.css" /> 55 <base:body >55 <base:body data-resize-if-popup="1"> 56 56 57 57 <form action="<%=root%>login.jsp?again=1" method="post" name="login" target="Login"> -
trunk/www/exception/permission_denied.jsp
r5956 r6309 61 61 <base:page type="default" menu="exception" title="Permission denied"> 62 62 <base:head scripts="exception.js" styles="popup.css"/> 63 <base:body onload="Exception.fixWindow(false)">63 <base:body> 64 64 <h1><%=exceptionClassName + " on page "+request.getAttribute("javax.servlet.error.request_uri")%></h1> 65 65 … … 71 71 72 72 <base:buttongroup subclass="dialogbuttons"> 73 <base:button onclick="history.go(-1);" title="Back" />74 <base:button onclick="window.top.close();" title="Close" />73 <base:button id="goback" title="Back" /> 74 <base:button id="close" title="Close" /> 75 75 </base:buttongroup> 76 76 -
trunk/www/exception/web.jsp
r6021 r6309 52 52 <base:page type="<%=ex.getPageType()%>" menu="auto" title="<%=ex.getTitle()%>"> 53 53 <base:head scripts="exception.js" /> 54 <base:body onload="Exception.fixWindow(false)">54 <base:body> 55 55 56 56 <h1><%=ex.getTitle()%></h1> … … 64 64 </td></tr> 65 65 </table> 66 67 66 </div> 68 67 69 68 <base:buttongroup subclass="dialogbuttons"> 70 <base:button id="goback" onclick="history.go(-1);"title="Back" />71 <base:button id="close" onclick="window.top.close();"title="Close" />69 <base:button id="goback" title="Back" /> 70 <base:button id="close" title="Close" /> 72 71 </base:buttongroup> 73 72 -
trunk/www/filemanager/upload/index.jsp
r6308 r6309 153 153 %> 154 154 <base:page type="popup" title="<%=title%>" id="select-file"> 155 <base:head scripts="~upload.js" styles="progressbar.css"> 156 <script> 157 // Callback that shows the upload-frame in case of an error 158 function exceptionHandlerCallback(windowName) 159 { 160 if (windowName == 'upload') 161 { 162 Main.show('uploadForm'); 163 Main.hide('progressForm'); 164 } 165 } 166 </script> 167 </base:head> 168 <base:body> 155 <base:head scripts="~upload.js" styles="progressbar.css" /> 156 <base:body data-notify-on-error="1"> 169 157 <div id="selectForm" class="absolutefull"> 170 158 <h1><%=title%> <base:help helpid="file.upload"/></h1> -
trunk/www/filemanager/upload/upload.js
r6308 r6309 46 46 // File 47 47 Events.addEventHandler('the_file', 'change', upload.fileOnChange); 48 49 // Error handling 50 Events.addEventHandler(document.body, 'base-notify', upload.onUploadError); 48 51 } 49 52 else if (pageId == 'upload-results') … … 258 261 } 259 262 } 263 264 upload.onUploadError = function(event) 265 { 266 if (event.detail.errorWindow == 'upload') 267 { 268 Main.show('uploadForm'); 269 Main.hide('progressForm'); 270 } 271 } 260 272 261 273 return upload; -
trunk/www/include/scripts/exception.js
r5940 r6309 25 25 @version 2.16 26 26 */ 27 var Exception = new ExceptionClass(); 27 var Exception = function() 28 { 29 var exception = {}; 30 31 exception.initPage = function() 32 { 33 var resizeIfPopup = Data.int(document.body, 'resize-if-popup', 0); 28 34 29 function ExceptionClass() 30 { 31 /* 32 Fix the error window by hiding some elements that shouldn't be visisible at 33 all times, resize the window, re-display the error message, etc... 35 exception.fixWindow(resizeIfPopup); 36 37 Buttons.addClickHandler('close', App.closeWindow); 38 Buttons.addClickHandler('goback', exception.goBack); 39 Buttons.addClickHandler('reportbug', exception.reportBug); 40 Buttons.addClickHandler('showMoreDetails', exception.showMoreDetails); 41 Buttons.addClickHandler('continuePluginWizard', exception.continuePluginWizard); 42 } 34 43 35 @param resizeIfPopup If set, and the window is a popup window, it is resized to 36 at least 800x600 37 */ 38 ExceptionClass.prototype.fixWindow = function(resizeIfPopup) 44 exception.fixWindow = function(resizeIfPopup) 39 45 { 40 46 var topWindow = window.top; 41 47 var isPopup = topWindow.opener != null; 42 43 if (history.length <= 1) // > 48 if (history.length <= 1) 44 49 { 45 50 Main.hide('goback'); … … 52 57 if (resizeIfPopup) 53 58 { 54 var width = Main.getWindowWidth(topWindow);55 var height = Main.getWindowHeight(topWindow);56 if (height < 600) height = 600;57 if (width < 800) width = 800;58 topWindow.resizeTo(width, height);59 var pos = App.getWindowPosition(topWindow); 60 if (pos.height < 600 || pos.width < 800) 61 { 62 topWindow.resizeTo(Math.max(800, pos.width), Math.max(600, pos.height)); 63 } 59 64 } 60 65 } … … 69 74 } 70 75 } 71 if (topWindow.exceptionHandlerCallback) 76 77 var notify = Data.get(topWindow.document.body, 'notify-on-error'); 78 if (notify) 72 79 { 73 topWindow.exceptionHandlerCallback(window.name); 80 Events.sendCustomEvent(topWindow.document.body, 'base-notify', {'errorWindow': window.name}); 81 } 82 /* 83 alert(notify); 84 if (topWindow != window) 85 { 86 alert(topWindow.exceptionHandlerCallback); 87 if (topWindow.exceptionHandlerCallback) 88 { 89 topWindow.exceptionHandlerCallback(window.name); 90 } 91 } 92 */ 93 } 94 95 exception.goBack = function() 96 { 97 history.go(-1); 98 } 99 100 exception.reportBug = function(event) 101 { 102 var reportLink = Data.get(event.currentTarget, 'report-link'); 103 if (reportLink) window.open(reportLink, 'ReportBug'); 104 } 105 106 exception.showMoreDetails = function(event) 107 { 108 var id = Data.get(event.currentTarget, 'show-id'); 109 Main.show(id); 110 Main.hide(event.currentTarget.id); 111 } 112 113 exception.continuePluginWizard = function() 114 { 115 if (confirm('Are you sure? Unsaved settings in the other wizard will be lost.')) 116 { 117 location.replace(location.href + '&warnIfOpen=0'); 74 118 } 75 119 } 76 120 77 } 121 122 return exception; 123 }(); 78 124 125 Doc.onLoad(Exception.initPage); 126
Note: See TracChangeset
for help on using the changeset viewer.