[open-ils-commits] r12564 - in trunk/Open-ILS/web: css/skin/default js/ui/default/acq/common js/ui/default/acq/picklist templates/default/acq/common templates/default/acq/picklist (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 17 12:54:19 EDT 2009
Author: erickson
Date: 2009-03-17 12:54:17 -0400 (Tue, 17 Mar 2009)
New Revision: 12564
Modified:
trunk/Open-ILS/web/css/skin/default/acq.css
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js
trunk/Open-ILS/web/js/ui/default/acq/picklist/view.js
trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
trunk/Open-ILS/web/templates/default/acq/picklist/view.tt2
Log:
adding paging plugins to li table. showing entry count in picklist view.
Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css 2009-03-17 16:52:43 UTC (rev 12563)
+++ trunk/Open-ILS/web/css/skin/default/acq.css 2009-03-17 16:54:17 UTC (rev 12564)
@@ -93,7 +93,7 @@
#acq-lit-table {width:100%}
-#acq-lit-table th {padding:5px; font-weight: bold;}
+#acq-lit-table th {padding:5px; font-weight: bold; text-align:left;}
#acq-lit-table td {padding:2px;}
.acq-lit-row { border-bottom: 1px solid #AAA; }
.acq-lit-alt-row td:first-child { width:30px; }
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-03-17 16:52:43 UTC (rev 12563)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-03-17 16:54:17 UTC (rev 12564)
@@ -19,7 +19,28 @@
self.tbody.removeChild(self.tbody.childNodes[0]);
self.selectors = [];
};
+
+ this.setNext = function(handler) {
+ var link = dojo.byId('acq-lit-next');
+ if(handler) {
+ dojo.style(link, 'visibility', 'visible');
+ link.onclick = handler;
+ } else {
+ dojo.style(link, 'visibility', 'hidden');
+ }
+ };
+ this.setPrev = function(handler) {
+ var link = dojo.byId('acq-lit-prev');
+ if(handler) {
+ dojo.style(link, 'visibility', 'visible');
+ link.onclick = handler;
+ } else {
+ dojo.style(link, 'visibility', 'hidden');
+ }
+ };
+
+
this.showTable = function() {
dojo.style(dojo.byId('acq-lit-table-div'), 'display', 'block');
dojo.style(dojo.byId('acq-lit-info-div'), 'display', 'none');
Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js 2009-03-17 16:52:43 UTC (rev 12563)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js 2009-03-17 16:54:17 UTC (rev 12564)
@@ -82,8 +82,8 @@
var resultRow;
function doSearch(values) {
+ liTable.reset();
showDiv('oils-acq-pl-loading');
- liTable.reset();
search = {
service : [],
Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/view.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/view.js 2009-03-17 16:52:43 UTC (rev 12563)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/view.js 2009-03-17 16:54:17 UTC (rev 12564)
@@ -30,6 +30,7 @@
dojo.byId("oils-acq-picklist-name").innerHTML = plist.name();
dojo.byId("oils-acq-picklist-attr-owner").innerHTML = plist.owner().usrname();
+ dojo.byId("oils-acq-picklist-attr-count").innerHTML = plist.entry_count();
dojo.byId("oils-acq-picklist-attr-cdate").innerHTML =
dojo.date.locale.format(
@@ -43,6 +44,35 @@
{selector:'date'}
);
+ loadLIs();
+}
+
+function loadLIs() {
+ liTable.reset();
+
+ if(plist.entry_count() > (plOffset + plLimit)) {
+ liTable.setNext(
+ function() {
+ plOffset += plLimit;
+ loadLIs();
+ }
+ );
+ } else {
+ liTable.setNext(null);
+ }
+
+ if(plOffset > 0) {
+ liTable.setPrev(
+ function() {
+ plOffset -= plLimit;
+ loadLIs();
+ }
+ );
+ } else {
+ liTable.setPrev(null);
+ }
+
+
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem.picklist.retrieve'],
{ async: true,
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-03-17 16:52:43 UTC (rev 12563)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-03-17 16:54:17 UTC (rev 12564)
@@ -4,7 +4,17 @@
<table id='acq-lit-table'>
<thead>
<tr>
- <th colspan='0'><a id='acq-lit-select-toggle' href='javascript:void(0);'>Select</a></th>
+ <th colspan='0'>
+ <table style='width:100%;'><tr>
+ <td><a id='acq-lit-select-toggle' href='javascript:void(0);'>Select</a></td>
+ <td>
+ <div style='width:100%;text-align:right;'>
+ <a href='javascript:void(0);' id='acq-lit-prev' style='visibility:hidden'>« Previous</a>
+ <a href='javascript:void(0);' id='acq-lit-next' style='visibility:hidden'>Next »</a>
+ </div>
+ </td>
+ </tr></table>
+ </th>
</tr>
</thead>
<tbody id='acq-lit-tbody'>
Modified: trunk/Open-ILS/web/templates/default/acq/picklist/view.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/picklist/view.tt2 2009-03-17 16:52:43 UTC (rev 12563)
+++ trunk/Open-ILS/web/templates/default/acq/picklist/view.tt2 2009-03-17 16:54:17 UTC (rev 12564)
@@ -3,13 +3,12 @@
<div dojoType="dijit.layout.ContentPane" style="height:100%">
<div class='container'>
<div id='oils-acq-picklist-header'>
- Picklist
- <span id='oils-acq-picklist-name'> </span>
+ Picklist <span id='oils-acq-picklist-name'> </span>
<div class='oils-acq-picklist-attributes'>
- <div>Create
- date: <span id="oils-acq-picklist-attr-cdate"></span></div>
- <div>Last updated: <span id="oils-acq-picklist-attr-edate"></span></div>
- <div>Selector: <span id="oils-acq-picklist-attr-owner"></span></div>
+ <div>Create date: <span id="oils-acq-picklist-attr-cdate"></span></div>
+ <div>Last updated: <span id="oils-acq-picklist-attr-edate"></span></div>
+ <div>Selector: <span id="oils-acq-picklist-attr-owner"></span></div>
+ <div>Entry Count: <span id="oils-acq-picklist-attr-count"></span></div>
</div>
</div>
</div>
More information about the open-ils-commits
mailing list