Author: ralfbecker
New Revision: 55436
URL: http://svn.stylite.de/viewvc/egroupware?rev=55436&view=rev
Log:
modified client-side to call new server-side classes in api, instead compatibility classes in etemplate
Modified:
trunk/egroupware/api/js/etemplate/et2_core_DOMWidget.js
trunk/egroupware/api/js/etemplate/et2_extension_customfields.js
trunk/egroupware/api/js/etemplate/et2_extension_nextmatch_controller.js
trunk/egroupware/api/js/etemplate/et2_widget_entry.js
trunk/egroupware/api/js/etemplate/et2_widget_file.js
trunk/egroupware/api/js/etemplate/et2_widget_htmlarea.js
trunk/egroupware/api/js/etemplate/et2_widget_itempicker.js
trunk/egroupware/api/js/etemplate/et2_widget_link.js
trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js
trunk/egroupware/api/js/etemplate/et2_widget_taglist.js
trunk/egroupware/api/js/etemplate/et2_widget_tree.js
trunk/egroupware/api/js/etemplate/et2_widget_url.js
trunk/egroupware/api/js/etemplate/et2_widget_vfs.js
trunk/egroupware/api/src/Etemplate/Widget/Link.php
trunk/phpgwapi/inc/class.egw_json.inc.php
— trunk/egroupware/api/js/etemplate/et2_core_DOMWidget.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_core_DOMWidget.js Sat Mar 19 17:16:59 2016
@@ -468,7 +468,7 @@
* the more widget-specific parts.
*
* @param {object} actions {ID: {attributes…}+} map of egw action information
-
-
@see etemplate/inc/class.etemplate_widget_nextmatch->egw_actions()
-
-
@see api/src/Etemplate/Widget/Nextmatch.php egw_actions() method
*/
set_actions: function(actions)
{
— trunk/egroupware/api/js/etemplate/et2_extension_customfields.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_extension_customfields.js Sat Mar 19 17:16:59 2016
@@ -627,7 +627,7 @@
// Filemanager select
{
label: ‘’,
-
method: 'EGroupware\\Api\\Etemplate\\Widget\\Link::link_existing',
method_id: attrs.path,
button_label: egw.lang('Link')
},{type: 'vfs-select'});
— trunk/egroupware/api/js/etemplate/et2_extension_nextmatch_controller.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_extension_nextmatch_controller.js Sat Mar 19 17:16:59 2016
@@ -390,7 +390,7 @@
}
// Link the entries
— trunk/egroupware/api/js/etemplate/et2_widget_entry.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_entry.js Sat Mar 19 17:16:59 2016
@@ -16,7 +16,7 @@
/**
- A widget to display a value from an entry
-
-
- Since we have etemplate_widget_transformer, this client side widget exists
-
- Since we have Etemplate\Widget\Transformer, this client side widget exists
- mostly to resolve the problem where the ID for the entry widget is the same
- as the widget where you actually set the value, which prevents transformer
- from working.
— trunk/egroupware/api/js/etemplate/et2_widget_file.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_file.js Sat Mar 19 17:16:59 2016
@@ -139,7 +139,7 @@
beforeSend: function(form) { return self.beforeSend(form);},
— trunk/egroupware/api/js/etemplate/et2_widget_htmlarea.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_htmlarea.js Sat Mar 19 17:16:59 2016
@@ -127,7 +127,7 @@
}
else if (this.options.imageUpload[0] !== ‘/’ && this.options.imageUpload.substr(0, 4) != ‘http’)
{
— trunk/egroupware/api/js/etemplate/et2_widget_itempicker.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_itempicker.js Sat Mar 19 17:16:59 2016
@@ -236,7 +236,7 @@
this.itemlist.addClass("loading");
this.clear.css("display", "inline-block");
-
egw._json("EGroupware\\Api\\Etemplate\\Widget\\ItemPicker::ajax_item_search",
[this.current_app, '', request.term, request.options],
this.queryResults,
this,true,this
— trunk/egroupware/api/js/etemplate/et2_widget_link.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_link.js Sat Mar 19 17:16:59 2016
@@ -178,7 +178,7 @@
// Filemanager select
var select_attrs = {
@@ -296,7 +296,7 @@
return;
}
-
var request = egw.json("EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link",
[values.to_app, values.to_id, links],
self._link_result,
self,
@@ -939,7 +939,7 @@
// Remove specific display and revert to CSS file
// show() would use inline, should be inline-block
this.clear.css(‘display’,’’);
-
this.request = egw.json("EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link_search",
[this.app_select.val(), '', request.term, request.options],
this._results,
this,true,this
@@ -1036,7 +1036,7 @@
// If a link array was passed in, don’t make the ajax call
if(typeof _links == ‘undefined’)
{
-
var request = egw.json("EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link",
[values.to_app, values.to_id, links],
self._link_result,
this,
@@ -1346,7 +1346,7 @@
{
_value.only_app = this.options.only_app;
}
-
this.egw().jsonq(this.egw().getAppName()+'.etemplate_widget_link.ajax_link_list', [_value], this.set_value, this);
-
this.egw().jsonq('EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link_list', [_value], this.set_value, this);
return;
},
/**
@@ -1549,7 +1549,7 @@
return;
}
remark.addClass(“loading”);
-
var request = egw.json("EGroupware\\Api\\Etemplate\\Widget\\Link::ajax_link_comment",
[link_id, comment],
function() {
if(remark)
@@ -1623,7 +1623,7 @@
// Download ZIP
window.location = self.egw().link('/index.php',{
@@ -1917,7 +1917,7 @@
}
if(typeof link_id != “object”)
{
— trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js Sat Mar 19 17:16:59 2016
@@ -945,7 +945,7 @@
/**
* Some static options, no need to transfer them over and over.
* We still need the same thing on the server side to validate, so they
-
- have to match. See etemplate_widget_menupopup::typeOptions()
-
- have to match. See Etemplate\Widget\Select::typeOptions()
- The type specific legacy options wind up in attrs.other.
-
-
@param {type} widget
@@ -1132,7 +1132,7 @@
// one widget listening for the response by the time it gets back,
// and we can’t do that when it’s queued.
var req = egw.json(
-
'EGroupware\\Api\\Etemplate\\Widget\\Select::ajax_get_options',
[widget._type,options_string,attrs.value]
).sendRequest(!in_nextmatch);
if(typeof cache === 'undefined')
— trunk/egroupware/api/js/etemplate/et2_widget_taglist.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_taglist.js Sat Mar 19 17:16:59 2016
@@ -50,7 +50,7 @@
“autocomplete_url”: {
“name”: “Autocomplete source”,
“type”: “string”,
-
"default": "EGroupware\\Api\\Etemplate\\Widget\\Taglist::ajax_search",
"description": "Menuaction (app.class.function) for autocomplete data source. Must return actual JSON, and nothing more."
},
"autocomplete_params": {
@@ -838,7 +838,7 @@
{
attributes: {
“autocomplete_url”: {
@@ -1008,7 +1008,7 @@
{
attributes: {
“autocomplete_url”: {
— trunk/egroupware/api/js/etemplate/et2_widget_tree.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_tree.js Sat Mar 19 17:16:59 2016
@@ -25,7 +25,7 @@
/**
-
- For syntax of nodes supplied via sel_optons or autoloading refer to etemplate_widget_tree class.
-
- For syntax of nodes supplied via sel_optons or autoloading refer to Etemplate\Widget\Tree class.
-
-
@augments et2_inputWidget
*/
— trunk/egroupware/api/js/etemplate/et2_widget_url.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_url.js Sat Mar 19 17:16:59 2016
@@ -44,7 +44,7 @@
*
* Using \042 instead of " to NOT stall minifyer!
*
-
- Same preg is in etemplate_widget_url PHP class!
-
- Same preg is in Etemplate\Widget\Url PHP class!
/
EMAIL_PREG: new RegExp(/^(([^\042’,<][^,<]+|\042[^\042]+\042|’[^’]+’|)\s?<)?[^\x00-\x20()<>@,;:\042[]]+@(a-z0-9ÃÃÃäöüÃ.)+[a-z]{2,}>?$/i),
/*
@@ -317,7 +317,7 @@
// need to preserve the original value somehow
// as it’s been used for add contact plus feature
this.span.attr(‘title’,_value);
— trunk/egroupware/api/js/etemplate/et2_widget_vfs.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_vfs.js Sat Mar 19 17:16:59 2016
@@ -654,7 +654,7 @@
legacyOptions: [“mime”],
asyncOptions: {
— trunk/egroupware/api/src/Etemplate/Widget/Link.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Link.php Sat Mar 19 17:16:59 2016
@@ -176,7 +176,7 @@
$response->data(is_array($id) ? $id : $result !== false);
}
- public function ajax_link_list($value)
- public static function ajax_link_list($value)
{
$app = $value[‘to_app’];
$id = $value[‘to_id’];
@@ -256,7 +256,7 @@
}
}
- public function ajax_delete($value)
- public static function ajax_delete($value)
{
$response = egw_json_response::get();
$response->data(Api\Link::unlink($value));
@@ -270,7 +270,7 @@
- the entry has no linked files, the ZIP will still be returned, but it will
- be empty.
*/
- public function download_zip()
- public static function download_zip()
{
$app = $_GET[‘app’];
$id = $_GET[‘id’];
— trunk/phpgwapi/inc/class.egw_json.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_json.inc.php Sat Mar 19 17:16:59 2016
@@ -94,7 +94,14 @@
if (strpos($menuaction,’::’) !== false && strpos($menuaction,’.’) === false) // static method name app_something::method
{
@list($className,$functionName,$handler) = explode(’::’,$menuaction);
-
if (substr($className, 0, 11) == 'EGroupware\\')
-
{
-
list(,$appName) = explode('\\', strtolower($className));
-
}
-
else
-
{
-
list($appName) = explode('_',$className);
-
}
// Check for a real static method, avoid instanciation if it is
$m = new ReflectionMethod($menuaction);
@@ -137,9 +144,10 @@
if(substr($className,0,4) != 'ajax' && substr($className,-4) != 'ajax' &&
$menuaction != 'etemplate.etemplate.process_exec' && substr($functionName,0,4) != 'ajax' ||
-
!preg_match('/^[A-Za-z0-9_\\\\-]+(\.[A-Za-z0-9_\\\\]+\.|::)[A-Za-z0-9_]+$/',$menuaction))
{
// stopped for security reasons
-
error_log("className='$className', functionName='$functionName', menuaction='$menuaction'");
error_log($_SERVER['PHP_SELF']. ' stopped for security reason. '.$menuaction.' is not valid. class- or function-name must start with ajax!!!');
// send message also to the user
throw new Exception($_SERVER['PHP_SELF']. ' stopped for security reason. '.$menuaction.' is not valid. class- or function-name must start with ajax!!!');
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs