R52525 - /trunk/etemplate/js/et2_widget_selectbox.js

Author: ralfbecker
New Revision: 52525

URL: http://svn.stylite.de/viewvc/egroupware?rev=52525&view=rev
Log:
reverting previous commit, as it breaks in other places

Modified:
trunk/etemplate/js/et2_widget_selectbox.js

Modified: trunk/etemplate/js/et2_widget_selectbox.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/etemplate/js/et2_widget_selectbox.js?rev=52525&r1=52524&r2=52525&view=diff

— trunk/etemplate/js/et2_widget_selectbox.js (original)
+++ trunk/etemplate/js/et2_widget_selectbox.js Thu Apr 16 14:10:55 2015
@@ -495,7 +495,9 @@
}
else
{

  •   			this.egw().debug("warn", "Tried to set value '%s' that isn't an option", _value, this);
    
  •   			var debug_value = _value;
    
  •   			if(debug_value === null) debug_value == 'NULL';
    
  •   			this.egw().debug("warn", "Tried to set value '%s' that isn't an option", debug_value, this);
      		}
      		return;
      	}
    

@@ -527,7 +529,9 @@
{
if(jQuery(“input[value=’”+_value+"’]", this.multiOptions).prop(“checked”, true).length == 0)
{

  •   		this.egw().debug("warn", "Tried to set value that isn't an option", this, _value);
    
  •   		var debug_value = _value;
    
  •   		if(debug_value === null) debug_value == 'NULL';
    
  •   		this.egw().debug("warn", "Tried to set value '%s' that isn't an option", debug_value, this);
      	}
      }
    

@@ -770,6 +774,7 @@
{
var name_parts = widget.id.replace(/[/g,’[’).replace(/]|]/g,’’).split(’[’);

  •   var type_options = [];
      var content_options = {};
    
      // First check type, there may be static options.  There's some special handling
    

@@ -785,12 +790,12 @@
attrs.other = attrs.other.split(’,’);
}
// Copy, to avoid accidental modification

  •   	content_options = this[type_function].call(this, widget, attrs);
    
  •   	jQuery.extend(true, type_options, this[type_function].call(this, widget, attrs));
      	widget._type = old_type;
      }
    
      // Try to find the options inside the "sel-options"
    
  •   if(jQuery.isEmptyObject(content_options) && widget.getArrayMgr("sel_options"))
    
  •   if(widget.getArrayMgr("sel_options"))
      {
      	// Try first according to ID
      	content_options = widget.getArrayMgr("sel_options").getEntry(widget.id);
    

@@ -879,6 +884,32 @@
if (content_options == null)
{
content_options = {};

  •   }
    
  •   // Include type options, preferring any content options
    
  •   if(type_options.length || !jQuery.isEmptyObject(type_options))
    
  •   {
    
  •   	for(var i in content_options)
    
  •   	{
    
  •   		var value = typeof content_options[i] == 'object' && typeof content_options[i].value !== 'undefined' ? content_options[i].value : i;
    
  •   		var added = false;
    
  •   		// Override any existing
    
  •   		for(var j in type_options)
    
  •   		{
    
  •   			if(type_options[j].value === value)
    
  •   			{
    
  •   				added = true;
    
  •   				type_options[j] = content_options[i];
    
  •   				break;
    
  •   			}
    
  •   		}
    
  •   		if(!added)
    
  •   		{
    
  •   			type_options.splice(i,0,content_options[i]);
    
  •   		}
    
  •   	}
    
  •   	content_options = type_options;
      }
      return content_options;
    

    },
    @@ -1068,10 +1099,10 @@
    attrs.select_options = egw.window.et2_selectbox.type_cache[this.cache_id];

      		egw.window.setTimeout(jQuery.proxy(function() {
    
  •   			this.widget.set_select_options(egw.window.et2_selectbox.type_cache[this.cache_id]||{});
    
  •   			this.widget.set_select_options(et2_selectbox.find_select_options(this.widget,{}, this.widget.options));
      		},this),1);
      	},{widget:widget,cache_id:cache_id}));
    
  •   	return {};
    
  •   	return [];
      }
      else
      {
    

BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs