diff -r e0d20fb46389 -r 5cea387a5667 web/views/cwproperties.py --- a/web/views/cwproperties.py Tue Oct 19 13:13:13 2010 +0200 +++ b/web/views/cwproperties.py Tue Oct 19 13:14:48 2010 +0200 @@ -15,9 +15,8 @@ # # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . -"""Specific views for CWProperty +"""Specific views for CWProperty (eg site/user preferences""" -""" __docformat__ = "restructuredtext en" _ = unicode @@ -66,8 +65,8 @@ def make_togglable_link(nodeid, label): """builds a HTML link that switches the visibility & remembers it""" - action = u"javascript: togglePrefVisibility('%s')" % nodeid - return u'%s' % (action, label) + return u'%s' % ( + nodeid, label) def css_class(someclass): return someclass and 'class="%s"' % someclass or '' @@ -111,7 +110,8 @@ return status def call(self, **kwargs): - self._cw.add_js(('cubicweb.edition.js', 'cubicweb.preferences.js', 'cubicweb.ajax.js')) + self._cw.add_js(('cubicweb.preferences.js', + 'cubicweb.edition.js', 'cubicweb.ajax.js')) self._cw.add_css('cubicweb.preferences.css') vreg = self._cw.vreg values = self.defined_keys @@ -135,7 +135,7 @@ for group, objects in groupedopts.items(): for oid, keys in objects.items(): - groupedopts[group][oid] = self.form(group + '-' + oid, keys, True) + groupedopts[group][oid] = self.form(group + '_' + oid, keys, True) w = self.w req = self._cw