Bugzilla – Attachment 15419 Details for
Bug 9645
Replace YUI buttons on the quotes management page with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9645 - Replace YUI buttons on the quotes management page with Bootstrap
SIGNED-OFF-Bug-9645---Replace-YUI-buttons-on-the-q.patch (text/plain), 6.86 KB, created by
Bernardo Gonzalez Kriegel
on 2013-02-15 21:43:57 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9645 - Replace YUI buttons on the quotes management page with Bootstrap
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-02-15 21:43:57 UTC
Size:
6.86 KB
patch
obsolete
>From 493adfb87267df3333fddfa7a4c04d880306aa78 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 1 Feb 2013 16:10:14 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 9645 - Replace YUI buttons on the quotes > management page with Bootstrap > >This patch converts the toolbar include file used by the quotes editor >to Bootstrap, replacing YUI button and menu code with Bootstrap markup. > >To test, view any page in the quotes editor. Buttons and menus should >look correct and work correctly. Test save, delete, and upload buttons >on the summary page, and save and delete buttons on the upload page. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Comment: All buttons work. Tested add, delete and upload. >You are using icon-remove and not icon-remove-circle, >which I prefer but is different of Bug 9627. >Question: "Import quotes" takes you to "Quotes uploader", >would not it be more consistent to use "Upload quotes" or >"Quotes importer"? >--- > .../prog/en/includes/quotes-toolbar.inc | 52 ++------------------ > .../prog/en/includes/quotes-upload-toolbar.inc | 45 ++--------------- > .../prog/en/modules/tools/quotes-upload.tt | 8 ++- > .../intranet-tmpl/prog/en/modules/tools/quotes.tt | 8 +++ > 4 files changed, 23 insertions(+), 90 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-toolbar.inc >index 7229fb5..9b8f37f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-toolbar.inc >@@ -1,47 +1,5 @@ >-<script type="text/javascript"> >- //<![CDATA[ >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- $("#add_quote").empty(); >- $("#delete_quote").empty(); >- $("#import_quotes").empty(); >- yuiToolbar(); >- }); >- >- // YUI Toolbar Functions >- function yuiToolbar() { >- >- new YAHOO.widget.Button({ >- type: "button", >- label: _("Add quote"), >- name: "add", >- container: "add_quote", >- onclick: {fn: fnClickAddRow} >- }); >- >- new YAHOO.widget.Button({ >- type: "button", >- label: _("Delete quote(s)"), >- name: "delete", >- container: "delete_quote", >- onclick: {fn: fnClickDeleteRow} >- }); >- >- new YAHOO.widget.Button({ >- type: "button", >- label: _("Import quotes"), >- name: "import", >- container: "import_quotes", >- onclick: {fn: function (){parent.location="quotes-upload.pl";}} >- }); >- } >- >-//]]> >-</script> >-<div id="toolbar"> >- <ul class="toolbar"> >- <li id="add_quote"><a id="add" href="#">Add quote</a></li> >- <li id="delete_quote"><a id="delete" href="#">Delete quote(s)</a></li> >- <li id="import_quotes"><a id="import" href="#">Import quotes</a></li> >- </ul> >-</div> >+<div id="toolbar" class="btn-toolbar"> >+ <div class="btn-group"><a class="btn btn-small" id="add_quote" href="#"><i class="icon-plus"></i> Add quote</a></div> >+ <div class="btn-group"><a class="btn btn-small" id="delete_quote" href="#"><i class="icon-remove"></i> Delete quote(s)</a></div> >+ <div class="btn-group"><a class="btn btn-small" id="import_quotes" href="/cgi-bin/koha/tools/quotes-upload.pl"><i class="icon-folder-open"></i> Import quotes</a></div> >+</div> >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-upload-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-upload-toolbar.inc >index 6d10986..ef3fd3d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-upload-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-upload-toolbar.inc >@@ -1,41 +1,4 @@ >-<script type="text/javascript"> >- var oSaveButton = ''; >- var oDeleteButton = ''; >- //<![CDATA[ >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- $("#save_quotes").empty(); >- $("#delete_quote").empty(); >- yuiToolbar(); >- }); >- >- // YUI Toolbar Functions >- function yuiGetData() { >- fnGetData(document.getElementById('quotes_editor')); >- } >- >- function yuiToolbar() { >- >- oSaveButton = new YAHOO.widget.Button({ >- type: "button", >- label: _("Save quotes"), >- name: "save", >- container: "save_quotes", >- }); >- >- oDeleteButton = new YAHOO.widget.Button({ >- type: "button", >- label: _("Delete quote(s)"), >- name: "delete", >- container: "delete_quote", >- }); >- } >- >-//]]> >-</script> >-<div id="toolbar" style="visibility: hidden; position: absolute"> >- <ul class="toolbar"> >- <li id="save_quotes"><a id="save" href="#">Save quotes</a></li> >- <li id="delete_quote"><a id="delete" href="#">Delete quote(s)</a></li> >- </ul> >-</div> >+<div id="toolbar" class="btn-toolbar" style="visibility: hidden; position: absolute"> >+ <div class="btn-group"><a class="btn btn-small" id="save_quotes" href="#"><i class="icon-hdd"></i> Save quotes</a></div> >+ <div class="btn-group"><a class="btn btn-small" id="delete_quote" href="#"><i class="icon-remove"></i> Delete quote(s)</a></div> >+</div> >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt >index 19833a6..2dc4af9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt >@@ -24,6 +24,10 @@ > var progress = document.querySelector('.percent'); > $("#server_response").hide(); > >+ function yuiGetData() { >+ fnGetData(document.getElementById('quotes_editor')); >+ } >+ > function fnAbortRead() { > reader.abort(); > } >@@ -148,8 +152,8 @@ > $('#file_uploader').css("position","absolute"); > $('#file_uploader').css("top","-150px"); > $('#quotes_editor').css("visibility","visible"); >- oSaveButton.on("click", yuiGetData); >- oDeleteButton.on("click", fnClickDeleteRow); >+ $("#save_quotes").on("click", yuiGetData); >+ $("#delete_quote").on("click", fnClickDeleteRow); > > > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >index 7a838d0..493c34b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >@@ -83,6 +83,14 @@ > }); > }, > }); >+ $("#add_quote").click(function(){ >+ fnClickAddRow(); >+ return false; >+ }); >+ $("#delete_quote").click(function(){ >+ fnClickDeleteRow(); >+ return false; >+ }); > }); > > function fnClickAddQuote(e, node) { >-- >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 9645
:
15414
|
15419
|
15472