[Koha-patches] [PATCH] Fix for Bug 2015 ("subscription-renew button is disabled"), other markup corrections; Removing unused popup css declaration from doc-head-close; removing unused popup include file.

Owen Leonard oleonard at myacpl.org
Fri Apr 18 22:04:31 CEST 2008


---
 .../prog/en/includes/doc-head-close.inc            |    1 -
 .../intranet-tmpl/prog/en/includes/popup-top.inc   |   13 ------
 .../prog/en/includes/serials-toolbar.inc           |   42 ++++++++++++++++----
 .../prog/en/modules/serials/subscription-add.tmpl  |    5 +-
 .../en/modules/serials/subscription-detail.tmpl    |    2 +-
 .../en/modules/serials/subscription-renew.tmpl     |   30 ++++++++------
 6 files changed, 55 insertions(+), 38 deletions(-)
 delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
index f7d6dc8..9ed1a6d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
@@ -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
index 6a5c864..0000000
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc
+++ /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 -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
index e79c518..cb0ae5e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
@@ -4,6 +4,10 @@
 	// prepare DOM for YUI Toolbar
 
 	 $(document).ready(function() {
+	    $("#editmenuc").empty();
+	    $("#duplicate").parent().remove();
+		$("#delete").parent().remove();
+	 	$("#renewc").empty();
 	    yuiToolbar();
 	 });
 
@@ -11,13 +15,35 @@
 
 	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 -->
 	}
 
@@ -27,12 +53,12 @@
 	<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 -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
index 5c7198f..62628e1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
@@ -844,7 +844,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 -->
@@ -1169,7 +1169,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>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl
index 0950afd..9501cbb 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl
@@ -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');
 }
 
 -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tmpl
index 1155e15..faa6e04 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tmpl
@@ -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.
   
@@ -14,23 +18,23 @@
   //]]>
 </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" -->
 
-- 
1.5.2.1




More information about the Koha-patches mailing list