add checkbox initialization
This commit is contained in:
parent
9018a118fa
commit
ac24ed3dff
23
js/util.js
23
js/util.js
@ -1502,7 +1502,26 @@ var SN = { // StatusNet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
CheckBoxes: function() {
|
||||||
|
$("span[class='checkbox-wrapper']").addClass("unchecked");
|
||||||
|
$(".checkbox-wrapper").click(function(){
|
||||||
|
if($(this).children("input").attr("checked")){
|
||||||
|
// uncheck
|
||||||
|
$(this).children("input").attr({checked: ""});
|
||||||
|
$(this).removeClass("checked");
|
||||||
|
$(this).addClass("unchecked");
|
||||||
|
$(this).children("label").text("Private?");
|
||||||
|
}else{
|
||||||
|
// check
|
||||||
|
$(this).children("input").attr({checked: "checked"});
|
||||||
|
$(this).removeClass("unchecked");
|
||||||
|
$(this).addClass("checked");
|
||||||
|
$(this).children("label").text("Private");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1516,6 +1535,7 @@ var SN = { // StatusNet
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
SN.Init.AjaxForms();
|
SN.Init.AjaxForms();
|
||||||
SN.Init.UploadForms();
|
SN.Init.UploadForms();
|
||||||
|
SN.Init.CheckBoxes();
|
||||||
if ($('.'+SN.C.S.FormNotice).length > 0) {
|
if ($('.'+SN.C.S.FormNotice).length > 0) {
|
||||||
SN.Init.NoticeForm();
|
SN.Init.NoticeForm();
|
||||||
}
|
}
|
||||||
@ -1529,3 +1549,4 @@ $(document).ready(function(){
|
|||||||
SN.Init.Login();
|
SN.Init.Login();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
2
js/util.min.js
vendored
2
js/util.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user