[gen] Allow Refs with render='menus' to appear in layout 'buttons'.
This commit is contained in:
parent
34cafcdbc1
commit
d9a89f7ad5
7 changed files with 68 additions and 31 deletions
|
@ -818,6 +818,7 @@ class BaseMixin:
|
|||
for field in self.getAllAppyTypes():
|
||||
if pageName and (field.page.name != pageName): continue
|
||||
if type and (field.type != type): continue
|
||||
if not field.isRenderable(layoutType): continue
|
||||
if not field.isShowable(self, layoutType): continue
|
||||
res.append(field)
|
||||
return res
|
||||
|
|
|
@ -110,7 +110,8 @@ td.search { padding-top: 8px }
|
|||
.dropdownMenu { cursor: pointer; font-size: 93%; position: relative }
|
||||
.dropdown a:hover { text-decoration: underline }
|
||||
.addForm { display: inline }
|
||||
.addFormMenu { display: table-cell; padding-left: 7px }
|
||||
.addFormMenu { display: inline; padding: 0 5px 0 3px }
|
||||
.inline { display: inline }
|
||||
.list { margin-bottom: 3px }
|
||||
.list td, .list th { border: 3px solid #ededed; color: grey;
|
||||
padding: 3px 5px 3px 5px }
|
||||
|
@ -185,3 +186,4 @@ td.search { padding-top: 8px }
|
|||
margin: 0 2px 0 4px; font-family: monospace }
|
||||
.highlight { background-color: yellow }
|
||||
.globalActions { margin-bottom: 4px }
|
||||
.objectActions { margin: 2px 0 }
|
||||
|
|
|
@ -178,7 +178,7 @@ def callMethod(obj, method, klass=None, cache=True):
|
|||
method = method.__get__(klass)
|
||||
elif methodType == 'instancemethod':
|
||||
method = method.im_func
|
||||
# Call the method if cache is not needed.
|
||||
# Call the method if cache is not needed
|
||||
if not cache: return method(obj)
|
||||
# If first arg of method is named "tool" instead of the traditional "self",
|
||||
# we cheat and will call the method with the tool as first arg. This will
|
||||
|
@ -208,7 +208,6 @@ def callMethod(obj, method, klass=None, cache=True):
|
|||
rq.methodCache[key] = res
|
||||
return res
|
||||
|
||||
|
||||
# Functions for manipulating the authentication cookie -------------------------
|
||||
def readCookie(request):
|
||||
'''Returns the tuple (login, password) read from the authentication
|
||||
|
|
|
@ -363,7 +363,7 @@ class ToolWrapper(AbstractWrapper):
|
|||
|
||||
<!-- Actions -->
|
||||
<div if="not inPopup and uiSearch.showActions and zobj.mayAct()"
|
||||
style=":'display:%s; margin-bottom:2px' % uiSearch.showActions">
|
||||
class="objectActions" style=":'display:%s' % uiSearch.showActions">
|
||||
<!-- Edit -->
|
||||
<a if="zobj.mayEdit()"
|
||||
var2="navInfo='search.%s.%s.%d.%d' % \
|
||||
|
@ -384,11 +384,11 @@ class ToolWrapper(AbstractWrapper):
|
|||
buttonsMode='small'">:targetObj.appy().pxTransitions</x>
|
||||
<!-- Fields (actions) defined with layout "buttons" -->
|
||||
<x if="not inPopup"
|
||||
var2="fields=zobj.getAppyTypes('buttons', 'main', type='Action');
|
||||
layoutType='view'">
|
||||
<!-- Call pxView and not pxRender to avoid having a table -->
|
||||
var2="fields=zobj.getAppyTypes('buttons', 'main');
|
||||
layoutType='cell'">
|
||||
<!-- Call pxCell and not pxRender to avoid having a table -->
|
||||
<x for="field in fields"
|
||||
var2="name=field.name; smallButtons=True">:field.pxView</x>
|
||||
var2="name=field.name; smallButtons=True">:field.pxCell</x>
|
||||
</x>
|
||||
</div>
|
||||
</x>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue