Merge pull request #3883 from ssilvert/ace-warning

KEYCLOAK-4463: JS warnings caused by ui-ace while manipulating with
This commit is contained in:
Stan Silvert 2017-02-22 07:33:57 -05:00 committed by GitHub
commit 0d7b4bab11
4 changed files with 8 additions and 3 deletions

View file

@ -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({

View file

@ -1551,8 +1551,9 @@ module.controller('ResourceServerPolicyJSDetailCtrl', function($scope, $route, $
onInit : function() {
$scope.initEditor = function(editor){
editor.$blockScrolling = Infinity;
var session = editor.getSession();
session.setMode('ace/mode/javascript');
};
},

View file

@ -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>

View file

@ -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>