[pve-devel] [PATCH pve-manager 2/2] Add back button to titlebar and Datacenter button to menu

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Sep 21 16:15:39 CEST 2015


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/mobile/LXCSummary.js  |  8 ++++++++
 www/mobile/MenuButton.js  | 14 +++++++++++++-
 www/mobile/NodeSummary.js |  8 ++++++++
 www/mobile/QemuSummary.js |  8 ++++++++
 www/mobile/TaskList.js    |  8 ++++++++
 www/mobile/TaskViewer.js  |  8 ++++++++
 6 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/www/mobile/LXCSummary.js b/www/mobile/LXCSummary.js
index d423249..cb4a778 100644
--- a/www/mobile/LXCSummary.js
+++ b/www/mobile/LXCSummary.js
@@ -35,6 +35,14 @@ Ext.define('PVE.LXCSummary', {
 		xtype: 'titlebar',
 		docked: 'top',
 		items: [
+		   {
+			xtype: 'button',
+			align: 'left',
+			iconCls: 'arrow_left',
+			handler: function() {
+			    PVE.Workspace.goBack();
+			}
+		    },
 		    {
 			xtype: 'button',
 			align: 'right',
diff --git a/www/mobile/MenuButton.js b/www/mobile/MenuButton.js
index 7b7205b..f48a8db 100644
--- a/www/mobile/MenuButton.js
+++ b/www/mobile/MenuButton.js
@@ -22,6 +22,18 @@ Ext.define('PVE.MenuButton', {
 	};
 
 	var items = [];
+
+	if (me.getPveStdMenu()) {
+	    items.push({
+		xtype: 'button',
+		ui: 'plain',
+		text: gettext('Datacenter'),
+		handler: addHide(function() {
+		    PVE.Workspace.gotoPage('');
+		})
+	    });
+	}
+
 	data.forEach(function(el) {
 	    items.push(Ext.apply(el, {
 		xtype: 'button',
@@ -85,4 +97,4 @@ Ext.define('PVE.MenuButton', {
 	}
 
     }
-});
\ No newline at end of file
+});
diff --git a/www/mobile/NodeSummary.js b/www/mobile/NodeSummary.js
index 34703c9..791fac9 100644
--- a/www/mobile/NodeSummary.js
+++ b/www/mobile/NodeSummary.js
@@ -51,6 +51,14 @@ Ext.define('PVE.NodeSummary', {
 		xtype: 'titlebar',
 		docked: 'top',
 		items: [
+		   {
+			xtype: 'button',
+			align: 'left',
+			iconCls: 'arrow_left',
+			handler: function() {
+			    PVE.Workspace.goBack();
+			}
+		    },
 		    { 
 			xtype: 'button',
 			align: 'right',
diff --git a/www/mobile/QemuSummary.js b/www/mobile/QemuSummary.js
index a0b3ef0..6ae7e39 100644
--- a/www/mobile/QemuSummary.js
+++ b/www/mobile/QemuSummary.js
@@ -35,6 +35,14 @@ Ext.define('PVE.QemuSummary', {
 		xtype: 'titlebar',
 		docked: 'top',
 		items: [
+		   {
+			xtype: 'button',
+			align: 'left',
+			iconCls: 'arrow_left',
+			handler: function() {
+			    PVE.Workspace.goBack();
+			}
+		    },
 		    { 
 			xtype: 'button',
 			align: 'right',
diff --git a/www/mobile/TaskList.js b/www/mobile/TaskList.js
index 79876da..5007086 100644
--- a/www/mobile/TaskList.js
+++ b/www/mobile/TaskList.js
@@ -8,6 +8,14 @@ Ext.define('PVE.TaskListBase', {
 		xtype: 'titlebar',
 		docked: 'top',
 		items: [
+		    {
+			xtype: 'button',
+			align: 'left',
+			iconCls: 'arrow_left',
+			handler: function() {
+			    PVE.Workspace.goBack();
+			}
+		    },
 		    { 
 			xtype: 'button',
 			align: 'right',
diff --git a/www/mobile/TaskViewer.js b/www/mobile/TaskViewer.js
index 78db11b..98630d3 100644
--- a/www/mobile/TaskViewer.js
+++ b/www/mobile/TaskViewer.js
@@ -21,6 +21,14 @@ Ext.define('PVE.TaskViewer', {
 		docked: 'top',
 		items: [
 		    {
+			xtype: 'button',
+			align: 'left',
+			iconCls: 'arrow_left',
+			handler: function() {
+			    PVE.Workspace.goBack();
+			}
+		    },
+		    {
 			xtype: 'pveMenuButton',
 			align: 'right',
 			pveStdMenu: true
-- 
2.1.4



More information about the pve-devel mailing list