diff --git a/apps/maarch_entreprise/css/engine.css b/apps/maarch_entreprise/css/engine.css index b89c98bfd04e3661ca3a69a068a5492f7bfdd445..9f95a38578b578b9346b86036b82cc3d6ba17d5f 100755 --- a/apps/maarch_entreprise/css/engine.css +++ b/apps/maarch_entreprise/css/engine.css @@ -1,30 +1,52 @@ -/*HeaderV2*/ -#headerV2 .nav .open > a, .nav .open > a:focus, .nav .open > a:hover{ - background-color: inherit !important; +.page-header{ + margin-top: 0px; +} + +.page-header h1{ + font-size: 30px; +} + +#container{ + padding: 0px !important; +} +.md2-toast { + display: table; + /*background-color: #3f51b5 !important;*/ + vertical-align: middle; + /*background-color: rgba(63, 81, 181, 0.6) !important;*/ + /*background-color: rgba(0, 0, 0, 0.6) !important;*/ +} + +.md2-toast i{ + display: table-cell; + padding:5px; + vertical-align: middle; +} + +.md2-toast span{ + display: table-cell; + padding:5px; + vertical-align: middle; +} +.mat-input-container,.md2-select,md2-datepicker{ + width:100% !important; +} + +.md2-select{ + padding-bottom: 1.29688em; } -/* Alert info*/ -#resultInfo{ - top :10px; - text-align: center; - position: fixed; - width: 30%; - right: 10px; - z-index: 1051; - -moz-box-shadow: 0px 0px 5px 0px #656565; - -webkit-box-shadow: 0px 0px 5px 0px #656565; - -o-box-shadow: 0px 0px 5px 0px #656565; - box-shadow: 0px 0px 5px 0px #656565; - filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=NaN, Strength=5); -} -form .form-group{ - margin-bottom: 15px; +.mat-tab-body-wrapper{ + padding: 10px; } -/* toolbox in admin */ -#toolBox{ - margin-top:10px !important; - margin-bottom: 10px !important; +table .mat-input-container{ + width:200px !important; +} + +/*HeaderV2*/ +#headerV2 .nav .open > a, .nav .open > a:focus, .nav .open > a:hover{ + background-color: inherit !important; } /* modal part */ @@ -49,132 +71,3 @@ form .form-group{ .modal-footer{ background:white; } - -/* datatables part */ -table.dataTable thead .sorting { - background-image: url("../../node_modules/datatables/media/images/sort_both.png")!important; -} -table.dataTable thead .sorting_asc { - background-image: url("../../node_modules/datatables/media/images/sort_asc.png")!important; -} -table.dataTable thead .sorting_desc { - background-image: url("../../node_modules/datatables/media/images/sort_desc.png")!important; -} -table.dataTable thead .sorting_asc_disabled { - background-image: url("../../node_modules/datatables/media/images/sort_asc_disabled.png")!important; -} -table.dataTable thead .sorting_desc_disabled { - background-image: url("../../node_modules/datatables/media/images/sort_desc_disabled.png")!important; -} -.datatablesCenter .dataTables_paginate{ - float:none !important; - text-align: center !important; -} -.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{ - background:#FDD16C !important; - border:none !important; - color:white !important; -} -.dataTables_wrapper .dataTables_paginate .paginate_button:hover :not(.disabled) :not(.current){ - background: white !important; - border:solid 1px white !important; - border-radius: 2px !important; - color:#333 !important; -} -.dataTables_wrapper .dataTables_paginate .paginate_button:active{ - background: none !important; - box-shadow: none !important; -} -.dataTables_wrapper .dataTables_paginate .paginate_button:hover :not(.disabled) :not(.current) i{ - color: #009DC5 !important; -} -.dataTables_wrapper .dataTables_paginate .paginate_button:active :not(.disabled) :not(.current) i{ - color: #FDD16C !important; -} -.dataTables_wrapper .dataTables_paginate .paginate_button .disabled:hover{ - background: none !important; - border:solid 1px white !important; - border-radius: 2px !important; -} -table.dataTable.display tbody tr.odd { - background-color: #DEEDF3 !important; -} -table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr.even:hover{ - background-color: #fff !important; -} -table.dataTable.hover tbody tr.odd:hover, table.dataTable.display tbody tr.odd:hover{ - background-color: #DEEDF3 !important; -} -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { - background-color: #DEEDF3 !important; -} -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { - background-color: #DEEDF3 !important; -} -table.dataTable thead th, table.dataTable thead td { - border-bottom: 1px solid #009DC5 !important; -} -table.dataTable.no-footer { - border-bottom: 1px solid #009DC5 !important; -} -table.dataTable thead th, table.dataTable tfoot th { - color: #009DC5 !important; -} -a.next{ - background-image: none !important; -} -.dataTables_info{ - float: none !important; - color:#666 !important; -} -.dataTables_filter input{ - font-size: inherit; -} -.dataTables_length{ - float:none !important; -} -.dataTables_length select{ - width:auto !important; -} - -.tooltipster-sidetip.tooltipster-maarch .tooltipster-box { - background: white; - border: solid 2px #009DC5; - border-radius: 3px; - box-shadow: 5px 5px 2px 0 rgba(0,0,0,0.4); - width: 300px; -} - -.tooltipster-sidetip.tooltipster-maarch .tooltipster-content { - color: #666; - padding: 8px; -} - -.help{ - background: none !important; - border: none !important; -} -.help:active,.help:hover{ - background: none !important; - border: none !important; -} - -.help i{ - font-size: 10px; - position: relative; - top: -6px; - right: -6px; -} - -.selectAll, .unselectAll{ - cursor: pointer; - float:left; -} - -.selectAll:active, .unselectAll:active{ - color: #009DC5 !important; -} - -.mandatory{ - color:red; -} \ No newline at end of file diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration.module.js b/apps/maarch_entreprise/js/angular/app/administration/administration.module.js index 1b270d4f96e6b4e160deffa98c9dd6742394719c..4e6e9961ad7bd38ba6f4d24f3c8564db90dd04a5 100755 --- a/apps/maarch_entreprise/js/angular/app/administration/administration.module.js +++ b/apps/maarch_entreprise/js/angular/app/administration/administration.module.js @@ -10,6 +10,7 @@ var core_1 = require("@angular/core"); var common_1 = require("@angular/common"); var forms_1 = require("@angular/forms"); var http_1 = require("@angular/common/http"); +var md2_1 = require("md2"); var app_material_module_1 = require("../app-material.module"); var administration_routing_module_1 = require("./administration-routing.module"); var administration_component_1 = require("./administration.component"); @@ -36,7 +37,8 @@ AdministrationModule = __decorate([ forms_1.FormsModule, http_1.HttpClientModule, app_material_module_1.AppMaterialModule, - administration_routing_module_1.AdministrationRoutingModule + administration_routing_module_1.AdministrationRoutingModule, + md2_1.Md2Module ], declarations: [ administration_component_1.AdministrationComponent, @@ -50,7 +52,8 @@ AdministrationModule = __decorate([ parameter_administration_component_1.ParameterAdministrationComponent, priorities_administration_component_1.PrioritiesAdministrationComponent, priority_administration_component_1.PriorityAdministrationComponent, - reports_administration_component_1.ReportsAdministrationComponent + reports_administration_component_1.ReportsAdministrationComponent, + users_administration_component_1.DataTablePipe ] }) ], AdministrationModule); diff --git a/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts b/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts index ccf538913c79f8fa152d0ae398632ff18df5b214..1d434ba3e114e4c13743fafbf2331f82473e3882 100755 --- a/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts +++ b/apps/maarch_entreprise/js/angular/app/administration/administration.module.ts @@ -2,12 +2,13 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; +import { Md2Module } from 'md2'; import { AppMaterialModule } from '../app-material.module'; import { AdministrationRoutingModule } from './administration-routing.module'; import { AdministrationComponent } from './administration.component'; -import { UsersAdministrationComponent } from './users-administration.component'; +import { UsersAdministrationComponent, DataTablePipe } from './users-administration.component'; import { UserAdministrationComponent } from './user-administration.component'; import { StatusesAdministrationComponent } from './statuses-administration.component'; import { StatusAdministrationComponent } from './status-administration.component'; @@ -19,13 +20,15 @@ import { PrioritiesAdministrationComponent } from './priorities-administratio import { PriorityAdministrationComponent } from './priority-administration.component'; import { ReportsAdministrationComponent } from './reports-administration.component'; + @NgModule({ imports: [ CommonModule, FormsModule, HttpClientModule, AppMaterialModule, - AdministrationRoutingModule + AdministrationRoutingModule, + Md2Module ], declarations: [ AdministrationComponent, @@ -39,7 +42,8 @@ import { ReportsAdministrationComponent } from './reports-administration.c ParameterAdministrationComponent, PrioritiesAdministrationComponent, PriorityAdministrationComponent, - ReportsAdministrationComponent + ReportsAdministrationComponent, + DataTablePipe ] }) export class AdministrationModule { } \ No newline at end of file diff --git a/apps/maarch_entreprise/js/angular/app/app-material.module.js b/apps/maarch_entreprise/js/angular/app/app-material.module.js index f5ffbc313d593469d97b3c27863216f0ea6af5ff..a9d1cc9a9661f91e169090a10b30618ed8464ec0 100644 --- a/apps/maarch_entreprise/js/angular/app/app-material.module.js +++ b/apps/maarch_entreprise/js/angular/app/app-material.module.js @@ -26,8 +26,9 @@ AppMaterialModule = __decorate([ material_1.MdButtonModule, material_1.MdCardModule, material_1.MdButtonToggleModule, - material_1.MdSnackBarModule, - material_1.MdAutocompleteModule + material_1.MdProgressSpinnerModule, + material_1.MdToolbarModule, + material_1.MdMenuModule ], exports: [ material_1.MdCheckboxModule, @@ -40,8 +41,9 @@ AppMaterialModule = __decorate([ material_1.MdButtonModule, material_1.MdCardModule, material_1.MdButtonToggleModule, - material_1.MdSnackBarModule, - material_1.MdAutocompleteModule + material_1.MdProgressSpinnerModule, + material_1.MdToolbarModule, + material_1.MdMenuModule ] }) ], AppMaterialModule); diff --git a/apps/maarch_entreprise/js/angular/app/app-material.module.ts b/apps/maarch_entreprise/js/angular/app/app-material.module.ts index ae8de076d4453566787722f01fd697be80e07d3b..6d6b01cc03d25995eeda02d95f94b21969ac075e 100644 --- a/apps/maarch_entreprise/js/angular/app/app-material.module.ts +++ b/apps/maarch_entreprise/js/angular/app/app-material.module.ts @@ -9,7 +9,10 @@ import { MdSidenavModule, MdButtonModule, MdCardModule, - MdButtonToggleModule + MdButtonToggleModule, + MdProgressSpinnerModule, + MdToolbarModule, + MdMenuModule } from '@angular/material'; @@ -24,7 +27,10 @@ import { MdSidenavModule, MdButtonModule, MdCardModule, - MdButtonToggleModule + MdButtonToggleModule, + MdProgressSpinnerModule, + MdToolbarModule, + MdMenuModule ], exports: [ MdCheckboxModule, @@ -36,7 +42,10 @@ import { MdSidenavModule, MdButtonModule, MdCardModule, - MdButtonToggleModule + MdButtonToggleModule, + MdProgressSpinnerModule, + MdToolbarModule, + MdMenuModule ] }) export class AppMaterialModule { } diff --git a/apps/maarch_entreprise/js/angular/app/app.component.js b/apps/maarch_entreprise/js/angular/app/app.component.js index 33439b8c6e5cd8835b2de00882d6e67927448050..7040e6a6ddf632855b57dbfc6c924203d981e108 100755 --- a/apps/maarch_entreprise/js/angular/app/app.component.js +++ b/apps/maarch_entreprise/js/angular/app/app.component.js @@ -15,8 +15,15 @@ var AppComponent = (function () { AppComponent = __decorate([ core_1.Component({ selector: 'my-app', - template: "<div id=\"resultInfo\" class=\"fade\" style=\"display:none;\"></div><router-outlet></router-outlet>", - styleUrls: ['../../node_modules/bootstrap/dist/css/bootstrap.min.css'] + //template: `<menu-app></menu-app><router-outlet></router-outlet>`, + template: "<router-outlet></router-outlet>", + encapsulation: core_1.ViewEncapsulation.None, + styleUrls: [ + '../../node_modules/bootstrap/dist/css/bootstrap.min.css', + '../../node_modules/@angular/material/prebuilt-themes/indigo-pink.css', + 'css/engine.css', + 'css/jstree-custom.min.css' //treejs module + ] }) ], AppComponent); exports.AppComponent = AppComponent; diff --git a/apps/maarch_entreprise/js/angular/app/app.component.ts b/apps/maarch_entreprise/js/angular/app/app.component.ts index ee44d3143842c56385dcc443211f9cafb1e284dd..841d450dd0b3b0dedd13f672bca781d2bc9fb804 100755 --- a/apps/maarch_entreprise/js/angular/app/app.component.ts +++ b/apps/maarch_entreprise/js/angular/app/app.component.ts @@ -1,8 +1,15 @@ -import { Component } from '@angular/core'; +import { Component, ViewEncapsulation } from '@angular/core'; @Component({ - selector: 'my-app', - template: `<div id="resultInfo" class="fade" style="display:none;"></div><router-outlet></router-outlet>`, - styleUrls : ['../../node_modules/bootstrap/dist/css/bootstrap.min.css'] + selector: 'my-app', + //template: `<menu-app></menu-app><router-outlet></router-outlet>`, + template: `<router-outlet></router-outlet>`, + encapsulation: ViewEncapsulation.None, + styleUrls : [ + '../../node_modules/bootstrap/dist/css/bootstrap.min.css', + '../../node_modules/@angular/material/prebuilt-themes/indigo-pink.css', + 'css/engine.css', + 'css/jstree-custom.min.css' //treejs module + ] }) export class AppComponent {} diff --git a/apps/maarch_entreprise/js/angular/app/app.module.js b/apps/maarch_entreprise/js/angular/app/app.module.js index 748f117ab91b2cdbed94516c2d3616ff726d54bb..8bcaa65780b5345b8c9bf97c2a280bdd07890476 100755 --- a/apps/maarch_entreprise/js/angular/app/app.module.js +++ b/apps/maarch_entreprise/js/angular/app/app.module.js @@ -11,6 +11,9 @@ var platform_browser_1 = require("@angular/platform-browser"); var animations_1 = require("@angular/platform-browser/animations"); var forms_1 = require("@angular/forms"); var http_1 = require("@angular/common/http"); +var app_material_module_1 = require("./app-material.module"); +var md2_1 = require("md2"); +var header_component_1 = require("./header.component"); var app_component_1 = require("./app.component"); var app_routing_module_1 = require("./app-routing.module"); var administration_module_1 = require("./administration/administration.module"); @@ -29,9 +32,12 @@ AppModule = __decorate([ forms_1.FormsModule, http_1.HttpClientModule, administration_module_1.AdministrationModule, - app_routing_module_1.AppRoutingModule + app_routing_module_1.AppRoutingModule, + app_material_module_1.AppMaterialModule, + md2_1.Md2Module ], declarations: [ + header_component_1.HeaderComponent, app_component_1.AppComponent, profile_component_1.ProfileComponent, signature_book_component_1.SignatureBookComponent, diff --git a/apps/maarch_entreprise/js/angular/app/app.module.ts b/apps/maarch_entreprise/js/angular/app/app.module.ts index c3afb563acfe5819d4eff1228230cfdc7a5e269d..a21c8654434e4747cfe6051e35f6b9924146ffa7 100755 --- a/apps/maarch_entreprise/js/angular/app/app.module.ts +++ b/apps/maarch_entreprise/js/angular/app/app.module.ts @@ -3,7 +3,10 @@ import { BrowserModule } from '@angular/platform-browser' import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; +import { AppMaterialModule } from './app-material.module'; +import { Md2Module } from 'md2'; +import { HeaderComponent } from './header.component'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { AdministrationModule } from './administration/administration.module'; @@ -12,20 +15,23 @@ import { ProfileComponent } from './profile.component'; import { SignatureBookComponent, SafeUrlPipe } from './signature-book.component'; @NgModule({ - imports: [ - BrowserModule, - BrowserAnimationsModule, - FormsModule, - HttpClientModule, - AdministrationModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - ProfileComponent, - SignatureBookComponent, - SafeUrlPipe - ], - bootstrap: [ AppComponent] + imports: [ + BrowserModule, + BrowserAnimationsModule, + FormsModule, + HttpClientModule, + AdministrationModule, + AppRoutingModule, + AppMaterialModule, + Md2Module + ], + declarations: [ + HeaderComponent, + AppComponent, + ProfileComponent, + SignatureBookComponent, + SafeUrlPipe + ], + bootstrap: [AppComponent] }) export class AppModule { } diff --git a/apps/maarch_entreprise/js/angular/systemjs.config.js b/apps/maarch_entreprise/js/angular/systemjs.config.js index 8b8ef0c6a13af1561b0a188ebf4ce74eb3bfcaab..dbb88f58f2c36fa1a9b0523e6e4be93b2b2b82c3 100755 --- a/apps/maarch_entreprise/js/angular/systemjs.config.js +++ b/apps/maarch_entreprise/js/angular/systemjs.config.js @@ -28,6 +28,7 @@ '@angular/http': 'npm:@angular/http/bundles/http.umd.min.js', '@angular/material': 'npm:@angular/material/bundles/material.umd.min.js', '@angular/cdk': 'npm:@angular/cdk/bundles/cdk.umd.min.js', + 'md2': 'npm:md2/bundles/md2.umd.js', // other libraries 'rxjs': 'npm:rxjs', diff --git a/apps/maarch_entreprise/merged_css.php b/apps/maarch_entreprise/merged_css.php index 60454acccfa124bf6acd01493277721920b199d3..571a20760c9c313502c21f27e7bc469b6db9b1c8 100755 --- a/apps/maarch_entreprise/merged_css.php +++ b/apps/maarch_entreprise/merged_css.php @@ -1,5 +1,16 @@ <?php -include_once('../../core/init.php'); +/** +* Copyright Maarch since 2008 under licence GPLv3. +* See LICENCE.txt file at the root folder for more details. +* This file is part of Maarch software. + +* @brief merged_css +* @author dev <dev@maarch.org> +* @ingroup apps +*/ + +require_once '../../core/init.php'; + function compress($buffer) { /* remove comments */ @@ -12,7 +23,7 @@ function compress($buffer) return $buffer; } -$date = mktime(0, 0, 0, date("m") + 2 , date("d"), date("Y")); +$date = mktime(0, 0, 0, date("m") + 2, date("d"), date("Y")); $date = date("D, d M Y H:i:s", $date); $time = 30 * 12 * 60 * 60; header("Pragma: public"); @@ -24,7 +35,8 @@ header('Content-type: text/css; charset=utf-8'); ob_start("compress"); -include 'apps/' . $_SESSION['config']['app_id'] . '/css/styles.css'; +require 'apps/' . $_SESSION['config']['app_id'] . '/css/styles.css'; + foreach (array_keys($_SESSION['modules_loaded']) as $value) { if (file_exists( $_SESSION['config']['corepath'] . 'custom' . DIRECTORY_SEPARATOR @@ -42,24 +54,17 @@ foreach (array_keys($_SESSION['modules_loaded']) as $value) { } } -include_once 'apps/' . $_SESSION['config']['app_id'] . '/css/doctype_levels.css'; -include_once 'apps/' . $_SESSION['config']['app_id'] . '/css/bootstrapTree.css'; +require_once 'apps/' . $_SESSION['config']['app_id'] . '/css/doctype_levels.css'; +require_once 'apps/' . $_SESSION['config']['app_id'] . '/css/bootstrapTree.css'; //Views readfile('apps/maarch_entreprise/css/administration.component.css'); //Dependencies readfile('node_modules/tooltipster/dist/css/tooltipster.bundle.min.css'); -readfile('node_modules/datatables/media/css/jquery.dataTables.min.css'); -readfile('node_modules/jquery-typeahead/dist/jquery.typeahead.min.css'); -readfile('node_modules/@angular/material/prebuilt-themes/indigo-pink.css'); readfile('apps/maarch_entreprise/css/chosen.min.css'); readfile('node_modules/photoswipe/dist/photoswipe.css'); readfile('node_modules/photoswipe/dist/default-skin/default-skin.css'); readfile('apps/maarch_entreprise/css/photoswipe_custom.css'); -//Custom CSS for V2 -readfile('apps/maarch_entreprise/css/engine.css'); -readfile('apps/maarch_entreprise/css/bootstrap-chosen.css'); -readfile('apps/maarch_entreprise/css/jstree-custom.min.css'); ob_end_flush(); diff --git a/apps/maarch_entreprise/merged_js.php b/apps/maarch_entreprise/merged_js.php index 5851615b1a2321045ecb7ba090b664f17c08a66a..5faf5140027a72102560494914a51b2e26c9f9b8 100755 --- a/apps/maarch_entreprise/merged_js.php +++ b/apps/maarch_entreprise/merged_js.php @@ -1,28 +1,19 @@ <?php +/** +* Copyright Maarch since 2008 under licence GPLv3. +* See LICENCE.txt file at the root folder for more details. +* This file is part of Maarch software. -/* -* Copyright 2017 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. +* @brief merged_js +* @author dev <dev@maarch.org> +* @ingroup apps */ -include_once('../../core/init.php'); -include_once($_SESSION['config']['corepath'].DIRECTORY_SEPARATOR.'apps/maarch_entreprise'.DIRECTORY_SEPARATOR.'merged_jsAbstract.php'); +require_once '../../core/init.php'; +require_once $_SESSION['config']['corepath'].DIRECTORY_SEPARATOR.'apps/maarch_entreprise'.DIRECTORY_SEPARATOR.'merged_jsAbstract.php'; -class MergedJs extends MergedJsAbstract{ +class MergedJs extends MergedJsAbstract +{ // Your stuff her } diff --git a/apps/maarch_entreprise/merged_jsAbstract.php b/apps/maarch_entreprise/merged_jsAbstract.php index ec57a22a92f7cf4333159c42692a660c57d93d31..80bdc8e12795b3dd6b8b3afdd08c23c10f78d2e8 100755 --- a/apps/maarch_entreprise/merged_jsAbstract.php +++ b/apps/maarch_entreprise/merged_jsAbstract.php @@ -1,110 +1,106 @@ -<?php - -/* -* Copyright 2017 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. -*/ - -class MergedJsAbstract { - public function header() { - if ( empty($_GET['debug']) ) { - $date = mktime(0,0,0,date("m" ) + 2 ,date("d" ) ,date("Y" ) ); - $date = date("D, d M Y H:i:s", $date); - $time = 30*12*60*60; - header("Pragma: public"); - header("Expires: ".$date." GMT"); - header("Cache-Control: max-age=".$time.", must-revalidate"); - header('Content-type: text/javascript'); - } - } - public function start() { - ob_start(); - } - public function end() { - ob_end_flush(); - } - - public function merge_lib() { - readfile('apps/maarch_entreprise/js/prototype.js'); - - //scriptaculous (prototype) - readfile('apps/maarch_entreprise/js/scriptaculous.js'); - readfile('apps/maarch_entreprise/js/effects.js'); - readfile('apps/maarch_entreprise/js/controls.js'); - - //Dependencies - readfile('node_modules/jquery/dist/jquery.min.js'); - readfile('node_modules/core-js/client/shim.js'); //Angular - readfile('node_modules/zone.js/dist/zone.min.js'); //Angular - readfile('node_modules/bootstrap/dist/js/bootstrap.min.js'); - readfile('node_modules/chart.js/Chart.min.js'); - readfile('node_modules/tinymce/tinymce.min.js'); - readfile('node_modules/datatables/media/js/jquery.dataTables.min.js'); - readfile('node_modules/jquery.nicescroll/jquery.nicescroll.min.js'); - readfile('node_modules/tooltipster/dist/js/tooltipster.bundle.min.js'); - readfile('node_modules/jquery-typeahead/dist/jquery.typeahead.min.js'); - readfile('node_modules/hammerjs/hammer.min.js'); //Angular Material - readfile('apps/maarch_entreprise/js/chosen.jquery.min.js'); - readfile('node_modules/jstree-bootstrap-theme/dist/jstree.js'); - readfile('apps/maarch_entreprise/js/bootstrap-tree.js'); //DEPRECATED use jstree instead - - //Mobile - readfile('node_modules/photoswipe/dist/photoswipe.min.js'); - readfile('node_modules/photoswipe/dist/photoswipe-ui-default.min.js'); - - //Maarch - include('apps/maarch_entreprise/js/functions.js'); - include('apps/maarch_entreprise/js/indexing.js'); - readfile('apps/maarch_entreprise/js/angularFunctions.js'); - - -// include('apps/maarch_entreprise/js/RSVP.js'); -// include('apps/maarch_entreprise/js/render.js'); -// include('apps/maarch_entreprise/js/jio.js'); - - - echo "\n"; - } - - public function merge_module() { - if ( !empty($_SESSION['modules_loaded'])) { - foreach(array_keys($_SESSION['modules_loaded']) as $value) - { - if(file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.$_SESSION['modules_loaded'][$value]['name'].DIRECTORY_SEPARATOR."js".DIRECTORY_SEPARATOR."functions.js") - || file_exists($_SESSION['config']['corepath'].'modules'.DIRECTORY_SEPARATOR.$_SESSION['modules_loaded'][$value]['name'].DIRECTORY_SEPARATOR."js".DIRECTORY_SEPARATOR."functions.js")) - { - include('modules/'.$_SESSION['modules_loaded'][$value]['name'].'/js/functions.js'); - } - } - } - } - - public function merge() { - if ( empty($_GET['html'] ) ) { - $this->header(); - $this->start(); - $this->merge_lib(); - $this->merge_module(); - $this->end(); - } else { - echo '<html><body><script>'; - $this->merge_lib(); - $this->merge_module(); - echo '</script></body></html>';exit; - } - } -} +<?php +/** +* Copyright Maarch since 2008 under licence GPLv3. +* See LICENCE.txt file at the root folder for more details. +* This file is part of Maarch software. + +* @brief merged_jsAbstract +* @author dev <dev@maarch.org> +* @ingroup apps +*/ + +class MergedJsAbstract +{ + public function header() + { + if (empty($_GET['debug'])) { + $date = mktime(0, 0, 0, date("m") + 2, date("d"), date("Y")); + $date = date("D, d M Y H:i:s", $date); + $time = 30*12*60*60; + header("Pragma: public"); + header("Expires: ".$date." GMT"); + header("Cache-Control: max-age=".$time.", must-revalidate"); + header('Content-type: text/javascript'); + } + } + public function start() + { + ob_start(); + } + public function end() + { + ob_end_flush(); + } + + public function merge_lib() + { + readfile('apps/maarch_entreprise/js/prototype.js'); + + //scriptaculous (prototype) + readfile('apps/maarch_entreprise/js/scriptaculous.js'); + readfile('apps/maarch_entreprise/js/effects.js'); + readfile('apps/maarch_entreprise/js/controls.js'); + + //Dependencies + readfile('node_modules/jquery/dist/jquery.min.js'); + readfile('node_modules/core-js/client/shim.js'); //V2 - Angular + readfile('node_modules/zone.js/dist/zone.min.js'); //V2 - Angular + readfile('node_modules/bootstrap/dist/js/bootstrap.min.js'); //V2 + readfile('node_modules/chart.js/Chart.min.js'); + readfile('node_modules/tinymce/tinymce.min.js'); + readfile('node_modules/jquery.nicescroll/jquery.nicescroll.min.js'); //V2 + readfile('node_modules/tooltipster/dist/js/tooltipster.bundle.min.js'); //V2 + readfile('node_modules/jquery-typeahead/dist/jquery.typeahead.min.js'); //V2 + readfile('node_modules/hammerjs/hammer.min.js'); //V2- Angular Material + readfile('apps/maarch_entreprise/js/chosen.jquery.min.js'); + readfile('node_modules/jstree-bootstrap-theme/dist/jstree.js'); //V2 + readfile('apps/maarch_entreprise/js/bootstrap-tree.js'); //DEPRECATED use jstree instead + + //Mobile + readfile('node_modules/photoswipe/dist/photoswipe.min.js'); + readfile('node_modules/photoswipe/dist/photoswipe-ui-default.min.js'); + + //Maarch + include 'apps/maarch_entreprise/js/functions.js'; + include 'apps/maarch_entreprise/js/indexing.js'; + readfile('apps/maarch_entreprise/js/angularFunctions.js'); + + + // include('apps/maarch_entreprise/js/RSVP.js'); + // include('apps/maarch_entreprise/js/render.js'); + // include('apps/maarch_entreprise/js/jio.js'); + + + echo "\n"; + } + + public function merge_module() + { + if (!empty($_SESSION['modules_loaded'])) { + foreach (array_keys($_SESSION['modules_loaded']) as $value) { + + if (file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.$_SESSION['modules_loaded'][$value]['name'].DIRECTORY_SEPARATOR."js".DIRECTORY_SEPARATOR."functions.js") + || file_exists($_SESSION['config']['corepath'].'modules'.DIRECTORY_SEPARATOR.$_SESSION['modules_loaded'][$value]['name'].DIRECTORY_SEPARATOR."js".DIRECTORY_SEPARATOR."functions.js") + ) { + include 'modules/'.$_SESSION['modules_loaded'][$value]['name'].'/js/functions.js'; + } + } + } + } + + public function merge() + { + if (empty($_GET['html'])) { + $this->header(); + $this->start(); + $this->merge_lib(); + $this->merge_module(); + $this->end(); + } else { + echo '<html><body><script>'; + $this->merge_lib(); + $this->merge_module(); + echo '</script></body></html>';exit; + } + } +} diff --git a/package.json b/package.json index 43c9b7e71f4bd07ee1ef59ac831463e8f928b7e1..e353a603ca1151562baebbda65307c811691c479 100755 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "jquery-typeahead": "^2.8.0", "jquery.nicescroll": "^3.6.8", "jstree-bootstrap-theme": "^1.0.1", + "md2": "0.0.28", "photoswipe": "^4.1.2", "tinymce": "^4.6.2", "tooltipster": "^4.2.5",