mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
reverting custom logo
This commit is contained in:
parent
578988f2e4
commit
198fa2740a
@ -297,10 +297,12 @@ export default [
|
||||
$scope[key] = $scope.configDataResolve[key].default;
|
||||
if($scope[key + '_field'].type === "select"){
|
||||
// We need to re-instantiate the Select2 element
|
||||
// after resetting the value. Example:
|
||||
// `$scope.$broadcast(AD_HOC_COMMANDS_populated)`
|
||||
// after resetting the value. Example:
|
||||
$scope.$broadcast(key+'_populated', null, false);
|
||||
}
|
||||
if($scope[key + '_field'].reset === "CUSTOM_LOGO"){
|
||||
$scope.$broadcast(key+'_reverted');
|
||||
}
|
||||
loginUpdate();
|
||||
})
|
||||
.catch(function(error) {
|
||||
|
||||
@ -168,12 +168,18 @@ function(ConfigurationUtils, i18n, $rootScope) {
|
||||
scope.imageData = $rootScope.custom_logo;
|
||||
});
|
||||
|
||||
scope.update = function(e) {
|
||||
if(scope.$parent[fieldKey]) {
|
||||
scope.$on(fieldKey+'_reverted', function(e) {
|
||||
scope.update(e, true);
|
||||
});
|
||||
|
||||
scope.update = function(e, flag) {
|
||||
if(scope.$parent[fieldKey] || flag ) {
|
||||
e.preventDefault();
|
||||
scope.$parent[fieldKey] = '';
|
||||
filePickerButton.html(browseText);
|
||||
filePickerText.val('');
|
||||
filePicker.value = "";
|
||||
scope.imagePresent = false;
|
||||
}
|
||||
else {
|
||||
// Nothing exists so open file picker
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user