[open-ils-commits] r13229 - in trunk/Open-ILS/web: js/ui/default/conify/global/acq js/ui/default/conify/global/action templates/default/conify/global/acq templates/default/conify/global/action (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 26 08:36:48 EDT 2009
Author: erickson
Date: 2009-05-26 08:36:47 -0400 (Tue, 26 May 2009)
New Revision: 13229
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js
trunk/Open-ILS/web/js/ui/default/conify/global/action/survey.js
trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2
trunk/Open-ILS/web/templates/default/conify/global/action/survey.tt2
Log:
layout tweaks
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js 2009-05-26 06:24:19 UTC (rev 13228)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js 2009-05-26 12:36:47 UTC (rev 13229)
@@ -12,6 +12,7 @@
function draw() {
if(providerId) {
openils.Util.addCSSClass(dojo.byId('provider-list-div'), 'hidden');
+
console.log('in draw');
var pcrud = new openils.PermaCrud();
pcrud.retrieve('acqpro', providerId, {
@@ -28,8 +29,8 @@
drawProviderSummary();
} else {
+ openils.Util.addCSSClass(dojo.byId('provider-details-div'), 'hidden');
console.log('in else block');
- openils.Util.removeCSSClass(dojo.byId('provider-details-div'), 'hidden');
pListGrid.loadAll({order_by:{acqpro : 'name'}});
pListGrid.onPostCreate = function(fmObject) {
location.href = location.href + '/' + fmObject.id();
@@ -39,11 +40,6 @@
}
function drawProviderSummary(child) {
- console.log(child);
- openils.Util.addCSSClass(dojo.byId('provider-details-div'), 'visible');
- console.log('added provider.list.div');
- console.log("drawing provider-details-div");
-
var loadedTabs = {'provider-address' : true};
if(child){
if(loadedTabs[child.id]) return;
@@ -52,25 +48,23 @@
case 'tab-pro-contact':
pcListGrid.overrideEditWidgets.provider = new
dijit.form.TextBox({disabled: 'true', value: providerId});
- openils.Util.removeCSSClass(dojo.byId('contact-addr-div'), 'hidden');
pcListGrid.resetStore();
pcListGrid.loadAll( {oncomplete:function(r){
var count = 0;
pcListGrid.store.fetch( {onComplete:function(list) {
- count = list.length
- if(count>=1){
- var contactIds = [];
- dojo.forEach(list, function(item) {
- contactIds.push(pcListGrid.store.getValue(item, 'id')); }
- );
- openils.Util.addCSSClass(dojo.byId('contact-addr-div'), 'visible');
- pcaListGrid.overrideEditWidgets.contact = new
- dijit.form.FilteringSelect({store: pcListGrid.store});
- pcaListGrid.resetStore();
- pcaListGrid.loadAll({order_by:{acqpca : 'contact'}}, {contact: contactIds});
- }else{
- return;
- }
+ count = list.length
+ if(count>=1){
+ var contactIds = []; dojo.forEach(list, function(item) {
+ contactIds.push(pcListGrid.store.getValue(item, 'id')); }
+ );
+
+ pcaListGrid.overrideEditWidgets.contact = new
+ dijit.form.FilteringSelect({store: pcListGrid.store});
+ pcaListGrid.resetStore();
+ pcaListGrid.loadAll({order_by:{acqpca : 'contact'}}, {contact: contactIds});
+ }else{
+ return;
+ }
}
}
);
@@ -108,8 +102,6 @@
function getParsedTag(rowIndex, item) {
- console.log("in getParsedTag");
- console.log(item);
return item && xpathParser.parse(padListGrid.store.getValue(item, 'xpath')).tags;
}
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/action/survey.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/action/survey.js 2009-05-26 06:24:19 UTC (rev 13228)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/action/survey.js 2009-05-26 12:36:47 UTC (rev 13229)
@@ -4,6 +4,7 @@
dojo.require('dijit.form.TextBox');
dojo.require('dijit.form.CurrencyTextBox');
dojo.require('dijit.Dialog');
+dojo.require('openils.DojoPatch');
dojo.require('dojox.widget.PlaceholderMenuItem');
dojo.require('fieldmapper.OrgUtils');
dojo.require('openils.widget.OrgUnitFilteringSelect');
@@ -18,13 +19,13 @@
/** really need to put this in a shared location... */
function getOrgInfo(rowIndex, item) {
if(!item) return '';
- var orgId = this.grid.store.getValue(item, this.field);
+ var orgId = svGrid.store.getValue(item, this.field);
return fieldmapper.aou.findOrgUnit(orgId).shortname();
}
function getDateTimeField(rowIndex, item) {
if(!item) return '';
- var data = this.grid.store.getValue(item, this.field);
+ var data = svGrid.store.getValue(item, this.field);
var date = dojo.date.stamp.fromISOString(data);
return dojo.date.locale.format(date, {formatLength:'short'});
}
@@ -52,7 +53,6 @@
var svId = svGrid.store.getValue(item, 'id');
var pcrud = new openils.PermaCrud();
var survey = pcrud.retrieve('asv', svId);
- console.log(survey);
var today = new Date();
var date = dojo.date.stamp.toISOString(today);
survey.end_date(date);
@@ -141,18 +141,17 @@
sv.usr_summary('t')
else
sv.usr_summary('f');
- console.log(sv.name());
+
var pcrud = new openils.PermaCrud();
pcrud.create(sv,
{
oncomplete: function(r) {
var obj = openils.Util.readResponse(r);
- if(!obj) return console.log('no obj');
+ if(!obj) return '';
svGrid.store.newItem(asv.toStoreItem(obj));
svSurveyDialog.hide();
svId = obj.id();
document.location.href = "/eg/conify/global/action/survey/edit/"+svId;
- //redirect(svId);
}
}
);
@@ -183,7 +182,6 @@
if(stat = openils.Util.readResponse(r)) {
console.log(stat);
svGrid.store.deleteItem(item);
- // buildSVGrid();
}
_deleteFromGrid(list, ++idx);
Modified: trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2 2009-05-26 06:24:19 UTC (rev 13228)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2 2009-05-26 12:36:47 UTC (rev 13229)
@@ -63,7 +63,7 @@
</select>
</div>
-<div id='provider-list-div' style='height: 600px;'>
+<div id='provider-list-div'>
<div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div>Provider</div>
@@ -90,8 +90,8 @@
</div>
<div id='provider-summary-pane'></div>
-<div id='provider-details-div' style='height:600px;'>
-<div dojoType="dijit.layout.TabContainer" style='height:100%;' jsId='providerTabs'>
+<div id='provider-details-div'>
+<div dojoType="dijit.layout.TabContainer" style='height:100%' jsId='providerTabs'>
<div dojoType="dijit.layout.ContentPane" title='Provider Address' select='true' id='provider-address'>
@@ -132,34 +132,33 @@
editOnEnter='true'>
</table>
</div>
-
- <div id='contact-addr-div'>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
- <div>Contact Address</div>
- <div>
- <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
- <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>Contact Address</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
+ <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
+ </div>
</div>
- </div>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
- <table jsId="pcaListGrid"
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['id', 'address_type', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
- query="{id: '*'}"
- fmClass='acqpca'
- defaultCellWidth='"auto"'
- editOnEnter='true'>
-
- </table>
- </div>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
+ <table jsId="pcaListGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['id', 'address_type', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
+ query="{id: '*'}"
+ fmClass='acqpca'
+ defaultCellWidth='"auto"'
+ editOnEnter='true'>
+
+ </table>
+ </div>
+
</div>
- </div>
<div dojoType="dijit.layout.ContentPane" title='Attribute Definitions' id='tab-attr'>
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div> Attribute Definitions</div>
<div>
- <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
- <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
+ <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
+ <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
</div>
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
Modified: trunk/Open-ILS/web/templates/default/conify/global/action/survey.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/action/survey.tt2 2009-05-26 06:24:19 UTC (rev 13228)
+++ trunk/Open-ILS/web/templates/default/conify/global/action/survey.tt2 2009-05-26 12:36:47 UTC (rev 13229)
@@ -1,6 +1,5 @@
[% WRAPPER default/base.tt2 %]
<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/action/survey.js'> </script>
-<h1>Survey List</h1><br/>
<script>
function formatName(inDatum) {
@@ -13,20 +12,19 @@
}
}
</script>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>Survey List</div>
+ <div>
+ <button dojoType='dijit.form.Button' onclick='svNewSurvey();'>Add New Survey</button>
+ <button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>Delete Selected</button>
+ <button dojoType='dijit.form.Button' onclick='endSurvey();'>End Selected Surveys</button>
+ </div>
+ </div>
-<button dojoType='dijit.form.Button' onclick='svNewSurvey();'>Add New Survey</button>
-<button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>Delete Selected</button>
-<button dojoType='dijit.form.Button' onclick='endSurvey();'>End Selected Surveys</button>
-<script>dojo.require('openils.widget.GridColumnPicker');</script>
-
-<!-- column picker menu-->
-<div dojoType="openils.widget.GridColumnPicker" jsid="svGridMenu" id="svGridMenu" style="display: none;" grid='svGrid'>
- <div dojoType="dojox.widget.PlaceholderMenuItem" label="GridColumns"></div>
-</div>
<!-- grid -->
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
- <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}"
- rowSelector='20px' columnReordering='true' headerMenu="svGridMenu">
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
+ <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}">
<thead>
<tr>
<th field="id">Survey ID</th>
More information about the open-ils-commits
mailing list