Bugzilla – Attachment 69085 Details for
Bug 19595
Clicking plugin link does not fill item's date acquired field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19595: Clicking plugin link does not fill item's date acquired field
Bug-19595-Clicking-plugin-link-does-not-fill-items.patch (text/plain), 1.77 KB, created by
Marcel de Rooy
on 2017-11-10 13:37:01 UTC
(
hide
)
Description:
Bug 19595: Clicking plugin link does not fill item's date acquired field
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-11-10 13:37:01 UTC
Size:
1.77 KB
patch
obsolete
>From c6c7140d0723fa6d24a2a26e3f4cb50b6da90cea Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 10 Nov 2017 12:59:58 +0000 >Subject: [PATCH] Bug 19595: Clicking plugin link does not fill item's date > acquired field >Content-Type: text/plain; charset=utf-8 > >This patch updates the dateaccessioned plugin for the item edit form to >return functionality which was removed in a previous patch. > >To test, apply the patch and open an item for editing. Clicking the >"..." link next to the "Date acquired" field should insert the current >date, overwriting the existing date. > >Open a blank item add form. Putting the cursor in the "Date acquired" >field should automatically insert the current date. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Added a comment line in set_to_today. >--- > cataloguing/value_builder/dateaccessioned.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/cataloguing/value_builder/dateaccessioned.pl b/cataloguing/value_builder/dateaccessioned.pl >index 5fc1c45..7a86e2d 100755 >--- a/cataloguing/value_builder/dateaccessioned.pl >+++ b/cataloguing/value_builder/dateaccessioned.pl >@@ -42,13 +42,14 @@ function Focus$function_name(event) { > } > > function Click$function_name(event) { >- set_to_today(event.data.id); >+ set_to_today(event.data.id, 1); > return false; // prevent page scroll > } > >-function set_to_today( id ) { >+function set_to_today( id, force ) { >+ // The force parameter is used in Click but not in Focus ! > if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; } >- if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' ) { >+ if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' || force ) { > \$("#" + id).val("$date"); > } > } >-- >2.1.4
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 19595
:
69082
| 69085