[REF]add bootstrap modal window based, cleaned, refactored from trunk-ui-to-boostrap-modal branch
bzr revid: csn@openerp.com-20140410100631-5v6a71oi5wyunbda
This commit is contained in:
parent
a8ab53566c
commit
e95ca69113
|
@ -127,7 +127,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp .oe_button, .openerp input[type='submit'], .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {
|
.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp .oe_button, .openerp input[type='submit'] {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid rgba(0, 0, 0, 0.4);
|
border: 1px solid rgba(0, 0, 0, 0.4);
|
||||||
color: #4c4c4c;
|
color: #4c4c4c;
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
.openerp a.button:hover, .openerp button:hover, .openerp .oe_button:hover, .openerp input[type='submit']:hover, .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-hover {
|
.openerp a.button:hover, .openerp button:hover, .openerp .oe_button:hover, .openerp input[type='submit']:hover {
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
|
||||||
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
|
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-position: 0;
|
background-position: 0;
|
||||||
}
|
}
|
||||||
.openerp a.button:focus, .openerp button:focus, .openerp .oe_button:focus, .openerp input[type='submit']:focus, .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-focus {
|
.openerp a.button:focus, .openerp button:focus, .openerp .oe_button:focus, .openerp input[type='submit']:focus {
|
||||||
border: 1px solid #80bfff;
|
border: 1px solid #80bfff;
|
||||||
background-position: 0;
|
background-position: 0;
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
-webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
|
-webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
|
||||||
box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
|
box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
|
||||||
}
|
}
|
||||||
.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp .oe_button:active, .openerp .oe_button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active, .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-active {
|
.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp .oe_button:active, .openerp .oe_button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active {
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
|
||||||
background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
|
background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
|
||||||
|
@ -212,148 +212,6 @@
|
||||||
.openerp .ui-tabs {
|
.openerp .ui-tabs {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
.openerp.ui-dialog {
|
|
||||||
display: none;
|
|
||||||
height: auto !important;
|
|
||||||
padding: 6px;
|
|
||||||
background-color: rgba(60, 60, 60, 0.7);
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: #888888 #555555 #444444;
|
|
||||||
-moz-border-radius: 8px;
|
|
||||||
-webkit-border-radius: 8px;
|
|
||||||
border-radius: 8px;
|
|
||||||
-moz-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
|
|
||||||
-webkit-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
|
|
||||||
box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
|
|
||||||
-webkit-background-clip: padding-box;
|
|
||||||
-moz-background-clip: padding-box;
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-content {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane {
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar {
|
|
||||||
border-top: none;
|
|
||||||
border-left: none;
|
|
||||||
border-right: none;
|
|
||||||
border-bottom: 1px solid #cacaca;
|
|
||||||
-moz-border-radius: 2px 2px 0 0;
|
|
||||||
-webkit-border-radius: 2px 2px 0 0;
|
|
||||||
border-radius: 2px 2px 0 0;
|
|
||||||
background-color: #ededed;
|
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
|
|
||||||
background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede);
|
|
||||||
background-image: -moz-linear-gradient(top, #fcfcfc, #dedede);
|
|
||||||
background-image: -ms-linear-gradient(top, #fcfcfc, #dedede);
|
|
||||||
background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
|
|
||||||
background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-content {
|
|
||||||
background: white;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-buttonpane {
|
|
||||||
border-top: 1px solid #e0e0e0;
|
|
||||||
background: #f5f7f9;
|
|
||||||
margin: 0;
|
|
||||||
-moz-border-radius: 0 0 2px 2px;
|
|
||||||
-webkit-border-radius: 0 0 2px 2px;
|
|
||||||
border-radius: 0 0 2px 2px;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-buttonpane button {
|
|
||||||
margin: 0 4px 0 0;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar-close {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar-close .ui-icon-closethick {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar-close:before {
|
|
||||||
content: "×";
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 16px;
|
|
||||||
color: black;
|
|
||||||
text-shadow: 0 1px 0 white;
|
|
||||||
padding: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
background: transparent;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar-close:before:hover {
|
|
||||||
color: black;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about {
|
|
||||||
background-color: white;
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=);
|
|
||||||
-moz-border-radius: 0 0 2px 2px;
|
|
||||||
-webkit-border-radius: 0 0 2px 2px;
|
|
||||||
border-radius: 0 0 2px 2px;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about a {
|
|
||||||
color: #7c7bad;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about a:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about .oe_logo {
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about .oe_bottom {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
text-shadow: 0 1px 1px #999999;
|
|
||||||
background-color: #8a0e0e;
|
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
|
|
||||||
background-image: -webkit-linear-gradient(top, #b41616, #600606);
|
|
||||||
background-image: -moz-linear-gradient(top, #b41616, #600606);
|
|
||||||
background-image: -ms-linear-gradient(top, #b41616, #600606);
|
|
||||||
background-image: -o-linear-gradient(top, #b41616, #600606);
|
|
||||||
background-image: linear-gradient(to bottom, #b41616, #600606);
|
|
||||||
color: #eeeeee;
|
|
||||||
padding: 0 16px;
|
|
||||||
-moz-border-radius: 0 0 2px 2px;
|
|
||||||
-webkit-border-radius: 0 0 2px 2px;
|
|
||||||
border-radius: 0 0 2px 2px;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog .oe_about .oe_bottom a {
|
|
||||||
color: #eeeeee;
|
|
||||||
}
|
|
||||||
.openerp.ui-dialog.oe_act_window .ui-dialog-content {
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
.openerp .modal-backdrop {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 1040;
|
|
||||||
background-color: black;
|
|
||||||
filter: alpha(opacity=30);
|
|
||||||
opacity: 0.3;
|
|
||||||
}
|
|
||||||
.openerp .oe_i {
|
.openerp .oe_i {
|
||||||
font-family: "mnmliconsRegular" !important;
|
font-family: "mnmliconsRegular" !important;
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
|
@ -1234,10 +1092,8 @@
|
||||||
}
|
}
|
||||||
.openerp .oe_about .oe_bottom {
|
.openerp .oe_about .oe_bottom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
|
||||||
text-shadow: 0 1px 1px #999999;
|
text-shadow: 0 1px 1px #999999;
|
||||||
background-color: #8a0e0e;
|
background-color: #8a0e0e;
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
|
||||||
|
@ -3426,9 +3282,6 @@ body.oe_single_form .oe_single_form_container {
|
||||||
.openerp_ie ul.oe_form_status li.oe_active > .arrow span, .openerp_ie ul.oe_form_status_clickable li.oe_active > .arrow span {
|
.openerp_ie ul.oe_form_status li.oe_active > .arrow span, .openerp_ie ul.oe_form_status_clickable li.oe_active > .arrow span {
|
||||||
background-color: #729fcf !important;
|
background-color: #729fcf !important;
|
||||||
}
|
}
|
||||||
.openerp_ie .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='#D8D8D8');
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
.openerp {
|
.openerp {
|
||||||
|
@ -3474,7 +3327,19 @@ body.oe_single_form .oe_single_form_container {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
.modal .modal-header button.close {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
padding: 1px;
|
||||||
|
height: 18px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.modal .modal-footer {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.modal .oe_act_window.modal-body{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
input[type="radio"], input[type="checkbox"] {
|
input[type="radio"], input[type="checkbox"] {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
|
|
@ -218,7 +218,7 @@ $sheet-padding: 16px
|
||||||
font-size: inherit
|
font-size: inherit
|
||||||
// }}}
|
// }}}
|
||||||
// Button style {{{
|
// Button style {{{
|
||||||
a.button:link, a.button:visited, button, .oe_button, input[type='submit'], .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button
|
a.button:link, a.button:visited, button, .oe_button, input[type='submit']
|
||||||
display: inline-block
|
display: inline-block
|
||||||
border: 1px solid rgba(0,0,0,0.4)
|
border: 1px solid rgba(0,0,0,0.4)
|
||||||
color: #4c4c4c
|
color: #4c4c4c
|
||||||
|
@ -233,18 +233,18 @@ $sheet-padding: 16px
|
||||||
-webkit-font-smoothing: antialiased
|
-webkit-font-smoothing: antialiased
|
||||||
outline: none
|
outline: none
|
||||||
|
|
||||||
a.button:hover, button:hover,.oe_button:hover, input[type='submit']:hover, .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-hover
|
a.button:hover, button:hover,.oe_button:hover, input[type='submit']:hover
|
||||||
@include vertical-gradient(#f6f6f6, #e3e3e3)
|
@include vertical-gradient(#f6f6f6, #e3e3e3)
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
background-position: 0
|
background-position: 0
|
||||||
|
|
||||||
a.button:focus, button:focus, .oe_button:focus, input[type='submit']:focus, .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-focus
|
a.button:focus, button:focus, .oe_button:focus, input[type='submit']:focus
|
||||||
border: 1px solid #80bfff
|
border: 1px solid #80bfff
|
||||||
background-position: 0
|
background-position: 0
|
||||||
@include vertical-gradient(#f6f6f6, #e3e3e3)
|
@include vertical-gradient(#f6f6f6, #e3e3e3)
|
||||||
@include box-shadow((0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, .8) inset))
|
@include box-shadow((0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, .8) inset))
|
||||||
|
|
||||||
a.button:active, a.button.active, button:active, .oe_button:active, .oe_button.active, input[type='submit']:active, input[type='submit'].active, .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-active
|
a.button:active, a.button.active, button:active, .oe_button:active, .oe_button.active, input[type='submit']:active, input[type='submit'].active
|
||||||
@include vertical-gradient(#e3e3e3, #f6f6f6)
|
@include vertical-gradient(#e3e3e3, #f6f6f6)
|
||||||
@include box-shadow(none)
|
@include box-shadow(none)
|
||||||
|
|
||||||
|
@ -272,105 +272,6 @@ $sheet-padding: 16px
|
||||||
.ui-tabs
|
.ui-tabs
|
||||||
position: static
|
position: static
|
||||||
|
|
||||||
// Modal box
|
|
||||||
&.ui-dialog
|
|
||||||
display: none
|
|
||||||
height: auto !important
|
|
||||||
padding: 6px
|
|
||||||
//overflow: hidden
|
|
||||||
background-color: rgba(60,60,60,0.7)
|
|
||||||
border: 1px solid
|
|
||||||
border-color: #888 #555 #444
|
|
||||||
//overflow: hidden
|
|
||||||
@include radius(8px)
|
|
||||||
@include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6))
|
|
||||||
@include background-clip()
|
|
||||||
.ui-dialog-content
|
|
||||||
padding: 0
|
|
||||||
.ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane
|
|
||||||
padding: 16px
|
|
||||||
.ui-dialog-titlebar
|
|
||||||
border-top: none
|
|
||||||
border-left: none
|
|
||||||
border-right: none
|
|
||||||
border-bottom: 1px solid #cacaca
|
|
||||||
@include radius(2px 2px 0 0)
|
|
||||||
@include vertical-gradient(#FCFCFC, #DEDEDE)
|
|
||||||
.ui-dialog-title
|
|
||||||
margin: 0
|
|
||||||
padding: 0
|
|
||||||
.ui-dialog-content
|
|
||||||
background: white
|
|
||||||
width: auto !important
|
|
||||||
.ui-dialog-buttonpane
|
|
||||||
border-top: 1px solid #e0e0e0
|
|
||||||
background: #f5f7f9
|
|
||||||
margin: 0
|
|
||||||
@include radius(0 0 2px 2px)
|
|
||||||
button
|
|
||||||
margin: 0 4px 0 0
|
|
||||||
.ui-dialog-buttonset
|
|
||||||
float: left
|
|
||||||
.ui-button
|
|
||||||
margin-right: 4px
|
|
||||||
.ui-dialog-titlebar-close
|
|
||||||
padding: 0
|
|
||||||
.ui-icon-closethick
|
|
||||||
display: none
|
|
||||||
&:before
|
|
||||||
content: "×"
|
|
||||||
font-size: 18px
|
|
||||||
font-weight: bold
|
|
||||||
line-height: 16px
|
|
||||||
color: black
|
|
||||||
text-shadow: 0 1px 0 white
|
|
||||||
padding: 0
|
|
||||||
cursor: pointer
|
|
||||||
background: transparent
|
|
||||||
border: 0
|
|
||||||
&:hover
|
|
||||||
color: black
|
|
||||||
text-decoration: none
|
|
||||||
.oe_about
|
|
||||||
background-color: white
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=)
|
|
||||||
@include radius(0 0 2px 2px)
|
|
||||||
a
|
|
||||||
color: $link-color
|
|
||||||
&:hover
|
|
||||||
text-decoration: underline
|
|
||||||
&:focus
|
|
||||||
outline: none
|
|
||||||
.oe_logo
|
|
||||||
margin-left: -6px
|
|
||||||
.oe_bottom
|
|
||||||
position: absolute
|
|
||||||
top: 50%
|
|
||||||
left: 0
|
|
||||||
right: 0
|
|
||||||
bottom: 0
|
|
||||||
text-shadow: 0 1px 1px #999999
|
|
||||||
@include vertical-gradient(#b41616, #600606)
|
|
||||||
color: #eee
|
|
||||||
padding: 0 16px
|
|
||||||
@include radius(0 0 2px 2px)
|
|
||||||
a
|
|
||||||
color: #eee
|
|
||||||
|
|
||||||
&.ui-dialog.oe_act_window
|
|
||||||
.ui-dialog-content
|
|
||||||
padding: 0px
|
|
||||||
|
|
||||||
.modal-backdrop
|
|
||||||
position: fixed
|
|
||||||
top: 0
|
|
||||||
right: 0
|
|
||||||
bottom: 0
|
|
||||||
left: 0
|
|
||||||
z-index: 1040
|
|
||||||
background-color: black
|
|
||||||
@include opacity(.3)
|
|
||||||
|
|
||||||
// }}}
|
// }}}
|
||||||
// Generic classes {{{
|
// Generic classes {{{
|
||||||
.oe_i
|
.oe_i
|
||||||
|
@ -1031,10 +932,8 @@ $sheet-padding: 16px
|
||||||
margin-left: -6px
|
margin-left: -6px
|
||||||
.oe_bottom
|
.oe_bottom
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 50%
|
|
||||||
left: 0
|
left: 0
|
||||||
right: 0
|
right: 0
|
||||||
bottom: 0
|
|
||||||
text-shadow: 0 1px 1px #999999
|
text-shadow: 0 1px 1px #999999
|
||||||
@include vertical-gradient(#b41616, #600606)
|
@include vertical-gradient(#b41616, #600606)
|
||||||
color: #eee
|
color: #eee
|
||||||
|
@ -2765,9 +2664,6 @@ body.oe_single_form
|
||||||
> .arrow span
|
> .arrow span
|
||||||
background-color: #729fcf !important
|
background-color: #729fcf !important
|
||||||
|
|
||||||
// jquery ui for ie
|
|
||||||
.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='#D8D8D8')
|
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
// @media print {{{
|
// @media print {{{
|
||||||
|
@ -2812,6 +2708,21 @@ body.oe_single_form
|
||||||
height: 18px
|
height: 18px
|
||||||
// End hack}}}
|
// End hack}}}
|
||||||
|
|
||||||
|
// Customized modal according bootstrap3
|
||||||
|
.modal
|
||||||
|
.modal-header
|
||||||
|
button.close
|
||||||
|
border: none
|
||||||
|
background: none
|
||||||
|
padding: 1px
|
||||||
|
height: 18px
|
||||||
|
font-size: 20px
|
||||||
|
.modal-footer
|
||||||
|
text-align: left
|
||||||
|
&.oe_act_window
|
||||||
|
.modal-body
|
||||||
|
padding: 0
|
||||||
|
|
||||||
input[type="radio"], input[type="checkbox"]
|
input[type="radio"], input[type="checkbox"]
|
||||||
margin-right: 4px
|
margin-right: 4px
|
||||||
margin-left: 4px
|
margin-left: 4px
|
||||||
|
|
|
@ -56,16 +56,6 @@ instance.web.action_warn = function(element, action) {
|
||||||
};
|
};
|
||||||
instance.web.client_actions.add("action_warn", "instance.web.action_warn");
|
instance.web.client_actions.add("action_warn", "instance.web.action_warn");
|
||||||
|
|
||||||
/**
|
|
||||||
* The very minimal function everything should call to create a dialog
|
|
||||||
* in OpenERP Web Client.
|
|
||||||
*/
|
|
||||||
instance.web.dialog = function(element) {
|
|
||||||
var result = element.dialog.apply(element, _.rest(_.toArray(arguments)));
|
|
||||||
result.dialog("widget").openerpClass();
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A useful class to handle dialogs.
|
A useful class to handle dialogs.
|
||||||
|
|
||||||
|
@ -91,10 +81,11 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
*/
|
*/
|
||||||
init: function (parent, options, content) {
|
init: function (parent, options, content) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
this.css_layout_outer = ['width','min_width','max_width'];
|
||||||
|
this.css_layout_inner = ['height','min_height','max_height'];
|
||||||
this._super(parent);
|
this._super(parent);
|
||||||
this.content_to_set = content;
|
this.content_to_set = content;
|
||||||
this.dialog_options = {
|
this.dialog_options = {
|
||||||
modal: true,
|
|
||||||
destroy_on_close: true,
|
destroy_on_close: true,
|
||||||
width: 900,
|
width: 900,
|
||||||
min_width: 0,
|
min_width: 0,
|
||||||
|
@ -102,18 +93,14 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
min_height: 0,
|
min_height: 0,
|
||||||
max_height: $(window.top).height() - 200,
|
max_height: $(window.top).height() - 200,
|
||||||
autoOpen: false,
|
resizable: true,
|
||||||
position: [false, 40],
|
|
||||||
buttons: null,
|
buttons: null,
|
||||||
resizeStop: function() {
|
|
||||||
self.trigger("resized");
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
if (options) {
|
if (options) {
|
||||||
_.extend(this.dialog_options, options);
|
_.extend(this.dialog_options, options);
|
||||||
}
|
}
|
||||||
this.on("closing", this, this._closing);
|
this.on("closing", this, this._closing);
|
||||||
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><span class="oe_dialog_custom_buttons"/></div>');
|
this.$buttons = $('<div class="modal-footer"><span class="oe_dialog_custom_buttons"/></div>');
|
||||||
},
|
},
|
||||||
_get_options: function() {
|
_get_options: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -133,6 +120,20 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
o[unit] = o['max_' + unit];
|
o[unit] = o['max_' + unit];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var layout_inner = {};
|
||||||
|
var layout_outer = {};
|
||||||
|
_.each(o, function(value,key){
|
||||||
|
if (_.contains(self.css_layout_inner, ''+key+'')){
|
||||||
|
layout_inner[key] = value;
|
||||||
|
delete o[key];
|
||||||
|
}
|
||||||
|
if (_.contains(self.css_layout_outer, ''+key+'')){
|
||||||
|
layout_outer[key] = value;
|
||||||
|
delete o[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
o.layout_inner = layout_inner;
|
||||||
|
o.layout_outer = layout_outer;
|
||||||
o.title = o.title || this.dialog_title;
|
o.title = o.title || this.dialog_title;
|
||||||
return o;
|
return o;
|
||||||
},
|
},
|
||||||
|
@ -162,8 +163,7 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
if (!this.dialog_inited) {
|
if (!this.dialog_inited) {
|
||||||
this.init_dialog();
|
this.init_dialog();
|
||||||
}
|
}
|
||||||
this.$el.dialog('open');
|
this.$buttons.insertAfter(this.$dialog_box.find(".modal-body"));
|
||||||
this.$el.dialog("widget").append(this.$buttons);
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
_add_buttons: function(buttons) {
|
_add_buttons: function(buttons) {
|
||||||
|
@ -188,16 +188,49 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
@return The result returned by start().
|
@return The result returned by start().
|
||||||
*/
|
*/
|
||||||
init_dialog: function() {
|
init_dialog: function() {
|
||||||
|
var self = this;
|
||||||
var options = this._get_options();
|
var options = this._get_options();
|
||||||
if (options.buttons) {
|
if (options.buttons) {
|
||||||
this._add_buttons(options.buttons);
|
this._add_buttons(options.buttons);
|
||||||
delete(options.buttons);
|
delete(options.buttons);
|
||||||
}
|
}
|
||||||
this.renderElement();
|
this.renderElement();
|
||||||
instance.web.dialog(this.$el, options);
|
|
||||||
if (options.height === 'auto' && options.max_height) {
|
this.$dialog_box = $(QWeb.render('Dialog', options)).appendTo("body");
|
||||||
this.$el.css({ 'max-height': options.max_height, 'overflow-y': 'auto' });
|
this.$el.modal({
|
||||||
|
'backdrop': false,
|
||||||
|
'keyboard': true,
|
||||||
|
});
|
||||||
|
this.$el.appendTo(this.$dialog_box.find(".modal-body"));
|
||||||
|
var dialog_body = this.$dialog_box.find('.modal-content');
|
||||||
|
if (options.layout_outer || options.layout_inner){
|
||||||
|
dialog_body.parent().css(options.layout_outer);
|
||||||
|
dialog_body.css(options.layout_inner);
|
||||||
}
|
}
|
||||||
|
if (options.dialogClass){
|
||||||
|
dialog_body.find(".modal-body").addClass(options.dialogClass);
|
||||||
|
}
|
||||||
|
dialog_body.openerpClass();
|
||||||
|
dialog_body.draggable({ handle: ".modal-header", containment: "window" });
|
||||||
|
this.$dialog_box.on('hidden.bs.modal',this,function(){
|
||||||
|
self.trigger("closing");
|
||||||
|
});
|
||||||
|
this.$dialog_box.modal('show');
|
||||||
|
|
||||||
|
if (options.layout_inner.height === 'auto' && options.layout_inner.max_height) {
|
||||||
|
this.$el.css({ 'max-height': options.layout_inner.max_height, 'overflow-y': 'auto' });
|
||||||
|
}
|
||||||
|
var dialog_body = this.$dialog_box.find('.modal-content');
|
||||||
|
if (options.resizable){
|
||||||
|
dialog_body.resizable({ handles: 'n, e, s, w, ne, se, sw, nw' });
|
||||||
|
}
|
||||||
|
dialog_body.resize(function() {
|
||||||
|
var main_modal = dialog_body.parent();
|
||||||
|
var modal_body = main_modal.find(".modal-body .in");
|
||||||
|
var modal_content = main_modal.find(".modal-content").height();
|
||||||
|
modal_body.height(modal_content - 150);
|
||||||
|
main_modal.find(".modal-content").height((modal_body.height() + main_modal.find(".modal-header").height() + main_modal.find(".modal-footer").height()) + 85);
|
||||||
|
});
|
||||||
this.dialog_inited = true;
|
this.dialog_inited = true;
|
||||||
var res = this.start();
|
var res = this.start();
|
||||||
return res;
|
return res;
|
||||||
|
@ -206,9 +239,8 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
Closes the popup, if destroy_on_close was passed to the constructor, it is also destroyed.
|
Closes the popup, if destroy_on_close was passed to the constructor, it is also destroyed.
|
||||||
*/
|
*/
|
||||||
close: function(reason) {
|
close: function(reason) {
|
||||||
if (this.dialog_inited && this.$el.is(":data(dialog)")) {
|
if (this.dialog_inited && this.$el.is(":data(bs.modal)")) {
|
||||||
this.trigger("closing", reason);
|
this.$el.parents('.modal').modal('hide');
|
||||||
this.$el.dialog('close');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_closing: function() {
|
_closing: function() {
|
||||||
|
@ -233,8 +265,8 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
this.close(reason);
|
this.close(reason);
|
||||||
this.__tmp_dialog_destroying = undefined;
|
this.__tmp_dialog_destroying = undefined;
|
||||||
}
|
}
|
||||||
if (this.dialog_inited && !this.isDestroyed() && this.$el.is(":data(dialog)")) {
|
if (this.dialog_inited && !this.isDestroyed() && this.$el.is(":data(bs.modal)")) {
|
||||||
this.$el.dialog('destroy');
|
this.$el.parents('.modal').remove();
|
||||||
}
|
}
|
||||||
this._super();
|
this._super();
|
||||||
}
|
}
|
||||||
|
@ -272,12 +304,12 @@ instance.web.CrashManager = instance.web.Class.extend({
|
||||||
if (error.data.exception_type === "except_osv") {
|
if (error.data.exception_type === "except_osv") {
|
||||||
error = _.extend({}, error, {data: _.extend({}, error.data, {message: error.data.arguments[0] + "\n\n" + error.data.arguments[1]})});
|
error = _.extend({}, error, {data: _.extend({}, error.data, {message: error.data.arguments[0] + "\n\n" + error.data.arguments[1]})});
|
||||||
}
|
}
|
||||||
instance.web.dialog($('<div>' + QWeb.render('CrashManager.warning', {error: error}) + '</div>'), {
|
new instance.web.Dialog(this, {
|
||||||
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
|
{text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }}
|
||||||
]
|
],
|
||||||
});
|
}, $('<div>' + QWeb.render('CrashManager.warning', {error: error}) + '</div>')).open();
|
||||||
},
|
},
|
||||||
show_error: function(error) {
|
show_error: function(error) {
|
||||||
if (!this.active) {
|
if (!this.active) {
|
||||||
|
@ -285,17 +317,13 @@ instance.web.CrashManager = instance.web.Class.extend({
|
||||||
}
|
}
|
||||||
var buttons = {};
|
var buttons = {};
|
||||||
buttons[_t("Ok")] = function() {
|
buttons[_t("Ok")] = function() {
|
||||||
$(this).dialog("close");
|
this.parents('.modal').modal('hide');
|
||||||
};
|
};
|
||||||
var dialog = new instance.web.Dialog(this, {
|
new instance.web.Dialog(this, {
|
||||||
title: "OpenERP " + _.str.capitalize(error.type),
|
title: "OpenERP " + _.str.capitalize(error.type),
|
||||||
width: '80%',
|
width: '80%',
|
||||||
height: '50%',
|
|
||||||
min_width: '800px',
|
|
||||||
min_height: '600px',
|
|
||||||
buttons: buttons
|
buttons: buttons
|
||||||
}).open();
|
}, QWeb.render('CrashManager.error', {session: instance.session, error: error})).open();
|
||||||
dialog.$el.html(QWeb.render('CrashManager.error', {session: instance.session, error: error}));
|
|
||||||
},
|
},
|
||||||
show_message: function(exception) {
|
show_message: function(exception) {
|
||||||
this.show_error({
|
this.show_error({
|
||||||
|
@ -342,16 +370,16 @@ instance.web.RedirectWarningHandler = instance.web.Dialog.extend(instance.web.Ex
|
||||||
error = this.error;
|
error = this.error;
|
||||||
error.data.message = error.data.arguments[0];
|
error.data.message = error.data.arguments[0];
|
||||||
|
|
||||||
instance.web.dialog($('<div>' + QWeb.render('CrashManager.warning', {error: error}) + '</div>'), {
|
new instance.web.Dialog(this, {
|
||||||
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }},
|
{text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }},
|
||||||
{text: error.data.arguments[2], click: function() {
|
{text: error.data.arguments[2], click: function() {
|
||||||
window.location.href='#action='+error.data.arguments[1];
|
window.location.href='#action='+error.data.arguments[1];
|
||||||
$(this).dialog("close");
|
this.$el.parents('.modal').modal('hide');
|
||||||
}}
|
}}
|
||||||
]
|
],
|
||||||
});
|
}, QWeb.render('CrashManager.warning', {error: error}));
|
||||||
this.destroy();
|
this.destroy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -498,13 +526,12 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
||||||
* @param {String} error.error message of the error dialog
|
* @param {String} error.error message of the error dialog
|
||||||
*/
|
*/
|
||||||
display_error: function (error) {
|
display_error: function (error) {
|
||||||
return instance.web.dialog($('<div>'), {
|
return new instance.web.Dialog(this, {
|
||||||
modal: true,
|
|
||||||
title: error.title,
|
title: error.title,
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
|
{text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }}
|
||||||
]
|
]
|
||||||
}).html(error.error);
|
}, $('<div>').html(error.error)).open();
|
||||||
},
|
},
|
||||||
do_create: function(form) {
|
do_create: function(form) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -731,13 +758,12 @@ instance.web.ChangePassword = instance.web.Widget.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
display_error: function (error) {
|
display_error: function (error) {
|
||||||
return instance.web.dialog($('<div>'), {
|
return new instance.web.Dialog(this, {
|
||||||
modal: true,
|
|
||||||
title: error.title,
|
title: error.title,
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
|
{text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }}
|
||||||
]
|
]
|
||||||
}).html(error.error);
|
}, $('<div>').html(error.error)).open();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
instance.web.client_actions.add("change_password", "instance.web.ChangePassword");
|
instance.web.client_actions.add("change_password", "instance.web.ChangePassword");
|
||||||
|
@ -1052,8 +1078,11 @@ instance.web.UserMenu = instance.web.Widget.extend({
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
window.location = $.param.querystring( window.location.href, 'debug');
|
window.location = $.param.querystring( window.location.href, 'debug');
|
||||||
});
|
});
|
||||||
instance.web.dialog($help, {autoOpen: true,
|
new instance.web.Dialog(this, {
|
||||||
modal: true, width: 507, height: 290, resizable: false, title: _t("About")});
|
resizable: false,
|
||||||
|
title: _t("About"),
|
||||||
|
width: 507, height: 290,
|
||||||
|
}, $help).open();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -46,7 +46,6 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
||||||
start: function() {
|
start: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
self.$el.removeClass('ui-dialog-content ui-widget-content');
|
|
||||||
|
|
||||||
var got_fields = new $.Deferred();
|
var got_fields = new $.Deferred();
|
||||||
this.$el.find('#import_compat').change(function() {
|
this.$el.find('#import_compat').change(function() {
|
||||||
|
@ -413,7 +412,6 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
this.$el.remove();
|
|
||||||
this._super();
|
this._super();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -586,13 +586,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
this._internal_set_values(result.value, processed);
|
this._internal_set_values(result.value, processed);
|
||||||
}
|
}
|
||||||
if (!_.isEmpty(result.warning)) {
|
if (!_.isEmpty(result.warning)) {
|
||||||
instance.web.dialog($(QWeb.render("CrashManager.warning", result.warning)), {
|
new instance.web.Dialog(this, {
|
||||||
title:result.warning.title,
|
title:result.warning.title,
|
||||||
modal: true,
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
|
{text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }}
|
||||||
]
|
]
|
||||||
});
|
}, QWeb.render("CrashManager.warning", result.warning)).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $.Deferred().resolve();
|
return $.Deferred().resolve();
|
||||||
|
@ -1080,7 +1079,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.value();
|
.value();
|
||||||
|
|
||||||
var d = new instance.web.Dialog(this, {
|
var d = new instance.web.Dialog(this, {
|
||||||
title: _t("Set Default"),
|
title: _t("Set Default"),
|
||||||
args: {
|
args: {
|
||||||
|
@ -1956,26 +1954,23 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
|
||||||
var exec_action = function() {
|
var exec_action = function() {
|
||||||
if (self.node.attrs.confirm) {
|
if (self.node.attrs.confirm) {
|
||||||
var def = $.Deferred();
|
var def = $.Deferred();
|
||||||
var dialog = instance.web.dialog($('<div/>').text(self.node.attrs.confirm), {
|
var dialog = instance.web.Dialog(this, {
|
||||||
title: _t('Confirm'),
|
title: _t('Confirm'),
|
||||||
modal: true,
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Cancel"), click: function() {
|
{text: _t("Cancel"), click: function() {
|
||||||
$(this).dialog("close");
|
this.parents('.modal').modal('hide');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{text: _t("Ok"), click: function() {
|
{text: _t("Ok"), click: function() {
|
||||||
var self2 = this;
|
var self2 = this;
|
||||||
self.on_confirmed().always(function() {
|
self.on_confirmed().always(function() {
|
||||||
$(self2).dialog("close");
|
self2.parents('.modal').modal('hide');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeClose: function() {
|
}, $('<div/>').text(self.node.attrs.confirm)).open();
|
||||||
def.resolve();
|
dialog.on("closing", null, function() {def.resolve();});
|
||||||
},
|
|
||||||
});
|
|
||||||
return def.promise();
|
return def.promise();
|
||||||
} else {
|
} else {
|
||||||
return self.on_confirmed();
|
return self.on_confirmed();
|
||||||
|
@ -3302,7 +3297,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
||||||
delete this.$drop_down;
|
delete this.$drop_down;
|
||||||
}
|
}
|
||||||
if (this.$input) {
|
if (this.$input) {
|
||||||
this.$input.closest(".ui-dialog .ui-dialog-content").off('scroll');
|
this.$input.closest(".modal .modal-content").off('scroll');
|
||||||
this.$input.off('keyup blur autocompleteclose autocompleteopen ' +
|
this.$input.off('keyup blur autocompleteclose autocompleteopen ' +
|
||||||
'focus focusout change keydown');
|
'focus focusout change keydown');
|
||||||
delete this.$input;
|
delete this.$input;
|
||||||
|
@ -3395,7 +3390,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
||||||
self.$input.autocomplete("close");
|
self.$input.autocomplete("close");
|
||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
this.$input.closest(".ui-dialog .ui-dialog-content").on('scroll', this, close_autocomplete);
|
this.$input.closest(".modal .modal-content").on('scroll', this, close_autocomplete);
|
||||||
|
|
||||||
self.ed_def = $.Deferred();
|
self.ed_def = $.Deferred();
|
||||||
self.uned_def = $.Deferred();
|
self.uned_def = $.Deferred();
|
||||||
|
@ -4919,11 +4914,11 @@ instance.web.form.AbstractFormPopup = instance.web.Widget.extend({
|
||||||
var dialog = new instance.web.Dialog(this, {
|
var dialog = new instance.web.Dialog(this, {
|
||||||
min_width: '800px',
|
min_width: '800px',
|
||||||
dialogClass: 'oe_act_window',
|
dialogClass: 'oe_act_window',
|
||||||
close: function() {
|
|
||||||
self.check_exit(true);
|
|
||||||
},
|
|
||||||
title: this.options.title || "",
|
title: this.options.title || "",
|
||||||
}, this.$el).open();
|
}, this.$el).open();
|
||||||
|
dialog.on('closing', this, function (e){
|
||||||
|
self.check_exit(true);
|
||||||
|
});
|
||||||
this.$buttonpane = dialog.$buttons;
|
this.$buttonpane = dialog.$buttons;
|
||||||
this.start();
|
this.start();
|
||||||
},
|
},
|
||||||
|
@ -4970,6 +4965,7 @@ instance.web.form.AbstractFormPopup = instance.web.Widget.extend({
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
var $cbutton = self.$buttonpane.find(".oe_abstractformpopup-form-close");
|
var $cbutton = self.$buttonpane.find(".oe_abstractformpopup-form-close");
|
||||||
|
// $cbutton = $cbutton.add(self.$el.parents('.modal:first').find('.close')[0]);
|
||||||
$cbutton.click(function() {
|
$cbutton.click(function() {
|
||||||
self.view_form.trigger('on_button_cancel');
|
self.view_form.trigger('on_button_cancel');
|
||||||
self.check_exit();
|
self.check_exit();
|
||||||
|
@ -4990,8 +4986,8 @@ instance.web.form.AbstractFormPopup = instance.web.Widget.extend({
|
||||||
},
|
},
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
this.trigger('closed');
|
this.trigger('closed');
|
||||||
if (this.$el.is(":data(dialog)")) {
|
if (this.$el.is(":data(bs.modal)")) {
|
||||||
this.$el.dialog('close');
|
this.$el.parents('.modal').modal('hide');
|
||||||
}
|
}
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
|
@ -410,10 +410,10 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||||
}
|
}
|
||||||
this.dialog_stop(executor.action);
|
this.dialog_stop(executor.action);
|
||||||
this.dialog = new instance.web.Dialog(this, {
|
this.dialog = new instance.web.Dialog(this, {
|
||||||
|
title: executor.action.name,
|
||||||
dialogClass: executor.klass,
|
dialogClass: executor.klass,
|
||||||
});
|
});
|
||||||
this.dialog.on("closing", null, options.on_close);
|
this.dialog.on("closing", null, options.on_close);
|
||||||
this.dialog.dialog_title = executor.action.name;
|
|
||||||
if (widget instanceof instance.web.ViewManager) {
|
if (widget instanceof instance.web.ViewManager) {
|
||||||
_.extend(widget.flags, {
|
_.extend(widget.flags, {
|
||||||
$buttons: this.dialog.$buttons,
|
$buttons: this.dialog.$buttons,
|
||||||
|
@ -1223,7 +1223,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
||||||
domain = $.Deferred().resolve(undefined);
|
domain = $.Deferred().resolve(undefined);
|
||||||
}
|
}
|
||||||
if (ids.length === 0) {
|
if (ids.length === 0) {
|
||||||
instance.web.dialog($("<div />").text(_t("You must choose at least one record.")), { title: _t("Warning"), modal: true });
|
new instance.web.Dialog(this, { title: _t("Warning")}, $("<div />").text(_t("You must choose at least one record."))).open();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var active_ids_context = {
|
var active_ids_context = {
|
||||||
|
|
|
@ -32,7 +32,20 @@
|
||||||
<t t-esc="message"/>
|
<t t-esc="message"/>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
<t t-name="Dialog">
|
||||||
|
<div class="modal" tabindex="-1" data-backdrop="static" role="dialog" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 class="modal-title"><t t-raw="title"/></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
<t t-name="CrashManager.warning">
|
<t t-name="CrashManager.warning">
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
|
<table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -101,7 +101,6 @@ instance.web.DiagramView = instance.web.View.extend({
|
||||||
params['connectors_fields'].push(self.fields[conn.attrs.name]['string']|| this.toTitleCase(conn.attrs.name));
|
params['connectors_fields'].push(self.fields[conn.attrs.name]['string']|| this.toTitleCase(conn.attrs.name));
|
||||||
params['connectors'].push(conn.attrs.name);
|
params['connectors'].push(conn.attrs.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.rpc(
|
this.rpc(
|
||||||
'/web_diagram/diagram/get_diagram_info',params).done(function(result) {
|
'/web_diagram/diagram/get_diagram_info',params).done(function(result) {
|
||||||
self.draw_diagram(result);
|
self.draw_diagram(result);
|
||||||
|
@ -179,11 +178,6 @@ instance.web.DiagramView = instance.web.View.extend({
|
||||||
var r = new Raphael(canvas, '100%','100%');
|
var r = new Raphael(canvas, '100%','100%');
|
||||||
|
|
||||||
var graph = new CuteGraph(r,style,canvas.parentNode);
|
var graph = new CuteGraph(r,style,canvas.parentNode);
|
||||||
|
|
||||||
var confirm_dialog = $('#dialog').dialog({
|
|
||||||
autoOpen: false,
|
|
||||||
title: _t("Are you sure?") });
|
|
||||||
|
|
||||||
|
|
||||||
_.each(res_nodes, function(node) {
|
_.each(res_nodes, function(node) {
|
||||||
var n = new CuteNode(
|
var n = new CuteNode(
|
||||||
|
@ -344,7 +338,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
||||||
});
|
});
|
||||||
// We want to destroy the dummy edge after a creation cancel. This destroys it even if we save the changes.
|
// We want to destroy the dummy edge after a creation cancel. This destroys it even if we save the changes.
|
||||||
// This is not a problem since the diagram is completely redrawn on saved changes.
|
// This is not a problem since the diagram is completely redrawn on saved changes.
|
||||||
pop.$el.bind("dialogbeforeclose",function(){
|
pop.$el.parents('.modal').on('hidden.bs.modal', function (e){
|
||||||
if(dummy_cuteedge){
|
if(dummy_cuteedge){
|
||||||
dummy_cuteedge.remove();
|
dummy_cuteedge.remove();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue