Merge branch 'master' into bbmaster

This commit is contained in:
Helmut Merz 2011-10-10 12:29:19 +02:00
commit 2d1efac60e
3 changed files with 13 additions and 3 deletions

View file

@ -10,6 +10,12 @@
</metal:logo>
<metal:meta define-macro="meta">
<meta tal:attributes="name macro/name;
content macro/content" />
</metal:meta>
<metal:css define-macro="css"
tal:define="isIE macro/is_ie|nothing">
<tal:ie condition="isIE"

View file

@ -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
# 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
if identifier in self.identifiers:
return
#self.identifiers.add(identifier)
self.identifiers[identifier] = True
if template is None:
template = self.standardTemplate
if name is None:
@ -107,6 +105,8 @@ class Macros(dict):
macro = Macro(template, name, priority, identifier=identifier, **kw)
entry = self.setdefault(slot, [])
entry.append(macro)
if identifier:
self.identifiers[identifier] = macro
def hide(self, identifier):
self.identifiers[identifier] = False

View file

@ -14,6 +14,10 @@
</title>
<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">
<metal:css use-macro="macro" />
</tal:css>