mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 10:23:28 +01:00
Add ability to specify which actions are available for the no results placeholder
This commit is contained in:
parent
ca5d97f85c
commit
f4fe5cf8b6
@ -73,6 +73,7 @@
|
|||||||
* 'favorites' => // I boolean|array True to enable favorites, or an array of additional, app specific settings to include
|
* 'favorites' => // I boolean|array True to enable favorites, or an array of additional, app specific settings to include
|
||||||
* in the saved filters (eg: pm_id)
|
* in the saved filters (eg: pm_id)
|
||||||
* 'placeholder' => // I String Optional text to display in the empty row placeholder. If not provided, it's "No matches found."
|
* 'placeholder' => // I String Optional text to display in the empty row placeholder. If not provided, it's "No matches found."
|
||||||
|
* 'placeholder_actions' => // I String Optional list of actions allowed on the placeholder. If not provided, it's ["add"].
|
||||||
*/
|
*/
|
||||||
class etemplate_widget_nextmatch extends etemplate_widget
|
class etemplate_widget_nextmatch extends etemplate_widget
|
||||||
{
|
{
|
||||||
@ -354,7 +355,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
foreach($result as $name => $value) if ($name != 'readonlys') error_log(__METHOD__."() result['$name']=".array2string($name == 'data' ? array_keys($value) : $value));
|
//foreach($result as $name => $value) if ($name != 'readonlys') error_log(__METHOD__."() result['$name']=".array2string($name == 'data' ? array_keys($value) : $value));
|
||||||
egw_json_response::get()->data($result);
|
egw_json_response::get()->data($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,17 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// No UID, so return a filtered list of actions that doesn't need a UID
|
// No UID, so return a filtered list of actions that doesn't need a UID
|
||||||
var links = ["add"];
|
var links = [];
|
||||||
|
try {
|
||||||
|
links = this._widget.options.settings.placeholder_actions;
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
// Default
|
||||||
|
if(typeof links == "undefined")
|
||||||
|
{
|
||||||
|
links = ["add"];
|
||||||
|
}
|
||||||
|
|
||||||
return links;
|
return links;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user