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