Adding "Loading" overlay for addbiblio and add authority pages. Adding YUI button...
authorOwen Leonard <oleonard@myacpl.org>
Wed, 7 Nov 2007 21:46:28 +0000 (15:46 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 8 Nov 2007 23:53:19 +0000 (17:53 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
koha-tmpl/intranet-tmpl/prog/img/loading.gif [new file with mode: 0644]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
new file mode 100644 (file)
index 0000000..19f5679
--- /dev/null
@@ -0,0 +1,52 @@
+       #addbibliotabs { margin-top : 1em; }
+       a.buttonPlus {
+               font-weight : bold;
+               text-decoration : none;
+       }
+       a.expandfield {
+               color : #000;
+               text-decoration : none;
+       }
+#loading {
+       height: 100%;
+       width: 100%;
+       background-color: #000;
+       position: fixed;
+       left: 0pt;
+       top: 0pt;
+       z-index: 2999;
+       opacity: 0.5;
+}
+
+*html #loading {
+       position : absolute;
+       top : 971px;
+       filter : alpha(opactity=50);
+}
+
+.loading {
+               background : #EEE url("../../img/loading.gif") no-repeat 17px center;
+               border : 2px outset #CCC;
+               color : #000;
+               font-size : 174%;
+               height : 70px;
+               line-height : 70px;
+               left:50%;
+               margin-left:-100px;
+               opacity : 1;
+               padding:12px;
+               padding-left : 20;
+               position:fixed;
+               text-align : center;
+               top:17%;
+               width:200px;
+               z-index: 3000;
+       }
+       * html .loading {
+     position: absolute;
+     top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
+}
+       #authoritytabs {
+               margin-top : 1em;
+               margin-bottom : 1em;
+       }
\ No newline at end of file
index 74c14a5..fb487cd 100644 (file)
@@ -7,6 +7,10 @@
 
         $(document).ready(function() {
                $('#authoritytabs').tabs();
+               $("#loading,.loading").hide();
+               $("#f").submit(function(){
+                       return $(this).Check();
+               });
         });
 
 /**
@@ -360,14 +364,14 @@ function searchauthority() {
 }
 //]]>
 </script>
-<style type="text/css">
-       #authoritytabs {
-               margin-top : 1em;
-               margin-bottom : 1em;
-       }
-</style>
+<link rel="stylesheet" href="<!-- TMPL_VAR NAME="themelang" -->/css/addbiblio.css" />
 </head>
 <body>
+<script type="text/javascript">
+//<![CDATA[
+          document.write("<div id=\"loading\"></div><div class=\"loading\">Loading...</div>");
+//]]>
+</script>
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a> &rsaquo; <!-- TMPL_IF name="authid" -->Modify authority #<!-- TMPL_VAR NAME="authid" --> (<!-- TMPL_VAR name="authtypetext" -->)<!-- TMPL_ELSE -->Adding authority (<!-- TMPL_VAR name="authtypetext" -->)<!-- /TMPL_IF -->  </div>
@@ -390,13 +394,33 @@ function searchauthority() {
     <input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
     <input type="hidden" name="authid" value="<!-- TMPL_VAR NAME="authid" -->" />
 
-    <div id="action">
-<!-- TMPL_IF name="authid" -->
-    <input type="button" value="Save" onclick="Check(this.form)" accesskey="w" />
-<!-- TMPL_ELSE -->
-    <input type="button" value="Add" onclick="Check(this.form)" accesskey="w" />
-<!-- /TMPL_IF -->
-    </div>
+       <div id="toolbar">
+       <script type="text/javascript">
+       //<![CDATA[
+       // prepare DOM for YUI Toolbar
+        $(document).ready(function() {
+           yuiToolbar();
+           $("#addauthc,#action").empty();
+        });
+       // YUI Toolbar Functions
+       function yuiToolbar() {
+       var addauthButton = new YAHOO.widget.Button({
+                                            id: "addauth", 
+                                            type: "button", 
+                                            label: "Save", 
+                                            container: "addauthc",
+                                                                                       onclick: {fn: Check }
+                                        });
+       var addauthButton2 = new YAHOO.widget.Button({
+                                            id: "addauth2", 
+                                            type: "button", 
+                                            label: "Save", 
+                                            container: "action",
+                                                                                       onclick: {fn: Check }
+                                        });
+       } //]]>
+       </script>
+       <ul class="toolbar"><li id="addauthc"><input id="addauth" type="submit" value="Save" accesskey="w" /></li></ul></div>
 
 <!-- TMPL_IF name="duplicateauthid" -->
         <div class="problem">
@@ -547,11 +571,7 @@ function searchauthority() {
     <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
 <!-- /TMPL_IF -->
 <div id="action">
-    <!-- TMPL_IF name="authid" -->
-        <input type="button" value="Save" onclick="Check(this.form)" accesskey="w" />
-    <!-- TMPL_ELSE -->
-        <input type="button" value="Add" onclick="Check(this.form)" accesskey="w" />
-    <!-- /TMPL_IF -->
+        <input type="button" id="addauth2" value="Save" onclick="Check(this.form)" accesskey="w" />
 </div>
 </form>
 </fieldset>
index b794567..6ecb9c9 100644 (file)
@@ -7,6 +7,7 @@
 
         $(document).ready(function() {
                $('#addbibliotabs').tabs();
+               $("#loading,.loading").hide();
         });
 
 function confirmnotdup(){
@@ -413,19 +414,14 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
 }
 //]]>
 </script>
-<style type="text/css">
-       #addbibliotabs { margin-top : 1em; }
-       a.buttonPlus {
-               font-weight : bold;
-               text-decoration : none;
-       }
-       a.expandfield {
-               color : #000;
-               text-decoration : none;
-       }
-</style>
+<link rel="stylesheet" href="<!-- TMPL_VAR NAME="themelang" -->/css/addbiblio.css" />
 </head>
 <body>
+<script type="text/javascript">
+//<![CDATA[
+          document.write("<div id=\"loading\"></div><div class=\"loading\">Loading...</div>");
+//]]>
+</script>
 
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 
diff --git a/koha-tmpl/intranet-tmpl/prog/img/loading.gif b/koha-tmpl/intranet-tmpl/prog/img/loading.gif
new file mode 100644 (file)
index 0000000..41708ca
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/loading.gif differ