Lines 26-37
if (typeof(readCookie) == "undefined") {
Link Here
|
26 |
} |
26 |
} |
27 |
} |
27 |
} |
28 |
KOHA.Tags = { |
28 |
KOHA.Tags = { |
29 |
add_tag_button: function(){ |
29 |
add_tag_button: function(bibnum, tag){ |
30 |
var mybibnum = $(this).attr("title"); |
30 |
var mynewtag = "newtag" + bibnum; |
31 |
var mynewtag = "newtag" + mybibnum; |
|
|
32 |
var mytagid = "#" + mynewtag; |
31 |
var mytagid = "#" + mynewtag; |
33 |
var mydata = {CGISESSID: readCookie('CGISESSID')}; // Someday this should be OPACSESSID |
32 |
var mydata = {CGISESSID: readCookie('CGISESSID')}; // Someday this should be OPACSESSID |
34 |
mydata[mynewtag] = $(mytagid).val(); // need [bracket] for variable property id |
33 |
mydata[mynewtag] = tag; // need [bracket] for variable property id |
35 |
var response; // AJAX from server will assign value to response. |
34 |
var response; // AJAX from server will assign value to response. |
36 |
$.post( |
35 |
$.post( |
37 |
"/cgi-bin/koha/opac-tags.pl", |
36 |
"/cgi-bin/koha/opac-tags.pl", |
Lines 61-71
KOHA.Tags = {
Link Here
|
61 |
}, |
60 |
}, |
62 |
set_tag_status : function(tagid, newstatus) { |
61 |
set_tag_status : function(tagid, newstatus) { |
63 |
$(tagid).html(newstatus); |
62 |
$(tagid).html(newstatus); |
64 |
$(tagid).css({display:"inline"}); |
63 |
$(tagid).show(); |
65 |
}, |
64 |
}, |
66 |
append_tag_status : function(tagid, newstatus) { |
65 |
append_tag_status : function(tagid, newstatus) { |
67 |
$(tagid).append(newstatus); |
66 |
$(tagid).append(newstatus); |
68 |
$(tagid).css({display:"inline"}); |
67 |
$(tagid).show(); |
|
|
68 |
}, |
69 |
clear_all_tag_status : function() { |
70 |
$(".tagstatus").empty().hide(); |
69 |
}, |
71 |
}, |
70 |
|
72 |
|
71 |
tag_message: { |
73 |
tag_message: { |
Lines 73-80
KOHA.Tags = {
Link Here
|
73 |
scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);}, |
75 |
scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);}, |
74 |
badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);}, |
76 |
badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);}, |
75 |
scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);}, |
77 |
scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);}, |
76 |
failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " "+arg+" "+MSG_ADD_TAG_FAILED_NOTE);}, |
78 |
failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " '"+arg+"'. \n"+MSG_ADD_TAG_FAILED_NOTE);}, |
77 |
failed_delete : function(arg) {return (MSG_DELETE_TAG_FAILED+ " "+arg+" "+MSG_DELETE_TAG_FAILED_NOTE);}, |
79 |
failed_delete : function(arg) {return (MSG_DELETE_TAG_FAILED+ " '"+arg+"'. \n"+MSG_DELETE_TAG_FAILED_NOTE);}, |
78 |
login : function(arg) {return (MSG_LOGIN_REQUIRED);} |
80 |
login : function(arg) {return (MSG_LOGIN_REQUIRED);} |
79 |
}, |
81 |
}, |
80 |
|
82 |
|
Lines 92-98
KOHA.Tags = {
Link Here
|
92 |
mydata, |
94 |
mydata, |
93 |
function(data){ |
95 |
function(data){ |
94 |
eval(data); |
96 |
eval(data); |
95 |
$(".tagstatus").empty(); |
97 |
KOHA.Tags.clear_all_tag_status(); |
96 |
var bibErrors = false; |
98 |
var bibErrors = false; |
97 |
|
99 |
|
98 |
// Display the status for each tagged bib |
100 |
// Display the status for each tagged bib |
99 |
- |
|
|