member roles edit
This commit is contained in:
1 parent
91830f86aa
commit
d0dcd71707
3 files changed
+14
-11
No files matched your search
@@ -1,14 +1,14 @@
|
||||
function checkSwitch() {
|
||||
$(".groups").each(function() {
|
||||
$(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled")
|
||||
});
|
||||
// $(".groups").each(function() {
|
||||
// $(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled")
|
||||
// });
|
||||
// $(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled');
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
checkSwitch();
|
||||
// checkSwitch();
|
||||
$('.onoff').click(function () {
|
||||
if($(this).parents("h4").length==1) {
|
||||
if($(this).parent("h4").length==1) {
|
||||
$(this).parents(".map-block").toggleClass("disabled");
|
||||
$(this).parents(".map-block").find(".form-horizontal").toggleClass("hide");
|
||||
if($(this).parents(".map-block").hasClass("disabled")){
|
||||
@@ -19,17 +19,17 @@ $(document).ready(function(){
|
||||
$(this).siblings(".subrole_disable_field").val("false");
|
||||
}
|
||||
}
|
||||
if($(this).parents("legend").length==1) {
|
||||
if($(this).parent("legend").length==1) {
|
||||
$(this).toggleClass("disabled");
|
||||
$(this).parents("legend").next("div").toggleClass("hide");
|
||||
if($(this).parents("legend").next("div").hasClass("hide")){
|
||||
$(this).parent("legend").next("div").toggleClass("hide");
|
||||
if($(this).parent("legend").next("div").hasClass("hide")){
|
||||
$(this).text("OFF");
|
||||
$(this).siblings(".subrole_disable_field").val("true");
|
||||
}else{
|
||||
$(this).text("ON");
|
||||
$(this).siblings(".subrole_disable_field").val("false");
|
||||
}
|
||||
checkSwitch();
|
||||
// checkSwitch();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user