-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.js
114 lines (99 loc) · 2.39 KB
/
sidebar.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
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
function showsidebar()
{
console.log("sdjksdkjsdkjdskj");
var element = document.getElementById("viewscreen");
element.classList.toggle("toggle-pc");
var element = document.getElementById("sidebar");
element.classList.toggle("sidebar-width");
var element = document.getElementById("rightview");
element.classList.toggle("set-rightview");
}
function open_home_page()
{
window.location = '/home'
}
function open_adduser_page()
{
window.location = '/adduser'
}
function open_userlist_page()
{
window.location = '/userslist'
}
function open_communitylist_page()
{
window.location = '/communitylist'
}
function open_switchmodel_page()
{
// document.getElementById("switchmodel-title").innerHTML="Switch as User"
// document.getElementById("yes-switch").onclick = function()
// {
// window.location = '/switchcommunityhome'
// }
let word = 'Admin';
if($('p').html()=='admin')
word = 'User';
$.confirm({
title: 'Switch As ' + word,
content: 'Do you really want switch state...',
draggable: true,
buttons: {
Yes: {
btnClass: 'btn-success',
action: function ()
{
window.location = '/switchcommunityhome'
}
},
No: {
btnClass: 'btn-danger',
action: function () {}
},
}
});
}
function open_tag_page()
{
window.location = '/tagpanel'
}
function open_changepassword_page()
{
window.location = '/changepassword'
}
function open_communities_page()
{
console.log("here");
// return ;
window.location = '/home'
}
function editpage()
{
window.location = '/editpage'
}
function aslieditpage()
{
window.location = '/editinfo'
}
function open_logout()
{
$.confirm({
title: 'Confirm Logout!',
content: 'Do you really want logout?',
draggable: true,
theme : 'supervan',
buttons: {
Yes: {
btnClass: 'btn-success',
action: function ()
{
window.location = '/logout'
}
},
No: {
btnClass: 'btn-danger',
action: function () {}
},
}
});
}