Merge pull request #3883 from ssilvert/ace-warning
KEYCLOAK-4463: JS warnings caused by ui-ace while manipulating with
This commit is contained in:
commit
0d7b4bab11
4 changed files with 8 additions and 3 deletions
|
@ -2468,6 +2468,10 @@ module.controller('RoleSelectorModalCtrl', function($scope, realm, config, confi
|
|||
module.controller('ProviderConfigCtrl', function ($modal, $scope, ComponentUtils) {
|
||||
$scope.fileNames = {};
|
||||
|
||||
// KEYCLOAK-4463
|
||||
$scope.initEditor = function(editor){
|
||||
editor.$blockScrolling = Infinity; // suppress warning message
|
||||
};
|
||||
|
||||
$scope.openRoleSelector = function (configName, config) {
|
||||
$modal.open({
|
||||
|
|
|
@ -1551,6 +1551,7 @@ module.controller('ResourceServerPolicyJSDetailCtrl', function($scope, $route, $
|
|||
|
||||
onInit : function() {
|
||||
$scope.initEditor = function(editor){
|
||||
editor.$blockScrolling = Infinity;
|
||||
var session = editor.getSession();
|
||||
|
||||
session.setMode('ace/mode/javascript');
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-6" data-ng-if="option.type == 'Script'">
|
||||
<div ng-model="config[option.name]" placeholder="Enter your script..." ui-ace="{ useWrapMode: true, showGutter: true, theme:'github', mode: 'javascript'}">
|
||||
<div ng-model="config[option.name]" placeholder="Enter your script..." ui-ace="{ onLoad : initEditor, useWrapMode: true, showGutter: true, theme:'github', mode: 'javascript'}">
|
||||
{{config[option.name]}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-6" data-ng-show="option.type == 'Script'">
|
||||
<div ng-model="config[option.name]" placeholder="Enter your script..." ui-ace="{ useWrapMode: true, showGutter: true, theme:'github', mode: 'javascript'}">
|
||||
<div ng-model="config[option.name]" placeholder="Enter your script..." ui-ace="{ onLoad : initEditor, useWrapMode: true, showGutter: true, theme:'github', mode: 'javascript'}">
|
||||
{{config[option.name]}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue