mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
fix bundles for TinyMCE and added on for messenger
This commit is contained in:
parent
56b0704bcb
commit
35cbfeec09
69
Gruntfile.js
69
Gruntfile.js
@ -98,8 +98,7 @@ module.exports = function (grunt) {
|
||||
"api/js/dhtmlxMenu/sources/dhtmlxmenu.js",
|
||||
"api/js/dhtmlxMenu/sources/ext/dhtmlxmenu_ext.js",
|
||||
"api/js/egw_action/egw_menu_dhtmlx.js",
|
||||
"api/js/jquery/chosen/chosen.jquery.js",
|
||||
"vendor/egroupware/ckeditor/config.js"
|
||||
"api/js/jquery/chosen/chosen.jquery.js"
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -173,9 +172,10 @@ module.exports = function (grunt) {
|
||||
"api/js/etemplate/et2_widget_favorites.js",
|
||||
"api/js/etemplate/et2_widget_html.js",
|
||||
"api/js/etemplate/et2_widget_htmlarea.js",
|
||||
"api/js/etemplate/et2_widget_ckeditor.js",
|
||||
"api/js/etemplate/et2_widget_tabs.js",
|
||||
"api/js/etemplate/et2_widget_toolbar.js",
|
||||
"api/js/etemplate/et2_widget_timestamper.js",
|
||||
"api/js/etemplate/et2_widget_toolbar.js",
|
||||
"api/js/etemplate/et2_widget_tree.js",
|
||||
"api/js/etemplate/et2_widget_historylog.js",
|
||||
"api/js/etemplate/et2_widget_hrule.js",
|
||||
@ -187,6 +187,7 @@ module.exports = function (grunt) {
|
||||
"api/js/etemplate/et2_widget_progress.js",
|
||||
"api/js/etemplate/et2_widget_portlet.js",
|
||||
"api/js/etemplate/et2_widget_ajaxSelect.js",
|
||||
"api/js/etemplate/vfsSelectUI.js",
|
||||
"api/js/etemplate/et2_widget_vfs.js",
|
||||
"api/js/etemplate/et2_widget_video.js",
|
||||
"api/js/jquery/barcode/jquery-barcode.min.js",
|
||||
@ -195,8 +196,7 @@ module.exports = function (grunt) {
|
||||
"api/js/etemplate/et2_widget_itempicker.js",
|
||||
"api/js/etemplate/et2_widget_script.js",
|
||||
"api/js/etemplate/et2_core_legacyJSFunctions.js",
|
||||
"api/js/etemplate/etemplate2.js",
|
||||
"api/js/etemplate/vfsSelectUI.js"
|
||||
"api/js/etemplate/etemplate2.js"
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -249,7 +249,7 @@ module.exports = function (grunt) {
|
||||
},
|
||||
notifications: {
|
||||
files: {
|
||||
"notifications/js/notificationajaxpopup.min.js":[
|
||||
"notifications/js/notificationajaxpopup.min.js": [
|
||||
"notifications/js/notificationajaxpopup.js"
|
||||
]
|
||||
}
|
||||
@ -277,6 +277,18 @@ module.exports = function (grunt) {
|
||||
"projectmanager/js/app.js"
|
||||
]
|
||||
}
|
||||
},
|
||||
messenger: {
|
||||
files: {
|
||||
"messenger/js/app.min.js": [
|
||||
"messenger/jsxc/lib/jquery.slimscroll.js",
|
||||
"messenger/jsxc/lib/jquery.fullscreen.js",
|
||||
"messenger/jsxc/lib/jsxc.dep.js",
|
||||
"messenger/jsxc/jsxc.js",
|
||||
"messenger/js/init.js",
|
||||
"messenger/js/app.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
@ -298,11 +310,12 @@ module.exports = function (grunt) {
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"pixelegg/css/pixelegg.css",
|
||||
"api/templates/default/print.css",
|
||||
"pixelegg/print.css",
|
||||
"api/templates/default/css/flags.css"
|
||||
"pixelegg/print.css"
|
||||
],
|
||||
"pixelegg/css/mobile.min.css": [
|
||||
"api/js/jquery/chosen/chosen.css",
|
||||
@ -315,11 +328,12 @@ module.exports = function (grunt) {
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"pixelegg/css/mobile.css",
|
||||
"api/templates/default/print.css",
|
||||
"pixelegg/print.css",
|
||||
"api/templates/default/css/flags.css"
|
||||
"pixelegg/print.css"
|
||||
],
|
||||
"pixelegg/mobile/fw_mobile.min.css": [
|
||||
"api/js/jquery/chosen/chosen.css",
|
||||
@ -332,6 +346,8 @@ module.exports = function (grunt) {
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"pixelegg/mobile/fw_mobile.css",
|
||||
"api/templates/default/print.css",
|
||||
@ -353,6 +369,24 @@ module.exports = function (grunt) {
|
||||
"api/templates/default/print.css",
|
||||
"pixelegg/print.css",
|
||||
"api/templates/default/css/flags.css"
|
||||
],
|
||||
"pixelegg/css/modern.min.css": [
|
||||
"api/js/jquery/chosen/chosen.css",
|
||||
"vendor/bower-asset/jquery-ui/themes/redmond/jquery-ui.css",
|
||||
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
||||
"api/js/jquery/jpicker/css/jPicker-1.1.6.min.css",
|
||||
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
||||
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
||||
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"pixelegg/css/modern.css",
|
||||
"api/templates/default/print.css",
|
||||
"pixelegg/print.css"
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -369,6 +403,8 @@ module.exports = function (grunt) {
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"api/templates/default/def_tutorials.css",
|
||||
"api/templates/default/default.css",
|
||||
@ -376,8 +412,7 @@ module.exports = function (grunt) {
|
||||
"jdots/css/jdots.css",
|
||||
"jdots/css/high-contrast.css",
|
||||
"api/templates/default/print.css",
|
||||
"jdots/print.css",
|
||||
"api/templates/default/css/flags.css"
|
||||
"jdots/print.css"
|
||||
],
|
||||
"jdots/css/jdots.min.css": [
|
||||
"api/js/jquery/chosen/chosen.css",
|
||||
@ -390,14 +425,15 @@ module.exports = function (grunt) {
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"api/templates/default/def_tutorials.css",
|
||||
"api/templates/default/default.css",
|
||||
"jdots/egw_fw.css",
|
||||
"jdots/css/jdots.css",
|
||||
"api/templates/default/print.css",
|
||||
"jdots/print.css",
|
||||
"api/templates/default/css/flags.css"
|
||||
"jdots/print.css"
|
||||
],
|
||||
"jdots/css/orange-green.min.css": [
|
||||
"api/js/jquery/chosen/chosen.css",
|
||||
@ -410,6 +446,8 @@ module.exports = function (grunt) {
|
||||
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
||||
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
||||
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
||||
"api/templates/default/css/flags.css",
|
||||
"api/templates/default/css/htmlarea.css",
|
||||
"api/templates/default/etemplate2.css",
|
||||
"api/templates/default/def_tutorials.css",
|
||||
"api/templates/default/default.css",
|
||||
@ -417,8 +455,7 @@ module.exports = function (grunt) {
|
||||
"jdots/css/jdots.css",
|
||||
"jdots/css/orange-green.css",
|
||||
"api/templates/default/print.css",
|
||||
"jdots/print.css",
|
||||
"api/templates/default/css/flags.css"
|
||||
"jdots/print.css"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -145,8 +145,9 @@ class Bundle
|
||||
$mod = filemtime(EGW_SERVER_ROOT.$path);
|
||||
if ($mod > $max_modified) $max_modified = $mod;
|
||||
|
||||
// ckeditor must be included before bundled files, as they depend on it!
|
||||
if (strpos($path,'/ckeditor/ckeditor.js') !== false)
|
||||
// ckeditor of TinyMCE must be included before bundled files, as they depend on it!
|
||||
if (strpos($path,'/ckeditor/ckeditor.js') !== false ||
|
||||
strpos($path, '/tinymce/tinymce.min.js') !== false)
|
||||
{
|
||||
$to_include_first[] = $path . '?' . $mod;
|
||||
}
|
||||
@ -234,8 +235,8 @@ class Bundle
|
||||
// include choosen in api, as old eTemplate uses it and fail if it pulls in half of et2
|
||||
$inc_mgr->include_js_file('/api/js/jquery/chosen/chosen.jquery.js');
|
||||
// include CKEditor in api, as old eTemplate uses it too
|
||||
$inc_mgr->include_js_file('/vendor/egroupware/ckeditor/ckeditor.js');
|
||||
$inc_mgr->include_js_file('/vendor/egroupware/ckeditor/config.js');
|
||||
//$inc_mgr->include_js_file('/vendor/egroupware/ckeditor/ckeditor.js');
|
||||
//$inc_mgr->include_js_file('/vendor/egroupware/ckeditor/config.js');
|
||||
$bundles['api'] = $inc_mgr->get_included_files();
|
||||
self::urls($bundles['api'], $max_mod['api']);
|
||||
|
||||
@ -254,6 +255,7 @@ class Bundle
|
||||
'calendar' => '/calendar/js/app.js',
|
||||
'mail' => '/mail/js/app.js',
|
||||
'projectmanager' => '/projectmanager/js/app.js',
|
||||
'messenger' => '/messenger/js/app.js',
|
||||
) as $bundle => $file)
|
||||
{
|
||||
if (@file_exists(EGW_SERVER_ROOT.$file))
|
||||
|
@ -5,9 +5,8 @@
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @author Ralf Becker <rb@stylite.de>
|
||||
* @copyright (c) 2016 by Ralf Becker <rb@stylite.de>
|
||||
* @version $Id$
|
||||
* @author Ralf Becker <rb@egroupware.org>
|
||||
* @copyright (c) 2016-18 by Ralf Becker <rb@egroupware.org>
|
||||
*/
|
||||
|
||||
use EGroupware\Api\Framework;
|
||||
@ -15,6 +14,8 @@ use EGroupware\Api\Framework\Bundle;
|
||||
|
||||
if (php_sapi_name() !== 'cli') die("This is a commandline ONLY tool!\n");
|
||||
|
||||
// force a domain for MServer install
|
||||
$_REQUEST['domain'] = 'boulder.egroupware.org';
|
||||
$GLOBALS['egw_info'] = array(
|
||||
'flags' => array(
|
||||
'currentapp' => 'login',
|
||||
@ -38,6 +39,18 @@ if (!preg_match('/grunt\.initConfig\(({.+})\);/s', $content, $matches) ||
|
||||
|
||||
$uglify =& $config['uglify'];
|
||||
|
||||
// some files are not in a bundle, because loaded otherwise or are big enough themselfs
|
||||
$exclude = array(
|
||||
// api/js/jsapi/egw.js loaded via own tag, and we must not load it twice!
|
||||
'api/js/jsapi/egw.js',
|
||||
// TinyMCE is loaded separate before the bundle
|
||||
'api/js/tinymce/tinymce.min.js',
|
||||
// ckeditor is loaded on demand only
|
||||
'vendor/egroupware/ckeditor/ckeditor.js',
|
||||
'vendor/egroupware/ckeditor/ckeditor.config.js',
|
||||
'vendor/egroupware/ckeditor/ckeditor.adapters/jquery.js',
|
||||
);
|
||||
|
||||
foreach(Bundle::all() as $name => $files)
|
||||
{
|
||||
if ($name == '.ts') continue; // ignore timestamp
|
||||
@ -48,15 +61,10 @@ foreach(Bundle::all() as $name => $files)
|
||||
if ($path[0] == '/') $path = substr($path, 1);
|
||||
});
|
||||
|
||||
// api/js/jsapi/egw.js loaded via own tag, and we must not load it twice!
|
||||
if ($name == 'api' && ($key = array_search('api/js/jsapi/egw.js', $files)))
|
||||
// some files are not in a bundle, because they are big enough themselfs
|
||||
foreach($exclude as $file)
|
||||
{
|
||||
unset($files[$key]);
|
||||
}
|
||||
// ckeditor is loaded separate before the bundle
|
||||
if ($name == 'api' && ($key = array_search('vendor/egroupware/ckeditor/ckeditor.js', $files)))
|
||||
{
|
||||
unset($files[$key]);
|
||||
if (($key = array_search($file, $files))) unset($files[$key]);
|
||||
}
|
||||
|
||||
//var_dump($name, $files);
|
||||
@ -80,7 +88,7 @@ foreach(Bundle::all() as $name => $files)
|
||||
|
||||
// add css for all templates and themes
|
||||
$cssmin =& $config['cssmin'];
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = '*grunt*'; // to no find any app.css files
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = '*grunt*'; // to not find any app.css files
|
||||
$GLOBALS['egw_info']['server']['debug_minify'] = 'True'; // otherwise we would only get minified file
|
||||
foreach(array('pixelegg','jdots')/*array_keys(Framework::list_templates())*/ as $template)
|
||||
{
|
||||
@ -88,7 +96,7 @@ foreach(array('pixelegg','jdots')/*array_keys(Framework::list_templates())*/ as
|
||||
$tpl = Framework::factory();
|
||||
$themes = $tpl->list_themes();
|
||||
if ($template == 'pixelegg') $themes[] = 'fw_mobile'; // this is for mobile devices
|
||||
foreach($themes as $theme)
|
||||
foreach(array_keys($themes) as $theme)
|
||||
{
|
||||
// skip not working cssmin of pixelegg/traditional: Broken @import declaration of "../../etemplate/templates/default/etemplate2.css"
|
||||
if ($template == 'pixelegg' && $theme == 'traditional') continue;
|
||||
|
Loading…
Reference in New Issue
Block a user