Fix for Bug 2015 ("subscription-renew button is disabled"), other markup corrections...
authorOwen Leonard <oleonard@myacpl.org>
Fri, 18 Apr 2008 20:04:31 +0000 (15:04 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 22 Apr 2008 22:39:44 +0000 (17:39 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc [deleted file]
koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tmpl

index f7d6dc8..9ed1a6d 100644 (file)
@@ -35,7 +35,6 @@
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/<!-- TMPL_VAR NAME="widget" -->"></script>
 <!-- /TMPL_LOOP -->
 <!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="popup" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/intranet2popup.css" /><!-- /TMPL_IF -->
 <!-- TMPL_IF NAME="login" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/login.css" /><!-- /TMPL_IF -->
 <!-- TMPL_IF NAME="wizard" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/wizard.css" />
 <!-- /TMPL_IF -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc
deleted file mode 100644 (file)
index 6a5c864..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Popup</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/css/staff.css" />
-
-</head>
-
-<body>
-<!-- NO MENUS for popup-top -->
index e79c518..cb0ae5e 100644 (file)
@@ -4,6 +4,10 @@
        // prepare DOM for YUI Toolbar
 
         $(document).ready(function() {
+           $("#editmenuc").empty();
+           $("#duplicate").parent().remove();
+               $("#delete").parent().remove();
+               $("#renewc").empty();
            yuiToolbar();
         });
 
 
        function yuiToolbar() {
        
+    <!-- TMPL_IF NAME="subscriptionid" -->
+           var editmenu = [
+               { text: _("Edit Record"),  <!-- TMPL_IF NAME="cannotedit" -->disabled: true, <!-- /TMPL_IF --> url: "/cgi-bin/koha/serials/subscription-add.pl?op=mod&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" },
+               { text: _("Edit as New (Duplicate)"), <!-- TMPL_IF NAME="cannotedit" -->disabled: true, <!-- /TMPL_IF --> url: "/cgi-bin/koha/serials/subscription-add.pl?op=dup&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" },
+                       { text: _("Delete Record"), <!-- TMPL_IF NAME="cannotedit" -->disabled: true, <!-- /TMPL_IF --> onclick: {fn: confirm_deletion }}
+           ];
+        <!-- /TMPL_IF -->
            new YAHOO.widget.Button("newsubscription");
-           <!-- TMPL_IF NAME="subscriptionid" -->
-               new YAHOO.widget.Button("edit");
-               new YAHOO.widget.Button("duplicate");
+           <!-- TMPL_IF NAME="subscriptionid" -->              
+               new YAHOO.widget.Button({
+              id: "renew", 
+              type: "link", 
+                         href: "#",
+              label: _("Renew"), 
+              container: "renewc",
+onclick: {fn:function(){popup(<!--TMPL_VAR Name="subscriptionid"-->)}}
+          });
+       <!-- TMPL_IF NAME="subscriptionid" -->    
+       new YAHOO.widget.Button({
+               type: "menu",
+               label: _("Edit"),
+               name: "editmenubutton",
+               menu: editmenu,
+               container: "editmenuc",
+                       
+           });
+               <!-- /TMPL_IF -->
            new YAHOO.widget.Button("renew");
            new YAHOO.widget.Button("receive");
-           new YAHOO.widget.Button("delete");
                <!-- /TMPL_IF -->
        }
 
        <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl">New Subscription</a></li>
     <!-- TMPL_IF NAME="subscriptionid" -->
         <!-- TMPL_UNLESS name="cannotedit" -->
-            <li><a id="edit" href="subscription-add.pl?op=mod&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Edit</a></li>
+            <li id="editmenuc"><a id="edit" href="/cgi-bin/koha/serials/subscription-add.pl?op=mod&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Edit</a></li>
         <!-- /TMPL_UNLESS -->
-        <li><a id="duplicate" href="subscription-add.pl?op=dup&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Duplicate </a></li>
+        <li><a id="duplicate" href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Duplicate </a></li>
         <!-- TMPL_UNLESS name="cannotedit" -->
-            <li><a id="renew" href="#" onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew </a></li>
-            <li><a id="receive" href="serials-edit.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&amp;serstatus=1,3">Receive</a></li>
+            <li id="renewc"><a id="renew" href="#" onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew </a></li>
+            <li><a id="receive" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&amp;serstatus=1,3">Receive</a></li>
             <li><a id="delete" href="javascript:confirm_deletion()">Delete</a></li>
         <!-- /TMPL_UNLESS -->
     <!-- /TMPL_IF -->
index 8c080c3..5cb7fb5 100644 (file)
@@ -853,7 +853,7 @@ window.onload = irregular_order();
         <li>
             <label for="branchcode">Library</label>
             
-                <select name="branchcode" id="branchcode">
+                <select name="branchcode" id="branchcode" style="width: 20em;">
                     <!-- TMPL_UNLESS NAME="Independantbranches" --><option value="">Any branch</option><!-- /TMPL_UNLESS -->
                     <!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
                                <!-- TMPL_ELSE -->
@@ -1178,7 +1178,8 @@ window.onload = irregular_order();
     </ol>
        </fieldset>
 </div>
-    <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
+       <fieldset class="action">
+    <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" /></fieldset>
 </div>
 
 </form>
index df83ea7..ebbb4fd 100644 (file)
@@ -86,7 +86,7 @@ function confirm_deletion() {
     }
 }
 function popup(subscriptionid) {
-    newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
+    newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes');
 }
 
 -->
index 1155e15..faa6e04 100644 (file)
@@ -1,9 +1,13 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <title>Koha &rsaquo; Serials Subscription renew #<!-- TMPL_VAR name="subscriptionid" --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<style type="text/css">
+   #custom-doc { width:39.85em;*width:38.86em;min-width:531px; margin:auto; text-align:left; }
+   </style>
 </head>
 <body>
 
+<div id="custom-doc" class="yui-t7">
 <!--TMPL_IF Name="renew"-->
   Subscription renewed.
   
   //]]>
 </script>
 <!--TMPL_ELSE-->
-
-<h1>Subscription renewal for <!-- TMPL_VAR name="bibliotitle" --></h1>
-
+      <div id="bd">
 <form name="f" action="/cgi-bin/koha/serials/subscription-renew.pl" method="post">
                <input type="hidden" name="op" value="renew" />
                <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
-               <p><label for="startdate">Start date</label><input type="text" id="startdate" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" /></p>
-               <p>Subscription length :</p>
-               <p><label for="numberlength">Number of num</label><input type="text" id="numberlength" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->" /></p>
-               <p><label for="weeklength">Number of weeks</label><input type="text" id="weeklength" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->" /></p>
-               <p><label for="monthlength">Number of months</label><input type="text" id="monthlength" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->" /></p>
-               <p><label for="note">Note for the librarian that will manage your renewal request</label></p>
-               <p><textarea name="note" id="note" rows="5" cols="50"></textarea></p>
-               <input type="submit" value="Request a renewal" class="button" />
+               <fieldset class="rows"><legend>Subscription renewal for <!-- TMPL_VAR name="bibliotitle" --></legend>
+               <ol><li><label for="startdate">Start date: </label><input type="text" id="startdate" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" /></li>
+               <li><fieldset>
+               <legend>Subscription length:</legend>
+               <ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->" /></li>
+               <li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->" /></li>
+               <li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->" /></li></ol></fieldset></li>
+               <li><label for="note">Note for the librarian that will manage your renewal request: </label>
+               <textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset>
+               <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
 </form>
-
+</div>
 <!-- /TMPL_IF -->
 
-<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->