Disable input if unlimited is checked
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
5
templates/Sparkle/assets/css/main.css
vendored
5
templates/Sparkle/assets/css/main.css
vendored
@@ -573,6 +573,11 @@ input {
|
|||||||
border-radius:3px;
|
border-radius:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[disabled] {
|
||||||
|
cursor: not-allowed;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
background:#fff url(../img/icons/text_align_left.png) no-repeat 5px 4px;
|
background:#fff url(../img/icons/text_align_left.png) no-repeat 5px 4px;
|
||||||
color: #333;
|
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("");
|
$(".searchtext").val("");
|
||||||
$(".submitsearch").click();
|
$(".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
|
// Height of divs fix
|
||||||
var snheight = $('#sidenavigation').height();
|
var snheight = $('#sidenavigation').height();
|
||||||
var mainheight = $('#maincontent').height();
|
var mainheight = $('#maincontent').height();
|
||||||
|
|||||||
Reference in New Issue
Block a user