diff --git a/addons/website/static/src/css/snippets.css b/addons/website/static/src/css/snippets.css index 27c99b82df7..aea81b4f5f2 100644 --- a/addons/website/static/src/css/snippets.css +++ b/addons/website/static/src/css/snippets.css @@ -1,3 +1,4 @@ +/* .oe_snippet_demo .oe_page{ margin-top: 50px; margin-bottom: 300px; @@ -25,7 +26,7 @@ z-index: 800; pointer-events :none; color: white; - text-shadow: none; /* 0px 1px 3px black; */ + text-shadow: none; font-size: 14px; line-height: 20px; text-align: center; @@ -49,6 +50,8 @@ overflow-y: hidden; overflow-x: scroll; } +*/ + .oe_snippet_list{ width: auto; white-space: nowrap; @@ -74,8 +77,11 @@ user-select: none; white-space: normal; } + + + .oe_snippet_editor .oe_snippet:after{ - content: attr(name); /*attr('name');*/ + content: attr(name); position: absolute; bottom: 0px; left: 0px; diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index b1e044e2e53..5925990a998 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -71,12 +71,24 @@ instance.website.EditorBar = instance.web.Widget.extend({ $snippet = $(ev.currentTarget); $snippet.addClass('oe_selected'); $snippet.draggable(); - debugger; + selector = $snippet.data("selector"); + zone = $(".oe_website_body " + selector); + var droppable = '
.
.
.
.
.
'; + zone.before(droppable); + zone.after(droppable); + $(".oe_snippet_drop").droppable({ + drop: function( event, ui ) { + console.log(event, ui, "DROP"); + target = $(event.target); + target.before($snippet.html()); + $('.oe_selected').remove(); + $('.oe_snippet_drop').remove(); + } + }); }); }, snippet: function (ev) { - console.log(ev); $('.oe_snippet_editor').show(); }, }); diff --git a/addons/website/views/views.xml b/addons/website/views/views.xml index 26b102e74da..4e8994cc888 100644 --- a/addons/website/views/views.xml +++ b/addons/website/views/views.xml @@ -141,7 +141,7 @@ Start your free trial -
+
@@ -189,40 +189,42 @@ qweb -
-
-
-

I'm your home page, please edit me...

-

I'm a motto please edit me...

-
-
-
- - - +
+
+
+
+

I'm your home page, please edit me...

+

I'm a motto please edit me...

+
+
+
+ + + +
+
+
+

+ 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. +

+

+ 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. +

+
-
-

- 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. -

-

- 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. -

- -
-
-
+
+