--- a/.hgtags Fri Aug 28 16:28:26 2009 +0200
+++ b/.hgtags Mon Aug 31 18:59:10 2009 +0200
@@ -60,3 +60,5 @@
e244a0fd7d719c25f4267470342ff8334b2dc8b3 cubicweb-debian-version-3.4.4-1
3a65f9b3367c7297dc540a53f84e6507cb309892 cubicweb-version-3.4.5
7fd294cbf6ff3cf34475cc50e972f650a34ae6e8 cubicweb-debian-version-3.4.5-1
+921fdbf8b3038dc27a2ec5398a0fbcbc5b9ba4be cubicweb-version-3.4.6
+52dba800ca4d4b82c47f3befb824bd91ef015368 cubicweb-debian-version-3.4.6-1
--- a/cwconfig.py Fri Aug 28 16:28:26 2009 +0200
+++ b/cwconfig.py Mon Aug 31 18:59:10 2009 +0200
@@ -134,6 +134,9 @@
'float' : 'Float',
}
+_forced_mode = os.environ.get('CW_MODE')
+assert _forced_mode in (None, 'system', 'user')
+
class CubicWebNoAppConfiguration(ConfigurationMixIn):
"""base class for cubicweb configuration without a specific instance directory
"""
@@ -150,7 +153,7 @@
CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ
# create __init__ file
file(join(CUBES_DIR, '__init__.py'), 'w').close()
- elif exists(join(CW_SOFTWARE_ROOT, '.hg')) or os.environ.get('CW_MODE') == 'user':
+ elif (exists(join(CW_SOFTWARE_ROOT, '.hg')) and _forced_mode != 'system') or _forced_mode == 'user':
mode = 'dev'
CUBES_DIR = abspath(normpath(join(CW_SOFTWARE_ROOT, '../cubes')))
else:
--- a/cwvreg.py Fri Aug 28 16:28:26 2009 +0200
+++ b/cwvreg.py Mon Aug 31 18:59:10 2009 +0200
@@ -16,12 +16,18 @@
from cubicweb import (ETYPE_NAME_MAP, Binary, UnknownProperty, UnknownEid,
ObjectNotFound, NoSelectableObject, RegistryNotFound,
- RegistryOutOfDate, CW_EVENT_MANAGER)
+ RegistryOutOfDate, CW_EVENT_MANAGER, onevent)
from cubicweb.utils import dump_class
from cubicweb.vregistry import VRegistry, Registry
from cubicweb.rtags import RTAGS
+@onevent('before-registry-reload')
+def clear_rtag_objects():
+ for rtag in RTAGS:
+ rtag.clear()
+
+
def use_interfaces(obj):
"""return interfaces used by the given object by searchinf for implements
selectors, with a bw compat fallback to accepts_interfaces attribute
@@ -310,8 +316,8 @@
else:
self._needs_iface[obj] = ifaces
- def register(self, obj, **kwargs):
- super(CubicWebVRegistry, self).register(obj, **kwargs)
+ def register(self, obj, *args, **kwargs):
+ super(CubicWebVRegistry, self).register(obj, *args, **kwargs)
# XXX bw compat
ifaces = use_interfaces(obj)
if ifaces:
--- a/debian/changelog Fri Aug 28 16:28:26 2009 +0200
+++ b/debian/changelog Mon Aug 31 18:59:10 2009 +0200
@@ -1,3 +1,9 @@
+cubicweb (3.4.6-1) unstable; urgency=low
+
+ * new upstream release
+
+ -- Sylvain Thénault <sylvain.thenault@logilab.fr> Mon, 31 Aug 2009 14:12:30 +0200
+
cubicweb (3.4.5-1) unstable; urgency=low
* new upstream release
--- a/vregistry.py Fri Aug 28 16:28:26 2009 +0200
+++ b/vregistry.py Mon Aug 31 18:59:10 2009 +0200
@@ -284,10 +284,11 @@
if obj.__module__ != modname or obj in butclasses:
continue
oid = obj.id
+ registryname = obj.__registry__
except AttributeError:
continue
if oid and not '__abstract__' in obj.__dict__:
- self.register(obj)
+ self.register(obj, registryname)
def register(self, obj, registryname=None, oid=None, clear=False):
"""base method to add an object in the registry"""
--- a/web/data/cubicweb.ajax.js Fri Aug 28 16:28:26 2009 +0200
+++ b/web/data/cubicweb.ajax.js Mon Aug 31 18:59:10 2009 +0200
@@ -51,7 +51,7 @@
}
// find textareas and wrap them if there are some
if (typeof(FCKeditor) != 'undefined') {
- buildWysiwygEditors(node);
+ buildWysiwygEditors();
}
if (typeof initFacetBoxEvents != 'undefined') {
initFacetBoxEvents(node);
@@ -351,7 +351,10 @@
*/
function buildWysiwygEditors(parent) {
jQuery('textarea').each(function () {
- if (this.getAttribute('cubicweb:type', 'wysiwyg')) {
+ if (this.getAttribute('cubicweb:type') == 'wysiwyg') {
+ // mark editor as instanciated, we may be called a number of times
+ // (see postAjaxLoad)
+ this.setAttribute('cubicweb:type', 'fckeditor');
if (typeof FCKeditor != "undefined") {
var fck = new FCKeditor(this.id);
fck.Config['CustomConfigurationsPath'] = fckconfigpath;
--- a/web/data/cubicweb.css Fri Aug 28 16:28:26 2009 +0200
+++ b/web/data/cubicweb.css Mon Aug 31 18:59:10 2009 +0200
@@ -256,13 +256,17 @@
}
/* Popup on login box and userActionBox */
+div.popupWrapper{
+ position:relative;
+ z-index:100;
+}
+
div.popup {
position: absolute;
- z-index: 400;
background: #fff;
border: 1px solid black;
text-align: left;
- float:left;
+ z-index:400;
}
div.popup ul li a {
@@ -840,7 +844,6 @@
background: #fffff8 url("button.png") bottom left repeat-x;
}
-
/********************************/
/* placement of alt. view icons */
/********************************/
--- a/web/uicfg.py Fri Aug 28 16:28:26 2009 +0200
+++ b/web/uicfg.py Mon Aug 31 18:59:10 2009 +0200
@@ -67,7 +67,7 @@
"""
__docformat__ = "restructuredtext en"
-from cubicweb import neg_role, onevent
+from cubicweb import neg_role
from cubicweb.rtags import (RelationTags, RelationTagsBool,
RelationTagsSet, RelationTagsDict)
from cubicweb.web import formwidgets
@@ -218,14 +218,3 @@
actionbox_appearsin_addmenu = RelationTagsBool('actionbox_appearsin_addmenu',
init_actionbox_appearsin_addmenu)
-
-@onevent('before-registry-reload')
-def clear_rtag_objects():
- primaryview_section.clear()
- primaryview_display_ctrl.clear()
- autoform_section.clear()
- autoform_field.clear()
- autoform_field_kwargs.clear()
- autoform_is_inlined.clear()
- autoform_permissions_overrides.clear()
- actionbox_appearsin_addmenu.clear()
--- a/web/views/basetemplates.py Fri Aug 28 16:28:26 2009 +0200
+++ b/web/views/basetemplates.py Mon Aug 31 18:59:10 2009 +0200
@@ -353,6 +353,7 @@
class HTMLPageHeader(View):
"""default html page header"""
id = 'header'
+ main_cell_components = ('appliname', 'breadcrumbs')
def call(self, view, **kwargs):
self.main_header(view)
@@ -374,7 +375,7 @@
self.w(u'</td>\n')
# appliname and breadcrumbs
self.w(u'<td id="headtext">')
- for cid in ('appliname', 'breadcrumbs'):
+ for cid in self.main_cell_components:
comp = self.vreg['components'].select_vobject(
cid, self.req, rset=self.rset)
if comp:
--- a/web/views/editforms.py Fri Aug 28 16:28:26 2009 +0200
+++ b/web/views/editforms.py Mon Aug 31 18:59:10 2009 +0200
@@ -371,6 +371,8 @@
entity
"""
id = 'copy'
+ warning_message = _('Please note that this is only a shallow copy')
+
def render_form(self, entity):
"""fetch and render the form"""
# make a copy of entity to avoid altering the entity in the
@@ -381,7 +383,7 @@
self.initialize_varmaker()
self.newentity.eid = self.varmaker.next()
self.w(u'<script type="text/javascript">updateMessage("%s");</script>\n'
- % self.req._('Please note that this is only a shallow copy'))
+ % self.req._(self.warning_message))
super(CopyFormView, self).render_form(self.newentity)
del self.newentity
--- a/web/views/idownloadable.py Fri Aug 28 16:28:26 2009 +0200
+++ b/web/views/idownloadable.py Mon Aug 31 18:59:10 2009 +0200
@@ -147,17 +147,17 @@
def cell_call(self, row, col, width=None, height=None, link=False):
entity = self.entity(row, col)
#if entity.data_format.startswith('image/'):
- imgtag = u'<img src="%s" alt="%s" ' % (xml_escape(entity.download_url()),
- xml_escape(entity.download_file_name()))
+ imgtag = u'<img src="%s" alt="%s" ' % (
+ xml_escape(entity.download_url()),
+ (self.req._('download %s') % xml_escape(entity.download_file_name())))
if width:
imgtag += u'width="%i" ' % width
if height:
imgtag += u'height="%i" ' % height
imgtag += u'/>'
if link:
- self.w(u'<a href="%s" alt="%s">%s</a>' % (entity.absolute_url(vid='download'),
- self.req._('download image'),
- imgtag))
+ self.w(u'<a href="%s">%s</a>' % (entity.absolute_url(vid='download'),
+ imgtag))
else:
self.w(imgtag)
--- a/web/views/primary.py Fri Aug 28 16:28:26 2009 +0200
+++ b/web/views/primary.py Mon Aug 31 18:59:10 2009 +0200
@@ -51,6 +51,7 @@
boxes = self._prepare_side_boxes(entity)
if boxes or hasattr(self, 'render_side_related'):
self.w(u'<table width="100%"><tr><td style="width: 75%">')
+ self.render_entity_summary(entity)
self.w(u'<div class="mainInfo">')
self.content_navigation_components('navcontenttop')
self.render_entity_attributes(entity)
@@ -90,6 +91,8 @@
def render_entity_metadata(self, entity):
entity.view('metadata', w=self.w)
+
+ def render_entity_summary(self, entity):
summary = self.summary(entity) # deprecate summary?
if summary:
self.w(u'<div class="summary">%s</div>' % summary)