public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0
@ 2021-05-26  9:13 Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 1/4] change ui to 'pve-nav' Dominik Csapak
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:13 UTC (permalink / raw)
  To: pmg-devel

1/4-3/4 are backwards compatible with extjs 6.0.1

4/4 only works correctly with extjs 7.0

Dominik Csapak (4):
  change ui to 'pve-nav'
  {Attachment,Spam,Virus}Quarantine: fix layout for iframe
  MainView: use new beforeChangePath signature
  MainView: fix redirectTo call

 css/ext6-pmg.css           |  2 +-
 js/AttachmentQuarantine.js |  1 +
 js/ConfigPanel.js          |  2 +-
 js/MainView.js             | 12 +++++++++---
 js/NavigationTree.js       |  2 +-
 js/SpamQuarantine.js       |  1 +
 js/VirusQuarantine.js      |  1 +
 7 files changed, 15 insertions(+), 6 deletions(-)

-- 
2.20.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pmg-devel] [PATCH pmg-gui 1/4] change ui to 'pve-nav'
  2021-05-26  9:13 [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Dominik Csapak
@ 2021-05-26  9:13 ` Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 2/4] {Attachment, Spam, Virus}Quarantine: fix layout for iframe Dominik Csapak
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:13 UTC (permalink / raw)
  To: pmg-devel

since 'nav' contains some styling we do not want (in extjs 7.0)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 css/ext6-pmg.css     | 2 +-
 js/ConfigPanel.js    | 2 +-
 js/MainView.js       | 2 +-
 js/NavigationTree.js | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/css/ext6-pmg.css b/css/ext6-pmg.css
index 68b008b..b9d916f 100644
--- a/css/ext6-pmg.css
+++ b/css/ext6-pmg.css
@@ -138,7 +138,7 @@ table:not(.x-grid-item-selected) tr.x-grid-row.disabled {
     color: #000;
 }
 
-.x-treelist-nav {
+.x-treelist-pve-nav {
     background-color: #f5f5f5;
     border-right: 1px solid #cfcfcf;
 }
diff --git a/js/ConfigPanel.js b/js/ConfigPanel.js
index c7148cb..f6aaaad 100644
--- a/js/ConfigPanel.js
+++ b/js/ConfigPanel.js
@@ -58,7 +58,7 @@ Ext.define('PMG.panel.Config', {
 	items: {
 	    xtype: 'treelist',
 	    itemId: 'menu',
-	    ui: 'nav',
+	    ui: 'pve-nav',
 	    expanderOnly: true,
 	    expanderFirst: false,
 	    animation: false,
diff --git a/js/MainView.js b/js/MainView.js
index 01b9658..9ebd065 100644
--- a/js/MainView.js
+++ b/js/MainView.js
@@ -233,7 +233,7 @@ Ext.define('PMG.MainView', {
 		},
 	    }, {
 		xtype: 'box',
-		cls: 'x-treelist-nav',
+		cls: 'x-treelist-pve-nav',
 		flex: 1,
 	    }],
 	},
diff --git a/js/NavigationTree.js b/js/NavigationTree.js
index 63f8e94..2c4d5a5 100644
--- a/js/NavigationTree.js
+++ b/js/NavigationTree.js
@@ -224,5 +224,5 @@ Ext.define('PMG.view.main.NavigationTree', {
     expanderOnly: true,
     expanderFirst: false,
     store: 'NavigationStore',
-    ui: 'nav',
+    ui: 'pve-nav',
 });
-- 
2.20.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pmg-devel] [PATCH pmg-gui 2/4] {Attachment, Spam, Virus}Quarantine: fix layout for iframe
  2021-05-26  9:13 [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 1/4] change ui to 'pve-nav' Dominik Csapak
@ 2021-05-26  9:13 ` Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 3/4] MainView: use new beforeChangePath signature Dominik Csapak
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:13 UTC (permalink / raw)
  To: pmg-devel

in extjs 7.0 the css changed slightly so that we need to define
the 'fit' layout explicitely to maintain the full width/height

otherwise it can happen that the iframe gets cut off

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 js/AttachmentQuarantine.js | 1 +
 js/SpamQuarantine.js       | 1 +
 js/VirusQuarantine.js      | 1 +
 3 files changed, 3 insertions(+)

diff --git a/js/AttachmentQuarantine.js b/js/AttachmentQuarantine.js
index f1a9a54..6449012 100644
--- a/js/AttachmentQuarantine.js
+++ b/js/AttachmentQuarantine.js
@@ -146,6 +146,7 @@ Ext.define('PMG.AttachmentQuarantine', {
 	    title: gettext('Selected Mail'),
 	    border: false,
 	    region: 'center',
+	    layout: 'fit',
 	    split: true,
 	    reference: 'preview',
 	    disabled: true,
diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js
index daa3a69..58cf74c 100644
--- a/js/SpamQuarantine.js
+++ b/js/SpamQuarantine.js
@@ -308,6 +308,7 @@ Ext.define('PMG.SpamQuarantine', {
 	    title: gettext('Selected Mail'),
 	    border: false,
 	    region: 'center',
+	    layout: 'fit',
 	    split: true,
 	    reference: 'preview',
 	    disabled: true,
diff --git a/js/VirusQuarantine.js b/js/VirusQuarantine.js
index d5753dd..6ff1c17 100644
--- a/js/VirusQuarantine.js
+++ b/js/VirusQuarantine.js
@@ -155,6 +155,7 @@ Ext.define('PMG.VirusQuarantine', {
 	    title: gettext('Selected Mail'),
 	    border: false,
 	    region: 'center',
+	    layout: 'fit',
 	    split: true,
 	    reference: 'preview',
 	    disabled: true,
-- 
2.20.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pmg-devel] [PATCH pmg-gui 3/4] MainView: use new beforeChangePath signature
  2021-05-26  9:13 [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 1/4] change ui to 'pve-nav' Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 2/4] {Attachment, Spam, Virus}Quarantine: fix layout for iframe Dominik Csapak
@ 2021-05-26  9:13 ` Dominik Csapak
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 4/4] MainView: fix redirectTo call Dominik Csapak
  2021-06-11 13:19 ` [pmg-devel] applied-series: [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Stoiko Ivanov
  4 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:13 UTC (permalink / raw)
  To: pmg-devel

subpath can be optional in extjs 7.0, so handle that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 js/MainView.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/js/MainView.js b/js/MainView.js
index 9ebd065..0382d1f 100644
--- a/js/MainView.js
+++ b/js/MainView.js
@@ -17,9 +17,15 @@ Ext.define('PMG.MainView', {
 	    },
 	},
 
-	beforeChangePath: function(path, subpath, action) {
+	beforeChangePath: function(path, subpathOrAction, action) {
 	    let me = this;
 
+	    let subpath = subpathOrAction;
+	    if (!action) {
+		action = subpathOrAction;
+		subpath = undefined;
+	    }
+
 	    if (!Ext.ClassManager.getByAlias('widget.'+ path)) {
 		console.warn('xtype "'+path+'" not found');
 		action.stop();
-- 
2.20.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pmg-devel] [PATCH pmg-gui 4/4] MainView: fix redirectTo call
  2021-05-26  9:13 [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Dominik Csapak
                   ` (2 preceding siblings ...)
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 3/4] MainView: use new beforeChangePath signature Dominik Csapak
@ 2021-05-26  9:13 ` Dominik Csapak
  2021-06-11 13:19 ` [pmg-devel] applied-series: [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Stoiko Ivanov
  4 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:13 UTC (permalink / raw)
  To: pmg-devel

takes now an object as paramter in extjs 7.0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 js/MainView.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/MainView.js b/js/MainView.js
index 0382d1f..cb86ec5 100644
--- a/js/MainView.js
+++ b/js/MainView.js
@@ -153,7 +153,7 @@ Ext.define('PMG.MainView', {
 
 	    // select treeitem and load page from url fragment
 	    let token = Ext.util.History.getToken() || 'pmgDashboard';
-	    this.redirectTo(token, true);
+	    this.redirectTo(token, { force: true });
 	},
     },
 
-- 
2.20.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pmg-devel] applied-series: [PATCH pmg-gui 0/4] fixes/changes extjs 7.0
  2021-05-26  9:13 [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Dominik Csapak
                   ` (3 preceding siblings ...)
  2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 4/4] MainView: fix redirectTo call Dominik Csapak
@ 2021-06-11 13:19 ` Stoiko Ivanov
  4 siblings, 0 replies; 6+ messages in thread
From: Stoiko Ivanov @ 2021-06-11 13:19 UTC (permalink / raw)
  To: Dominik Csapak; +Cc: pmg-devel

On Wed, 26 May 2021 11:13:08 +0200
Dominik Csapak <d.csapak@proxmox.com> wrote:

> 1/4-3/4 are backwards compatible with extjs 6.0.1
> 
> 4/4 only works correctly with extjs 7.0
> 
> Dominik Csapak (4):
>   change ui to 'pve-nav'
>   {Attachment,Spam,Virus}Quarantine: fix layout for iframe
>   MainView: use new beforeChangePath signature
>   MainView: fix redirectTo call
> 
>  css/ext6-pmg.css           |  2 +-
>  js/AttachmentQuarantine.js |  1 +
>  js/ConfigPanel.js          |  2 +-
>  js/MainView.js             | 12 +++++++++---
>  js/NavigationTree.js       |  2 +-
>  js/SpamQuarantine.js       |  1 +
>  js/VirusQuarantine.js      |  1 +
>  7 files changed, 15 insertions(+), 6 deletions(-)
> 

applied-series - huge thanks!




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-11 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26  9:13 [pmg-devel] [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Dominik Csapak
2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 1/4] change ui to 'pve-nav' Dominik Csapak
2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 2/4] {Attachment, Spam, Virus}Quarantine: fix layout for iframe Dominik Csapak
2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 3/4] MainView: use new beforeChangePath signature Dominik Csapak
2021-05-26  9:13 ` [pmg-devel] [PATCH pmg-gui 4/4] MainView: fix redirectTo call Dominik Csapak
2021-06-11 13:19 ` [pmg-devel] applied-series: [PATCH pmg-gui 0/4] fixes/changes extjs 7.0 Stoiko Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal