/
third_party.php
executable file
·369 lines (340 loc) · 9.39 KB
/
third_party.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* This file contains package definition for third party libraries.
* Defining them here allows for easy inclusion in views.
*/
/* Tag if debug is set : debug is set in user config file and this file is directly required in internal.php where $userConfig var arry is set */
/* This allow us to use minified version according to debug */
$debug = isset($userConfig['config']['debug']) ? $userConfig['config']['debug'] : 0;
/* To add more easily min version : config > 2 , seems really an core dev issue to fix bootstrap.js ;) */
$minVersion = ($debug>2) ? "":".min";
/* Please : comment the reason, mantis bug link: ajax don't need any package if i don't make error */
/* Ajax must renderPartial (better : always return json) and never render and don't registerScript (IMHO) / Shnoulle on 2016-11-16 */
if(isset($_GET['isAjax'])){
return array();
}
return array(
// jQuery
'jquery' => array(
'basePath' => 'third_party.jquery',
'js' => array(
'jquery-3.1.1'.$minVersion.'.js',
'jquery-migrate-3.0.0'.$minVersion.'.js',
)
),
// Bootstrap
// This package replace the Yiistrap register() function
// Then instead of using the composer dependency system for templates (will be used for LS3)
// We can use the package dependency system (easier for now)
'bootstrap' => array(
'basePath' => 'bootstrap',
'css'=> array(
'css/bootstrap.css',/* Admin need it, not public */
'css/yiistrap.css',
),
'depends' => array(
'jquery',
)
),
// bootstrap-slider : for multinumeric with slider
'bootstrap-slider' => array(
'basePath' => 'third_party.bootstrap-slider',
'js' => array(
'bootstrap-slider.min.js'
),
/* according to readme : JQuery is optional and the plugin can operate with or without it. boostrap must be loaded for css only */
),
'fontawesome' => array(
//'basePath' => 'third_party.bootstrap', // Need fix third_party alias
'basePath' => 'third_party.fontawesome',
'css'=> array(
'css/font-awesome.min.css',
),
),
// jQuery UI
'jqueryui' => array(
'basePath' => 'third_party.jquery-ui',
'js' => array(
'jquery-ui'.$minVersion.'.js',
),
'css' => array(
'jquery-ui.structure.css', /* else autocomplete or other broken */
),
'depends' => array(
'jquery',
)
),
// jquery bindWithDelay
'jquery-bindWithDelay' => array(
'basePath' => 'third_party.jquery-bindWithDelay',
'js' => array(
'bindWithDelay.js'
),
'depends' => array(
'jquery'
)
),
// jQuery Cookie
'jquery-cookie' => array(
'basePath' => 'third_party.jquery-cookie',
'js' => array(
'jquery.cookie.js'
),
'depends' => array(
'jquery'
)
),
// jQuery Superfish
'jquery-superfish' => array(
'basePath' => 'third_party.jquery-superfish',
'js' => array(
'js/superfish.js',
'js/hoverIntent.js'
),
'css' => array(
'css/superfish.css'
),
'depends' => array(
'jquery'
)
),
// jQuery json
'jquery-json' => array(
'basePath' => 'third_party.jquery-json',
'js' => array(
'jquery.json-2.4.min.js'
),
'depends' => array(
'jquery'
)
),
// jQuery blockUI
'jquery-blockUI' => array(
'basePath' => 'third_party.jquery-blockui',
'js' => array(
'jquery.blockUI.js'
),
'depends' => array(
'jquery'
)
),
// qTip2
'qTip2' => array(
'basePath' => 'third_party.qTip2',
'js' => array(
'dist/jquery.qtip.min.js'
),
'css' => array(
'dist/jquery.qtip.min.css'
),
'depends' => array(
'jquery'
)
),
// jQuery Table Sorter
'jquery-tablesorter' => array(
'basePath' => 'third_party.jquery-tablesorter',
'js' => array(
'jquery.tablesorter.min.js'
),
'depends' => array(
'jquery'
)
),
// jQuery NestedSortable
'jquery-nestedSortable' => array(
'basePath' => 'third_party.jquery-nestedSortable',
'js' => array(
'jquery.mjs.nestedSortable.js'
),
'depends' => array(
'jqueryui'
)
),
// Bootstrap Multiselect
'bootstrap-multiselect' => array(
'basePath' => 'third_party.bootstrap-multiselect',
'js' => array(
'js/bootstrap-multiselect.js',
),
'css' => array(
'css/bootstrap-multiselect.css',
),
'depends' => array(
'jquery'
)
),
// Ace
'ace' => array(
'basePath' => 'third_party.ace',
'js' => array(
'ace.js'
),
'depends' => array(
'jquery-ace'
)
),
// jQuery Ace
'jquery-ace' => array(
'basePath' => 'third_party.jquery-ace',
'js' => array(
'jquery.ace.js',
),
'depends' => array(
'jquery',
)
),
// jQuery selectboxes
'jquery-selectboxes' => array(
'basePath' => 'third_party.jquery-selectboxes.selectboxes',
'js' => array(
'jquery.selectboxes.js'
),
'depends' => array(
'jquery'
)
),
// jQuery touch punch : seems uneended now ?
'jquery-touch-punch' => array(
'basePath' => 'third_party.jquery-touch-punch',
'js' => array(
'jquery.ui.touch-punch.min.js'
),
'depends' => array(
'jqueryui'
)
),
// Decimal.js calculate in js
'decimal' => array(
'basePath' => 'third_party.decimal',
'js' => array(
'decimal.js'
),
'depends' => array(
)
),
// Moment.js use real simple dateTime modification
'moment' => array(
'basePath' => 'third_party.moment',
'js' => array(
'moment-with-locales.min.js'
),
'depends' => array(
)
),
// leaflet, needed for short text question with map (OSM)
'jsuri' => array(
'basePath' => 'third_party.jsUri',
'js' => array(
'Uri.js'
),
),
'bootstrap-datetimepicker' => array(
'basePath' => 'third_party.bootstrap-datetimepicker.build',
'css' => array(
'css/bootstrap-datetimepicker'.$minVersion.'.css'
),
'js' => array(
'js/bootstrap-datetimepicker.min.js'
),
'depends' => array(
'jquery',
'bootstrap',
'moment'
)
),
'bootstrap-switch' => array(
'basePath' => 'third_party.bootstrap-switch',
'css' => array(
'css/bootstrap-switch.min.css'
),
'js' => array(
'js/bootstrap-switch.min.js'
),
'depends' => array(
'jquery',
'bootstrap',
'moment'
)
),
'emoji' => array(
'basePath' => 'third_party.emojifont',
'css' => array(
'css/emoji.css',
'css/ss-emoji.css'
),
),
'jquery-datatable' => array(
'basePath' => 'third_party.jquery-datatable',
'css' => array(
'datatables.min.css'
),
'js' => array(
'datatables.js'
),
'depends' => array(
'jquery',
'bootstrap'
)
),
'es6promise' => array(
'basePath' => 'third_party.es6promise',
'js' => array(
'es6-promise.auto.min.js'
)
),
'dom2image' => array(
'basePath' => 'third_party.dom-to-image',
'js' => array(
'dist/dom-to-image.min.js',
)
),
'jspdf' => array(
'basePath' => 'third_party.jspdf',
'js' => array(
'jspdf.min.js',
'createpdf_worker.js'
),
'depends' => array(
'dom2image',
'es6promise',
'jquery',
'bootstrap'
)
),
/* Used by ranking question type */
'rubaxa-sortable' => array(
'basePath' => 'third_party.rubaxa-sortable', /* for sorting ability */
'js' => array(
'jquery.fn.sortable'.$minVersion.'.js'
),
'depends' => array(
'jquery',
)
),
'jquery-actual' => array(
'basePath' => 'third_party.jquery-actual', /* for samechoiceheight/samelistheight */
'js' => array(
'jquery.actual.min.js'
),
'depends' => array(
'jquery'
)
),
/* Used by short text with map by leaflet */
'leaflet' => array(
'basePath' => 'third_party.leaflet',
'js' => array(
'leaflet.js'
),
'css' => array(
'leaflet.css'
),
),
'devbridge-autocomplete' => array(
'basePath' => 'third_party.devbridge-autocomplete.dist', /* For geoname search autocomplete without jquery */
'js' => array(
'jquery.autocomplete'.$minVersion.'.js'
),
),
);