Bugzilla – Attachment 15372 Details for
Bug 9621
Replace YUI menu on lists pages with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9621 - Replace YUI menu on lists pages with Bootstrap
Bug-9621---Replace-YUI-menu-on-lists-pages-with-Bo.patch (text/plain), 8.39 KB, created by
Owen Leonard
on 2013-02-15 16:14:08 UTC
(
hide
)
Description:
Bug 9621 - Replace YUI menu on lists pages with Bootstrap
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-02-15 16:14:08 UTC
Size:
8.39 KB
patch
obsolete
>From 864170ad4dd64b06aa6cd68bcd31675cc9347522 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 31 Jan 2013 10:20:14 -0500 >Subject: [PATCH] Bug 9621 - Replace YUI menu on lists pages with Bootstrap >Content-Type: text/plain; charset="utf-8" > >This patch converts the toolbar include file used by lists pages to >Bootstrap, replacing YUI button and menu code with Bootstrap markup. > >To test, view any page in virtualshelves/ which uses >virtualshelves-toolbar.inc (shelves.pl). Buttons and menus should look >correct and work correctly when viewing own lists, others' lists, etc. > >Revised: corrected bug number and title >--- > .../prog/en/includes/virtualshelves-toolbar.inc | 141 ++++++++------------ > 1 file changed, 54 insertions(+), 87 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc >index b2bd544..225e5dd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc >@@ -1,98 +1,65 @@ >-<div id="toolbar"> >- <script type="text/javascript"> >- //<![CDATA[ >+<script type="text/javascript"> >+//<![CDATA[ > >- // prepare DOM for YUI Toolbar >+[% IF ( viewshelf ) %] > >- $(document).ready(function() { >- $("#editlistc").empty(); >- $("#deletelistc").remove(); >- $("#sendlistc").empty(); >- $("#downloadlistc").empty(); >- $("#printlistc").empty(); >- $("#sendlistc").before("<li id=\"downloadmenuc\"><\/li>"); >- yuiToolbar(); >- }); >- >- [% IF ( viewshelf ) %] function sendList(){ >+ function sendList(){ > open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); >- } >- >- function downloadList(){ >- open(CGIBIN+'virtualshelves/downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); >- }[% END %] >+ } > >- // YUI Toolbar Functions >+ $(document).ready(function() { >+ $("#sendlist").click(function(){ >+ sendList(); >+ return false; >+ }); >+ $("#printlist").click(function(){ >+ print(); >+ return false; >+ }); >+ $("#deleteshelf").click(function(e){ >+ if(confirmDelete(_("Are you sure you want to delete this list?"))){ >+ return true; >+ } else { >+ e.preventDefault(); >+ } >+ }); >+ }); > >- function yuiToolbar() { >- newshelfButton = new YAHOO.widget.Button("newshelf"); >- [% IF ( viewshelf ) %][% IF ( manageshelf ) %]editshelfButton = new YAHOO.widget.Button("editshelf"); >- >- var editmenu = [ >- { text: _("Edit list"), url: "/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&op=modif" }, >- { text: _("Delete list"), onclick: {fn:function(){confirmDelete(_("Are you sure you want to delete this list?"))}}} >- ]; >- >- var downloadmenu = [ >- { text: _("iso2709"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&shelfid=[% shelfnumber %]" }, >- { text: _("RIS"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelfnumber %]" }, >- { text: _("BibTex"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelfnumber %]" }, >-[% FOREACH csv_profile IN csv_profiles %] >- { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% shelfnumber %]" }, > [% END %] >- ]; > >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("Download list"), >- name: "downloadmenubutton", >- menu: downloadmenu, >- container: "downloadmenuc" >- }); >+//]]> >+</script> > >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("Edit"), >- name: "editmenubutton", >- menu: editmenu, >- container: "editlistc" >- }); >+<div id="toolbar" class="btn-toolbar"> >+ <div class="btn-group"><a id="newshelf" class="btn btn-small" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1"><i class="icon-plus"></i> New list</a></div> > >-[% END %] >- downloadlistButton = new YAHOO.widget.Button({ >- id: "downloadlist", >- type: "button", >- label: _("Download list"), >- container: "downloadlistc", >- onclick: {fn:downloadList} >- }); >- sendlistButton = new YAHOO.widget.Button({ >- id: "sendlist", >- type: "button", >- label: _("Send list"), >- container: "sendlistc", >- onclick: {fn:sendList} >- }); >- printlistButton = new YAHOO.widget.Button({ >- id: "printbiblio", >- type: "button", >- label: _("Print list"), >- container: "printlistc", >- onclick: {fn:function(){print();}} >- });[% END %] >- } >+ [% IF ( viewshelf ) %] >+ [% IF ( manageshelf ) %] >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&op=modif">Edit list</a></li> >+ [% IF ( showprivateshelves ) %] >+ <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves&shelves=1&DEL-[% shelfnumber %]=1">Delete list</a></li> >+ [% ELSE %] >+ <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&DEL-[% shelfnumber %]=1">Delete list</a></li> >+ [% END %] >+ </ul> >+ </div> >+ [% END %] > >- //]]> >- </script> >- >-<ul class="toolbar"> >- <li><a id="newshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1">New list</a></li> >- [% IF ( viewshelf ) %][% IF ( manageshelf ) %] >- <li id="editlistc"><a id="editshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&op=modif">Edit list</a></li> >- <li id="deletelistc">[% IF ( showprivateshelves ) %]<a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves&shelves=1&DEL-[% shelfnumber %]=1">Delete list</a>[% ELSE %]<a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&DEL-[% shelfnumber %]=1">Delete list</a>[% END %]</li> >- [% END %] >- <li id="sendlistc"><a href="#" id="sendlist">Send list</a></li> >- <li id="printlistc"><a id="printbiblio" href="#">Print list</a></li> >- [% END %] >-</ul> >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-download"></i> Download list <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&shelfid=[% shelfnumber %]">iso2709</a></li> >+ <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelfnumber %]">RIS</a></li> >+ <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelfnumber %]">BibTex</a></li> >+ [% FOREACH csv_profile IN csv_profiles %] >+ <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% shelfnumber %]">CSV - [% csv_profile.profile %]</a></li> >+ [% END %] >+ </ul> >+ </div> >+ <div class="btn-group"><a class="btn btn-small" href="#" id="sendlist"><i class="icon-envelope"></i> Send list</a></div> >+ <div class="btn-group"><a class="btn btn-small" id="printlist" href="#"><i class="icon-print"></i> Print list</a></div> >+ [% END %] > </div> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9621
:
15371
|
15372
|
15375
|
15447