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

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Jul 15 09:01:51 CEST 2011


Author: dietmar
Date: 2011-07-15 09:01:51 +0200 (Fri, 15 Jul 2011)
New Revision: 6310

Modified:
   pve-manager/pve2/www/manager/Utils.js
   pve-manager/pve2/www/manager/qemu/Options.js
Log:
impl. editor for startdate


Modified: pve-manager/pve2/www/manager/Utils.js
===================================================================
--- pve-manager/pve2/www/manager/Utils.js	2011-07-15 06:59:28 UTC (rev 6309)
+++ pve-manager/pve2/www/manager/Utils.js	2011-07-15 07:01:51 UTC (rev 6310)
@@ -47,7 +47,12 @@
     BondName: function(v) {
         return (/^bond\d{1,4}$/).test(v);
     },
-    BondNameText: 'Allowable bond names: bond<b>N</b>, where 0 <= <b>N</b> <= 9999'
+    BondNameText: 'Allowable bond names: bond<b>N</b>, where 0 <= <b>N</b> <= 9999',
+
+    QemuStartDate: function(v) {
+	return (/^(now|\d{4}-\d{1,2}-\d{1,2}(T\d{1,2}:\d{1,2}:\d{1,2})?)$/).test(v);
+    },
+    QemuStartDateText: 'Valid format for date are: "now" or "2006-06-17T16:01:21" or "2006-06-17"'
 });
 
 // we dont want that a display field set the form dirty flag! 

Modified: pve-manager/pve2/www/manager/qemu/Options.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Options.js	2011-07-15 06:59:28 UTC (rev 6309)
+++ pve-manager/pve2/www/manager/qemu/Options.js	2011-07-15 07:01:51 UTC (rev 6310)
@@ -134,7 +134,20 @@
 	    },
 	    startdate: {
 		header: 'RTC start date',
-		defaultValue: 'now'
+		defaultValue: 'now',
+		editor: {
+		    xtype: 'pveWindowEdit',
+		    title: 'RTC start date',
+		    items: {
+			xtype: 'pvetextfield',
+			name: 'startdate',
+			deleteEmpty: true,
+			value: 'now',
+			fieldLabel: 'RTC start date',
+			vtype: 'QemuStartDate',
+			allowBlank: true
+		    }
+		}
 	    }
 	};
 



More information about the pve-devel mailing list