-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquerymobile_datebox.module
57 lines (53 loc) · 1.51 KB
/
jquerymobile_datebox.module
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
<?php
/**
* @file
* Defines the library entry
*
* @author Mathew Winstone <mwinstone@coldfrontlabs.ca>
* @copyright 2011 Coldfront Labs Inc.
* @license Copyright (c) 2011 All rights reserved
*/
/**
* Implements hook_library().
*/
function jquerymobile_datebox_library() {
// Datebox library
$libraries['datebox'] = array(
'title' => 'Datebox',
'website' => 'http://dev.jtsage.com/jQM-DateBox/',
'version' => '1.0rc1',
'js' => array(
libraries_get_path('jquerymobile-datebox') . '/jquery.mobile.datebox.min.js' => array(
'weight' => (int)JQUERYMOBILE_LIBRARY_WEIGHT + 1,
),
),
'css' => array(
libraries_get_path('jquerymobile-datebox') . '/jquery.mobile.datebox.min.css' => array(
'type' => 'file',
'media' => 'screen',
),
),
);
return $libraries;
}
/**
* Implements hook_library_alter().
*
* Loads the unminified version of the library when development mode is
* enabled
*/
function jquerymobile_datebox_library_alter(&$libraries, $module) {
if (variable_get('jquerymobile_datebox_dev', FALSE)) {
if ($module == 'jquerymobile_datebox' && isset($libraries['datebox'])) {
$libraries['datebox']['js'] = array(
libraries_get_path('jquerymobile-datebox') . '/jquery.mobile.datebox.js' => array(),
);
$libraries['datebox']['css'] = array(
libraries_get_path('jquerymobile-datebox') . '/jquery.mobile.datebox.css' => array(
'type' => 'file',
'media' => 'screen',
),
);
}
}
}