empty value should also enable in order to stay backwards compatible.
This commit is contained in:
committed by
Sebastiaan Janssen
parent
b75a237162
commit
2321fbfcab
@@ -10,18 +10,14 @@ angular.module("umbraco.directives")
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//check if there's a value for the attribute, if there is and it's false then we conditionally don't
|
attrs.$observe("umbAutoFocus", function (newVal) {
|
||||||
//use auto focus.
|
var enabled = (newVal === "false" || newVal === 0 || newVal === false) ? false : true;
|
||||||
if (attrs.umbAutoFocus) {
|
if (enabled) {
|
||||||
attrs.$observe("umbAutoFocus", function (newVal) {
|
$timeout(function() {
|
||||||
var enabled = (newVal === "false" || newVal === 0 || newVal === false) ? false : true;
|
update();
|
||||||
if (enabled) {
|
});
|
||||||
$timeout(function() {
|
}
|
||||||
update();
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user