sort apps alphabetic and open external links with a target _blank

This commit is contained in:
Ralf Becker 2014-11-28 12:43:27 +00:00
parent af4cf46ba5
commit c03ec0679e
2 changed files with 15 additions and 1 deletions

View File

@ -488,7 +488,15 @@ class admin_ui
admin_ui::$hook_data[$appname] = $file2 ? $file2 : $file;
//error_log(__METHOD__."(".array2string(func_get_args()).")");
}
return array_merge($GLOBALS['egw']->hooks->process('admin', array('admin')), self::$hook_data);
self::$hook_data = array_merge($GLOBALS['egw']->hooks->process('admin', array('admin')), self::$hook_data);
// sort apps alphabetic by their title / translation of app-name
uksort(self::$hook_data, function($a, $b)
{
return strcasecmp(lang($a), lang($b));
});
return self::$hook_data;
}
/**

View File

@ -118,6 +118,12 @@ app.classes.admin = AppJS.extend(
this.egw.message(this.egw.lang('Please submit (or postpone) statistic first'), 'info');
return; // do not allow to leave statistics submit
}
// url outside EGroupware eg. eSyncPro linking to wikipedia
if (_url && _url.indexOf(this.egw.webserverUrl) == -1)
{
window.open(_url, '_blank');
return;
}
if (_url)
{
this.iframe.set_src(_url);