Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
8b51e837
Commit
8b51e837
authored
Jun 26, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added resize buttons.
parent
374e9c30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
5 deletions
+62
-5
lib/python/Products/ZSQLMethods/edit.dtml
lib/python/Products/ZSQLMethods/edit.dtml
+22
-2
lib/python/Shared/DC/ZRDB/DA.py
lib/python/Shared/DC/ZRDB/DA.py
+40
-3
No files found.
lib/python/Products/ZSQLMethods/edit.dtml
View file @
8b51e837
...
...
@@ -39,10 +39,30 @@
value="<!--#var arguments_src fmt=html-quote-->"></td>
</tr>
<tr> <td colspan=2 align='LEFT'><strong>Query template</strong><br>
<textarea name="template:text" rows=10 cols=50><!--#var
<textarea name="template:text"
<!--#if dtpref_cols-->
COLS="<!--#var dtpref_cols-->"
<!--#else dtpref_cols-->
COLS="50"
<!--#/if dtpref_cols-->
<!--#if dtpref_rows-->
ROWS="<!--#var dtpref_rows-->"
<!--#else dtpref_rows-->
ROWS="20"
<!--#/if dtpref_rows-->><!--#var
src fmt=html-quote--></textarea></td></tr>
<tr><td></td><td><input type="SUBMIT" name="SUBMIT" value="Change"></td></tr>
<tr>
<TD align=left>
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Change">
</TD>
<TD align=left>
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Taller">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Shorter">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Wider">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Narrower">
</TD>
</tr>
</table>
</form>
...
...
lib/python/Shared/DC/ZRDB/DA.py
View file @
8b51e837
...
...
@@ -11,8 +11,8 @@
__doc__
=
'''Generic Database adapter
$Id: DA.py,v 1.4
7 1998/05/11 15:00:13
jim Exp $'''
__version__
=
'$Revision: 1.4
7
$'
[
11
:
-
2
]
$Id: DA.py,v 1.4
8 1998/06/26 21:51:28
jim Exp $'''
__version__
=
'$Revision: 1.4
8
$'
[
11
:
-
2
]
import
OFS.SimpleItem
,
Aqueduct
.
Aqueduct
,
Aqueduct
.
RDB
import
DocumentTemplate
,
marshal
,
md5
,
base64
,
DateTime
,
Acquisition
,
os
...
...
@@ -92,7 +92,36 @@ class DA(
del
self
.
key
del
self
.
rotor
def
manage_edit
(
self
,
title
,
connection_id
,
arguments
,
template
,
REQUEST
=
None
):
_size_changes
=
{
'Bigger'
:
(
5
,
5
),
'Smaller'
:
(
-
5
,
-
5
),
'Narrower'
:
(
0
,
-
5
),
'Wider'
:
(
0
,
5
),
'Taller'
:
(
5
,
0
),
'Shorter'
:
(
-
5
,
0
),
}
def
_er
(
self
,
title
,
connection_id
,
arguments
,
template
,
SUBMIT
,
dtpref_cols
,
dtpref_rows
,
REQUEST
):
dr
,
dc
=
self
.
_size_changes
[
SUBMIT
]
rows
=
max
(
1
,
atoi
(
dtpref_rows
)
+
dr
)
cols
=
max
(
40
,
atoi
(
dtpref_cols
)
+
dc
)
e
=
'Friday, 31-Dec-99 23:59:59 GMT'
resp
=
REQUEST
[
'RESPONSE'
]
resp
.
setCookie
(
'dtpref_rows'
,
str
(
rows
),
path
=
'/'
,
expires
=
e
)
resp
.
setCookie
(
'dtpref_cols'
,
str
(
cols
),
path
=
'/'
,
expires
=
e
)
return
self
.
manage_main
(
self
,
REQUEST
,
title
=
title
,
arguments_src
=
arguments
,
connection_id
=
connection_id
,
template
=
template
,
dtpref_cols
=
cols
,
dtpref_rows
=
rows
)
def
manage_edit
(
self
,
title
,
connection_id
,
arguments
,
template
,
SUBMIT
=
'Change'
,
dtpref_cols
=
'50'
,
dtpref_rows
=
'20'
,
REQUEST
=
None
):
"""Change database method properties
The 'connection_id' argument is the id of a database connection
...
...
@@ -105,6 +134,11 @@ class DA(
The 'template' argument is a string containing the source for the
SQL Template.
"""
if
self
.
_size_changes
.
has_key
(
SUBMIT
):
return
self
.
_er
(
title
,
connection_id
,
arguments
,
template
,
SUBMIT
,
dtpref_cols
,
dtpref_rows
,
REQUEST
)
self
.
title
=
title
self
.
connection_id
=
connection_id
self
.
arguments_src
=
arguments
...
...
@@ -431,6 +465,9 @@ def getBrain(self,
##############################################################################
#
# $Log: DA.py,v $
# Revision 1.48 1998/06/26 21:51:28 jim
# Added resize buttons.
#
# Revision 1.47 1998/05/11 15:00:13 jim
# Updated permissions.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment