[svn-changes-z4DKO/[email protected]: [Archetypes-checkins] r5336 - Archetypes/branches/release-1_3-branch/skins/archetypes/widgets]

Sidnei da Silva <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <20051227152529.GB4372__40341.7221190923$1135697246$gmane$org@cotia>
Someone should look at this. Code like this is potentially expensive
with FileField/TextField containing large files. Put it this way, the
file contents will be completely loaded in memory. If you have a 100mb
file, you know what will happen.

         <script type="text/javascript" 
-	        tal:define="isDisabled python:test(accessor(), 'true', 'false')"
+	        tal:define="isDisabled python:test(accessor() and size!=0, 'true', 'false')"
                 tal:content="string: document.getElementById('${fieldName}_file').disabled=$isDisabled;">
         </script>
     </metal:define>

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.