Make reset show the original icon
This commit is contained in:
+2
-2
@@ -111,9 +111,9 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Icon</label>
|
||||
<a href="" class="pull-right" style="font-weight: normal;" ng-click="appConfigure.icon.data = ''">Reset</a>
|
||||
<a href="" class="pull-right" style="font-weight: normal;" ng-click="appConfigure.resetCustomIcon()">Reset</a>
|
||||
<div>
|
||||
<img id="previewIcon" width="128" height="128" ng-src="{{appConfigure.icon.data || appConfigure.app.iconUrl}}" ng-click="appConfigure.showCustomIconSelector()"/>
|
||||
<img id="previewIcon" width="128" height="128" ng-src="{{appConfigure.icon.data || appConfigure.icon.url || appConfigure.app.iconUrl}}" ng-click="appConfigure.showCustomIconSelector()"/>
|
||||
<input type="file" id="iconFileInput" style="display: none" accept="image/png"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+6
-1
@@ -50,7 +50,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
ssoAuth: false,
|
||||
tags: '',
|
||||
label: '',
|
||||
icon: { data: null },
|
||||
icon: { file: null, data: null, url: null },
|
||||
|
||||
action: 'general',
|
||||
|
||||
@@ -254,6 +254,11 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
});
|
||||
},
|
||||
|
||||
resetCustomIcon: function () {
|
||||
$scope.appConfigure.icon.data = '';
|
||||
$scope.appConfigure.icon.url = $scope.appConfigure.app.iconUrl + '&original=true';
|
||||
},
|
||||
|
||||
showCustomIconSelector: function () {
|
||||
$('#iconFileInput').click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user