Merge branch 'master' into bbmaster
This commit is contained in:
commit
2d1efac60e
3 changed files with 13 additions and 3 deletions
|
@ -10,6 +10,12 @@
|
||||||
</metal:logo>
|
</metal:logo>
|
||||||
|
|
||||||
|
|
||||||
|
<metal:meta define-macro="meta">
|
||||||
|
<meta tal:attributes="name macro/name;
|
||||||
|
content macro/content" />
|
||||||
|
</metal:meta>
|
||||||
|
|
||||||
|
|
||||||
<metal:css define-macro="css"
|
<metal:css define-macro="css"
|
||||||
tal:define="isIE macro/is_ie|nothing">
|
tal:define="isIE macro/is_ie|nothing">
|
||||||
<tal:ie condition="isIE"
|
<tal:ie condition="isIE"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -98,8 +98,6 @@ class Macros(dict):
|
||||||
# make sure a certain resource is only registered once
|
# make sure a certain resource is only registered once
|
||||||
if identifier in self.identifiers:
|
if identifier in self.identifiers:
|
||||||
return
|
return
|
||||||
#self.identifiers.add(identifier)
|
|
||||||
self.identifiers[identifier] = True
|
|
||||||
if template is None:
|
if template is None:
|
||||||
template = self.standardTemplate
|
template = self.standardTemplate
|
||||||
if name is None:
|
if name is None:
|
||||||
|
@ -107,6 +105,8 @@ class Macros(dict):
|
||||||
macro = Macro(template, name, priority, identifier=identifier, **kw)
|
macro = Macro(template, name, priority, identifier=identifier, **kw)
|
||||||
entry = self.setdefault(slot, [])
|
entry = self.setdefault(slot, [])
|
||||||
entry.append(macro)
|
entry.append(macro)
|
||||||
|
if identifier:
|
||||||
|
self.identifiers[identifier] = macro
|
||||||
|
|
||||||
def hide(self, identifier):
|
def hide(self, identifier):
|
||||||
self.identifiers[identifier] = False
|
self.identifiers[identifier] = False
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
</title>
|
</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
|
||||||
|
<tal:meta repeat="macro controller/macros/meta">
|
||||||
|
<metal:css use-macro="macro" />
|
||||||
|
</tal:meta>
|
||||||
|
|
||||||
<tal:css repeat="macro controller/macros/css">
|
<tal:css repeat="macro controller/macros/css">
|
||||||
<metal:css use-macro="macro" />
|
<metal:css use-macro="macro" />
|
||||||
</tal:css>
|
</tal:css>
|
||||||
|
|
Loading…
Add table
Reference in a new issue