r4904 - trunk/lib/style/common/templates
walbridge at ecoinformatics.org
walbridge at ecoinformatics.org
Mon Apr 6 13:51:23 PDT 2009
Author: walbridge
Date: 2009-04-06 13:51:22 -0700 (Mon, 06 Apr 2009)
New Revision: 4904
Modified:
trunk/lib/style/common/templates/entryForm.js
trunk/lib/style/common/templates/entryForm.tmpl
Log:
fix bug #3950 [ http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3950 ], make additional uploads stick when modifying a document
Modified: trunk/lib/style/common/templates/entryForm.js
===================================================================
--- trunk/lib/style/common/templates/entryForm.js 2009-04-06 17:26:35 UTC (rev 4903)
+++ trunk/lib/style/common/templates/entryForm.js 2009-04-06 20:51:22 UTC (rev 4904)
@@ -995,9 +995,16 @@
this.list_target = list_target;
this.count = 0;
this.id = 0;
+ var ucount = document.getElementById("upCount");
var fcount = document.getElementById("fileCount");
if (fcount.value > 0) {
this.id = fcount.value;
+ } else {
+ // upCount contains pre-existing uploads, check this for editing existing packages
+ if (ucount.value > 0) {
+ this.id = ucount.value;
+ alert(this.id);
+ }
}
if (max) {
Modified: trunk/lib/style/common/templates/entryForm.tmpl
===================================================================
--- trunk/lib/style/common/templates/entryForm.tmpl 2009-04-06 17:26:35 UTC (rev 4903)
+++ trunk/lib/style/common/templates/entryForm.tmpl 2009-04-06 20:51:22 UTC (rev 4904)
@@ -1092,10 +1092,10 @@
[% END %]
[% cnt = cnt + 1 %]
[% END %]
- <input type="hidden" name="upCount" value="[%upCount%]">
+ <input type="hidden" id="upCount" name="upCount" value="[%upCount%]">
[% END %]
- <input type="hidden" name="fileCount" value="[%fileCount%]" id="fileCount"></td>
+ <input type="hidden" id="fileCount" name="fileCount" value="[%fileCount%]"></td>
</tr>
<tr class="sectbody">
<td class="rightCol" valign="top"><span class="label">Attached Files:</span></td>
More information about the Metacat-cvs
mailing list