Don't call tokenToUrl if value is --NOVALUE--

This commit is contained in:
Vincent Fretin 2013-03-08 13:14:34 +01:00
parent c3f50dc5fc
commit fe09814281
4 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,8 @@ Changelog
1.0 (unreleased)
----------------
- Nothing changed yet.
- Don't call tokenToUrl if value is --NOVALUE--.
[vincentfretin]
0.10 (2013-03-07)

View File

@ -41,7 +41,7 @@
class="link-tooltip"
target="_new"
tal:define="url python:view.tokenToUrl(item['value'])"
tal:omit-tag="python:item['value'] == '--NOVALUE--' or not url"
tal:omit-tag="not:url"
tal:attributes="href url"
href="">Label</a></span>
</label>

View File

@ -41,7 +41,7 @@
class="link-tooltip"
target="_new"
tal:define="url python:view.tokenToUrl(item['value'])"
tal:omit-tag="python:item['value'] == '--NOVALUE--' or not url"
tal:omit-tag="not:url"
tal:attributes="href url"
href="">Label</a></span>
</label>

View File

@ -173,6 +173,8 @@ function (event, data, formatted) {
"""
def tokenToUrl(self, token):
if token == "--NOVALUE--":
return ""
return self.bound_source.tokenToUrl(token)
def render(self):