[icinga-checkins] icinga.org: icinga-web/jmosshammer/default2: * Added ajax driven principalentry proposal for PrincipalEditor ( fixes #438)

git at icinga.org git at icinga.org
Thu May 20 13:12:48 CEST 2010


Module: icinga-web
Branch: jmosshammer/default2
Commit: 169aadeed95b10ec7af6a64fd0dba01d8bda8d08
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=169aadeed95b10ec7af6a64fd0dba01d8bda8d08

Author: jmosshammer <jannis.mosshammer at netways.de>
Date:   Thu May 20 13:06:54 2010 +0200

* Added ajax driven principalentry proposal for PrincipalEditor (fixes #438)

---

 .../templates/Admin/PrincipalEditorSuccess.php     |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php b/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php
index 9ef84cb..884a3a6 100755
--- a/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php
+++ b/app/modules/AppKit/templates/Admin/PrincipalEditorSuccess.php
@@ -48,7 +48,13 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 		storeId: 'editorStore',
 
 	}),
-	
+	noStore: mew Ext.data.ArrayStore({
+		autoDestroy:false,
+		storeId: 'noStore',
+		idIndex: 0,
+		fields: [],
+		data: []
+	}),
 	setupEditor: function() {
 		this.editor = new Ext.tree.TreeEditor(this, new Ext.form.ComboBox({
 				typeAhead:true,
@@ -120,7 +126,7 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 
 	prepareEditValue: function(node) {
 		// @fixme: yep, looks stupid.
-		AppKit.log(node);
+.
 		var field = node.field.field_description.field;
 		var target = node.field.field_description.target;
 		this.editorStore.removeAll();
@@ -167,7 +173,7 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 						  });
 			subNode.field = field;
 			subNode.type = "value";
-
+			subNode.isAPIPrincipal = record.get('type') == 'icinga';
 			subNode.on("click", function(el) {
 				this.prepareEditValue(el);
 				return true;
@@ -245,6 +251,7 @@ AppKit.principalEditor.principalSelector = Ext.extend(Ext.tree.TreePanel,{
 				}
 			}
 			desc_Record.set("fields",fields);
+
 			this.addPrincipal(desc_Record);
 			if(desc_Record.store)
 				desc_Record.store.remove(desc_Record);





More information about the icinga-checkins mailing list