diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css
index 468e1c92270..a30feca9fba 100644
--- a/addons/website/static/src/css/editor.css
+++ b/addons/website/static/src/css/editor.css
@@ -140,6 +140,15 @@ table.editorbar-panel td.selected {
}
/* ---- SNIPPET EDITOR ---- */
+#oe_droperror .modal-header {
+ border-bottom: 0;
+}
+#oe_droperror .modal-footer {
+ border-top: 0;
+ margin: 0;
+ padding: 0;
+}
+
#oe_snippets {
position: fixed;
left: 0px;
diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass
index 4f726742e3f..974e3cdef9e 100644
--- a/addons/website/static/src/css/editor.sass
+++ b/addons/website/static/src/css/editor.sass
@@ -129,6 +129,13 @@ table.editorbar-panel
/* ---- SNIPPET EDITOR ---- */
+#oe_droperror
+ .modal-header
+ border-bottom: 0
+ .modal-footer
+ border-top: 0
+ margin: 0
+ padding: 0
#oe_snippets
position: fixed
diff --git a/addons/website/static/src/js/website.snippets.js b/addons/website/static/src/js/website.snippets.js
index 1dcc3df65c5..cc2c3275dd6 100644
--- a/addons/website/static/src/js/website.snippets.js
+++ b/addons/website/static/src/js/website.snippets.js
@@ -118,6 +118,9 @@
this.scrollspy();
this.$el.addClass("hidden");
+
+ this.$modal = $(openerp.qweb.render('website.snippets_modal'));
+ this.$modal.appendTo("body");
},
fetch_snippet_templates: function () {
var self = this;
@@ -291,6 +294,7 @@
var self = this;
var $toInsert = false;
var $tumb = $snippet.find(".oe_snippet_thumbnail");
+ var dropped = false;
$snippet.draggable({
helper: 'clone',
@@ -304,7 +308,7 @@
},
start: function(){
self.hide();
-
+ dropped = false;
var snipped_id = $snippet.data('snippet-id');
var action = $snippet.find('.oe_snippet_body').size() ? 'insert' : 'mutate';
if( action === 'insert'){
@@ -361,6 +365,8 @@
return false;
}
+ dropped = true;
+
var $target = false;
if(action === 'insert'){
$target = $toInsert;
@@ -390,6 +396,10 @@
},
stop: function(){
$('.oe_drop_zone').droppable('destroy').remove();
+ if (!dropped) {
+ self.$modal.modal('toggle');
+ setTimeout(function () {self.$modal.fadeOut();}, 3000);
+ }
},
});
},
diff --git a/addons/website/static/src/xml/website.snippets.xml b/addons/website/static/src/xml/website.snippets.xml
index 51da2f8e5af..415cdb6c74d 100644
--- a/addons/website/static/src/xml/website.snippets.xml
+++ b/addons/website/static/src/xml/website.snippets.xml
@@ -15,6 +15,22 @@
+
+
+