[MERGE]Merge lp:~openerp-dev/openobject-addons/trunk-website-al.

bzr revid: bth@tinyerp.com-20130801072446-30938h1850m6lekp
This commit is contained in:
bth-openerp
2013-08-01 12:54:46 +05:30
47 changed files with 7795 additions and 2121 deletions
+1 -2
View File
@@ -20,8 +20,7 @@ OpenERP Website CMS
'static/src/js/website.js',
],
'css': [
'static/lib/bootstrap/css/bootstrap.css',
'static/src/css/*.css',
'static/src/css/editor.css',
],
'qweb': ['static/src/xml/*.xml'],
}
+63 -4
View File
@@ -1,12 +1,21 @@
# -*- coding: utf-8 -*-
import base64
import json
import logging
import urllib
import cStringIO
from PIL import Image, ImageOps
import openerp
from openerp.addons.web import http
from openerp.addons.web.controllers.main import manifest_list
from openerp.addons.web.http import request
import werkzeug
import werkzeug.exceptions
import werkzeug.wrappers
logger = logging.getLogger(__name__)
def template_values():
script = "\n".join(['<script type="text/javascript" src="%s"></script>' % i for i in manifest_list('js', db=request.db)])
@@ -46,8 +55,14 @@ class Website(openerp.addons.web.controllers.main.Home):
values = template_values()
uid = values['uid']
imd = request.registry['ir.model.data']
view = request.registry['ir.ui.view']
view_model, view_id = imd.get_object_reference(request.cr, uid, 'website', 'default_page')
newview_id = request.registry['ir.ui.view'].copy(request.cr, uid, view_id)
newview_id = view.copy(request.cr, uid, view_id)
newview = view.browse(request.cr, uid, newview_id, context={})
newview.write({
'arch': newview.arch.replace("website.default_page", path),
'name': "page/%s" % path
})
if '.' in path:
module, idname = path.split('.')
else:
@@ -58,9 +73,9 @@ class Website(openerp.addons.web.controllers.main.Home):
'module': module,
'model': 'ir.ui.view',
'res_id': newview_id,
'noupdate': True
})
# TODO: replace by a redirect
return self.page(path)
return werkzeug.utils.redirect("/page/%s" % path)
@http.route('/page/<path:path>', type='http', auth="admin")
def page(self, path):
@@ -89,4 +104,48 @@ class Website(openerp.addons.web.controllers.main.Home):
html = request.registry.get("ir.ui.view").render(request.cr, uid, 'website.404', values, context)
return html
@http.route('/website/attach', type='http', auth='admin') # FIXME: auth
def attach(self, CKEditorFuncNum, CKEditor, langCode, upload):
req = request.httprequest
if req.method != 'POST':
return werkzeug.exceptions.MethodNotAllowed(valid_methods=['POST'])
url = message = None
try:
attachment_id = request.registry['ir.attachment'].create(request.cr, request.uid, {
'name': upload.filename,
'datas': base64.encodestring(upload.read()),
'datas_fname': upload.filename,
'res_model': 'ir.ui.view',
}, request.context)
# FIXME: auth=user... no good.
url = '/website/attachment/%d' % attachment_id
except Exception, e:
logger.exception("Failed to upload image to attachment")
message = str(e)
return """<script type='text/javascript'>
window.parent.CKEDITOR.tools.callFunction(%d, %s, %s);
</script>""" % (int(CKEditorFuncNum), json.dumps(url), json.dumps(message))
@http.route('/website/attachment/<int:id>', type='http', auth="admin")
def attachment(self, id):
# FIXME: can't use Binary.image because auth=user and website attachments need to be public
attachment = request.registry['ir.attachment'].browse(
request.cr, request.uid, id, request.context)
buf = cStringIO.StringIO(base64.decodestring(attachment.datas))
image = Image.open(buf)
image.thumbnail((1024, 768), Image.ANTIALIAS)
response = werkzeug.wrappers.Response(status=200, mimetype={
'PNG': 'image/png',
'JPEG': 'image/jpeg',
'GIF': 'image/gif',
}[image.format])
image.save(response.stream, image.format)
return response
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,2 +1,3 @@
sass:
sass -t expanded --unix-newlines website.sass > website.css
sass -t expanded --unix-newlines --watch website.sass:website.css&
sass -t expanded --unix-newlines --watch editor.sass:editor.css&
-730
View File
@@ -1,730 +0,0 @@
@charset "utf-8";
@font-face {
font-family: "mnmliconsRegular";
src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
src: url("/web/static/src/font/mnmliconsv21-webfont.woff") format("woff");
src: url("/web/static/src/font/mnmliconsv21-webfont.ttf") format("truetype");
src: url("/web/static/src/font/mnmliconsv21-webfont.svg") format("svg") active;
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "EntypoRegular";
src: url("/web/static/src/font/entypo-webfont.eot") format("eot");
src: url("/web/static/src/font/entypo-webfont.eot?#iefix") format("embedded-opentype");
src: url("/web/static/src/font/entypo-webfont.woff") format("woff");
src: url("/web/static/src/font/entypo-webfont.ttf") format("truetype");
src: url("/web/static/src/font/entypo-webfont.svg") format("svg") active;
font-weight: normal;
font-style: normal;
}
/* --------------------------------- *
* STYLING CONTEXT *
* --------------------------------- */
/* --- Styling for the V8/Lato/White/Purple design --- */
body.oe_styling_v8 {
background: #e9e9e9;
padding: 0;
margin: 0;
}
.oe_styling_v8 {
font-family: "Open Sans", "Helvetica", Sans;
font-weight: 300;
color: #646464;
background: white;
font-size: 16px;
}
.oe_styling_v8 .oe_website_contents {
background: whitesmoke;
padding-bottom: 1px;
}
.oe_styling_v8 b {
font-weight: 600;
}
.oe_styling_v8 a {
color: #6d57e0;
text-decoration: none;
}
.oe_styling_v8 a:visited {
color: #5b284f;
}
.oe_styling_v8 a:hover {
color: #0096eb;
}
.oe_styling_v8 .oe_title_font {
font-family: "Lato", "Open Sans", "Helvetica", Sans;
}
.oe_styling_v8 .oe_page {
background: white;
overflow: hidden;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
-ms-border-radius: 1px;
-o-border-radius: 1px;
border-radius: 1px;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.oe_styling_v8 .oe_emph {
font-weight: 400;
}
.oe_styling_v8 .oe_dark {
overflow: hidden;
background: #fcfcfc;
-webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset;
-moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset;
box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset;
}
/* --------------------------------- *
* LAYOUT *
* --------------------------------- */
/* ------ BASE GRID CONSTRUCTS ----- */
.oe_page {
margin: 0px auto 64px auto;
max-width: 992px;
}
.oe_row {
width: 928px;
margin-top: 16px;
margin-bottom: 16px;
margin-left: auto;
margin-right: auto;
}
.oe_row.oe_fit {
width: auto;
}
.oe_clearfix:after, .oe_row:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
[class*='oe_span'] {
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0 16px;
}
.oe_span12 {
width: 928px;
}
.oe_span10 {
width: 773px;
}
.oe_span9 {
width: 696px;
}
.oe_span8 {
width: 618px;
}
.oe_span6 {
width: 464px;
}
.oe_span4 {
width: 309px;
}
.oe_span3 {
width: 232px;
}
.oe_span2 {
width: 154px;
}
[class*='oe_span'].oe_fit {
padding-left: 0px !important;
padding-right: 0px !important;
}
[class*='oe_span'].oe_right {
float: right;
}
.oe_row.oe_flex [class*='oe_span'] {
display: inline-block;
float: none;
vertical-align: top;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0 16px;
width: auto;
}
.oe_row.oe_flex .oe_span12 {
max-width: 928px;
}
.oe_row.oe_flex .oe_span10 {
max-width: 769px;
}
.oe_row.oe_flex .oe_span9 {
max-width: 692px;
}
.oe_row.oe_flex .oe_span8 {
max-width: 614px;
}
.oe_row.oe_flex .oe_span6 {
max-width: 460px;
}
.oe_row.oe_flex .oe_span4 {
max-width: 305px;
}
.oe_row.oe_flex .oe_span3 {
max-width: 228px;
}
.oe_row.oe_flex .oe_span2 {
max-width: 150px;
}
.oe_mb0 {
margin-bottom: 0px !important;
}
.oe_mb4 {
margin-bottom: 4px !important;
}
.oe_mb8 {
margin-bottom: 8px !important;
}
.oe_mb16 {
margin-bottom: 16px !important;
}
.oe_mb32 {
margin-bottom: 32px !important;
}
.oe_mb48 {
margin-bottom: 48px !important;
}
.oe_mb64 {
margin-bottom: 64px !important;
}
.oe_mt0 {
margin-top: 0px !important;
}
.oe_mt4 {
margin-top: 4px !important;
}
.oe_mt8 {
margin-top: 8px !important;
}
.oe_mt16 {
margin-top: 16px !important;
}
.oe_mt32 {
margin-top: 32px !important;
}
.oe_mt48 {
margin-top: 48px !important;
}
.oe_mt64 {
margin-top: 64px !important;
}
/* ------ GENERIC LAYOUT MODIFIERS ----- */
.oe_rightfit {
padding-right: 0px !important;
}
.oe_leftfit {
padding-left: 0px !important;
}
.oe_leftalign {
text-align: left;
}
.oe_rightalign {
text-align: right;
}
.oe_centeralign {
text-align: center;
}
.oe_centered {
margin-left: auto;
margin-right: auto;
}
.oe_hidden {
display: none !important;
opacity: 0 !important;
}
.oe_invisible {
visibility: hidden !important;
}
.oe_transparent {
opacity: 0 !important;
}
.oe_mb0 {
margin-bottom: 0px !important;
}
.oe_mb4 {
margin-bottom: 4px !important;
}
.oe_mb8 {
margin-bottom: 8px !important;
}
.oe_mb16 {
margin-bottom: 16px !important;
}
.oe_mb32 {
margin-bottom: 32px !important;
}
.oe_mb64 {
margin-bottom: 64px !important;
}
.oe_spaced {
margin-top: 32px;
margin-bottom: 32px;
}
.oe_more_spaced {
margin-top: 64px;
margin-bottom: 64px;
}
.oe_padded {
padding-top: 16px;
padding-bottom: 16px;
}
.oe_more_padded {
padding-top: 32px;
padding-bottom: 32px;
}
/* --------------------------------- *
* WEBPAGE COMPONENTS *
* --------------------------------- */
/* ------ BUTTONS ----- */
.oe_styling_v8 .oe_button, .oe_styling_v8 a.oe_button {
position: relative;
bottom: 0;
display: inline-block;
cursor: pointer;
padding: 8px 14px;
background: #8b72b6;
color: white;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: 0px 2px 0px #afa8cc;
-moz-box-shadow: 0px 2px 0px #afa8cc;
box-shadow: 0px 2px 0px #afa8cc;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.44);
border: solid 1px rgba(0, 0, 0, 0.09);
-webkit-transition-property: bottom, background;
-moz-transition-property: bottom, background;
-o-transition-property: bottom, background;
transition-property: bottom, background;
-webkit-transition-duration: 250ms;
-moz-transition-duration: 250ms;
-o-transition-duration: 250ms;
transition-duration: 250ms;
}
.oe_styling_v8 .oe_button:hover, .oe_styling_v8 a.oe_button:hover {
background: #8b5bdd;
color: white;
}
.oe_styling_v8 .oe_button:active, .oe_styling_v8 a.oe_button:active {
background: #333333;
bottom: -3px;
}
.oe_styling_v8 .oe_button.oe_big, .oe_styling_v8 a.oe_button.oe_big {
font-size: 24px;
}
.oe_styling_v8 .oe_button.oe_bigger, .oe_styling_v8 a.oe_button.oe_bigger {
font-size: 32px;
}
.oe_styling_v8 .oe_button.oe_small, .oe_styling_v8 a.oe_button.oe_small {
font-size: 13px;
padding: 2px 4px;
}
.oe_styling_v8 .oe_button.oe_small:active, .oe_styling_v8 a.oe_button.oe_small:active {
bottom: -1px;
}
.oe_styling_v8 .oe_button.oe_medium, .oe_styling_v8 a.oe_button.oe_medium {
padding: 5px 12px;
font-size: 16px;
}
.oe_styling_v8 .oe_button.oe_tacky, .oe_styling_v8 a.oe_button.oe_tacky {
background: #ff4444;
-webkit-box-shadow: 0px 2px 0px #eba8a8;
-moz-box-shadow: 0px 2px 0px #eba8a8;
box-shadow: 0px 2px 0px #eba8a8;
}
.oe_styling_v8 .oe_button.oe_tacky:hover, .oe_styling_v8 a.oe_button.oe_tacky:hover {
background: #ff1010;
}
.oe_styling_v8 .oe_button.oe_tacky:active, .oe_styling_v8 a.oe_button.oe_tacky:active {
background: black;
}
.oe_styling_v8 .oe_button.oe_disabled, .oe_styling_v8 a.oe_button.oe_disabled {
background: #c8c8c8;
-webkit-box-shadow: 0px 2px 0px #b4b4b4;
-moz-box-shadow: 0px 2px 0px #b4b4b4;
box-shadow: 0px 2px 0px #b4b4b4;
cursor: default;
}
.oe_styling_v8 .oe_button.oe_disabled:hover, .oe_styling_v8 a.oe_button.oe_disabled:hover {
background: #c8c8c8;
-webkit-box-shadow: 0px 2px 0px #b4b4b4;
-moz-box-shadow: 0px 2px 0px #b4b4b4;
box-shadow: 0px 2px 0px #b4b4b4;
}
.oe_styling_v8 .oe_button.oe_disabled:active, .oe_styling_v8 a.oe_button.oe_disabled:active {
background: #c8c8c8;
bottom: 0px;
-webkit-box-shadow: 0px 2px 0px #b4b4b4;
-moz-box-shadow: 0px 2px 0px #b4b4b4;
box-shadow: 0px 2px 0px #b4b4b4;
}
.oe_styling_v8.oe_styling_black .oe_button {
-webkit-box-shadow: 0px 2px 0px #463555;
-moz-box-shadow: 0px 2px 0px #463555;
box-shadow: 0px 2px 0px #463555;
}
/* ------ FORMS ----- */
.oe_styling_v8 {
/* FIXME: this is a quick hack for the release */
}
.oe_styling_v8 .oe_input {
padding: 4px 7px;
border-radius: 3px;
border: solid 1px #d6d6d6;
box-shadow: 0px 2px #e6e6e6;
background: #fafafa;
font-weight: 300;
outline: none;
-webkit-transition: all 150ms linear;
-moz-transition: all 150ms linear;
-o-transition: all 150ms linear;
transition: all 150ms linear;
}
.oe_styling_v8 .oe_input:focus {
border: solid 1px #969696;
box-shadow: 0px 2px #d2d2d2;
}
.oe_styling_v8 .oe_input.oe_valid {
background: #f2ffec;
border-color: #b1ebb6;
box-shadow: 0px 2px #e1f8e1;
color: #0f610f;
}
.oe_styling_v8 .oe_input.oe_invalid {
background: #fff2f2;
border-color: #ebb1b1;
box-shadow: 0px 2px #f8e1e1;
color: #610f0f;
}
.oe_styling_v8 .oe_input.oe_big {
padding: 8px 14px;
}
.oe_styling_v8 .oe_input_label {
font-weight: 300;
font-size: 16px;
}
.oe_styling_v8 .oe_input_label.oe_big {
font-size: 20px;
}
.oe_styling_v8 .oe_textarea {
width: 300px;
height: 80px;
}
.oe_styling_v8 .oe_form_layout_table {
width: 100%;
}
.oe_styling_v8 .oe_form_layout_table td {
padding-bottom: 16px;
}
.oe_styling_v8 .oe_form_layout_table td:first-child {
text-align: right;
padding-right: 16px;
}
/* ------ SLOGANS ----- */
.oe_styling_v8 .oe_slogan {
color: #333333;
font-family: "Lato", "Open Sans", "Helvetica", Sans;
text-align: center;
margin-top: 32px;
margin-bottom: 32px;
}
.oe_styling_v8 h1.oe_slogan {
font-size: 64px;
font-weight: 900;
margin-top: 48px;
margin-bottom: 48px;
}
.oe_styling_v8 h2.oe_slogan {
font-size: 40px;
font-weight: 300;
}
.oe_styling_v8 h3.oe_slogan {
font-size: 26px;
font-weight: 300;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
opacity: 0.5;
}
.oe_styling_v8 h4.oe_slogan {
font-size: 24px;
font-weight: 300;
}
.oe_styling_v8 h4.oe_slogan:before, .oe_styling_v8 h4.oe_slogan:after {
margin: 0 20px;
content: "";
display: inline-block;
width: 100px;
height: 0px;
border-top: solid 1px;
vertical-align: middle;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
opacity: 0.3;
}
.oe_styling_v8 h5.oe_slogan {
font-weight: 300;
}
.oe_styling_v8 h2.oe_slogan + h3.oe_slogan {
margin-top: -28px;
}
/* ------ QUOTES ----- */
.oe_quote {
margin: 8px;
padding: 16px;
background: rgba(0, 0, 0, 0.02);
border: solid 1px rgba(0, 0, 0, 0.06);
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
}
.oe_quote .oe_q, .oe_quote q {
margin: 10px;
display: block;
font-style: italic;
text-align: center;
font-size: 20px;
color: #4e66e7;
}
.oe_quote .oe_q:before, .oe_quote .oe_q:after, .oe_quote q:before, .oe_quote q:after {
content: "&quot;";
font-weight: 900;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20);
opacity: 0.2;
}
.oe_quote cite {
display: block;
font-style: normal;
margin-top: 16px;
}
.oe_quote .oe_photo {
float: left;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
margin-right: 16px;
}
.oe_quote .oe_author {
font-size: 20px;
padding-top: 6px;
color: #8d7bac;
}
.oe_dark .oe_quote {
background: white;
border: 1px solid #f0f0ff;
}
/* ------ PICTURES ----- */
.oe_picture {
display: block;
max-width: 84%;
max-height: 400px;
margin: 16px 8%;
}
.oe_screenshot {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
}
/* ----- Link Image with Footer ----- */
/* FIXME: Terrible CSS, rewrite this */
.oe_demo {
position: relative;
border: 1px solid #dedede;
}
.oe_demo .oe_demo_play {
top: 50%;
left: 50%;
width: 80px;
height: 60px;
margin-top: -30px;
margin-left: -40px;
display: block;
position: absolute;
background: url("../img/layout/play-button.png") no-repeat left top transparent;
pointer-events: none;
}
.oe_demo img {
max-width: 100%;
width: 100%;
}
.oe_demo .oe_demo_footer {
position: absolute;
left: 0;
background-color: rgba(0, 0, 0, 0.4);
opacity: 0.85;
bottom: -1px;
width: 100%;
padding-top: 7px;
padding-bottom: 7px;
color: white;
font-size: 14px;
font-weight: bold;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
pointer-events: none;
}
.oe_demo:hover .oe_demo_play {
background: url("../img/layout/play-button-over.png") no-repeat left top transparent;
}
/* ----- SEPARATOR ----- */
.oe_styling_v8 .oe_container.oe_separator {
height: 64px;
margin-bottom: 16px;
/* @include background(linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.02))) */
-webkit-box-shadow: 0px -3px 10px -5px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow: 0px -3px 10px -5px rgba(0, 0, 0, 0.1) inset;
box-shadow: 0px -3px 10px -5px rgba(0, 0, 0, 0.1) inset;
overflow-y: hidden;
}
/* ----- TABS ----- */
.oe_row_tabs {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding-top: 21px;
}
.oe_row_tab {
position: relative;
min-width: 120px;
padding: 8px;
font-size: 20px;
display: inline-block;
margin: 0px -2px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border: solid 1px rgba(0, 0, 0, 0.1);
border-bottom: none;
background: #fafafa;
background-image: +linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.02));
box-shadow: 0px -3px 10px -5px rgba(0, 0, 0, 0.1) inset;
cursor: pointer;
-webkit-transition: all 250ms linear;
-moz-transition: all 250ms linear;
-o-transition: all 250ms linear;
transition: all 250ms linear;
}
.oe_row_tab:hover {
padding-bottom: 12px;
top: -4px;
background-color: white;
}
.oe_row_tab.oe_active {
background-color: white;
background-image: none;
box-shadow: none;
border-top-color: #8272b6;
border-top-width: 2px;
cursor: default;
}
.oe_row_tab.oe_active:hover {
padding-bottom: 8px;
top: 0asx;
}
/* ------ CALL TO ACTION ----- */
.oe_calltoaction {
height: 32px;
margin-top: -32px;
position: relative;
}
label, input, button, select, textarea {
line-height: 15px !important;
}
input[type='checkbox'] {
vertical-align: top !important;
margin-top: 2px !important;
}
.oe_form_status li {
height: 30px;
}
.oe_form_status .label {
background: none !important;
font-weight: normal !important;
line-height: 1.5em !important;
}
-706
View File
@@ -1,706 +0,0 @@
@charset "utf-8"
// Variables {{{
$facets-border: #afafb6
$section-title-color: #7C7BAD
$tag-bg-light: #f0f0fa
$tag-bg-dark: #7C7BAD
$tag-border: #afafb6
$tag-border-selected: #a6a6fe
$hover-background: #f0f0fa
$link-color: #7C7BAD
$sheet-max-width: 860px
$sheet-min-width: 650px
$sheet-padding: 16px
// }}}
// Mixins {{{
@font-face
font-family: 'mnmliconsRegular'
src: url('/web/static/src/font/mnmliconsv21-webfont.eot') format('eot')
src: url('/web/static/src/font/mnmliconsv21-webfont.woff') format('woff')
src: url('/web/static/src/font/mnmliconsv21-webfont.ttf') format('truetype')
src: url('/web/static/src/font/mnmliconsv21-webfont.svg') format('svg') active
font-weight: normal
font-style: normal
@font-face
font-family: 'EntypoRegular'
src: url('/web/static/src/font/entypo-webfont.eot') format('eot')
src: url('/web/static/src/font/entypo-webfont.eot?#iefix') format('embedded-opentype')
src: url('/web/static/src/font/entypo-webfont.woff') format('woff')
src: url('/web/static/src/font/entypo-webfont.ttf') format('truetype')
src: url('/web/static/src/font/entypo-webfont.svg') format('svg') active
font-weight: normal
font-style: normal
@mixin reset()
border: none
padding: 0
margin: 0
background: none
@include radius(0)
@include box-shadow(none)
@mixin vertical-gradient($startColor: #555, $endColor: #333)
background-color: mix($startColor, $endColor)
background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */
background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */
background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */
background-image: linear-gradient(to bottom, $startColor, $endColor)
@mixin radial-gradient($gradient)
background-position: center center
background-image: -webkit-radial-gradient(circle, $gradient)
background-image: -moz-radial-gradient($gradient)
background-image: -ms-radial-gradient($gradient)
background-image: radial-gradient($gradient)
@mixin radius($radius: 5px)
-moz-border-radius: $radius
-webkit-border-radius: $radius
border-radius: $radius
@mixin box-shadow($bsval: 0px 1px 4px #777)
-moz-box-shadow: $bsval
-webkit-box-shadow: $bsval
box-shadow: $bsval
@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s))
-webkit-transition: $transval
-moz-transition: $transval
-ms-transition: $transval
-o-transition: $transval
transition: $transval
@mixin opacity($opacity: .5)
filter: alpha(opacity=$opacity * 100)
opacity: $opacity
@mixin background-clip($clip: padding-box)
-webkit-background-clip: $clip
-moz-background-clip: $clip
background-clip: $clip
@mixin box-sizing($type: content)
// type = border || content || padding
-webkit-box-sizing: #{$type}-box
-moz-box-sizing: #{$type}-box
-ms-box-sizing: #{$type}-box
box-sizing: #{$type}-box
@mixin skew-gradient($startColor: #555, $endColor: #333)
background-color: $endColor
background: -moz-linear-gradient(135deg, $endColor, $startColor)
background: -o-linear-gradient(135deg, $startColor, $endColor)
background: -webkit-gradient(linear, left top, right bottom, from($startColor), to($endColor))
background: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
@mixin transform($transform)
-webkit-transform: $transform
-moz-transform: $transform
-ms-transform: $transform
-o-transform: $transform
transform: $transform
@mixin keyframes($name)
@-webkit-keyframes #{$name}
@content
@-moz-keyframes #{$name}
@content
@-ms-keyframes #{$name}
@content
@-o-keyframes #{$name}
@content
@keyframes #{$name}
@content
// Transforms the (readable) text of an inline element into an mmlicons icon,
// allows for actual readable text in-code (and in readers?) with iconic looks
@mixin text-to-icon($icon-name, $color: #404040)
font-size: 1px
letter-spacing: -1px
color: transparent
text-shadow: none
font-weight: normal
&:before
font: 21px "mnmliconsRegular"
content: $icon-name
color: $color
@mixin text-to-entypo-icon($icon-name, $color: #404040, $size: 21px)
font-size: 1px
letter-spacing: -1px
color: transparent
text-shadow: none
font-weight: normal
&:before
font: $size "entypoRegular"
content: $icon-name
color: $color
// }}}
// CMS and module descriptions {{{
// Warning MOST of those classes will be deprecated in favor of bootstrap
// before the relase of OpenERP v8. Dont use them.
@import "compass/css3"
/* --------------------------------- *
* STYLING CONTEXT *
* --------------------------------- */
/* --- Styling for the V8/Lato/White/Purple design --- */
$v8_footer_color: #e9e9e9
$v8_title_font_color: rgb(51,51,51)
$v8_text_font_color: rgb(100,100,100)
$v8_font_paragraph_color: rgb(51,51,51)
$v8_body_color: rgb(245,245,245)
$v8_bg_color: rgb(255,255,255)
$v8_text_font_family: 'Open Sans','Helvetica',Sans
$v8_title_font_family: 'Lato','Open Sans','Helvetica',Sans
$v8_anchor_color: #6D57E0
$v8_anchor_visited_color: rgb(91, 40, 79)
body.oe_styling_v8
background: $v8_footer_color
padding: 0
margin: 0
.oe_styling_v8
font-family: $v8_text_font_family
font-weight: 300
color: $v8_text_font_color
background: $v8_bg_color
font-size: 16px
.oe_website_contents
background: $v8_body_color
padding-bottom: 1px
b
font-weight: 600
a
color: $v8_anchor_color
text-decoration: none
a:visited
color: $v8_anchor_visited_color
a:hover
color: #0096EB
.oe_title_font
font-family: $v8_title_font_family
.oe_page
background: $v8_bg_color
overflow: hidden
+border-radius(1px)
+box-shadow(0 1px 3px rgba(0,0,0,0.35))
.oe_emph
font-weight: 400
.oe_dark
overflow: hidden
background: #FCFCFC
+box-shadow(0px 5px 9px -7px rgba(0,0,255,0.5) inset, 0px -3px 9px -7px rgba(0,0,255,0.5) inset)
/* --------------------------------- *
* LAYOUT *
* --------------------------------- */
/* ------ BASE GRID CONSTRUCTS ----- */
.oe_page
margin: 0px auto 64px auto
max-width: 992px
.oe_row
width: 928px
margin-top: 16px
margin-bottom: 16px
margin-left: auto
margin-right: auto
.oe_row.oe_fit
width: auto
.oe_clearfix:after, .oe_row:after
content: "."
display: block
clear: both
visibility: hidden
line-height: 0
height: 0
$oe_span12_width: 928px
$oe_span10_width: 773px
$oe_span9_width: 696px
$oe_span8_width: 618px
$oe_span6_width: 464px
$oe_span4_width: 309px
$oe_span3_width: 232px
$oe_span2_width: 154px
[class*='oe_span']
float: left
+box-sizing(border-box)
padding: 0 16px
.oe_span12
width: $oe_span12_width
.oe_span10
width: $oe_span10_width
.oe_span9
width: $oe_span9_width
.oe_span8
width: $oe_span8_width
.oe_span6
width: $oe_span6_width
.oe_span4
width: $oe_span4_width
.oe_span3
width: $oe_span3_width
.oe_span2
width: $oe_span2_width
[class*='oe_span'].oe_fit
padding-left: 0px !important
padding-right: 0px !important
[class*='oe_span'].oe_right
float: right
.oe_row.oe_flex
[class*='oe_span']
display: inline-block
float: none
vertical-align: top
+box-sizing(border-box)
padding: 0 16px
width: auto
.oe_span12
max-width: $oe_span12_width
.oe_span10
max-width: ($oe_span10_width +-4px)
.oe_span9
max-width: ($oe_span9_width +-4px)
.oe_span8
max-width: ($oe_span8_width +-4px)
.oe_span6
max-width: ($oe_span6_width +-4px)
.oe_span4
max-width: ($oe_span4_width +-4px)
.oe_span3
max-width: ($oe_span3_width +-4px)
.oe_span2
max-width: ($oe_span2_width +-4px)
.oe_mb0
margin-bottom: 0px !important
.oe_mb4
margin-bottom: 4px !important
.oe_mb8
margin-bottom: 8px !important
.oe_mb16
margin-bottom: 16px !important
.oe_mb32
margin-bottom: 32px !important
.oe_mb48
margin-bottom: 48px !important
.oe_mb64
margin-bottom: 64px !important
.oe_mt0
margin-top: 0px !important
.oe_mt4
margin-top: 4px !important
.oe_mt8
margin-top: 8px !important
.oe_mt16
margin-top: 16px !important
.oe_mt32
margin-top: 32px !important
.oe_mt48
margin-top: 48px !important
.oe_mt64
margin-top: 64px !important
/* ------ GENERIC LAYOUT MODIFIERS ----- */
.oe_rightfit
padding-right: 0px !important
.oe_leftfit
padding-left: 0px !important
.oe_leftalign
text-align: left
.oe_rightalign
text-align: right
.oe_centeralign
text-align: center
.oe_centered
margin-left: auto
margin-right: auto
.oe_hidden
display: none !important
opacity: 0 !important
.oe_invisible
visibility: hidden !important
.oe_transparent
opacity: 0 !important
.oe_mb0
margin-bottom: 0px !important
.oe_mb4
margin-bottom: 4px !important
.oe_mb8
margin-bottom: 8px !important
.oe_mb16
margin-bottom: 16px !important
.oe_mb32
margin-bottom: 32px !important
.oe_mb64
margin-bottom: 64px !important
.oe_spaced
margin-top: 32px
margin-bottom: 32px
.oe_more_spaced
margin-top: 64px
margin-bottom: 64px
.oe_padded
padding-top: 16px
padding-bottom: 16px
.oe_more_padded
padding-top: 32px
padding-bottom: 32px
/* --------------------------------- *
* WEBPAGE COMPONENTS *
* --------------------------------- */
/* ------ BUTTONS ----- */
.oe_styling_v8 .oe_button, .oe_styling_v8 a.oe_button
position: relative
bottom: 0
display: inline-block
cursor: pointer
padding: 8px 14px
background: rgb(139, 114, 182)
color: white
+border-radius(2px)
+box-shadow(0px 2px 0px rgb(175, 168, 204))
+text-shadow(0px 1px 1px rgba(0,0,0, 0.44))
border: solid 1px rgba(0,0,0,0.09)
+transition-property((bottom, background))
+transition-duration(250ms)
&:hover
background: rgb(139,91,221)
color: white
&:active
background: rgb(51,51,51)
bottom: -3px
&.oe_big
font-size: 24px
&.oe_bigger
font-size: 32px
&.oe_small
font-size: 13px
padding: 2px 4px
&:active
bottom: -1px
&.oe_medium
padding: 5px 12px
font-size: 16px
&.oe_tacky
background: rgb(255,68,68)
+box-shadow(0px 2px 0px #eba8a8)
&:hover
background: rgb(255,16,16)
&:active
background: black
&.oe_disabled
background: rgb(200,200,200)
+box-shadow(0px 2px 0px rgb(180,180,180))
cursor: default
&:hover
background: rgb(200,200,200)
+box-shadow(0px 2px 0px rgb(180,180,180))
&:active
background: rgb(200,200,200)
bottom: 0px
+box-shadow(0px 2px 0px rgb(180,180,180))
.oe_styling_v8.oe_styling_black .oe_button
+box-shadow(0px 2px 0px rgb(70,53,85))
/* ------ FORMS ----- */
.oe_styling_v8
.oe_input
padding: 4px 7px
border-radius: 3px
border: solid 1px rgb(214,214,214)
box-shadow: 0px 2px rgb(230,230,230)
background: rgb(250,250,250)
font-weight: 300
outline: none
@include transition( all 150ms linear )
&:focus
border: solid 1px rgb(150,150,150)
box-shadow: 0px 2px rgb(210,210,210)
&.oe_valid
background: #F2FFEC
border-color: rgb(177,235,182)
box-shadow: 0px 2px rgb(225,248,225)
color: rgb(15,97,15)
&.oe_invalid
background: rgb(255,242,242)
border-color: #EBB1B1
box-shadow: 0px 2px #F8E1E1
color: #610F0F
&.oe_big
padding: 8px 14px
.oe_input_label
font-weight: 300
font-size: 16px
&.oe_big
font-size: 20px
/* FIXME: this is a quick hack for the release */
.oe_textarea
width: 300px
height: 80px
.oe_form_layout_table
width: 100%
td
padding-bottom: 16px
&:first-child
text-align: right
padding-right: 16px
/* ------ SLOGANS ----- */
.oe_styling_v8
.oe_slogan
color: $v8_title_font_color
font-family: $v8_title_font_family
text-align: center
margin-top: 32px
margin-bottom: 32px
h1.oe_slogan
font-size: 64px
font-weight: 900
margin-top: 48px
margin-bottom: 48px
h2.oe_slogan
font-size: 40px
font-weight: 300
h3.oe_slogan
font-size: 26px
font-weight: 300
+opacity(0.5)
h4.oe_slogan
font-size: 24px
font-weight: 300
h4.oe_slogan:before, h4.oe_slogan:after
margin: 0 20px
content: ""
display: inline-block
width: 100px
height: 0px
border-top: solid 1px
vertical-align: middle
+opacity(0.3)
h5.oe_slogan
font-weight: 300
//TODO
h2.oe_slogan+h3.oe_slogan
margin-top: -28px
/* ------ QUOTES ----- */
.oe_quote
margin: 8px
padding: 16px
background: rgba(0,0,0,0.02)
border: solid 1px rgba(0,0,0,0.06)
+border-radius(2px)
.oe_q,q
margin: 10px
display: block
font-style: italic
text-align: center
font-size: 20px
color: rgb(78, 102, 231)
&:before, &:after
content: '&quot;'
font-weight: 900
+opacity(0.2)
cite
display: block
font-style: normal
margin-top: 16px
.oe_photo
float: left
+border-radius(3px)
margin-right: 16px
.oe_author
font-size: 20px
padding-top: 6px
color: rgb(141, 123, 172)
.oe_dark .oe_quote
background: white
border: 1px solid rgb(240,240,255)
/* ------ PICTURES ----- */
// display a picture in a span
.oe_picture
display: block
max-width: 84%
max-height: 400px
margin: 16px 8%
// style the picture like a screenshot
.oe_screenshot
+border-radius(3px)
+box-shadow(0px 3px 8px rgba(0,0,0,0.2))
/* ----- Link Image with Footer ----- */
/* FIXME: Terrible CSS, rewrite this */
.oe_demo
position: relative
border: 1px solid #dedede
.oe_demo_play
top: 50%
left: 50%
width: 80px
height: 60px
margin-top: -30px
margin-left: -40px
display: block
position: absolute
background: url("../img/layout/play-button.png") no-repeat left top transparent
pointer-events: none
img
max-width: 100%
width: 100%
.oe_demo_footer
position: absolute
left: 0
background-color: rgba(0,0,0,0.4)
opacity: 0.85
bottom: -1px
width: 100%
padding-top: 7px
padding-bottom: 7px
color: white
font-size: 14px
font-weight: bold
border-bottom-left-radius: 3px
border-bottom-right-radius: 3px
pointer-events: none
&:hover .oe_demo_play
background: url("../img/layout/play-button-over.png") no-repeat left top transparent
/* ----- SEPARATOR ----- */
.oe_styling_v8 .oe_container.oe_separator
height: 64px
margin-bottom: 16px
/* @include background(linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.02))) */
+box-shadow(0px -3px 10px -5px rgba(0,0,0,0.1) inset)
overflow-y: hidden
/* ----- TABS ----- */
.oe_row_tabs
text-align: center
margin-top: 0px
margin-bottom: 0px
padding-top: 21px
.oe_row_tab
position: relative
min-width: 120px
padding: 8px
font-size: 20px
display: inline-block
margin: 0px -2px
border-top-left-radius: 4px
border-top-right-radius: 4px
border: solid 1px rgba(0,0,0,0.1)
border-bottom: none
background: rgb(250,250,250)
background-image: +linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.02))
box-shadow: 0px -3px 10px -5px rgba(0,0,0,0.1) inset
cursor: pointer
@include transition(all 250ms linear)
.oe_row_tab:hover
padding-bottom: 12px
top: -4px
background-color: white
.oe_row_tab.oe_active
background-color: white
background-image: none
box-shadow: none
border-top-color: rgb(130, 114, 182)
border-top-width: 2px
cursor: default
.oe_row_tab.oe_active:hover
padding-bottom: 8px
top: 0asx
/* ------ CALL TO ACTION ----- */
.oe_calltoaction
height: 32px
margin-top: -32px
position: relative
// }}}
// BOOTSTRAP OVERIDDES
label, input, button, select, textarea
line-height: 15px !important
input[type='checkbox']
vertical-align: top !important
margin-top: 2px !important
.oe_form_status
li
height: 30px
.label
background: none !important
font-weight: normal !important
line-height: 1.5em !important
// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:
+47
View File
@@ -0,0 +1,47 @@
.oe_website_editorbar {
position: fixed;
top: 0;
right: 0;
z-index: 10;
display: block;
width: 100%;
padding: 2px;
margin: 0px;
z-index: 10000;
background-color: #414141;
background: -webkit-linear-gradient(#646060, #262626);
box-sizing: border-box;
}
.oe_website_editorbar li {
display: inline;
color: #eeeeee;
}
.oe_website_editorbar li:hover {
background: rgba(0, 0, 0, 0.2);
text-shadow: black 0px 0px 3px;
color: white;
}
.oe_website_editorbar .oe_rte_toolbar div.dropdown {
display: inline-block;
}
.oe_website_editorbar .oe_rte_toolbar div.dropdown li {
display: list-item;
}
.oe_website_editorbar .oe_rte_toolbar button {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
}
.oe_website_editorbar .oe_rte_toolbar button.oe_button_list {
padding-right: 3px;
}
.oe_website_editorbar .oe_rte_toolbar button.oe_button_list:after {
content: "\F0D7";
padding-left: 6px;
}
.oe_editable:focus {
outline: #80b5f2 solid 5px !important;
}
+42
View File
@@ -0,0 +1,42 @@
@charset "utf-8"
.oe_website_editorbar
position: fixed
top: 0
right: 0
z-index: 10
display: block
width: 100%
padding: 2px
margin: 0px
z-index: 10000
background-color: #414141
background: -webkit-linear-gradient(#646060, #262626)
box-sizing: border-box
li
display: inline
color: #eee
&:hover
background: rgba(0,0,0,0.2)
text-shadow: black 0px 0px 3px
color: white
.oe_website_editorbar .oe_rte_toolbar
div.dropdown
display: inline-block
li
display: list-item
button
font-family: FontAwesome
font-weight: normal
font-style: normal
text-decoration: inherit
&.oe_button_list
padding-right: 3px
&:after
content: "\F0D7"
padding-left: 6px
.oe_editable:focus
outline: #80B5F2 solid 5px !important
+32 -23
View File
@@ -37,20 +37,18 @@
top:0px; left:0px; right:0px; bottom:0px;
background: rgba(151, 137, 255, 0.2);
}
*/
.oe_snippet_editor{
position: fixed;
z-index: 1000;
bottom: 0px;
left: 0px;
right: 0px;
bottom: 0;
left: 0;
right: 0;
height: 214px;
background: rgb(160,160,160);
box-shadow: 0px 1px 3px rgb(100,100,100) inset;
overflow-y: hidden;
overflow-x: scroll;
box-shadow: 0 1px 3px rgb(100,100,100) inset;
}
*/
.oe_snippet_list{
width: auto;
@@ -64,14 +62,12 @@
height: 160px;
border-radius: 3px;
background: white;
margin: 20px;
margin-left: 0px;
margin: 20px 20px 20px 0;
cursor: pointer;
border: 2px solid transparent;
box-shadow: 0px 1px 3px rgb(100,100,100);
box-shadow: 0 1px 3px rgb(100,100,100);
position: relative;
top: 0px;
-webkit-transition: all 150ms linear;
top: 0;
overflow: hidden;
vertical-align: top;
user-select: none;
@@ -103,22 +99,22 @@
line-height: 1em;
zoom: 0.6;
}
.oe_snippet_editor .oe_snippet > .oe_container{
margin-top: 0px;
zoom: 0.23;
.oe_snippet_editor .oe_snippet > .container{
margin-top: 15px;
zoom: 0.17;
line-height: 0.999em;
line-height: 1em;
}
.oe_snippet_editor .oe_snippet > .oe_row{
.oe_snippet_editor .oe_snippet > .row{
margin-top: 0px;
zoom: 0.23;
line-height: 0.999em;
}
.oe_snippet_editor .oe_snippet > .oe_span6{
margin-top: 16px;
zoom: 0.47;
.oe_snippet_editor .oe_snippet > .span6{
margin-top: 18px;
zoom: 0.34;
}
.oe_snippet_editor .oe_snippet > .oe_span12{
.oe_snippet_editor .oe_snippet > .span12{
margin-top: 16px;
zoom: 0.23;
}
@@ -161,9 +157,22 @@
line-height: 160px;
padding: 0px;
}
.oe_snippet_drop {
position: relative;
border: 2px dashed rgb(174, 52, 255);
background: rgba(147, 52, 255, 0.1);
min-height: 28px;
margin: -16px auto;
border-radius: 5px;
max-width: 50%;
}
.oe_snippet_drop.oe_accepting {
border: 2px dashed rgb(52, 255, 166);
background: rgba(52, 255, 190, 0.1);
}
/*
[class*="span"]{
margin-left: 0px !important;
}
*/
+87 -129
View File
@@ -1,155 +1,113 @@
@charset "utf-8";
@font-face {
font-family: "mnmliconsRegular";
src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
src: url("/web/static/src/font/mnmliconsv21-webfont.woff") format("woff");
src: url("/web/static/src/font/mnmliconsv21-webfont.ttf") format("truetype");
src: url("/web/static/src/font/mnmliconsv21-webfont.svg") format("svg") active;
font-weight: normal;
font-style: normal;
.mt128 {
margin-top: 128px !important;
}
@font-face {
font-family: "EntypoRegular";
src: url("/web/static/src/font/entypo-webfont.eot") format("eot");
src: url("/web/static/src/font/entypo-webfont.eot?#iefix") format("embedded-opentype");
src: url("/web/static/src/font/entypo-webfont.woff") format("woff");
src: url("/web/static/src/font/entypo-webfont.ttf") format("truetype");
src: url("/web/static/src/font/entypo-webfont.svg") format("svg") active;
font-weight: normal;
font-style: normal;
.mt92 {
margin-top: 92px !important;
}
@media print {
.oe_website {
padding-top: 0 !important;
}
.oe_website .oe_website_editorbar, .oe_website .css_noprint, .oe_website .oe_snippet_editor, .oe_website .oe_website_footer {
display: none !important;
}
.oe_website .oe_website_header > .container > .row, .oe_website .oe_website_body > .container > .row {
margin-left: 0px !important;
}
}
.oe_website {
background: #e9e9e9;
color: #646464;
.mt64 {
margin-top: 64px !important;
}
.oe_website_header {
background: whitesmoke;
color: #333333;
padding-top: 8px;
.mt48 {
margin-top: 48px !important;
}
/* Body {{{ */
.oe_website_body {
background: white;
color: #333333;
padding-bottom: 32px;
.mt32 {
margin-top: 32px !important;
}
/* }}} */
/* Footer {{{ */
.oe_website_footer {
border-top: solid 1px #e0e0e0;
padding-bottom: 32px;
padding-top: 32px;
.mt16 {
margin-top: 16px !important;
}
.oe_website_footer h5 {
border-bottom: solid 1px rgba(0, 0, 0, 0.06);
margin-right: 24px;
padding-bottom: 6px;
margin-bottom: 6px;
margin-top: 24px;
.mt8 {
margin-top: 8px !important;
}
.oe_website_footer ul {
list-style: none;
padding: 0;
margin: 0;
.mt4 {
margin-top: 4px !important;
}
.oe_website_footer ul li {
display: block;
margin-bottom: 4px;
font-size: 14px;
margin-right: 32px;
.mt0 {
margin-top: 0px !important;
}
.oe_website_footer ul li a {
color: inherit;
text-decoration: inherit;
html, body {
height: 100%;
box-sizing: border-box;
position: relative;
}
.oe_website_footer ul li a:visited {
color: inherit;
text-decoration: inherit;
}
.oe_website_footer ul li a:hover {
color: black;
text-decoration: inherit;
}
.oe_website_copy {
margin-top: 24px;
margin-bottom: 6px;
}
/* }}} */
/* Editor {{{ */
.oe_website_editorbar {
position: fixed;
top: 0;
right: 0;
z-index: 10;
display: block;
width: 100%;
padding: 10px;
margin: 0px;
background-color: #414141;
background-color: #454343;
background-image: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626));
background-image: -webkit-linear-gradient(top, #646060, #262626);
background-image: -moz-linear-gradient(top, #646060, #262626);
background-image: -ms-linear-gradient(top, #646060, #262626);
background-image: -o-linear-gradient(top, #646060, #262626);
background-image: linear-gradient(to bottom, #646060, #262626);
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -300px;
padding: 0 0 364px;
box-sizing: border-box;
}
.oe_website_editorbar li {
display: inline;
color: #eeeeee;
footer {
box-sizing: border-box;
height: 300px;
background: #eff8f8;
padding-top: 64px;
padding-bottom: 64px;
}
.oe_website_editorbar li:hover {
background: rgba(0, 0, 0, 0.2);
text-shadow: black 0px 0px 3px;
.subheader {
letter-spacing: 3px;
font-weight: 300;
}
header.navbar-fixed-top {
position: static;
}
.dark {
background: #eff8f8;
padding: 64px;
}
h5 {
font-weight: bold;
}
.nav > .pull-right {
float: right !important;
}
.navbar .nav > li > p {
margin-bottom: 0px;
}
.navbar .nav > li a {
text-shadow: none;
}
.navbar .nav > li a {
float: none;
padding: 15px 15px 15px;
color: white;
text-decoration: none;
text-shadow: 0 1px 0 #2c3e50;
}
.nav > li a {
display: block;
}
#myCarousel .item {
min-height: 300px;
color: white;
}
.oe_website_editorbar .oe_rte_toolbar div.dropdown {
display: inline-block;
}
.oe_website_editorbar .oe_rte_toolbar div.dropdown li {
display: list-item;
}
.oe_website_editorbar .oe_rte_toolbar button {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
}
.oe_website_editorbar .oe_rte_toolbar button.oe_button_list {
padding-right: 3px;
}
.oe_website_editorbar .oe_rte_toolbar button.oe_button_list:after {
content: "\F0D7";
padding-left: 6px;
}
/* }}} */
.oe_editable:focus {
outline: #80b5f2 solid 5px !important;
}
.carousel > .css_carousel_options {
cursor: pointer;
position: absolute;
white-space: nowrap;
z-index: 1;
display: none;
}
+78 -232
View File
@@ -1,241 +1,87 @@
@charset "utf-8"
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:fdl=0
// Mixins {{{
@font-face
font-family: 'mnmliconsRegular'
src: url('/web/static/src/font/mnmliconsv21-webfont.eot') format('eot')
src: url('/web/static/src/font/mnmliconsv21-webfont.woff') format('woff')
src: url('/web/static/src/font/mnmliconsv21-webfont.ttf') format('truetype')
src: url('/web/static/src/font/mnmliconsv21-webfont.svg') format('svg') active
font-weight: normal
font-style: normal
@font-face
font-family: 'EntypoRegular'
src: url('/web/static/src/font/entypo-webfont.eot') format('eot')
src: url('/web/static/src/font/entypo-webfont.eot?#iefix') format('embedded-opentype')
src: url('/web/static/src/font/entypo-webfont.woff') format('woff')
src: url('/web/static/src/font/entypo-webfont.ttf') format('truetype')
src: url('/web/static/src/font/entypo-webfont.svg') format('svg') active
font-weight: normal
font-style: normal
@mixin reset()
border: none
padding: 0
margin: 0
background: none
@include radius(0)
@include box-shadow(none)
@mixin vertical-gradient($startColor: #555, $endColor: #333)
background-color: mix($startColor, $endColor)
background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */
background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */
background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */
background-image: linear-gradient(to bottom, $startColor, $endColor)
@mixin radial-gradient($gradient)
background-position: center center
background-image: -webkit-radial-gradient(circle, $gradient)
background-image: -moz-radial-gradient($gradient)
background-image: -ms-radial-gradient($gradient)
background-image: radial-gradient($gradient)
@mixin radius($radius: 5px)
-moz-border-radius: $radius
-webkit-border-radius: $radius
border-radius: $radius
@mixin box-shadow($bsval: 0px 1px 4px #777)
-moz-box-shadow: $bsval
-webkit-box-shadow: $bsval
box-shadow: $bsval
@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s))
-webkit-transition: $transval
-moz-transition: $transval
-ms-transition: $transval
-o-transition: $transval
transition: $transval
@mixin opacity($opacity: .5)
filter: alpha(opacity=$opacity * 100)
opacity: $opacity
@mixin background-clip($clip: padding-box)
-webkit-background-clip: $clip
-moz-background-clip: $clip
background-clip: $clip
@mixin box-sizing($type: content)
// type = border || content || padding
-webkit-box-sizing: #{$type}-box
-moz-box-sizing: #{$type}-box
-ms-box-sizing: #{$type}-box
box-sizing: #{$type}-box
@mixin skew-gradient($startColor: #555, $endColor: #333)
background-color: $endColor
background: -moz-linear-gradient(135deg, $endColor, $startColor)
background: -o-linear-gradient(135deg, $startColor, $endColor)
background: -webkit-gradient(linear, left top, right bottom, from($startColor), to($endColor))
background: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
@mixin transform($transform)
-webkit-transform: $transform
-moz-transform: $transform
-ms-transform: $transform
-o-transform: $transform
transform: $transform
@mixin keyframes($name)
@-webkit-keyframes #{$name}
@content
@-moz-keyframes #{$name}
@content
@-ms-keyframes #{$name}
@content
@-o-keyframes #{$name}
@content
@keyframes #{$name}
@content
.mt128
margin-top: 128px !important
.mt92
margin-top: 92px !important
.mt64
margin-top: 64px !important
.mt48
margin-top: 48px !important
.mt32
margin-top: 32px !important
.mt16
margin-top: 16px !important
.mt8
margin-top: 8px !important
.mt4
margin-top: 4px !important
.mt0
margin-top: 0px !important
// Transforms the (readable) text of an inline element into an mmlicons icon,
// allows for actual readable text in-code (and in readers?) with iconic looks
@mixin text-to-icon($icon-name, $color: #404040)
font-size: 1px
letter-spacing: -1px
color: transparent
text-shadow: none
font-weight: normal
&:before
font: 21px "mnmliconsRegular"
content: $icon-name
color: $color
@mixin text-to-entypo-icon($icon-name, $color: #404040, $size: 21px)
font-size: 1px
letter-spacing: -1px
color: transparent
text-shadow: none
font-weight: normal
&:before
font: $size "entypoRegular"
content: $icon-name
color: $color
// }}}
@media print
.oe_website
padding-top: 0 !important
.oe_website_editorbar, .css_noprint, .oe_snippet_editor, .oe_website_footer
display: none !important
.oe_website_header, .oe_website_body
> .container > .row
margin-left: 0px !important
.oe_website
background: #e9e9e9
color: #646464
.oe_website_header
background: whitesmoke
color: #333
padding-top: 8px
/* Body {{{ */
.oe_website_body
background: #fff
color: #333
padding-bottom: 32px
/* }}} */
/* Footer {{{ */
.oe_website_footer
border-top: solid 1px #e0e0e0
padding-bottom: 32px
padding-top: 32px
.oe_website_footer h5
border-bottom: solid 1px rgba(0, 0, 0, 0.06)
margin-right: 24px
padding-bottom: 6px
margin-bottom: 6px
margin-top: 24px
.oe_website_footer ul
list-style: none
padding: 0
margin: 0
.oe_website_footer ul li
display: block
margin-bottom: 4px
font-size: 14px
margin-right: 32px
.oe_website_footer ul li a
color: inherit
text-decoration: inherit
.oe_website_footer ul li a:visited
color: inherit
text-decoration: inherit
.oe_website_footer ul li a:hover
color: black
text-decoration: inherit
.oe_website_copy
margin-top: 24px
margin-bottom: 6px
/* }}} */
/* Editor {{{ */
.oe_website_editorbar
position: fixed
top: 0
right: 0
z-index: 10
display: block
width: 100%
padding: 10px
margin: 0px
background-color: #414141
@include vertical-gradient(#646060, #262626)
html,body
height: 100%
box-sizing: border-box
li
display: inline
color: #eee
&:hover
background: rgba(0,0,0,0.2)
text-shadow: black 0px 0px 3px
color: white
position: relative
.oe_website_editorbar .oe_rte_toolbar
div.dropdown
display: inline-block
li
display: list-item
#wrap
min-height: 100%
height: auto !important
height: 100%
margin: 0 auto -300px
padding: 0 0 364px
box-sizing: border-box
button
font-family: FontAwesome
font-weight: normal
font-style: normal
text-decoration: inherit
&.oe_button_list
padding-right: 3px
&:after
content: "\F0D7"
padding-left: 6px
footer
box-sizing: border-box
height: 300px
background: rgb(239, 248, 248) // rgb(221, 235, 227)
padding-top: 64px
padding-bottom: 64px
//*
color: #1abc9c !important
/* }}} */
.subheader
letter-spacing: 3px
font-weight: 300
.oe_editable:focus
outline: #80B5F2 solid 5px !important
header.navbar-fixed-top
position: static
.dark
background: rgb(239, 248, 248)
padding: 64px
h5
font-weight: bold
.nav > .pull-right
float: right !important //bugfix for flatly theme
.navbar .nav > li > p
margin-bottom: 0px
.navbar .nav > li a
text-shadow: none
.navbar .nav > li a
float: none
padding: 15px 15px 15px
color: #ffffff
text-decoration: none
text-shadow: 0 1px 0 #2c3e50
.nav > li a
display: block
#myCarousel .item
min-height: 300px
color: white
.carousel > .css_carousel_options
cursor: pointer
position: absolute
white-space: nowrap
z-index: 1
display: none
Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 KiB

+106 -30
View File
@@ -1,5 +1,6 @@
openerp.website = function(instance) {
var _lt = instance.web._lt;
var QWeb = instance.web.qweb;
instance.website.EditorBar = instance.web.Widget.extend({
template: 'Website.EditorBar',
events: {
@@ -42,11 +43,33 @@ instance.website.EditorBar = instance.web.Widget.extend({
.add(this.$buttons.save)
.parent().show();
// TODO: span edition changing edition state (save button)
this.rte.start_edition(
$('[data-oe-model]')
.not('link, script')
.prop('contentEditable', true)
.addClass('oe_editable'));
var $editables = $('[data-oe-model]')
.not('link, script')
// FIXME: propagation should make "meta" blocks non-editable in the first place...
.not('.oe_snippet_editor')
.prop('contentEditable', true)
.addClass('oe_editable');
var $rte_ables = $editables.filter('div, p, li, section, header, footer').not('[data-oe-type]');
var $raw_editables = $editables.not($rte_ables);
// temporary fix until we fix ckeditor
$raw_editables.each(function () {
$(this).parents().add($(this).find('*')).on('click', function(ev) {
ev.preventDefault();
ev.stopPropagation();
});
});
this.rte.start_edition($rte_ables);
$raw_editables.on('keydown keypress cut paste', function (e) {
var $target = $(e.target);
if ($target.hasClass('oe_dirty')) {
return;
}
$target.addClass('oe_dirty');
this.$buttons.save.prop('disabled', false);
}.bind(this));
},
rte_changed: function () {
this.$buttons.save.prop('disabled', false);
@@ -90,27 +113,31 @@ instance.website.EditorBar = instance.web.Widget.extend({
cancel: function () {
window.location.reload();
},
setup_droppable: function () {
var self = this;
$('.oe_snippet_drop').remove();
var droppable = '<div class="oe_snippet_drop"></div>';
var $zone = $(':not(.oe_snippet) > .container');
$zone.after(droppable);//.after(droppable);
$(".oe_snippet_drop").droppable({
hoverClass: 'oe_accepting',
drop: function( event, ui ) {
console.log(event, ui, "DROP");
$(event.target).replaceWith($(ui.draggable).html());
$('.oe_selected').remove();
$('.oe_snippet_drop').remove();
}
});
},
snippet_start: function () {
var self = this;
$('.oe_snippet').click(function(ev) {
$('.oe_snippet').draggable().click(function(ev) {
self.setup_droppable();
$(".oe_snippet_drop").show();
$('.oe_selected').removeClass('oe_selected');
var $snippet = $(ev.currentTarget);
$snippet.addClass('oe_selected');
$snippet.draggable();
var selector = $snippet.data("selector");
var $zone = $(".oe_website_body " + selector);
var droppable = '<div class="oe_snippet_drop" style="border:1px solid red;">.<br/>.<br/>.<br/>.<br/>.<br/></div>';
$zone.before(droppable);
$zone.after(droppable);
$(".oe_snippet_drop").droppable({
drop: function( event, ui ) {
console.log(event, ui, "DROP");
var $target = $(event.target);
$target.before($snippet.html());
$('.oe_selected').remove();
$('.oe_snippet_drop').remove();
}
});
$(ev.currentTarget).addClass('oe_selected');
});
},
@@ -215,9 +242,18 @@ instance.website.RTE = instance.web.Widget.extend({
[Command, "\uf12c", 'subscript'],
[Command, "\uf0c1", 'link'],
[Command, "\uf127", 'unlink'],
[Command, "\uf10d", 'blockquote'],
// 'image' uses either filebrowserImageUploadUrl or
// filebrowserUploadUrl, and provides a `link` tab. imagebutton only
// uses filebrowserImageUploadUrl and does not provide a `link` tab to
// hotlink an image from the internets.
[Command, "\uf03e", 'image'],
// [Command, "\uf030", 'imagebutton'],
[Group, "\uf0ca", [
[Command, "\uf0ca", 'bulletedlist'],
[Command, "\uf0cb", 'numberedlist']
[Command, "\uf0cb", 'numberedlist'],
[Command, "\uf03b", 'outdent'],
[Command, "\uf03c", 'indent']
]],
[Group, _lt("Heading"), [
[Style, _lt('H1'), { element: 'h1' }],
@@ -226,6 +262,12 @@ instance.website.RTE = instance.web.Widget.extend({
[Style, _lt('H4'), { element: 'h4', }],
[Style, _lt('H5'), { element: 'h5', }],
[Style, _lt('H6'), { element: 'h6', }]
]],
[Group, "\uf039", [
[Command, "\uf039", 'justifyblock'],
[Command, "\uf036", 'justifyleft'],
[Command, "\uf038", 'justifyright'],
[Command, "\uf037", 'justifycenter']
]]
],
// editor.ui.items -> possible commands &al
@@ -253,6 +295,7 @@ instance.website.RTE = instance.web.Widget.extend({
var self = this;
this.$el.show();
this.disable();
this.snippet_carousel();
CKEDITOR.on('currentInstance', this.proxy('_change_focused_editor'));
$elements
.not('span, [data-oe-type]')
@@ -296,18 +339,50 @@ instance.website.RTE = instance.web.Widget.extend({
this.toggle(!!CKEDITOR.currentInstance);
},
_config: function () {
var removed_plugins = [
// remove toolbar entirely
'toolbar,elementspath,resize',
// remove custom context menu
'contextmenu,tabletools,liststyle',
// magicline captures mousein/mouseout => draggable does not work
'magicline'
];
return {
// Don't load ckeditor's style rules
stylesSet: [],
// Remove toolbar entirely
removePlugins: 'toolbar,elementspath,resize',
removePlugins: removed_plugins.join(','),
uiColor: '',
// Ensure no config file is loaded
customConfig: '',
// Disable ACF
allowedContent: true,
// Don't insert paragraphs around content in e.g. <li>
autoParagraph: false,
filebrowserImageUploadUrl: "/website/attach",
};
},
// TODO clean
snippet_carousel: function () {
var self = this;
$('.carousel .js_carousel_options .label').on('click', function (e) {
e.preventDefault();
var $button = $(e.currentTarget)
var $c = $button.parents(".carousel:first");
if($button.hasClass("js_add")) {
var cycle = $c.find(".carousel-inner .item").size();
$c.find(".carousel-inner").append(QWeb.render("Website.Snipped.carousel"));
$c.carousel(cycle);
}
else {
var cycle = $c.find(".carousel-inner .item.active").remove();
$c.find(".carousel-inner .item:first").addClass("active");
$c.carousel(0);
self.trigger('change', self, null);
}
});
$('.carousel .js_carousel_options').show();
}
});
$(function(){
@@ -366,8 +441,6 @@ $(function(){
});
}
function append_snippet(event){
console.log('click',this,event.button);
if(event.button === 0){
@@ -389,10 +462,8 @@ $(function(){
}
event.preventDefault();
}
});
instance.web.ActionRedirect = function(parent, action) {
var url = $.deparam(window.location.href).url;
if (url) {
@@ -401,4 +472,9 @@ instance.web.ActionRedirect = function(parent, action) {
};
instance.web.client_actions.add("redirect", "instance.web.ActionRedirect");
instance.web.GoToWebsite = function(parent, action) {
window.location.href = window.location.href.replace(/[?#].*/, '').replace(/\/admin[\/]?$/, '');
};
instance.web.client_actions.add("website.gotowebsite", "instance.web.GoToWebsite");
};
@@ -14,6 +14,6 @@ $(function() {
$(function() {
var editor = new instance.website.EditorBar(instance.webclient);
editor.prependTo($('body'));
$('body').css('padding-top', editor.$el.outerHeight());
$('body').css('padding-top', '32px'); // Not working properly: editor.$el.outerHeight());
});
});
@@ -18,4 +18,12 @@
<ul class="dropdown-menu" role="menu"/>
</div>
</t>
<t t-name="Website.Snipped.carousel">
<div class="item" style="background-image: url(/website/static/src/img/china.jpg); background-size: cover; background-position: bottom;" >
<div class='container'>
<h1 class='mt64'>Your New Banner Slide</h1>
<h2>With another convincing subtitle</h2>
</div>
</div>
</t>
</templates>
+235 -158
View File
@@ -6,12 +6,13 @@
<template id="header">
<div class="container">
<div class="row">
<div class="oe_website_logo span4">
<a href='/page/website.homepage'><img t-att-alt="res_company.name" src='/web/binary/company_logo'/></a>
</div>
<ul class="oe_website_nav span8 nav nav-pills">
<li class="pull-right"><a href="/admin">Sign in</a></li>
<li class="pull-right"><a href="/page/website.contactus">Contact us</a></li>
<a href='/page/website.homepage' class='brand'>
<em>Open</em><b>ERP</b>
<!--<img t-att-alt="res_company.name" src='/web/binary/company_logo'/></a>-->
</a>
<ul class="nav pull-right">
<li class='pull-right'><a href="/admin">Sign in</a></li>
<li class='pull-right'><a href="/page/website.contactus">Contact us</a></li>
</ul>
</div>
</div>
@@ -20,17 +21,17 @@
<template id="footer">
<div class="container">
<div class="row">
<div class="span4">
<div class="span4" name="product">
<h5>Product and services</h5>
<ul>
<ul class='unstyled'>
<li><a href="https://www.openerp.com/start?download">Download</a></li>
<li><a href="https://launchpad.net/openobject">Launchpad</a></li>
<li><a href="http://runbot.openerp.com">Automated Tests</a></li>
</ul>
</div>
<div class="span4">
<div class="span4" name="social">
<h5>Social</h5>
<ul>
<ul class='unstyled'>
<li><a href="http://twitter.com/openerp"><i class="icon-twitter-sign"></i>Twitter</a></li>
<li><a href="http://www.facebook.com/OpenERP"><i class="icon-facebook-sign"></i>Facebook</a></li>
<li><a href="https://plus.google.com/+openerp/posts"><i class="icon-google-plus-sign"></i>Google+</a></li>
@@ -38,11 +39,11 @@
</div>
<div class="span4" name="about_us">
<h5 t-record="res_company" t-field="name">Company name</h5>
<ul>
<ul class='unstyled'>
<li><a href="/page/website.contactus">Contact us</a></li>
<li><a href="/page/website.news">News</a></li>
<li><a href="/page/website.contactus">About us</a></li>
<li>&amp;#x2706; <span t-record="res_company" t-field="phone"/></li>
<li><a href='#'>&amp;#x2706; <span t-record="res_company" t-field="phone"/></a></li>
</ul>
</div>
</div>
@@ -54,14 +55,6 @@
<html>
<head>
<title t-raw="title"><t t-esc="res_company.name"/></title>
<link rel='stylesheet' href='/website/static/src/css/base.css'/>
<link rel='stylesheet' href='/website/static/src/css/website.css'/>
<link rel='stylesheet' href='/website/static/lib/bootstrap/css/bootstrap.css'/>
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
<link rel='stylesheet' href='https://www.openerp.com/saas_master/static/site_new/fonts/lato/stylesheet.css'/>
<link href='//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'/>
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700' rel='stylesheet' type='text/css'/>
<script type="text/javascript" src="/web/static/lib/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.2/ckeditor.js"></script>
<script type="text/javascript">
@@ -76,100 +69,128 @@
<script type="text/javascript" src="/website/static/src/js/website_bootstrap.js"></script>
</t>
<t t-raw="head"/>
<link rel='stylesheet' href='/website/static/lib/bootstrap/css/bootstrap-flatly.css'/>
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
<link rel='stylesheet' href='/website/static/src/css/website.css'/>
<link rel='stylesheet' href='/website/static/lib/bootstrap/css/bootstrap-responsive.css'/>
</head>
<body class="oe_website">
<header class="oe_website_header">
<t t-call="website.header"/>
</header>
<div class="oe_website_body" t-raw="0">
<div class="container">
<div class="row">
<h1>I'm an empty page, please edit me...</h1>
<body>
<div id='wrap'>
<header class='navbar navbar-fixed-top'>
<div class='navbar-inner'>
<t t-call="website.header"/>
</div>
</header>
<div t-raw="0">
<div class="container">
<div class="row">
<h1>I'm an empty page, please edit me...</h1>
</div>
</div>
</div>
</div>
<footer class="oe_website_footer">
<footer>
<t t-call="website.footer"/>
<p class="oe_website_copy text-center">&amp;copy; <span t-record="res_company" t-field="name">Company name</span>.</p>
<p class="text-center">&amp;copy; <span t-record="res_company" t-field="name">Company name</span>.</p>
</footer>
<div class='oe_snippet_editor' style="display: none;">
<div class='oe_snippet_list'>
<div class='oe_snippet' name='Screenshot' selafter='.oe_span6' selinside='.oe_row'>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<a href="#">
<img src="https://www.openerp.com/apps/point_of_sale/pos_sc_02.jpg"/>
</a>
</div>
<div class='oe_snippet' name='Picture' data-selector='[class*="span"]'>
<div class="span6">
<img class="img-rounded" src="/website/static/src/img/volcano.jpg"/>
</div>
</div>
<div class='oe_snippet' name='Introduction' data-selector=".oe_container">
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">A very friendly Point of Sale</h2>
<h3 class="oe_slogan">Set up in a minute, Sell in seconds</h3>
<div class='oe_snippet' name='Introduction' data-selector=".container">
<section class="container">
<div class="row mt32 text-center">
<h2>Wildlife Analysis</h2>
<h3>In a beautiful place out in the country</h3>
</div>
<div class="row mt32">
<div class="span6">
<img class='img-rounded' src="/website/static/src/img/china.jpg"/>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<a href="#">
<img src="https://www.openerp.com/apps/point_of_sale/pos_sc_02.jpg"/>
</a>
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
OpenERP's Point of Sale introduces a super clean interface with no installation required
that runs online and offline on modern hardwares.
<div class="span6">
<p class='mt16'>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
<p>
It's full integration with the company inventory and accounting, gives you real time statistics and
consolidations amongst all shops without the hassle of integrating several applications.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum
</p>
<div class="oe_centeralign oe_websiteonly">
<a href="http://www.openerp.com/start" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
</div>
</div>
</div>
</section>
</div>
<div class='oe_snippet' name='Call To Action' selafter='p,h1,h2,h3,h4,h5,ul,ol' selinside='.oe_span6'>
<div class="oe_centeralign oe_websiteonly">
<a href="http://www.openerp.com/start" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
</div>
</div>
<div class='oe_snippet' name='Alternate Paragraph' data-selector=".oe_container">
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">A very friendly Point of Sale</h2>
<h3 class="oe_slogan">Set up in a minute, Sell in seconds</h3>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
OpenERP's Point of Sale introduces a super clean interface with no installation required
that runs online and offline on modern hardwares.
</p>
<div class='oe_snippet' name='Three Columns' data-selector=".container">
<section class="container">
<div class="row mt32">
<div class="span4">
<h4>Niagara</h4>
<p>
It's full integration with the company inventory and accounting, gives you real time statistics and
consolidations amongst all shops without the hassle of integrating several applications.
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
<div class="oe_centeralign oe_websiteonly">
<a href="http://www.openerp.com/start" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
</div>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<a href="#">
<img src="https://www.openerp.com/apps/point_of_sale/pos_sc_02.jpg"/>
</a>
</div>
<div class="span4">
<h4>Whitewater</h4>
<p>
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum
</p>
</div>
<div class="span4">
<h4>Red Moss</h4>
<p>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
quae ab illo inventore veritatis et quasi architecto beatae vitae
dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas
</p>
</div>
</div>
</section>
</div>
<div class='oe_snippet' name='Introduction' data-selector=".container">
<section class="container">
<div class="row mt32">
<div class="span6">
<h2>Wildlife Analysis</h2>
<h3>In a beautiful place out in the country</h3>
<p class='mt16'>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
<p>
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum
</p>
</div>
<div class="span6">
<img class='img-rounded' src="/website/static/src/img/greenfields.jpg"/>
</div>
</div>
</section>
</div>
<div class='oe_snippet oe_new' name='New Snippet'>
</div>
</div>
@@ -180,64 +201,120 @@
<template id="homepage">
<t t-call="website.layout">
<div>
<section class="oe_container">
<div class="oe_row oe_spaced oe_dark">
<div class="oe_span12">
<h2 class="oe_slogan">I'm your home page, please edit me...</h2>
<h3 class="oe_slogan">I'm a motto please edit me...</h3>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<a href="#">
<img src="https://www.openerp.com/apps/point_of_sale/pos_sc_02.jpg"/>
</a>
<section>
<div id="myCarousel" class="carousel slide" data-interval='1000000'>
<div class="css_carousel_options js_carousel_options" t-ignore="1">
<span class="label js_add"><i class="icon-plus-sign"></i></span>
<span class="label js_remove"><i class="icon-minus-sign"></i></span>
</div>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="item active" style="background-image: url(/website/static/src/img/greenfields.jpg); background-size: cover;" >
<div class='container'>
<h1 class='mt64'>A Nice Banner</h1>
<h2>A convincing subtitle</h2>
<a href='#' class='btn btn-success btn-large mt16'>And a <em>Call To Action</em></a>
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Here you can describoe you company...
OpenERP's Point of Sale introduces a super
clean interface with no installation required
that runs online and offline on modern
hardwares.
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">&amp;lsaquo;</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">&amp;rsaquo;</a>
</div>
</section>
<div>
<section class="container">
<div class="row">
<div class="span12 text-center">
<h1 class='mt64'>Welcome To Your New Homepage,</h1>
<h2 class='mt32 subheader'>where <b><em>everything</em></b> can be customized </h2>
</div>
</div>
</section>
<div class='dark mt64'>
<section class="container">
<div class="row">
<div class="span5">
<img class='img-rounded' src="/website/static/src/img/island.jpg"/>
</div>
<div class="span6 offset1">
<p class='mt16'>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
<p>
It's full integration with the company
inventory and accounting, gives you real time
statistics and consolidations amongst all shops
without the hassle of integrating several
applications.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum
</p>
<div class="oe_centeralign oe_websiteonly">
<a href="http://www.openerp.com/start" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
<div class="text-center">
<a href="http://www.openerp.com/start" class="btn mt16 btn-large btn-primary">Call To <em>Action</em></a>
</div>
</div>
</div>
</section>
</div>
<div class="container">
<div class="row">
<div class="span12">
<h1></h1>
</div>
</div>
<section class="container">
<div class="row">
<div class="span12 text-center">
<h2 class='mt48'>Ut enim ad minim veniam</h2>
</div>
</div>
<div class="row mt32">
<div class="span4">
<img class='img-rounded' src="/website/static/src/img/china_thumb.jpg"/>
<h4 class='mt16'>Cillum Dolore</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</div>
<div class="span4">
<img class='img-rounded' src="/website/static/src/img/desert_thumb.jpg"/>
<h4 class='mt16'>Mollit Anim</h4>
<p>
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum
</p>
</div>
<div class="span4">
<img class='img-rounded' src="/website/static/src/img/deers_thumb.jpg"/>
<h4 class='mt16'>Nemo Enim Ipsam</h4>
<p>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
quae ab illo inventore veritatis et quasi architecto beatae vitae
dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas
</p>
</div>
</div>
</section>
</div>
</t>
</template>
<template id="default_page">
<t t-call="website.layout">
<div class="container">
<div class="row">
<div class="span12">
<h1>New Page</h1>
<p>Write your text here...</p>
</div>
<t t-call="website.layout">
<div class="container">
<div class="row">
<div class="span12">
<h1>New Page</h1>
<p>Write your text here...</p>
</div>
</div>
</t>
</div>
</t>
</template>
@@ -246,7 +323,7 @@
<div class="container">
<div class="row">
<div class="span12">
<h1 class="oe_slogan">404: Page not found!</h1>
<h1>404: Page not found!</h1>
<p class="oe_grey">
The page you were looking for could not be
found; it is possible you have typed the
@@ -273,38 +350,38 @@
</template>
<template id="contactus">
<t t-call="website.layout">
<t t-set="title">Contact us - <t t-esc="res_company.name"/></t>
<div class="container">
<div class="oe_row">
<h2 class="oe_slogan">Contact us</h2>
<t t-call="website.layout">
<t t-set="title">Contact us - <t t-esc="res_company.name"/></t>
<div class="container">
<div class="row">
<h2>Contact us</h2>
</div>
<div class="row">
<div class="span8">
<p>
Contact us about anything related to our company or services.
</p><p>
We'll do our best to get back to you as soon as possible.
</p>
<div class="text-center oe_mt32" name="mail_button">
<a t-att-href="'mailto:'+res_company.email" class="btn btn-primary">Send us an email</a>
</div>
</div>
<div class="row">
<div class="span8">
<p>
Contact us about anything related to our company or services.
</p><p>
We'll do our best to get back to you as soon as possible.
</p>
<div class="oe_centeralign oe_mt32" name="mail_button">
<a t-att-href="'mailto:'+res_company.email" class="oe_button oe_big oe_tacky">Send us an email</a>
</div>
</div>
<div class="span4">
<address>
<strong t-record="res_company" t-field="name">Name</strong><br/>
<span t-record="res_company" t-field="street"/><br/>
<span t-record="res_company" t-field="city"/>, <span t-record="res_company" t-field="zip"/><br/>
<span t-record="res_company" t-field="country_id"/><br/>
<br/>
&amp;#x2706; <t t-esc="res_company.phone"/><br/>
<i class="icon-envelope"></i> <t t-esc="res_company.email"/>
</address>
<img class="oe_screenshot" t-att-src="google_map_url"/>
</div>
<div class="span4">
<address>
<strong t-record="res_company" t-field="name">Name</strong><br/>
<span t-record="res_company" t-field="street"/><br/>
<span t-record="res_company" t-field="city"/>, <span t-record="res_company" t-field="zip"/><br/>
<span t-record="res_company" t-field="country_id"> </span><br/>
<br/>
<span>&amp;#x2706; <span t-record="res_company" t-field="phone"><t t-esc="res_company.phone"/></span></span><br/>
<i class="icon-envelope"></i> <t t-esc="res_company.email"/>
</address>
<img class="thumbnail" t-att-src="google_map_url"/>
</div>
</div>
</t>
</div>
</t>
</template>
</data>
+1
View File
@@ -28,6 +28,7 @@ class website(http.Controller):
script = "\n".join(['<script type="text/javascript" src="%s"></script>' % i for i in main.manifest_list('js', db=request.db)])
css = "\n".join('<link rel="stylesheet" href="%s">' % i for i in main.manifest_list('css', db=request.db))
_values = {
'editable': self.isloggued(),
'request': request,
'registry': request.registry,
'cr': cr,
+15
View File
@@ -16,5 +16,20 @@
<field name="users" eval="[(4, ref('public_user'))]"/>
</record>
<record id="action_gotowebsite" model="ir.actions.client">
<field name="name">Website</field>
<field name="tag">website.gotowebsite</field>
<field name="res_model">website</field>
</record>
<menuitem id="website.menu" name="Website" sequence="501"/>
<menuitem id="website.submenu" name="Website" parent="website.menu" sequence="10"/>
<record id="mail_inboxfeeds" model="ir.ui.menu">
<field name="name">Go to Website</field>
<field name="sequence" eval="10"/>
<field name="action" ref="website.action_gotowebsite"/>
<field name="parent_id" ref="website.submenu"/>
</record>
</data>
</openerp>
+1 -1
View File
@@ -1,5 +1,5 @@
{
'name': 'Contact Form',
'name': 'Website Contact Form',
'category': 'CRM',
'version': '1.0',
'description': """
+1 -1
View File
@@ -24,7 +24,7 @@
<t t-set="title">Thank You!</t>
<div class="container">
<div class="oe_row">
<h2 class="oe_slogan">Thanks for your message.</h2>
<h2 class="oe_slogan">Thanks for your message.</h2>
</div>
</div>
</t>
+2
View File
@@ -0,0 +1,2 @@
import controllers
import hr
+18
View File
@@ -0,0 +1,18 @@
{
'name': 'Website Team',
'category': 'mail',
'version': '1.0',
'description': """
OpenERP Blog
============
""",
'author': 'OpenERP SA',
'depends': ['website', 'hr'],
'data': [
'views/website_hr.xml',
],
'qweb': ['static/src/xml/*.xml'],
'installable': True,
'auto_install': True,
}
@@ -0,0 +1 @@
import main
+19
View File
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from openerp.addons.web.http import request
from openerp.addons.website import website
class website_hr(website):
@website.route(['/team'], type='http', auth="admin")
def blog(self, cr, uid, **post):
hr_obj = request.registry['hr.employee']
employee_ids = hr_obj.search(cr, uid, [(1, "=", 1)])
values = {
'res_company': request.registry['res.company'].browse(cr, uid, 1),
'employee_ids': hr_obj.browse(cr, uid, employee_ids),
}
html = self.render(cr, uid, "website_hr.index", values)
return html
+11
View File
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class hr(osv.osv):
_inherit = 'hr.employee'
_columns = {
'website_important': fields.boolean('Publish', help="Publish also on contact form"),
}
@@ -0,0 +1,2 @@
sass:
sass --compass --trace -t expanded hr.sass hr.css
+1
View File
@@ -0,0 +1 @@
@import "compass/css3"
+3
View File
@@ -0,0 +1,3 @@
$(document).ready(function () {
});
+49
View File
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Layout add nav and footer -->
<record id="footer_hr_mail" model="ir.ui.view">
<field name="name">footer_website_hr</field>
<field name="inherit_id" ref="website.footer"/>
<field name="arch" type="xml">
<data>
<xpath expr="//a[@href='/page/website.contactus']" position="after">
<li><a href="/team">Team</a></li>
</xpath>
</data>
</field>
</record>
<!-- Page -->
<template id="index">
<t t-call="website.layout">
<t t-set="head">
<script type="text/javascript" src="/website_mail/static/src/js/blog.js"></script>
<link rel='stylesheet' href='/website_mail/static/src/css/blog.css'/>
<t t-raw="head"/>
</t>
<t t-set="title">Team</t>
<div class="container mt48">
<ul class="media-list">
<t t-foreach="employee_ids">
<!-- TODO: check qweb iteration -->
<li class="media pull-left">
<div t-att-class="'media-body %%s' %% (website_important and 'css_important' or '')">
<a href="#" t-att-data-id="id" class="js_important pull-right" groups="group_website_mail_manager">
<span class="label label-success">Unpublish</span>
<span class="label label-important">Publish</span>
</a>
<t t-raw="image"/>
<t t-raw="name"/>
</div>
</li>
</t>
</ul>
</div>
</t>
</template>
</data>
</openerp>
+1 -1
View File
@@ -1,5 +1,5 @@
{
'name': 'Blog',
'name': 'Website Blog',
'category': 'mail',
'version': '1.0',
'description': """
+15
View File
@@ -24,6 +24,7 @@ class website_mail(website):
'nav_list': dict(),
'prev_date': None,
'next_date': None,
'mail_group_id': mail_group_id,
}
domain = mail_group_id and [("res_id", "=", mail_group_id)] or []
@@ -83,6 +84,8 @@ class website_mail(website):
body=request.session.body,
parent_id=blog_id,
website_published=blog_id and True or False,
type='comment',
subtype='mt_comment',
context={'mail_create_nosubscribe': True},
)
request.session.body = False
@@ -91,3 +94,15 @@ class website_mail(website):
return '%s/blog/%s/%s' % (url, mail_group_id, blog_id)
else:
return werkzeug.utils.redirect("/blog/%s/%s" % (mail_group_id, blog_id))
@website.route(['/blog/<int:mail_group_id>/new'], type='http', auth="admin")
def new_blog_post(self, cr, uid, mail_group_id=None, **post):
blog_id = request.registry['mail.group'].message_post(cr, uid, mail_group_id,
body=_("Blog content.<br/>Please edit this content then you can publish this blog."),
subject=_("Blog title"),
website_published=False,
type='comment',
subtype='mt_comment',
context={'mail_create_nosubscribe': True},
)
return werkzeug.utils.redirect("/blog/%s/%s" % (mail_group_id, blog_id))
+9 -24
View File
@@ -1,33 +1,18 @@
.css_website_mail .media {
position: relative;
clear: both;
}
.css_website_mail .media .css_button_publish {
position: absolute;
right: 5px;
top: 5px;
}
.css_website_mail .media .css_button_publish .css_publish {
color: green;
.css_website_mail .media .label-success {
display: none;
background: none;
}
.css_website_mail .media .css_button_publish .css_unpublish {
color: red;
background: none;
}
.css_website_mail .media .css_published .css_publish {
display: block;
}
.css_website_mail .media .css_published .css_unpublish {
.css_website_mail .css_published .label-important {
display: none;
}
.css_website_mail .css_published .label-success {
display: inline-block;
}
.css_website_mail .has-error {
border-color: red;
}
.css_website_mail .css_older {
float: right;
.css_website_mail .css_nav_month {
display: none;
}
.css_website_mail .css_newer {
float: left;
.css_website_mail .css_nav_month:first-of-type {
display: block;
}
+11 -22
View File
@@ -2,27 +2,16 @@
.css_website_mail
.media
position: relative
clear: both
.css_button_publish
position: absolute
right: 5px
top: 5px
.css_publish
color: green
display: none
background: none
.css_unpublish
color: red
background: none
.css_published
.css_publish
display: block
.css_unpublish
display: none
.label-success
display: none
.css_published
.label-important
display: none
.label-success
display: inline-block
.has-error
border-color: red
.css_older
float: right
.css_newer
float: left
.css_nav_month
display: none
&:first-of-type
display: block
+2 -2
View File
@@ -1,9 +1,9 @@
$(document).ready(function () {
$('.js_website_mail').on('click', '.js_publish', function (e) {
e.preventDefault();
var $media = $link.parent();
var $media = $(this).parent();
$media.toggleClass('css_published');
$.post('/blog/publish/', {'message_id': $link.data('id')}, function (result) {
$.post('/blog/publish/', {'message_id': $(this).data('id')}, function (result) {
if (+result) $media.addClass('css_published');
else $media.removeClass('css_published');
});
+46 -29
View File
@@ -2,6 +2,14 @@
<openerp>
<data>
<!-- Mail group for the company's news -->
<record id="website_mail_blog" model="mail.group">
<field name="name">News</field>
<field name="public">public</field>
<field name="description">News displayed on your website</field>
</record>
<!-- Layout add nav and footer -->
<record id="header_website_mail" model="ir.ui.view">
@@ -9,14 +17,25 @@
<field name="inherit_id" ref="website.header"/>
<field name="arch" type="xml">
<data>
<xpath expr="(//li)[last()]" position="after">
<li class="pull-right"><a href="/blog">Blog</a></li>
<xpath expr="//li[last()]" position="after">
<li class="pull-right"><a href="/blog/%(website_mail.website_mail_blog)d">News</a></li>
</xpath>
</data>
</field>
</record>
<record id="footer_website_mail" model="ir.ui.view">
<field name="name">footer_website_mail</field>
<field name="inherit_id" ref="website.footer"/>
<field name="arch" type="xml">
<data>
<xpath expr="//a[@href='/page/website.news']" position="replace">
<a href="/blog/%(website_mail.website_mail_blog)d">News</a>
</xpath>
</data>
</field>
</record>
<!-- Page Shop -->
<!-- Page -->
<template id="index">
<t t-call="website.layout">
@@ -26,16 +45,17 @@
<t t-raw="head"/>
</t>
<t t-set="title">Blog</t>
<div class="container css_website_mail js_website_mail">
<div class="container mt48 css_website_mail js_website_mail">
<div class="row">
<div class="span4">
<ul class="nav nav-list">
<a t-if="mail_group_id" t-att-href="'/blog/%%s/new' %% mail_group_id" class="btn" groups="group_website_mail_manager">Add a new Blog</a>
<li class="nav-header">BLOG ARCHIVE</li>
<!-- TODO: check qweb iteration -->
<t t-foreach="nav_list" t-as="year">
<t t-set="year" t-value="nav_list[year]"/>
<li class="js_nav_year"><a href="#"><t t-esc="year['name']"/> <small>(<t t-esc="year['date_count']"/>)</small></a>
<ul class="nav nav-list" style="display: none">
<ul class="nav nav-list css_nav_month">
<t t-foreach="year['months']">
<li class="js_nav_month"><a href="#" t-att-data-domain="__domain"><t t-esc="date"/> <small>(<t t-esc="date_count"/>)</small></a>
<ul class="nav nav-list"/>
@@ -49,12 +69,12 @@
<div class="span8" t-if="blog_id">
<div class="media">
<div t-att-class="'media-body well %%s' %% (blog_id.website_published and 'css_published' or '')">
<a href="#" title="Click to publish or unpublish this blog" t-att-data-id="blog_id.id" class="js_publish css_button_publish" groups="group_website_mail_manager">
<i class="icon-ok-circle css_publish"></i>
<i class="icon-remove-sign css_unpublish"></i>
<a href="#" title="Click to publish or unpublish this blog" t-att-data-id="blog_id.id" class="js_publish pull-right" groups="group_website_mail_manager">
<span class="label label-success">Unpublish</span>
<span class="label label-important">Publish</span>
</a>
<h3><t t-esc="blog_id.subject"/></h3>
<p><t t-raw="blog_id.body"/></p>
<h3 t-record="blog_id" t-field="subject"></h3>
<div t-record="blog_id" t-field="body"></div>
<small class="pull-right muted text-right">
<div><t t-esc="blog_id.read(['author_id'])[0]['author_id'][1]"/></div>
<div><t t-esc="blog_id.date"/></div>
@@ -63,19 +83,17 @@
<ul class="media-list">
<t t-foreach="comments">
<!-- TODO: check qweb iteration -->
<li class="media well well-small">
<li class="media">
<div t-att-class="'media-body %%s' %% (website_published and 'css_published' or '')">
<a href="#" title="Click to publish or unpublish this message" t-att-data-id="id" class="js_publish css_button_publish" groups="group_website_mail_manager">
<i class="icon-ok-circle css_publish"></i>
<i class="icon-remove-sign css_unpublish"></i>
<a href="#" title="Click to publish or unpublish this message" t-att-data-id="id" class="js_publish pull-right" groups="group_website_mail_manager">
<span class="label label-success">Unpublish</span>
<span class="label label-important">Publish</span>
</a>
<div class="media">
<t t-raw="body"/>
<small class="pull-right muted text-right">
<div><t t-esc="author_id[1]"/></div>
<div><t t-esc="date"/></div>
</small>
</div>
<t t-raw="body"/>
<small class="pull-right muted text-right">
<div><t t-esc="author_id[1]"/></div>
<div><t t-esc="date"/></div>
</small>
</div>
</li>
</t>
@@ -91,13 +109,13 @@
<t t-foreach="blog_ids" t-as="blog">
<li class="media well">
<div t-att-class="'media-body %%s' %% (blog.website_published and 'css_published' or '')">
<a href="#" title="Click to publish or unpublish this message" t-att-data-id="blog.id" class="js_publish css_button_publish" groups="group_website_mail_manager">
<i class="icon-ok-circle css_publish"></i>
<i class="icon-remove-sign css_unpublish"></i>
<a href="#" title="Click to publish or unpublish this message" t-att-data-id="blog.id" class="js_publish pull-right" groups="group_website_mail_manager">
<span class="label label-success">Unpublish</span>
<span class="label label-important">Publish</span>
</a>
<h4 class="media-heading"><t t-esc="blog.subject"/></h4>
<h4 class="media-heading" ><a t-att-href="'/blog/%%s/%%s' %% (blog.res_id, blog.id)" t-record="blog" t-field="subject"></a></h4>
<div class="media">
<t t-raw="blog.body"/>
<div t-record="blog" t-field="body"></div>
<small class="pull-right muted text-right">
<a t-att-href="'/blog/%%s/%%s' %% (blog.res_id, blog.id)">Read more </a>
<div><t t-esc="blog.read(['author_id'])[0]['author_id'][1]"/></div>
@@ -108,13 +126,12 @@
</li>
</t>
</ul>
<a t-if="prev_date" t-att-href="'?date=%%s' %% (prev_date)" class="css_newer">Newer</a>
<a t-if="next_date" t-att-href="'?date=%%s' %% (next_date)" class="css_older">Older</a>
<a t-if="prev_date" t-att-href="'?date=%%s' %% (prev_date)" class="pull-left">Newer</a>
<a t-if="next_date" t-att-href="'?date=%%s' %% (next_date)" class="pull-right">Older</a>
</div>
</div>
</div>
</t>
</template>
</data>
</openerp>
@@ -8,6 +8,12 @@
.oe_ecommerce .oe_total table {
width: auto;
}
.oe_ecommerce .oe_total td:last-child {
text-align: right;
}
.oe_ecommerce .oe_total th:last-child {
text-align: center;
}
.oe_ecommerce .oe_products .oe_product {
text-align: center;
display: inline-block;
@@ -16,6 +22,7 @@
height: 220px;
margin-right: 15px;
margin-left: 3px;
padding-top: 8px;
}
.oe_ecommerce .oe_products .oe_product .oe_hidden {
visibility: hidden;
@@ -60,7 +67,12 @@
display: none;
}
.oe_ecommerce .oe_mycart .oe_product {
padding: 3px 5px 6px 10px;
display: inline-block;
width: 250px;
margin-left: 0px;
float: none;
margin-right: 16px;
padding: 8px 5px 6px 10px;
}
.oe_ecommerce .oe_mycart .oe_product > .pull-left {
width: 84px;
@@ -72,9 +84,9 @@
margin: auto;
}
.oe_ecommerce .oe_mycart .oe_product .oe_button_cart {
position: static;
right: 6px;
top: 6px;
text-align: right;
}
.oe_ecommerce .oe_mycart form input {
margin-bottom: 0;
@@ -90,9 +102,9 @@
-o-border-radius: 5px;
border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
}
.oe_ecommerce .oe_button_cart {
width: 100%;
@@ -147,9 +159,6 @@
max-width: 64px;
max-height: 64px;
}
.oe_ecommerce .oe_checkout .css_required input, .oe_ecommerce .oe_checkout .css_required select {
background-color: #d2d2ff !important;
}
.oe_ecommerce .oe_checkout h4 {
border-bottom: 1px solid #dddddd;
margin-right: 30px;
@@ -189,9 +198,3 @@
left: 0;
cursor: pointer;
}
.oe_ecommerce .oe_total td:last-child {
text-align: right;
}
.oe_ecommerce .oe_total th:last-child {
text-align: center;
}
@@ -37,6 +37,7 @@
height: 220px
margin-right: 15px
margin-left: 3px
padding-top: 8px
&:nth-child(3n)
margin-right: 0
.oe_ecommerce_price
@@ -55,7 +56,12 @@
display: none
.oe_mycart
.oe_product
padding: 3px 5px 6px 10px
display: inline-block
width: 250px
margin-left: 0px
float: none
margin-right: 16px
padding: 8px 5px 6px 10px
> .pull-left
width: 84px
height: 64px
@@ -64,9 +70,9 @@
max-height: 64px
margin: auto
.oe_button_cart
position: static
right: 6px
top: 6px
text-align: right
form
input
margin-bottom: 0
@@ -77,7 +83,7 @@
margin-bottom: 15px
+border-radius(5px)
border: 1px solid rgba(0,0,0,.1)
+box-shadow(0 0 3px 1px rgba(0,0,0,.1))
+box-shadow(0px 1px 3px rgba(0,0,0,.1))
.oe_button_cart
width: 100%
font-size: 11px
@@ -116,7 +122,7 @@
.oe_checkout
.css_required
input, select
background-color: #d2d2ff !important
//background-color: #d2d2ff !important
h4
border-bottom: 1px solid #ddd
margin-right: 30px
+7 -7
View File
@@ -27,7 +27,7 @@
<t t-raw="head"/>
</t>
<t t-set="title">Shop - <t t-raw="title">Categories</t></t>
<div class="container oe_ecommerce">
<div class="container mt48 oe_ecommerce">
<div class="row">
<div class="span4 css_noprint">
<ul class="nav nav-list">
@@ -64,8 +64,8 @@
<t t-call="website_sale.page">
<t t-set="title">Product</t>
<t t-set="shop_content">
<div class="oe_search">
<form action="/shop" method="get" class="navbar-search">
<div class="oe_search clearfix">
<form action="/shop" method="get" class="navbar-search pull-right">
<input type="text" name="search" class="search-query span4" placeholder="Search" t-att-value="search or '' or ''"/>
<button type="submit" class="btn">Submit</button>
</form>
@@ -81,15 +81,15 @@
</template>
<template id="product_card">
<div class="media oe_product">
<div class="media oe_product span3">
<a t-att-href="'/shop/product/%%s' %% product.id"><h4 class="media-heading"><span t-record="product" t-field="name"><t t-esc="product.name"/></span></h4></a>
<a class="pull-left" t-att-href="'/shop/product/%%s' %% product.id"><img class="media-object" t-att-src="'data:image/png;base64,' + product.image"/></a>
<div class="media-body">
<div class="oe_ecommerce_description" t-record="product" t-field="description_sale"><t t-esc="product.description_sale"/></div>
<div class="oe_ecommerce_price"><span><span t-record="product" t-field="list_price"><t t-esc="product.list_price"/></span>€</span></div>
<div class="oe_button_cart">
<button t-att-class="'btn btn-inverse %%s' %% (not quantity and 'oe_hidden' or '')" t-att-data-id="product.id">Remove one</button>
<button t-att-class="'btn %%s' %% (quantity and 'btn-success' or 'btn-primary')" t-att-data-id="product.id">Add to cart
<button t-att-class="'btn btn-small btn-inverse %%s' %% (not quantity and 'oe_hidden' or '')" t-att-data-id="product.id">Remove one</button>
<button t-att-class="'btn btn-small %%s' %% (quantity and 'btn-success' or 'btn-primary')" t-att-data-id="product.id">Add to cart
<span class="oe_txt">(<span class="oe_quantity"><t t-esc="quantity"/></span>)</span>
</button>
</div>
@@ -180,7 +180,7 @@
<t t-raw="head"/>
</t>
<t t-set="title">Shop - Checkout</t>
<div class="container oe_ecommerce">
<div class="container mt48 oe_ecommerce">
<div class="row">
<div class="span4 oe_total">
<table class="table table-condensed" t-if="order.order_line">