1
|
(function($) {
|
2
|
'use strict';
|
3
|
|
4
|
|
5
|
var jRes = jRespond([
|
6
|
{
|
7
|
label: 'mobile',
|
8
|
enter: 0,
|
9
|
exit: 480
|
10
|
},{
|
11
|
label: 'tablet',
|
12
|
enter: 481,
|
13
|
exit: 979
|
14
|
},{
|
15
|
label: 'desktop',
|
16
|
enter: 980,
|
17
|
exit: 9999
|
18
|
}
|
19
|
]);
|
20
|
|
21
|
|
22
|
Drupal.behaviors.adminimal_os_class = {
|
23
|
attach: function (context, settings) {
|
24
|
|
25
|
if (navigator.userAgent.indexOf('Mac OS X') != -1) {
|
26
|
$("body").addClass("mac");
|
27
|
}
|
28
|
}
|
29
|
};
|
30
|
|
31
|
|
32
|
Drupal.behaviors.adminimal_module_filter_box = {
|
33
|
attach: function (context, settings) {
|
34
|
|
35
|
$('input#edit-module-filter-name').attr( "placeholder", Drupal.t('Search') );
|
36
|
}
|
37
|
};
|
38
|
|
39
|
|
40
|
Drupal.behaviors.krumo_remove_class = {
|
41
|
attach: function (context, settings) {
|
42
|
|
43
|
$('#console .messages.status').has("div.krumo-root").removeClass().addClass( "krumo-wrapper" );
|
44
|
}
|
45
|
};
|
46
|
|
47
|
|
48
|
Drupal.behaviors.adminimal_media_queries = {
|
49
|
attach: function (context, settings) {
|
50
|
jRes.addFunc([
|
51
|
{
|
52
|
breakpoint: 'mobile',
|
53
|
enter: function() {
|
54
|
$( "body" ).addClass( "mq-mobile" );
|
55
|
},
|
56
|
exit: function() {
|
57
|
$( "body" ).removeClass( "mq-mobile" );
|
58
|
}
|
59
|
},{
|
60
|
breakpoint: 'tablet',
|
61
|
enter: function() {
|
62
|
$( "body" ).addClass( "mq-tablet" );
|
63
|
},
|
64
|
exit: function() {
|
65
|
$( "body" ).removeClass( "mq-tablet" );
|
66
|
}
|
67
|
},{
|
68
|
breakpoint: 'desktop',
|
69
|
enter: function() {
|
70
|
$( "body" ).addClass( "mq-desktop" );
|
71
|
},
|
72
|
exit: function() {
|
73
|
$( "body" ).removeClass( "mq-desktop" );
|
74
|
}
|
75
|
}
|
76
|
]);
|
77
|
}
|
78
|
};
|
79
|
|
80
|
|
81
|
Drupal.behaviors.adminimal_move_active_primary_tab = {
|
82
|
attach: function (context, settings) {
|
83
|
|
84
|
$('#branding').has("ul.tabs.primary").addClass( "has-primary-tabs" );
|
85
|
|
86
|
|
87
|
jRes.addFunc({
|
88
|
breakpoint: 'mobile',
|
89
|
enter: function() {
|
90
|
$( "ul.tabs.primary li.active" ).clone().appendTo( "ul.tabs.primary" ).removeClass( "active" ).addClass( "current" );
|
91
|
$( "ul.tabs.primary li.active" ).css("display", "none");
|
92
|
},
|
93
|
exit: function() {
|
94
|
$( "ul.tabs.primary li.active" ).css("display", "table");
|
95
|
$( "ul.tabs.primary li.current" ).css("display", "none");
|
96
|
}
|
97
|
});
|
98
|
}
|
99
|
};
|
100
|
|
101
|
})(jQuery);
|