Bugzilla – Attachment 51472 Details for
Bug 16513
Improvements and fixes for quote upload process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16513 - Improvements and fixes for quote upload process
Bug-16513---Improvements-and-fixes-for-quote-uploa.patch (text/plain), 6.31 KB, created by
Owen Leonard
on 2016-05-13 14:06:53 UTC
(
hide
)
Description:
Bug 16513 - Improvements and fixes for quote upload process
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-05-13 14:06:53 UTC
Size:
6.31 KB
patch
obsolete
>From 83239dc8e961f0cfc6cf58510afef23bbf09ca0d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 13 May 2016 09:59:53 -0400 >Subject: [PATCH] Bug 16513 - Improvements and fixes for quote upload process >Content-Type: text/plain; charset="utf-8" > >This patch fixes some minor bugs and adds a small enhancement to the >quotes editor and quotes upload pages. > >To test, apply the patch and go to Tools -> Quote editor > >- In the table of quotes, clicking the "ID" table header should trigger > an alert, "Click on the quote's ide to select..." >- Go to "Import quotes" and select a file to upload. >- On the upload preview page you should see a new "Cancel import" > button. Clicking it should return you to the quotes upload page after > asking for confirmation. >- Test the upload cancel button: > - If you have fast reflexes or are uploading a file large enough, you > should be able to see a "Cancel upload" button during the upload > process. > - Clicking this button should cancel the upload and return you to the > quote upload page. >--- > .../prog/en/includes/quotes-upload-toolbar.inc | 3 ++- > .../intranet-tmpl/prog/en/modules/tools/quotes-upload.tt | 14 +++++++++++--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt | 9 ++++++--- > 3 files changed, 19 insertions(+), 7 deletions(-) > >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 ea795cf..617e3b3 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,4 +1,5 @@ > <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="fa fa-save"></i> Save quotes</a></div> >- <div class="btn-group"><a class="btn btn-small" id="delete_quote" href="#"><i class="fa fa-remove"></i> Delete quote(s)</a></div> >+ <div class="btn-group"><a class="btn btn-small" id="delete_quote" href="#"><i class="fa fa-trash"></i> Delete quote(s)</a></div> >+ <div class="btn-group"><a href="/cgi-bin/koha/tools/quotes-upload.pl" id="cancel_quotes" class="btn btn-small"><i class="fa fa-remove"></i> Cancel import</a></div> > </div> >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 f98d6dd..62891a4 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 >@@ -11,6 +11,14 @@ > var oTable; //DataTable object > $(document).ready(function() { > >+ $("#cancel_upload").on("click",function(e){ >+ e.preventDefault(); >+ fnAbortRead(); >+ }); >+ $("#cancel_quotes").on("click",function(){ >+ return confirm( _("Are you sure you want to cancel this import?") ); >+ }); >+ > // Credits: > // FileReader() code copied and hacked from: > // http://www.html5rocks.com/en/tutorials/file/dndfiles/ >@@ -222,14 +230,14 @@ > parent.location='quotes-upload.pl'; > }; > reader.onloadstart = function(e) { >- $('#cancel_upload').css("visibility","visible"); >+ $('#cancel_upload').show(); > $('#progress_bar').addClass("loading"); > }; > reader.onload = function(e) { > // Ensure that the progress bar displays 100% at the end. > progress.style.width = '100%'; > progress.textContent = '100%'; >- $('#cancel_upload').css("visibility","hidden"); >+ $('#cancel_upload').hide(); > quotes = fnCSVToArray(e.target.result, ','); > fnDataTable(quotes); > } >@@ -333,7 +341,7 @@ > <legend>Upload quotes</legend> > <div id="file_upload"> > <input type="file" name="file" /> >- <button id="cancel_upload" style="visibility:hidden;" onclick="fnAbortRead();">Cancel Upload</button> >+ <button id="cancel_upload" style="display:none">Cancel upload</button> > <div id="progress_bar"><div class="percent">0%</div></div> > </div> > </fieldset> >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 9e80014..f0d4bd8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >@@ -8,7 +8,6 @@ > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.jeditable.mini.js"></script> > <script type="text/javascript"> > //<![CDATA[ >- var MSG_ID_HELP = _("Click on the quote's id to select or deselect the quote. Multiple quotes may be selected."); > > var oTable; /* oTable needs to be global */ > var sEmptyTable = _("No quotes available. Please use the 'Add quote' button to add a quote."); /* override the default message in datatables.inc */ >@@ -90,6 +89,10 @@ > fnClickDeleteRow(); > return false; > }); >+ $("#id_help").on("click",function(e){ >+ e.stopPropagation(); >+ alert( _("Click on the quote's id to select or deselect the quote. Multiple quotes may be selected.") ); >+ }); > }); > > function fnClickAddQuote(e, node) { >@@ -190,7 +193,7 @@ > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Quote Editor</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Quote editor</div> > > <div id="doc3" class="yui-t2"> > <div id="bd"> >@@ -215,7 +218,7 @@ > <table id="quotes_editor"> > <thead> > <tr> >- <th><span style="cursor: help" onclick="event.stopPropagation();alert(MSG_ID_HELP);">ID</span></th> >+ <th><span style="cursor: help" id="id_help">ID</span></th> > <th>Source</th> > <th>Text</th> > <th>Last displayed</th> >-- >2.1.4
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 16513
:
51472
|
51904
|
52542