From f8b6e28ad559936dcaf0facc1a560dd9ff279df3 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Wed, 23 Dec 2009 13:08:51 +0100 Subject: [PATCH] (bug #3950) continue to rebuild pending reserves This use yui to build interface, pagination, table, and filters. --- C4/Reserves.pm | 56 ++-- circ/pendingreserves.pl | 113 ++++--- .../en/lib/yui/yuiloader/yuiloader-min.js | 10 + .../prog/en/modules/circ/pendingreserves.tmpl | 304 ++++++++---------- 4 files changed, 225 insertions(+), 258 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader-min.js diff --git a/C4/Reserves.pm b/C4/Reserves.pm index e008500845..c1d7b49eee 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -35,7 +35,7 @@ use C4::Accounts; use C4::Members::Messaging; use C4::Letters; use C4::Branch qw( GetBranchDetail ); -use List::MoreUtils qw( firstidx ); +use List::MoreUtils qw( firstidx any ); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -226,41 +226,24 @@ sub AddReserve { =cut sub GetPendingReserves { - my ($startdate, $enddate) = @_; - - my $sqldatewhere; + my ($filters, $startindex, $results) = @_; + + $startindex = "0" if not $startindex; + my @query_params; my $indepbranch = C4::Context->preference('IndependantBranches') ? C4::Context->userenv->{'branch'} : undef; my $dbh = C4::Context->dbh; - my $query = "SELECT * - FROM reserves - WHERE - reserves.found IS NULL "; - - if (!defined($startdate) or $startdate eq "") { - $startdate = format_date($startdate); - } - if (!defined($enddate) or $enddate eq "") { - $enddate = format_date($enddate); - } - - if ($startdate) { - $sqldatewhere .= " AND reservedate >= ?"; - push @query_params, format_date_in_iso($startdate); - } - if ($enddate) { - $sqldatewhere .= " AND reservedate <= ?"; - push @query_params, format_date_in_iso($enddate); - } - $query .= $sqldatewhere; + my $query = "SELECT DISTINCT(biblionumber) AS biblionumber + FROM reserves + LEFT JOIN biblio USING(biblionumber) + WHERE reserves.found IS NULL "; if ($indepbranch){ $query .= " AND branchcode = ? "; push @query_params, $indepbranch; } - my $sth = $dbh->prepare($query); $sth->execute(@query_params); @@ -274,7 +257,6 @@ sub GetPendingReserves { my @items = GetItemsInfo($reserve->{biblionumber}); $line->{title} = $biblio->{title}; - foreach my $item (@items){ next if ($indepbranch && $indepbranch ne $item->{holdingbranch}); $line->{count}++; @@ -296,15 +278,27 @@ sub GetPendingReserves { foreach my $datatype (qw/holdingbranches callnumbers locations itemtypes/){ my @newdatas = (); foreach my $data (keys %{$line->{$datatype}}){ - @newdatas = { 'value' => $data} + push @newdatas, { 'value' => $data} } $line->{$datatype} = \@newdatas; } - - push @reserves, $line; + my $filtered = 1; + foreach my $key (keys %$filters){ + my $value = $filters->{$key}; + $filtered = 0 if not (any { $_->{value} =~ /^$value$/ } @{$line->{$key}}) and $value; + } + push @reserves, $line if $filtered; # if (any { $_->{value} =~ /^FOSPC$/ } @{$line->{holdingbranches}}); } - return \@reserves; + my $count = scalar @reserves; + my $endindex = ($count > $startindex + $results) ? $startindex + $results : $count; + + if($count){ + @reserves = @reserves[$startindex..$endindex]; + } + + + return ($count, \@reserves); } =item GetReservesFromBiblionumber diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index f3edd3604b..a93fad46a0 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -28,20 +28,25 @@ use C4::Context; use C4::Output; use CGI; use C4::Auth; +use C4::Branch qw/GetBranches/; +use C4::Koha qw/GetItemTypes GetKohaAuthorisedValues/; use C4::Dates qw/format_date format_date_in_iso/; use C4::Debug; +use C4::Reserves qw/GetPendingReserves/; use Date::Calc qw/Today Add_Delta_YMD/; +use JSON; -my $input = new CGI; -my $order = $input->param('order'); -my $startdate=$input->param('from'); -my $enddate=$input->param('to'); +my $input = new CGI; +my $order = $input->param('order'); +my $startdate = $input->param('from'); +my $enddate = $input->param('to'); -my $theme = $input->param('theme'); # only used if allowthemeoverride is set + +my $template_name = $input->param('json') ? "cataloguing/value_builder/ajax.tmpl" : "circ/pendingreserves.tmpl"; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "circ/pendingreserves.tmpl", + template_name => $template_name, query => $input, type => "intranet", authnotrequired => 0, @@ -50,50 +55,60 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $duedate; -my $borrowernumber; -my $itemnum; -my $data1; -my $data2; -my $data3; -my $name; -my $phone; -my $email; -my $biblionumber; -my $title; -my $author; - -my ( $year, $month, $day ) = Today(); -my $todaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day); -my $yesterdaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day, 0, 0, -1)); -#changed from delivered range of 10 years-yesterday to 2 days ago-today -# Find two days ago for the default shelf pull start and end dates -my $pastdate = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day, 0, 0, -2)); +if($input->param('json')){ -# Predefine the start and end dates if they are not already defined -$startdate =~ s/^\s+//; -$startdate =~ s/\s+$//; -$enddate =~ s/^\s+//; -$enddate =~ s/\s+$//; + my $startindex = $input->param('startIndex'); + my $results = $input->param('results'); + my $filters = { + holdingbranches => $input->param('holdingbranches') || "", + locations => $input->param('locations') || "", + itemtypes => $input->param('itemtypes') || "", + }; + my ($count, $reservedata) = C4::Reserves::GetPendingReserves($filters, $startindex, $results); -# Check if null, should string match, if so set start and end date to yesterday -if (!defined($startdate) or $startdate eq "") { - $startdate = format_date($pastdate); -} -if (!defined($enddate) or $enddate eq "") { - $enddate = format_date($todaysdate); + my $jsondatas = { + recordsReturned => scalar @$reservedata, + totalRecords => $count, + startIndex => "0", + sort => "callnumbers", + dir => "asc", + pageSize => "40", + records => $reservedata, + }; + + + $template->param(return => to_json($jsondatas)); +}else{ + my (@itemtypesloop,@locationloop, @branch_loop); + my $itemtypes = GetItemTypes; + foreach my $thisitemtype (sort keys %$itemtypes) { + push @itemtypesloop, { + value => $thisitemtype, + description => $itemtypes->{$thisitemtype}->{'description'}, + }; + } + my $locs = GetKohaAuthorisedValues( 'items.location' ); + foreach my $thisloc (sort keys %$locs) { + push @locationloop, { + value => $thisloc, + description => $locs->{$thisloc}, + }; + } + my $branches = GetBranches(); + foreach my $branchcode (sort keys %{$branches}) { + push @branch_loop, { + value => $branchcode, + description => $branches->{$branchcode}->{branchname}, + }; + } + + $template->param( + branches_loop => \@branch_loop, + itemtypes_loop => \@itemtypesloop, + locations_loop => \@locationloop, + "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + dateformat => C4::Context->preference("dateformat"), + ); } - -my $reservedata = C4::Reserves::GetPendingReserves(); - -$template->param( - todaysdate => format_date($todaysdate), - from => $startdate, - to => $enddate, - reserveloop => $reservedata, - "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), - dateformat => C4::Context->preference("dateformat"), -); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader-min.js b/koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader-min.js new file mode 100644 index 0000000000..8b78db83c4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader-min.js @@ -0,0 +1,10 @@ +/* +Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.8.0r4 +*/ +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}if(P.length>1){P.pop();}P.push("]");}else{P.push("{");for(K in I){if(B.hasOwnProperty(I,K)){P.push(K+L);if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}}if(P.length>1){P.pop();}P.push("}");}return P.join("");},substitute:function(Y,J,R){var N,M,L,U,V,X,T=[],K,O="dump",S=" ",I="{",W="}",Q,P;for(;;){N=Y.lastIndexOf(I);if(N<0){break;}M=Y.indexOf(W,N);if(N+1>=M){break;}K=Y.substring(N+1,M);U=K;X=null;L=U.indexOf(S);if(L>-1){X=U.substring(L+1);U=U.substring(0,L);}V=J[U];if(R){V=R(U,V,X);}if(B.isObject(V)){if(B.isArray(V)){V=B.dump(V,parseInt(X,10));}else{X=X||"";Q=X.indexOf(O);if(Q>-1){X=X.substring(4);}P=V.toString();if(P===G||Q>-1){V=B.dump(V,parseInt(X,10));}else{V=P;}}}else{if(!B.isString(V)&&!B.isNumber(V)){V="~-"+T.length+"-~";T[T.length]=K;}}Y=Y.substring(0,N)+V+Y.substring(M+1);}for(N=T.length-1;N>=0;N=N-1){Y=Y.replace(new RegExp("~-"+N+"-~"),"{"+T[N]+"}","g");}return Y;},trim:function(I){try{return I.replace(/^\s+|\s+$/g,"");}catch(J){return I;}},merge:function(){var L={},J=arguments,I=J.length,K;for(K=0;K=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;gthis.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.8.0r4",build:"2446"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.8.0r4/build/","base":"http://yui.yahooapis.com/2.8.0r4/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemeth"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0; +i=m.rollup);if(roll){break;}}}}}else{for(j=0;j=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;iistartLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this._onFailure.call(this.varName+" reference failure");}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i Koha › Circulation › Pending Holds - -/lib/calendar/calendar-system.css" /> - - - - - - - + + + @@ -35,162 +13,132 @@ $.tablesorter.addParser({ -
-
-
-
+
+
+

Pending Reserves

+
+ + + + + + + +
+
+
+
+
+ -
  • -" type="text" /> -/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" /> -
  • - -

    (Inclusive, default is two days ago to today, set other date ranges as needed. )

    -
    - - + var formatUrl = function(elCell, oRecord, oColumn, sData) { + var baseurl = + + '/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber='; + + '/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber='; + + '/cgi-bin/koha/catalogue/detail.pl?biblionumber='; + + + + elCell.innerHTML = "" + sData + ""; + }; + + var loader = new YAHOO.util.YUILoader(); + loader.insert({ + require: ["reset", "menu", "button", "connection", "json", "paginator", "datatable","datasource"], + onSuccess: function() { + // Column definitions + myColumnDefs = [ // sortable:true enables sorting + {key:"title", label:"Title", sortable:false, formatter:formatUrl}, + {key:"callnumbers", label:"Call Numbers", sortable:false}, + {key:"itemtypes", label:"Item Types", sortable:false}, + {key:"holdingbranches", label:"Holding Branches", sortable:false}, + {key:"locations", label:"Locations", sortable:false}, + {key:"count", label:"Count", sortable:false}, + {key:"reservecount", label:"Reserves Count", sortable:false} + ]; + + updateDatas(); + } + }); -
    -
    -
    + //]]> + +
    + -- 2.20.1