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

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Jul 5 11:39:26 CEST 2010


Author: dietmar
Date: 2010-07-05 09:39:26 +0000 (Mon, 05 Jul 2010)
New Revision: 4874

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/PVECache.js
   pve-manager/pve2/www/manager/PVEFilter.js
   pve-manager/pve2/www/manager/PVEUtils.js
   pve-manager/pve2/www/manager/ResourceTree.js
Log:
* www/manager/PVEUtils.js: s/default_groups/default_view/



Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2010-07-05 09:34:00 UTC (rev 4873)
+++ pve-manager/pve2/ChangeLog	2010-07-05 09:39:26 UTC (rev 4874)
@@ -1,5 +1,7 @@
 2010-07-05  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/PVEUtils.js: s/default_groups/default_view/
+
 	* www/manager/PVECache.js: remove unnecessary 'viewname'
 
 	* www/manager/PVEUtils.js: add filterfn - enable filtered views

Modified: pve-manager/pve2/www/manager/PVECache.js
===================================================================
--- pve-manager/pve2/www/manager/PVECache.js	2010-07-05 09:34:00 UTC (rev 4873)
+++ pve-manager/pve2/www/manager/PVECache.js	2010-07-05 09:39:26 UTC (rev 4874)
@@ -176,7 +176,7 @@
 
 	    setGroupFilter: function(viewname, filterinfo) {
 
-		item_filter_fn = PVE.Utils.default_groups[viewname].filterfn;
+		item_filter_fn = PVE.Utils.default_views[viewname].filterfn;
 
 		group_filter = filterinfo;
 

Modified: pve-manager/pve2/www/manager/PVEFilter.js
===================================================================
--- pve-manager/pve2/www/manager/PVEFilter.js	2010-07-05 09:34:00 UTC (rev 4873)
+++ pve-manager/pve2/www/manager/PVEFilter.js	2010-07-05 09:39:26 UTC (rev 4874)
@@ -110,7 +110,7 @@
 	
 	var win = this;
 
-	var viewinfo = PVE.Utils.default_groups[config.loadview || PVE.Utils.default_group];
+	var viewinfo = PVE.Utils.default_views[config.loadview || PVE.Utils.default_view];
 
 	var grid = new PVE.FilterGrid({ border: false });
 
@@ -163,9 +163,9 @@
 	};
 
 	var viewlist = [];
-	for (var viewname in PVE.Utils.default_groups) {
+	for (var viewname in PVE.Utils.default_views) {
 	    var btn = {
-		text: PVE.Utils.default_groups[viewname].text,
+		text: PVE.Utils.default_views[viewname].text,
 		itemId: viewname,
 		listeners: {
 		    click: function(btn) {

Modified: pve-manager/pve2/www/manager/PVEUtils.js
===================================================================
--- pve-manager/pve2/www/manager/PVEUtils.js	2010-07-05 09:34:00 UTC (rev 4873)
+++ pve-manager/pve2/www/manager/PVEUtils.js	2010-07-05 09:39:26 UTC (rev 4874)
@@ -282,9 +282,9 @@
 	return res;
     };
 
-    utils.default_group = 'server';
+    utils.default_view = 'server';
 
-    utils.default_groups = {
+    utils.default_views = {
 	custom: {
 	    text: 'Custom View',
 	    fields: Ext.apply({}, visible_fields),
@@ -312,9 +312,9 @@
 
     utils.changeViewDefaults = function(view, viewinfo) {
 	console.log("change view defaults" + view);
-	utils.default_groups[view].fields = 
+	utils.default_views[view].fields = 
 	    Ext.apply({}, viewinfo.fields);
-	utils.default_groups[view].groups = 
+	utils.default_views[view].groups = 
 	    [].concat(viewinfo.groups);
     };
 
@@ -322,7 +322,7 @@
 
 	var res = [];
 
-	var groupinfo = utils.default_groups[view];
+	var viewinfo = utils.default_views[view];
 
 	for (field in field_defaults) {
 	    var info = field_defaults[field];
@@ -332,7 +332,7 @@
 		fi.renderer = info.renderer;
 	    if (info.width)
 		fi.width = info.width;
-	    if (!groupinfo.fields[field])
+	    if (!viewinfo.fields[field])
 		fi.hidden = true;
 	    
 	    res.push(fi);

Modified: pve-manager/pve2/www/manager/ResourceTree.js
===================================================================
--- pve-manager/pve2/www/manager/ResourceTree.js	2010-07-05 09:34:00 UTC (rev 4873)
+++ pve-manager/pve2/www/manager/ResourceTree.js	2010-07-05 09:39:26 UTC (rev 4874)
@@ -164,7 +164,7 @@
 
 PVE.ResourceTree = Ext.extend(Ext.tree.TreePanel, {
 
-    viewname: PVE.Utils.default_group,
+    viewname: PVE.Utils.default_view,
 
     initView: function(viewname) {
 	this.viewname = viewname;
@@ -221,8 +221,8 @@
 
 	//console.log("update tree " + tree);
 
-	var groups = [].concat(PVE.Utils.default_groups[this.viewname].groups);
-	var filterfn = PVE.Utils.default_groups[this.viewname].filterfn;
+	var groups = [].concat(PVE.Utils.default_views[this.viewname].groups);
+	var filterfn = PVE.Utils.default_views[this.viewname].filterfn;
 
 	var rootnode = tree.getRootNode();
 	if (!rootnode)
@@ -331,8 +331,8 @@
 	tree.storelist = PVE.Cache.storelist;
 
 	var groupdef = [];
-	for (var viewname in PVE.Utils.default_groups) {
-	    groupdef.push([viewname, PVE.Utils.default_groups[viewname].text]);
+	for (var viewname in PVE.Utils.default_views) {
+	    groupdef.push([viewname, PVE.Utils.default_views[viewname].text]);
 	};
 
 	var viewcombo = new Ext.form.ComboBox({



More information about the pve-devel mailing list