@@ -, +, @@ -> Upload, including markup corrections, removal of 'onclick,' and - Confirm that uploading a file works correctly. - Confirm that clicking 'Cancel' during a file upload works correctly. - Search existing uploads. - Confirm that the 'Download' and 'Delete' buttons look correct and work correctly. - In Administration -> MARC bibliographic framework, choose a framework and configure a tag subfield to use the upload plugin. - Create or edit a bibliographic record using the framework you modified. - Click the tag editor icon next to your modified subfield to trigger the pop-up window with the upload form. - Confirm that this window has a layout which is adjusted for the size of the window. - Confirm that uploading and selecting files from this window works correctly. --- .../intranet-tmpl/prog/en/modules/tools/upload.tt | 105 +++++++++++++-------- 1 file changed, 65 insertions(+), 40 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt @@ -33,7 +33,7 @@ [% END %] [% BLOCK form_new %] -
+ [% PROCESS plugin_pars %]
Upload new files @@ -49,7 +49,7 @@ [% ELSE %] - - + [% END %]
- - + +
Upload progress: - + 0%
@@ -93,22 +92,20 @@ [% END %] [% BLOCK form_search %] - + [% PROCESS plugin_pars %]
Search uploads by name or hashvalue
  1. - +
  2. -
  3. -
    - -
    -
+
+ +
[% END %] @@ -124,11 +121,7 @@ [% BLOCK closer %] [% IF plugin %] -
-
- -
-
+ [% END %] [% END %] @@ -146,24 +139,24 @@
- [% IF plugin %] - - [% END %]
+ [% IF plugin %] + + [% END %] [% END %] [% BLOCK table_results %] - + + + + [% IF !plugin %][% END %] + [% IF !plugin %][% END %] + @@ -177,13 +170,13 @@ [% END %] - @@ -318,22 +311,54 @@ $(document).ready(function() { $("#public_cb").click(function() { $("#public").click(); }); + $("#fileuploadbutton").on("click",function(e){ + e.preventDefault(); + StartUpload(); + }); + $("#fileuploadcancel").on("click",function(e){ + e.preventDefault(); + CancelUpload(); + }); + $("#searchbutton").on("click",function(){ + return CheckSearch(); + }); + $(".choose_entry").on("click",function(e){ + e.preventDefault(); + var record_hashvalue = $(this).data("record-hashvalue"); + Choose( record_hashvalue ); + }); + $(".download_entry").on("click",function(e){ + e.preventDefault(); + var record_id = $(this).data("record-id"); + SubmitMe( 'download', record_id ); + }); + $(".delete_entry").on("click",function(e){ + e.preventDefault(); + var record_id = $(this).data("record-id"); + DeleteEntry( record_id ); + }); }); //]]> - -[% IF !plugin %] +[% IF ( plugin ) %] + +
+
+
+[% ELSE %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] [% PROCESS breadcrumbs %] +
+
+
+
[% END %] -
-
-
-
+

Upload

@@ -356,9 +381,9 @@ $(document).ready(function() { [% END %]
-
[% IF !plugin %] +
[% INCLUDE 'tools-menu.inc' %]
--
Filename - Size - Hashvalue - Category - [% IF !plugin %]Public[% END %] - [% IF !plugin %]Temporary[% END %] - Actions + FilenameSizeHashvalueCategoryPublicTemporaryActions
[% IF record.public %]Yes[% ELSE %]No[% END %] [% IF record.permanent %]No[% ELSE %]Yes[% END %] + [% IF plugin %] - Choose  + [% END %] - Download  + [% IF record.owner == owner || CAN_user_tools_upload_manage %] - Delete + [% END %]