[FIX] Form save dirty button
bzr revid: fme@openerp.com-20120409201017-auczo7u6kivvvbg2
This commit is contained in:
@@ -1250,6 +1250,17 @@
|
||||
background-color: #ff6666 !important;
|
||||
border: 1px solid #dd0000 !important;
|
||||
}
|
||||
.openerp2 .oe_form_button_save_dirty {
|
||||
color: white;
|
||||
background: #dc5f59;
|
||||
background: -moz-linear-gradient(#dc5f59, #b33630);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
|
||||
background: -webkit-linear-gradient(#dc5f59, #b33630);
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
-box-shadow: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp2 .oe_form_group_cell {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
@@ -1019,6 +1019,16 @@ $colour4: #8a89ba
|
||||
input, select, textarea
|
||||
background-color: #F66 !important
|
||||
border: 1px solid #D00 !important
|
||||
.oe_form_button_save_dirty
|
||||
color: white
|
||||
background: #dc5f59
|
||||
background: -moz-linear-gradient(#dc5f59, #b33630)
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630))
|
||||
background: -webkit-linear-gradient(#dc5f59, #b33630)
|
||||
-moz-box-shadow: none
|
||||
-webkit-box-shadow: none
|
||||
-box-shadow: none
|
||||
font-weight: bold
|
||||
.oe_form_group_cell
|
||||
line-height: 18px
|
||||
.oe_form_button
|
||||
|
||||
@@ -196,191 +196,6 @@ label.error {
|
||||
padding-bottom:4px;
|
||||
}
|
||||
|
||||
/* View Manager */
|
||||
.openerp .oe_vm_switch {
|
||||
float: right;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe_view_title {
|
||||
font-size:150%;
|
||||
padding:2px 0 0 0;
|
||||
}
|
||||
|
||||
/* SearchView */
|
||||
.openerp .oe_searchview_field > div {
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.openerp .oe_searchview_field .oe_input_icon {
|
||||
top: auto;
|
||||
bottom: 3px;
|
||||
}
|
||||
|
||||
.openerp .filter_label, .openerp .filter_icon {
|
||||
background: #F0F0F0;
|
||||
border: 1px solid #999;
|
||||
background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 );
|
||||
}
|
||||
.openerp .filter_label:hover, .openerp .filter_icon:hover {
|
||||
background: #F0F0F0;
|
||||
background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 );
|
||||
}
|
||||
.openerp .filter_label:active, .openerp .filter_icon:active {
|
||||
background: #aaa;
|
||||
background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 );
|
||||
}
|
||||
.openerp .filter_label.enabled, .openerp .filter_icon.enabled {
|
||||
background: #aaa;
|
||||
filter: none;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
-o-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.openerp .filter_icon {
|
||||
height: 22px;
|
||||
padding: 1px 2px 0 2px;
|
||||
margin: 0;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.openerp .filter_label {
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
text-shadow: #EEE 0 1px 0;
|
||||
color: #4C4C4C;
|
||||
white-space: nowrap;
|
||||
min-height: 40px;
|
||||
min-width: 75px;
|
||||
padding: 2px 4px;
|
||||
margin: 0;
|
||||
}
|
||||
.openerp .filter_label_group {
|
||||
padding-right: 0.4em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.openerp .filter_label_group button {
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
border-right: none;
|
||||
}
|
||||
.openerp .filter_label_group button:first-child {
|
||||
-webkit-border-top-left-radius: 7px;
|
||||
-webkit-border-bottom-left-radius: 7px;
|
||||
-moz-border-radius-topleft: 7px;
|
||||
-moz-border-radius-bottomleft: 7px;
|
||||
border-top-left-radius: 7px;
|
||||
border-bottom-left-radius: 7px;
|
||||
border-right: none;
|
||||
}
|
||||
.openerp .filter_label_group button:last-child {
|
||||
-webkit-border-top-right-radius: 7px;
|
||||
-webkit-border-bottom-right-radius: 7px;
|
||||
-moz-border-radius-topright: 7px;
|
||||
-moz-border-radius-bottomright: 7px;
|
||||
border-top-right-radius: 7px;
|
||||
border-bottom-right-radius: 7px;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
.openerp .filter_label_group button.filter_icon img {
|
||||
padding: 1px 8px 0 8px;
|
||||
}
|
||||
.openerp .filter_label_group button.filter_icon:first-child {
|
||||
border-left: solid 1px #999;
|
||||
margin-left: -7px;
|
||||
-webkit-border-top-left-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-moz-border-radius-topleft: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.openerp .searchview_group_string {
|
||||
display: block;
|
||||
color: #7D7979;
|
||||
font-weight: bold;
|
||||
padding: 2px 0 2px 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp .searchview_group_string:hover {
|
||||
background-color: #ccc;
|
||||
}
|
||||
.openerp .searchview_group.folded .searchview_group_string {
|
||||
background: url("/web/static/src/img/ui/group-folded.png") no-repeat scroll 0 50%;
|
||||
}
|
||||
.openerp .searchview_group.folded .searchview_group_content {
|
||||
display: none;
|
||||
}
|
||||
.openerp .searchview_group.expanded .searchview_group_string {
|
||||
background: url("/web/static/src/img/ui/group-expanded.png") no-repeat scroll 0 50%;
|
||||
}
|
||||
.openerp .searchview_group.expanded .searchview_group_content {
|
||||
display: block;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
|
||||
|
||||
.openerp .searchview_extended_group {
|
||||
padding: 3px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_group .oe_adv_filters_and {
|
||||
border-bottom: 1px solid #8E8E8E;
|
||||
text-align: center;
|
||||
margin-top: -10px;
|
||||
}
|
||||
.openerp .searchview_extended_group .oe_adv_filters_and span {
|
||||
background: #F0EEEE;
|
||||
position: relative;
|
||||
top: 0.5em;
|
||||
padding: 0 1em 0 1em;
|
||||
color: #8E8E8E;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_group.last_group .oe_adv_filters_and {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.openerp .oe_search-view-buttons {
|
||||
padding: 2px 0 10px 0;
|
||||
vertical-align:middle;
|
||||
}
|
||||
.openerp .oe_search-view-filters-management {
|
||||
float: right;
|
||||
}
|
||||
.openerp .oe_search-view-filters-management, .openerp .oe_search-view-custom-filter-btn {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_add_proposition span {
|
||||
font-size: 0.9em;
|
||||
background: url(/web/static/src/img/icons/gtk-add.png) repeat-y;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_delete_group {
|
||||
float:right;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_delete_prop {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_delete_group span,
|
||||
.openerp .searchview_extended_delete_prop span {
|
||||
font-size: 0.9em;
|
||||
background: url(/web/static/src/img/icons/gtk-close.png) repeat-y;
|
||||
padding-left: 18px;
|
||||
}
|
||||
/* List */
|
||||
.openerp table.oe-listview-content {
|
||||
clear: right;
|
||||
@@ -615,20 +430,6 @@ label.error {
|
||||
}
|
||||
|
||||
/* Form */
|
||||
.openerp .oe_form_button_save_dirty {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_form_dirty > .oe_form_header > .oe_form_buttons > .oe_form_button_save {
|
||||
color: white;
|
||||
background: #dc5f59;
|
||||
background: -moz-linear-gradient(#dc5f59, #b33630);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
|
||||
background: -webkit-linear-gradient(#dc5f59, #b33630);
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
-box-shadow: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_form_group_cell input[type="checkbox"] {
|
||||
margin-top: 3px;
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -121,6 +121,7 @@ openerp.web.FormView = openerp.web.View.extend({
|
||||
}
|
||||
if (this.$buttons) {
|
||||
this.$buttons.find('.oe_form_buttons').show();
|
||||
this.$buttons.find('.oe_form_button_save').removeClass('oe_form_button_save_dirty');
|
||||
}
|
||||
if (this.$pager) {
|
||||
this.$pager.find('.oe_form_pager').show();
|
||||
@@ -196,6 +197,7 @@ openerp.web.FormView = openerp.web.View.extend({
|
||||
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');
|
||||
});
|
||||
},
|
||||
on_form_changed: function() {
|
||||
@@ -209,6 +211,7 @@ openerp.web.FormView = openerp.web.View.extend({
|
||||
},
|
||||
do_notify_change: function() {
|
||||
this.$element.addClass('oe_form_dirty');
|
||||
this.$buttons.find('.oe_form_button_save').addClass('oe_form_button_save_dirty');
|
||||
},
|
||||
on_pager_action: function(action) {
|
||||
if (this.can_be_discarded()) {
|
||||
|
||||
Reference in New Issue
Block a user