Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
---
 www/mobile/Datacenter.js  | 38 ++++++++++++--------------------------
 www/mobile/LXCSummary.js  | 18 +-----------------
 www/mobile/Migrate.js     | 11 ++---------
 www/mobile/NodeSummary.js | 18 +-----------------
 www/mobile/QemuSummary.js | 18 +-----------------
 www/mobile/TaskList.js    | 18 +-----------------
 www/mobile/TaskViewer.js  | 11 +----------
 www/mobile/Workspace.js   | 15 ++++-----------
 8 files changed, 23 insertions(+), 124 deletions(-)

diff --git a/www/mobile/Datacenter.js b/www/mobile/Datacenter.js
index a3c8eac..21470f0 100644
--- a/www/mobile/Datacenter.js
+++ b/www/mobile/Datacenter.js
@@ -34,33 +34,10 @@ Ext.define('PVE.Datacenter', {
     config: {
        appUrl: '',
        items: [
-           { 
-               xtype: 'titlebar',
-               docked: 'top',
+           {
+               xtype: 'pveTitleBar',
                title: gettext('Datacenter'),
-               items: [
-                   { 
-                       xtype: 'button',
-                       align: 'right',
-                       iconCls: 'refresh',
-                       handler: function() {
-                           this.up('pvePage').reload();
-                       }
-                   },
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true,
-                       menuItems: [
-                           { 
-                               text: gettext('Tasks'),
-                               handler: function() {
-                                   PVE.Workspace.gotoPage('tasks');
-                               }
-                           }
-                       ]
-                   }
-               ]
+               pveBackButton: false
            },
            {
                xtype: 'pveClusterInfo'
@@ -139,6 +116,15 @@ Ext.define('PVE.Datacenter', {
     initialize: function() {
        var me = this;
 
+       me.down('pveMenuButton').setMenuItems([
+           {
+               text: gettext('Tasks'),
+               handler: function() {
+                   PVE.Workspace.gotoPage('tasks');
+               }
+           }
+       ]);
+
        me.reload();
     }
 
diff --git a/www/mobile/LXCSummary.js b/www/mobile/LXCSummary.js
index d423249..15f8005 100644
--- a/www/mobile/LXCSummary.js
+++ b/www/mobile/LXCSummary.js
@@ -32,23 +32,7 @@ Ext.define('PVE.LXCSummary', {
     config: {
        items: [
            {
-               xtype: 'titlebar',
-               docked: 'top',
-               items: [
-                   {
-                       xtype: 'button',
-                       align: 'right',
-                       iconCls: 'refresh',
-                       handler: function() {
-                           this.up('pvePage').reload();
-                       }
-                   },
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+               xtype: 'pveTitleBar'
            },
            {
                xtype: 'component',
diff --git a/www/mobile/Migrate.js b/www/mobile/Migrate.js
index 46eddaf..f0b7995 100644
--- a/www/mobile/Migrate.js
+++ b/www/mobile/Migrate.js
@@ -8,15 +8,8 @@ Ext.define('PVE.MigrateBase', {
     config: {
        items: [
            {
-               xtype: 'titlebar',
-               docked: 'top',
-               items: [
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+               xtype: 'pveTitleBar',
+               pveReloadButton: false
            },
            { 
                xtype: 'formpanel',
diff --git a/www/mobile/NodeSummary.js b/www/mobile/NodeSummary.js
index 34703c9..94de3c9 100644
--- a/www/mobile/NodeSummary.js
+++ b/www/mobile/NodeSummary.js
@@ -48,23 +48,7 @@ Ext.define('PVE.NodeSummary', {
     config: {
        items: [
            { 
-               xtype: 'titlebar',
-               docked: 'top',
-               items: [
-                   { 
-                       xtype: 'button',
-                       align: 'right',
-                       iconCls: 'refresh',
-                       handler: function() {
-                           this.up('pvePage').reload();
-                       }
-                   },
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+               xtype: 'pveTitleBar'
            },
            {
                xtype: 'pveNodeInfo'
diff --git a/www/mobile/QemuSummary.js b/www/mobile/QemuSummary.js
index a0b3ef0..ad72460 100644
--- a/www/mobile/QemuSummary.js
+++ b/www/mobile/QemuSummary.js
@@ -32,23 +32,7 @@ Ext.define('PVE.QemuSummary', {
     config: {
        items: [
            { 
-               xtype: 'titlebar',
-               docked: 'top',
-               items: [
-                   { 
-                       xtype: 'button',
-                       align: 'right',
-                       iconCls: 'refresh',
-                       handler: function() {
-                           this.up('pvePage').reload();
-                       }
-                   },
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+               xtype: 'pveTitleBar'
            },
            {
                xtype: 'component',
diff --git a/www/mobile/TaskList.js b/www/mobile/TaskList.js
index 79876da..dccb5a0 100644
--- a/www/mobile/TaskList.js
+++ b/www/mobile/TaskList.js
@@ -5,23 +5,7 @@ Ext.define('PVE.TaskListBase', {
        baseUrl: undefined,
        items: [
            {
-               xtype: 'titlebar',
-               docked: 'top',
-               items: [
-                   { 
-                       xtype: 'button',
-                       align: 'right',
-                       iconCls: 'refresh',
-                       handler: function() {
-                           this.up('pvePage').reload();
-                       }
-                   },
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+               xtype: 'pveTitleBar'
            },
            {
                xtype: 'list',
diff --git a/www/mobile/TaskViewer.js b/www/mobile/TaskViewer.js
index 78db11b..1e6143c 100644
--- a/www/mobile/TaskViewer.js
+++ b/www/mobile/TaskViewer.js
@@ -16,16 +16,7 @@ Ext.define('PVE.TaskViewer', {
     config: {
        items: [
            { 
-               xtype: 'titlebar',
-               title: gettext("Task Viewer"),
-               docked: 'top',
-               items: [
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+               xtype: 'pveTitleBar'
            },
            {
                itemId: 'taskStatus',
diff --git a/www/mobile/Workspace.js b/www/mobile/Workspace.js
index 59e4522..eacb90b 100644
--- a/www/mobile/Workspace.js
+++ b/www/mobile/Workspace.js
@@ -26,17 +26,10 @@ Ext.define('PVE.ErrorPage', {
            align: 'stretch'
        },
        items: [
-           { 
-               xtype: 'titlebar',
-               docked: 'top',
-               title: gettext('Error'),
-               items: [
-                   {
-                       xtype: 'pveMenuButton',
-                       align: 'right',
-                       pveStdMenu: true
-                   }
-               ]
+           {
+               xtype: 'pveTitleBar',
+               pveBackButton: false,
+               title: gettext('Error')
            }
        ]
     }
-- 
2.1.4

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to