Fix missing return value from link

This commit is contained in:
Nathan Gray 2012-04-16 21:52:31 +00:00
parent 5750283488
commit 97035b359f
2 changed files with 27 additions and 2 deletions

View File

@ -91,7 +91,6 @@ class etemplate_widget_link extends etemplate_widget
*/
public static function ajax_link_search($app, $type, $pattern, $options=array()) {
$options['type'] = $type ? $type : $options['type'];
error_log("$app, $pattern, $options");
$links = egw_link::query($app, $pattern, $options);
$response = egw_json_response::get();
@ -190,4 +189,30 @@ error_log("$app, $pattern, $options");
$response = egw_json_response::get();
$response->data(egw_link::unlink($value));
}
/**
* Validate input
*
* Following attributes get checked:
* - needed: value must NOT be empty
* - min, max: int and float widget only
* - maxlength: maximum length of string (longer strings get truncated to allowed size)
* - preg: perl regular expression incl. delimiters (set by default for int, float and colorpicker)
* - int and float get casted to their type
*
* @param string $cname current namespace
* @param array $content
* @param array &$validated=array() validated content
*/
public function validate($cname, array $content, &$validated=array())
{
if (!$this->is_readonly($cname))
{
$form_name = self::form_name($cname, $this->id);
$value = $value_in = self::get_array($content, $form_name);
$valid =& self::get_array($validated, $form_name, true);
$valid = $value;
}
}
}

View File

@ -528,7 +528,7 @@ var et2_link_entry = et2_inputWidget.extend({
this.search.addClass("loading");
}
}
else
if(_value.title)
{
this.search.val(_value.title+"");
}