mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-22 10:52:00 +02:00
Accept links in appname:id format
This commit is contained in:
parent
efbb743cc6
commit
acd7f43303
@ -701,8 +701,17 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
set_value: function(_value) {
|
set_value: function(_value) {
|
||||||
if(typeof _value != 'object' && _value && !this.options.application)
|
if(typeof _value != 'object' && _value && !this.options.application)
|
||||||
{
|
{
|
||||||
console.warn("Bad value for link widget. Need an object with keys 'app', 'id', and optionally 'title'", _value);
|
if(_value.indexOf(':') >= 0)
|
||||||
return;
|
{
|
||||||
|
var app = _value.split(':',1);
|
||||||
|
var id = _value.substr(app[0].length+1);
|
||||||
|
_value = {'app': app[0], 'id': id};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.warn("Bad value for link widget. Need an object with keys 'app', 'id', and optionally 'title'", _value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Application set, just passed ID
|
// Application set, just passed ID
|
||||||
else if (typeof _value != "object")
|
else if (typeof _value != "object")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user