mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-15 20:49:41 +01:00
246 lines
7.3 KiB
HTML
Executable File
246 lines
7.3 KiB
HTML
Executable File
|
|
<br>
|
|
</div>
|
|
<!-- /.container-fluid -->
|
|
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
|
|
<a class="scroll-to-top rounded" href="#page-top">
|
|
<i class="fa fa-chevron-up"></i>
|
|
</a>
|
|
|
|
<!-- Bootstrap core JavaScript -->
|
|
<script src="{STYLE_PATH_ADMIN}js/jquery.min.js"></script>
|
|
<script src="{STYLE_PATH_ADMIN}js/tether.min.js"></script>
|
|
<script src="{STYLE_PATH_ADMIN}js/popper.min.js"></script>
|
|
<script src="{STYLE_PATH_ADMIN}js/bootstrap.min.js"></script>
|
|
|
|
|
|
<!-- extra javascript -->
|
|
<script type="text/javascript" src="{STYLE_PATH_ADMIN}js/jqBarGraph.js"></script>
|
|
|
|
<IF NAME="go_to==d_img_ctrl">
|
|
<script type="text/javascript" src="{STYLE_PATH_ADMIN}js/jquery.waitforimages.js"></script>
|
|
</IF>
|
|
|
|
<IF NAME="go_to==start">
|
|
<script type="text/javascript">
|
|
$.ajax({url: "https://api.github.com/repos/awssat/kleeja/contributors",
|
|
dataType: 'json',
|
|
success: function (data) {
|
|
var template = $('#ghTemplate')[0].outerHTML;
|
|
$.each(data, function(i, item) {
|
|
$("#gtresults").append(template.replace('%id%', item['id']).replace('%login%', item['login']).replace('ghTemplate',
|
|
'gt'+item['id']).replace('%avatarUrl%', item['avatar_url']).replace('%contributions%', item['contributions']).replace('%htmlUrl%', item['html_url']));
|
|
$('#gt'+item['id']).removeAttr('style');
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
</IF>
|
|
|
|
|
|
<script type="text/javascript">
|
|
<!--//
|
|
$(function () {
|
|
|
|
//check for msg, reports every 5min
|
|
setTimeout(check_msg_and_reports, 240000);
|
|
|
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
$('[data-toggle="popover"]').popover();
|
|
|
|
|
|
<IF NAME="go_to==start">
|
|
$('#chart_stats').jqBarGraph({
|
|
data: arrayOfDataMulti,
|
|
colors: ['#0275d8', '#d9534f'],
|
|
legends: ['{lang.FILE}', '{lang.IMAGE}'],
|
|
legend: true,
|
|
animate: true,
|
|
height: 240,
|
|
barSpace: 5,
|
|
width: $('#chart_stats').width
|
|
});
|
|
document.getElementById("chart_stats").style.height = "251px";
|
|
</IF>
|
|
|
|
|
|
<IF NAME="go_to==d_img_ctrl">
|
|
$('.xthumbs').waitForImages(function(){
|
|
$('#imgs_loading').fadeOut(2000);
|
|
$('#imgs_loading').css('display', 'none');
|
|
});
|
|
|
|
//when checked one checkbox?
|
|
$(".kcheck input[type=checkbox]").change( function(){
|
|
if($('.kcheck input[type=checkbox]:checked').length == 1){
|
|
$('#search-one-item').css('display', 'inline');
|
|
} else{
|
|
$('#search-one-item select').prop('selectedIndex', 0);
|
|
$('#search-one-item').css('display', 'none');
|
|
}
|
|
});
|
|
|
|
$(".kcheck input[type=checkbox]").click( function(){
|
|
$(this).attr('checked', !$(this).attr('checked'));
|
|
$(this).trigger('change');
|
|
});
|
|
|
|
$(".kcheck").click( function(){
|
|
$(this).find('input').attr('checked', !$(this).find('input').attr('checked'));
|
|
$(this).find('input').trigger('change');
|
|
});
|
|
|
|
|
|
$('#search-one-item select').change(function(){
|
|
tt = this.options[this.selectedIndex].value;
|
|
dd = $('.kcheck input[type=checkbox]:checked').val();
|
|
if(tt == 1){
|
|
s_value = $('#ip_'+dd).html();
|
|
}else if(tt == 2){
|
|
s_value = $('#user_'+dd).html();
|
|
}
|
|
|
|
window.open("{action_search}&s_input="+tt+"&s_value=" + encodeURI(s_value), '_blank');
|
|
});
|
|
|
|
$('.img-thumb-item a').click(function (e) {
|
|
$('.image-model img').attr('src', $(this).attr('data-img-url'));
|
|
// return false;
|
|
});
|
|
</IF>
|
|
|
|
|
|
|
|
$(".cb-enable").click(function(){
|
|
var parent = $(this).parents('.switch');
|
|
$('.cb-disable',parent).removeClass('selected');
|
|
$(this).addClass('selected');
|
|
$('.checkbox',parent).attr('checked', true);
|
|
});
|
|
$(".cb-disable").click(function(){
|
|
var parent = $(this).parents('.switch');
|
|
$('.cb-enable',parent).removeClass('selected');
|
|
$(this).addClass('selected');
|
|
$('.checkbox',parent).attr('checked', false);
|
|
});
|
|
|
|
|
|
// Scroll to top button appear
|
|
$(document).scroll(function() {
|
|
var scrollDistance = $(this).scrollTop();
|
|
if (scrollDistance > 100) {
|
|
$('.scroll-to-top').fadeIn();
|
|
} else {
|
|
$('.scroll-to-top').fadeOut();
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
function check_msg_and_reports(){
|
|
$.ajax({
|
|
url: './?check_msgs=1',
|
|
success: function (data) {
|
|
if (data.indexOf("::") !== -1) {
|
|
var nums = data.split("::");
|
|
if (nums[0] !== 0) {
|
|
$('.bubble_calls').html(nums[0]).css('display', 'inline');
|
|
}
|
|
|
|
if (nums[1] !== 0) {
|
|
$('.bubble_reports').html(nums[1]).css('display', 'inline');
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
setTimeout(check_msg_and_reports, 240000);
|
|
}
|
|
|
|
|
|
function change_color(obj, id, c, c2) {
|
|
c = (c === null) ? 'bg-danger' : c;
|
|
c2 = (c === null) ? 'bg-warning' : c2;
|
|
var ii = document.getElementById(id);
|
|
if (obj.checked) {
|
|
ii.setAttribute("class", c);
|
|
ii.setAttribute("className", c)
|
|
} else {
|
|
ii.setAttribute("class", c2);
|
|
ii.setAttribute("className", c2)
|
|
}
|
|
}
|
|
function checkAll(form, id, _do_c_, c, c2) {
|
|
for (var i = 0; i < form.elements.length; i++) {
|
|
if (form.elements[i].getAttribute("rel") !== id) { continue; }
|
|
if (form.elements[i].checked) {
|
|
uncheckAll(form, id, _do_c_, c, c2);
|
|
break
|
|
}
|
|
form.elements[i].checked = true;
|
|
change_color(form.elements[i], _do_c_ + '[' + form.elements[i].value + ']', c, c2)
|
|
}
|
|
}
|
|
function uncheckAll(form, id, _do_c_, c, c2) {
|
|
for (var i = 0; i < form.elements.length; i++) {
|
|
if (form.elements[i].getAttribute("rel") !== id) { continue; }
|
|
form.elements[i].checked = false;
|
|
change_color(form.elements[i], _do_c_ + '[' + form.elements[i].value + ']', c, c2)
|
|
}
|
|
}
|
|
function change_color_exts(id) {
|
|
eval('var ii = document.getElementById("su[' + id + ']");');
|
|
eval('var g_obj = document.getElementById("gal_' + id + '");');
|
|
eval('var u_obj = document.getElementById("ual_' + id + '");');
|
|
if (g_obj.checked && u_obj.checked) {
|
|
ii.setAttribute("class", 'o_all');
|
|
ii.setAttribute("className", 'o_all')
|
|
} else if (g_obj.checked) {
|
|
ii.setAttribute("class", 'o_g');
|
|
ii.setAttribute("className", 'o_g')
|
|
} else if (u_obj.checked) {
|
|
ii.setAttribute("class", 'o_u');
|
|
ii.setAttribute("className", 'o_u')
|
|
} else {
|
|
ii.setAttribute("class", '');
|
|
ii.setAttribute("className", '')
|
|
}
|
|
}
|
|
function checkAll_exts(form, id, _do_c_) {
|
|
for (var i = 0; i < form.elements.length; i++) {
|
|
if (form.elements[i].getAttribute("rel") !== id) { continue; }
|
|
if (form.elements[i].checked) {
|
|
uncheckAll_exts(form, id, _do_c_);
|
|
break
|
|
}
|
|
form.elements[i].checked = true;
|
|
change_color_exts(form.elements[i].value)
|
|
}
|
|
}
|
|
function uncheckAll_exts(form, id, _do_c_) {
|
|
for (var i = 0; i < form.elements.length; i++) {
|
|
if (form.elements[i].getAttribute("rel") !== id) { continue; }
|
|
form.elements[i].checked = false;
|
|
change_color_exts(form.elements[i].value)
|
|
}
|
|
}
|
|
|
|
|
|
function confirm_form(r)
|
|
{
|
|
var msg = !r ? '{lang.ARE_YOU_SURE_DO_THIS}' : r;
|
|
return confirm(msg);
|
|
}
|
|
|
|
function get_kleeja_link(link) {
|
|
location.href = link;
|
|
}
|
|
//-->
|
|
</script>
|
|
</body>
|
|
</html>
|