work in progress: grid field (widget)
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2989 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
2e0a9701e9
commit
d4ef8e54c1
4 changed files with 64 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
<configure
|
||||
xmlns="http://namespaces.zope.org/zope"
|
||||
xmlns:browser="http://namespaces.zope.org/browser"
|
||||
i18n_domain="zope">
|
||||
i18n_domain="cybertools.composer.schema">
|
||||
|
||||
<adapter factory="cybertools.composer.schema.client.ClientFactory" />
|
||||
<adapter factory="cybertools.composer.schema.instance.ClientInstance" />
|
||||
|
|
4
composer/schema/grid/__init__.py
Normal file
4
composer/schema/grid/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
"""
|
||||
$Id$
|
||||
"""
|
||||
|
35
composer/schema/grid/field.py
Normal file
35
composer/schema/grid/field.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
"""
|
||||
Field and field instance classes for grids.
|
||||
|
||||
$Id$
|
||||
"""
|
||||
|
||||
from zope import component
|
||||
from zope.interface import implements
|
||||
from zope.cachedescriptors.property import Lazy
|
||||
from zope.component import adapts
|
||||
import zope.schema
|
||||
|
||||
from cybertools.composer.schema.interfaces import IField, IFieldInstance
|
||||
from cybertools.composer.schema.interfaces import fieldTypes, undefined
|
||||
from cybertools.util.format import toStr, toUnicode
|
||||
|
||||
|
24
composer/schema/grid/grid_macros.pt
Executable file
24
composer/schema/grid/grid_macros.pt
Executable file
|
@ -0,0 +1,24 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"
|
||||
i18n:domain="cybertools.composer.schema">
|
||||
<body>
|
||||
|
||||
|
||||
<metal:input define-macro="input_grid">
|
||||
|
||||
<span dojoType="dojo.data.ItemFileWriteStore"
|
||||
tal:attributes="jsId string:store_$name;
|
||||
data data/?name"/>
|
||||
|
||||
<table dojoType="dojox.grid.DataGrid"
|
||||
style="width: 35em; height: 15em"
|
||||
tal:attributes="name name; id name;
|
||||
store string:store_$name">
|
||||
<thead>
|
||||
<tr>
|
||||
<tal:header repeat="column field/columns">
|
||||
<th tal:attributes="field column/name"
|
||||
tal:content="column/title">Column Title</th>
|
||||
</tal:header>
|
||||
</tr></thead></table>
|
||||
|
||||
</metal:input>
|
Loading…
Add table
Reference in a new issue