Bug 9645 - Replace YUI buttons on the quotes management page with Bootstrap
This patch converts the toolbar include file used by the quotes editor to Bootstrap, replacing YUI button and menu code with Bootstrap markup. To test, view any page in the quotes editor. Buttons and menus should look correct and work correctly. Test save, delete, and upload buttons on the summary page, and save and delete buttons on the upload page. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: All buttons work. Tested add, delete and upload. You are using icon-remove and not icon-remove-circle, which I prefer but is different of Bug 9627. Question: "Import quotes" takes you to "Quotes uploader", would not it be more consistent to use "Upload quotes" or "Quotes importer"? Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works nicely, no problems found. I think the difference to 9627 is, that this really deletes quotes, while the icon-remove-circle is used for closing subscriptions. Closed subscriptions remain in the system, it's just a way to indicate that there will be no new issues. There is a separate option to really delete subscriptions. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
4bad9adb51
commit
f2da479668
|
|
@ -1,47 +1,5 @@
|
|||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// prepare DOM for YUI Toolbar
|
||||
$(document).ready(function() {
|
||||
$("#add_quote").empty();
|
||||
$("#delete_quote").empty();
|
||||
$("#import_quotes").empty();
|
||||
yuiToolbar();
|
||||
});
|
||||
|
||||
// YUI Toolbar Functions
|
||||
function yuiToolbar() {
|
||||
|
||||
new YAHOO.widget.Button({
|
||||
type: "button",
|
||||
label: _("Add quote"),
|
||||
name: "add",
|
||||
container: "add_quote",
|
||||
onclick: {fn: fnClickAddRow}
|
||||
});
|
||||
|
||||
new YAHOO.widget.Button({
|
||||
type: "button",
|
||||
label: _("Delete quote(s)"),
|
||||
name: "delete",
|
||||
container: "delete_quote",
|
||||
onclick: {fn: fnClickDeleteRow}
|
||||
});
|
||||
|
||||
new YAHOO.widget.Button({
|
||||
type: "button",
|
||||
label: _("Import quotes"),
|
||||
name: "import",
|
||||
container: "import_quotes",
|
||||
onclick: {fn: function (){parent.location="quotes-upload.pl";}}
|
||||
});
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<div id="toolbar">
|
||||
<ul class="toolbar">
|
||||
<li id="add_quote"><a id="add" href="#">Add quote</a></li>
|
||||
<li id="delete_quote"><a id="delete" href="#">Delete quote(s)</a></li>
|
||||
<li id="import_quotes"><a id="import" href="#">Import quotes</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="toolbar" class="btn-toolbar">
|
||||
<div class="btn-group"><a class="btn btn-small" id="add_quote" href="#"><i class="icon-plus"></i> Add quote</a></div>
|
||||
<div class="btn-group"><a class="btn btn-small" id="delete_quote" href="#"><i class="icon-remove"></i> Delete quote(s)</a></div>
|
||||
<div class="btn-group"><a class="btn btn-small" id="import_quotes" href="/cgi-bin/koha/tools/quotes-upload.pl"><i class="icon-folder-open"></i> Import quotes</a></div>
|
||||
</div>
|
||||
|
|
@ -1,41 +1,4 @@
|
|||
<script type="text/javascript">
|
||||
var oSaveButton = '';
|
||||
var oDeleteButton = '';
|
||||
//<![CDATA[
|
||||
// prepare DOM for YUI Toolbar
|
||||
$(document).ready(function() {
|
||||
$("#save_quotes").empty();
|
||||
$("#delete_quote").empty();
|
||||
yuiToolbar();
|
||||
});
|
||||
|
||||
// YUI Toolbar Functions
|
||||
function yuiGetData() {
|
||||
fnGetData(document.getElementById('quotes_editor'));
|
||||
}
|
||||
|
||||
function yuiToolbar() {
|
||||
|
||||
oSaveButton = new YAHOO.widget.Button({
|
||||
type: "button",
|
||||
label: _("Save quotes"),
|
||||
name: "save",
|
||||
container: "save_quotes",
|
||||
});
|
||||
|
||||
oDeleteButton = new YAHOO.widget.Button({
|
||||
type: "button",
|
||||
label: _("Delete quote(s)"),
|
||||
name: "delete",
|
||||
container: "delete_quote",
|
||||
});
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<div id="toolbar" style="visibility: hidden; position: absolute">
|
||||
<ul class="toolbar">
|
||||
<li id="save_quotes"><a id="save" href="#">Save quotes</a></li>
|
||||
<li id="delete_quote"><a id="delete" href="#">Delete quote(s)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<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="icon-hdd"></i> Save quotes</a></div>
|
||||
<div class="btn-group"><a class="btn btn-small" id="delete_quote" href="#"><i class="icon-remove"></i> Delete quote(s)</a></div>
|
||||
</div>
|
||||
|
|
@ -24,6 +24,10 @@
|
|||
var progress = document.querySelector('.percent');
|
||||
$("#server_response").hide();
|
||||
|
||||
function yuiGetData() {
|
||||
fnGetData(document.getElementById('quotes_editor'));
|
||||
}
|
||||
|
||||
function fnAbortRead() {
|
||||
reader.abort();
|
||||
}
|
||||
|
|
@ -148,8 +152,8 @@
|
|||
$('#file_uploader').css("position","absolute");
|
||||
$('#file_uploader').css("top","-150px");
|
||||
$('#quotes_editor').css("visibility","visible");
|
||||
oSaveButton.on("click", yuiGetData);
|
||||
oDeleteButton.on("click", fnClickDeleteRow);
|
||||
$("#save_quotes").on("click", yuiGetData);
|
||||
$("#delete_quote").on("click", fnClickDeleteRow);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,14 @@
|
|||
});
|
||||
},
|
||||
});
|
||||
$("#add_quote").click(function(){
|
||||
fnClickAddRow();
|
||||
return false;
|
||||
});
|
||||
$("#delete_quote").click(function(){
|
||||
fnClickDeleteRow();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function fnClickAddQuote(e, node) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue