Author: hnategh
New Revision: 55325
URL: http://svn.stylite.de/viewvc/egroupware?rev=55325&view=rev
Log:
Mobile theme:
- Implement check avaliable apps for mobile on client-side
Modified:
trunk/egroupware/api/src/Config.php
trunk/jdots/js/fw_mobile.js
— trunk/egroupware/api/src/Config.php (original)
+++ trunk/egroupware/api/src/Config.php Wed Mar 9 12:12:44 2016
@@ -266,7 +266,7 @@
‘site_title’,‘login_logo_file’,‘login_logo_url’,‘login_logo_title’,‘favicon_file’,
‘markuntranslated’,‘link_list_thumbnail’,‘enabled_spellcheck’,‘debug_minify’,
‘call_link’,‘call_popup’, // addressbook
-
'hide_birthdays','calview_no_consolidate', 'egw_tutorial_disable','fw_mobile_app_list'), // calendar
'projectmanager' => array('hours_per_workday', 'duration_units'),
'manual' => array('manual_remote_egw_url'),
'infolog' => array('status'),
— trunk/jdots/js/fw_mobile.js (original)
+++ trunk/jdots/js/fw_mobile.js Wed Mar 9 12:12:44 2016
@@ -251,6 +251,10 @@
* @type @exp;fw_base@call;extend
*/
var fw_mobile = fw_base.extend({
+
-
// List of applications available on mobile devices
-
DEFAULT_MOBILE_APP : ['calendar','infolog','timesheet','resources','addressbook','projectmanager','tracker','mail','filemanager'],
-
/**
* Mobile framework constructor
*
@@ -298,8 +302,26 @@
this.tabsUi = new egw_fw_ui_tabs(this.tabsDiv);
var egw_script = document.getElementById('egw_script_id');
-
var apps = egw_script ? JSON.parse(egw_script.getAttribute('data-navbar-apps')) : null;
-
var mobile_app_list = egw.config('fw_mobile_app_list') || this.DEFAULT_MOBILE_APP;
-
-
// Check if the given app is on mobile_app_list
-
var is_default_app = function(_app){
-
for (var j=0;j< mobile_app_list.length;j++ )
-
{
-
if (_app == mobile_app_list[j]) return true;
-
}
-
return false;
-
}
-
-
var default_apps = [];
-
for (var i=0;i <= apps.length;i++)
-
{
-
if (apps[i] && is_default_app(apps[i]['name'])) default_apps.push(apps[i]);
-
}
-
-
apps = default_apps;
-
this.loadApplications(apps);
}
this.sideboxSizeCallback(_sideboxStartSize);
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=278785111&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs