mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 18:37:30 +00:00
Disable input if unlimited is checked
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
parent
7904946862
commit
00e74a05cb
5
templates/Sparkle/assets/css/main.css
vendored
5
templates/Sparkle/assets/css/main.css
vendored
@ -573,6 +573,11 @@ input {
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
input[disabled] {
|
||||
cursor: not-allowed;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background:#fff url(../img/icons/text_align_left.png) no-repeat 5px 4px;
|
||||
color: #333;
|
||||
|
13
templates/Sparkle/assets/js/main.js
vendored
13
templates/Sparkle/assets/js/main.js
vendored
@ -49,6 +49,19 @@ $(document).ready(function() {
|
||||
$(".searchtext").val("");
|
||||
$(".submitsearch").click();
|
||||
});
|
||||
// Make inputs with enabled unlimited checked disabled
|
||||
$("input[name$='_ul']").each(function() {
|
||||
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
||||
$("input[name='" + fieldname + "']").prop({
|
||||
disabled: $(this).is(":checked")
|
||||
});
|
||||
});
|
||||
$("input[name$='_ul']").change(function() {
|
||||
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
||||
$("input[name='" + fieldname + "']").prop({
|
||||
disabled: $(this).is(":checked")
|
||||
}).focus();
|
||||
});
|
||||
// Height of divs fix
|
||||
var snheight = $('#sidenavigation').height();
|
||||
var mainheight = $('#maincontent').height();
|
||||
|
Loading…
Reference in New Issue
Block a user