[29/40] Work on label module general tool bar.
authorChris Nighswonger <cnighswonger@foundations.edu>
Thu, 13 Aug 2009 18:14:03 +0000 (14:14 -0400)
committerChris Nighswonger <cnighswonger@foundations.edu>
Tue, 1 Sep 2009 19:52:56 +0000 (15:52 -0400)
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc [deleted file]
koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tmpl

index 980d765..dc25249 100644 (file)
@@ -5,10 +5,14 @@ a, a:link, a:visited, a:active {
        color : #0000CC;
 }
 
-.yui-button a,.yui-button a:link,.yui-button a:visited {
+.yui-button,.yui-button a:link,.yui-button a:visited {
        color : #000;
 }
 
+a.yuimenuitemlabel {
+        color: #000000;
+}
+
 a:hover {
        color : #669ACC;
 }
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc
deleted file mode 100644 (file)
index 09ce2ed..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<script type="text/javascript">
-    //<![CDATA[
-    // prepare DOM for YUI Toolbar
-     $(document).ready(function() {
-        yuiToolbar();
-     });
-    // YUI Toolbar Functions
-    function yuiToolbar() {
-        new YAHOO.widget.Button("newlabel");
-        new YAHOO.widget.Button("newtemplate");
-        new YAHOO.widget.Button("newprofile");
-        new YAHOO.widget.Button("newlabelbatch");
-        new YAHOO.widget.Button("managelabel");
-        new YAHOO.widget.Button("managetemplate");
-        new YAHOO.widget.Button("manageprofile");
-        new YAHOO.widget.Button("managelabelbatch");
-    }
-//]]>
-</script>
-<div id="toolbar">
-    <ul class="toolbar">
-        <li><a id="newlabel" href="/cgi-bin/koha/labels/label-edit-layout.pl">New Layout</a></li>
-        <li><a id="newtemplate" href="/cgi-bin/koha/labels/label-create-template.pl?op=blank">New Template</a></li>
-        <li><a id="newprofile" href="/cgi-bin/koha/labels/label-create-profile.pl?op=blank">New Profile</a></li>
-        <li><a id="newlabelbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch&amp;type=labels">New Batch</a></li>
-    </ul>
-</div>
-<div id="toolbar">
-    <ul class="toolbar">
-        <li><a id="managelabel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage Layouts</a></li>
-        <li><a id="managetemplate" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Manage Templates</a></li>
-        <li><a id="manageprofile" href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Manage Profiles</a></li>
-        <li><a id="managelabelbatch" href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Manage Batches</a></li>
-    </ul>
-</div>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc
new file mode 100644 (file)
index 0000000..44be9ae
--- /dev/null
@@ -0,0 +1,75 @@
+<script type="text/javascript">
+    //<![CDATA[
+    // prepare DOM for YUI Toolbar
+    $(document).ready(function() {
+        $("#layoutsc").empty();
+        $("#templatesc").empty();
+        $("#profilesc").empty();
+        $("#batches").empty();
+        yuiToolbar();
+     });
+
+    // YUI Toolbar Functions
+    function yuiToolbar() {
+        var layouts = [
+                {text: _("Manage Layouts"), url: "/cgi-bin/koha/labels/label-manage.pl?label_element=layout" },
+                {text: _("New Layout"), url: "/cgi-bin/koha/labels/label-edit-layout.pl" }
+        ];
+
+        var templates = [
+                {text: _("Manage Templates"), url: "/cgi-bin/koha/labels/label-manage.pl?label_element=template" },
+                {text: _("New Template"), url: "/cgi-bin/koha/labels/label-edit-template.pl" }
+        ];
+
+        var profiles = [
+                {text: _("Manage Profiles"), url: "/cgi-bin/koha/labels/label-manage.pl?label_element=profile" },
+                {text: _("New Profile"), url: "/cgi-bin/koha/labels/label-edit-profile.pl" }
+        ];
+
+        var batches = [
+                {text: _("Manage Batches"), url: "/cgi-bin/koha/labels/label-manage.pl?label_element=batch" },
+                {text: _("New Batch"), url: "/cgi-bin/koha/labels/label-edit-batch.pl" }
+        ];
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Layouts"),
+            name: "layouts",
+            menu: layouts,
+            container: "layoutsc"
+        });
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Templates"),
+            name: "templates",
+            menu: templates,
+            container: "templatesc"
+        });
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Profiles"),
+            name: "profiles",
+            menu: profiles,
+            container: "profilesc"
+        });
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Batches"),
+            name: "batches",
+            menu: batches,
+            container: "batchesc"
+        });
+    }
+//]]>
+</script>
+<div id="toolbar">
+    <ul class="toolbar">
+        <li id="layoutsc"><a id="layouts" href="#">Layouts</a></li>
+        <li id="templatesc"><a id="templates" href="#">Templates</a></li>
+        <li id="profilesc"><a id="profiles" href="#">Profiles</a></li>
+        <li id="batchesc"><a id="batches" href="#">Batches</a></li>
+    </ul>
+</div>
index 50c9d53..0834cb5 100644 (file)
@@ -32,7 +32,6 @@
         <div id="bd">
             <div id="yui-main">
                 <div class="yui-b">
-                    <!-- TMPL_INCLUDE NAME="labels-new-toolbar.inc" -->
                     <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
                         <fieldset class="rows">
                             <legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Label Layout</legend>
index 2a77651..2413a64 100644 (file)
         <div id="bd">
             <div id="yui-main">
                 <div class="yui-b">
-                    <!-- TMPL_INCLUDE NAME="labels-new-toolbar.inc" -->
+                    <!-- TMPL_INCLUDE NAME="labels-toolbar.inc" -->
                     <div class="yui-gc">
                         <div class="yui-u first" id="manage-label-layouts">
                             <div class="hint">Current Branch: <!-- TMPL_VAR NAME="LoginBranchname" --></div>