Merge branch 'bug_9649' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-03-07 10:28:51 -05:00
commit 0bebb0c75c
2 changed files with 39 additions and 82 deletions

View file

@ -1,78 +0,0 @@
<div id="toolbar">
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
$("#newmenuc").empty();
yuiToolbar();
yuiZ3950button();
});
// YUI Toolbar Functions
function yuiToolbar() {
var newmenu = [
{ text: _("Default Framework"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=" },
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]{ text: "[% frameworkcodeloo.frameworktext %]", url: "/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% frameworkcodeloo.value %]"},
[% END %]
]
new YAHOO.widget.Button({
type: "menu",
label: _("New record"),
name: "newmenubutton",
menu: newmenu,
container: "newmenuc"
});
}
/* this function open a popup to search on z3950 server. */
function PopupZ3950() {
var strQuery = GetZ3950Terms();
if(strQuery){
window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=760,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
}
}
/* provide Z3950 search points */
function GetZ3950Terms(){
var strQuery="&frameworkcode=";
[% FOREACH z3950_search_param IN z3950_search_params %]
strQuery += "&" + "[% z3950_search_param.name %]" + "=" + "[% z3950_search_param.encvalue %]";
[% END %]
return strQuery;
}
/* prepare DOM for Z39.50 Search Button */
function yuiZ3950button() {
new YAHOO.widget.Button({
id: "z3950search",
type: "button",
label: _("Z39.50 search"),
container: "newmenuc",
onclick: {fn:function(){PopupZ3950()}}
});
}
//]]>
</script>
<div id="newmenuc">
<form name="f" action="addbiblio.pl" method="post">
<label for="frameworkcode">New record with framework:</label>
<select name="frameworkcode" id="frameworkcode">
<option value="">Default</option>
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
<option value="[% frameworkcodeloo.value %]">
[% frameworkcodeloo.frameworktext %]
</option>
[% END %]
</select>
<input type="submit" value="Add Record Without Search" />
</form>
<a id="z3950search" onclick="PopupZ3950(); return false;">Z39.50 search</a>
</div>
</div>

View file

@ -3,9 +3,31 @@
[% INCLUDE 'greybox.inc' %]
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
$(document).ready(function() {
$('#header_search').tabs();
});
//<![CDATA[
$(document).ready(function() {
$("#z3950search").click(function(){
PopupZ3950();
return false;
});
});
/* this function open a popup to search on z3950 server. */
function PopupZ3950() {
var strQuery = GetZ3950Terms();
if(strQuery){
window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=760,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
}
}
/* provide Z3950 search points */
function GetZ3950Terms(){
var strQuery="&frameworkcode=";
[% FOREACH z3950_search_param IN z3950_search_params %]
strQuery += "&" + "[% z3950_search_param.name %]" + "=" + "[% z3950_search_param.encvalue %]";
[% END %]
return strQuery;
}
//]]>
</script>
</head>
<body id="cat_addbooks" class="cat">
@ -19,7 +41,20 @@
<div id="bd">
<div id="yui-main">
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %][% INCLUDE 'cataloging-toolbar.inc' %][% END %]
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
<div id="newmenuc" class="btn-toolbar">
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New record <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=">Default framework</a></li>
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% frameworkcodeloo.value %]">[% frameworkcodeloo.frameworktext %]</a></li>
[% END %]
</ul>
</div>
<div class="btn-group"><a id="z3950search" class="btn btn-small" href="/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]&amp;frameworkcode=[% FOREACH z3950_search_param IN z3950_search_params %]&amp;[% z3950_search_param.name %]=[% z3950_search_param.encvalue %][% END %]"><i class="icon-search"></i> Z39.50 search</a></div>
</div>
[% END %]
[% IF ( noitemsfound ) %]
No results found