[merge] merge proposal soon refused
bzr revid: ahu@openerp.com-20111222141625-vo57xyuhdhznnums
This commit is contained in:
+7
-7
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
|
||||
"PO-Revision-Date: 2011-12-19 16:04+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 15:10+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-21 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14538)\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:32+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#: addons/web/static/src/js/chrome.js:162
|
||||
#: addons/web/static/src/js/chrome.js:175
|
||||
@@ -125,11 +125,11 @@ msgstr "nije ispravan broj"
|
||||
|
||||
#: addons/web/static/src/js/search.js:898
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
msgstr "Da"
|
||||
|
||||
#: addons/web/static/src/js/search.js:899
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
msgstr "Ne"
|
||||
|
||||
#: addons/web/static/src/js/search.js:1252
|
||||
msgid "contains"
|
||||
@@ -826,11 +826,11 @@ msgstr ""
|
||||
|
||||
#: addons/web/static/src/xml/base.xml:0
|
||||
msgid "Title of new Dashboard item:"
|
||||
msgstr ""
|
||||
msgstr "Naslov novog prikaza"
|
||||
|
||||
#: addons/web/static/src/xml/base.xml:0
|
||||
msgid "Advanced Filters"
|
||||
msgstr ""
|
||||
msgstr "Napredni filteri"
|
||||
|
||||
#: addons/web/static/src/xml/base.xml:0
|
||||
msgid "Any of the following conditions must match"
|
||||
|
||||
@@ -92,12 +92,6 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio
|
||||
.openerp .login {
|
||||
display: none;
|
||||
}
|
||||
.openerp .login form {
|
||||
float: left;
|
||||
width: 420px;
|
||||
margin-left: 40px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
.openerp .login fieldset {
|
||||
padding-bottom: 5px;
|
||||
min-width: 100px;
|
||||
@@ -137,19 +131,27 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio
|
||||
}
|
||||
.openerp .login .login_error_message {
|
||||
display: none;
|
||||
background-color: #9A0404;
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
color: white;
|
||||
background-color: #b41616;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
|
||||
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
|
||||
filter: alpha(opacity=95);
|
||||
-khtml-opacity: 0.95;
|
||||
-moz-opacity: 0.95;
|
||||
color: #eee;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 8px 12px;
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
.openerp .login .login_invalid {
|
||||
text-align: center;
|
||||
}
|
||||
.openerp .login .login_invalid .login_error_message {
|
||||
display: block;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.openerp.login-mode .login-container {
|
||||
@@ -161,6 +163,8 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio
|
||||
.openerp.login-mode .menu,
|
||||
.openerp.login-mode .secondary_menu,
|
||||
.openerp.login-mode .oe-application,
|
||||
.openerp.login-mode .oe_footer,
|
||||
.openerp.login-mode .header,
|
||||
.openerp.login-mode .db_options_row {
|
||||
display: none;
|
||||
}
|
||||
@@ -244,6 +248,9 @@ label.error {
|
||||
height: 100%;
|
||||
background: #f0eeee;
|
||||
}
|
||||
.openerp .oe-application {
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe-application-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -551,8 +558,7 @@ label.error {
|
||||
|
||||
|
||||
/* Main Application */
|
||||
.openerp .oe-main-content,
|
||||
.openerp .oe-application {
|
||||
.openerp .oe-main-content {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -891,6 +897,10 @@ label.error {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.openerp .oe-listview th.oe-actions {
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
@@ -922,6 +932,7 @@ label.error {
|
||||
.openerp .oe_button.oe_button_pager:disabled {
|
||||
padding: 0 3px 0 3px;
|
||||
margin: 0;
|
||||
height: 17px;
|
||||
}
|
||||
.openerp .oe-listview .oe-group-name {
|
||||
padding-right: 1em;
|
||||
@@ -1121,6 +1132,9 @@ label.error {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
}
|
||||
.openerp .oe_tooltip_help {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.openerp .oe_tooltip_technical {
|
||||
padding: 0 0 4px 0;
|
||||
margin: 5px 0 0 15px;
|
||||
@@ -1411,8 +1425,11 @@ label.error {
|
||||
border-spacing: 4px;
|
||||
}
|
||||
.openerp .ui-widget-header {
|
||||
background-image: none;
|
||||
background-color: white;
|
||||
background: white none;
|
||||
}
|
||||
/* progress bars */
|
||||
.openerp .ui-progressbar .ui-widget-header {
|
||||
background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
|
||||
}
|
||||
|
||||
.openerp tfoot.ui-widget-header .oe-list-footer { /* adding some space to the footer */
|
||||
@@ -1883,9 +1900,10 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
|
||||
padding: 0;
|
||||
border-bottom: 1px solid #CFCCCC;
|
||||
}
|
||||
.openerp .oe_view_editor_row:hover{
|
||||
.openerp .oe_view_editor_row:hover {
|
||||
background-color: #F3F3F3;
|
||||
}
|
||||
|
||||
.openerp .oe_view_editor_tree_grid{
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
@@ -1899,6 +1917,12 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.openerp .oe_applications_tiles {
|
||||
color: #4C4C4C;
|
||||
text-shadow: #EEE 0 1px 0;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch {
|
||||
margin:2px 0 0 0;
|
||||
}
|
||||
@@ -2091,3 +2115,154 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
|
||||
cursor: default;
|
||||
text-shadow: 0 1px 1px white !important;
|
||||
}
|
||||
|
||||
/* Login page */
|
||||
|
||||
.login {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: "Lucida Grande", Helvetica, Verdana, Arial;
|
||||
background: url("/web/static/src/img/pattern.png") repeat;
|
||||
color: #eee;
|
||||
font-size: 14px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login ul, ol {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login li {
|
||||
list-style-type: none;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.login a {
|
||||
color: #eee;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.login button {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 6px 16px;
|
||||
font-size: 13px;
|
||||
font-family: "Lucida Grande", Helvetica, Verdana, Arial;
|
||||
border: 1px solid #222222;
|
||||
color: white;
|
||||
margin: 0;
|
||||
background: #600606;
|
||||
background: -moz-linear-gradient(#b92020, #600606);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(155, 155, 155, 0.4) inset;
|
||||
-o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
|
||||
}
|
||||
|
||||
.login input, #oe_login select {
|
||||
width: 250px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
padding: 5px 6px;
|
||||
border: 1px solid #999999;
|
||||
background: whitesmoke;
|
||||
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
-webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.login .dbpane {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 8px;
|
||||
padding: 6px 12px 0px;
|
||||
color: #eee;
|
||||
border: solid 1px #333;
|
||||
background: #101010;
|
||||
filter: alpha(opacity=95);
|
||||
-khtml-opacity: 0.95;
|
||||
-moz-opacity: 0.95;
|
||||
opacity: 0.95;
|
||||
-moz-border-radius: 0 0 8px 8px;
|
||||
-webkit-border-radius: 0 0 8px 8px;
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
.login .bottom {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-shadow: 0 1px 1px #999999;
|
||||
background: #600606;
|
||||
background: -moz-linear-gradient(#b41616, #600606);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
|
||||
}
|
||||
|
||||
.login .pane {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -160px -166px;
|
||||
border: solid 1px #333333;
|
||||
background: #101010;
|
||||
padding: 20px 32px;
|
||||
text-align: left;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
-moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
|
||||
-webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
|
||||
-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
|
||||
filter: alpha(opacity=95);
|
||||
-khtml-opacity: 0.95;
|
||||
-moz-opacity: 0.95;
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
.login .pane h2 {
|
||||
margin-top: 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.login #logo {
|
||||
position: absolute;
|
||||
top: -70px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login .footer {
|
||||
position: absolute;
|
||||
bottom: -40px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login .footer a {
|
||||
font-size: 13px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.login .footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.login .openerp {
|
||||
font-weight: bold;
|
||||
font-family: serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 98 B |
@@ -51,15 +51,19 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
|
||||
this._super(parent);
|
||||
this.dialog_options = {
|
||||
modal: true,
|
||||
width: 'auto',
|
||||
destroy_on_close: true,
|
||||
width: $(window).width() * (($(window).width() > 1024) ? 0.5 : 0.75),
|
||||
min_width: 0,
|
||||
max_width: '100%',
|
||||
max_width: '95%',
|
||||
height: 'auto',
|
||||
min_height: 0,
|
||||
max_height: '100%',
|
||||
max_height: '95%',
|
||||
autoOpen: false,
|
||||
position: [false, 50],
|
||||
autoResize : 'auto',
|
||||
buttons: {},
|
||||
beforeClose: function () { self.on_close(); }
|
||||
beforeClose: function () { self.on_close(); },
|
||||
resizeStop: this.on_resized
|
||||
};
|
||||
for (var f in this) {
|
||||
if (f.substr(0, 10) == 'on_button_') {
|
||||
@@ -77,7 +81,7 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
|
||||
options.max_width = this.get_width(options.max_width || this.dialog_options.max_width);
|
||||
options.height = this.get_height(options.height || this.dialog_options.height);
|
||||
options.min_height = this.get_height(options.min_height || this.dialog_options.min_height);
|
||||
options.max_height = this.get_height(options.max_height || this.dialog_options.max_width);
|
||||
options.max_height = this.get_height(options.max_height || this.dialog_options.max_height);
|
||||
|
||||
if (options.width !== 'auto') {
|
||||
if (options.width > options.max_width) options.width = options.max_width;
|
||||
@@ -108,7 +112,7 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
|
||||
}
|
||||
},
|
||||
start: function () {
|
||||
this.$dialog = $(this.$element).dialog(this.dialog_options);
|
||||
this.$element.dialog(this.dialog_options);
|
||||
this._super();
|
||||
return this;
|
||||
},
|
||||
@@ -118,19 +122,26 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
|
||||
this.$element.html(this.render());
|
||||
}
|
||||
this.set_options(dialog_options);
|
||||
this.$dialog.dialog(this.dialog_options).dialog('open');
|
||||
this.$element.dialog(this.dialog_options).dialog('open');
|
||||
return this;
|
||||
},
|
||||
close: function() {
|
||||
// Closes the dialog but leave it in a state where it could be opened again.
|
||||
this.$dialog.dialog('close');
|
||||
this.$element.dialog('close');
|
||||
},
|
||||
on_close: function() {
|
||||
if (this.dialog_options.destroy_on_close) {
|
||||
this.$element.dialog('destroy');
|
||||
}
|
||||
},
|
||||
on_resized: function() {
|
||||
if (openerp.connection.debug) {
|
||||
console.log("Dialog resized to %d x %d", this.$element.width(), this.$element.height());
|
||||
}
|
||||
},
|
||||
stop: function () {
|
||||
// Destroy widget
|
||||
this.close();
|
||||
this.$dialog.dialog('destroy');
|
||||
this.$element.dialog('destroy');
|
||||
this._super();
|
||||
}
|
||||
});
|
||||
@@ -167,10 +178,6 @@ openerp.web.CrashManager = openerp.web.CallbackEnabled.extend({
|
||||
var dialog = new openerp.web.Dialog(this, {
|
||||
title: "OpenERP " + _.str.capitalize(error.type),
|
||||
autoOpen: true,
|
||||
width: '90%',
|
||||
height: '90%',
|
||||
min_width: '800px',
|
||||
min_height: '600px',
|
||||
buttons: [
|
||||
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
|
||||
]
|
||||
@@ -590,26 +597,29 @@ openerp.web.Login = openerp.web.Widget.extend(/** @lends openerp.web.Login# */{
|
||||
*/
|
||||
do_login: function (db, login, password) {
|
||||
var self = this;
|
||||
this.session.session_authenticate(db, login, password).then(function() {
|
||||
if(self.session.session_is_valid()) {
|
||||
if (self.has_local_storage) {
|
||||
if(self.remember_credentials) {
|
||||
localStorage.setItem('last_db_login_success', db);
|
||||
localStorage.setItem('last_login_login_success', login);
|
||||
if (jQuery.deparam(jQuery.param.querystring()).debug != undefined) {
|
||||
localStorage.setItem('last_password_login_success', password);
|
||||
}
|
||||
} else {
|
||||
localStorage.setItem('last_db_login_success', '');
|
||||
localStorage.setItem('last_login_login_success', '');
|
||||
localStorage.setItem('last_password_login_success', '');
|
||||
}
|
||||
}
|
||||
self.on_login_valid();
|
||||
} else {
|
||||
this.session.on_session_invalid.add({
|
||||
callback: function () {
|
||||
self.$element.addClass("login_invalid");
|
||||
self.on_login_invalid();
|
||||
},
|
||||
unique: true
|
||||
});
|
||||
this.session.session_authenticate(db, login, password).then(function() {
|
||||
self.$element.removeClass("login_invalid");
|
||||
if (self.has_local_storage) {
|
||||
if(self.remember_credentials) {
|
||||
localStorage.setItem('last_db_login_success', db);
|
||||
localStorage.setItem('last_login_login_success', login);
|
||||
if (jQuery.deparam(jQuery.param.querystring()).debug != undefined) {
|
||||
localStorage.setItem('last_password_login_success', password);
|
||||
}
|
||||
} else {
|
||||
localStorage.setItem('last_db_login_success', '');
|
||||
localStorage.setItem('last_login_login_success', '');
|
||||
localStorage.setItem('last_password_login_success', '');
|
||||
}
|
||||
}
|
||||
self.on_login_valid();
|
||||
});
|
||||
},
|
||||
do_ask_login: function(continuation) {
|
||||
@@ -621,7 +631,7 @@ openerp.web.Login = openerp.web.Widget.extend(/** @lends openerp.web.Login# */{
|
||||
unique: true,
|
||||
callback: continuation || function() {}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web.Header = openerp.web.Widget.extend(/** @lends openerp.web.Header# */{
|
||||
@@ -744,10 +754,8 @@ openerp.web.Header = openerp.web.Widget.extend(/** @lends openerp.web.Header# *
|
||||
});
|
||||
});
|
||||
this.dialog = new openerp.web.Dialog(this,{
|
||||
modal: true,
|
||||
title: _t("Preferences"),
|
||||
width: 600,
|
||||
height: 500,
|
||||
width: '700px',
|
||||
buttons: [
|
||||
{text: _t("Change password"), click: function(){ self.change_password(); }},
|
||||
{text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }},
|
||||
@@ -769,11 +777,9 @@ openerp.web.Header = openerp.web.Widget.extend(/** @lends openerp.web.Header# *
|
||||
|
||||
change_password :function() {
|
||||
var self = this;
|
||||
this.dialog = new openerp.web.Dialog(this,{
|
||||
modal : true,
|
||||
this.dialog = new openerp.web.Dialog(this, {
|
||||
title: _t("Change Password"),
|
||||
width : 'auto',
|
||||
height : 'auto'
|
||||
width : 'auto'
|
||||
});
|
||||
this.dialog.start().open();
|
||||
this.dialog.$element.html(QWeb.render("Change_Pwd", self));
|
||||
@@ -1035,7 +1041,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
|
||||
});
|
||||
},
|
||||
do_reload: function() {
|
||||
return $.when(this.session.session_init(),this.menu.do_reload());
|
||||
return this.session.session_init().pipe(_.bind(function() {this.menu.do_reload();}, this));
|
||||
},
|
||||
do_notify: function() {
|
||||
var n = this.notification;
|
||||
@@ -1083,7 +1089,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
|
||||
do_action: function(action) {
|
||||
var self = this;
|
||||
// TODO replace by client action menuclick
|
||||
if(action.type === "ir.ui.menu") {
|
||||
if(action.menu_id) {
|
||||
this.do_reload().then(function () {
|
||||
self.menu.on_menu_click(null, action.menu_id);
|
||||
});
|
||||
|
||||
@@ -15,10 +15,6 @@ openerp.web.DataExport = openerp.web.Dialog.extend({
|
||||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
this.open({
|
||||
modal: true,
|
||||
width: '55%',
|
||||
height: 'auto',
|
||||
position: 'top',
|
||||
buttons : [
|
||||
{text: _t("Close"), click: function() { self.close(); }},
|
||||
{text: _t("Export To File"), click: function() { self.on_click_export_data(); }}
|
||||
@@ -385,7 +381,7 @@ openerp.web.DataExport = openerp.web.Dialog.extend({
|
||||
});
|
||||
},
|
||||
close: function() {
|
||||
$(this.$dialog).remove();
|
||||
this.$element.remove();
|
||||
this._super();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -65,10 +65,6 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
|
||||
var self = this;
|
||||
this._super();
|
||||
this.open({
|
||||
modal: true,
|
||||
width: '70%',
|
||||
height: 'auto',
|
||||
position: 'top',
|
||||
buttons: [
|
||||
{text: _t("Close"), click: function() { self.stop(); }},
|
||||
{text: _t("Import File"), click: function() { self.do_import(); }, 'class': 'oe-dialog-import-button'}
|
||||
@@ -144,7 +140,7 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
|
||||
});
|
||||
},
|
||||
toggle_import_button: function (newstate) {
|
||||
this.$dialog.dialog('widget')
|
||||
this.$element.dialog('widget')
|
||||
.find('.oe-dialog-import-button')
|
||||
.button('option', 'disabled', !newstate);
|
||||
},
|
||||
@@ -352,7 +348,7 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
|
||||
return true;
|
||||
},
|
||||
stop: function() {
|
||||
$(this.$dialog).remove();
|
||||
this.$element.remove();
|
||||
this._super();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -252,14 +252,17 @@ openerp.web.format_cell = function (row_data, column, value_if_empty, process_mo
|
||||
}
|
||||
if (attrs.invisible) { return ''; }
|
||||
if (column.tag === 'button') {
|
||||
return [
|
||||
'<button type="button" title="', column.string || '', '">',
|
||||
'<img src="', openerp.connection.prefix, '/web/static/src/img/icons/', column.icon, '.png"',
|
||||
' alt="', column.string || '', '"/>',
|
||||
'</button>'
|
||||
].join('')
|
||||
return _.template('<button type="button" title="<%-title%>" <%=additional_attributes%> >' +
|
||||
'<img src="<%-prefix%>/web/static/src/img/icons/<%-icon%>.png" alt="<%-alt%>"/>' +
|
||||
'</button>', {
|
||||
title: column.string || '',
|
||||
additional_attributes: isNaN(row_data["id"].value) && openerp.web.BufferedDataSet.virtual_id_regex.test(row_data["id"].value) ?
|
||||
'disabled="disabled" class="oe-listview-button-disabled"' : '',
|
||||
prefix: openerp.connection.prefix,
|
||||
icon: column.icon,
|
||||
alt: column.string || '',
|
||||
});
|
||||
}
|
||||
|
||||
if (!row_data[column.id]) {
|
||||
return value_if_empty === undefined ? '' : value_if_empty;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({
|
||||
}
|
||||
};
|
||||
this.view_edit_dialog = new openerp.web.Dialog(this, {
|
||||
modal: true,
|
||||
title: _t("ViewEditor"),
|
||||
width: 750,
|
||||
height: 500,
|
||||
width: 850,
|
||||
buttons: [
|
||||
{text: _t("Create"), click: function() { self.on_create_view(); }},
|
||||
{text: _t("Edit"), click: function() { self.xml_element_id = 0; self.get_arch(); }},
|
||||
@@ -67,10 +65,7 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({
|
||||
on_create_view: function() {
|
||||
var self = this;
|
||||
this.create_view_dialog = new openerp.web.Dialog(this, {
|
||||
modal: true,
|
||||
title: _.str.sprintf(_t("Create a view (%s)"), self.model),
|
||||
width: 500,
|
||||
height: 400,
|
||||
buttons: [
|
||||
{text: _t("Save"), click: function () {
|
||||
var view_values = {};
|
||||
@@ -363,10 +358,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({
|
||||
var self = this;
|
||||
this.one_object = one_object;
|
||||
this.edit_xml_dialog = new openerp.web.Dialog(this, {
|
||||
modal: true,
|
||||
title: _.str.sprintf(_t("View Editor %d - %s"), self.main_view_id, self.model),
|
||||
width: 750,
|
||||
height: 500,
|
||||
height: '90%',
|
||||
buttons: [
|
||||
{text: _t("Preview"), click: function() {
|
||||
var action = {
|
||||
@@ -752,10 +745,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({
|
||||
on_edit_node: function(properties){
|
||||
var self = this;
|
||||
this.edit_node_dialog = new openerp.web.Dialog(this,{
|
||||
modal: true,
|
||||
title: _t("Properties"),
|
||||
width: 500,
|
||||
height: 400,
|
||||
width: 450,
|
||||
buttons: [
|
||||
{text: _t("Update"), click: function () {
|
||||
var warn = false, update_values = [];
|
||||
@@ -879,10 +870,8 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({
|
||||
{'name': 'position','selection': ['After','Before','Inside'], 'value': false, 'string': 'Position','type': 'selection'}];
|
||||
this.add_widget = [];
|
||||
this.add_node_dialog = new openerp.web.Dialog(this,{
|
||||
modal: true,
|
||||
title: _t("Properties"),
|
||||
width: 450,
|
||||
height: 190,
|
||||
buttons: [
|
||||
{text: _t("Update"), click: function() {
|
||||
var check_add_node = true, values = {};
|
||||
|
||||
@@ -22,6 +22,9 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||
* @param {openerp.web.Session} session the current openerp session
|
||||
* @param {openerp.web.DataSet} dataset the dataset this view will work with
|
||||
* @param {String} view_id the identifier of the OpenERP view object
|
||||
* @param {Object} options
|
||||
* - sidebar : [true|false]
|
||||
* - resize_textareas : [true|false|max_height]
|
||||
*
|
||||
* @property {openerp.web.Registry} registry=openerp.web.form.widgets widgets registry for this form view instance
|
||||
*/
|
||||
@@ -790,7 +793,7 @@ openerp.web.form.Widget = openerp.web.Widget.extend(/** @lends openerp.web.form.
|
||||
trigger = trigger || this.$element;
|
||||
options = _.extend({
|
||||
delay: 1000,
|
||||
maxWidth: openerp.connection.debug ? '300px' : '200px',
|
||||
maxWidth: '500px',
|
||||
content: function() {
|
||||
var template = widget.template + '.tooltip';
|
||||
if (!QWeb.has_template(template)) {
|
||||
@@ -1270,7 +1273,14 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f
|
||||
},
|
||||
reset: function() {
|
||||
this.dirty = false;
|
||||
}
|
||||
},
|
||||
get_definition_options: function() {
|
||||
if (!this.definition_options) {
|
||||
var str = this.node.attrs.options || '{}';
|
||||
this.definition_options = JSON.parse(str);
|
||||
}
|
||||
return this.definition_options;
|
||||
},
|
||||
});
|
||||
|
||||
openerp.web.form.FieldChar = openerp.web.form.Field.extend({
|
||||
@@ -1494,11 +1504,16 @@ openerp.web.form.FieldText = openerp.web.form.Field.extend({
|
||||
start: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('textarea').change(this.on_ui_change);
|
||||
this.resized = false;
|
||||
},
|
||||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
var show_value = openerp.web.format_value(value, this, '');
|
||||
this.$element.find('textarea').val(show_value);
|
||||
if (!this.resized && this.view.options.resize_textareas) {
|
||||
this.do_resize(this.view.options.resize_textareas);
|
||||
this.resized = true;
|
||||
}
|
||||
},
|
||||
update_dom: function() {
|
||||
this._super.apply(this, arguments);
|
||||
@@ -1519,6 +1534,29 @@ openerp.web.form.FieldText = openerp.web.form.Field.extend({
|
||||
},
|
||||
focus: function() {
|
||||
this.$element.find('textarea').focus();
|
||||
},
|
||||
do_resize: function(max_height) {
|
||||
max_height = parseInt(max_height, 10);
|
||||
var $input = this.$element.find('textarea'),
|
||||
$div = $('<div style="position: absolute; z-index: 1000; top: 0"/>').width($input.width()),
|
||||
new_height;
|
||||
$div.text($input.val());
|
||||
_.each('font-family,font-size,white-space'.split(','), function(style) {
|
||||
$div.css(style, $input.css(style));
|
||||
});
|
||||
$div.appendTo($('body'));
|
||||
new_height = $div.height();
|
||||
if (new_height < 90) {
|
||||
new_height = 90;
|
||||
}
|
||||
if (!isNaN(max_height) && new_height > max_height) {
|
||||
new_height = max_height;
|
||||
}
|
||||
$div.remove();
|
||||
$input.height(new_height);
|
||||
},
|
||||
reset: function() {
|
||||
this.resized = false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1675,8 +1713,8 @@ openerp.web.form.dialog = function(content, options) {
|
||||
}, options || {});
|
||||
options.autoOpen = true;
|
||||
var dialog = new openerp.web.Dialog(null, options);
|
||||
dialog.$dialog = $(content).dialog(dialog.dialog_options);
|
||||
return dialog.$dialog;
|
||||
dialog.$element = $(content).dialog(dialog.dialog_options);
|
||||
return dialog.$element;
|
||||
};
|
||||
|
||||
openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
|
||||
@@ -1718,7 +1756,14 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
|
||||
return;
|
||||
}
|
||||
var pop = new openerp.web.form.FormOpenPopup(self.view);
|
||||
pop.show_element(self.field.relation, self.value[0],self.build_context(), {});
|
||||
pop.show_element(
|
||||
self.field.relation,
|
||||
self.value[0],
|
||||
self.build_context(),
|
||||
{
|
||||
title: _t("Open: ") + (self.string || self.name)
|
||||
}
|
||||
);
|
||||
pop.on_write_completed.add_last(function() {
|
||||
self.set_value(self.value[0]);
|
||||
});
|
||||
@@ -1865,25 +1910,36 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
|
||||
},
|
||||
_quick_create: function(name) {
|
||||
var self = this;
|
||||
var dataset = new openerp.web.DataSetStatic(this, this.field.relation, self.build_context());
|
||||
dataset.name_create(name, function(data) {
|
||||
self._change_int_ext_value(data);
|
||||
}).fail(function(error, event) {
|
||||
event.preventDefault();
|
||||
var slow_create = function() {
|
||||
self._change_int_value(null);
|
||||
self._search_create_popup("form", undefined, {"default_name": name});
|
||||
});
|
||||
}
|
||||
if (self.get_definition_options().quick_create === undefined || self.get_definition_options().quick_create) {
|
||||
var dataset = new openerp.web.DataSetStatic(this, this.field.relation, self.build_context());
|
||||
dataset.name_create(name, function(data) {
|
||||
self._change_int_ext_value(data);
|
||||
}).fail(function(error, event) {
|
||||
event.preventDefault();
|
||||
slow_create();
|
||||
});
|
||||
} else
|
||||
slow_create();
|
||||
},
|
||||
// all search/create popup handling
|
||||
_search_create_popup: function(view, ids, context) {
|
||||
var self = this;
|
||||
var pop = new openerp.web.form.SelectCreatePopup(this);
|
||||
pop.select_element(self.field.relation,{
|
||||
pop.select_element(
|
||||
self.field.relation,
|
||||
{
|
||||
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + (this.string || this.name),
|
||||
initial_ids: ids ? _.map(ids, function(x) {return x[0]}) : undefined,
|
||||
initial_view: view,
|
||||
disable_multiple_selection: true
|
||||
}, self.build_domain(),
|
||||
new openerp.web.CompoundContext(self.build_context(), context || {}));
|
||||
},
|
||||
self.build_domain(),
|
||||
new openerp.web.CompoundContext(self.build_context(), context || {})
|
||||
);
|
||||
pop.on_select_elements.add(function(element_ids) {
|
||||
var dataset = new openerp.web.DataSetStatic(self, self.field.relation, self.build_context());
|
||||
dataset.name_get([element_ids[0]], function(data) {
|
||||
@@ -2085,13 +2141,11 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
|
||||
});
|
||||
this.views = views;
|
||||
|
||||
this.viewmanager = new openerp.web.ViewManager(this, this.dataset, views, {
|
||||
action_buttons : false
|
||||
});
|
||||
this.viewmanager = new openerp.web.ViewManager(this, this.dataset, views, {});
|
||||
this.viewmanager.template = 'One2Many.viewmanager';
|
||||
this.viewmanager.registry = openerp.web.views.clone({
|
||||
list: 'openerp.web.form.One2ManyListView',
|
||||
form: 'openerp.web.FormView',
|
||||
form: 'openerp.web.form.One2ManyFormView',
|
||||
page: 'openerp.web.PageView'
|
||||
});
|
||||
var once = $.Deferred().then(function() {
|
||||
@@ -2106,9 +2160,6 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
|
||||
if (self.is_readonly())
|
||||
controller.set_editable(false);
|
||||
} else if (view_type == "form" || view_type == 'page') {
|
||||
if (view_type == 'page') {
|
||||
controller.$element.find(".oe_form_buttons").hide();
|
||||
}
|
||||
controller.on_record_loaded.add_last(function() {
|
||||
once.resolve();
|
||||
});
|
||||
@@ -2312,22 +2363,27 @@ openerp.web.form.One2ManyListView = openerp.web.ListView.extend({
|
||||
var self = this;
|
||||
var pop = new openerp.web.form.SelectCreatePopup(this);
|
||||
pop.on_default_get.add(self.dataset.on_default_get);
|
||||
pop.select_element(self.o2m.field.relation,{
|
||||
initial_view: "form",
|
||||
alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
|
||||
create_function: function(data, callback, error_callback) {
|
||||
return self.o2m.dataset.create(data).then(function(r) {
|
||||
self.o2m.dataset.set_ids(self.o2m.dataset.ids.concat([r.result]));
|
||||
self.o2m.dataset.on_change();
|
||||
}).then(callback, error_callback);
|
||||
pop.select_element(
|
||||
self.o2m.field.relation,
|
||||
{
|
||||
title: _t("Create: ") + self.name,
|
||||
initial_view: "form",
|
||||
alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
|
||||
create_function: function(data, callback, error_callback) {
|
||||
return self.o2m.dataset.create(data).then(function(r) {
|
||||
self.o2m.dataset.set_ids(self.o2m.dataset.ids.concat([r.result]));
|
||||
self.o2m.dataset.on_change();
|
||||
}).then(callback, error_callback);
|
||||
},
|
||||
read_function: function() {
|
||||
return self.o2m.dataset.read_ids.apply(self.o2m.dataset, arguments);
|
||||
},
|
||||
parent_view: self.o2m.view,
|
||||
form_view_options: {'not_interactible_on_create':true}
|
||||
},
|
||||
read_function: function() {
|
||||
return self.o2m.dataset.read_ids.apply(self.o2m.dataset, arguments);
|
||||
},
|
||||
parent_view: self.o2m.view,
|
||||
child_name: self.o2m.name,
|
||||
form_view_options: {'not_interactible_on_create':true}
|
||||
}, self.o2m.build_domain(), self.o2m.build_context());
|
||||
self.o2m.build_domain(),
|
||||
self.o2m.build_context()
|
||||
);
|
||||
pop.on_select_elements.add_last(function() {
|
||||
self.o2m.reload_current_view();
|
||||
});
|
||||
@@ -2336,7 +2392,8 @@ openerp.web.form.One2ManyListView = openerp.web.ListView.extend({
|
||||
do_activate_record: function(index, id) {
|
||||
var self = this;
|
||||
var pop = new openerp.web.form.FormOpenPopup(self.o2m.view);
|
||||
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(),{
|
||||
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
|
||||
title: _t("Open: ") + self.name,
|
||||
auto_write: false,
|
||||
alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
|
||||
parent_view: self.o2m.view,
|
||||
@@ -2355,6 +2412,14 @@ openerp.web.form.One2ManyListView = openerp.web.ListView.extend({
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web.form.One2ManyFormView = openerp.web.FormView.extend({
|
||||
form_template: 'One2Many.formview',
|
||||
on_loaded: function(data) {
|
||||
this._super(data);
|
||||
this.$form_header.find('button.oe_form_button_create').click(this.on_button_new);
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web.form.FieldMany2Many = openerp.web.form.Field.extend({
|
||||
template: 'FieldMany2Many',
|
||||
multi_selection: false,
|
||||
@@ -2459,9 +2524,14 @@ openerp.web.form.Many2ManyDataSet = openerp.web.DataSetStatic.extend({
|
||||
openerp.web.form.Many2ManyListView = openerp.web.ListView.extend(/** @lends openerp.web.form.Many2ManyListView# */{
|
||||
do_add_record: function () {
|
||||
var pop = new openerp.web.form.SelectCreatePopup(this);
|
||||
pop.select_element(this.model, {},
|
||||
pop.select_element(
|
||||
this.model,
|
||||
{
|
||||
title: _t("Add: ") + this.name
|
||||
},
|
||||
new openerp.web.CompoundDomain(this.m2m_field.build_domain(), ["!", ["id", "in", this.m2m_field.dataset.ids]]),
|
||||
this.m2m_field.build_context());
|
||||
this.m2m_field.build_context()
|
||||
);
|
||||
var self = this;
|
||||
pop.on_select_elements.add(function(element_ids) {
|
||||
_.each(element_ids, function(element_id) {
|
||||
@@ -2477,6 +2547,7 @@ openerp.web.form.Many2ManyListView = openerp.web.ListView.extend(/** @lends open
|
||||
var self = this;
|
||||
var pop = new openerp.web.form.FormOpenPopup(this);
|
||||
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {
|
||||
title: _t("Open: ") + this.name,
|
||||
readonly: this.widget_parent.is_readonly()
|
||||
});
|
||||
pop.on_write_completed.add_last(function() {
|
||||
@@ -2516,9 +2587,12 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
|
||||
this.initial_ids = this.options.initial_ids;
|
||||
this.created_elements = [];
|
||||
this.render_element();
|
||||
openerp.web.form.dialog(this.$element, {close:function() {
|
||||
self.check_exit();
|
||||
}});
|
||||
openerp.web.form.dialog(this.$element, {
|
||||
close: function() {
|
||||
self.check_exit();
|
||||
},
|
||||
title: options.title || ""
|
||||
});
|
||||
this.start();
|
||||
},
|
||||
start: function() {
|
||||
@@ -2721,10 +2795,12 @@ openerp.web.form.FormOpenPopup = openerp.web.OldWidget.extend(/** @lends openerp
|
||||
this.context = context || {};
|
||||
this.options = _.defaults(options || {}, {"auto_write": true});
|
||||
this.render_element();
|
||||
this.$element.dialog({title: '',
|
||||
modal: true,
|
||||
width: 960,
|
||||
height: 600});
|
||||
this.$element.dialog({
|
||||
title: options.title || '',
|
||||
modal: true,
|
||||
width: 960,
|
||||
height: 600
|
||||
});
|
||||
this.start();
|
||||
},
|
||||
start: function() {
|
||||
@@ -3074,6 +3150,32 @@ openerp.web.form.FieldStatus = openerp.web.form.Field.extend({
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web.form.WidgetHtml = openerp.web.form.Widget.extend({
|
||||
render: function () {
|
||||
var $root = $('<div class="oe_form_html_view">');
|
||||
this.render_children(this, $root);
|
||||
return $root.html();
|
||||
},
|
||||
render_children: function (object, $into) {
|
||||
var self = this,
|
||||
fields = this.view.fields_view.fields;
|
||||
_(object.children).each(function (child) {
|
||||
if (typeof child === 'string') {
|
||||
$into.text(child);
|
||||
} else if (child.tag === 'field') {
|
||||
$into.append(
|
||||
new (self.view.registry.get_object('frame'))(
|
||||
self.view, {tag: 'ueule', attrs: {}, children: [child] })
|
||||
.render());
|
||||
} else {
|
||||
var $child = $(document.createElement(child.tag))
|
||||
.attr(child.attrs)
|
||||
.appendTo($into);
|
||||
self.render_children(child, $child);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
@@ -3107,7 +3209,8 @@ openerp.web.form.widgets = new openerp.web.Registry({
|
||||
'progressbar': 'openerp.web.form.FieldProgressBar',
|
||||
'image': 'openerp.web.form.FieldBinaryImage',
|
||||
'binary': 'openerp.web.form.FieldBinaryFile',
|
||||
'statusbar': 'openerp.web.form.FieldStatus'
|
||||
'statusbar': 'openerp.web.form.FieldStatus',
|
||||
'html': 'openerp.web.form.WidgetHtml'
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -476,6 +476,9 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
|
||||
});
|
||||
return reloaded.promise();
|
||||
},
|
||||
reload: function () {
|
||||
return this.reload_content();
|
||||
},
|
||||
|
||||
do_load_state: function(state) {
|
||||
var reload = false;
|
||||
@@ -1143,7 +1146,12 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L
|
||||
},
|
||||
open: function (point_insertion) {
|
||||
this.render().insertAfter(point_insertion);
|
||||
this.make_paginator();
|
||||
|
||||
var no_subgroups = _(this.datagroup.group_by).isEmpty(),
|
||||
records_terminated = !this.datagroup.context['group_by_no_leaf'];
|
||||
if (no_subgroups && records_terminated) {
|
||||
this.make_paginator();
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
this.$row.children().last().empty();
|
||||
|
||||
@@ -28,6 +28,7 @@ session.web.ActionManager = session.web.Widget.extend({
|
||||
},
|
||||
render: function() {
|
||||
return "<div id='"+this.element_id+"' style='height:100%;'></div>";
|
||||
return '<div id="' + this.element_id + '" style="height: 100%;"></div>';
|
||||
},
|
||||
dialog_stop: function () {
|
||||
if (this.dialog) {
|
||||
@@ -49,8 +50,12 @@ session.web.ActionManager = session.web.Widget.extend({
|
||||
},
|
||||
do_push_state: function(state) {
|
||||
if (this.widget_parent && this.widget_parent.do_push_state) {
|
||||
if (this.inner_action && this.inner_action.id) {
|
||||
state['action_id'] = this.inner_action.id;
|
||||
if (this.inner_action) {
|
||||
if (this.inner_action.id) {
|
||||
state['action_id'] = this.inner_action.id;
|
||||
} else {
|
||||
state['model'] = this.inner_action.res_model;
|
||||
}
|
||||
}
|
||||
this.widget_parent.do_push_state(state);
|
||||
}
|
||||
@@ -66,10 +71,15 @@ session.web.ActionManager = session.web.Widget.extend({
|
||||
}
|
||||
}
|
||||
else if (state.model && state.id) {
|
||||
// TODO implement it
|
||||
//this.null_action();
|
||||
//action = {res_model: state.model, res_id: state.id};
|
||||
//action_loaded = this.do_action(action);
|
||||
// TODO handle context & domain ?
|
||||
this.null_action();
|
||||
action = {
|
||||
res_model: state.model,
|
||||
res_id: state.id,
|
||||
type: 'ir.actions.act_window',
|
||||
views: [[false, 'page'], [false, 'form']]
|
||||
};
|
||||
action_loaded = this.do_action(action);
|
||||
}
|
||||
else if (state.client_action) {
|
||||
this.null_action();
|
||||
@@ -135,6 +145,9 @@ session.web.ActionManager = session.web.Widget.extend({
|
||||
this.dialog_viewmanager.appendTo(this.dialog.$element);
|
||||
this.dialog.open();
|
||||
} else {
|
||||
if(action.menu_id) {
|
||||
return this.widget_parent.do_action(action);
|
||||
}
|
||||
this.dialog_stop();
|
||||
this.content_stop();
|
||||
this.inner_action = action;
|
||||
@@ -543,7 +556,10 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
|
||||
view_mode : 'form',
|
||||
target : 'new',
|
||||
flags : {
|
||||
action_buttons : true
|
||||
action_buttons : true,
|
||||
form : {
|
||||
resize_textareas : true
|
||||
}
|
||||
}
|
||||
};
|
||||
if (id) {
|
||||
@@ -852,7 +868,10 @@ session.web.Sidebar = session.web.Widget.extend({
|
||||
additional_context);
|
||||
result.result.flags = result.result.flags || {};
|
||||
result.result.flags.new_window = true;
|
||||
self.do_action(result.result);
|
||||
self.do_action(result.result, function () {
|
||||
// reload view
|
||||
self.widget_parent.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -1176,7 +1195,14 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
|
||||
on_sidebar_view_log: function() {
|
||||
},
|
||||
sidebar_context: function () {
|
||||
return $.Deferred().resolve({}).promise();
|
||||
return $.when();
|
||||
},
|
||||
/**
|
||||
* Asks the view to reload itself, if the reloading is asynchronous should
|
||||
* return a {$.Deferred} indicating when the reloading is done.
|
||||
*/
|
||||
reload: function () {
|
||||
return $.when();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
</t>
|
||||
<t t-name="Interface">
|
||||
<div id="oe_loading"></div>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="main_table">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
@@ -36,15 +37,14 @@
|
||||
<div id="oe_database" class="database"></div>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<div id="oe_db_options"></div>
|
||||
<div id="oe_db_options"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" valign="top" height="100%">
|
||||
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
|
||||
<tr>
|
||||
<td valign="top" id="oe_secondary_menu" class="secondary_menu">
|
||||
</td>
|
||||
<td valign="top" id="oe_secondary_menu" class="secondary_menu"></td>
|
||||
<td valign="top" class="oe-application-container">
|
||||
<div id="oe_app" class="oe-application">
|
||||
</div>
|
||||
@@ -262,80 +262,30 @@
|
||||
</t>
|
||||
|
||||
<t t-name="Login">
|
||||
<div>
|
||||
<form class="oe_forms">
|
||||
<fieldset>
|
||||
<legend style="">
|
||||
<img t-att-src='_s + "/web/static/src/img/stock_person.png"' alt="" />
|
||||
</legend>
|
||||
<div class="oe_box2">
|
||||
<table align="center" cellspacing="2px" cellpadding="0">
|
||||
<tr>
|
||||
<td><label for="db">Database:</label></td>
|
||||
<td>
|
||||
<input type="text" name="db" t-att-value="widget.selected_db || ''" autofocus="true"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="login">User:</label></td>
|
||||
<td><input type="text" name="login"
|
||||
t-att-value="widget.selected_login || ''" autofocus="true"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="password">Password:</label></td>
|
||||
<td><input type="password" name="password"
|
||||
t-att-value="widget.selected_password || ''"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<button class="oe_button" type="button" id="oe-db-config">Database</button>
|
||||
<button class="oe_button" name="submit">Login</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="login_error_message">Bad username or password</div>
|
||||
</form>
|
||||
<div class="oe_login_right_pane">
|
||||
<p>We think that daily job activities can be more intuitive, efficient, automated, .. and even fun.</p>
|
||||
<h3>OpenERP's vision to be:</h3>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" width="100%" style="border:none;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<img t-att-src='_s + "/web/static/src/img/product.png"'/>
|
||||
</td>
|
||||
<td>
|
||||
<strong>Full featured</strong><br />
|
||||
Today's enterprise challenges are multiple. We provide one module for each need.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img t-att-src='_s + "/web/static/src/img/accessories-archiver.png"'/>
|
||||
</td>
|
||||
<td>
|
||||
<strong>Open Source</strong><br />
|
||||
To Build a great product, we rely on the knowledge of thousands of contributors.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img t-att-src='_s + "/web/static/src/img/partner.png"' />
|
||||
</td>
|
||||
<td>
|
||||
<strong>User Friendly</strong><br />
|
||||
In order to be productive, people need clean and easy to use interface.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div class="bottom"> </div>
|
||||
<div class="login_error_message">Invalid username or password</div>
|
||||
<div class="pane">
|
||||
<div id="logo"><img src='/web/static/src/img/logo2.png'/></div>
|
||||
<form action="" method="post">
|
||||
<div class="dbpane" >
|
||||
Database:
|
||||
<input name="db"/>
|
||||
</div>
|
||||
<ul>
|
||||
<li>Username</li>
|
||||
<li><input type="text" name="login" autofocus="autofocus"/></li>
|
||||
<li>Password</li>
|
||||
<li><input type="password" name="password" value=""/></li>
|
||||
<li><button name="submit">Log in</button></li>
|
||||
</ul>
|
||||
</form>
|
||||
<div class="footer">
|
||||
<a href="#" id="oe-db-config">Manage Databases</a> |
|
||||
<a href="http://www.openerp.com">Powered by <span class="openerp">OpenERP</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="Header">
|
||||
<div>
|
||||
@@ -716,6 +666,11 @@
|
||||
</div>
|
||||
<t t-raw="frame.render()"/>
|
||||
</t>
|
||||
<t t-name="One2Many.formview" t-extend="FormView">
|
||||
<t t-jquery=".oe_form_buttons" t-operation="inner">
|
||||
<button type="button" class="oe_button oe_form_button_create">Create</button>
|
||||
</t>
|
||||
</t>
|
||||
<t t-name="PageView" t-extend="FormView">
|
||||
<t t-jquery=".oe_form_buttons" t-operation="inner">
|
||||
<button type="button" class="oe_button oe_form_button_edit">Edit</button>
|
||||
@@ -840,9 +795,7 @@
|
||||
<div class="oe_tooltip_string" t-if="widget.string">
|
||||
<t t-esc="widget.string"/> <t t-if="debug and widget.nolabel">(nolabel)</t>
|
||||
</div>
|
||||
<p t-if="widget.help" class="oe_tooltip_help">
|
||||
<t t-esc="widget.help"/>
|
||||
</p>
|
||||
<p t-if="widget.help" class="oe_tooltip_help"><t t-esc="widget.help"/></p>
|
||||
<ul t-if="debug" class="oe_tooltip_technical">
|
||||
<li data-item="field" t-if="widget.name">
|
||||
<span class="oe_tooltip_technical_title">Field:</span>
|
||||
|
||||
@@ -21,7 +21,11 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
|
||||
this.has_been_loaded = $.Deferred();
|
||||
this.creating_event_id = null;
|
||||
this.dataset_events = [];
|
||||
this.form_dialog = new openerp.web_calendar.CalendarFormDialog(this, {}, this.options.action_views_ids.form, dataset);
|
||||
this.form_dialog = new openerp.web_calendar.CalendarFormDialog(this, {
|
||||
destroy_on_close: false,
|
||||
width: '80%',
|
||||
min_width: 850
|
||||
}, this.options.action_views_ids.form, dataset);
|
||||
this.form_dialog.start();
|
||||
this.COLOR_PALETTE = ['#f57900', '#cc0000', '#d400a8', '#75507b', '#3465a4', '#73d216', '#c17d11', '#edd400',
|
||||
'#fcaf3e', '#ef2929', '#ff00c9', '#ad7fa8', '#729fcf', '#8ae234', '#e9b96e', '#fce94f',
|
||||
@@ -415,6 +419,7 @@ openerp.web_calendar.CalendarFormDialog = openerp.web.Dialog.extend({
|
||||
this.view = view;
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
this._super();
|
||||
this.form = new openerp.web.FormView(this, this.dataset, this.view_id, {
|
||||
sidebar: false,
|
||||
@@ -423,6 +428,9 @@ openerp.web_calendar.CalendarFormDialog = openerp.web.Dialog.extend({
|
||||
this.form.appendTo(this.$element);
|
||||
this.form.on_created.add_last(this.on_form_dialog_saved);
|
||||
this.form.on_saved.add_last(this.on_form_dialog_saved);
|
||||
this.form.on_button_cancel = function() {
|
||||
self.close();
|
||||
}
|
||||
},
|
||||
on_form_dialog_saved: function() {
|
||||
var id = this.dataset.ids[this.dataset.index];
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
|
||||
/* Base overwriting */
|
||||
.openerp .oe-dashboard .oe-listview-content, .openerp .oe-dashboard .ui-widget-header {
|
||||
border:none !important;
|
||||
padding:0px 3px;
|
||||
border-right:none !important;
|
||||
padding:0 3px;
|
||||
}
|
||||
|
||||
/* Layouts */
|
||||
@@ -278,7 +278,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
.oe-static-home h1 {
|
||||
margin: 0 0 0.3em
|
||||
margin: 0 0 0.3em;
|
||||
}
|
||||
.oe-static-home-banner {
|
||||
display: inline-block;
|
||||
@@ -318,7 +318,10 @@
|
||||
|
||||
.openerp .oe_app_tiles h1, .openerp .oe_app_tiles h3 {
|
||||
margin: 16px 24px;
|
||||
color: #555
|
||||
}
|
||||
|
||||
.openerp .oe_app_tiles {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.openerp .oe_app_tiles li {
|
||||
@@ -328,9 +331,9 @@
|
||||
|
||||
.openerp .oe_app_tiles li img {
|
||||
display: block;
|
||||
margin: 12px auto 16px;
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
margin: 0 auto;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
.openerp .oe_app_tiles li img.hover {
|
||||
display: none;
|
||||
@@ -342,14 +345,11 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.openerp .oe_app_tiles li div {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.openerp .oe_app_tiles li a {
|
||||
display: block;
|
||||
height: 120px;
|
||||
width: 194px;
|
||||
color: #4C4C4C;
|
||||
border: 1px solid #f4f2f2;
|
||||
margin: 6px;
|
||||
padding: 12px;
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
<t t-name="web_dashboard.ApplicationTiles">
|
||||
<div>
|
||||
<h1 class="welcome_message">Welcome to OpenERP</h1>
|
||||
<div class="oe_applications_tiles">
|
||||
<h1>Welcome to OpenERP</h1>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
@@ -204,8 +204,7 @@ openerp.web.DiagramView = openerp.web.View.extend({
|
||||
id = parseInt(id, 10);
|
||||
var action_manager = new openerp.web.ActionManager(this);
|
||||
var dialog = new openerp.web.Dialog(this, {
|
||||
width: 800,
|
||||
height: 600,
|
||||
width: 850,
|
||||
buttons : [
|
||||
{text: _t("Cancel"), click: function() { $(this).dialog('destroy'); }},
|
||||
{text: _t("Save"), click: function() {
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
|
||||
"PO-Revision-Date: 2011-12-19 17:45+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 15:08+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-21 05:28+0000\n"
|
||||
"X-Generator: Launchpad (build 14538)\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:32+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#: addons/web_gantt/static/src/js/gantt.js:10
|
||||
msgid "Gantt"
|
||||
@@ -27,7 +27,7 @@ msgstr "nije definiran date_start "
|
||||
|
||||
#: addons/web_gantt/static/src/js/gantt.js:110
|
||||
msgid "date_start is not defined"
|
||||
msgstr ""
|
||||
msgstr "date_start nije definiran"
|
||||
|
||||
#: addons/web_gantt/static/src/xml/web_gantt.xml:0
|
||||
msgid "Create"
|
||||
|
||||
@@ -275,7 +275,6 @@ openerp.web_process = function (openerp) {
|
||||
var action_manager = new openerp.web.ActionManager(this);
|
||||
var dialog = new openerp.web.Dialog(this, {
|
||||
width: 800,
|
||||
height: 600,
|
||||
buttons : [
|
||||
{text: _t("Cancel"), click: function() { $(this).dialog('destroy'); }},
|
||||
{text: _t("Save"), click: function() {
|
||||
|
||||
Reference in New Issue
Block a user