[ADD] Added oe_highlight_on_dirty
bzr revid: fme@openerp.com-20120625195225-ehts5hyuscmpxeyy
This commit is contained in:
parent
020ed6309f
commit
52a7476bb1
|
@ -261,6 +261,24 @@
|
|||
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.openerp .oe_form_dirty .oe_highlight_on_dirty {
|
||||
color: white;
|
||||
background: #dc5f59;
|
||||
background-color: #dc5f59;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
|
||||
background-image: -webkit-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: -moz-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: -ms-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: -o-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: linear-gradient(to bottom, #dc5f59, #b33630);
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_form_dirty .oe_highlight_on_dirty:hover {
|
||||
background: #ed6f6a;
|
||||
}
|
||||
.openerp .oe_title {
|
||||
width: 55%;
|
||||
}
|
||||
|
@ -1508,24 +1526,6 @@
|
|||
background-color: #ff6666 !important;
|
||||
border: 1px solid #dd0000 !important;
|
||||
}
|
||||
.openerp .oe_form_button_save_dirty {
|
||||
color: white;
|
||||
background: #dc5f59;
|
||||
background-color: #dc5f59;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
|
||||
background-image: -webkit-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: -moz-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: -ms-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: -o-linear-gradient(top, #dc5f59, #b33630);
|
||||
background-image: linear-gradient(to bottom, #dc5f59, #b33630);
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_form_button_save_dirty:hover {
|
||||
background: #ed6f6a;
|
||||
}
|
||||
.openerp .oe_form_editable .oe_highlight {
|
||||
color: #404040;
|
||||
background: none;
|
||||
|
|
|
@ -232,6 +232,14 @@ $colour4: #8a89ba
|
|||
@include vertical-gradient(#DF6B66, #BF3A33)
|
||||
//@include vertical-gradient(lighten(#dc5f59, 3%), lighten(#b33630, 3%))
|
||||
@include box-shadow(0 0 1px rgba(0, 0, 0, 0.2))
|
||||
.oe_form_dirty .oe_highlight_on_dirty
|
||||
color: white
|
||||
background: #dc5f59
|
||||
@include vertical-gradient(#dc5f59, #b33630)
|
||||
@include box-shadow(none)
|
||||
font-weight: bold
|
||||
&:hover
|
||||
background: #ED6F6A
|
||||
.oe_title
|
||||
width: 55%
|
||||
.oe_title:after
|
||||
|
@ -1205,14 +1213,6 @@ $colour4: #8a89ba
|
|||
input, select, textarea
|
||||
background-color: #F66 !important
|
||||
border: 1px solid #D00 !important
|
||||
.oe_form_button_save_dirty
|
||||
color: white
|
||||
background: #dc5f59
|
||||
@include vertical-gradient(#dc5f59, #b33630)
|
||||
@include box-shadow(none)
|
||||
font-weight: bold
|
||||
&:hover
|
||||
background: #ED6F6A
|
||||
.oe_form_editable
|
||||
.oe_highlight
|
||||
color: #404040
|
||||
|
|
|
@ -247,13 +247,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
}
|
||||
if (this.$buttons) {
|
||||
this.$buttons.show();
|
||||
this.$buttons.find('.oe_form_button_save').removeClass('oe_form_button_save_dirty');
|
||||
}
|
||||
if (this.$pager) {
|
||||
this.$pager.show();
|
||||
}
|
||||
this.$element.show().css('visibility', 'hidden');
|
||||
this.$element.removeClass('oe_form_dirty');
|
||||
this.$element.add(this.$buttons).removeClass('oe_form_dirty');
|
||||
return this.has_been_loaded.pipe(function() {
|
||||
var result;
|
||||
if (self.dataset.index === null) {
|
||||
|
@ -329,16 +328,14 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
if (record.id) {
|
||||
self.do_push_state({id:record.id});
|
||||
}
|
||||
self.$element.removeClass('oe_form_dirty');
|
||||
self.$buttons.find('.oe_form_button_save').removeClass('oe_form_button_save_dirty');
|
||||
self.$element.add(self.$buttons).removeClass('oe_form_dirty');
|
||||
});
|
||||
},
|
||||
on_form_changed: function() {
|
||||
this.trigger("view_content_has_changed");
|
||||
},
|
||||
do_notify_change: function() {
|
||||
this.$element.addClass('oe_form_dirty');
|
||||
this.$buttons.find('.oe_form_button_save').addClass('oe_form_button_save_dirty');
|
||||
this.$element.add(this.$buttons).addClass('oe_form_dirty');
|
||||
},
|
||||
on_pager_action: function(action) {
|
||||
if (this.can_be_discarded()) {
|
||||
|
|
|
@ -684,7 +684,7 @@
|
|||
<button type="button" class="oe_button oe_form_button_create">Create</button>
|
||||
</span>
|
||||
<span class="oe_form_buttons_edit">
|
||||
<button type="button" class="oe_button oe_form_button_save">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
|
||||
<button type="button" class="oe_button oe_form_button_save oe_highlight_on_dirty">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue