[open-ils-commits] r932 - in conifer/branches/rel_1_6_0/web: js/ui/default/cat/storage templates/default/cat/storage (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 22 11:09:15 EDT 2010
Author: dbs
Date: 2010-07-22 11:09:12 -0400 (Thu, 22 Jul 2010)
New Revision: 932
Modified:
conifer/branches/rel_1_6_0/web/js/ui/default/cat/storage/move.js
conifer/branches/rel_1_6_0/web/templates/default/cat/storage/move.tt2
Log:
Cleaner, less shameful implementation
Modified: conifer/branches/rel_1_6_0/web/js/ui/default/cat/storage/move.js
===================================================================
--- conifer/branches/rel_1_6_0/web/js/ui/default/cat/storage/move.js 2010-07-22 09:11:51 UTC (rev 931)
+++ conifer/branches/rel_1_6_0/web/js/ui/default/cat/storage/move.js 2010-07-22 15:09:12 UTC (rev 932)
@@ -1,13 +1,5 @@
-dojo.require('dojo.data.ItemFileReadStore');
-dojo.require('dijit.form.Textarea');
-dojo.require('dijit.form.FilteringSelect');
-dojo.require('dijit.form.ComboBox');
-dojo.require('fieldmapper.IDL');
+ojo.require('fieldmapper.IDL');
dojo.require('openils.PermaCrud');
-dojo.require('openils.widget.AutoGrid');
-dojo.require('openils.widget.AutoFieldWidget');
-dojo.require('dijit.form.CheckBox');
-dojo.require('dijit.form.Button');
dojo.require('dojo.date');
dojo.require('openils.CGI');
dojo.require('openils.XUL');
@@ -34,7 +26,7 @@
if(xulG.usr !== null) userId = xulG.usr
if(xulG.params) {
var parms = xulG.params;
- if(parms.ses)
+ if(parms.ses)
openils.User.authtoken = parms.ses;
if(parms.usr !== null)
userId = parms.usr
@@ -53,20 +45,27 @@
copy = pcrud.search("acp", {"barcode": barcode});
if (!copy) {
- alert('Barcode [' + barcode + '] was not found!');
+ dojo.place('<div class="alert">Barcode [' + barcode + '] was not found!</div>', 'resultsDiv', 'only');
return;
}
copy = fieldmapper.standardRequest(
['open-ils.search', 'open-ils.search.asset.copy.find_by_barcode'],
{params: [barcode]}
);
- copy.location(1);
+ copy.location(152);
copy.ischanged(1);
pcrud.update(copy);
volume = pcrud.retrieve("acn", copy.call_number());
record = pcrud.retrieve("bre", volume.record());
- alert(copy.barcode() + " " + volume.label() + " " + record.marc());
+ dojo.place("<div class='barcode'>" + copy.barcode() + "</div>", 'resultsDiv', 'only');
+ dojo.place("<div class='call_number'>" + volume.label() + "</div>", 'resultsDiv', 'last');
+ dojo.place("<div style='display:none'>" + record.marc() + "</div>", dojo.body(), 'last');
+
+ // Totally dumb title display. Oh well!
+ dojo.query("datafield[tag='245'] subfield[code='a']").forEach(function(node, index, arr) {
+ dojo.place("<div class='title'>" + node.innerHTML + "</div>", 'resultsDiv', 'last')
+ });
}
function moveCopyRefresh() {
@@ -77,8 +76,9 @@
}
function moveCopyRefreshXUL(newuser) {
- if (window.xulG && typeof window.xulG.on_save == 'function')
+ if (window.xulG && typeof window.xulG.on_save == 'function')
window.xulG.on_save(newuser);
}
openils.Util.addOnLoad(load);
+ 1,1 Top
Modified: conifer/branches/rel_1_6_0/web/templates/default/cat/storage/move.tt2
===================================================================
--- conifer/branches/rel_1_6_0/web/templates/default/cat/storage/move.tt2 2010-07-22 09:11:51 UTC (rev 931)
+++ conifer/branches/rel_1_6_0/web/templates/default/cat/storage/move.tt2 2010-07-22 15:09:12 UTC (rev 932)
@@ -1,52 +1,23 @@
[% ctx.page_title = 'Move item to storage' %]
-[% WRAPPER default/base.tt2 %]
-<script src='[% ctx.media_prefix %]/js/ui/default/cat/storage/storage.js'> </script>
+[% WRAPPER base.tt2 %]
+<script src='[% ctx.media_prefix %]/js/ui/default/cat/storage/move.js'> </script>
<style>
- /* XXX Move me into the CSS tree XXX */
-
- #uedit-tbody tr td {
- padding: 5px;
- text-align: left;
- }
-
-
- #uedit-save-div {
- position: fixed;
- top:40px;
- right:30px;
- width:300px;
- border:2px solid #d9e8f9;
- -moz-border-radius: 10px;
- font-weight: bold;
- padding: 12px;
- text-align:center;
- vertical-align:middle;
- }
-
- .divider td {
- min-height:10px;
- background-color: #e0e0e0;
- }
-
- .divider span { padding: 0px 5px 0px 5px; }
-
.dijitTextBoxFocused, .dijitFocused { border:1px dashed #3e3e3e; color: #303030; font-weight:bold;}
</style>
-<form method="get" action="/eg/cat/storage/storage">
- <table>
+<h1 style="font-weight: bold;">Move item to storage</h1>
+<form method="get" action="/eg/cat/storage/move">
+ <table style="margin-top: 2em;">
<tr>
- <td><label for="barcode">Barcode</label></td>
- <td><input type="text" id="barcode" name="barcode" dojoType="dijit.form.TextBox"/></td>
+ <td><label for="barcode" style="font-size: larger;">Barcode</label></td>
+ <td><input type="text" id="barcode" name="barcode" dojoType="dijit.form.TextBox" style="margin-left: 1em;"/></td>
</tr>
+ </table>
</form>
-<div id='uedit-save-div'>
- <button dojoType='dijit.form.Button' jsId='saveButton' onClick='moveCopySubmit'>Submit</button>
-</div>
+<div id="resultsDiv"></div>
[% END %]
-
More information about the open-ils-commits
mailing list