Lines 1-98
Link Here
|
1 |
<div id="toolbar"> |
1 |
<script type="text/javascript"> |
2 |
<script type="text/javascript"> |
2 |
//<![CDATA[ |
3 |
//<![CDATA[ |
|
|
4 |
|
3 |
|
5 |
// prepare DOM for YUI Toolbar |
4 |
[% IF ( viewshelf ) %] |
6 |
|
5 |
|
7 |
$(document).ready(function() { |
6 |
function sendList(){ |
8 |
$("#editlistc").empty(); |
|
|
9 |
$("#deletelistc").remove(); |
10 |
$("#sendlistc").empty(); |
11 |
$("#downloadlistc").empty(); |
12 |
$("#printlistc").empty(); |
13 |
$("#sendlistc").before("<li id=\"downloadmenuc\"><\/li>"); |
14 |
yuiToolbar(); |
15 |
}); |
16 |
|
17 |
[% IF ( viewshelf ) %] function sendList(){ |
18 |
open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); |
7 |
open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); |
19 |
} |
8 |
} |
20 |
|
|
|
21 |
function downloadList(){ |
22 |
open(CGIBIN+'virtualshelves/downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); |
23 |
}[% END %] |
24 |
|
9 |
|
25 |
// YUI Toolbar Functions |
10 |
$(document).ready(function() { |
|
|
11 |
$("#sendlist").click(function(){ |
12 |
sendList(); |
13 |
return false; |
14 |
}); |
15 |
$("#printlist").click(function(){ |
16 |
print(); |
17 |
return false; |
18 |
}); |
19 |
$("#deleteshelf").click(function(e){ |
20 |
if(confirmDelete(_("Are you sure you want to delete this list?"))){ |
21 |
return true; |
22 |
} else { |
23 |
e.preventDefault(); |
24 |
} |
25 |
}); |
26 |
}); |
26 |
|
27 |
|
27 |
function yuiToolbar() { |
|
|
28 |
newshelfButton = new YAHOO.widget.Button("newshelf"); |
29 |
[% IF ( viewshelf ) %][% IF ( manageshelf ) %]editshelfButton = new YAHOO.widget.Button("editshelf"); |
30 |
|
31 |
var editmenu = [ |
32 |
{ text: _("Edit list"), url: "/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&op=modif" }, |
33 |
{ text: _("Delete list"), onclick: {fn:function(){confirmDelete(_("Are you sure you want to delete this list?"))}}} |
34 |
]; |
35 |
|
36 |
var downloadmenu = [ |
37 |
{ text: _("iso2709"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&shelfid=[% shelfnumber %]" }, |
38 |
{ text: _("RIS"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelfnumber %]" }, |
39 |
{ text: _("BibTex"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelfnumber %]" }, |
40 |
[% FOREACH csv_profile IN csv_profiles %] |
41 |
{ text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% shelfnumber %]" }, |
42 |
[% END %] |
28 |
[% END %] |
43 |
]; |
|
|
44 |
|
29 |
|
45 |
new YAHOO.widget.Button({ |
30 |
//]]> |
46 |
type: "menu", |
31 |
</script> |
47 |
label: _("Download list"), |
|
|
48 |
name: "downloadmenubutton", |
49 |
menu: downloadmenu, |
50 |
container: "downloadmenuc" |
51 |
}); |
52 |
|
32 |
|
53 |
new YAHOO.widget.Button({ |
33 |
<div id="toolbar" class="btn-toolbar"> |
54 |
type: "menu", |
34 |
<div class="btn-group"><a id="newshelf" class="btn btn-small" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1"><i class="icon-plus"></i> New list</a></div> |
55 |
label: _("Edit"), |
|
|
56 |
name: "editmenubutton", |
57 |
menu: editmenu, |
58 |
container: "editlistc" |
59 |
}); |
60 |
|
35 |
|
61 |
[% END %] |
36 |
[% IF ( viewshelf ) %] |
62 |
downloadlistButton = new YAHOO.widget.Button({ |
37 |
[% IF ( manageshelf ) %] |
63 |
id: "downloadlist", |
38 |
<div class="btn-group"> |
64 |
type: "button", |
39 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button> |
65 |
label: _("Download list"), |
40 |
<ul class="dropdown-menu"> |
66 |
container: "downloadlistc", |
41 |
<li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&op=modif">Edit list</a></li> |
67 |
onclick: {fn:downloadList} |
42 |
[% IF ( showprivateshelves ) %] |
68 |
}); |
43 |
<li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves&shelves=1&DEL-[% shelfnumber %]=1">Delete list</a></li> |
69 |
sendlistButton = new YAHOO.widget.Button({ |
44 |
[% ELSE %] |
70 |
id: "sendlist", |
45 |
<li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&DEL-[% shelfnumber %]=1">Delete list</a></li> |
71 |
type: "button", |
46 |
[% END %] |
72 |
label: _("Send list"), |
47 |
</ul> |
73 |
container: "sendlistc", |
48 |
</div> |
74 |
onclick: {fn:sendList} |
49 |
[% END %] |
75 |
}); |
|
|
76 |
printlistButton = new YAHOO.widget.Button({ |
77 |
id: "printbiblio", |
78 |
type: "button", |
79 |
label: _("Print list"), |
80 |
container: "printlistc", |
81 |
onclick: {fn:function(){print();}} |
82 |
});[% END %] |
83 |
} |
84 |
|
50 |
|
85 |
//]]> |
51 |
<div class="btn-group"> |
86 |
</script> |
52 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-download"></i> Download list <span class="caret"></span></button> |
87 |
|
53 |
<ul class="dropdown-menu"> |
88 |
<ul class="toolbar"> |
54 |
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&shelfid=[% shelfnumber %]">iso2709</a></li> |
89 |
<li><a id="newshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1">New list</a></li> |
55 |
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelfnumber %]">RIS</a></li> |
90 |
[% IF ( viewshelf ) %][% IF ( manageshelf ) %] |
56 |
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelfnumber %]">BibTex</a></li> |
91 |
<li id="editlistc"><a id="editshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&op=modif">Edit list</a></li> |
57 |
[% FOREACH csv_profile IN csv_profiles %] |
92 |
<li id="deletelistc">[% IF ( showprivateshelves ) %]<a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves&shelves=1&DEL-[% shelfnumber %]=1">Delete list</a>[% ELSE %]<a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&DEL-[% shelfnumber %]=1">Delete list</a>[% END %]</li> |
58 |
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% shelfnumber %]">CSV - [% csv_profile.profile %]</a></li> |
93 |
[% END %] |
59 |
[% END %] |
94 |
<li id="sendlistc"><a href="#" id="sendlist">Send list</a></li> |
60 |
</ul> |
95 |
<li id="printlistc"><a id="printbiblio" href="#">Print list</a></li> |
61 |
</div> |
96 |
[% END %] |
62 |
<div class="btn-group"><a class="btn btn-small" href="#" id="sendlist"><i class="icon-envelope"></i> Send list</a></div> |
97 |
</ul> |
63 |
<div class="btn-group"><a class="btn btn-small" id="printlist" href="#"><i class="icon-print"></i> Print list</a></div> |
|
|
64 |
[% END %] |
98 |
</div> |
65 |
</div> |
99 |
- |
|
|