forked from pluginsGLPI/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetabase.js
More file actions
33 lines (30 loc) · 804 Bytes
/
metabase.js
File metadata and controls
33 lines (30 loc) · 804 Bytes
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
$(function() {
// do like a jquery toggle but based on a parameter
$.fn.toggleFromValue = function(val) {
if (val === 1
|| val === "1"
|| val === true) {
this.show();
} else {
this.hide();
}
};
$(document).on("click", ".metabase_collection_list label", function() {
$(this).toggleClass('expanded');
});
$(document).on("click", "a.extract", function() {
var id = $(this).data('id');
var type = $(this).data('type');
$('<div>').dialog({
modal: true,
open: function (){
$(this).load('../plugins/metabase/ajax/extract_json.php', {
'id': id,
'type': type
});
},
height: 800,
width: '80%'
});
});
});