Bugzilla – Attachment 88230 Details for
Bug 15496
Delete bibliographic record after moving last item to another record(s)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15496: (follow-up) Update interaction for deleting records
Bug-15496-follow-up-Update-interaction-for-deletin.patch (text/plain), 3.97 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-04-17 18:34:37 UTC
(
hide
)
Description:
Bug 15496: (follow-up) Update interaction for deleting records
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-04-17 18:34:37 UTC
Size:
3.97 KB
patch
obsolete
>From 4aa550522aafccbd5e826bae1878521e5fc2b075 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 17 Apr 2019 16:20:18 +0000 >Subject: [PATCH] Bug 15496: (follow-up) Update interaction for deleting > records > >This patch makes minor changes to markup and JavaScript to alter the >interaction for deleting the record. Now a successful deletion will >convert the dialog to a "message" type dialog and show only the success >message. > >To test, apply the patch and test the process of attaching the last item >from a record and deleting that record. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../prog/en/modules/cataloguing/moveitem.tt | 23 ++++++++++--------- > 1 file changed, 12 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt >index 29e6499774..1816647351 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt >@@ -53,16 +53,17 @@ > [% ELSE %] > [% IF ( success ) %] > [% IF from_biblio.items.count == 0 %] >- <div class="dialog alert"> >- The record <em>[% from_biblio.title | html %]</em> has [% from_biblio.items.count | html %] attached items. >- <p> >- <button id="delete-biblio-btn" data-biblionumber="[% from_biblio.id | html %]"><i id="del-bib-spn" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i><i class="fa fa-fw fa-trash"></i> Delete record >- </button> >- <span id="del-bib-success" style="display:none">Record deleted</span> >- <span id="del-bib-failure" style="display:none">Attempt to delete record failed.</span> >+ <div class="dialog alert" id="del-bib-alert"> >+ <div id="del-bib-action"> >+ The record <em><a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% from_biblio.id | html %]">[% from_biblio.title | html %]</a></em> has [% from_biblio.items.count | html %] attached items. >+ <p><button id="delete-biblio-btn" data-biblionumber="[% from_biblio.id | html %]"><i id="del-bib-spn" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i><i class="fa fa-fw fa-trash"></i> Delete record >+ </button></p> >+ </div> >+ <p id="del-bib-result"> >+ <span id="del-bib-success" style="display:none"><i class="fa fa-check success"></i> Record deleted</span> >+ <span id="del-bib-failure" style="display:none"><i class="fa fa-warning"></i> Attempt to delete record failed.</span> > </p> > </div> >- <br/> > [% END %] > > <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle | html %]</i></a>. >@@ -116,18 +117,18 @@ > <script> > $("#delete-biblio-btn").on("click", function(){ > if ( confirm(_("Are you sure you want to delete this record?")) ) { >- let btn = $(this); > $("#del-bib-spn").show(); > let biblionumber = $(this).data('biblionumber'); > $.ajax({ > url: '/api/v1/biblios/' + biblionumber, > type: 'DELETE', > success: function(result) { >- btn.hide(); >+ $("#del-bib-action").hide(); > $('#del-bib-success').show(); >+ $("#del-bib-alert").attr("class","dialog message") > }, > error: function(result) { >- btn.hide(); >+ $("#delete-biblio-btn").hide(); > $('#del-bib-failure').show(); > } > }); >-- >2.21.0
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 15496
:
88004
|
88005
|
88006
|
88008
|
88015
|
88016
|
88017
|
88018
|
88019
|
88020
|
88026
|
88027
|
88028
|
88029
|
88030
|
88031
|
88032
|
88165
|
88166
|
88167
|
88168
|
88169
|
88170
|
88171
|
88172
|
88215
|
88225
|
88226
|
88227
|
88228
|
88229
|
88230
|
88892
|
88893
|
88894
|
88895
|
88896
|
88897
|
88903
|
88905
|
88920
|
88938
|
88950