Bugzilla – Attachment 19585 Details for
Bug 10514
Add item link on acquisitions add item is too small
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10514 [Alternate] Add item link on acquisitions add item is too small
PASSED-QA-Bug-10514-Alternate-Add-item-link-on-acq.patch (text/plain), 4.06 KB, created by
Katrin Fischer
on 2013-07-11 22:09:37 UTC
(
hide
)
Description:
[PASSED QA] Bug 10514 [Alternate] Add item link on acquisitions add item is too small
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-07-11 22:09:37 UTC
Size:
4.06 KB
patch
obsolete
>From b556c3c96cb1f744de5306cb680b7f803d35676b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 11 Jul 2013 10:28:55 -0400 >Subject: [PATCH] [PASSED QA] Bug 10514 [Alternate] Add item link on > acquisitions add item is too small > >This alternate patch for Bug 10514 converts the "Add" and "Clear" links >to the standard "submit/cancel" format inside a fieldset. This gives >them a little more visual weight to solve the problem in a differnt way. > >Based on the changes made by Liz Rea and Jonathan Druart. Same test >plan: > >create a basket >add a record to it >scroll down - the link to add item and cancel should both be more >prominent now. >Click "Add item" - it should add an item. > >Signed-off-by: Liz Rea <liz@catalyst.net.nz> >I still feel weird about the button, but as two people have said they'd rather have the button, I'm alright with it I guess. >Really what I want is people to notice it's there and click it at the appropriate time. I hope this will help that issue. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script. >Leaves the translation problems, but that needs more work and is >out of the scope of this bug. >Tested Add and Update functionality works correctly. >--- > koha-tmpl/intranet-tmpl/prog/en/js/additem.js | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >index 2c15b04..9dfaa1f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >@@ -1,5 +1,5 @@ > function addItem( node, unique_item_fields ) { >- var index = $(node).parent().attr('id'); >+ var index = $(node).closest("div").attr('id'); > var current_qty = parseInt($("#quantity").val()); > var max_qty; > if($("#quantity_to_receive").length != 0){ >@@ -12,7 +12,7 @@ function addItem( node, unique_item_fields ) { > if ( current_qty < max_qty - 1 ) > cloneItemBlock(index, unique_item_fields); > addItemInList(index, unique_item_fields); >- $("#" + index).find("a[name='buttonPlus']").text("Update"); >+ $("#" + index).find("input[name='buttonPlus']").val("Update"); > $("#quantity").val(current_qty + 1).change(); > } else if ( current_qty >= max_qty ) { > alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS >@@ -134,9 +134,12 @@ function cloneItemBlock(index, unique_item_fields) { > $(this).val(random); > }); > /* Add buttons + and Clear */ >- var buttonPlus = '<a name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')">Add</a>'; >- var buttonClear = '<a name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>'; >- $(clone).append(buttonPlus).append(buttonClear); >+ var buttonPlus = "<fieldset class=\"action\">"; >+ var buttonPlusText = _("Add item"); >+ buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + buttonPlusText + '" />'; >+ buttonPlus += '<a class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>'; >+ buttonPlus += "</fieldset>"; >+ $(clone).append(buttonPlus); > /* Copy values from the original block (input) */ > $(original).find("input[name='field_value']").each(function(){ > var kohafield = $(this).siblings("input[name='kohafield']").val(); >@@ -164,7 +167,7 @@ function cloneItemBlock(index, unique_item_fields) { > } > > function clearItemBlock(node) { >- var index = $(node).parent().attr('id'); >+ var index = $(node).closest("div").attr('id'); > var block = $("#"+index); > $(block).find("input[type='text']").each(function(){ > $(this).val(""); >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10514
:
19274
|
19504
|
19531
|
19536
|
19571
|
19583
| 19585 |
19586