RE: kleiner patch "wait while upload "
René Moser <[email protected]>
| Newsgroups | gmane.comp.cms.bitflux.general |
|---|---|
| Message-ID | <[email protected]> |
hi again popup -> trash neu mit layer gem. IRC btw. das Patch-Management von meinem TortoiseSVN ist beschränkt, deshalb die vielen Patches. v2.0 Patch für /admin/webinc/js/showhidelayers.js (neues File) v2.1 Patch für /themes/standard/admin/addresource.xsl image wie gehabt /themse/standard/admin/images/wait_bar.gif yours -- bitflux-cms mailing list [email protected] http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
wait_while_upload_v2.0.patch
(application/octet-stream, 1.3 KB)
Index: showhidelayers.js
===================================================================
--- showhidelayers.js (revision 0)
+++ showhidelayers.js (revision 0)
@@ -0,0 +1,21 @@
+function MM_reloadPage(init) { //reloads the window if Nav4 resized
+ if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
+ document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
+ else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
+}
+MM_reloadPage(true);
+
+function MM_findObj(n, d) { //v4.0
+ var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
+ d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
+ if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
+ for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
+ if(!x && document.getElementById) x=document.getElementById(n); return x;
+}
+
+function MM_showHideLayers() { //v3.0
+ var i,p,v,obj,args=MM_showHideLayers.arguments;
+ for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
+ if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
+ obj.visibility=v; }
+}
wait_while_upload_v2.1.patch
(application/octet-stream, 2.1 KB)
Index: addresource.xsl
===================================================================
--- addresource.xsl (revision 5998)
+++ addresource.xsl (working copy)
@@ -13,7 +13,8 @@
<html>
<head><title>Add new Resource</title>
<link rel="stylesheet" type="text/css" href="{$webroot}/themes/standard/admin/css/formedit.css"/>
- <script type="text/javascript" src="{$webroot}admin/webinc/js/adminfields.js"/>
+ <script type="text/javascript" src="{$webroot}admin/webinc/js/adminfields.js"/>
+ <script type="text/javascript" src="{$webroot}admin/webinc/js/showhidelayers.js"/>
</head>
<body>
<xsl:apply-templates/>
@@ -23,12 +24,18 @@
<xsl:template match="plugin[@name='admin_addresource'] |plugin[@name='admin_siteoptions']">
- <form name="adminform" action="" method="POST" enctype="multipart/form-data">
+ <form name="adminform" action="" method="POST" enctype="multipart/form-data" onsubmit="MM_showHideLayers('wait_layer','','show');">
<xsl:apply-templates select="/bx/plugin/fields/field"/>
<p>
- <input accesskey="s" type="submit" name="send" value="send"/>
+ <input accesskey="s" type="submit" name="send" value="send" onclick="this.disabled;this.value='wait...';"/>
</p>
</form>
+ <div id="wait_layer" style="text-align:center; border:#000000 solid 1px; position:absolute; width:300px; height:115px; z-index:1; left: 200px; top: 200px; visibility: hidden">
+ <h3>Upload in progress</h3>
+ <p><img src="/themes/standard/admin/images/wait_bar.gif" /><br />
+ File is uploading, please wait. This window will be closed after upload.<br />
+ </p>
+ </div>
</xsl:template>
Index: images/wait_bar.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: images\wait_bar.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
wait_bar.gif
(image/gif, 1.2 KB) - not displayed