Start working on channel settings
This commit is contained in:
parent
f6615f1f20
commit
00abe7ced1
6 changed files with 63 additions and 12 deletions
|
|
@ -93,7 +93,8 @@ html, body {
|
|||
}
|
||||
|
||||
#leftpane-inner div.span12, #rightpane-inner div.span12,
|
||||
#leftpane-inner ul, #rightpane-inner ul {
|
||||
#leftpane-inner ul, #rightpane-inner ul,
|
||||
#channelsettingswrap div.span12 {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
24
www/assets/js/channelsettings.js
Normal file
24
www/assets/js/channelsettings.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
(function() {
|
||||
|
||||
$("#channelsettingswrap div").each(function() {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
function clickHandler(selector, div) {
|
||||
$(selector).click(function() {
|
||||
$("#channelsettings_nav li").each(function() {
|
||||
$(this).removeClass("active");
|
||||
});
|
||||
$(selector).parent().addClass("active");
|
||||
|
||||
$("#channelsettingswrap div").each(function() {
|
||||
$(this).hide();
|
||||
});
|
||||
$(div).show();
|
||||
});
|
||||
}
|
||||
|
||||
clickHandler("#show_optedit", "#optedit");
|
||||
clickHandler("#show_permedit", "#permedit");
|
||||
clickHandler("#show_motdedit", "#motdedit");
|
||||
})();
|
||||
|
|
@ -646,8 +646,11 @@ function handlePermissionChange() {
|
|||
$(selector).css("display", disp);
|
||||
}
|
||||
|
||||
if(CLIENT.rank < 2) {
|
||||
$(".modonly").hide();
|
||||
if(CLIENT.rank >= 2) {
|
||||
$("#channelsettingswrap").load("channeloptions.html");
|
||||
}
|
||||
else {
|
||||
$("#channelsettingswrap").html("");
|
||||
}
|
||||
|
||||
setVisible("#userpltoggle", CLIENT.rank >= 1);
|
||||
|
|
@ -669,15 +672,14 @@ function handlePermissionChange() {
|
|||
setVisible("#clearplaylist", hasPermission("playlistclear"));
|
||||
setVisible("#shuffleplaylist", hasPermission("playlistshuffle"));
|
||||
|
||||
setVisible("#modnav", CLIENT.rank >= 2);
|
||||
setVisible("#chanperms_tab", CLIENT.rank >= 3);
|
||||
setVisible("#permedit_tab", CLIENT.rank >= 3);
|
||||
setVisible("#banlist_tab", hasPermission("ban"));
|
||||
setVisible("#motdeditor_tab", hasPermission("motdedit"));
|
||||
setVisible("#csseditor_tab", CLIENT.rank >= 3);
|
||||
setVisible("#jseditor_tab", CLIENT.rank >= 3);
|
||||
setVisible("#filtereditor_tab", hasPermission("filteredit"));
|
||||
setVisible("#acl_tab", CLIENT.rank >= 3);
|
||||
setVisible("#dropchannel_tab", CLIENT.rank >= 10);
|
||||
setVisible("#motdedit_tab", hasPermission("motdedit"));
|
||||
setVisible("#cssedit_tab", CLIENT.rank >= 3);
|
||||
setVisible("#jsedit_tab", CLIENT.rank >= 3);
|
||||
setVisible("#filteredit_tab", hasPermission("filteredit"));
|
||||
// TODO add acl back?
|
||||
setVisible("#recentconn_tab", CLIENT.rank >= 3);
|
||||
|
||||
setVisible("#newpollbtn", hasPermission("pollctl"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue