# HG changeset patch # User Sylvain Thénault # Date 1288963702 -3600 # Node ID b8bd0ecced2e8cb28e2200204a727e443fbc8465 # Parent 68cfebd3b9f38010d4cfb94639c7e8dde9f442ea minor cleanups diff -r 68cfebd3b9f3 -r b8bd0ecced2e utils.py --- a/utils.py Fri Nov 05 14:28:07 2010 +0100 +++ b/utils.py Fri Nov 05 14:28:22 2010 +0100 @@ -201,6 +201,7 @@ def pop(self, i): self._size -= 1 + class UStringIO(list): """a file wrapper which automatically encode unicode string to an encoding specifed in the constructor diff -r 68cfebd3b9f3 -r b8bd0ecced2e web/views/basecontrollers.py --- a/web/views/basecontrollers.py Fri Nov 05 14:28:07 2010 +0100 +++ b/web/views/basecontrollers.py Fri Nov 05 14:28:22 2010 +0100 @@ -253,6 +253,7 @@ # we receive unicode keys which is not supported by the **syntax return dict((str(key), value) for key, value in extraargs.iteritems()) + class JSonController(Controller): __regid__ = 'json' diff -r 68cfebd3b9f3 -r b8bd0ecced2e web/views/bookmark.py --- a/web/views/bookmark.py Fri Nov 05 14:28:07 2010 +0100 +++ b/web/views/bookmark.py Fri Nov 05 14:28:22 2010 +0100 @@ -24,8 +24,8 @@ from cubicweb import Unauthorized from cubicweb.selectors import is_instance, one_line_rset -from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem -from cubicweb.web import action, component, uicfg, formwidgets as fw +from cubicweb.web import (action, component, uicfg, htmlwidgets, + formwidgets as fw) from cubicweb.web.views import primary _abaa = uicfg.actionbox_appearsin_addmenu @@ -105,7 +105,7 @@ label = '
%s %s
' % (dlink, label) self.append(label) if self.can_edit: - menu = BoxMenu(req._('manage bookmarks')) + menu = htmlwidgets.BoxMenu(req._('manage bookmarks')) linkto = 'bookmarked_by:%s:subject' % ueid # use a relative path so that we can move the instance without # loosing bookmarks