[FIX]modal: button were not showing in calendar
authorCedric Snauwaert <csn@openerp.com>
Wed, 16 Apr 2014 15:15:43 +0000 (17:15 +0200)
committerCedric Snauwaert <csn@openerp.com>
Wed, 16 Apr 2014 15:15:43 +0000 (17:15 +0200)
bzr revid: csn@openerp.com-20140416151543-im41f9rpqj6ll742

addons/web/static/src/css/base.css
addons/web/static/src/css/base.sass
addons/web/static/src/js/view_form.js
addons/web_calendar/static/src/js/web_calendar.js

index 9ddcf9c..b8c28e1 100644 (file)
@@ -3344,6 +3344,9 @@ body.oe_single_form .oe_single_form_container {
 .modal .oe_act_window.modal-body{
   padding: 0;
 }
+.modal .oe_button{
+  margin: 0 4px 0 0;
+}
 input[type="radio"], input[type="checkbox"] {
   margin-right: 4px;
   margin-left: 4px;
index d3153ee..a989481 100644 (file)
@@ -2720,6 +2720,8 @@ body.oe_single_form
         font-size: 20px
     .modal-footer
         text-align: left
+    .oe_button
+        margin: 0 4px 0 0
     .oe_act_window.modal-body
         padding: 0
 
index f1323d0..0ecd164 100644 (file)
@@ -1958,7 +1958,7 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
         var exec_action = function() {
             if (self.node.attrs.confirm) {
                 var def = $.Deferred();
-                var dialog = instance.web.Dialog(this, {
+                var dialog = new instance.web.Dialog(this, {
                     title: _t('Confirm'),
                     buttons: [
                         {text: _t("Cancel"), click: function() {
index 6db2d97..380df1f 100644 (file)
@@ -851,9 +851,8 @@ openerp.web_calendar = function(instance) {
                     button_delete = _.str.sprintf("<button class='oe_button oe_bold delme'><span> %s </span></button>",_t("Delete"));
                     button_edit = _.str.sprintf("<button class='oe_button oe_bold editme oe_highlight'><span> %s </span></button>",_t("Edit Event"));
                     
-                    
-                    pop.$el.closest(".ui-dialog").find(".ui-dialog-buttonpane").prepend(button_delete);
-                    pop.$el.closest(".ui-dialog").find(".ui-dialog-buttonpane").prepend(button_edit);
+                    pop.$el.closest(".modal").find(".modal-footer").prepend(button_delete);
+                    pop.$el.closest(".modal").find(".modal-footer").prepend(button_edit);
                     
                     $('.delme').click(
                         function() {