[prev in list] [next in list] [prev in thread] [next in thread]
List: kupu-checkins
Subject: [kupu-checkins] r58436 - kupu/trunk/kupu/common
From: mihxil () codespeak ! net
Date: 2008-09-25 15:30:55
Message-ID: 20080925153055.2C1C316A095 () codespeak ! net
[Download RAW message or body]
Author: mihxil
Date: Thu Sep 25 17:30:54 2008
New Revision: 58436
Modified:
kupu/trunk/kupu/common/kupudrawers.js
Log:
if title, description form entries are not produced by the XSL, don't whine.
Modified: kupu/trunk/kupu/common/kupudrawers.js
==============================================================================
--- kupu/trunk/kupu/common/kupudrawers.js (original)
+++ kupu/trunk/kupu/common/kupudrawers.js Thu Sep 25 17:30:54 2008
@@ -816,8 +816,8 @@
for (var k in this.options) {
xsltproc.setParameter("", k, this.options[k]);
}
- xsltproc.setParameter("", "multiple", this.multiple?"yes":"");
- this.setXslParameter(xsltproc, "", "showupload", this.showupload);
+ xsltproc.setParameter("", "multiple", this.multiple ? "yes" : "");
+ this.setXslParameter(xsltproc, "", "showupload", this.showupload)
xsltproc.setParameter("", "showanchors", this.showanchors);
var doc = this._transformXml();
@@ -1451,14 +1451,18 @@
// upload, on submit/insert press
this.uploadImage = function() {
var form = document.getElementById('kupu_upload_form');
- if (!form || form.node_prop_image.value=='') return;
+ if (!form || (form.node_prop_image && form.node_prop_image.value == '')) {
+ return;
+ }
- if (form.node_prop_title.value == "") {
+ if (form.node_prop_title && form.node_prop_title.value == "") {
alert("Please enter a title for the image you are uploading");
return;
};
- this.upload_title = form.node_prop_title.value;
- form.node_prop_desc.value = form.node_prop_desc.value.replace(/^\xa0|\xa0$/g,'');
+ this.upload_title = form.node_prop_title ? form.node_prop_title.value : '';
+ if (form.node_prop_desc) {
+ form.node_prop_desc.value = form.node_prop_desc.value.replace(/^\xa0|\xa0$/g,'');
+ }
form.submit();
};
_______________________________________________
kupu-checkins mailing list
kupu-checkins@codespeak.net
http://codespeak.net/mailman/listinfo/kupu-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic