[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
if force or not appyVersion or (appyVersion < '0.9.0'):
# Migration is required.
self.logger.info('Appy version (DB) is %s' % appyVersion)
startTime = time.time()
self.migrateTo_0_9_0()
stopTime = time.time()

View file

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

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 }
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 }
.mainWide { width: 100%; height: 100% }
.top { height: 89px; margin-left: 3em; vertical-align: top;
background-color: white }
.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;
margin-bottom: 3px}
.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 }
.message { position: absolute; top: -40px; left: 50%; font-size: 90%;
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();
showPortlet=ztool.showPortlet(obj, layoutType);
dir=ztool.getLanguageDirection(lang);
discreetLogin=ztool.getProductConfig(True).discreetLogin;
cfg=ztool.getProductConfig(True);
dleft=(dir == 'ltr') and 'left' or 'right';
dright=(dir == 'ltr') and 'right' or 'left';
x=resp.setHeader('Content-type', ztool.xhtmlEncoding);
@ -103,7 +103,7 @@ class AbstractWrapper(object):
src=":url(name)"></script>
</x>
</head>
<body>
<body style=":(cfg.skin == 'wide') and 'margin:0' or ''">
<!-- Google Analytics stuff, if enabled -->
<script var="gaCode=ztool.getGoogleAnalyticsCode()" if="gaCode"
type="text/javascript">:gaCode</script>
@ -170,7 +170,8 @@ class AbstractWrapper(object):
</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">
<!-- Top banner -->
<td var="bannerName=(dir == 'ltr') and 'banner' or 'bannerrtl'"
@ -190,7 +191,7 @@ class AbstractWrapper(object):
href=":page.url">:page.title</a>
<!-- 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()"
class="pageLink clickable">:_('app_connect')</a>
@ -212,7 +213,7 @@ class AbstractWrapper(object):
</tr>
<!-- The user strip -->
<tr height=":discreetLogin and '5px' or '28px'">
<tr height=":cfg.discreetLogin and '5px' or '28px'">
<td>
<table class="userStrip">
<tr>
@ -226,10 +227,11 @@ class AbstractWrapper(object):
value=""/>
<input type="hidden" name="login_name" id="login_name" value=""/>
<input type="hidden" name="pwd_empty" id="pwd_empty" value="0"/>
<!-- Login fields, directly shown or not (depends on
discreetLogin) -->
<!-- Login fields directly shown or not depending on
discreetLogin. -->
<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>
<input type="text" name="__ac_name" id="__ac_name" value=""
style="width: 142px"/>&nbsp;