View | Details | Raw Unified | Return to bug 8660
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (-6 / +19 lines)
Lines 725-731 input.deleteshelf:active { Link Here
725
725
726
#tagslist li { display : inline; }
726
#tagslist li { display : inline; }
727
727
728
a.tag_results_add {
728
a.tag_add {
729
    background-image: url(../../images/tag-small.png);
729
    background-image: url(../../images/tag-small.png);
730
    background-position : -1px center;
730
    background-position : -1px center;
731
    background-repeat : no-repeat;
731
    background-repeat : no-repeat;
Lines 744-750 a.tag_results_add { Link Here
744
744
745
.tag_results_input {
745
.tag_results_input {
746
    background-color: #EEE;
746
    background-color: #EEE;
747
    display: none;
748
    margin-left: 1em;
747
    margin-left: 1em;
749
    padding: 0.3em;
748
    padding: 0.3em;
750
}
749
}
Lines 1446-1454 padding-left : .4em; Link Here
1446
    padding-left:20px
1445
    padding-left:20px
1447
}
1446
}
1448
1447
1449
.searchresults .tagstatus {
1448
.tagstatus {
1450
	display: block;
1449
    color: #707070;
1451
	color: #707070;
1450
    padding: 0 4px 0 4px;
1451
    margin-left: 5px;
1452
    border: 1px solid #bcbcbc;
1453
    background-color: #ffffcc;
1454
    -webkit-border-radius: 4px;
1455
    -moz-border-radius: 4px;
1456
    border-radius: 4px;
1457
}
1458
1459
.results_summary.tagstatus {
1460
    display: inline;
1452
}
1461
}
1453
1462
1454
.results_summary .label {
1463
.results_summary .label {
Lines 1459-1465 padding-left : .4em; Link Here
1459
	font-weight: normal;
1468
	font-weight: normal;
1460
}
1469
}
1461
1470
1462
.actions a {
1471
.actions a.hold,
1472
.actions a.addtocart,
1473
.actions a.addtoshelf,
1474
.actions a.addtolist,
1475
.actions a.tag_add {
1463
	margin-left : 1em;
1476
	margin-left : 1em;
1464
	text-decoration : none;
1477
	text-decoration : none;
1465
}
1478
}
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc (-1 / +2 lines)
Lines 77-83 Link Here
77
    var MSG_TAGS_ADDED = _("Tags added: ");
77
    var MSG_TAGS_ADDED = _("Tags added: ");
78
    var MSG_TAGS_DELETED = _("Tags added: ");
78
    var MSG_TAGS_DELETED = _("Tags added: ");
79
    var MSG_TAGS_ERRORS = _("Errors: ");
79
    var MSG_TAGS_ERRORS = _("Errors: ");
80
    var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");[% END %][% END %]
80
    var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");
81
    var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");[% END %][% END %]
81
	[% IF ( OPACAmazonCoverImages ) %]$(window).load(function() {
82
	[% IF ( OPACAmazonCoverImages ) %]$(window).load(function() {
82
		 	verify_images();
83
		 	verify_images();
83
		 });[% END %]
84
		 });[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/js/tags.js (-9 / +11 lines)
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-80 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();
69
	},
68
	},
69
    clear_all_tag_status : function() {
70
        $(".tagstatus").empty().hide();
71
    },
70
72
71
	tag_message: {
73
	tag_message: {
72
	tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);},
74
	tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);},
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
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt (-56 / +40 lines)
Lines 1-3 Link Here
1
[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %]
2
1
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
2
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your cart
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your cart
3
    [% IF ( print_basket ) %]</title>
5
    [% IF ( print_basket ) %]</title>
Lines 22-28 Link Here
22
	<script type="text/javascript">
24
	<script type="text/javascript">
23
	//<![CDATA[
25
	//<![CDATA[
24
26
25
var MSG_NO_RECORD_SELECTED = _("Please select one or more items");
26
$(document).ready(function()
27
$(document).ready(function()
27
    {
28
    {
28
        $("#itemst").tablesorter({
29
        $("#itemst").tablesorter({
Lines 31-42 $(document).ready(function() Link Here
31
    $(".cb").click(function(){
32
    $(".cb").click(function(){
32
      enableCheckboxActions();
33
      enableCheckboxActions();
33
    });
34
    });
35
    enableCheckboxActions();
34
    }
36
    }
35
);
37
);
36
38
37
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
39
[% IF ( TagsInputEnabled && loggedinusername ) %]
38
var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
39
40
function tagSelected() {
40
function tagSelected() {
41
    var bibs = document.getElementById('records').value;
41
    var bibs = document.getElementById('records').value;
42
    if (bibs) {
42
    if (bibs) {
Lines 52-57 function tagCanceled() { Link Here
52
    $("#tagsel_form").hide();
52
    $("#tagsel_form").hide();
53
    $("#tagsel_tag").show();
53
    $("#tagsel_tag").show();
54
    $("#tag_hides").show();
54
    $("#tag_hides").show();
55
    $("#tagsel_new").val("");
56
    $(".tagstatus").empty().hide();
55
}
57
}
56
58
57
function tagAdded() {
59
function tagAdded() {
Lines 76-82 function tagAdded() { Link Here
76
    KOHA.Tags.add_multitags_button(bibs, tag);
78
    KOHA.Tags.add_multitags_button(bibs, tag);
77
    return false;
79
    return false;
78
}
80
}
79
[% END %][% END %][% END %]
81
[% END %]
82
80
	$(document).ready(function(){
83
	$(document).ready(function(){
81
		$("#CheckAll").click(function(){
84
		$("#CheckAll").click(function(){
82
		var checked = [];
85
		var checked = [];
Lines 99-110 function tagAdded() { Link Here
99
	        return false;
102
	        return false;
100
	    });
103
	    });
101
104
102
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
103
          $("#tagsel_button").click(function(){
104
              tagAdded();
105
              return false;
106
          });
107
[% END %][% END %][% END %]
108
	});
105
	});
109
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
106
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
110
    function holdSel() {
107
    function holdSel() {
Lines 148-177 function enableCheckboxActions(){ Link Here
148
    <li><a class="hide close" href="opac-basket.pl">Hide window</a></li>
145
    <li><a class="hide close" href="opac-basket.pl">Hide window</a></li>
149
</ul>
146
</ul>
150
</div>
147
</div>
148
[% END %]
149
150
[% UNLESS ( print_basket ) %]
151
<div id="selections-toolbar">
152
    <a id="CheckAll" href="#">Select all</a>
153
    <a id="CheckNone" href="#">Clear all</a>
154
    <span class="sep">|</span>
155
    <span class="links" id="tag_hides">
156
        <span id="selections">Select titles to: </span>
157
        <a href="#" class="deleteshelf disabled" onclick="delSelRecords(); return false;">Remove</a>
158
        [% IF ( opacuserlogin ) %]
159
          [% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]
160
          <a href="#" class="newshelf disabled" onclick="addSelToShelf(); return false;">Add to a list</a>
161
          [% END %][% END %]
162
          [% IF ( RequestOnOpac ) %]<a href="#" class="hold disabled" onclick="holdSel(); return false;">Place hold</a>[% END %]
163
          [% IF ( TagsInputEnabled && loggedinusername ) %]
164
          <a href="#" id="tagsel_tag" class="disabled" onclick="tagSelected(); return false;">Tag</a>
165
          [% END %]
151
        [% END %]
166
        [% END %]
167
    </span>
168
    [% IF ( TagsInputEnabled && loggedinusername ) %]
169
    <span id="tagsel_form" style="display:none">
170
        <label for="tagsel_new">New tag:</label>
171
        <input name="tagsel_new" id="tagsel_new" maxlength="100" />
172
        <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add" onclick="tagAdded(); return false;" />
173
        <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;">Cancel</a>
174
    </span>
175
    [% END %]
176
</div>
177
[% END %]
152
178
153
[% IF ( verbose ) %]
179
[% IF ( verbose ) %]
154
	[% UNLESS ( print_basket ) %]<div id="selections-toolbar"><a id="CheckAll" href="#">Select all</a> <a id="CheckNone" href="#">Clear all</a> <span class="sep">|</span> <span class="links"><span id="selections">Select titles to: </span>
155
<span id="tag_hides">
156
<a href="#" class="deleteshelf disabled" onclick="delSelRecords(); return false;">Remove</a>
157
[% IF ( opacuserlogin ) %]
158
    [% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]
159
         | <a href="#" class="newshelf disabled" onclick="addSelToShelf(); return false;">Add to a list</a>
160
    [% END %][% END %]
161
    [% IF ( RequestOnOpac ) %]| <a href="#" class="hold disabled" onclick="holdSel(); return false;">Place hold</a>[% END %]
162
    [% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
163
    | <a href="#" id="tagsel_tag" class="disabled" onclick="tagSelected(); return false;">Tag</a>[% END %][% END %]
164
[% END %]
165
</span>
166
     <span id="tagsel_form" style="display:none">
167
       <label for="tagsel_new" style="display:inline">New&nbsp;tag:</label>
168
       <input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/>
169
       <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button"
170
           type="submit" value="Add" style="display:inline" />
171
       <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
172
     </span>
173
     </span>
174
</div>[% END %]
175
            <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
180
            <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
176
    [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
181
    [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
177
    <h3>
182
    <h3>
Lines 324-353 function enableCheckboxActions(){ Link Here
324
            </form>
329
            </form>
325
330
326
[% ELSE %]
331
[% ELSE %]
327
[% UNLESS ( print_basket ) %]
328
<form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
332
<form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
329
<div id="selections-toolbar">
330
    <a id="CheckAll" href="#">Select all</a>
331
    <a id="CheckNone" href="#">Clear all</a>
332
    <span class="sep">|</span> <span class="links"><span id="selections">Select titles to: </span>
333
        <a href="#" class="deleteshelf disabled" onclick="delSelRecords(); return false;">Remove</a>
334
    [% IF ( opacuserlogin ) %]
335
        [% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]
336
          <a href="#" class="newshelf disabled" onclick="addSelToShelf(); return false;">Add to a list</a>
337
        [% END %][% END %]
338
        [% IF ( RequestOnOpac ) %] <a href="#" class="hold disabled" onclick="holdSel(); return false;">Place hold</a>[% END %]
339
        [% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
340
         <a href="#" class="disabled" id="tagsel_tag" onclick="tagSelected(); return false;">Tag</a>[% END %][% END %]
341
    [% END %]
342
    </span>
343
         [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<span id="tagsel_form" style="display:none">
344
           <label for="tagsel_new" style="display:inline">New&nbsp;tag:</label>
345
           <input name="tagsel_new" id="tagsel_new" maxlength="100"  style="display:inline"/>
346
           <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add"  style="display:inline"/>
347
           <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
348
         </span>[% END %][% END %][% END %]</span>
349
</div>
350
[% END %]
351
    <table id="itemst">
333
    <table id="itemst">
352
	<thead><tr>
334
	<thead><tr>
353
	    [% UNLESS ( print_basket ) %]<th>&nbsp;</th>[% END %]
335
	    [% UNLESS ( print_basket ) %]<th>&nbsp;</th>[% END %]
Lines 373-379 function enableCheckboxActions(){ Link Here
373
                </a>
355
                </a>
374
                <!-- COinS / Openurl -->
356
                <!-- COinS / Openurl -->
375
		    <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear %]&amp;rft.tpages=[% BIBLIO_RESULT.size %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition %]&amp;rft.series=[% BIBLIO_RESULT.series %]&amp;rft.genre="></span>
357
		    <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear %]&amp;rft.tpages=[% BIBLIO_RESULT.size %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition %]&amp;rft.series=[% BIBLIO_RESULT.series %]&amp;rft.genre="></span>
376
		    [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<div id="newtag[% BIBLIO_RESULT.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>[% END %][% END %][% END %]
358
            [% IF ( TagsInputEnabled && loggedinusername ) %]
359
            <span id="newtag[% BIBLIO_RESULT.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
360
            [% END %]
377
    	    </td>
361
    	    </td>
378
	    <td>[% BIBLIO_RESULT.author %]</td>
362
	    <td>[% BIBLIO_RESULT.author %]</td>
379
	    <td>
363
	    <td>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-31 / +41 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnDetail ) %]
3
[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnDetail ) %]
2
4
3
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
5
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
4
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
Lines 28-45 Link Here
28
30
29
     $(document).ready(function() { 
31
     $(document).ready(function() { 
30
        $('#bibliodescriptions').tabs();
32
        $('#bibliodescriptions').tabs();
31
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]$("#tagform").hide();
33
32
        $("#addtagl").show();
34
[% IF ( TagsInputEnabled && loggedinusername ) %]
33
        $("#addtagl a").click(function(){
35
        $(".tag_add").click(function(){
34
            $("#addtagl").hide();
36
            var thisid = $(this).attr("id");
35
            $("#tagform, #tagform a").show();
37
            thisid = thisid.replace("tag_add","");
38
            $(this).hide();
39
            $("#tagform"+thisid).show();
40
            $("#newtag"+thisid).focus();
41
            $("#newtag"+thisid+"_status").empty().hide();
42
            return false;
43
        });
44
        $(".cancel_tag_add").click(function(){
45
            var thisid = $(this).attr("id");
46
            thisid = thisid.replace("cancel","");
47
            $("#tagform"+thisid).hide();
48
            $("#tag_add"+thisid).show();
49
            $("#newtag"+thisid).val("");
50
            $("#newtag"+thisid+"_status").empty().hide();
36
            return false;
51
            return false;
37
        });
52
        });
38
        $("#tagform a").click(function(){
53
        $(".tagbutton").click(function(){
39
            $("#addtagl").show();
54
            var thisid = $(this).attr("title");
40
            $("#tagform").hide();
55
            var tag = $("#newtag"+thisid).val();
56
            if (!tag || (tag == "")) {
57
                alert(MSG_NO_TAG_SPECIFIED);
58
                return false;
59
            }
60
            KOHA.Tags.add_tag_button(thisid, tag);
41
            return false;
61
            return false;
42
        });[% END %][% END %][% END %]
62
        });
63
[% END %]
64
43
        $("#holdingst").tablesorter({[% IF ( dateformat == 'metric' ) %]
65
        $("#holdingst").tablesorter({[% IF ( dateformat == 'metric' ) %]
44
    dateFormat: 'uk',[% END %]
66
    dateFormat: 'uk',[% END %]
45
            widgets : ['zebra'],
67
            widgets : ['zebra'],
Lines 57-65 Link Here
57
        [% IF ( NovelistSelectProfile ) %]
79
        [% IF ( NovelistSelectProfile ) %]
58
        novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
80
        novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
59
        [% END %]
81
        [% END %]
60
	[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
61
        $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %]
62
63
82
64
    [% IF ( OpacBrowseResults && busc ) %]
83
    [% IF ( OpacBrowseResults && busc ) %]
65
        if (arrPagination.length > 0) {
84
        if (arrPagination.length > 0) {
Lines 269-277 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
269
 });
288
 });
270
//]]>
289
//]]>
271
</script>
290
</script>
272
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<style type="text/css">
273
    #addtagl { display: none; }
274
</style>[% END %][% END %][% END %]
275
<style type="text/css">
291
<style type="text/css">
276
.branch-info-tooltip {
292
.branch-info-tooltip {
277
  display: none;
293
  display: none;
Lines 465-472 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
465
	</span>
481
	</span>
466
[% END %]
482
[% END %]
467
483
468
[% IF ( TagsEnabled ) %]
484
[% IF ( TagsShowEnabled ) %]
469
    [% IF ( TagsShowOnDetail ) %]
470
        <div class="results_summary">
485
        <div class="results_summary">
471
        [% IF ( TagLoop ) %]
486
        [% IF ( TagLoop ) %]
472
        <span class="label">Tags from this library:</span>
487
        <span class="label">Tags from this library:</span>
Lines 477-504 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
477
    [% END %]
492
    [% END %]
478
        </div>
493
        </div>
479
[% END %]
494
[% END %]
480
[% IF ( opacuserlogin ) %]
495
[% IF ( TagsInputEnabled ) %]
481
  [% IF ( loggedinusername ) %]
482
   [% IF ( TagsEnabled ) %]
483
      [% IF ( TagsInputOnDetail ) %]
484
      <div class="results_summary">
496
      <div class="results_summary">
485
        <span class="label" id="addtagl"><a href="#">Add</a></span>
497
        [% IF ( loggedinusername ) %]
486
         <form name="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" id="tagform">
498
            <a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add</a>
487
                <label for="newtag[% biblionumber %]">New:</label><input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" />
499
            <form id="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" style="display:none;">
500
                <label for="newtag[% biblionumber %]">New tag(s):</label>
501
                <input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" type="text"/>
488
                <input name="tagbutton" class="input tagbutton" title="[% biblionumber %]" type="submit" value="Add" />
502
                <input name="tagbutton" class="input tagbutton" title="[% biblionumber %]" type="submit" value="Add" />
489
                <a href="#">Cancel</a>
503
                <a class="cancel_tag_add" id="cancel[% biblionumber %]" href="#">(done)</a>
490
            </form>
504
            </form>
491
            <span id="newtag[% biblionumber %]_status" class="tagstatus" style="display:none;">
505
            <span id="newtag[% biblionumber %]_status" class="tagstatus" style="display:none;">
492
                Tag status here.
506
                Tag status here.
493
            </span>
507
            </span>
494
            <br />
508
        [% ELSE %]
495
            [% ELSE %]
509
            <span id="login4tags">Log in to add tags.</span>
496
                <span id="login4tags" class="tagstatus">Log in to add tags.</span>
497
            [% END %]
498
        [% END %]
510
        [% END %]
499
        </div>
511
        </div>
500
    [% END %]
501
   [% END %]
502
[% END %]
512
[% END %]
503
513
504
        [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsSeries ) %][% IF ( SyndeticsSERIES1Exists ) %]
514
        [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsSeries ) %][% IF ( SyndeticsSERIES1Exists ) %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-41 / +46 lines)
Lines 1-3 Link Here
1
[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnList ) %]
2
[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %]
3
1
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
2
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
5
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
3
[% IF ( searchdesc ) %]
6
[% IF ( searchdesc ) %]
Lines 38-46 function holdBiblioNums(numList) { Link Here
38
    // numList: biblio numbers separated by "/"
41
    // numList: biblio numbers separated by "/"
39
    $("#hold_form_biblios").attr("value", numList);
42
    $("#hold_form_biblios").attr("value", numList);
40
    $("#hold_form").submit();
43
    $("#hold_form").submit();
41
}[% END %]
44
}[% END %][% END %]
42
45
43
[% IF ( TagsEnabled ) %]
46
[% IF ( TagsInputEnabled && loggedinusername ) %]
44
function tagSelected() {
47
function tagSelected() {
45
    var checkedBoxes = $(".searchresults :checkbox:checked");
48
    var checkedBoxes = $(".searchresults :checkbox:checked");
46
    if ($(checkedBoxes).size() == 0) {
49
    if ($(checkedBoxes).size() == 0) {
Lines 56-61 function tagCanceled() { Link Here
56
    $("#tagsel_form").hide();
59
    $("#tagsel_form").hide();
57
    $("#tagsel_tag").show();
60
    $("#tagsel_tag").show();
58
    $("#sort_by").show();
61
    $("#sort_by").show();
62
    $("#tagsel_new").val("");
63
    $("#tagsel_status, .tagstatus").empty().hide();
59
}
64
}
60
65
61
function tagAdded() {
66
function tagAdded() {
Lines 67-72 function tagAdded() { Link Here
67
72
68
    var tag = $("#tagsel_new").val();
73
    var tag = $("#tagsel_new").val();
69
    if (!tag || (tag == "")) {
74
    if (!tag || (tag == "")) {
75
        alert(MSG_NO_TAG_SPECIFIED);
70
        return false;
76
        return false;
71
    }
77
    }
72
78
Lines 78-84 function tagAdded() { Link Here
78
84
79
    KOHA.Tags.add_multitags_button(bibs, tag);
85
    KOHA.Tags.add_multitags_button(bibs, tag);
80
    return false;
86
    return false;
81
}[% END %][% END %]
87
}[% END %]
82
[% IF ( OpacHighlightedWords ) %]
88
[% IF ( OpacHighlightedWords ) %]
83
var q_array = new Array();  // holds search terms if available
89
var q_array = new Array();  // holds search terms if available
84
90
Lines 155-161 $(document).ready(function(){ Link Here
155
    });
161
    });
156
    [% END %]
162
    [% END %]
157
[% END %]
163
[% END %]
158
    [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %]$("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");[% END %][% END %]
159
164
160
    function cartList(){
165
    function cartList(){
161
        if($("#addto").find("option:selected").attr("value") == "addtolist"){
166
        if($("#addto").find("option:selected").attr("value") == "addtolist"){
Lines 207-216 $(document).ready(function(){ Link Here
207
        $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;});
212
        $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;});
208
        $("#highlight_toggle_off").show().click(function() {highlightOff();});[% END %][% END %]
213
        $("#highlight_toggle_off").show().click(function() {highlightOff();});[% END %][% END %]
209
214
210
[% IF ( opacuserlogin ) %]    [% IF ( TagsEnabled ) %]
215
[% IF ( TagsInputEnabled && loggedinusername ) %]
211
        $(".tagbutton").click(KOHA.Tags.add_tag_button);
212
        [% IF ( TagsInputOnList ) %]
213
        [% IF ( loggedinusername ) %]
214
            $("#tagsel_tag").click(function(){
216
            $("#tagsel_tag").click(function(){
215
                tagSelected();
217
                tagSelected();
216
                return false;
218
                return false;
Lines 224-254 $(document).ready(function(){ Link Here
224
                return false;
226
                return false;
225
            });
227
            });
226
228
227
            $(".tag_results_add").click(function(){
229
            $(".tag_add").click(function(){
228
                var thisid = $(this).attr("id");
230
                var thisid = $(this).attr("id");
229
                thisid = thisid.replace("tag_add","");
231
                thisid = thisid.replace("tag_add","");
230
                $(this).hide();
232
                $(this).hide();
231
                $("#tagform"+thisid).show();
233
                $("#tagform"+thisid).show();
232
                $("#newtag"+thisid).focus();
234
                $("#newtag"+thisid).focus();
235
                $("#newtag"+thisid+"_status").empty().hide();
233
                return false;
236
                return false;
234
            })
237
            });
235
236
            $(".cancel_tag_add").click(function(){
238
            $(".cancel_tag_add").click(function(){
237
                var thisid = $(this).attr("id");
239
                var thisid = $(this).attr("id");
238
                thisid = thisid.replace("cancel","");
240
                thisid = thisid.replace("cancel","");
239
                $(this).parent().hide();
241
                $("#tagform"+thisid).hide();
240
                $("#tag_add"+thisid).show();
242
                $("#tag_add"+thisid).show();
243
                $("#newtag"+thisid).val("");
244
                $("#newtag"+thisid+"_status").empty().hide();
241
                return false;
245
                return false;
242
            })
246
            });
243
247
            $(".tagbutton").click(function(){
244
        [% ELSE %]
248
                var thisid = $(this).attr("title");
245
            $("#tagsel_tag").click(function(){
249
                var tag = $("#newtag"+thisid).val();
246
                window.location = "/cgi-bin/koha/opac-user.pl";
250
                if (!tag || (tag == "")) {
251
                    alert(MSG_NO_TAG_SPECIFIED);
252
                    return false;
253
                }
254
                KOHA.Tags.add_tag_button(thisid, tag);
247
                return false;
255
                return false;
248
            });
256
            });
249
        [% END %]
257
[% END %]
250
        [% END %]
251
    [% END %][% END %]
252
    [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
258
    [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
253
    [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
259
    [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
254
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
260
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
Lines 373-394 $(document).ready(function(){ Link Here
373
            <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span>
379
            <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span>
374
            <div id="holdDetails"></div>
380
            <div id="holdDetails"></div>
375
381
376
            [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
382
            [% IF ( TagsInputEnabled && loggedinusername ) %]
377
                        [% IF ( TagsInputOnList ) %]
383
                            <span id="tagsel_span">
378
                            <span id="tagsel_span"></span>
384
                              <input id="tagsel_tag" class="submit" type="submit" value="Tag"/>
379
                          [% IF ( loggedinusername ) %]
385
                            </span>
380
                            <span id="tagsel_form" style="display:none">
386
                            <span id="tagsel_form" style="display:none">
381
                              <label for="tagsel_new">New tag:</label>
387
                              <label for="tagsel_new">New tag:</label>
382
                              <input name="tagsel_new" id="tagsel_new" maxlength="100" />
388
                              <input name="tagsel_new" id="tagsel_new" maxlength="100" />
383
                              <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" />
389
                              <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add" />
384
                              <a href="#" id="tagsel_cancel">Cancel</a>
390
                              <a href="#" id="tagsel_cancel">(done)</a>
385
                            </span>
391
                            </span>
386
                            <span id="tagsel_status" class="tagsel_tatus" style="display:none;">
392
                            <span id="tagsel_status" class="tagsel_tatus" style="display:none;">
387
                              Tag status here.
393
                              Tag status here.
388
                            </span>
394
                            </span>
389
                          [% END %]
395
            [% END %]
390
                        [% END %]
391
                [% END %][% END %][% END %]
392
        </div>
396
        </div>
393
397
394
        </td></tr>
398
        </td></tr>
Lines 522-539 $(document).ready(function(){ Link Here
522
                [% END %]
526
                [% END %]
523
527
524
                [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %]
528
                [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %]
525
                [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %]
529
                [% IF ( TagsShowEnabled ) %]
526
                                [% IF ( TagsShowOnList ) %]
527
                                [% IF ( SEARCH_RESULT.TagLoop.size ) %]
530
                                [% IF ( SEARCH_RESULT.TagLoop.size ) %]
528
                                        <div class="results_summary"><span class="label">Tags:</span>
531
                                        <div class="results_summary"><span class="label">Tags:</span>
529
                                        <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
532
                                        <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
530
                                            [% END %]
533
                                            [% END %]
531
                                        </ul>
534
                                        </ul>
532
                                   [% END %]
535
                                        </div>
533
                                    [% IF ( SEARCH_RESULT.TagLoop.size ) %]
534
                                    </div>[% END %]
535
                                [% END %]
536
                                [% END %]
536
                                [% END %][% END %]
537
                [% END %]
537
                [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<span class="results_summary"><span class="label">Match:</span> [% SEARCH_RESULT.searchhighlightblob %]</span>[% END %]
538
                [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<span class="results_summary"><span class="label">Match:</span> [% SEARCH_RESULT.searchhighlightblob %]</span>[% END %]
538
539
539
540
Lines 578-591 $(document).ready(function(){ Link Here
578
                    [% END %]
579
                    [% END %]
579
                [% END %]
580
                [% END %]
580
581
581
                [% IF ( TagsInputOnList ) %]
582
                [% IF ( TagsInputEnabled ) %]
582
                    [% IF ( loggedinusername ) %]
583
                    [% IF ( loggedinusername ) %]
583
                        <a class="tag_results_add" id="tag_add[% SEARCH_RESULT.biblionumber %]" href="#">Add tag</a>
584
                        <a class="tag_add" id="tag_add[% SEARCH_RESULT.biblionumber %]" href="#">Add tag</a>
584
                        <span id="tagform[% SEARCH_RESULT.biblionumber %]" class="tag_results_input"><label for="newtag[% SEARCH_RESULT.biblionumber %]">New tag(s):</label><input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" />
585
                        <span id="tagform[% SEARCH_RESULT.biblionumber %]" class="tag_results_input" style="display:none;">
585
                        <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" /> <a class="cancel_tag_add" id="cancel[% SEARCH_RESULT.biblionumber %]" href="#">Cancel</a>
586
                          <label for="newtag[% SEARCH_RESULT.biblionumber %]">New tag(s):</label>
587
                          <input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" />
588
                          <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" />
589
                          <a class="cancel_tag_add" id="cancel[% SEARCH_RESULT.biblionumber %]" href="#">(done)</a>
590
                        </span>
586
                        <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;">
591
                        <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;">
587
                        Tag status here.
592
                          Tag status here.
588
                        </span></span>
593
                        </span>
589
                    [% ELSIF ( loop.first ) %]<span id="login4tags">Log in to add tags.</span>
594
                    [% ELSIF ( loop.first ) %]<span id="login4tags">Log in to add tags.</span>
590
                    [% END %]
595
                    [% END %]
591
                [% END %]
596
                [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt (-55 / +77 lines)
Lines 1-12 Link Here
1
[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnList ) %]
2
[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %]
3
1
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;   [% IF ( viewshelf ) %]Contents of [% shelfname |html %][% ELSE %]Your lists[% END %][% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;   [% IF ( viewshelf ) %]Contents of [% shelfname |html %][% ELSE %]Your lists[% END %][% INCLUDE 'doc-head-close.inc' %]
2
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
3
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
4
<script type="text/javascript">
7
<script type="text/javascript">
5
//<![CDATA[
8
//<![CDATA[
6
var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
7
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
9
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
8
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
10
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
9
var MSG_NO_RECORD_SELECTED = _("Please select one or more items");
10
11
11
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
12
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
12
function holdSelections() {
13
function holdSelections() {
Lines 24-30 function holdSelections() { Link Here
24
    }
25
    }
25
}
26
}
26
[% END %][% END %]
27
[% END %][% END %]
27
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]function tagSelected() {
28
[% IF ( TagsInputEnabled && loggedinusername ) %]
29
function tagSelected() {
28
    var checkedBoxes = $("input:checkbox:checked");
30
    var checkedBoxes = $("input:checkbox:checked");
29
    if ($(checkedBoxes).size()) {
31
    if ($(checkedBoxes).size()) {
30
        $("#tagsel_tag").hide();
32
        $("#tagsel_tag").hide();
Lines 39-44 function tagCanceled() { Link Here
39
    $("#tagsel_form").hide();
41
    $("#tagsel_form").hide();
40
    $("#tagsel_tag").show();
42
    $("#tagsel_tag").show();
41
    $(".tag_hides").show();
43
    $(".tag_hides").show();
44
    $("#tagsel_new").val("");
45
    $(".tagstatus").empty().hide();
42
}
46
}
43
47
44
function tagAdded() {
48
function tagAdded() {
Lines 62-68 function tagAdded() { Link Here
62
66
63
    KOHA.Tags.add_multitags_button(bibs, tag);
67
    KOHA.Tags.add_multitags_button(bibs, tag);
64
    return false;
68
    return false;
65
}[% END %][% END %][% END %]
69
}[% END %]
66
70
67
function enableCheckboxActions(){
71
function enableCheckboxActions(){
68
    // Enable/disable controls if checkboxes are checked
72
    // Enable/disable controls if checkboxes are checked
Lines 102-136 $(function() { Link Here
102
    $(".cb").click(function(){
106
    $(".cb").click(function(){
103
      enableCheckboxActions();
107
      enableCheckboxActions();
104
    });
108
    });
109
    enableCheckboxActions();
105
110
106
    [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
111
[% IF ( TagsInputEnabled && loggedinusername ) %]
107
          $("#addtags").click(function(){
112
        $("#tagsel_tag").click(function(){
108
            tagSelected();
113
            tagSelected();
109
            return false;
114
            return false;
110
          });
115
        });
111
          $("#addtags").html("<a id=\"tagsel_tag\" href=\"#\" class=\"disabled\">"+_("Tag")+"<\/a> ");
116
        $("#tagsel_cancel").click(function(){
112
117
            tagCanceled();
113
        $(".tagbutton").click(KOHA.Tags.add_tag_button);
118
            return false;
114
      [% IF ( loggedinusername ) %]
119
        });
115
            $("#tagsel_tag").click(function(){
120
        $("#tagsel_button").click(function(){
116
                tagSelected();
121
            tagAdded();
117
                return false;
122
            return false;
118
            });
123
        });
119
            $("#tagsel_cancel").click(function(){
124
120
                tagCanceled();
125
        $(".tag_add").click(function(){
121
                return false;
126
            var thisid = $(this).attr("id");
122
            });
127
            thisid = thisid.replace("tag_add","");
123
            $("#tagsel_button").click(function(){
128
            $(this).hide();
124
                tagAdded();
129
            $("#tagform"+thisid).show();
125
                return false;
130
            $("#newtag"+thisid).focus();
126
            });
131
            $("#newtag"+thisid+"_status").empty().hide();
127
        [% ELSE %]
132
            return false;
128
            $("#tagsel_tag").click(function(){
133
        });
129
                window.location = "/cgi-bin/koha/opac-user.pl";
134
        $(".cancel_tag_add").click(function(){
130
                return false;
135
            var thisid = $(this).attr("id");
131
            });
136
            thisid = thisid.replace("cancel","");
132
        [% END %]
137
            $("#tagform"+thisid).hide();
133
        [% END %][% END %][% END %]
138
            $("#tag_add"+thisid).show();
139
            $("#newtag"+thisid).val("");
140
            $("#newtag"+thisid+"_status").empty().hide();
141
            return false;
142
        });
143
        $(".tagbutton").click(function(){
144
          var thisid = $(this).attr("title");
145
          var tag = $("#newtag"+thisid).val();
146
          if (!tag || (tag == "")) {
147
              alert(MSG_NO_TAG_SPECIFIED);
148
              return false;
149
          }
150
          KOHA.Tags.add_tag_button(thisid, tag);
151
          return false;
152
        });
153
[% END %]
134
  [% IF ( loggedinusername && allowremovingitems ) %]
154
  [% IF ( loggedinusername && allowremovingitems ) %]
135
  $("#myform").submit(function(){
155
  $("#myform").submit(function(){
136
    var checkedBoxes = $(".checkboxed input:checkbox:checked");
156
    var checkedBoxes = $(".checkboxed input:checkbox:checked");
Lines 283-298 $(function() { Link Here
283
                                      [% IF ( RequestOnOpac ) %]
303
                                      [% IF ( RequestOnOpac ) %]
284
                                        <span id="placehold"></span>
304
                                        <span id="placehold"></span>
285
                                      [% END %]
305
                                      [% END %]
286
                                      [% IF ( loggedinusername ) %]
306
                                      [% IF ( TagsInputEnabled && loggedinusername ) %]
287
                                        [% IF ( TagsEnabled ) %]
307
                                        <span id="addtags">
288
                                          <span id="addtags"></span>
308
                                          <a id="tagsel_tag" href="#" class="disabled">Tag</a>
289
                                          <span id="tagsel_form" style="display:none">
309
                                        </span>
290
                                          <label for="tagsel_new" style="display:inline">New&nbsp;tag:</label>
310
                                        <span id="tagsel_form" style="display:none">
291
                                          <input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/>
311
                                          <label for="tagsel_new">New tag:</label>
292
                                          <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" style="display:inline" />
312
                                          <input name="tagsel_new" id="tagsel_new" maxlength="100" />
293
                                          <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
313
                                          <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" />
294
                                          </span>
314
                                          <a href="#" id="tagsel_cancel">Cancel</a>
295
                                        [% END %]
315
                                        </span>
296
                                      [% END %]
316
                                      [% END %]
297
                    [% IF ( loggedinusername && allowremovingitems ) %]<span id="removeitems"></span>[% END %]</span>
317
                    [% IF ( loggedinusername && allowremovingitems ) %]<span id="removeitems"></span>[% END %]</span>
298
                  </div>
318
                  </div>
Lines 350-357 $(function() { Link Here
350
          [% END %]
370
          [% END %]
351
          [% END %][% ELSE %]This record has no items.[% END %]</span>
371
          [% END %][% ELSE %]This record has no items.[% END %]</span>
352
            [% END %]
372
            [% END %]
353
        [% IF ( TagsEnabled ) %]
373
          [% IF ( TagsShowEnabled ) %]
354
          [% IF ( TagsShowOnList ) %]
355
            [% IF ( itemsloo.TagLoop.size ) %]
374
            [% IF ( itemsloo.TagLoop.size ) %]
356
              <div class="results_summary">
375
              <div class="results_summary">
357
              <span class="label">Tags:</span>
376
              <span class="label">Tags:</span>
Lines 361-384 $(function() { Link Here
361
              </div>
380
              </div>
362
            [% END %]
381
            [% END %]
363
          [% END %]
382
          [% END %]
364
                [% IF ( TagsInputOnList ) %]
383
365
          [% IF ( loggedinusername ) %]
384
    <span class="results_summary actions">
366
                        <label for="newtag[% itemsloo.biblionumber %]">New tag:</label>
385
        <span class="label">Actions:</span>
386
387
        [% IF ( TagsInputEnabled ) %]
388
              [% IF ( loggedinusername ) %]
389
                    <a class="tag_add" id="tag_add[% itemsloo.biblionumber %]" href="#">Add tag</a>
390
                    <span id="tagform[% itemsloo.biblionumber %]" class="tag_results_input" style="display:none;">
391
                        <label for="newtag[% itemsloo.biblionumber %]">New tag(s):</label>
367
                        <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
392
                        <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
368
                        <input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
393
                        <input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
394
                        <a class="cancel_tag_add" id="cancel[% itemsloo.biblionumber %]" href="#">(done)</a>
395
                    </span>
369
                    <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
396
                    <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
370
                        Tag status here.
397
                        Tag status here.
371
                    </span>
398
                    </span>
372
                    [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
399
              [% ELSIF ( loop.first ) %]
373
                  [% END %]
400
                    <span class="tagstatus" id="login4tags">Log in to add tags.</span>
374
                [% ELSE %]
401
              [% END %]
375
            [% IF ( loggedinusername ) %]
402
          [% END %]
376
              <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none;">Tag status here.</span>
377
            [% END %]
378
                [% END %]
379
        [% END %]
380
403
381
<span class="results_summary actions"><span class="label">Actions:</span>
382
      [% IF ( RequestOnOpac ) %]
404
      [% IF ( RequestOnOpac ) %]
383
          [% UNLESS ( itemsloo.norequests ) %]
405
          [% UNLESS ( itemsloo.norequests ) %]
384
            [% IF ( opacuserlogin ) %]
406
            [% IF ( opacuserlogin ) %]
Lines 393-399 $(function() { Link Here
393
          [% END %]
415
          [% END %]
394
        [% END %]
416
        [% END %]
395
417
396
        [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtolist" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a>
418
        [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a>
397
          [% END %][% END %][% END %]
419
          [% END %][% END %][% END %]
398
          [% IF ( opacbookbag ) %]
420
          [% IF ( opacbookbag ) %]
399
              [% IF ( itemsloo.incart ) %]
421
              [% IF ( itemsloo.incart ) %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt (-2 / +3 lines)
Lines 63-69 $.tablesorter.addParser({ Link Here
63
            .click(function(){
63
            .click(function(){
64
              $("#myform").submit();
64
              $("#myform").submit();
65
              return false;
65
              return false;
66
            });[% END %]
66
            });
67
            enableCheckboxActions();
68
            [% END %]
67
       });
69
       });
68
70
69
      function Check(f) {
71
      function Check(f) {
70
- 

Return to bug 8660