[CHG] Applied new rules to oe_highlight. Added action.target to oe_view_manager class
oe_highlight depend on target of the action current: readonly: red, editmode: dont apply inline : always red new: always red and save is always red (so no dirty anymore but keep the class just in case) bzr revid: fme@openerp.com-20120628143252-r9jxckyet9v1qn1l
This commit is contained in:
parent
8e392289a3
commit
89b2b1e307
|
@ -1162,10 +1162,10 @@
|
|||
.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after {
|
||||
content: "f";
|
||||
}
|
||||
.openerp .oe_view_manager_global {
|
||||
.openerp .oe_view_manager_current, .openerp .oe_view_manager_inline {
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_view_manager_global > .oe_view_manager_header {
|
||||
.openerp .oe_view_manager_current > .oe_view_manager_header, .openerp .oe_view_manager_inline > .oe_view_manager_header {
|
||||
border-top: 1px solid #cacaca;
|
||||
border-bottom: 1px solid #cacaca;
|
||||
background-color: #fcfcfc;
|
||||
|
@ -1179,10 +1179,10 @@
|
|||
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row td {
|
||||
.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row td {
|
||||
padding: 8px;
|
||||
}
|
||||
.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td {
|
||||
.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row:first-child td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row:first-child td {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.openerp .oe_popup_form > .oe_formview > .oe_form_pager {
|
||||
|
@ -1566,11 +1566,11 @@
|
|||
background-color: #ff6666 !important;
|
||||
border: 1px solid #dd0000 !important;
|
||||
}
|
||||
.openerp .oe_form_editable .oe_highlight {
|
||||
.openerp .oe_view_manager_current .oe_form_editable .oe_highlight {
|
||||
color: #404040;
|
||||
background: none;
|
||||
}
|
||||
.openerp .oe_form_editable button.oe_highlight {
|
||||
.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight {
|
||||
background-color: #efefef;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
|
||||
background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8);
|
||||
|
@ -1582,7 +1582,7 @@
|
|||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
|
||||
}
|
||||
.openerp .oe_form_editable button.oe_highlight:active {
|
||||
.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:active {
|
||||
background-color: #e3e3e3;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
|
||||
background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
|
||||
|
@ -1594,7 +1594,7 @@
|
|||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.openerp .oe_form_editable button.oe_highlight:hover {
|
||||
.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:hover {
|
||||
background-color: #f6f6f6;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
|
||||
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
|
||||
|
|
|
@ -913,7 +913,7 @@ $colour4: #8a89ba
|
|||
content: "f"
|
||||
// }}}
|
||||
// ViewManager application {{{
|
||||
.oe_view_manager_global
|
||||
.oe_view_manager_current, .oe_view_manager_inline
|
||||
height: 100%
|
||||
> .oe_view_manager_header
|
||||
border-top: 1px solid #cacaca
|
||||
|
@ -1241,7 +1241,7 @@ $colour4: #8a89ba
|
|||
input, select, textarea
|
||||
background-color: #F66 !important
|
||||
border: 1px solid #D00 !important
|
||||
.oe_form_editable
|
||||
.oe_view_manager_current .oe_form_editable
|
||||
.oe_highlight
|
||||
color: #404040
|
||||
background: none
|
||||
|
|
|
@ -136,7 +136,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
};
|
||||
}
|
||||
if (action.target === 'new') {
|
||||
if (this.dialog == null) {
|
||||
if (this.dialog === null) {
|
||||
this.dialog = new instance.web.Dialog(this, { width: '80%' });
|
||||
if(on_close)
|
||||
this.dialog.on_close.add(on_close);
|
||||
|
@ -146,6 +146,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
this.dialog.dialog_title = action.name;
|
||||
this.dialog_viewmanager = new instance.web.ViewManagerAction(this, action);
|
||||
this.dialog_viewmanager.appendTo(this.dialog.$element);
|
||||
this.dialog_viewmanager.$element.addClass("oe_view_manager_" + action.target);
|
||||
this.dialog.open();
|
||||
} else {
|
||||
this.dialog_stop();
|
||||
|
@ -158,7 +159,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
this.inner_action = action;
|
||||
this.inner_viewmanager = new instance.web.ViewManagerAction(this, action);
|
||||
this.inner_viewmanager.appendTo(this.$element);
|
||||
this.inner_viewmanager.$element.addClass("oe_view_manager_global");
|
||||
this.inner_viewmanager.$element.addClass("oe_view_manager_" + action.target);
|
||||
}
|
||||
},
|
||||
ir_actions_act_window_close: function (action, on_closed) {
|
||||
|
|
|
@ -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 oe_highlight_on_dirty">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">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