[gen] Removed appywide.css: css class which is specific to the wide layout are now in appy.css but are used conditionally in PXs.

This commit is contained in:
Gaetan Delannay 2014-05-13 16:41:59 +02:00
parent 5c6a7f0f97
commit 61598b91f7
5 changed files with 20 additions and 21 deletions

View file

@ -43,6 +43,7 @@ class Migrator:
appyVersion = self.tool.appyVersion appyVersion = self.tool.appyVersion
if force or not appyVersion or (appyVersion < '0.9.0'): if force or not appyVersion or (appyVersion < '0.9.0'):
# Migration is required. # Migration is required.
self.logger.info('Appy version (DB) is %s' % appyVersion)
startTime = time.time() startTime = time.time()
self.migrateTo_0_9_0() self.migrateTo_0_9_0()
stopTime = time.time() stopTime = time.time()

View file

@ -59,9 +59,12 @@ class ToolMixin(BaseMixin):
'''Return the home page when a user hits the app.''' '''Return the home page when a user hits the app.'''
# If the app defines a method "getHomePage", call it. # If the app defines a method "getHomePage", call it.
tool = self.appy() tool = self.appy()
url = None
try: try:
url = tool.getHomePage() url = tool.getHomePage()
except AttributeError: except AttributeError:
pass
if not url:
# Bring Managers to the config, lead others to pxHome. # Bring Managers to the config, lead others to pxHome.
user = self.getUser() user = self.getUser()
if user.has_role('Manager'): if user.has_role('Manager'):
@ -179,10 +182,6 @@ class ToolMixin(BaseMixin):
# CSS changes for left-to-right languages # CSS changes for left-to-right languages
names.remove('appyrtl.css') names.remove('appyrtl.css')
if dir == 'rtl': names.insert(0, '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') names.remove('appy.css'); names.insert(0, 'appy.css')
return names return names

View file

@ -45,14 +45,8 @@ ul li { margin: 0; background-image: url("ui/li.gif"); padding-left: 10px;
background-repeat: no-repeat; background-position: 0 4px } background-repeat: no-repeat; background-position: 0 4px }
img { border: 0; vertical-align: middle } img { border: 0; vertical-align: middle }
/* Styles that apply when viewing content of XHTML fields, that mimic styles
that ckeditor uses for displaying XHTML content in the edit view. */
.xhtml { background-color: white; padding: 6px; font-size: 95% }
.xhtml img { margin-right: 5px }
.xhtml p { margin: 3px 0 7px 0 }
.clickable { cursor: pointer }
.refLink { font-style: italic; padding-left: 5px; font-size: 90%; color: grey }
.main { width: 900px; height: 95%; box-shadow: 3px 3px 3px #A9A9A9 } .main { width: 900px; height: 95%; box-shadow: 3px 3px 3px #A9A9A9 }
.mainWide { width: 100%; height: 100% }
.top { height: 89px; margin-left: 3em; vertical-align: top; .top { height: 89px; margin-left: 3em; vertical-align: top;
background-color: white } background-color: white }
.lang { margin-right: 6px } .lang { margin-right: 6px }
@ -70,6 +64,11 @@ input.button { color: #666666; height: 20px; width: 130px;
input.buttonSmall { width: 100px !important; font-size: 85%; height: 18px; input.buttonSmall { width: 100px !important; font-size: 85%; height: 18px;
margin-bottom: 3px} margin-bottom: 3px}
.fake { background-color: #e6e6e6 !important ; cursor:help !important } .fake { background-color: #e6e6e6 !important ; cursor:help !important }
.xhtml { background-color: white; padding: 6px; font-size: 95% }
.xhtml img { margin-right: 5px }
.xhtml p { margin: 3px 0 7px 0 }
.clickable { cursor: pointer }
.refLink { font-style: italic; padding-left: 5px; font-size: 90%; color: grey }
.buttons { margin-left: 4px } .buttons { margin-left: 4px }
.message { position: absolute; top: -40px; left: 50%; font-size: 90%; .message { position: absolute; top: -40px; left: 50%; font-size: 90%;
width: 600px; border: 1px #F0C36D solid; padding: 6px; width: 600px; border: 1px #F0C36D solid; padding: 6px;

View file

@ -1,2 +0,0 @@
body { margin: 0 }
.main { width: 100%; height: 100% }

View file

@ -86,7 +86,7 @@ class AbstractWrapper(object):
layoutType=ztool.getLayoutType(); layoutType=ztool.getLayoutType();
showPortlet=ztool.showPortlet(obj, layoutType); showPortlet=ztool.showPortlet(obj, layoutType);
dir=ztool.getLanguageDirection(lang); dir=ztool.getLanguageDirection(lang);
discreetLogin=ztool.getProductConfig(True).discreetLogin; cfg=ztool.getProductConfig(True);
dleft=(dir == 'ltr') and 'left' or 'right'; dleft=(dir == 'ltr') and 'left' or 'right';
dright=(dir == 'ltr') and 'right' or 'left'; dright=(dir == 'ltr') and 'right' or 'left';
x=resp.setHeader('Content-type', ztool.xhtmlEncoding); x=resp.setHeader('Content-type', ztool.xhtmlEncoding);
@ -103,7 +103,7 @@ class AbstractWrapper(object):
src=":url(name)"></script> src=":url(name)"></script>
</x> </x>
</head> </head>
<body> <body style=":(cfg.skin == 'wide') and 'margin:0' or ''">
<!-- Google Analytics stuff, if enabled --> <!-- Google Analytics stuff, if enabled -->
<script var="gaCode=ztool.getGoogleAnalyticsCode()" if="gaCode" <script var="gaCode=ztool.getGoogleAnalyticsCode()" if="gaCode"
type="text/javascript">:gaCode</script> type="text/javascript">:gaCode</script>
@ -170,7 +170,8 @@ class AbstractWrapper(object):
</div> </div>
</div> </div>
<table class="main" align="center" cellpadding="0"> <table class=":(cfg.skin == 'wide') and 'mainWide main' or 'main'"
align="center" cellpadding="0">
<tr class="top"> <tr class="top">
<!-- Top banner --> <!-- Top banner -->
<td var="bannerName=(dir == 'ltr') and 'banner' or 'bannerrtl'" <td var="bannerName=(dir == 'ltr') and 'banner' or 'bannerrtl'"
@ -190,7 +191,7 @@ class AbstractWrapper(object):
href=":page.url">:page.title</a> href=":page.url">:page.title</a>
<!-- Connect link if discreet login --> <!-- Connect link if discreet login -->
<a if="isAnon and discreetLogin" id="loginLink" name="loginLink" <a if="isAnon and cfg.discreetLogin" id="loginLink" name="loginLink"
onclick="showLoginForm()" onclick="showLoginForm()"
class="pageLink clickable">:_('app_connect')</a> class="pageLink clickable">:_('app_connect')</a>
@ -212,7 +213,7 @@ class AbstractWrapper(object):
</tr> </tr>
<!-- The user strip --> <!-- The user strip -->
<tr height=":discreetLogin and '5px' or '28px'"> <tr height=":cfg.discreetLogin and '5px' or '28px'">
<td> <td>
<table class="userStrip"> <table class="userStrip">
<tr> <tr>
@ -226,10 +227,11 @@ class AbstractWrapper(object):
value=""/> value=""/>
<input type="hidden" name="login_name" id="login_name" value=""/> <input type="hidden" name="login_name" id="login_name" value=""/>
<input type="hidden" name="pwd_empty" id="pwd_empty" value="0"/> <input type="hidden" name="pwd_empty" id="pwd_empty" value="0"/>
<!-- Login fields, directly shown or not (depends on <!-- Login fields directly shown or not depending on
discreetLogin) --> discreetLogin. -->
<span id="loginFields" name="loginFields" <span id="loginFields" name="loginFields"
style=":discreetLogin and 'display:none' or 'display:block'"> style=":cfg.discreetLogin and 'display:none' or \
'display:block'">
<span class="userStripText">:_('app_login')</span> <span class="userStripText">:_('app_login')</span>
<input type="text" name="__ac_name" id="__ac_name" value="" <input type="text" name="__ac_name" id="__ac_name" value=""
style="width: 142px"/>&nbsp; style="width: 142px"/>&nbsp;