[eGroupWare-svn] r55836 - /trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js

[email protected]
Newsgroups gmane.comp.web.egroupware.cvs
Message-ID <[email protected]>
Author: nathangray
Date: Mon Apr 25 22:02:58 2016
New Revision: 55836

URL: http://svn.stylite.de/viewvc/egroupware?rev=55836&view=rev
Log:
Keep value if et2 tried to set it before select_options were there, and it got stripped out

Modified:
    trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js

Modified: trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js?rev=55836&r1=55835&r2=55836&view=diff
==============================================================================
--- trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js Mon Apr 25 22:02:58 2016
@@ -807,7 +807,15 @@
 			this.input.trigger("liszt:updated");
 		}
 		// Sometimes value gets set before options
-		if(this.value || this.options.empty_label) this.set_value(this.value, true);	// true = dont try to set_options, to avoid an infinit recursion
+		if(this.value || this.options.empty_label)
+		{
+			this.set_value(this.value, true);	// true = dont try to set_options, to avoid an infinit recursion
+		}
+		else if (this.value === null && this.options.value)
+		{
+			// Null means it tried to set the value, and it got stripped by missing options
+			this.set_value(this.options.value, true)
+		}
 	},
 
 	getValue: function() {


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.