appy.gen: configured ckeditor for Appy; bugfix in jscalendar integration.
This commit is contained in:
parent
0e7dfa3aaf
commit
98fafad14a
81 changed files with 5329 additions and 271 deletions
|
@ -807,14 +807,6 @@ class ToolMixin(BaseMixin):
|
|||
if len(value) > numberOfChars: return value[:numberOfChars] + '...'
|
||||
return value
|
||||
|
||||
monthsIds = {
|
||||
1: 'month_jan', 2: 'month_feb', 3: 'month_mar', 4: 'month_apr',
|
||||
5: 'month_may', 6: 'month_jun', 7: 'month_jul', 8: 'month_aug',
|
||||
9: 'month_sep', 10: 'month_oct', 11: 'month_nov', 12: 'month_dec'}
|
||||
def getMonthName(self, monthNumber):
|
||||
'''Gets the translated month name of month numbered p_monthNumber.'''
|
||||
return self.translate(self.monthsIds[int(monthNumber)])
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Authentication-related methods
|
||||
# --------------------------------------------------------------------------
|
||||
|
|
|
@ -1410,9 +1410,16 @@ class BaseMixin:
|
|||
|
||||
def getEditorInit(self, name):
|
||||
'''Gets the Javascrit init code for displaying a rich editor for
|
||||
field p_name.'''
|
||||
field named p_name.'''
|
||||
return "CKEDITOR.replace('%s', {toolbar: 'Appy'})" % name
|
||||
|
||||
def getCalendarInit(self, name, years):
|
||||
'''Gets the Javascript init code for displaying a calendar popup for
|
||||
field named p_name.'''
|
||||
return 'Calendar.setup({inputField: "%s", button: "%s_img", ' \
|
||||
'onSelect: onSelectDate, range:[%d,%d]});' % \
|
||||
(name, name, years[0], years[-1])
|
||||
|
||||
def isTemporary(self):
|
||||
'''Is this object temporary ?'''
|
||||
parent = self.getParentNode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue