From 9ac4207c5879f73a2b93c698e51c4acc899cc720 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 26 Apr 2012 16:26:09 -0400 Subject: [PATCH] Misc UI improvements to both the QOTD editor and uploader including a number suggested by jcamins Content-Type: text/plain; charset="utf-8" Also removing a debug warn http://bugs.koha-community.org/show_bug.cgi?id=7977 --- koha-tmpl/intranet-tmpl/prog/en/css/datatables.css | 9 +++++ koha-tmpl/intranet-tmpl/prog/en/css/uploader.css | 19 +++++++++-- .../prog/en/modules/tools/quotes-upload.tt | 33 +++++++++++-------- .../intranet-tmpl/prog/en/modules/tools/quotes.tt | 19 ++++++++--- .../prog/en/modules/tools/tools-home.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt | 2 +- tools/quotes/quotes_ajax.pl | 2 - 7 files changed, 59 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css index 2a78678..ad97a48 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css @@ -191,6 +191,15 @@ div.dataTables_paginate.paging_four_button { width: 250px; } +.delete, .save, .cancel { + border-radius: 5px; + margin: 1px; +} + +input { + border-radius: 5px; +} + /* table.display { width: 100%; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css b/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css index eca87b9..e747255 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css @@ -10,12 +10,13 @@ -webkit-transition: opacity 1s linear; } #progress_bar.loading { - opacity: 1.0; + opacity: 1.0; } #progress_bar .percent { - background-color: #99ccff; - height: auto; - width: 0; + color: #E6F0F2; + background-color: #004D99; + height: auto; + width: 0; } #server_response { background-color: white; @@ -36,3 +37,13 @@ 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/modules/tools/quotes-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt index 969e04c..0ac5ae1 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 @@ -134,14 +134,14 @@ for(var i=0; ifrtip', "aaData" : aaData, "aoColumns" : [ { @@ -162,7 +162,6 @@ }, "fnRowCallback": function( nRow, aData, iDisplayIndex ) { noEditFields = [2]; /* action */ - /* console.log('Quote ID: '+quoteID); */ /* do foo on various cells in the current row */ $('td:eq(2)', nRow).html(''); /* apply no_edit id to noEditFields */ @@ -184,9 +183,9 @@ }, "height" : "14px", }); - $("div.save_quotes").html(''); }, }); + document.getElementById('footer').style.visibility="visible"; } function fnHandleFileSelect(evt) { @@ -202,13 +201,14 @@ parent.location='quotes-upload.pl'; }; reader.onloadstart = function(e) { + document.getElementById('cancel_upload').style.visibility="visible"; document.getElementById('progress_bar').className = 'loading'; }; reader.onload = function(e) { // Ensure that the progress bar displays 100% at the end. progress.style.width = '100%'; progress.textContent = '100%'; - setTimeout("document.getElementById('progress_bar').className='';", 2000); + document.getElementById('cancel_upload').style.visibility="hidden"; quotes = fnCSVToArray(e.target.result, ','); fnDataTable(quotes); } @@ -232,7 +232,8 @@ reader.readAsText(evt.target.files[0]); } - document.getElementById('files').addEventListener('change', fnHandleFileSelect, false); + //document.getElementById('file_upload').addEventListener('change', fnHandleFileSelect, false); + $('#file_upload').one('change', fnHandleFileSelect); }); @@ -281,11 +282,16 @@
- -
- - -
0%
+
+ +
+ + +
0%
+
Server Response
@@ -305,9 +311,8 @@ - - - +
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 9742d7c..5858700 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt @@ -21,12 +21,11 @@ "sAjaxSource" : "/cgi-bin/koha/tools/quotes/quotes_ajax.pl", "aoColumns" : [ { "sWidth": "3%" }, - { "sWidth": "12%" }, + { "sWidth": "11%" }, { "sWidth": "65%" }, { "sWidth": "10%" }, - { "sWidth": "10%" }, + { "sWidth": "11%" }, ], - "sDom" : '<"add_quote">frtip', "oLanguage" : { "sEmptyTable": sEmptyTable, }, @@ -61,7 +60,6 @@ }); }, }); - $("div.add_quote").html(''); }); function fnClickAddQuote() { @@ -152,7 +150,16 @@
- +
+
    +
  • + + + Click Source or Text field to edit contents. Press to save changes. +
  • +
+
+
@@ -173,6 +180,8 @@
ID
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt index c78f17d..9b1b11b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt @@ -88,7 +88,7 @@ [% END %] [% IF ( CAN_user_tools_edit_quotes ) %] -
Edit Quotes for QOD Feature
+
Edit Quotes for QOTD Feature
Quote editor for Quote-of-the-day feature in OPAC
[% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt index a97b578..84ba67a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt @@ -36,7 +36,7 @@ [% END %] [% IF ( display_daily_quote && daily_quote ) %] -

Quote of the Day

[% daily_quote.text %] ~ [% daily_quote.source %]
+

Quote of the Day

[% daily_quote.text %] ~ [% daily_quote.source %]
[% END %] [% IF ( OpacMainUserBlock ) %]
[% OpacMainUserBlock %]
[% END %] diff --git a/tools/quotes/quotes_ajax.pl b/tools/quotes/quotes_ajax.pl index 75ff18d..1e1e655 100755 --- a/tools/quotes/quotes_ajax.pl +++ b/tools/quotes/quotes_ajax.pl @@ -46,8 +46,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $params = $cgi->Vars; # NOTE: Multivalue parameters NOT allowed!! -warn Dumper($params); #XXX - print $cgi->header('application/json'); if ($params->{'action'} eq 'add') { -- 1.7.0.4