[IMP] Improved code.
bzr revid: jra@tinyerp.com-20110818132418-4n35o9q3i84ttjdi
This commit is contained in:
@@ -1,135 +1,41 @@
|
||||
/*---------------------------------------------------------
|
||||
* OpenERP Web Mobile chrome
|
||||
*---------------------------------------------------------*/
|
||||
|
||||
openerp.web_mobile.chrome_mobile = function(openerp) {
|
||||
openerp.web_mobile.Shortcuts = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
this.rpc('/base/session/sc_list',{} ,function(res){
|
||||
self.$element.html(QWeb.render("Shortcuts", {'sc' : res}))
|
||||
self.$element.find("a").click(self.on_clicked);
|
||||
})
|
||||
},
|
||||
on_clicked: function(ev) {
|
||||
$shortcut = $(ev.currentTarget);
|
||||
id = $shortcut.data('menu');
|
||||
res_id = $shortcut.data('res');
|
||||
jQuery("#oe_header").find("h1").html($shortcut.data('name'));
|
||||
this.listview = new openerp.web_mobile.ListView(this, "oe_app", res_id);
|
||||
this.listview.start();
|
||||
}
|
||||
});
|
||||
openerp.web_mobile.Header = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
this.$element.html(QWeb.render("Header", this));
|
||||
this.$element.find("a").click(this.on_clicked);
|
||||
},
|
||||
on_clicked: function(ev) {
|
||||
$opt = $(ev.currentTarget);
|
||||
current_id = $opt.attr('id');
|
||||
if (current_id == 'home') {
|
||||
this.homepage = new openerp.web_mobile.Login(this, "oe_app");
|
||||
this.homepage.on_login_valid();
|
||||
}
|
||||
}
|
||||
});
|
||||
openerp.web_mobile.Secondary = openerp.base.Widget.extend({
|
||||
init: function(session, element_id, secondary_menu_id) {
|
||||
this._super(session, element_id);
|
||||
this.data = secondary_menu_id;
|
||||
},
|
||||
start: function(ev, id) {
|
||||
var v = { menu : this.data };
|
||||
this.$element.html(QWeb.render("Menu.secondary", v));
|
||||
this.$element.add(this.$secondary_menu).find("a").click(this.on_menu_click);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
$menu = $(ev.currentTarget);
|
||||
id = $menu.data('menu');
|
||||
for (var i = 0; i < this.data.children.length; i++) {
|
||||
if (this.data.children[i].id == id) {
|
||||
this.children = this.data.children[i];
|
||||
}
|
||||
}
|
||||
jQuery("#oe_header").find("h1").html($menu.data('name'));
|
||||
|
||||
var child_len = this.children.children.length;
|
||||
if (child_len > 0) {
|
||||
this.$element
|
||||
.removeClass("secondary_menu")
|
||||
.addClass("content_menu");
|
||||
//.hide();
|
||||
this.secondary = new openerp.web_mobile.Secondary(this, "oe_app", this.children);
|
||||
this.secondary.start();
|
||||
}
|
||||
else {
|
||||
if (id) {
|
||||
this.listview = new openerp.web_mobile.ListView(this, "oe_app", id);
|
||||
this.listview.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
openerp.web_mobile.mobilewebclient = function(element_id) {
|
||||
// TODO Helper to start mobile webclient rename it openerp.base.webclient
|
||||
var client = new openerp.web_mobile.MobileWebClient(element_id);
|
||||
client.start();
|
||||
return client;
|
||||
};
|
||||
|
||||
openerp.web_mobile.Menu = openerp.base.Widget.extend({
|
||||
init: function(session, element_id, secondary_menu_id) {
|
||||
this._super(session, element_id);
|
||||
this.secondary_menu_id = secondary_menu_id;
|
||||
this.$secondary_menu = $("#" + secondary_menu_id);
|
||||
this.menu = false;
|
||||
},
|
||||
start: function() {
|
||||
this.rpc("/base/menu/load", {}, this.on_loaded);
|
||||
},
|
||||
on_loaded: function(data) {
|
||||
this.data = data;
|
||||
this.$element.html(QWeb.render("Menu", this.data));
|
||||
this.$element.add(this.$secondary_menu).find("a").click(this.on_menu_click);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
$menu = $(ev.currentTarget);
|
||||
id = $menu.data('menu');
|
||||
for (var i = 0; i < this.data.data.children.length; i++) {
|
||||
if (this.data.data.children[i].id == id) {
|
||||
this.children = this.data.data.children[i];
|
||||
}
|
||||
}
|
||||
jQuery("#oe_header").find("h1").html($menu.data('name'));
|
||||
this.$element
|
||||
.removeClass("login_valid")
|
||||
.addClass("secondary_menu");
|
||||
//.hide();
|
||||
this.secondary = new openerp.web_mobile.Secondary(this, "oe_app", this.children);
|
||||
this.secondary.start();
|
||||
}
|
||||
});
|
||||
openerp.web_mobile.Options = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
openerp.web_mobile.MobileWebClient = openerp.base.Widget.extend({
|
||||
init: function(element_id) {
|
||||
var self = this;
|
||||
this.$element.html(QWeb.render("Options", this));
|
||||
self.$element.find("#logout").click(self.on_logout);
|
||||
},
|
||||
on_logout: function(ev) {
|
||||
this.session.logout();
|
||||
this._super(null, element_id);
|
||||
QWeb.add_template("xml/web_mobile.xml");
|
||||
var params = {};
|
||||
this.$element.html(QWeb.render("WebClient", {}));
|
||||
this.session = new openerp.base.Session("oe_errors");
|
||||
this.crashmanager = new openerp.base.CrashManager(this);
|
||||
this.login = new openerp.web_mobile.Login(this, "oe_app");
|
||||
this.session.on_session_invalid.add(this.login.do_ask_login);
|
||||
},
|
||||
start: function() {
|
||||
this.session.start();
|
||||
this.login.start();
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Login = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
|
||||
jQuery("#oe_header").children().remove();
|
||||
|
||||
this.rpc("/base/database/get_list", {}, function(result) {
|
||||
var selection = new openerp.web_mobile.Selection();
|
||||
self.db_list = result.db_list;
|
||||
@@ -172,17 +78,10 @@ openerp.web_mobile.Login = openerp.base.Widget.extend({
|
||||
.removeClass("login_invalid")
|
||||
.addClass("login_valid");
|
||||
//.hide();
|
||||
this.$element.html(QWeb.render("HomePage", {}));
|
||||
this.header = new openerp.web_mobile.Header(this, "oe_header");
|
||||
this.shortcuts = new openerp.web_mobile.Shortcuts(this, "oe_shortcuts");
|
||||
this.menu = new openerp.web_mobile.Menu(this, "oe_menu", "oe_secondary_menu");
|
||||
this.options = new openerp.web_mobile.Options(this, "oe_options");
|
||||
this.homepage = new openerp.web_mobile.HomePage(this, "oe_app");
|
||||
this.header.start();
|
||||
this.shortcuts.start();
|
||||
this.menu.start();
|
||||
this.options.start();
|
||||
jQuery("#oe_header").find("h1").html('Home');
|
||||
|
||||
this.homepage.start();
|
||||
},
|
||||
do_ask_login: function(continuation) {
|
||||
this.on_login_invalid();
|
||||
@@ -193,6 +92,149 @@ openerp.web_mobile.Login = openerp.base.Widget.extend({
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.HomePage = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
this.$element.html(QWeb.render("HomePage", {}));
|
||||
this.shortcuts = new openerp.web_mobile.Shortcuts(this, "oe_shortcuts");
|
||||
this.menu = new openerp.web_mobile.Menu(this, "oe_menu", "oe_secondary_menu");
|
||||
this.options = new openerp.web_mobile.Options(this, "oe_options");
|
||||
this.shortcuts.start();
|
||||
this.menu.start();
|
||||
this.options.start();
|
||||
jQuery("#oe_header").find("h1").html('Home');
|
||||
this.$element.find("a").click(this.on_clicked);
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Header = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
this.$element.html(QWeb.render("Header", this));
|
||||
this.$element.find("a").click(this.on_clicked);
|
||||
},
|
||||
on_clicked: function(ev) {
|
||||
$opt = $(ev.currentTarget);
|
||||
current_id = $opt.attr('id');
|
||||
if (current_id == 'home') {
|
||||
this.homepage = new openerp.web_mobile.HomePage(this, "oe_app");
|
||||
this.homepage.start();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Shortcuts = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
this.rpc('/base/session/sc_list',{} ,function(res){
|
||||
self.$element.html(QWeb.render("Shortcuts", {'sc' : res}))
|
||||
self.$element.find("a").click(self.on_clicked);
|
||||
})
|
||||
},
|
||||
on_clicked: function(ev) {
|
||||
$shortcut = $(ev.currentTarget);
|
||||
id = $shortcut.data('menu');
|
||||
res_id = $shortcut.data('res');
|
||||
jQuery("#oe_header").find("h1").html($shortcut.data('name'));
|
||||
this.listview = new openerp.web_mobile.ListView(this, "oe_app", res_id);
|
||||
this.listview.start();
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Menu = openerp.base.Widget.extend({
|
||||
init: function(session, element_id, secondary_menu_id) {
|
||||
this._super(session, element_id);
|
||||
this.secondary_menu_id = secondary_menu_id;
|
||||
this.$secondary_menu = $("#" + secondary_menu_id);
|
||||
this.menu = false;
|
||||
},
|
||||
start: function() {
|
||||
this.rpc("/base/menu/load", {}, this.on_loaded);
|
||||
},
|
||||
on_loaded: function(data) {
|
||||
this.data = data;
|
||||
this.$element.html(QWeb.render("Menu", this.data));
|
||||
this.$element.add(this.$secondary_menu).find("a").click(this.on_menu_click);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
$menu = $(ev.currentTarget);
|
||||
id = $menu.data('menu');
|
||||
for (var i = 0; i < this.data.data.children.length; i++) {
|
||||
if (this.data.data.children[i].id == id) {
|
||||
this.children = this.data.data.children[i];
|
||||
}
|
||||
}
|
||||
jQuery("#oe_header").find("h1").html($menu.data('name'));
|
||||
this.$element
|
||||
.removeClass("login_valid")
|
||||
.addClass("secondary_menu");
|
||||
//.hide();
|
||||
this.secondary = new openerp.web_mobile.Secondary(this, "oe_app", this.children);
|
||||
this.secondary.start();
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Secondary = openerp.base.Widget.extend({
|
||||
init: function(session, element_id, secondary_menu_id) {
|
||||
this._super(session, element_id);
|
||||
this.data = secondary_menu_id;
|
||||
},
|
||||
start: function(ev, id) {
|
||||
var v = { menu : this.data };
|
||||
this.$element.html(QWeb.render("Menu.secondary", v));
|
||||
this.$element.add(this.$secondary_menu).find("a").click(this.on_menu_click);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
$menu = $(ev.currentTarget);
|
||||
id = $menu.data('menu');
|
||||
for (var i = 0; i < this.data.children.length; i++) {
|
||||
if (this.data.children[i].id == id) {
|
||||
this.children = this.data.children[i];
|
||||
}
|
||||
}
|
||||
jQuery("#oe_header").find("h1").html($menu.data('name'));
|
||||
var child_len = this.children.children.length;
|
||||
if (child_len > 0) {
|
||||
this.$element
|
||||
.removeClass("secondary_menu")
|
||||
.addClass("content_menu");
|
||||
//.hide();
|
||||
this.secondary = new openerp.web_mobile.Secondary(this, "oe_app", this.children);
|
||||
this.secondary.start();
|
||||
}
|
||||
else {
|
||||
if (id) {
|
||||
this.listview = new openerp.web_mobile.ListView(this, "oe_app", id);
|
||||
this.listview.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Options = openerp.base.Widget.extend({
|
||||
init: function(session, element_id) {
|
||||
this._super(session, element_id);
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
this.$element.html(QWeb.render("Options", this));
|
||||
self.$element.find("#logout").click(self.on_logout);
|
||||
},
|
||||
on_logout: function(ev) {
|
||||
this.session.logout();
|
||||
this.login = new openerp.web_mobile.Login(this, "oe_app");
|
||||
this.login.start();
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web_mobile.Selection = openerp.base.Widget.extend({
|
||||
init: function (){
|
||||
this._super();
|
||||
@@ -207,29 +249,4 @@ openerp.web_mobile.Selection = openerp.base.Widget.extend({
|
||||
$($this).prev().find(".ui-btn-text").html($($this).find("option:selected").text());
|
||||
}
|
||||
});
|
||||
openerp.web_mobile.MobileWebClient = openerp.base.Widget.extend({
|
||||
init: function(element_id) {
|
||||
var self = this;
|
||||
|
||||
this._super(null, element_id);
|
||||
QWeb.add_template("xml/web_mobile.xml");
|
||||
var params = {};
|
||||
|
||||
this.$element.html(QWeb.render("WebClient", {}));
|
||||
this.session = new openerp.base.Session("oe_errors");
|
||||
this.crashmanager = new openerp.base.CrashManager(this);
|
||||
this.login = new openerp.web_mobile.Login(this, "oe_app");
|
||||
this.session.on_session_invalid.add(this.login.do_ask_login);
|
||||
},
|
||||
start: function() {
|
||||
this.session.start();
|
||||
this.login.start();
|
||||
}
|
||||
});
|
||||
openerp.web_mobile.mobilewebclient = function(element_id) {
|
||||
// TODO Helper to start mobile webclient rename it openerp.base.webclient
|
||||
var client = new openerp.web_mobile.MobileWebClient(element_id);
|
||||
client.start();
|
||||
return client;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
openerp.web_mobile.form_mobile = function (openerp) {
|
||||
openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
/*---------------------------------------------------------
|
||||
* OpenERP Web Mobile Form View
|
||||
*---------------------------------------------------------*/
|
||||
|
||||
openerp.web_mobile.form_mobile = function (openerp) {
|
||||
|
||||
openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
init: function(session, element_id, list_id, action) {
|
||||
this._super(session, element_id);
|
||||
this.list_id = list_id;
|
||||
@@ -17,7 +21,6 @@ openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
id = this.list_id;
|
||||
model = this.action.res_model;
|
||||
view_id = this.action.views[1][0];
|
||||
|
||||
this.dataset = new openerp.base.DataSetSearch(this, this.action.res_model, null, null);
|
||||
this.dataset.read_slice([],function (result) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
@@ -30,45 +33,33 @@ openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
var view_fields = result.fields_view.arch.children;
|
||||
var get_fields = self.get_fields(view_fields);
|
||||
var selection = new openerp.web_mobile.Selection();
|
||||
|
||||
for (var j = 0; j < view_fields.length; j++) {
|
||||
if (view_fields[j].tag == 'notebook') {
|
||||
var notebooks = view_fields[j];
|
||||
}
|
||||
}
|
||||
|
||||
$("#oe_header").find("h1").html(result.fields_view.arch.attrs.string);
|
||||
self.$element.html(QWeb.render("FormView", {'get_fields': get_fields, 'notebooks': notebooks || false, 'fields' : fields, 'values' : data }));
|
||||
|
||||
self.$element.find('select').change(function(ev){
|
||||
selection.on_select_option(ev);
|
||||
});
|
||||
|
||||
self.$element.find('a').click(function(){
|
||||
|
||||
for (var k = 0; k < notebooks.children.length; k++) {
|
||||
|
||||
var text = $(this).find('.ui-btn-text').text();
|
||||
var next = $(this).next();
|
||||
var span = $(this).find('span .ui-icon');
|
||||
|
||||
|
||||
if (notebooks.children[k].attrs.string == $.trim(text)) {
|
||||
get_fields = self.get_fields(notebooks.children[k].children);
|
||||
|
||||
$(this).parents().find('form').find('div').each( function() {
|
||||
var prev = $(this).prev();
|
||||
var trim_class = $.trim($(this).attr('class'));
|
||||
|
||||
if (trim_class == self.content_expanded_class || trim_class == self.content_collapsed_class) {
|
||||
prev.removeClass('ui-btn-active');
|
||||
|
||||
if ($.trim(prev.find('.ui-btn-text').text()) != notebooks.children[k].attrs.string) {
|
||||
self.expanded($(this),prev.find('span .ui-icon'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (next.hasClass(self.content_collapsed_class)) {
|
||||
self.collapsed(next,span);
|
||||
}
|
||||
@@ -76,7 +67,6 @@ openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
self.expanded(next,span);
|
||||
}
|
||||
if (!next.find('.detail').html().length) {
|
||||
|
||||
for (var i = 0; i < get_fields.length; i++) {
|
||||
if (fields[get_fields[i].attrs.name].type == 'one2many'){
|
||||
var get_fields_test = self.get_fields(fields[get_fields[i].attrs.name].views.form.arch.children);
|
||||
@@ -89,7 +79,6 @@ openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
}else{
|
||||
next.find('.detail').append(QWeb.render("FormView", {'get_fields': get_fields,'fields' : result.fields_view.fields, 'values' : data }));
|
||||
}
|
||||
|
||||
}
|
||||
next.find('.detail').find('a').click(function(){
|
||||
if(next.find('.detail').find('a').next().find('.detail').html().length){
|
||||
@@ -107,7 +96,6 @@ openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
self.$element.find('select').change(function(ev){
|
||||
selection.on_select_option(ev);
|
||||
});
|
||||
@@ -132,7 +120,6 @@ openerp.web_mobile.FormView = openerp.base.Widget.extend({
|
||||
span.addClass(this.minus_class);
|
||||
next.removeClass(this.collapsed_class);
|
||||
next.addClass(this.expanded_class);
|
||||
|
||||
},
|
||||
expanded: function(next,span) {
|
||||
span.removeClass(this.minus_class);
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
/*---------------------------------------------------------
|
||||
* OpenERP Web Mobile List View
|
||||
*---------------------------------------------------------*/
|
||||
|
||||
openerp.web_mobile.list_mobile = function (openerp) {
|
||||
|
||||
openerp.web_mobile.ListView = openerp.base.Widget.extend({
|
||||
init: function(session, element_id, list_id) {
|
||||
this._super(session, element_id);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*---------------------------------------------------------
|
||||
* OpenERP Web Mobile
|
||||
*---------------------------------------------------------*/
|
||||
|
||||
openerp.web_mobile = function(instance) {
|
||||
openerp.web_mobile.chrome_mobile(instance);
|
||||
openerp.web_mobile.list_mobile(instance);
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>OpenERP Web Mobile</title>
|
||||
<link rel="stylesheet" href="/web_mobile/static/lib/jquery_mobile/css/jquery.mobile-1.0a4.1.css" />
|
||||
|
||||
<link rel="stylesheet" href="/web_mobile/static/lib/jquery_mobile/css/jquery.mobile-1.0a4.1.css"/>
|
||||
<link rel="stylesheet" href="/web_mobile/static/src/css/web_mobile.css"/>
|
||||
|
||||
<script type="text/javascript" src="/base/static/lib/jquery/jquery-1.6.2.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.ui/js/jquery-ui-1.8.9.custom.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/web_mobile/static/lib/jquery_mobile/js/jquery.mobile-1.0a4.1.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/jquery.ba-bbq/jquery.ba-bbq.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/underscore/underscore.js"></script>
|
||||
<script type="text/javascript" src="/base/static/lib/underscore/underscore.string.js"></script>
|
||||
<script type="text/javascript" src="/web_mobile/static/lib/jquery_mobile/js/jquery.mobile-1.0a4.1.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/base/static/lib/qweb/qweb2.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/base/static/src/js/boot.js"></script>
|
||||
<script type="text/javascript" src="/base/static/src/js/core.js"></script>
|
||||
<script type="text/javascript" src="/base/static/src/js/chrome.js"></script>
|
||||
@@ -26,7 +26,6 @@
|
||||
<script type="text/javascript" src="/web_mobile/static/src/js/list_mobile.js"></script>
|
||||
<script type="text/javascript" src="/web_mobile/static/src/js/form_mobile.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/web_mobile/static/src/css/web_mobile.css"/>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
QWeb = window.QWeb || new QWeb2.Engine();
|
||||
@@ -34,11 +33,8 @@
|
||||
oe.web_mobile.mobilewebclient("moe");
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="moe" class="openerp" data-role="page"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -70,6 +70,87 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="Shortcuts">
|
||||
<ul data-dividertheme="b" data-theme="c" data-inset="true" data-role="listview" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
|
||||
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-btn ui-bar-b ui-corner-top ui-btn-up-undefined">
|
||||
Shortcuts
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" t-foreach="sc" t-as="opt">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a href="#" class="ui-link-inherit" t-att-data-menu="opt.id" t-att-data-name="opt.name" t-att-data-res="opt.res_id">
|
||||
<span><t t-esc="opt.name"/></span>
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="Menu">
|
||||
<ul data-dividertheme="b" data-theme="c" data-inset="true" data-role="listview" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
|
||||
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-btn ui-bar-b ui-corner-top ui-btn-up-undefined">
|
||||
Menu
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" t-foreach="data.children" t-as="menu">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a href="#" class="ui-link-inherit" t-att-data-menu="menu.id" t-att-data-name="menu.name">
|
||||
<span><t t-esc="menu.name"/></span>
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="Menu.secondary">
|
||||
<div role="main" class="ui-content" data-role="content">
|
||||
<ul data-role="listview" class="ui-listview">
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" t-foreach="menu.children" t-as="menu">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a href="#" class="ui-link-inherit" t-attf-id="menu_#{menu.id}" t-att-data-menu="menu.id" t-att-data-name="menu.name">
|
||||
<span><t t-esc="menu.name"/></span>
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="Options">
|
||||
<ul data-dividertheme="b" data-theme="c" data-inset="true" data-role="listview" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
|
||||
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-btn ui-bar-b ui-corner-top ui-btn-up-undefined">
|
||||
Options
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a id="logout" href="#" class="ui-link-inherit">
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a id="pref" href="#" class="ui-link-inherit">
|
||||
Preferences
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="ListView">
|
||||
<div role="main" class="ui-content" data-role="content">
|
||||
<form class="ui-listview-filter ui-bar-c" role="search">
|
||||
@@ -254,86 +335,4 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
<t t-name="Shortcuts">
|
||||
<ul data-dividertheme="b" data-theme="c" data-inset="true" data-role="listview" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
|
||||
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-btn ui-bar-b ui-corner-top ui-btn-up-undefined">
|
||||
Shortcuts
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" t-foreach="sc" t-as="opt">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a href="#" class="ui-link-inherit" t-att-data-menu="opt.id" t-att-data-name="opt.name" t-att-data-res="opt.res_id">
|
||||
<span><t t-esc="opt.name"/></span>
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="Menu">
|
||||
<ul data-dividertheme="b" data-theme="c" data-inset="true" data-role="listview" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
|
||||
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-btn ui-bar-b ui-corner-top ui-btn-up-undefined">
|
||||
Menu
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" t-foreach="data.children" t-as="menu">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a href="#" class="ui-link-inherit" t-att-data-menu="menu.id" t-att-data-name="menu.name">
|
||||
<span><t t-esc="menu.name"/></span>
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="Menu.secondary">
|
||||
<div role="main" class="ui-content" data-role="content">
|
||||
<ul data-role="listview" class="ui-listview">
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" t-foreach="menu.children" t-as="menu">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a href="#" class="ui-link-inherit" t-attf-id="menu_#{menu.id}" t-att-data-menu="menu.id" t-att-data-name="menu.name">
|
||||
<span><t t-esc="menu.name"/></span>
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="Options">
|
||||
<ul data-dividertheme="b" data-theme="c" data-inset="true" data-role="listview" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
|
||||
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-btn ui-bar-b ui-corner-top ui-btn-up-undefined">
|
||||
Options
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a id="logout" href="#" class="ui-link-inherit">
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c">
|
||||
<div class="ui-btn-inner ui-li">
|
||||
<div class="ui-btn-text">
|
||||
<a id="pref" href="#" class="ui-link-inherit">
|
||||
Preferences
|
||||
</a>
|
||||
</div>
|
||||
<span class="ui-icon ui-icon-arrow-r"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
||||
Reference in New Issue
Block a user