[MERGE]: with main

bzr revid: aja@tinyerp.com-20131210132424-5g18hyei02691ioe
This commit is contained in:
ajay javiya (OpenERP)
2013-12-10 18:54:24 +05:30
9 changed files with 96 additions and 85 deletions
+24 -28
View File
@@ -199,12 +199,11 @@ html, body, #wrapwrap {
}
#wrapwrap {
display: table;
width: 100%;
}
header, #wrap, footer {
display: table-row;
margin: 0 auto;
}
footer {
@@ -224,6 +223,10 @@ footer {
width: 100%;
}
.row {
min-height: 32px;
}
/* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */
.oe_structure.oe_editable.oe_empty:empty, .oe_editable[data-oe-type=html]:empty, .oe_structure.oe_editable.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child {
background-image: url("/website/static/src/img/drag_here.png");
@@ -283,12 +286,12 @@ ul.nav-stacked > li > a {
}
/* ---- PUBLISH ---- */
.css_unpublish, .css_publish {
.css_published .btn-danger, .css_published .css_publish {
display: none;
}
.css_published .css_unpublish, .css_unpublished .css_publish {
display: block;
.css_unpublished .btn-success, .css_unpublished .css_unpublish {
display: none;
}
[data-publish='off'] {
@@ -345,23 +348,7 @@ ul.nav-stacked > li > a {
.carousel.oe_big .carousel-inner {
height: 450px;
}
.carousel .carousel-caption h1, .carousel .carousel-caption h2, .carousel .carousel-caption h3 {
margin-top: 10px;
margin-bottom: 10px;
}
.carousel .carousel-image {
right: 10%;
left: 50%;
top: 5%;
bottom: 5%;
position: absolute;
text-align: center;
}
.carousel .carousel-image img {
height: 100%;
margin: 0 auto;
}
.carousel .item.text_image .carousel-caption {
.carousel .carousel-caption {
left: auto;
right: auto;
bottom: 10%;
@@ -369,6 +356,19 @@ ul.nav-stacked > li > a {
padding: 20px;
background: rgba(0, 0, 0, 0.4);
}
.carousel .carousel-caption h1, .carousel .carousel-caption h2, .carousel .carousel-caption h3 {
margin-top: 10px;
margin-bottom: 10px;
}
.carousel .carousel-image {
right: 50%;
left: 50%;
top: 5%;
bottom: 5%;
position: absolute;
max-height: 90%;
margin: 0 auto;
}
.carousel .item.text_only .carousel-image {
display: none !important;
}
@@ -376,18 +376,14 @@ ul.nav-stacked > li > a {
left: 10%;
right: 10%;
top: 10%;
bottom: auto;
text-align: center;
background: transparent;
}
.carousel .item.image_text .carousel-caption {
left: auto;
text-align: left;
right: 10%;
bottom: 10%;
padding: 20px;
background: rgba(0, 0, 0, 0.4);
}
.carousel .item.image_text .carousel-image {
right: 50%;
left: 10%;
}
.carousel .carousel-control {
+21 -25
View File
@@ -124,11 +124,10 @@ html,body, #wrapwrap
height: 100%
#wrapwrap
display: table
width: 100%
header, #wrap, footer
display: table-row
margin: 0 auto
footer
height: 100%
@@ -145,6 +144,9 @@ footer
float: left
width: 100%
.row
min-height: 32px
/* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */
.oe_structure.oe_editable.oe_empty:empty, .oe_editable[data-oe-type=html]:empty, .oe_structure.oe_editable.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child
@@ -202,10 +204,12 @@ ul.nav-stacked > li > a
text-transform: uppercase
/* ---- PUBLISH ---- */
.css_unpublish, .css_publish
display: none
.css_published .css_unpublish, .css_unpublished .css_publish
display: block
.css_published
.btn-danger, .css_publish
display: none
.css_unpublished
.btn-success, .css_unpublish
display: none
[data-publish='off']
+opacity(0.5)
@@ -250,27 +254,23 @@ ul.nav-stacked > li > a
&.oe_big .carousel-inner
height: 450px
.carousel-caption
left: auto
right: auto
bottom: 10%
text-align: left
padding: 20px
background: rgba(0, 0, 0, 0.4)
h1, h2, h3
margin-top: 10px
margin-bottom: 10px
.carousel-image
right: 10%
right: 50%
left: 50%
top: 5%
bottom: 5%
position: absolute
text-align: center
img
height: 100%
margin: 0 auto
.item.text_image
.carousel-caption
left: auto
right: auto
bottom: 10%
text-align: left
padding: 20px
background: rgba(0, 0, 0, 0.4)
max-height: 90%
margin: 0 auto
.item.text_only
.carousel-image
display: none !important
@@ -278,17 +278,13 @@ ul.nav-stacked > li > a
left: 10%
right: 10%
top: 10%
bottom: auto
text-align: center
background: transparent
.item.image_text
.carousel-caption
left: auto
text-align: left
right: 10%
bottom: 10%
padding: 20px
background: rgba(0, 0, 0, 0.4)
.carousel-image
right: 50%
left: 10%
.carousel-control
cursor: pointer
+2 -3
View File
@@ -266,12 +266,11 @@
/* ----- PUBLISHING STUFF ---- */
$(document).on('click', '.js_publish_management .js_publish_btn', function () {
var $data = $(this).parent(".js_publish_management");
var self=this;
var $data = $(this).parents(".js_publish_management:first");
var self=this;
openerp.jsonRpc($data.data('controller') || '/website/publish', 'call', {'id': +$data.data('id'), 'object': $data.data('object')})
.then(function (result) {
$data.toggleClass("css_unpublished css_published");
$(self).toggleClass("btn-success btn-danger");
$data.parents("[data-publish]").attr("data-publish", +result ? 'on' : 'off');
}).fail(function (err, data) {
website.error(data, '/web#return_label=Website&model='+$data.data('object')+'&id='+$data.data('id'));
@@ -1114,9 +1114,12 @@
this.$target.addClass("col-md-offset-" + this.$target.prevAll(".oe_drop_to_remove").length);
this._super();
},
hide_remove_button: function() {
this.$overlay.find('.oe_snippet_remove').toggleClass("hidden", !this.$target.siblings().length);
},
onFocus : function () {
this._super();
this.$overlay.find('.oe_snippet_remove').toggleClass("hidden", !this.$target.siblings().length);
this.hide_remove_button();
},
on_clone: function () {
var $clone = this.$target.clone(false);
@@ -1124,13 +1127,16 @@
_class += ' col-md-1';
$clone.attr("class", _class);
this.$target.after($clone);
this.hide_remove_button();
return false;
},
on_remove: function () {
if (!this.$target.siblings().length){
return false;
}
return this._super();
this._super();
this.hide_remove_button();
return false;
},
on_resize: function (compass, beginClass, current) {
if (compass !== 'w')
@@ -1174,7 +1180,7 @@
self.$target.carousel(+$(this).data('slide-to')); });
this.$target.attr('contentEditable', 'false');
this.$target.find('.oe_structure, blockquote').attr('contentEditable', 'true');
this.$target.find('.oe_structure, .content>.row').attr('contentEditable', 'true');
this.$target.carousel('pause');
},
@@ -1259,7 +1265,6 @@
this._super();
this.$target.css("background-image", "");
this.$target.removeClass(this._class);
this.$target.find('.content, .carousel-image img').attr('contentEditable', 'true');
},
start : function () {
var self = this;
@@ -1314,7 +1319,7 @@
this.$target.find('.carousel-control').off('click').on('click', function () {
self.$target.carousel( $(this).data('slide')); });
this.$target.find('.carousel-image img, .content').attr('contentEditable', 'true');
this.$target.find('.carousel-image, .content').attr('contentEditable', 'true');
this._super();
},
});
@@ -92,18 +92,18 @@
},
{
stepId: 'activate-text-block-title',
element: '#wrap [data-snippet-id=three-columns]:first .text-center[data-snippet-id=colmd]',
element: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
placement: 'top',
title: "Edit an Area",
content: "Select any area of the page to modify it. Click on this subtitle.",
trigger: {
emitter: '#wrap [data-snippet-id=three-columns]:first .text-center[data-snippet-id=colmd]',
emitter: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
id: 'snippet-activated',
},
},
{
stepId: 'remove-text-block-title',
element: '.ui-draggable.oe_active .oe_snippet_remove',
element: '.oe_active .oe_snippet_remove',
placement: 'top',
title: "Delete the Title",
content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the trash can to delete the title.",
+25 -12
View File
@@ -223,11 +223,11 @@
var selector = '#oe_snippets div.oe_snippet[data-snippet-id="'+snippetId+'"] .oe_snippet_thumbnail';
var $thumbnail = $(selector).first();
var thumbnailPosition = $thumbnail.position();
$thumbnail.trigger($.Event( "mousedown", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top }));
$thumbnail.trigger($.Event( "mousemove", { which: 1, pageX: thumbnailPosition.left+100, pageY: thumbnailPosition.top+700 }));
$thumbnail.trigger($.Event("mousedown", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top }));
$thumbnail.trigger($.Event("mousemove", { which: 1, pageX: thumbnailPosition.left+100, pageY: thumbnailPosition.top+700 }));
var $dropZone = $(".oe_drop_zone").first();
var dropPosition = $dropZone.position();
$dropZone.trigger($.Event( "mouseup", { which: 1, pageX: dropPosition.left, pageY: dropPosition.top }));
$dropZone.trigger($.Event("mouseup", { which: 1, pageX: dropPosition.left, pageY: dropPosition.top }));
},
tests: [],
};
@@ -256,6 +256,7 @@
return this._super();
},
registerTour: function (tour) {
var testId = 'test_'+tour.id+'_tour';
this.tours.push(tour);
TestConsole.tests.push({
id: tour.id,
@@ -263,22 +264,34 @@
var actionSteps = _.filter(tour.steps, function (step) {
return step.trigger;
});
var currentIndex = 0;
function executeStep (step) {
var $element = $(step.element);
window.localStorage.setItem(testId, step.stepId);
step.triggers(function () {
currentIndex = currentIndex + 1;
executeStep(actionSteps[currentIndex]);
var nextStep = actionSteps.shift();
if (nextStep) {
setTimeout(function () {
executeStep(nextStep);
}, 10);
}
});
if (step.snippet && step.trigger === 'drag') {
setTimeout(function () {
TestConsole.dragAndDropSnippet(step.snippet);
}, 50);
TestConsole.dragAndDropSnippet(step.snippet);
} else {
$element.click();
var $element = $(step.element);
$element.trigger($.Event("click", { srcElement: $element }));
}
}
executeStep(actionSteps[currentIndex]);
var lastStepId = window.localStorage.getItem(testId);
var currentStep = actionSteps.shift();
if (lastStepId) {
while (currentStep && lastStepId !== currentStep.stepId) {
currentStep = actionSteps.shift();
}
}
executeStep(currentStep);
},
reset: function () {
window.localStorage.removeItem(testId);
},
});
},
+2 -4
View File
@@ -40,9 +40,7 @@
<a href="/page/website.contactus" class="btn btn-success btn-large">Contact us</a>
</p>
</div>
<div class="carousel-image hidden-xs">
<img src="/website/static/src/img/banner/banner_picture.png" alt="Banner OpenERP Image"/>
</div>
<img class="carousel-image hidden-xs" src="/website/static/src/img/banner/banner_picture.png" alt="Banner OpenERP Image"/>
</div>
</div>
</div>
@@ -304,7 +302,7 @@
<div class="content">
<div class="row">
<blockquote class="col-md-5 col-md-offset-4 mt64">
<blockquote class="mt64 col-md-4 col-md-offset-4">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
+8 -4
View File
@@ -277,14 +277,18 @@
<template id="publish_management">
<div t-if="editable" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
<div t-attf-class="btn-group js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
<button t-attf-class="btn btn-#{object.website_published and 'success' or 'danger'} js_publish_btn">
<span class="css_publish">Not Published</span>
<span class="css_unpublish">Published</span>
</button>
<button class="btn btn-danger js_publish_btn">Not Published</button>
<button class="btn btn-success js_publish_btn">Published</button>
<button type="button" t-attf-class="btn btn-default dropdown-toggle" t-att-id="'dopprod-%s' % object.id" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
<li>
<a href="#" class="js_publish_btn">
<span class="css_unpublish">Unpublish</span>
<span class="css_publish">Publish</span>
</a>
</li>
<t t-raw="0"/>
<li t-if="publish_edit">
<a t-att-href="'/web#return_label=Website&amp;model=%s&amp;id=%s' % (object._name, object.id)"
@@ -218,7 +218,7 @@
inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete"
groups="website_mail.group_comment">
<xpath expr="//ul[@id='comments-list']" position="after">
<section class="mb32">
<section class="mb32 css_editable_mode_hidden">
<form id="comment" t-attf-action="/blogpost/#{blog_post.id}/comment"
method="POST">
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>