[pve-devel] r6301 - in pve-manager/pve2: . www/manager/qemu www/manager/window

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 14 12:31:53 CEST 2011


Author: dietmar
Date: 2011-07-14 12:31:53 +0200 (Thu, 14 Jul 2011)
New Revision: 6301

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/qemu/Options.js
   pve-manager/pve2/www/manager/window/Edit.js
Log:
impl. editor for Notes


Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2011-07-14 10:20:19 UTC (rev 6300)
+++ pve-manager/pve2/ChangeLog	2011-07-14 10:31:53 UTC (rev 6301)
@@ -1,5 +1,10 @@
 2011-07-14  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/window/Edit.js: change alias to
+	'widget.pveWindowEdit' (I got unexpected side effects when using
+	'widget.PVE.window.Edit'). Anyway, the new name is better because
+	does not contains dots, so you can use it in ComponentQuery.
+
 	* www/manager/dc/UserEdit.js: added expire field, modify expire
 	value on load to make it work with datefield.
 

Modified: pve-manager/pve2/www/manager/qemu/Options.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Options.js	2011-07-14 10:20:19 UTC (rev 6300)
+++ pve-manager/pve2/www/manager/qemu/Options.js	2011-07-14 10:31:53 UTC (rev 6301)
@@ -23,7 +23,7 @@
 		defaultValue: me.pveSelNode.data.name,
 		header: 'Name',
 		editor: {
-		    xtype: 'PVE.window.Edit',
+		    xtype: 'pveWindowEdit',
 		    title: 'VM name',
 		    items: {
 			xtype: 'textfield',
@@ -39,7 +39,7 @@
 		defaultValue: '',
 		renderer: PVE.Utils.format_boolean_with_default,
 		editor: {
-		    xtype: 'PVE.window.Edit',
+		    xtype: 'pveWindowEdit',
 		    title: 'Start at boot',
 		    items: {
 			xtype: 'booleanfield',
@@ -64,7 +64,7 @@
 		defaultValue: true,
 		renderer: PVE.Utils.format_boolean,
 		editor: {
-		    xtype: 'PVE.window.Edit',
+		    xtype: 'pveWindowEdit',
 		    title: 'ACPI support',
 		    items: {
 			xtype: 'pvecheckbox',
@@ -82,7 +82,7 @@
 		defaultValue: true,
 		renderer: PVE.Utils.format_boolean,
 		editor: {
-		    xtype: 'PVE.window.Edit',
+		    xtype: 'pveWindowEdit',
 		    title: 'KVM hardware virtualization',
 		    items: {
 			xtype: 'pvecheckbox',
@@ -100,7 +100,7 @@
 		defaultValue: false,
 		renderer: PVE.Utils.format_boolean,
 		editor: {
-		    xtype: 'PVE.window.Edit',
+		    xtype: 'pveWindowEdit',
 		    title: 'Freeze CPU at startup',
 		    items: {
 			xtype: 'pvecheckbox',
@@ -118,7 +118,7 @@
 		defaultValue: false,
 		renderer: PVE.Utils.format_boolean,
 		editor: {
-		    xtype: 'PVE.window.Edit',
+		    xtype: 'pveWindowEdit',
 		    title: 'Use local time for RTC',
 		    items: {
 			xtype: 'pvecheckbox',
@@ -138,7 +138,23 @@
 	    }, 
 	    description: {
 		header: 'Notes',
-		required: true
+		required: true,
+		renderer: function(value, metaData) {
+		    metaData.style = 'white-space:pre;';
+		    return Ext.htmlEncode(value);
+		},
+		editor: {
+		    xtype: 'pveWindowEdit',
+		    title: 'Notes',
+		    width: 600,
+		    layout: 'fit',
+		    items: {
+			xtype: 'textarea',
+			name: 'description',
+			rows: 10,
+			hideLabel: true
+		    }
+		}
 	    }
 	};
 
@@ -168,12 +184,12 @@
 		    url: '/api2/extjs/' + baseurl
 		});
 	    } else {
-		Ext.apply(rowdef.editor, {
+		var config = Ext.apply({
 		    pveSelNode: me.pveSelNode,
 		    confid: rec.data.key,
 		    url: '/api2/extjs/' + baseurl
-		});
-		win = Ext.createWidget(rowdef.editor.xtype, rowdef.editor);
+		}, rowdef.editor);
+		win = Ext.createWidget(rowdef.editor.xtype, config);
 		win.load();
 	    }
 

Modified: pve-manager/pve2/www/manager/window/Edit.js
===================================================================
--- pve-manager/pve2/www/manager/window/Edit.js	2011-07-14 10:20:19 UTC (rev 6300)
+++ pve-manager/pve2/www/manager/window/Edit.js	2011-07-14 10:31:53 UTC (rev 6301)
@@ -1,10 +1,9 @@
 // fixme: how can we avoid those lint errors?
 /*jslint confusion: true */
-
 Ext.define('PVE.window.Edit', {
     extend: 'Ext.window.Window',
-    alias: 'widget.PVE.window.Edit',
-
+    alias: 'widget.pveWindowEdit',
+ 
     resizable: false,
 
     // set create to true if you want a CREAT button (instead 



More information about the pve-devel mailing list