[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6585 - in trunk/gnue-designer/src: base base/tools forms/wizards
From: |
kilo |
Subject: |
r6585 - in trunk/gnue-designer/src: base base/tools forms/wizards |
Date: |
Sat, 30 Oct 2004 15:51:30 -0500 (CDT) |
Author: kilo
Date: 2004-10-30 15:51:28 -0500 (Sat, 30 Oct 2004)
New Revision: 6585
Modified:
trunk/gnue-designer/src/base/Icons.py
trunk/gnue-designer/src/base/Instance.py
trunk/gnue-designer/src/base/ToolBar.py
trunk/gnue-designer/src/base/tools/TriggerEditor.py
trunk/gnue-designer/src/forms/wizards/AddBlock.py
trunk/gnue-designer/src/forms/wizards/AddBox.py
trunk/gnue-designer/src/forms/wizards/AddButton.py
trunk/gnue-designer/src/forms/wizards/AddCheckbox.py
trunk/gnue-designer/src/forms/wizards/AddDataSource.py
trunk/gnue-designer/src/forms/wizards/AddDropDown.py
trunk/gnue-designer/src/forms/wizards/AddEntry.py
trunk/gnue-designer/src/forms/wizards/AddLabel.py
trunk/gnue-designer/src/forms/wizards/AddPage.py
trunk/gnue-designer/src/forms/wizards/CreateSchema.py
trunk/gnue-designer/src/forms/wizards/CreateWebForm.py
Log:
Marked strings for translation
Removed obsoleted developer printouts
Make LayoutEditor toolbar tooltips work
Modified: trunk/gnue-designer/src/base/Icons.py
===================================================================
--- trunk/gnue-designer/src/base/Icons.py 2004-10-30 12:36:18 UTC (rev
6584)
+++ trunk/gnue-designer/src/base/Icons.py 2004-10-30 20:51:28 UTC (rev
6585)
@@ -56,12 +56,8 @@
for f in ('block','datasource','entry','import','pagewidget',
'page','trigger','properties'):
if os.path.isfile('%s/destree_%s.%s' % (iconlocation, f,iconextension)):
- print '%s/destree_%s.%s' % (iconlocation, f,iconextension)
treeIconMap[f] = treeIconList.AddIcon(
- wxIcon('%s/destree_%s.%s' % (iconlocation, f,iconextension),
+ wxIcon('%s/destree_%s.%s' % (iconlocation, f,iconextension),
icontype))
else:
treeIconMap[f] = treeIconList.AddIcon(wxNullIcon)
-
-
-
\ No newline at end of file
Modified: trunk/gnue-designer/src/base/Instance.py
===================================================================
--- trunk/gnue-designer/src/base/Instance.py 2004-10-30 12:36:18 UTC (rev
6584)
+++ trunk/gnue-designer/src/base/Instance.py 2004-10-30 20:51:28 UTC (rev
6585)
@@ -222,9 +222,9 @@
self._initMenu()
self.initMenu()
+ self.createWizards()
self.createTools()
self._initTools()
- self.createWizards()
# Finalize menu bar
self.menubar.finalize()
@@ -705,7 +705,7 @@
self.menubar.addAction(location=location, text=translation,
event='Wizard:%s' % template['BaseID'],
grouping=grouping, canDisable=1,
- eventdata={'template':template})
+ eventdata={'template':template},
help=template['Description'])
except ValueError:
continue
Modified: trunk/gnue-designer/src/base/ToolBar.py
===================================================================
--- trunk/gnue-designer/src/base/ToolBar.py 2004-10-30 12:36:18 UTC (rev
6584)
+++ trunk/gnue-designer/src/base/ToolBar.py 2004-10-30 20:51:28 UTC (rev
6585)
@@ -70,7 +70,7 @@
try:
shortHelp, longHelp = self.instance.menubar.getEventHelp(handle)
- shortHelp = shortHelp.replace('&','')
+ shortHelp = shortHelp.replace('&','') #Menu entries can contain
shortcut keys
longHelp = longHelp.replace('&','')
except:
print "Warning: No event tied to %s" % handle
Modified: trunk/gnue-designer/src/base/tools/TriggerEditor.py
===================================================================
--- trunk/gnue-designer/src/base/tools/TriggerEditor.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/base/tools/TriggerEditor.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -52,10 +52,8 @@
if USE_STC:
EditorCtrl = PythonEditorControl
- print "1"
else:
EditorCtrl = FallbackPythonEditorControl
- print "2"
self.editor = EditorCtrl(self,-1, pos=wxPoint(0,32))
self.editor.InEditMode = 0
Modified: trunk/gnue-designer/src/forms/wizards/AddBlock.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddBlock.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddBlock.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -111,7 +111,7 @@
WizardText('You may be asked to login to this
connection.')),
'prev': '0',
'next': '2:new' }
-
+
#
# Step #3 [New Datasource] / Get Table
#
@@ -214,8 +214,8 @@
'Product': 'forms',
'BaseID' : 'AddBlock',
'BaseClass' : AddBlockWizard,
- 'Name' : 'Add Block',
- 'Description' : 'Inserts a Block',
+ 'Name' : _('Add Block'),
+ 'Description' : _('Inserts a Block'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': WIZARD,
Modified: trunk/gnue-designer/src/forms/wizards/AddBox.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddBox.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddBox.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -80,8 +80,8 @@
'Product': 'forms',
'BaseID' : 'AddBox',
'BaseClass' : AddBoxWizard,
- 'Name' : 'Add Box',
- 'Description' : 'Inserts a basic box',
+ 'Name' : _('Add Box'),
+ 'Description' : _('Inserts a basic box'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': TEMPLATE,
Modified: trunk/gnue-designer/src/forms/wizards/AddButton.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddButton.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddButton.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -211,9 +211,8 @@
'Product': 'forms',
# Unique name for this wizard
'BaseID' : 'AddButton',
- 'Name' : 'Add Button',
-
'BaseClass' : AddButtonWizard,
+ 'Name' : _('Add Button'),
'Description' : _('Inserts a button bound to an event'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
Modified: trunk/gnue-designer/src/forms/wizards/AddCheckbox.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddCheckbox.py 2004-10-30
12:36:18 UTC (rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddCheckbox.py 2004-10-30
20:51:28 UTC (rev 6585)
@@ -25,7 +25,7 @@
# Implements a basic form template
#
# NOTES:
-#
+#
from gnue.designer.forms.TemplateSupport import *
from gnue.designer import VERSION
@@ -90,8 +90,8 @@
'Product': 'forms',
'BaseID' : 'AddCheckbox',
'BaseClass' : AddCheckboxWizard,
- 'Name' : 'Add Checkbox Entry',
- 'Description' : 'Inserts a basic unbound checkbox entry',
+ 'Name' : _('Add Checkbox Entry'),
+ 'Description' : _('Inserts a basic unbound checkbox entry'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': TEMPLATE,
Modified: trunk/gnue-designer/src/forms/wizards/AddDataSource.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddDataSource.py 2004-10-30
12:36:18 UTC (rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddDataSource.py 2004-10-30
20:51:28 UTC (rev 6585)
@@ -167,8 +167,8 @@
'Product': 'forms',
'BaseID' : 'AddDataSource',
'BaseClass' : AddDataSourceWizard,
- 'Name' : 'Add a new Data Source',
- 'Description' : 'Inserts a new DataSource',
+ 'Name' : _('Add a new Data Source'),
+ 'Description' : _('Inserts a new DataSource'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': WIZARD,
Modified: trunk/gnue-designer/src/forms/wizards/AddDropDown.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddDropDown.py 2004-10-30
12:36:18 UTC (rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddDropDown.py 2004-10-30
20:51:28 UTC (rev 6585)
@@ -333,8 +333,8 @@
'Product': 'forms',
'BaseID' : 'AddDropDown',
'BaseClass' : AddDropDownWizard,
- 'Name' : 'Add Bound Drop Down',
- 'Description' : 'Inserts a bound dropdown',
+ 'Name' : _('Add Bound Drop Down'),
+ 'Description' : _('Inserts a bound dropdown'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': WIZARD,
Modified: trunk/gnue-designer/src/forms/wizards/AddEntry.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddEntry.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddEntry.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -89,8 +89,8 @@
'Product': 'forms',
'BaseID' : 'AddEntry',
'BaseClass' : AddEntryWizard,
- 'Name' : 'Add Entry',
- 'Description' : 'Inserts a basic unbound entry',
+ 'Name' : _('Add Entry'),
+ 'Description' : _('Inserts a basic unbound entry'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': TEMPLATE,
Modified: trunk/gnue-designer/src/forms/wizards/AddLabel.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddLabel.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddLabel.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -81,8 +81,8 @@
'Product': 'forms',
'BaseID' : 'AddLabel',
'BaseClass' : AddLabelWizard,
- 'Name' : 'Add Label',
- 'Description' : 'Inserts a basic label',
+ 'Name' : _('Add Label'),
+ 'Description' : _('Inserts a basic label'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': TEMPLATE,
Modified: trunk/gnue-designer/src/forms/wizards/AddPage.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/AddPage.py 2004-10-30 12:36:18 UTC
(rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/AddPage.py 2004-10-30 20:51:28 UTC
(rev 6585)
@@ -139,8 +139,8 @@
'Product': 'forms',
'BaseClass' : AddPageWizard,
'BaseID' : 'AddPage',
- 'Name' : 'Add Page',
- 'Description' : 'Inserts a blank page',
+ 'Name' : _('Add Page'),
+ 'Description' : _('Inserts a blank page'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': WIZARD,
Modified: trunk/gnue-designer/src/forms/wizards/CreateSchema.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/CreateSchema.py 2004-10-30
12:36:18 UTC (rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/CreateSchema.py 2004-10-30
20:51:28 UTC (rev 6585)
@@ -189,19 +189,19 @@
# string type needs a definit size
if type == self.STRING_TYPE:
-
+
size = self.DEFAULT_SIZE
-
+
if hasattr(obj,'max_length'):
size = obj.max_length
-
+
elif hasattr(obj,'width'):
size = obj.width
-
+
self.AddField(table, obj.field, self.STRING_TYPE, size)
-
+
else:
-
+
self.AddField(table, obj.field, type)
#
@@ -209,40 +209,40 @@
#
if hasattr(obj,'fk_key') and hasattr(obj,'fk_source') and\
self.tablelist.has_key(string.lower(obj.fk_source)):
-
+
table=self.tablelist[string.lower(obj.fk_source)]
# add 'fk_key' field
- if type == self.STRING_TYPE:
+ if type == self.STRING_TYPE:
self.AddField(table, obj.fk_key, type, size)
-
- else:
+
+ else:
self.AddField(table, obj.fk_key, type)
if hasattr(obj,'fk_description'):
-
+
# add 'fk_description' field
self.AddField(table, obj.fk_description, self.STRING_TYPE)
-
+
elif obj._type=='GFDataSource':
-
+
if hasattr(obj,'table'):
-
+
#
# check for master/detail relation ship
#
-
+
if hasattr(obj,'master') and hasattr(obj,'masterlink') and \
hasattr(obj,'detaillink'):
-
+
table=self.tablelist[string.lower(obj.name)]
-
+
# create a foreign key on this table
newconstraint=GSConstraint(table.findChildOfType('GSConstraints'))
newconstraint.name="fk_%s_%s" % (obj.table,obj.detaillink)
newconstraint.type="foreignkey"
-
+
nfk_field=GSConstraintField(newconstraint)
nfk_field.name=obj.detaillink
nfk_ref=GSConstraintRef(newconstraint)
@@ -254,36 +254,36 @@
self.AddField(table, obj.detaillink, self.DEFAULT_TYPE)
if self.tablelist[string.lower(obj.master)]:
-
+
mtable=self.tablelist[string.lower(obj.master)]
# set table name for foreign key
nfk_ref.table=mtable.name
-
+
oldpkey=mtable.findChildOfType("GSPKField")
if oldpkey==None:
pkey=GSPrimaryKey(mtable)
pkey.name="pk_%s_%s" % (mtable.name,obj.masterlink)
pkeyf=GSPKField(pkey)
pkeyf.name=obj.masterlink
-
+
# add field to master table, using default type
self.AddField(mtable, obj.masterlink, self.DEFAULT_TYPE)
-
+
elif oldpkey.name!=obj.masterlink:
print "WARNING: different primary keys computed out of "+\
"master detail relationship ('%s'!='%s')." % \
(oldpkey.name!=obj.masterlink)
else:
print "WARNING: master datasource is not defined in this file."
-
-
+
+
else:
pass
-
+
def AddField(self,table,fieldname,type,length=None):
-
+
fields = table.findChildOfType('GSFields')
-
+
# check if field already exists
for child in fields._children:
if child._type == 'GSField' and child.name==fieldname:
@@ -291,11 +291,11 @@
# (possibly updating fieldtype here)
if type!=self.DEFAULT_TYPE:
child.type=type
-
+
if length!=None:
child.size=int(length)
return
-
+
# create field
newfield = GSField(fields)
newfield.name=fieldname
@@ -304,9 +304,9 @@
newfield.size=int(length)
elif type==self.STRING_TYPE:
newfield.size=self.DEFAULT_SIZE
-
-
+
+
############
#
# Basic information about this template
@@ -317,8 +317,8 @@
'Product': 'forms',
'BaseID' : 'CreateSchema',
'BaseClass' : CreateSchemaWizard,
- 'Name' : 'Create Schema Definition',
- 'Description' : 'create a gnue schema definition file',
+ 'Name' : _('Create Schema Definition'),
+ 'Description' : _('Create a gnue schema definition file'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': WIZARD,
Modified: trunk/gnue-designer/src/forms/wizards/CreateWebForm.py
===================================================================
--- trunk/gnue-designer/src/forms/wizards/CreateWebForm.py 2004-10-30
12:36:18 UTC (rev 6584)
+++ trunk/gnue-designer/src/forms/wizards/CreateWebForm.py 2004-10-30
20:51:28 UTC (rev 6585)
@@ -33,14 +33,14 @@
# - add step to choose 'included image orgin' (subdir: "img/",
# topdir: "/img/", "other host...
# - option to deactivate/activate Statusbar, Buttonbar, a Menu
-# - option to switch between different layout styles
-#
+# - option to switch between different layout styles
+#
# b) Code Creation
# - use em/en sizes for absolute positioning (drawback:depend on font
size)
# - menu bar creation
# - add GFBox, GFImage types
# - add more GFEntry styles (f.e. dropdown)
-# - add tooltips to Toolbar Icons
+# - add tooltips to Toolbar Icons
# - support multiple rows
# - create page switching tab (if enabled)
# - add code for a login/logged out window on top of the form (done)
@@ -109,7 +109,7 @@
content = [WizardText('This will build a dynamic web form writen in '+
'HTML and Javascript. For more information '+
- 'confer to "jsclient/INSTALL.TXT".\n\n '),
+ 'confer to "jsclient/INSTALL.TXT".\n\n '),
WizardInput('file',label='File Name:',required=1,size=20),
WizardText('\n\nChoose default cell size (in Pixel):'),
WizardInput('cellwidth',label='Cell Width :',
@@ -128,21 +128,21 @@
if self.variables['file'][-5:]!=".html":
self.variables['file']+=".html"
-
+
self.Xraster=int(self.variables['cellwidth'])
self.Yraster=int(self.variables['cellheight'])
self.baseline=int(self.Yraster*6/35)
self.fontsize=int(self.Yraster*18/35)
self.lineheight=self.Yraster
self.fontsize_entry=int(self.Yraster*16/35)
-
+
self.variables['encoding']=gConfig('textEncoding')
choices=(('iso8859-1','Western'),
('utf-8','Unicode'),
('big5','Trad. Chinese' ),
('gb2312','Simpl. Chinese' ),
('jis','Japanese' ))
-
+
content = [WizardText('The web form will be stored in the file '+
('%s.\n\n' % self.variables['file'])),
WizardText('Form Size: %sx%s => ' % \
@@ -157,8 +157,8 @@
'content': content,
'prev': '0',
'next': None }
-
+
###############
#
# Verify contents of current step
@@ -197,13 +197,13 @@
' charset=%s">\n </HEAD>\n' % charset)
dest.write('<BODY onLoad="setup();form.run();" onUnload="form.close();">')
-
+
if hasattr(self,'showtitle'):
dest.write('<H1>%s</H1>' % title)
- # write javascript include
+ # write javascript include
dest.write('<SCRIPT src="vcXMLRPC.js"></SCRIPT>\n' +\
- '<SCRIPT src="gnue-forms.js"></SCRIPT>\n')
+ '<SCRIPT src="gnue-forms.js"></SCRIPT>\n')
# write datasource data, trigger information etc.
dest.write(self.buildCode(self.form))
@@ -218,7 +218,7 @@
if hasattr(layout,"tabbed") and len(layout.tabbed)>0:
# Create Page tabs
pos=0
- for child in layout._children:
+ for child in layout._children:
if child._type=="GFPage":
dest.write(self.addPageTab(child.name,pos))
pos+=200
@@ -227,9 +227,9 @@
dest.write(self.addBackground())
-
-
- for child in layout._children:
+
+
+ for child in layout._children:
if child._type=="GFPage":
## dest.write("<h2>%s</H2>" % child.name)
dest.write('<DIV id="%s_page">' % child.name)
@@ -240,7 +240,7 @@
if self.statusBar:
dest.write(self.addStatusBar())
-
+
dest.write(self.addLoginDialog())
dest.write("<BODY></HTML>")
dest.close()
@@ -268,7 +268,7 @@
outp+="dts._setParent(form);\n"
outp+="dts.name='%s';\n" % obj.name
outp+="dts.table='%s';\n" % obj.table
-
+
if hasattr(obj,"order_by"):
outp+="dts.order_by='%s';\n" % obj.order_by
@@ -286,10 +286,10 @@
if hasattr(obj,"cache"):
outp+="dts.cache=%s;\n" % obj.cache
-
+
outp+="dts.connection='%s';\n\n" % obj.connection
-
+
if obj._type=="GFLogic":
pass
@@ -300,10 +300,10 @@
outp+="blk.datasource='%s';\n\n" % obj.datasource
if obj._type=='GFField':
- outp+="field = new GFField(blk);\n"
- outp+="field._setParent(blk);\n"
+ outp+="field = new GFField(blk);\n"
+ outp+="field._setParent(blk);\n"
outp+="field.name='%s';\n" % obj.name
- if hasattr(obj,"field"):
+ if hasattr(obj,"field"):
outp+="field.field='%s';\n" % obj.field
else:
outp+="field.field='%s';\n" % obj.name
@@ -339,7 +339,7 @@
# TODO: add simple trigger script
if obj._type=='GFEntry':
- outp+="entry = new GFEntry(page);\n"
+ outp+="entry = new GFEntry(page);\n"
outp+="entry._setParent(page);\n"
outp+="entry.name='%s';\n" % obj.name
outp+="entry.block='%s';\n" % obj.block
@@ -363,16 +363,16 @@
## Foreign key (f. dropdown) support
if hasattr(obj,'fk_source'):
outp+="entry.fk_source='%s';\n" % obj.fk_source
-
+
if hasattr(obj,'fk_key'):
outp+="entry.fk_key='%s';\n" % obj.fk_key
-
+
if hasattr(obj,'fk_description'):
outp+="entry.fk_descripion=%s';\n" % obj.fk_description
outp+='\n'
-
+
if obj._type=='GFOption':
pass
@@ -381,7 +381,7 @@
if obj._type=="GFForm":
outp+='}\n</script>\n'
-
+
return outp
def addBackground(self):
@@ -393,9 +393,9 @@
'border-width: 1px;'+\
'border-style: solid;background-color:#EEEEEE;" align="center">\n'
outp+=' '
- outp+='</DIV>'
+ outp+='</DIV>'
return outp
-
+
def addPageTab(self,name,pos):
# outp = '<center><br><img src="img/gnue.png"><br>�</center>'
outp='<DIV STYLE="position:absolute; '+\
@@ -407,7 +407,7 @@
'border-style: solid;background-color:#EEEEEE;"\n' +\
'align="center" onclick="getForm().gotoPage(' +\
"'%s');" % name + '">\n'
- outp+='%s' % name
+ outp+='%s' % name
outp+='</DIV>'
return outp
@@ -415,7 +415,7 @@
b='<img src="images/'+img+'-24x24.png" name="'+name+'" alt="'+alt+\
'" onclick="'+ command+';">\n';
return b
-
+
def addButtonBar(self):
# outp = '<center><br><img src="img/gnue.png"><br>�</center>'
outp='<DIV STYLE="position:absolute; '+\
@@ -424,7 +424,7 @@
'width: %spx;' % 540 +\
'border-width: 1px;'+\
'border-style: solid;background-color:#EEEEEE;" align="center">\n'
-
+
self.yBase=self.yBase+50
outp+=self.showButton('commit',"commit","Commit","getForm().commit();",'n')
@@ -473,29 +473,29 @@
# compute max/min
if obj.Char__x+obj.Char__width>self.Xsize:
self.Xsize=int(obj.Char__x+obj.Char__width+1)
-
+
if obj.Char__y+obj.Char__height>self.Ysize:
self.Ysize=int(obj.Char__y+obj.Char__height+1)
for child in obj._children:
self.computePageSize(child)
-
-
+
+
# function build the html code for page
def drawElements(self,obj,visible):
outp=""
-
+
if ((obj._type=='GFEntry') or (obj._type=='GFLabel') or \
(obj._type=='GFButton') or (obj._type=='GFBox')) and not obj.hidden:
-
+
pos_code='STYLE="position:absolute; '+\
'top: %spx;' % int(obj.Char__y*self.Yraster+self.yBase) +\
'left: %spx;' % int(obj.Char__x*self.Xraster+self.xBase) +\
'width: %spx;' % int(obj.Char__width*self.Xraster) +\
'height: %spx;' %
int(obj.Char__height*self.Yraster-self.baseline)
- if visible==0:
+ if visible==0:
pos_code+='visibility:hidden;'
if obj._type=='GFLabel':
@@ -511,20 +511,20 @@
# TODO: add loop for row setting
if obj._type=='GFEntry':
- # TODO: add dropdown, height
+ # TODO: add dropdown, height
outp+='\n\n <!-- Entry %s -->\n' % obj.name
if obj.style=="password":
outp+=' <input type="password"'
elif obj.style=="dropdown":
- outp+=' <select'
+ outp+=' <select'
print "ATTENTION: creating dropdown widgets which are not supported
by the javascript client yet!"
elif obj.Char__height>1:
outp+=' <textarea'
else:
outp+=' <input type="text"'
-
+
outp+=' name="%s" id="%s_%s_field" ' % (obj.name,obj.block,obj.field)
-
+
outp+='onfocus="getForm().gotoBlock('+"'%s'" % obj.block +\
');"\n';
@@ -539,13 +539,13 @@
outp+='>%s</textarea>\n' % obj.default
else:
outp+='value="%s">\n' % obj.default
-
-
+
+
elif obj._type=='GFLabel':
outp+=' <!-- Label %s -->\n' % obj.name
outp+=' <DIV %s id="%s_label">%s</DIV>\n' %\
(pos_code,obj.name,obj.text)
-
+
elif obj._type=='GFButton':
outp+=' <!-- Button %s -->\n' % obj.name
outp+=' <button %s id="%s_button">%s</button>\n' % \
@@ -556,12 +556,12 @@
outp+=' <div %s id="%s_box">%s</div>\n' % \
(pos_code,obj.name,obj.label)
-
+
for child in obj._children:
outp+=self.drawElements(child,visible)
- return outp
+ return outp
def addLoginDialog(self):
outp='<DIV STYLE="position:absolute; '+\
@@ -577,10 +577,10 @@
outp+='Password: <INPUT type="password" id="password"><BR><BR>\n'
outp+='<BUTTON onClick="getForm().doLogin();">Login</BUTTON>\n</DIV>\n'
return outp;
-
-
+
+
############
#
# Basic information about this template
@@ -589,12 +589,12 @@
'Product': 'forms',
'BaseID' : 'CreateWebForm',
'BaseClass' : CreateWebFormWizard,
- 'Name' : 'Compile Form for GNUe JsForms',
- 'Description' : 'create a intermediate html+java for the jsForms client',
+ 'Name' : _('Compile Form for GNUe JsForms'),
+ 'Description' : _('Create an intermediate html+java for the jsForms
client'),
'Version' : VERSION,
'Author' : 'The GNUe Designer Team',
'Behavior': WIZARD,
- 'MenuLocation' : ('Tools|Extras',_('Compile Form for GNUe JsForms'))
+ 'MenuLocation' : (_('Tools|Extras'),_('Compile Form for GNUe JsForms'))
}
if __name__ == "__main__":
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6585 - in trunk/gnue-designer/src: base base/tools forms/wizards,
kilo <=