script.js
6.91 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
"use strict";
$(document).ready(function() {
var $window = $(window);
//add id to main menu for mobile menu start
var getBody = $("body");
var bodyClass = getBody[0].className;
$(".main-menu").attr('id', bodyClass);
//add id to main menu for mobile menu end
// card js start
$(".card-header-right .close-card").on('click', function() {
var $this = $(this);
$this.parents('.card').animate({
'opacity': '0',
'-webkit-transform': 'scale3d(.3, .3, .3)',
'transform': 'scale3d(.3, .3, .3)'
});
setTimeout(function() {
$this.parents('.card').remove();
}, 800);
});
$(".card-header-right .minimize-card").on('click', function() {
var $this = $(this);
var port = $($this.parents('.card'));
var card = $(port).children('.card-block').slideToggle();
$(this).toggleClass("icon-minus").fadeIn('slow');
$(this).toggleClass("icon-plus").fadeIn('slow');
});
$(".card-header-right .full-card").on('click', function() {
var $this = $(this);
var port = $($this.parents('.card'));
port.toggleClass("full-card");
$(this).toggleClass("icon-maximize");
$(this).toggleClass("icon-minimize");
});
$("#more-details").on('click', function() {
$(".more-details").slideToggle(500);
});
$(".mobile-options").on('click', function() {
$(".navbar-container .nav-right").slideToggle('slow');
});
// card js end
$.mCustomScrollbar.defaults.axis = "yx";
$("#styleSelector .style-cont").slimScroll({
setTop: "10px",
height:"calc(100vh - 440px)",
});
$(".main-menu").mCustomScrollbar({
setTop: "10px",
setHeight: "calc(100% - 80px)",
});
/*chatbar js start*/
/*chat box scroll*/
var a = $(window).height() - 80;
$(".main-friend-list").slimScroll({
height: a,
allowPageScroll: false,
wheelStep: 5,
color: '#1b8bf9'
});
// search
$("#search-friends").on("keyup", function() {
var g = $(this).val().toLowerCase();
$(".userlist-box .media-body .chat-header").each(function() {
var s = $(this).text().toLowerCase();
$(this).closest('.userlist-box')[s.indexOf(g) !== -1 ? 'show' : 'hide']();
});
});
// open chat box
$('.displayChatbox').on('click', function() {
var my_val = $('.pcoded').attr('vertical-placement');
if (my_val == 'right') {
var options = {
direction: 'left'
};
} else {
var options = {
direction: 'right'
};
}
$('.showChat').toggle('slide', options, 500);
});
//open friend chat
$('.userlist-box').on('click', function() {
var my_val = $('.pcoded').attr('vertical-placement');
if (my_val == 'right') {
var options = {
direction: 'left'
};
} else {
var options = {
direction: 'right'
};
}
$('.showChat_inner').toggle('slide', options, 500);
});
//back to main chatbar
$('.back_chatBox').on('click', function() {
var my_val = $('.pcoded').attr('vertical-placement');
if (my_val == 'right') {
var options = {
direction: 'left'
};
} else {
var options = {
direction: 'right'
};
}
$('.showChat_inner').toggle('slide', options, 500);
$('.showChat').css('display', 'block');
});
// /*chatbar js end*/
$(".search-btn").on('click', function() {
$(".main-search").addClass('open');
$('.main-search .form-control').animate({
'width': '200px',
});
});
$(".search-close").on('click', function() {
$('.main-search .form-control').animate({
'width': '0',
});
setTimeout(function() {
$(".main-search").removeClass('open');
}, 300);
});
$('#mobile-collapse i').addClass('icon-toggle-right');
$('#mobile-collapse').on('click', function() {
$('#mobile-collapse i').toggleClass('icon-toggle-right');
$('#mobile-collapse i').toggleClass('icon-toggle-left');
});
});
$(document).ready(function() {
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
$('.theme-loader').fadeOut('slow', function() {
$(this).remove();
});
});
// toggle full screen
function toggleFullScreen() {
var a = $(window).height() - 10;
if (!document.fullscreenElement && // alternative standard method
!document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
$('.full-screen').toggleClass('icon-maximize');
$('.full-screen').toggleClass('icon-minimize');
}
/* --------------------------------------------------------
Color picker - demo only
-------------------------------------------------------- */
$('#styleSelector').append('' +
'<div class="selector-toggle">' +
'<a href="javascript:void(0)"></a>' +
'</div>' +
'<ul>' +
'<li>' +
'<p class="selector-title main-title st-main-title"><b>Sistema de Eventos </b>Coneepec</p>' +
'</li>' +
'</ul>' +
'<ul>'+
'<li>' +
'<a href="https://youtu.be/86yimvu67B8" target="_blank" class="btn btn-danger btn-block m-r-15 m-t-5 m-b-10"><i class="feather icon-youtube"></i> Canal de Youtube</a>' +
'</li>' +
'<li class="text-center">' +
'<span class="text-center f-18 m-t-15 m-b-15 d-block">¡ Gracias Por Visitarnos !</span>' +
'<a href="https://www.instagram.com/conepec/?hl=es-la" target="_blank" class="btn btn-instagram soc-icon m-b-20"><i class="feather icon-instagram"></i></a>' +
'<a href="https://twitter.com/concepec" target="_blank" class="btn btn-twitter soc-icon m-l-20 m-b-20"><i class="feather icon-twitter"></i></a>' +
'</li>' +
'</ul>'+
'<ul>' +
'<li>' +
'<span class="text-muted">© 2020 - Universidad Bolivariana de Venezuela, Dirección General de Tecnologías de Información y Telecomunicaciones - DGTIT.</span>'+
'</li>' +
'</ul>' +
'');