全馆预约到馆通知
全馆图书催还通知
ard&isFacet=true&view=standard&rows=10&curlibcode=017&searchWay0=marc&logical0=AND" + "&sortWay=" + op + "&sortOrder=desc";
}
function getBookrecnos() {
var bookrecnos = new Array();
$("div[bookrecno]").each(function(index) {
bookrecnos.push($(this).attr("bookrecno"));
});
return bookrecnos;
}
function getCallnos(bookrecnos) {
$.ajax({
type: "GET",
url: "/opac/book/callnos;jsessionid=6B934DC8DCECD9134593D28751EBFC09",
data: {
"bookrecnos": bookrecnos.join(",")
},
dataType: "xml",//这里要用xml,如果用html,则在IE下无法解析这个数据
success: function(xml){
insertCallnos(xml);
}
});
}
function insertCallnos(data) {
var records = $(data).find("record");
records.each(function(index){
var bookrecno = $(this).find("bookrecno").text();
var callnos = $(this).find("callno");
var callnoArray = new Array();
callnos.each(function(j){
if($(this).text()) {
callnoArray.push($(this).text());
}
});
var callnoInfo = callnoArray.join(",");
if(callnoInfo.length > 30) {
callnoInfo = callnoInfo.substring(0, 30) + "...";
}
if(callnoInfo.length>0){
$("div[bookrecno='" + bookrecno + "'] .callnosSpan").html(callnoInfo);
}
});
}
$(function() {
var bookrecnos = getBookrecnos();
getCallnos(bookrecnos);
});
function getRdid() {
var rdid = "";
return rdid;
}
//处理保存检索结果列表
$(function() {
$("#saveSearchResultListDialog").dialog({
autoOpen: false,
modal: true,
width: 550,
height: 400
});
$("#saveSearchResultListDialog input[name='isPublic']").eq(1).attr("checked","checked");
$("#saveSearchResultListTag").hide();
});
function showSearchResultList() {
var checking = checkLogin();
if(!checking){
return;
}
var keywords = "*:*";
var searchURL = "q=*%3A*&searchType=standard&isFacet=true&view=standard&rows=10&sortWay=score&sortOrder=desc&curlibcode=017&searchWay0=marc&logical0=AND";
$("#title").val(keywords);
$("#searchURL").val(searchURL);
$("#saveSearchResultListDialog").dialog("open");
}
function saveKeyword(){
var keyword = "*:*";
var checking = checkLogin();
if(!checking){
return;
}else if($.trim(keyword) == ""||keyword == "*:*"){
alert("无效的检索词,请重新发起检索");
return;
}
$.ajax({
type: "post",
url: "/opac/subscription/keyword/save;jsessionid=6B934DC8DCECD9134593D28751EBFC09",
data: {
"keyword": keyword,
"searchway": ""
},
dataType: "json",
success: function(data){
if(data.flag=="1"){
if(confirm("检索词已保存到我的订阅列表中,现在去看看?")){
window.location.href="/opac/subscription/keyword/list;jsessionid=6B934DC8DCECD9134593D28751EBFC09";
}
}else{
alert("无法保存检索词:"+keyword);
}
}
});
}
function saveSearchResultList() {
$.ajax({
type: "post",
url: "/opac/searchResultList/save;jsessionid=6B934DC8DCECD9134593D28751EBFC09",
data: {
"title": $("#title").val(),
"searchURL": $("#searchURL").val(),
"description": $("#description").val(),
"isPublic": $("#saveSearchResultListDialog input[name='isPublic']:checked").val()
},
dataType: "xml",//这里要用xml,如果用html,则在IE下无法解析这个数据
success: function(xml){
showSaveSearchResultListResult(xml);
}
});
}
function showSaveSearchResultListResult(data) {
var state = $(data).find("state").text();
if(state == "1") {
alert("保存成功!");
$("#saveSearchResultListDialog").dialog("close");
} else {
alert("保存失败!");
}
}
//添加图书专题
function addBookSpecial(){
window.location.href="/opac/admin/bookSpecial/edit;jsessionid=6B934DC8DCECD9134593D28751EBFC09?q=*%3A*&searchType=standard&isFacet=true&view=standard&rows=10&sortWay=score&sortOrder=desc&curlibcode=017&searchWay0=marc&logical0=AND";
}
//保存书单至输出邮件/本地文件列表
function saveBookIdList(){
bookItemStr = "";
$("input[name='bookItemCheckbox']").each(function(i) {
if($(this).attr("checked")) {
bookItemStr = bookItemStr + $(this).val() + ",";
}
});
if(bookItemStr.length==0 || bookItemStr==""){
alert("请选择需要输出的书籍");
return ;
}
bookItemStr = bookItemStr.substring(0, bookItemStr.lastIndexOf(","));
$("input[type='hidden'][name='printBookIdList']").attr("value" , bookItemStr);
$("form[name='printBookIdListForm']").trigger("submit");
}
//书单
function selectAllBookItems() {
$("input[name='bookItemCheckbox']").attr("checked", true);
}
function clearAllBookItems() {
$("input[name='bookItemCheckbox']").attr("checked", false);
}
var bookListId="";
var bookItemStr ="";
function saveItemsToBookList() {
var rdid = getRdid();
if(rdid == "") {
alert("请先登录!");
return;
}
bookListId = $("#bookLists").val();
bookItemStr = "";
$("input[name='bookItemCheckbox']").each(function(i) {
if($(this).attr("checked")) {
bookItemStr = bookItemStr + $(this).val() + ",";
}
});
if(bookItemStr == "") {
alert("请选择图书.");
return;
}
if($("#bookLists").val()=="")
{
newBookListDialog();
return;
}
addBookItems();
}
//把添加这一块单独提取出来,可能多个地方会用到
function addBookItems()
{
$.ajax({
type: "post",
url: "/opac/booklistitem/save",
data: {
"bookListId": bookListId,
"bookListItems": bookItemStr
},
dataType: "xml",//这里要用xml,如果用html,则在IE下无法解析这个数据
success: function(xml){
showSaveBookListItemResult(xml);
}
});
}
function newBookList(){
if($("#new_listName").val()=="")
{
alert("书单名称不能为空!");
return;
}
$.ajax({
type:"post",
url:"/opac/booklist/save",
data:{
"listName": $("#new_listName").val(),
"description": $("#new_description").val(),
"privacy": $("#newBookListDialog input[name='new_privacy']:checked").val()
},
dataType:"xml",
success:function(xml){
showNewBookListResult(xml);
}
});
}
function showNewBookListResult(data){
//alert(data.text());
var state=$(data).find("state").text();
if(state=="2")
{
if(confirm("你已创建过了相同名称的书单,是否直接保存进该书单!"))
{
bookListId=$(data).find("bookListId").text();
addBookItems();
}
$("#newBookListDialog").dialog("close");
clearNewBookList();
}
else if(state=="1")
{
bookListId=$(data).find("bookListId").text();
$("#bookLists").append("");
addBookItems();
$("#newBookListDialog").dialog("close");
clearNewBookList();
}
else
{
alert("创建书单或者加入书单失败!");
}
}
function clearNewBookList()
{
$("#new_listName").attr("value","");
$("#new_description").attr("value","");
$("#newBookListDialog input[name='new_privacy']").eq(0).attr("checked","checked");
}
function showSaveBookListItemResult(data) {
var state = $(data).find("state").text();
if(state == "1") {
alert("保存成功!");
} else {
alert("保存失败!");
}
}
function newBookListDialog() {
$("#newBookListDialog").dialog("open");
clearNewBookList();
}
$(function() {
$("#newBookListDialog").dialog({
autoOpen: false,
modal: true,
width: 510,
buttons:[{
text:"新增并加入书单",
click:function(){
newBookList();
}
}
]
});
});
//读取显示隐藏趋势图的cookie信息
$(document).ready(function(){
var chartCookie = $.cookie('chartCookie');
var libcode="P2LN0415007";
if(chartCookie!=null){
if(chartCookie=='hide'){
$("#display").html(" "+getI18nMsg("chartI18n