Bugzilla – Attachment 9659 Details for
Bug 7889
Use standard style for errors and messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7889 [Authorities duplicates] Use standard style for errors and messages
Bug-7889-Authorities-duplicates-Use-standard-style.patch (text/plain), 8.87 KB, created by
Chris Cormack
on 2012-05-19 19:07:40 UTC
(
hide
)
Description:
Bug 7889 [Authorities duplicates] Use standard style for errors and messages
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-05-19 19:07:40 UTC
Size:
8.87 KB
patch
obsolete
>From 022f2b3b11582e4172d880f6ea67e95c32936604 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 17 May 2012 12:58:30 -0400 >Subject: [PATCH] Bug 7889 [Authorities duplicates] Use standard style for > errors and messages > >The warning shown in the authorities editor when there is >a possible duplicate is styled incorrectly. In addition the >design of the warning is inconsistent with that shown in the >bibliographic record editor. > >This patch revises the style and layout of the duplicate error >box. It also corrects a problem which appears in the biblio >and authority editors where a non-existent JS window function >was called. I have added the function to the default JS include >and revised the editor pages to use it. > >To test: > >- Create a record in both the cataloging and authorities > editors which will trigger a duplicate warning. >- Click the link to the existing record. A separate window > should pop up. >- In both editors try each option: > - Confirm the duplicate and go to the existing record. > - Deny that the record is duplicate and continue to save. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 9 ++- > .../prog/en/modules/authorities/authorities.tt | 80 +++++++++++--------- > .../prog/en/modules/cataloguing/addbiblio.tt | 2 +- > 3 files changed, 52 insertions(+), 39 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >index 24b785d..bf45048 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >@@ -101,4 +101,11 @@ jQuery.fn.preventDoubleFormSubmit = function() { > else > this.beenSubmitted = true; > }); >-}; >\ No newline at end of file >+}; >+ >+function openWindow(link,name,width,height) { >+ name = (typeof name == "undefined")?'popup':name; >+ width = (typeof width == "undefined")?'600':width; >+ height = (typeof height == "undefined")?'400':height; >+ var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); >+} >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index d720b35..6512360 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -520,6 +520,31 @@ function searchauthority() { > opacity: 0.8 > }); > })(); >+ $(document).ready(function() { >+ yuiToolbar(); >+ $("#addauthc,#action").empty(); >+ }); >+ // YUI Toolbar Functions >+ function yuiToolbar() { >+ var addauthButton = new YAHOO.widget.Button({ >+ id: "addauth", >+ type: "button", >+ label: "Save", >+ container: "addauthc", >+ onclick: {fn: Check } >+ }); >+ var addauthButton2 = new YAHOO.widget.Button({ >+ id: "addauth2", >+ type: "button", >+ label: "Save", >+ container: "action", >+ onclick: {fn: Check } >+ }); >+ } >+ function confirmnotdup(redirect){ >+ $("#confirm_not_duplicate").attr("value","1"); >+ Check(); >+ } > //]]> > </script> > [% INCLUDE 'header.inc' %] >@@ -536,53 +561,34 @@ function searchauthority() { > <h1>Modify authority #[% authid %] [% authtypetext %]</h1> > [% ELSE %] > <h1>Adding authority [% authtypetext %]</h1> >-[% END %] >+[% END %] >+ >+[% IF ( duplicateauthid ) %] >+ <div class="dialog alert"> >+ <h4>Duplicate record suspected</h4> >+ <p>Is this a duplicate of <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% duplicateauthid %]" onclick="openWindow('/cgi-bin/koha/authorities/detail.pl?authid=[% duplicateauthid %]&popup=1', 'Duplicate authority','800','600'); return false;" class="button">[% duplicateauthvalue %]</a>?</p> >+ >+ <form action="authorities.pl" method="get"> >+ <input type="hidden" name="authid" value="[% duplicateauthid %]" /> >+ <input type="submit" class="edit" value="Yes: Edit exisiting authority" /> >+ </form> >+ <form action="authorities.pl" method="get"> >+ <input type="button" value="No: Save as new authority" class="save" accesskey="w" onclick="confirmnotdup('items'); return false;" /> >+ </form> >+ </div> >+[% END %] >+ > <form method="post" name="f" action="/cgi-bin/koha/authorities/authorities.pl"> > <input type="hidden" name="op" value="add" /> > <input type="hidden" name="addfield_field" value="" /> > <input type="hidden" name="repeat_field" value="" /> > <input type="hidden" name="authtypecode" value="[% authtypecode %]" /> > <input type="hidden" name="authid" value="[% authid %]" /> >+ <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> > > <div id="toolbar"> >- <script type="text/javascript"> >- //<![CDATA[ >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- yuiToolbar(); >- $("#addauthc,#action").empty(); >- }); >- // YUI Toolbar Functions >- function yuiToolbar() { >- var addauthButton = new YAHOO.widget.Button({ >- id: "addauth", >- type: "button", >- label: "Save", >- container: "addauthc", >- onclick: {fn: Check } >- }); >- var addauthButton2 = new YAHOO.widget.Button({ >- id: "addauth2", >- type: "button", >- label: "Save", >- container: "action", >- onclick: {fn: Check } >- }); >- } //]]> >- </script> > <ul class="toolbar"><li id="addauthc"><input id="addauth" type="submit" value="Save" accesskey="w" /></li></ul></div> > >-[% IF ( duplicateauthid ) %] >- <div class="problem"> >- <p>Duplicate suspected with <a href="javascript:openWindow('detail.pl?authid=[% duplicateauthid %]&popup=1', 'Duplicate authority')" class="button">[% duplicateauthvalue %]</a></p> >- <p>You must either :</p> >- <ul> >- <p><input type="checkbox" value="1" name="confirm_not_duplicate" />confirm it's not a duplicate (and click on <input type="button" value="Add authority" onclick="Check(this.form)" accesskey="w" class="button" /> again)</p> >- <p>Go to <a href="authorities.pl?authid=[% duplicateauthid %]" >original authority</a></p> >- </ul> >- </div> >-[% END %] >- > <div id="authoritytabs" class="toptabs numbered"> > <ul> [% FOREACH BIG_LOO IN BIG_LOOP %] > <li>[% IF ( BIG_LOO.number ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index da22e93..a9e9841 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -675,7 +675,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? > [% IF ( duplicatebiblionumber ) %] > <div class="dialog alert"> > <h4>Duplicate record suspected</h4> >- <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]" onclick="openWindow('../MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]&popup=1', 'Duplicate biblio'; return false;)">[% duplicatetitle %]</a>?</p> >+ <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]" onclick="openWindow('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]&popup=1', 'Duplicate biblio','800','600'); return false;">[% duplicatetitle %]</a>?</p> > [% IF ( CAN_user_editcatalogue_edit_items ) %]<form action="/cgi-bin/koha/cataloguing/additem.pl" method="get"> > <input type="hidden" name="biblionumber" value="[% duplicatebiblionumber %]" /> > <input type="submit" class="edit" value="Yes: Edit existing items" /> >-- >1.7.10
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 7889
:
9629
|
9630
|
9631
|
9632
|
9658
| 9659 |
9660
|
9661
|
11085
|
11105