1 | <?php |
---|
2 | /** |
---|
3 | * Utilisations de pipelines par Massicot |
---|
4 | * |
---|
5 | * @plugin Massicot |
---|
6 | * @copyright 2015 |
---|
7 | * @author Michel @ Vertige ASBL |
---|
8 | * @licence GNU/GPL |
---|
9 | * @package SPIP\Massicot\Pipelines |
---|
10 | */ |
---|
11 | |
---|
12 | if (!defined('_ECRIRE_INC_VERSION')) return; |
---|
13 | |
---|
14 | |
---|
15 | /** |
---|
16 | * Insérer le plugin jquery de selection du cadre |
---|
17 | * |
---|
18 | * @pipeline jquery_plugins |
---|
19 | * @param array $scripts Les scripts qui seront insérés dans la page |
---|
20 | * @return array La liste des scripts complétée |
---|
21 | */ |
---|
22 | function massicot_jquery_plugins ($scripts) { |
---|
23 | |
---|
24 | $scripts[] = find_in_path('lib/jquery.imgareaselect.js/jquery.imgareaselect.dev.js'); |
---|
25 | |
---|
26 | return $scripts; |
---|
27 | } |
---|
28 | |
---|
29 | /** |
---|
30 | * Ajoute le plugins jqueryui Slider |
---|
31 | * |
---|
32 | * @pipeline jqueryui_plugins |
---|
33 | * @param array $scripts Plugins jqueryui à charger |
---|
34 | * @return array Liste des plugins jquerui complétée |
---|
35 | */ |
---|
36 | function massicot_jqueryui_plugins ($scripts) { |
---|
37 | |
---|
38 | $scripts[] = 'jquery.ui.slider'; |
---|
39 | |
---|
40 | return $scripts; |
---|
41 | } |
---|
42 | |
---|
43 | /** |
---|
44 | * Ajouter un brin de CSS |
---|
45 | * |
---|
46 | * @pipeline header_prive |
---|
47 | * @param array $flux Données du pipeline |
---|
48 | * @return array Données du pipeline |
---|
49 | */ |
---|
50 | function massicot_header_prive ($flux) { |
---|
51 | |
---|
52 | $flux .= '<link rel="stylesheet" type="text/css" media="screen" href="' . |
---|
53 | find_in_path('css/massicot.css') . '" />'; |
---|
54 | |
---|
55 | $flux .= '<link rel="stylesheet" type="text/css" media="screen" href="' . |
---|
56 | find_in_path('lib/jquery.imgareaselect.js/distfiles/css/imgareaselect-default.css') . '" />'; |
---|
57 | |
---|
58 | return $flux; |
---|
59 | } |
---|
60 | |
---|
61 | /** |
---|
62 | * Ajouter une action "recadrer" sur les documents |
---|
63 | * |
---|
64 | * @pipeline editer_document_actions |
---|
65 | * @param array $flux Données du pipeline |
---|
66 | * @return array Données du pipeline |
---|
67 | */ |
---|
68 | function massicot_document_desc_actions ($flux) { |
---|
69 | |
---|
70 | $flux['data'] .= recuperer_fond('prive/squelettes/inclure/lien_recadre', |
---|
71 | $flux['args']); |
---|
72 | |
---|
73 | return $flux; |
---|
74 | } |
---|