# HG changeset patch # User Julien Cristau # Date 1405692898 -7200 # Node ID 9461d1bd70bb6b14f848e083138c838b041f3483 # Parent 57e2cffa63298f2ab6f376d4be2d3ab8f2ed1801# Parent cba05de9a1a0255f86e4b9ed3016fe5ad7d2a18c merge from 3.18 branch diff -r 57e2cffa6329 -r 9461d1bd70bb .hgtags --- a/.hgtags Wed Jul 02 11:37:57 2014 +0200 +++ b/.hgtags Fri Jul 18 16:14:58 2014 +0200 @@ -332,6 +332,9 @@ ee413076752b3e606801ef55e48f7e7ccd1f7238 cubicweb-version-3.17.15 ee413076752b3e606801ef55e48f7e7ccd1f7238 cubicweb-debian-version-3.17.15-1 ee413076752b3e606801ef55e48f7e7ccd1f7238 cubicweb-centos-version-3.17.15-1 +a979d1594af6501a774fb32eb67cd32fea626655 cubicweb-version-3.17.16 +a979d1594af6501a774fb32eb67cd32fea626655 cubicweb-debian-version-3.17.16-1 +a979d1594af6501a774fb32eb67cd32fea626655 cubicweb-centos-version-3.17.16-1 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-version-3.18.0 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-debian-version-3.18.0-1 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-centos-version-3.18.0-1 diff -r 57e2cffa6329 -r 9461d1bd70bb __pkginfo__.py diff -r 57e2cffa6329 -r 9461d1bd70bb cubicweb.spec diff -r 57e2cffa6329 -r 9461d1bd70bb cwvreg.py --- a/cwvreg.py Wed Jul 02 11:37:57 2014 +0200 +++ b/cwvreg.py Fri Jul 18 16:14:58 2014 +0200 @@ -241,7 +241,7 @@ class CWRegistry(Registry): def __init__(self, vreg): - super(CWRegistry, self).__init__(vreg.config) + super(CWRegistry, self).__init__(vreg.config.debugmode) self.vreg = vreg @property diff -r 57e2cffa6329 -r 9461d1bd70bb debian/changelog --- a/debian/changelog Wed Jul 02 11:37:57 2014 +0200 +++ b/debian/changelog Fri Jul 18 16:14:58 2014 +0200 @@ -52,6 +52,12 @@ -- Julien Cristau Fri, 10 Jan 2014 17:14:18 +0100 +cubicweb (3.17.16-1) unstable; urgency=low + + * new upstream value + + -- Aurelien Campeas Mon, 07 Jul 2014 19:26:12 +0200 + cubicweb (3.17.15-1) unstable; urgency=low * new upstream release diff -r 57e2cffa6329 -r 9461d1bd70bb doc/book/en/annexes/rql/language.rst --- a/doc/book/en/annexes/rql/language.rst Wed Jul 02 11:37:57 2014 +0200 +++ b/doc/book/en/annexes/rql/language.rst Fri Jul 18 16:14:58 2014 +0200 @@ -350,9 +350,10 @@ matching state of or tagged by the expected tag, * the later will retrieve all versions, state and tags (cartesian product!), - compute join and then exclude each row which are in the matching state of or - tagged by the expected tag. This implies that : you won't get any result if the - in_state or tag + compute join and then exclude each row which are in the matching state or + tagged by the expected tag. This implies that you won't get any result if the + in_state or tag tables are empty (ie there is no such relation in the + application). This is usually NOT what you want. Another common case where you may want to use ``EXISTS`` is when you find yourself using ``DISTINCT`` at the beginning of your query to @@ -562,19 +563,19 @@ Aggregate functions ``````````````````` -+--------------------+----------------------------------------------------------+ -| :func:`COUNT` | return the number of rows | -+--------------------+----------------------------------------------------------+ -| :func:`MIN` | return the minimum value | -+--------------------+----------------------------------------------------------+ -| :func:`MAX` | return the maximum value | -+--------------------+----------------------------------------------------------+ -| :func:`AVG` | return the average value | -+--------------------+----------------------------------------------------------+ -| :func:`SUM` | return the sum of values | -+--------------------+----------------------------------------------------------+ -| :func:`COMMA_JOIN` | return each value separated by a comma (for string only) | -+--------------------+----------------------------------------------------------+ ++------------------------+----------------------------------------------------------+ +| ``COUNT(Any)`` | return the number of rows | ++------------------------+----------------------------------------------------------+ +| ``MIN(Any)`` | return the minimum value | ++------------------------+----------------------------------------------------------+ +| ``MAX(Any)`` | return the maximum value | ++------------------------+----------------------------------------------------------+ +| ``AVG(Any)`` | return the average value | ++------------------------+----------------------------------------------------------+ +| ``SUM(Any)`` | return the sum of values | ++------------------------+----------------------------------------------------------+ +| ``COMMA_JOIN(String)`` | return each value separated by a comma (for string only) | ++------------------------+----------------------------------------------------------+ All aggregate functions above take a single argument. Take care some aggregate functions (e.g. ``MAX``, ``MIN``) may return `None` if there is no @@ -585,67 +586,67 @@ String transformation functions ``````````````````````````````` -+---------------------------------------------------+-----------------------------------------------------------------+ -| :func:`UPPER(String)` | upper case the string | -+---------------------------------------------------+-----------------------------------------------------------------+ -| :func:`LOWER(String)` | lower case the string | -+---------------------------------------------------+-----------------------------------------------------------------+ -| :func:`LENGTH(String)` | return the length of the string | -+---------------------------------------------------+-----------------------------------------------------------------+ -| :func:`SUBSTRING(String, start, length)` | extract from the string a string starting at given index and of | -| | given length | -+---------------------------------------------------+-----------------------------------------------------------------+ -| :func:`LIMIT_SIZE(String, max size)` | if the length of the string is greater than given max size, | -| | strip it and add ellipsis ("..."). The resulting string will | -| | hence have max size + 3 characters | -+---------------------------------------------------+-----------------------------------------------------------------+ -| :func:`TEXT_LIMIT_SIZE(String, format, max size)` | similar to the above, but allow to specify the MIME type of the | -| | text contained by the string. Supported formats are text/html, | -| | text/xhtml and text/xml. All others will be considered as plain | -| | text. For non plain text format, sgml tags will be first removed| -| | before limiting the string. | -+---------------------------------------------------+-----------------------------------------------------------------+ ++-----------------------------------------------+-----------------------------------------------------------------+ +| ``UPPER(String)`` | upper case the string | ++-----------------------------------------------+-----------------------------------------------------------------+ +| ``LOWER(String)`` | lower case the string | ++-----------------------------------------------+-----------------------------------------------------------------+ +| ``LENGTH(String)`` | return the length of the string | ++-----------------------------------------------+-----------------------------------------------------------------+ +| ``SUBSTRING(String, start, length)`` | extract from the string a string starting at given index and of | +| | given length | ++-----------------------------------------------+-----------------------------------------------------------------+ +| ``LIMIT_SIZE(String, max size)`` | if the length of the string is greater than given max size, | +| | strip it and add ellipsis ("..."). The resulting string will | +| | hence have max size + 3 characters | ++-----------------------------------------------+-----------------------------------------------------------------+ +| ``TEXT_LIMIT_SIZE(String, format, max size)`` | similar to the above, but allow to specify the MIME type of the | +| | text contained by the string. Supported formats are text/html, | +| | text/xhtml and text/xml. All others will be considered as plain | +| | text. For non plain text format, sgml tags will be first removed| +| | before limiting the string. | ++-----------------------------------------------+-----------------------------------------------------------------+ .. _RQLDateFunctions: Date extraction functions ````````````````````````` -+--------------------------+----------------------------------------+ -| :func:`YEAR(Date)` | return the year of a date or datetime | -+--------------------------+----------------------------------------+ -| :func:`MONTH(Date)` | return the month of a date or datetime | -+--------------------------+----------------------------------------+ -| :func:`DAY(Date)` | return the day of a date or datetime | -+--------------------------+----------------------------------------+ -| :func:`HOUR(Datetime)` | return the hours of a datetime | -+--------------------------+----------------------------------------+ -| :func:`MINUTE(Datetime)` | return the minutes of a datetime | -+--------------------------+----------------------------------------+ -| :func:`SECOND(Datetime)` | return the seconds of a datetime | -+--------------------------+----------------------------------------+ -| :func:`WEEKDAY(Date)` | return the day of week of a date or | -| | datetime. Sunday == 1, Saturday == 7. | -+--------------------------+----------------------------------------+ ++----------------------+----------------------------------------+ +| ``YEAR(Date)`` | return the year of a date or datetime | ++----------------------+----------------------------------------+ +| ``MONTH(Date)`` | return the month of a date or datetime | ++----------------------+----------------------------------------+ +| ``DAY(Date)`` | return the day of a date or datetime | ++----------------------+----------------------------------------+ +| ``HOUR(Datetime)`` | return the hours of a datetime | ++----------------------+----------------------------------------+ +| ``MINUTE(Datetime)`` | return the minutes of a datetime | ++----------------------+----------------------------------------+ +| ``SECOND(Datetime)`` | return the seconds of a datetime | ++----------------------+----------------------------------------+ +| ``WEEKDAY(Date)`` | return the day of week of a date or | +| | datetime. Sunday == 1, Saturday == 7. | ++----------------------+----------------------------------------+ .. _RQLOtherFunctions: Other functions ``````````````` -+-----------------------+--------------------------------------------------------------------+ -| :func:`ABS(num)` | return the absolute value of a number | -+-----------------------+--------------------------------------------------------------------+ -| :func:`RANDOM()` | return a pseudo-random value from 0.0 to 1.0 | -+-----------------------+--------------------------------------------------------------------+ -| :func:`FSPATH(X)` | expect X to be an attribute whose value is stored in a | -| | :class:`BFSStorage` and return its path on the file system | -+-----------------------+--------------------------------------------------------------------+ -| :func:`FTIRANK(X)` | expect X to be an entity used in a has_text relation, and return a | -| | number corresponding to the rank order of each resulting entity | -+-----------------------+--------------------------------------------------------------------+ -| :func:`CAST(Type, X)` | expect X to be an attribute and return it casted into the given | -| | final type | -+-----------------------+--------------------------------------------------------------------+ ++-------------------+--------------------------------------------------------------------+ +| ``ABS(num)`` | return the absolute value of a number | ++-------------------+--------------------------------------------------------------------+ +| ``RANDOM()`` | return a pseudo-random value from 0.0 to 1.0 | ++-------------------+--------------------------------------------------------------------+ +| ``FSPATH(X)`` | expect X to be an attribute whose value is stored in a | +| | :class:`BFSStorage` and return its path on the file system | ++-------------------+--------------------------------------------------------------------+ +| ``FTIRANK(X)`` | expect X to be an entity used in a has_text relation, and return a | +| | number corresponding to the rank order of each resulting entity | ++-------------------+--------------------------------------------------------------------+ +| ``CAST(Type, X)`` | expect X to be an attribute and return it casted into the given | +| | final type | ++-------------------+--------------------------------------------------------------------+ .. _RQLExamples: @@ -657,7 +658,7 @@ .. sourcecode:: sql - Any WHERE X eid 53 + Any X WHERE X eid 53 - *Search material such as comics, owned by syt and available* @@ -686,7 +687,7 @@ .. sourcecode:: sql - Any P WHERE P is Person, (P interested_by T, T name 'training') OR + Any P WHERE P is Person, EXISTS(P interested_by T, T name 'training') OR (P city 'Paris') - *The surname and firstname of all people* diff -r 57e2cffa6329 -r 9461d1bd70bb web/data/cubicweb.css --- a/web/data/cubicweb.css Wed Jul 02 11:37:57 2014 +0200 +++ b/web/data/cubicweb.css Fri Jul 18 16:14:58 2014 +0200 @@ -200,13 +200,15 @@ visibility: hidden; } -li.invisible { - background: none; - padding: 0px 0px 1px 1px; +/* copied verbatim from bootstrap 3.0 */ +.invisible { + visibility: hidden; } -li.invisible div{ - display: inline; +/* copied verbatim from bootstrap 3.0 */ +.list-unstyled { + padding-left: 0; + list-style: none; } .caption { diff -r 57e2cffa6329 -r 9461d1bd70bb web/data/cubicweb.old.css --- a/web/data/cubicweb.old.css Wed Jul 02 11:37:57 2014 +0200 +++ b/web/data/cubicweb.old.css Fri Jul 18 16:14:58 2014 +0200 @@ -219,14 +219,15 @@ visibility: hidden; } -li.invisible { - list-style: none; - background: none; - padding: 0px 0px 1px 1px; +/* copied verbatim from bootstrap 3.0 */ +.invisible { + visibility: hidden; } -li.invisible div { - display: inline; +/* copied verbatim from bootstrap 3.0 */ +.list-unstyled { + padding-left: 0; + list-style: none; } .caption { diff -r 57e2cffa6329 -r 9461d1bd70bb web/test/unittest_reledit.py --- a/web/test/unittest_reledit.py Wed Jul 02 11:37:57 2014 +0200 +++ b/web/test/unittest_reledit.py Fri Jul 18 16:14:58 2014 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -34,9 +34,9 @@ class ClickAndEditFormTC(ReleditMixinTC, CubicWebTC): def test_default_config(self): - reledit = {'title': '''
cubicweb-world-domination
''', - 'long_desc': '''
<not specified>
''', - 'manager': '''
<not specified>
''', + reledit = {'title': '''
cubicweb-world-domination
''', + 'long_desc': '''
<not specified>
''', + 'manager': '''
<not specified>
''', 'composite_card11_2ttypes': """<not specified>""", 'concerns': """<not specified>"""} @@ -53,7 +53,7 @@ def test_default_forms(self): self.skipTest('Need to check if this test should still run post reledit/doreledit merge') - doreledit = {'title': """
cubicweb-world-domination
+ doreledit = {'title': """
cubicweb-world-domination
@@ -82,12 +82,12 @@
-
""", +
""", - 'long_desc': """
<not specified>
+ 'long_desc': """
<not specified>
- - + + @@ -126,9 +126,9 @@
-
""", +
""", - 'manager': """
<not specified>
+ 'manager': """
<not specified>
@@ -162,7 +162,7 @@
-
""", +
""", 'composite_card11_2ttypes': """<not specified>""", 'concerns': """<not specified>""" } @@ -198,11 +198,11 @@ reledit_ctrl.tag_object_of(('Ticket', 'concerns', 'Project'), {'edit_target': 'rtype'}) reledit = { - 'title': """
cubicweb-world-domination
""", - 'long_desc': """
<long_desc is required>
""", - 'manager': """""", + 'title': """
cubicweb-world-domination
""", + 'long_desc': """
<long_desc is required>
""", + 'manager': """""", 'composite_card11_2ttypes': """<not specified>""", - 'concerns': """""" + 'concerns': """""" } with self.admin_access.web_request() as req: proj = req.entity_from_eid(self.proj) diff -r 57e2cffa6329 -r 9461d1bd70bb web/views/ajaxedit.py --- a/web/views/ajaxedit.py Wed Jul 02 11:37:57 2014 +0200 +++ b/web/views/ajaxedit.py Fri Jul 18 16:14:58 2014 +0200 @@ -55,9 +55,9 @@ self.w(u'

%s

' % self._cw._('relation %(relname)s of %(ent)s') % {'relname': rschema.display_name(self._cw, role(self)), 'ent': entity.view('incontext')}) - self.w(u'
    ') + self.w(u'
      ') for boxitem in self.unrelated_boxitems(entity): - self.w('' % boxitem) + self.w('
    • %s
    • ' % boxitem) self.w(u'
    ') def unrelated_entities(self, entity): diff -r 57e2cffa6329 -r 9461d1bd70bb web/views/autoform.py --- a/web/views/autoform.py Wed Jul 02 11:37:57 2014 +0200 +++ b/web/views/autoform.py Fri Jul 18 16:14:58 2014 +0200 @@ -504,15 +504,15 @@ label = rschema.display_name(req, role, context=form.edited_entity.cw_etype) w(u'%s' % label) w(u'') - w(u'
      ') + w(u'
        ') for viewparams in related: - w(u'' + w(u'
      • %s%s
      • ' % (viewparams[1], viewparams[0], viewparams[2], viewparams[3])) if not form.force_display and form.maxrelitems < len(related): - link = (u'
      ') w(u'') w(u'') diff -r 57e2cffa6329 -r 9461d1bd70bb web/views/reledit.py --- a/web/views/reledit.py Wed Jul 02 11:37:57 2014 +0200 +++ b/web/views/reledit.py Fri Jul 18 16:14:58 2014 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -329,13 +329,13 @@ w = self.w w(u'
      ' % {'id': divid, 'css': 'releditField', - 'out': "jQuery('#%s').addClass('hidden')" % divid, - 'over': "jQuery('#%s').removeClass('hidden')" % divid}) + 'out': "jQuery('#%s').addClass('invisible')" % divid, + 'over': "jQuery('#%s').removeClass('invisible')" % divid}) w(u'
      ' % divid) w(value) w(u'
      ') form.render(w=w, renderer=renderer) - w(u'