[FIX] website: remove alert snippets_modal
authorChristophe Matthieu <chm@openerp.com>
Wed, 12 Feb 2014 14:39:16 +0000 (15:39 +0100)
committerChristophe Matthieu <chm@openerp.com>
Wed, 12 Feb 2014 14:39:16 +0000 (15:39 +0100)
bzr revid: chm@openerp.com-20140212143916-tqf8d8n1hhod5l4v

addons/website/static/src/js/website.snippets.editor.js
addons/website/static/src/xml/website.snippets.xml

index e45bee9..f6e9583 100644 (file)
 
             this.$el.addClass("hidden");
 
-            this.$modal = $(openerp.qweb.render('website.snippets_modal'));
-            this.$modal.appendTo("body");
-
             $(document).on('click', '.dropdown-submenu a[tabindex]', function (e) {
                 e.preventDefault();
             });
                     });
                 },
                 stop: function(ev, ui){
-                    if (action === 'insert' && ! dropped && $('.oe_drop_zone') && ui.position.top > 50) {
+                    if (action === 'insert' && ! dropped && $('.oe_drop_zone') && ui.position.top > 3) {
                         var el = $('.oe_drop_zone').nearest({x: ui.position.left, y: ui.position.top}).first();
                         if (el.length) {
                             el.after($toInsert);
                         },0);
                     } else {
                         $toInsert.remove();
-                        if (self.$modal.find('input:not(:checked)').length) {
-                            self.$modal.modal('toggle');
-                        }
                     }
                 },
             });
index cf3996b..d73e0c3 100644 (file)
             </div>
         </li>
     </t>
-    <t t-name="website.snippets_modal">
-        <div class="modal" id="oe_droperror" tabindex="-1" role="dialog">
-            <div class="modal-dialog">
-                <div class="modal-content">
-                    <div class="modal-header">
-                        <button type="button" class="close" data-dismiss="modal">&amp;times;</button>
-                        <h4 class="modal-title">
-                            Building Block Not Inserted
-                        </h4>
-                    </div>
-                    <div class="modal-body">
-                        <p>
-                            Please drop building blocks in a valid zone, like
-                            this one:
-                        </p>
-                        <div class="row">
-                            <div class="col-sm-4 col-sm-offset-4 oe_drop_zone_style text-center">
-                                <span class="mt16">drop in this zone</span>
-                            </div>
-                        </div>
-                        <div class="text-muted">
-                            <b>Tip:</b> when your cursor is in a valid zone,
-                            OpenERP shows you a preview of the building block
-                            in the page.  You must release the block when the
-                            preview is visible.
-                        </div>
-                    </div>
-                    <div class="modal-footer">
-                        <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
-                        <div class="pull-left">
-                            <input type="checkbox" value="1"/> Never show this tip again
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </t>
 
     <t t-name="website.snippets">
         <div id='oe_snippets'></div>