mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
Move front-end assets to be compatible with GLPI 11.0
This commit is contained in:
parent
115c355eb2
commit
478423a03b
@ -26,4 +26,4 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* empty file */
|
||||
/* empty CSS file */
|
@ -26,4 +26,4 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* empty file */
|
||||
/* empty JS file */
|
30
public/js/modules/mymodule.js
Normal file
30
public/js/modules/mymodule.js
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* Example plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of Example.
|
||||
*
|
||||
* Example 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 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Example 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 Example. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2006-2022 by Example plugin team.
|
||||
* @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* @link https://github.com/pluginsGLPI/example
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* empty JS module file */
|
||||
export {};
|
3
public/js/modules/package.json
Normal file
3
public/js/modules/package.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
@ -177,8 +177,9 @@ function plugin_init_example() {
|
||||
$PLUGIN_HOOKS['assign_to_ticket']['example'] = 1;
|
||||
|
||||
// Add specific files to add to the header : javascript or css
|
||||
$PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT]['example'] = 'example.js';
|
||||
$PLUGIN_HOOKS[Hooks::ADD_CSS]['example'] = 'example.css';
|
||||
$PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT]['example'] = 'js/example.js';
|
||||
$PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT_MODULE]['example'] = 'js/modules/mymodule.js';
|
||||
$PLUGIN_HOOKS[Hooks::ADD_CSS]['example'] = 'css/example.css';
|
||||
|
||||
// Add specific tags to the header
|
||||
$PLUGIN_HOOKS[Hooks::ADD_HEADER_TAG]['example'] = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user