Author: ralfbecker
New Revision: 55957
URL: http://svn.stylite.de/viewvc/egroupware?rev=55957&view=rev
Log:
make home a regular application, which can eg. disabled, incl. moving all services using “home” as appname to “api” and moved some other forgotten stuff from phpgwapi&etemplate to api
Added:
trunk/egroupware/api/lang/
- copied from r55943, trunk/phpgwapi/lang/
trunk/egroupware/api/setup/tutorials.json
- copied unchanged from r55956, trunk/egroupware/home/setup/tutorials.json
trunk/egroupware/api/src/Framework/Tutorial.php
- copied, changed from r55956, trunk/egroupware/home/inc/class.home_tutorial_ui.inc.php
trunk/egroupware/api/templates/default/egw_tutorial.xet
- copied unchanged from r55943, trunk/etemplate/templates/default/egw_tutorial.xet
trunk/egroupware/api/templates/default/pgp_backup_restore.xet
- copied unchanged from r55943, trunk/etemplate/templates/default/pgp_backup_restore.xet
trunk/egroupware/api/templates/default/pgp_installation.xet
- copied unchanged from r55943, trunk/etemplate/templates/default/pgp_installation.xet
trunk/egroupware/api/templates/default/tutorial.xet
- copied, changed from r55956, trunk/egroupware/home/templates/default/tutorial.xet
Removed:
trunk/egroupware/home/inc/class.home_tutorial_ui.inc.php
trunk/egroupware/home/setup/tutorials.json
trunk/egroupware/home/templates/default/tutorial.xet
trunk/etemplate/templates/default/egw_tutorial.xet
trunk/etemplate/templates/default/pgp_backup_restore.xet
trunk/etemplate/templates/default/pgp_installation.xet
trunk/phpgwapi/lang/
Modified:
trunk/calendar/inc/class.calendar_bo.inc.php
trunk/calendar/inc/class.calendar_hooks.inc.php
trunk/calendar/inc/class.calendar_merge.inc.php
trunk/calendar/inc/class.calendar_owner_etemplate_widget.inc.php
trunk/calendar/inc/class.calendar_uiforms.inc.php
trunk/calendar/js/et2_widget_timegrid.js
trunk/egroupware/api/js/etemplate/et2_widget_selectAccount.js
trunk/egroupware/api/js/etemplate/et2_widget_taglist.js
trunk/egroupware/api/js/etemplate/etemplate2.js
trunk/egroupware/api/js/framework/fw_base.js
trunk/egroupware/api/js/framework/fw_desktop.js
trunk/egroupware/api/js/jsapi/app_base.js
trunk/egroupware/api/js/jsapi/egw_core.js
trunk/egroupware/api/js/jsapi/egw_jsonq.js
trunk/egroupware/api/js/jsapi/egw_preferences.js
trunk/egroupware/api/js/jsapi/egw_user.js
trunk/egroupware/api/lang/egw_de.lang
trunk/egroupware/api/lang/egw_en.lang
trunk/egroupware/api/lang/egw_it.lang
trunk/egroupware/api/lang/egw_nl.lang
trunk/egroupware/api/lang/egw_sk.lang
trunk/egroupware/api/setup/setup.inc.php
trunk/egroupware/api/setup/tables_current.inc.php
trunk/egroupware/api/src/Acl.php
trunk/egroupware/api/src/Egw.php
trunk/egroupware/api/src/Framework.php
trunk/egroupware/api/src/Json/Request.php
trunk/egroupware/api/src/Link.php
trunk/egroupware/api/src/Storage/Customfields.php
trunk/egroupware/api/src/Storage/Merge.php
trunk/egroupware/home/js/app.js
trunk/egroupware/home/setup/setup.inc.php
trunk/egroupware/home/setup/tables_update.inc.php
trunk/egroupware/index.php
trunk/egroupware/json.php
trunk/filemanager/inc/class.filemanager_select.inc.php
trunk/phpgwapi/inc/class.egw_framework.inc.php
trunk/phpgwapi/inc/class.jscalendar.inc.php
trunk/phpgwapi/inc/class.tplsavant2.inc.php
trunk/phpgwapi/inc/jscalendar-setup.php
trunk/phpgwapi/ntlm/index.php
trunk/phpgwapi/templates/idots/class.idots_framework.inc.php
— trunk/calendar/inc/class.calendar_bo.inc.php (original)
+++ trunk/calendar/inc/class.calendar_bo.inc.php Sun May 1 11:57:48 2016
@@ -251,7 +251,7 @@
);
$this->resources[’’] = array(
‘type’ => ‘’,
-
'app' => 'api-accounts',
);
$GLOBALS['egw']->session->appsession('resources','calendar',$this->resources);
}
— trunk/calendar/inc/class.calendar_hooks.inc.php (original)
+++ trunk/calendar/inc/class.calendar_hooks.inc.php Sun May 1 11:57:48 2016
@@ -861,4 +861,4 @@
$GLOBALS[‘config_error’] = ‘Unable to schedule purge’;
}
}
-}
+}
— trunk/calendar/inc/class.calendar_merge.inc.php (original)
+++ trunk/calendar/inc/class.calendar_merge.inc.php Sun May 1 11:57:48 2016
@@ -260,7 +260,7 @@
foreach($event[‘participants’] as $uid => $status)
{
$type = $this->bo->resources[$uid[0]][‘app’];
— trunk/calendar/inc/class.calendar_owner_etemplate_widget.inc.php (original)
+++ trunk/calendar/inc/class.calendar_owner_etemplate_widget.inc.php Sun May 1 11:57:48 2016
@@ -30,7 +30,7 @@
egw_framework::validate_file('.','et2_widget_owner','calendar');
egw_framework::includeCSS('calendar');
@@ -62,7 +62,7 @@
return array(
‘value’ => ‘’.$account_id,
‘label’ => $account_name,
@@ -82,8 +82,8 @@
}
else if (!in_array($owner, array_keys($accounts)))
{
@@ -112,7 +112,7 @@
{
$value = Array($value);
}
— trunk/calendar/inc/class.calendar_uiforms.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uiforms.inc.php Sun May 1 11:57:48 2016
@@ -231,7 +231,7 @@
notifications::errors(true);
$messages = null;
$msg_permission_denied_added = false;
@@ -693,7 +693,7 @@
unset($recur_event[‘start’]); unset($recur_event[‘end’]); // no update necessary
unset($recur_event[‘alarm’]); // unsetting alarms too, as they cant be updated without start!
$this->bo->update($recur_event,true); // no conflict check here
@@ -780,7 +780,7 @@
$event[‘button_was’] = $button; // remember for ignore
return $this->conflicts($event,$conflicts,$preserv);
}
-
// Event spans multiple days, need an edit to make sure they all get updated
// We could check old date, as removing from days could still be an update
if(date('Ymd', $event['start']) != date('Ymd', $event['end']))
@@ -1074,7 +1074,7 @@
}
//error_log(__METHOD__ . egw_time::to($old_event['start']) . ' -> '. egw_time::to($event['start']) . ' as of ' . egw_time::to($as_of_date));
@@ -1087,7 +1087,7 @@
$offset = $event['start'] - $old_event['start'];
$duration = $event['duration'] ? $event['duration'] : $event['end'] - $event['start'];
@@ -1096,7 +1096,7 @@
egw_time::to($as_of_date,‘ts’) < time()
)
{
@@ -2554,7 +2554,7 @@
{
list($eventId, $date) = explode(’:’, $_eventId,2);
$ignore_conflicts = false;
@@ -2608,7 +2608,7 @@
// For DnD, create an exception if they gave the date
$this->_create_exception($event,$preserv);
unset($event[‘id’]);
-
$conflicts = $this->bo->update($event,false,true,false,true,$messages);
if (!is_array($conflicts) && $conflicts)
{
@@ -2637,7 +2637,7 @@
$offset = egw_time::to($targetDateTime,‘ts’) - egw_time::to($seriesInstance,‘ts’);
$event[‘start’] = $old_event[‘start’] + $offset;
$event[‘duration’] = $duration;
@@ -2695,7 +2695,7 @@
$message = false;
$conflicts=$this->bo->update($event,$ignore_conflicts, true, false, true, $message);
— trunk/calendar/js/et2_widget_timegrid.js (original)
+++ trunk/calendar/js/et2_widget_timegrid.js Sun May 1 11:57:48 2016
@@ -1359,7 +1359,7 @@
this.set_end_date(day_list[day_list.length-1]);
}
-
// Sub widgets actually get their own data from egw.data, so we'll
// stick it there
var consolidated = et2_calendar_view.is_consolidated(this.options.owner, this.day_list.length == 1 ? 'day' : 'week');
@@ -1438,7 +1438,7 @@
}
else
{
@@ -1699,7 +1699,7 @@
x = Math.round(x);
y = Math.round(y);
— trunk/egroupware/api/js/etemplate/et2_widget_selectAccount.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_selectAccount.js Sun May 1 11:57:48 2016
@@ -267,7 +267,7 @@
if(!found && !isNaN(search[j]))
{
// Add it in
@@ -278,7 +278,7 @@
++num_calls;
// Add immediately with value as label, we’ll replace later
this._appendOptionElement(search[j],search[j]);
@@ -463,7 +463,7 @@
var search = this.search = jQuery(document.createElement(“div”));
var search_widget = this.search_widget = et2_createWidget('link-entry', {
@@ -639,7 +639,7 @@
.addClass(“loading”)
.appendTo(node);
-
this.egw().link_title('api-accounts', item.value, function(name) {
label.text(name).removeClass("loading");
}, label);
@@ -721,7 +721,7 @@
var label = jQuery(document.createElement(‘label’))
.addClass(“loading”)
.appendTo(option);
-
this.egw().link_title('home-accounts', value, function(name) {this.text(name).removeClass("loading");}, label);
-
this.egw().link_title('api-accounts', value, function(name) {this.text(name).removeClass("loading");}, label);
},
/**
@@ -790,7 +790,7 @@
}
}
-
this.options.application = 'api-accounts';
// Editable version allows app to set options that aren't accounts, so allow for them
var options = et2_selectbox.find_select_options(this,options['select_options']);
— trunk/egroupware/api/js/etemplate/et2_widget_taglist.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_taglist.js Sun May 1 11:57:48 2016
@@ -980,7 +980,7 @@
else if (typeof v != ‘object’ && !isNaN(v) && (typeof v != ‘string’ || v.match(this.int_reg_exp)))
{
v = parseInt(v);
@@ -991,7 +991,7 @@
else if (!this.deferred_loading) // call set_value again, after result has arrived from server
{
this.deferred_loading++;
-
this.egw().link_title('api-accounts', v, function(label) {
this.deferred_loading--;
if (label) this.set_value(values);
}, this);
— trunk/egroupware/api/js/etemplate/etemplate2.js (original)
+++ trunk/egroupware/api/js/etemplate/etemplate2.js Sun May 1 11:57:48 2016
@@ -82,7 +82,7 @@
{
if (typeof _menuaction == “undefined”)
{
-
_menuaction = "EGroupware\\Api\\Etemplate::ajax_process_content";
}
// Copy the given parameters
@@ -1083,7 +1083,7 @@
// Check the parameters
var data = _response.data;
- // handle egw_framework::refresh_opener()
- // handle Api\Framework::refresh_opener()
if (jQuery.isArray(data[‘refresh-opener’]))
{
if (window.opener)// && typeof window.opener.egw_refresh == ‘function’)
@@ -1101,13 +1101,13 @@
delete data.data.app_header;
}
- // handle egw_framework::message()
- // handle Api\Framework::message()
if (jQuery.isArray(data.message))
{
egw.message.apply(egw, data.message);
}
- // handle egw_framework::window_close(), this will terminate execution
- // handle Api\Framework::window_close(), this will terminate execution
if (data[‘window-close’])
{
if (typeof data[‘window-close’] == ‘string’ && data[‘window-close’] !== ‘true’)
@@ -1118,7 +1118,7 @@
return true;
}
- // handle egw_framework::window_focus()
- // handle Api\Framework::window_focus()
if (data[‘window-focus’])
{
window.focus();
— trunk/egroupware/api/js/framework/fw_base.js (original)
+++ trunk/egroupware/api/js/framework/fw_base.js Sun May 1 11:57:48 2016
@@ -415,7 +415,7 @@
{
this.serializedTabState = serialized;
@@ -857,7 +857,7 @@
tzSelection: function(_tz)
{
//Perform an AJAX request to tell server
-
var req = egw.json('home.jdots_framework.ajax_tz_selection.template',[_tz],null,null,false); // false = synchron
-
var req = egw.json('api.jdots_framework.ajax_tz_selection.template',[_tz],null,null,false); // false = synchron
req.sendRequest();
if (this.activeApp.browser)
— trunk/egroupware/api/js/framework/fw_desktop.js (original)
+++ trunk/egroupware/api/js/framework/fw_desktop.js Sun May 1 11:57:48 2016
@@ -302,7 +302,7 @@
}
//Send the sort order to the server via ajax
— trunk/egroupware/api/js/jsapi/app_base.js (original)
+++ trunk/egroupware/api/js/jsapi/app_base.js Sun May 1 11:57:48 2016
@@ -764,7 +764,7 @@
if(typeof self.favorite_popup.group != “undefined” && self.favorite_popup.group.getValue() != ‘’)
{
// Admin stuff - save preference server side
@@ -874,7 +874,7 @@
$j(trash).hide();
// Delete preference server side
-
var request = egw.json("EGroupware\\Api\\Framework::ajax_set_favorite",
[app.appname, id, "delete", group, ''],
function(result) {
// Got the full response from callback, which we don't want
@@ -1117,15 +1117,15 @@
{
var resolve = _resolve;
var reject = _reject;
-
self.egw.json('EGroupware\\Api\\Framework\\Tutorial::ajax_data', [self.egw.app_name()], function(_data){
-
resolve(_data);
}).sendRequest();
});
},
/**
- Create and Render etemplate2 for egroupware tutorial
-
- sidebox option. The .xet file is stored in etemplate/templates/default/egw_tutorials
-
- sidebox option. The .xet file is stored in api/templates/default/egw_tutorials
-
-
@description tutorials json object should have the following structure:
- object:
@@ -1159,7 +1159,7 @@
{
// et2 object
var etemplate = new etemplate2 (div, false);
@@ -1200,8 +1200,37 @@
*/
egwTutorialPopup: function (_tuid)
{
-
var url = egw.link('/index.php', 'menuaction=api.EGroupware\\Api\\Framework\\Tutorial.popup&tuid='+_tuid);
egw.open_link(url,'_blank','960x580');
-
},
-
-
/**
-
- Function to set video iframe base on selected tutorial from tutorials box
-
-
-
*/
-
tutorial_videoOnClick: function (_url)
-
{
-
var frame = etemplate2.getByApplication('api')[0].widgetContainer.getWidgetById('src');
-
if (frame)
-
{
-
frame.set_value(_url);
-
}
-
},
-
-
/**
-
- Function calls on discard checkbox and will set
-
- the egw_tutorial_noautoload preference
-
-
-
-
*/
-
tutorial_autoloadDiscard: function (egw, widget)
-
{
-
if (widget)
-
{
-
this.egw.set_preference('common', 'egw_tutorial_noautoload', widget.get_value());
-
}
},
/**
@@ -1257,7 +1286,7 @@
downloadSync: function(_downloadObj)
{
return new Promise(function(_resolve,_reject){});
@@ -1492,7 +1521,7 @@
menu:_content
}
},
@@ -1546,7 +1575,7 @@
value: {
content: _content
},
-
template: egw.webserverUrl+'/api/templates/default/pgp_installation.xet',
class: "pgp_installation",
modal: true
//resizable:false,
— trunk/egroupware/api/js/jsapi/egw_core.js (original)
+++ trunk/egroupware/api/js/jsapi/egw_core.js Sun May 1 11:57:48 2016
@@ -381,7 +381,7 @@
/**
* Creates the egw object --- if the egw object should be created, some data
-
- has already been set inside the object by the egw_framework::header
-
- has already been set inside the object by the Api\Framework::header
- function and the instance has been marked as “prefsOnly”.
*/
if (typeof window.egw != “undefined” && window.egw.prefsOnly)
— trunk/egroupware/api/js/jsapi/egw_jsonq.js (original)
+++ trunk/egroupware/api/js/jsapi/egw_jsonq.js Sun May 1 11:57:48 2016
@@ -105,8 +105,7 @@
}
if (something_to_send)
{
-
// TODO: Passing this to the "home" application looks quite ugly
-
var request = egw.json('home.queue', jobs_to_send, jsonq_callback, this);
-
var request = egw.json('api.queue', jobs_to_send, jsonq_callback, this);
request.sendRequest(true);
}
}
— trunk/egroupware/api/js/jsapi/egw_preferences.js (original)
+++ trunk/egroupware/api/js/jsapi/egw_preferences.js Sun May 1 11:57:48 2016
@@ -65,7 +65,7 @@
if (typeof prefs[_app] == 'undefined')
{
-
var request = this.json('home.egw_framework.ajax_get_preference.template', [_app], _callback, _context);
-
var request = this.json('EGroupware\\Api\\Framework::ajax_get_preference', [_app], _callback, _context);
request.sendRequest(typeof _callback == 'function', 'GET'); // use synchronous (cachable) GET request
if (typeof prefs[_app] == 'undefined') prefs[_app] = {};
if (typeof _callback == 'function') return false;
@@ -91,7 +91,7 @@
// if there is no change, no need to submit it to server
if (typeof prefs[_app] != ‘undefined’ && prefs[_app][_name] === _val) return;
-
this.jsonq('home.egw_framework.ajax_set_preference.template',[_app, _name, _val], _callback);
-
this.jsonq('EGroupware\\Api\\Framework::ajax_set_preference',[_app, _name, _val], _callback);
// update own preference cache, if _app prefs are loaded (dont update otherwise, as it would block loading of other _app prefs!)
if (typeof prefs[_app] != 'undefined')
— trunk/egroupware/api/js/jsapi/egw_user.js (original)
+++ trunk/egroupware/api/js/jsapi/egw_user.js Sun May 1 11:57:48 2016
@@ -100,7 +100,7 @@
if(jQuery.isEmptyObject(accountStore))
{
// Synchronous
-
egw.json('EGroupware\\Api\\Framework::ajax_user_list',[],
function(data) {
accountStore = jQuery.extend(true, {}, data||{});
}
@@ -166,7 +166,7 @@
// something not found in cache --> ask server
if (_account_ids.length)
{
-
egw.json('home.egw_framework.ajax_account_data.template',[_account_ids, _field, _resolve_groups],
-
egw.json('EGroupware\\Api\\Framework::ajax_account_data',[_account_ids, _field, _resolve_groups],
function(_data) {
for(var account_id in _data)
{
@@ -229,7 +229,7 @@
}
else
{
— trunk/egroupware/api/lang/egw_de.lang (original)
+++ trunk/egroupware/api/lang/egw_de.lang Sun May 1 11:57:48 2016
@@ -399,7 +399,7 @@
holy see (vatican city state) common de VATICAN
home common de Home
home email common de private E-Mail
-home-accounts common de Benutzerkonten
+api-accounts common de Benutzerkonten
honduras common de HONDURAS
hong kong common de HONG KONG
how many days to sync in the future (default %1) groupdav de Wie viele Tage soll in die Zukunft gesynced werden (Vorgabe %1)
— trunk/egroupware/api/lang/egw_en.lang (original)
+++ trunk/egroupware/api/lang/egw_en.lang Sun May 1 11:57:48 2016
@@ -399,7 +399,7 @@
holy see (vatican city state) common en HOLY SEE (VATICAN CITY STATE)
home common en Home
home email common en Home email
-home-accounts common en User accounts
+api-accounts common en User accounts
honduras common en HONDURAS
hong kong common en HONG KONG
how many days to sync in the future (default %1) groupdav en How many days to sync in the future (default %1)
— trunk/egroupware/api/lang/egw_it.lang (original)
+++ trunk/egroupware/api/lang/egw_it.lang Sun May 1 11:57:48 2016
@@ -399,7 +399,7 @@
holy see (vatican city state) common it SANTA SEDE (STATO DI CITTA’ DEL VATICANO)
home common it Home
home email common it e-mail abitazione
-home-accounts common it Account utenti
+api-accounts common it Account utenti
honduras common it HONDURAS
hong kong common it HONG KONG
how many days to sync in the future (default %1) groupdav it Quanti giorni nel futuro sincronizzare (predefinito %1)
— trunk/egroupware/api/lang/egw_nl.lang (original)
+++ trunk/egroupware/api/lang/egw_nl.lang Sun May 1 11:57:48 2016
@@ -380,7 +380,7 @@
holy see (vatican city state) common nl VATICAANSTAD
home common nl Start
home email common nl email thuis
-home-accounts common nl Gebruiker accounts
+api-accounts common nl Gebruiker accounts
honduras common nl HONDURAS
hong kong common nl HONG KONG
how many days to sync in the future (default %1) groupdav nl Hoeveel dagen om te synchroniseren in de toekomst (Standaard %1)
— trunk/egroupware/api/lang/egw_sk.lang (original)
+++ trunk/egroupware/api/lang/egw_sk.lang Sun May 1 11:57:48 2016
@@ -391,7 +391,7 @@
holy see (vatican city state) common sk VATIKÃN (MESTSKÃ Å TÃT)
home common sk Domov
home email common sk Domáci E-mail
-home-accounts common sk PoužÃvateľské úÄty
+api-accounts common sk PoužÃvateľské úÄty
honduras common sk HONDURAS
hong kong common sk HONG KONG
how many days to sync in the future (default %1) groupdav sk Koľko dnà do budúcnosti synchronizovať (predvolené %1)
— trunk/egroupware/api/setup/setup.inc.php (original)
+++ trunk/egroupware/api/setup/setup.inc.php Sun May 1 11:57:48 2016
@@ -59,6 +59,7 @@
$setup_info[‘api’][‘hooks’][‘deletegroup’] = array(‘EGroupware\Api\Vfs\Hooks::deleteGroup’, ‘EGroupware\Api\Mail\Hooks::deletegroup’);
$setup_info[‘api’][‘hooks’][‘editgroup’] = ‘EGroupware\Api\Vfs\Hooks::editGroup’;
$setup_info[‘api’][‘hooks’][‘changepassword’] = ‘EGroupware\Api\Mail\Hooks::changepassword’;
+$setup_info[‘api’][‘hooks’][‘sidebox_all’] = ‘EGroupware\Api\Framework\Tutorial::tutorial_menu’;
// installation checks
$setup_info[‘api’][‘check_install’] = array(
— trunk/egroupware/api/setup/tables_current.inc.php (original)
+++ trunk/egroupware/api/setup/tables_current.inc.php Sun May 1 11:57:48 2016
@@ -181,9 +181,9 @@
‘fd’ => array(
‘link_id’ => array(‘type’ => ‘auto’,‘nullable’ => False),
‘link_app1’ => array(‘type’ => ‘ascii’,‘precision’ => ‘16’,‘nullable’ => False),
-
'link_id1' => array('type' => 'ascii','meta' => array("link_app1='home-accounts'" => 'account'),'precision' => '64','nullable' => False),
-
'link_id1' => array('type' => 'ascii','meta' => array("link_app1='api-accounts'" => 'account'),'precision' => '64','nullable' => False),
'link_app2' => array('type' => 'ascii','precision' => '16','nullable' => False),
-
'link_id2' => array('type' => 'ascii','meta' => array("link_app2='home-accounts'" => 'account'),'precision' => '64','nullable' => False),
-
'link_id2' => array('type' => 'ascii','meta' => array("link_app2='api-accounts'" => 'account'),'precision' => '64','nullable' => False),
'link_remark' => array('type' => 'varchar','precision' => '100'),
'link_lastmod' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False),
'link_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
— trunk/egroupware/api/src/Acl.php (original)
+++ trunk/egroupware/api/src/Acl.php Sun May 1 11:57:48 2016
@@ -631,7 +631,7 @@
}
if ($add_implicit_apps)
{
— trunk/egroupware/api/src/Egw.php (original)
+++ trunk/egroupware/api/src/Egw.php Sun May 1 11:57:48 2016
@@ -357,7 +357,7 @@
{
$this->currentapp = $GLOBALS[‘egw_info’][‘flags’][‘currentapp’]; // some apps change it later