<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>
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/
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);
}
<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>
<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 */
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) {
[% 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">
<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>