Appy web interface has now 2 skins: the default one, with a fixed with; the one named 'wide', that takes the whole screen width. Choosing the skin is made via de Conf instance, attribute 'skin'.

This commit is contained in:
Gaetan Delannay 2014-01-20 16:30:14 +01:00
parent e1d0597694
commit 3b9c078fbb
8 changed files with 40 additions and 25 deletions

View file

@ -179,12 +179,21 @@ class ToolMixin(BaseMixin):
if align == 'right': return 'left'
return align
def getGlobalCssJs(self):
def getGlobalCssJs(self, dir):
'''Returns the list of CSS and JS files to include in the main template.
The method ensures that appy.css and appy.js come first.'''
The method ensures that appy.css and appy.js come first. If p_dir
(=language *dir*rection) is "rtl" (=right-to-left), the stylesheet
for rtl languages is also included.'''
names = self.getPhysicalRoot().ui.objectIds('File')
# The single Appy Javascript file
names.remove('appy.js'); names.insert(0, 'appy.js')
names.remove('appyrtl.css'); names.insert(0, 'appyrtl.css')
# CSS changes for left-to-right languages
names.remove('appyrtl.css')
if dir == 'rtl': names.insert(0, 'appyrtl.css')
# CSS changes if the "wide" skin is in use
names.remove('appywide.css')
cfg = self.getProductConfig().appConfig
if cfg.skin == 'wide': names.insert(0, 'appywide.css')
names.remove('appy.css'); names.insert(0, 'appy.css')
return names