work in progress: prepare listings for update actions using checkboxes on list items; work in progress: expert.browser for new query views; + minor adjustments
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2933 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
f89e7191c6
commit
c2a16063c5
8 changed files with 94 additions and 4 deletions
|
@ -492,7 +492,9 @@ class BaseView(GenericView, I18NView):
|
||||||
djConfig='parseOnLoad: true, usePlainJson: true, '
|
djConfig='parseOnLoad: true, usePlainJson: true, '
|
||||||
#'isDebug: true, '
|
#'isDebug: true, '
|
||||||
'locale: "%s"' % self.languageInfo.language)
|
'locale: "%s"' % self.languageInfo.language)
|
||||||
jsCall = 'dojo.require("dojo.parser");'
|
jsCall = ('dojo.require("dojo.parser"); '
|
||||||
|
'dojo.registerModulePath("jocy", "/@@/cybertools.jocy"); '
|
||||||
|
'dojo.require("jocy.data");')
|
||||||
cm.register('js-execute', jsCall, jsCall=jsCall)
|
cm.register('js-execute', jsCall, jsCall=jsCall)
|
||||||
cm.register('css', identifier='tundra.css', position=0,
|
cm.register('css', identifier='tundra.css', position=0,
|
||||||
resourceName='ajax.dojo/dijit/themes/tundra/tundra.css', media='all')
|
resourceName='ajax.dojo/dijit/themes/tundra/tundra.css', media='all')
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
i18n:translate="">Type</span></td>
|
i18n:translate="">Type</span></td>
|
||||||
<td><span tal:replace="related/modified">Type</span></td>
|
<td><span tal:replace="related/modified">Type</span></td>
|
||||||
<td><span tal:replace="related/creators">Type</span></td>
|
<td><span tal:replace="related/creators">Type</span></td>
|
||||||
<td style="white-space: nowrap"
|
<td style="white-space: nowrap; text-align: center"
|
||||||
tal:define="target nocall:related;
|
tal:define="target nocall:related;
|
||||||
style nothing"
|
style nothing"
|
||||||
tal:condition="view/showObjectActions">
|
tal:condition="view/showObjectActions">
|
||||||
|
@ -123,6 +123,7 @@
|
||||||
<h2 i18n:translate="">Resources</h2>
|
<h2 i18n:translate="">Resources</h2>
|
||||||
<table class="listing">
|
<table class="listing">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th tal:condition="view/showCheckboxes|nothing"> </th>
|
||||||
<th i18n:translate="">Title</th>
|
<th i18n:translate="">Title</th>
|
||||||
<th i18n:translate="">Type</th>
|
<th i18n:translate="">Type</th>
|
||||||
<th i18n:translate=""
|
<th i18n:translate=""
|
||||||
|
@ -137,6 +138,8 @@
|
||||||
<tal:item define="class python: repeat['related'].odd() and 'even' or 'odd';
|
<tal:item define="class python: repeat['related'].odd() and 'even' or 'odd';
|
||||||
description related/description">
|
description related/description">
|
||||||
<tr tal:attributes="class class">
|
<tr tal:attributes="class class">
|
||||||
|
<td tal:condition="view/showCheckboxes|nothing"
|
||||||
|
class="checkbox"><input type="checkbox" /></td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
tal:attributes="href string:${view/url}/.target${related/uniqueId};
|
tal:attributes="href string:${view/url}/.target${related/uniqueId};
|
||||||
|
@ -159,7 +162,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td><span tal:replace="related/modified">2007-03-30</span></td>
|
<td><span tal:replace="related/modified">2007-03-30</span></td>
|
||||||
<td><span tal:replace="related/creators">John</span></td>
|
<td><span tal:replace="related/creators">John</span></td>
|
||||||
<td style="white-space: nowrap"
|
<td style="white-space: nowrap; text-align: center"
|
||||||
tal:define="target nocall:related;
|
tal:define="target nocall:related;
|
||||||
style nothing"
|
style nothing"
|
||||||
tal:condition="view/showObjectActions">
|
tal:condition="view/showObjectActions">
|
||||||
|
|
|
@ -181,7 +181,8 @@
|
||||||
</div>
|
</div>
|
||||||
<input dojoType="dijit.form.FilteringSelect" store="conceptSearch"
|
<input dojoType="dijit.form.FilteringSelect" store="conceptSearch"
|
||||||
autoComplete="False" labelAttr="label"
|
autoComplete="False" labelAttr="label"
|
||||||
name="concept.search.text" id="concept.search.text" />
|
name="concept.search.text" id="concept.search.text"
|
||||||
|
style="height: 1.5em" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="button" value="Select"
|
<input type="button" value="Select"
|
||||||
|
|
|
@ -36,6 +36,14 @@ blockquote ul {
|
||||||
|
|
||||||
table.listing td {
|
table.listing td {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.listing td.checkbox {
|
||||||
|
text-align: center;
|
||||||
|
width: 10px;
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.listing-details td {
|
table.listing-details td {
|
||||||
|
|
4
expert/browser/__init__.py
Normal file
4
expert/browser/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
"""
|
||||||
|
$Id$
|
||||||
|
"""
|
||||||
|
|
46
expert/browser/base.py
Normal file
46
expert/browser/base.py
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 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
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
Definition of basic view classes and other browser related stuff for the
|
||||||
|
loops.expert package.
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
"""
|
||||||
|
|
||||||
|
from zope import interface, component
|
||||||
|
from zope.app.pagetemplate import ViewPageTemplateFile
|
||||||
|
from zope.cachedescriptors.property import Lazy
|
||||||
|
|
||||||
|
from loops.browser.common import BaseView
|
||||||
|
from loops.common import adapted
|
||||||
|
from loops import util
|
||||||
|
from loops.util import _
|
||||||
|
|
||||||
|
|
||||||
|
queryTemplate = ViewPageTemplateFile('query.pt')
|
||||||
|
|
||||||
|
|
||||||
|
class BaseQueryView(BaseView):
|
||||||
|
|
||||||
|
template = queryTemplate
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def macro(self):
|
||||||
|
return template.macros['query']
|
||||||
|
|
16
expert/browser/configure.zcml
Normal file
16
expert/browser/configure.zcml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<configure
|
||||||
|
xmlns:zope="http://namespaces.zope.org/zope"
|
||||||
|
xmlns:browser="http://namespaces.zope.org/browser"
|
||||||
|
i18n_domain="loops">
|
||||||
|
|
||||||
|
<zope:adapter
|
||||||
|
name="query"
|
||||||
|
for="loops.interfaces.IConcept
|
||||||
|
zope.publisher.interfaces.browser.IBrowserRequest"
|
||||||
|
provides="zope.interface.Interface"
|
||||||
|
factory="loops.expert.browser.base.BaseQueryView"
|
||||||
|
permission="zope.View" />
|
||||||
|
|
||||||
|
</configure>
|
10
expert/browser/query.pt
Normal file
10
expert/browser/query.pt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<metal:query define-macro="query">
|
||||||
|
<div id="query">
|
||||||
|
<h1 tal:attributes="class string:content-$level;
|
||||||
|
ondblclick item/openEditWindow"
|
||||||
|
tal:content="item/title">
|
||||||
|
Query
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</metal:query>
|
||||||
|
|
Loading…
Add table
Reference in a new issue