Bugzilla – Attachment 152525 Details for
Bug 34035
Move translatable strings out of opac-bottom.inc: Tags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34035: (preparatory cleanup) Convert indentation to spaces.
Bug-34035-preparatory-cleanup-Convert-indentation-.patch (text/plain), 6.55 KB, created by
Owen Leonard
on 2023-06-21 14:53:43 UTC
(
hide
)
Description:
Bug 34035: (preparatory cleanup) Convert indentation to spaces.
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-06-21 14:53:43 UTC
Size:
6.55 KB
patch
obsolete
>From 85a08907b77ae9a09f29828b5a3c75d61b9e18a6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 16 Jun 2023 13:05:58 +0000 >Subject: [PATCH] Bug 34035: (preparatory cleanup) Convert indentation to > spaces. > >This patch converts tabs to spaces in tags.js. No other changes are >made. >--- > koha-tmpl/opac-tmpl/bootstrap/js/tags.js | 112 +++++++++++------------ > 1 file changed, 56 insertions(+), 56 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/tags.js b/koha-tmpl/opac-tmpl/bootstrap/js/tags.js >index 59189eeb59..5e4bab5bc5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/tags.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/tags.js >@@ -6,65 +6,65 @@ if (typeof KOHA == "undefined" || !KOHA) { > * A namespace for Tags related functions. > > $.ajaxSetup({ >- url: "/cgi-bin/koha/opac-tags.pl", >- type: "POST", >- dataType: "script" >+ url: "/cgi-bin/koha/opac-tags.pl", >+ type: "POST", >+ dataType: "script" > }); > */ > KOHA.Tags = { > add_tag_button: function(bibnum, tag){ > var mynewtag = "newtag" + bibnum; >- var mytagid = "#" + mynewtag; >+ var mytagid = "#" + mynewtag; > var mydata = {}; > mydata[mynewtag] = tag; >- var response; // AJAX from server will assign value to response. >- $.post( >- "/cgi-bin/koha/opac-tags.pl", >- mydata, >- function(data){ >- // alert("AJAX Response: " + data); >- eval(data); >- // alert("counts: " + response["added"] + response["deleted"] + response["errors"]); >- KOHA.Tags.set_tag_status( >- mytagid + "_status", >- KOHA.Tags.common_status(response["added"], response["deleted"], response["errors"]) >- ); >- if (response.alerts) { >- alert(response.alerts.join("\n\n")); >- } >- }, >- 'script' >- ); >- return false; >- }, >- common_status : function(addcount, delcount, errcount) { >- var cstat = ""; >- if (addcount && addcount > 0) {cstat += MSG_TAGS_ADDED + addcount + ". " ;} >- if (delcount && delcount > 0) {cstat += MSG_TAGS_DELETED + delcount + ". " ;} >- if (errcount && errcount > 0) {cstat += MSG_TAGS_ERRORS + errcount + ". " ;} >- return cstat; >- }, >- set_tag_status : function(tagid, newstatus) { >- $(tagid).html(newstatus); >+ var response; // AJAX from server will assign value to response. >+ $.post( >+ "/cgi-bin/koha/opac-tags.pl", >+ mydata, >+ function(data){ >+ // alert("AJAX Response: " + data); >+ eval(data); >+ // alert("counts: " + response["added"] + response["deleted"] + response["errors"]); >+ KOHA.Tags.set_tag_status( >+ mytagid + "_status", >+ KOHA.Tags.common_status(response["added"], response["deleted"], response["errors"]) >+ ); >+ if (response.alerts) { >+ alert(response.alerts.join("\n\n")); >+ } >+ }, >+ 'script' >+ ); >+ return false; >+ }, >+ common_status : function(addcount, delcount, errcount) { >+ var cstat = ""; >+ if (addcount && addcount > 0) {cstat += MSG_TAGS_ADDED + addcount + ". " ;} >+ if (delcount && delcount > 0) {cstat += MSG_TAGS_DELETED + delcount + ". " ;} >+ if (errcount && errcount > 0) {cstat += MSG_TAGS_ERRORS + errcount + ". " ;} >+ return cstat; >+ }, >+ set_tag_status : function(tagid, newstatus) { >+ $(tagid).html(newstatus); > $(tagid).show(); >- }, >- append_tag_status : function(tagid, newstatus) { >- $(tagid).append(newstatus); >+ }, >+ append_tag_status : function(tagid, newstatus) { >+ $(tagid).append(newstatus); > $(tagid).show(); >- }, >+ }, > clear_all_tag_status : function() { > $(".tagstatus").empty().hide(); > }, > >- tag_message: { >- tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);}, >- scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);}, >- badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);}, >- scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);}, >+ tag_message: { >+ tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);}, >+ scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);}, >+ badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);}, >+ scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);}, > failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " '"+arg+"'. \n"+MSG_ADD_TAG_FAILED_NOTE);}, > failed_delete : function(arg) {return (MSG_DELETE_TAG_FAILED+ " '"+arg+"'. \n"+MSG_DELETE_TAG_FAILED_NOTE);}, >- login : function(arg) {return (MSG_LOGIN_REQUIRED);} >- }, >+ login : function(arg) {return (MSG_LOGIN_REQUIRED);} >+ }, > > // Used to tag multiple items at once. The main difference > // is that status is displayed on a per item basis. >@@ -74,12 +74,12 @@ KOHA.Tags = { > var mynewtag = "newtag" + bibarray[i]; > mydata[mynewtag] = tag; > } >- var response; // AJAX from server will assign value to response. >- $.post( >- "/cgi-bin/koha/opac-tags.pl", >- mydata, >- function(data){ >- eval(data); >+ var response; // AJAX from server will assign value to response. >+ $.post( >+ "/cgi-bin/koha/opac-tags.pl", >+ mydata, >+ function(data){ >+ eval(data); > KOHA.Tags.clear_all_tag_status(); > var bibErrors = false; > >@@ -94,7 +94,7 @@ KOHA.Tags = { > var added = response[bib]["added"]; > if (added > 0) { > status = MSG_TAGS_ADDED + added + ". "; >- KOHA.Tags.set_tag_status(mytagid + "_status", status); >+ KOHA.Tags.set_tag_status(mytagid + "_status", status); > } > > // Show a link that opens an error dialog, if necessary. >@@ -105,7 +105,7 @@ KOHA.Tags = { > var errstat = "<a id=\"" + errid + "\" class=\"tagerror\" href=\"#\">"; > errstat += MSG_TAGS_ERRORS + errors.length + ". "; > errstat += "</a>"; >- KOHA.Tags.append_tag_status(mytagid + "_status", errstat); >+ KOHA.Tags.append_tag_status(mytagid + "_status", errstat); > var errmsg = ""; > for (var e = 0; e < errors.length; e++){ > if (e) { >@@ -137,9 +137,9 @@ KOHA.Tags = { > } > alert(msg); > } >- }, >- 'script' >- ); >- return false; >+ }, >+ 'script' >+ ); >+ return false; > } > }; >-- >2.30.2
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 34035
:
152416
|
152525
|
152526
|
152529
|
152530
|
156698
|
156699
|
156710
|
156711