From 0a9f8f86aab7f75aec1eb897727c912cff0068f0 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Mon, 7 May 2012 11:34:37 -0400 Subject: [PATCH] Bug 7977: Further UI work on the QOTD uploader This patch addresses another of oleonard's points as well as some general cleanup: --Adds instructions to each stage of the uploader --Consolidates quote tool css into quotes.css Signed-off-by: Jared Camins-Esakov Signed-off-by: Mason James --- .../intranet-tmpl/prog/en/css/quotes.css | 41 ++++++++++++++ .../intranet-tmpl/prog/en/css/uploader.css | 10 ---- .../en/includes/quotes-upload-toolbar.inc | 3 +- .../prog/en/modules/tools/quotes-upload.tt | 53 +++++++++++++++---- 4 files changed, 84 insertions(+), 23 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/quotes.css diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/quotes.css b/koha-tmpl/intranet-tmpl/prog/en/css/quotes.css new file mode 100644 index 0000000000..0399a3645f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/quotes.css @@ -0,0 +1,41 @@ +#quotes_editor_wrapper { + position : relative; + top : 15px; +} + +#footer { + visibility : hidden; + position : relative; + top : 10px; + height : 25px; +} + +#instructions li { + list-style-type : disc; +} + +#instructions div { + margin-left : 10px; +} + +#file_editor_inst { + visibility : hidden; + position : absolute; +} + +#file_uploader { + visibility :visible; + position :relative; +} + +#file_upload { + position : relative; + top : -1px; + margin-left : 10px; +} + +#quotes_editor { + float : left; + width : 100%; + visibility :hidden; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css b/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css index e747255039..e48af293d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css @@ -37,13 +37,3 @@ top: 50%; width: 250px; } - -#file_uploader { - position: relative; - top: -24px; -} - -#file_upload { - position: relative; - top: -1px; -} 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 f32e8b1336..6d10986f63 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 @@ -33,10 +33,9 @@ //]]> -
+ 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 f2cb169745..2f0bf1ac44 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 @@ -3,6 +3,7 @@ [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'datatables-strings.inc' %] @@ -134,6 +135,14 @@ for(var i=0; i 512) { - if (!confirm(evt.target.files[0].name+' is '+fileSizeInK+' K in size. Do you really want to upload this file?')) { + if (!confirm(evt.target.files[0].name+' '+fileSizeInK+_(' KB Do you really want to upload this file?'))) { parent.location='quotes-upload.pl'; return; } @@ -256,10 +268,10 @@ success : function(){ var response = JSON.parse(jqXHR.responseText); if (response.success) { - $("#server_response").text(response.records+' quotes saved.'); + $("#server_response").text(response.records+_(' quotes saved.')); } else { - $("#server_response").text('An error has occurred. '+response.records+' quotes saved. Please ask your administrator to check the server log for more details.'); + $("#server_response").text(+response.records+_(' quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details.')); } $("#server_response").fadeIn(200); }, @@ -271,9 +283,9 @@ return this.id; }).get().join(', '); if (!idsToDelete) { - alert('Please select a quote(s) by clicking the quote id(s) you desire to delete.'); + alert(_('Please select a quote(s) by clicking the quote id(s) you desire to delete.')); } - else if (confirm('Are you sure you wish to delete quote(s) '+idsToDelete+'?')) { + else if (confirm(_('Are you sure you wish to delete quote(s) ')+idsToDelete+'?')) { oTable.$('.selected').each(function(){ oTable.fnDeleteRow(this); }); @@ -300,16 +312,35 @@
[% INCLUDE 'quotes-upload-toolbar.inc' %]

Quote uploader

-
+
+
+ Instructions +
+
    +
  • The quote uploader accepts standard csv files with two columns: "source","text"
  • +
  • Click the "Choose File" button and select the csv file to be uploaded.
  • +
  • The file will be imported into an editable table for review prior to saving.
  • +
+
+
+
    +
  • Click on any field to edit the contents; Press the <Enter> key to save edit.
  • +
  • Click on one or more quote numbers to select entire quotes for deletion; Click the 'Delete Quote(s)' button to delete selected quotes.
  • +
  • Click the 'Save Quotes' button in the toolbar to save the entire batch of quotes.
  • +
+
+
+
+
Upload quotes -
+
0%
Server Response
- + @@ -326,7 +357,7 @@
Source
-
-- 2.39.5