Select an image from your computer and click ok to have it automatically uploaded to
@@ -511,29 +576,14 @@
target="kupu_upload_form_target" enctype="multipart/form-data" style="margin: 0;
border: 0;">
-
-
-
+
+
+
From mihxil at codespeak.net Thu Sep 25 17:30:55 2008
From: mihxil at codespeak.net (mihxil at codespeak.net)
Date: Thu, 25 Sep 2008 17:30:55 +0200 (CEST)
Subject: [kupu-checkins] r58436 - kupu/trunk/kupu/common
Message-ID: <20080925153055.2C1C316A095@codespeak.net>
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();
};
From mihxil at codespeak.net Thu Sep 25 17:36:23 2008
From: mihxil at codespeak.net (mihxil at codespeak.net)
Date: Thu, 25 Sep 2008 17:36:23 +0200 (CEST)
Subject: [kupu-checkins] r58437 - kupu/trunk/kupu/common
Message-ID: <20080925153623.B92F516A0C0@codespeak.net>
Author: mihxil
Date: Thu Sep 25 17:36:23 2008
New Revision: 58437
Modified:
kupu/trunk/kupu/common/kupudrawers.js
Log:
rolled back my change of earlier today about xsltproc.setParameter. I think the problem is not here, but in the XSL. It probably simply does not make sense to define a default value, it only obfuscates.
Modified: kupu/trunk/kupu/common/kupudrawers.js
==============================================================================
--- kupu/trunk/kupu/common/kupudrawers.js (original)
+++ kupu/trunk/kupu/common/kupudrawers.js Thu Sep 25 17:36:23 2008
@@ -666,18 +666,7 @@
};
- /**
- * In this file empty values are used which are supposed to mean 'not explicitely set'.
- * In that case the XSL parameter should not explicitely set as parameter on the transformation, otherwise, the implicit default value
- * as defined in the XSL will not be used.
- *
- * Certainly true for 'showupload', which has a default //libraries/showupload, should probably also used for other parameters.
- */
- this.setXslParameter = function(xsltproc, ns, name, value) {
- if (value && ! "" == value) {
- xsltproc.setParameter(ns, name, value);
- }
- }
+
/*** bootstrapping ***/
@@ -701,7 +690,7 @@
xsltproc.setParameter("", "ie", this.editor.getBrowserName() == 'IE');
xsltproc.setParameter("", "drawertype", this.drawertype);
xsltproc.setParameter("", "drawertitle", this.drawertitle);
- this.setXslParameter(xsltproc, "", "showupload", this.showupload);
+ xsltproc.setParameter("", "showupload", this.showupload);
xsltproc.setParameter("", "showanchors", this.showanchors);
if (this.target !== undefined) {
xsltproc.setParameter("", "link_target", this.target);
@@ -817,7 +806,7 @@
xsltproc.setParameter("", k, this.options[k]);
}
xsltproc.setParameter("", "multiple", this.multiple ? "yes" : "");
- this.setXslParameter(xsltproc, "", "showupload", this.showupload)
+ xsltproc.setParameter("", "showupload", this.showupload ? "yes" : "");
xsltproc.setParameter("", "showanchors", this.showanchors);
var doc = this._transformXml();
From mihxil at codespeak.net Thu Sep 25 17:38:32 2008
From: mihxil at codespeak.net (mihxil at codespeak.net)
Date: Thu, 25 Sep 2008 17:38:32 +0200 (CEST)
Subject: [kupu-checkins] r58438 - in kupu/trunk/kupu/mmbase: . drawers
Message-ID: <20080925153832.901B316A095@codespeak.net>
Author: mihxil
Date: Thu Sep 25 17:38:31 2008
New Revision: 58438
Added:
kupu/trunk/kupu/mmbase/drawers/uploadfields.jspx
Modified:
kupu/trunk/kupu/mmbase/drawers.kupu
kupu/trunk/kupu/mmbase/drawers/attachments.items.jspx
kupu/trunk/kupu/mmbase/drawers/drawer.xsl.jspx
kupu/trunk/kupu/mmbase/drawers/flashobjects.items.jspx
kupu/trunk/kupu/mmbase/drawers/images.items.jspx
kupu/trunk/kupu/mmbase/drawers/libraries.jspx
kupu/trunk/kupu/mmbase/drawers/library.jspx
kupu/trunk/kupu/mmbase/drawers/upload.jspx
kupu/trunk/kupu/mmbase/mmbase.css
kupu/trunk/kupu/mmbase/toolboxes.kupu
Log:
upload tool got a bit broken and ugly, probably because of changes in drawer.xsl. Fixed it again. Also producing customized upload forms now (can be different per uploaded type)
Modified: kupu/trunk/kupu/mmbase/drawers.kupu
==============================================================================
--- kupu/trunk/kupu/mmbase/drawers.kupu (original)
+++ kupu/trunk/kupu/mmbase/drawers.kupu Thu Sep 25 17:38:31 2008
@@ -63,7 +63,6 @@
drawers/libraries.jspx?nodetypes=${inline_nodetypes}&source=${objectnumber}&librarysize=${librarysize}
-
drawers/libraries.jspx?nodetypes=${attachment_nodetypes}&source=${objectnumber}&librarysize=${librarysize}
drawers/search.library.jspx?kupubasedir=${kupubasedir}&link_nodetypes=images&source=${objectnumber}&librarysize=${librarysize}
Modified: kupu/trunk/kupu/mmbase/drawers/attachments.items.jspx
==============================================================================
--- kupu/trunk/kupu/mmbase/drawers/attachments.items.jspx (original)
+++ kupu/trunk/kupu/mmbase/drawers/attachments.items.jspx Thu Sep 25 17:38:31 2008
@@ -7,14 +7,14 @@
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
id="drawer" scope="request">
-
-
- yes
-
+
+ attachment
+ attachments
+
mmbase://attachments/${attachment.number}
Modified: kupu/trunk/kupu/mmbase/drawers/drawer.xsl.jspx
==============================================================================
--- kupu/trunk/kupu/mmbase/drawers/drawer.xsl.jspx (original)
+++ kupu/trunk/kupu/mmbase/drawers/drawer.xsl.jspx Thu Sep 25 17:38:31 2008
@@ -23,6 +23,7 @@
>
+
@@ -34,40 +35,78 @@
-->
-
-
-
-
-
-
+
+ select="/libraries/*[@selected]//uploadbutton"
+ mode="upload"/>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Select a file from your computer and click ok to have it automatically uploaded to
+ selected folder and inserted into the editor.
+
+
+
@@ -118,6 +157,10 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${file.name}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-