# HG changeset patch # User Adrien Di Mascio # Date 1245648938 -7200 # Node ID caa5acbecc08049948c3fc84b43c826c6439a6b4 # Parent 19861294506fbc0ef43cb7d87c8cea1cf1e83a27 [javascript] provide a simple function to limit textarea size (+minor cosmetic changes) diff -r 19861294506f -r caa5acbecc08 server/schemaserial.py --- a/server/schemaserial.py Fri Jun 19 09:19:27 2009 +0200 +++ b/server/schemaserial.py Mon Jun 22 07:35:38 2009 +0200 @@ -109,7 +109,7 @@ ETYPE_NAME_MAP[etype]) print sql sqlcu.execute(sql) - # other table renaming done once schema has been readen + # other table renaming done once schema has been read # print 'reading schema from the database...' index = {} permsdict = deserialize_ertype_permissions(session) diff -r 19861294506f -r caa5acbecc08 web/data/cubicweb.htmlhelpers.js --- a/web/data/cubicweb.htmlhelpers.js Fri Jun 19 09:19:27 2009 +0200 +++ b/web/data/cubicweb.htmlhelpers.js Mon Jun 22 07:35:38 2009 +0200 @@ -247,6 +247,11 @@ } } +function limitTextAreaSize(textarea, size) { + var $area = jQuery(textarea); + $area.val($area.val().slice(0, size)); +} + //============= page loading events ==========================================// function roundedCornersOnLoad() { jQuery('div.sideBox').corner('bottom 6px'); diff -r 19861294506f -r caa5acbecc08 web/facet.py --- a/web/facet.py Fri Jun 19 09:19:27 2009 +0200 +++ b/web/facet.py Mon Jun 22 07:35:38 2009 +0200 @@ -744,7 +744,7 @@ % (cssclass, html_escape(unicode(self.value)))) self.w(u'
') self.w(u'%s ' % (imgsrc, imgalt)) - self.w(u'' % (facetid,title)) + self.w(u'' % (facetid, title)) self.w(u'
\n') self.w(u'\n') self.w(u'\n')