mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Fixing the logic for the toggleWhatYouControl show/hide bit.
work item: 17528 --HG-- branch : 1.x
This commit is contained in:
@@ -128,7 +128,7 @@
|
|||||||
|
|
||||||
//make sure the placeholder value is not taken as the input value when submitting forms
|
//make sure the placeholder value is not taken as the input value when submitting forms
|
||||||
$("form").live("submit", function () {
|
$("form").live("submit", function () {
|
||||||
$(":input[placeholder].placeholderd").val("");
|
$(":input[placeholder].placeholderd").val("");
|
||||||
});
|
});
|
||||||
|
|
||||||
return _this;
|
return _this;
|
||||||
@@ -137,10 +137,12 @@
|
|||||||
var _this = $(this);
|
var _this = $(this);
|
||||||
var _controllees = $("[data-controllerid=" + _this.attr("id") + "]");
|
var _controllees = $("[data-controllerid=" + _this.attr("id") + "]");
|
||||||
var _controlleesAreHidden = _controllees.is(":hidden");
|
var _controlleesAreHidden = _controllees.is(":hidden");
|
||||||
if (_this.is(":checked") && _controlleesAreHidden) {
|
if (_this.is(":checked")) {
|
||||||
_controllees.hide(); // <- unhook this when the following comment applies
|
if (_controlleesAreHidden) {
|
||||||
$(_controllees.show()[0]).find("input").focus(); // <- aaaand a slideDown there...eventually
|
_controllees.hide(); // <- unhook this when the following comment applies
|
||||||
} else if (!(_this.is(":checked") && _controlleesAreHidden)) {
|
$(_controllees.show()[0]).find("input").focus(); // <- aaaand a slideDown there...eventually
|
||||||
|
}
|
||||||
|
} else if (!_controlleesAreHidden) {
|
||||||
//_controllees.slideUp(200); <- hook this back up when chrome behaves, or when I care less...or when chrome behaves
|
//_controllees.slideUp(200); <- hook this back up when chrome behaves, or when I care less...or when chrome behaves
|
||||||
_controllees.hide()
|
_controllees.hide()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user