-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom.js
50 lines (40 loc) · 1.22 KB
/
custom.js
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
function castMedia(mediaNumber) {
var filterQueryString = location.search.replace("?","&");
var seekTime = "";
var enc = false;
var seekInputInputs = $('.seekInput');
for(var i=0; i<seekInputInputs.length && !enc; i++){
if (seekInputInputs[i].value && seekInputInputs[i].value != '00:00'){
seekTime = seekInputInputs[i].value;
enc = true;
}
}
var nextLocation = 'index.php?cast='+mediaNumber;
if (seekTime && seekTime != ''){
nextLocation += '&seekTime='+seekTime+':00';
}
location.href = nextLocation + filterQueryString;
}
function multiDeleteMedia() {
var filterQueryString = location.search.replace("?","&");
var checkboxes = $("input[type='checkbox']");
var multiDeleteIndex = "";
for (var i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].checked) {
multiDeleteIndex += i + ",";
}
}
multiDeleteIndex = multiDeleteIndex.substring(0, multiDeleteIndex.length-1);
location.href = 'index.php?multidelete=' + multiDeleteIndex + filterQueryString;
}
function filterContent(){
var filterData = $("#textoBuscador").val();
location.href = 'index.php?filter=' + filterData;
}
$(document).ready(function(){
$("#textoBuscador").keyup(function(e){
if (13 == e.keyCode) {
filterContent();
}
});
});