[icinga-checkins] icinga.org: icinga-web/mhein/default: * Added missing iteration in principalEditor

git at icinga.org git at icinga.org
Thu Jan 20 10:24:43 CET 2011


Module: icinga-web
Branch: mhein/default
Commit: 5d53e7c6de37620e8d205b6a7035f19a46670ab2
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=5d53e7c6de37620e8d205b6a7035f19a46670ab2

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Jan 20 09:51:59 2011 +0100

* Added missing iteration in principalEditor

---

 .../templates/Admin/PrincipalEditorSuccess.php     |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php b/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php
index b9df0d4..c6bdbb8 100755
--- a/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php
+++ b/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php
@@ -231,7 +231,6 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 			Ext.iterate(fields, function(target_id, o) {
 			
 				var desc_record = this.getPrincipalDescriptor(target_name);
-				
 				var fields_list = AppKit.principalEditor.fieldConverter(desc_record.get("fields"));
 				
 				var i=0;
@@ -239,14 +238,12 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 				Ext.iterate(o, function(fieldName, fieldValue) {
 					
 					fields_list[i].name = fieldName;
-					fields_list[i].value = fieldValue;
+					fields_list[i++].value = fieldValue;
 					
 				}, this)
 				
 				desc_record.set('fields', fields_list);
 				
-				AppKit.log(desc_record);
-				
 				this.addPrincipal(desc_record);
 				
 				if(desc_record.store) desc_record.store.remove(desc_record);
@@ -257,14 +254,16 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 	},
 	
 	getPrincipalDescriptor: function(pr_name) {
-		store = AppKit.principalEditor.principalStore;
-		
+		var store = AppKit.principalEditor.principalStore;
 		var found = null;
+		
 		store.each(function(record) {
 			if(record.get("name") == pr_name) {
-				found = record.copy(Ext.id());
+				found = record.copy();
+				return false;
 			}
-		});	
+		});
+		
 		return found;
 	},
 	





More information about the icinga-checkins mailing list