diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-07-27 15:07:53 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-07-27 16:05:58 +0200 |
commit | f3d1c28d3c760e4861310dff7c7f482c36720cee (patch) | |
tree | f350b50ead3b4e02979b9937d5550a0b0b2ca2d1 /server | |
parent | 3fb4249c84f66582f77d3f0fb15c46db91ed784f (diff) | |
download | sonarqube-f3d1c28d3c760e4861310dff7c7f482c36720cee.tar.gz sonarqube-f3d1c28d3c760e4861310dff7c7f482c36720cee.zip |
fix js error when open the rule workspace
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/components/workspace/main.js | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/workspace/views/rule-view.js | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/components/workspace/main.js b/server/sonar-web/src/main/js/components/workspace/main.js index 7aa7f901aa6..01d1e60fb5b 100644 --- a/server/sonar-web/src/main/js/components/workspace/main.js +++ b/server/sonar-web/src/main/js/components/workspace/main.js @@ -118,8 +118,10 @@ define([ }, showRule: function (model) { - this.showViewer(RuleView, model); - this.fetchRule(model); + var that = this; + this.fetchRule(model).done(function () { + that.showViewer(RuleView, model); + }); }, fetchRule: function (model) { diff --git a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js index b6ca04fee6f..f3e427116bc 100644 --- a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js +++ b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js @@ -25,11 +25,6 @@ define([ return BaseView.extend({ template: Templates['workspace-rule'], - modelEvents: { - 'destroy': 'destroy', - 'change': 'render' - }, - onRender: function () { BaseView.prototype.onRender.apply(this, arguments); this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' }); |