diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-02-06 10:56:25 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-02-06 10:56:25 +0100 |
commit | a1f2eb6edb02271f5dc0a125d2999f1b5ccf0cf3 (patch) | |
tree | c41c6015eec5e7ac21e6792cbd6951b182f533a9 /server/sonar-web/src/main/js/coding-rules | |
parent | b2777a9567ffc7cf293914e7fc1a3f7745adfd0a (diff) | |
download | sonarqube-a1f2eb6edb02271f5dc0a125d2999f1b5ccf0cf3.tar.gz sonarqube-a1f2eb6edb02271f5dc0a125d2999f1b5ccf0cf3.zip |
SONAR-5820 remove old rule permalink
Diffstat (limited to 'server/sonar-web/src/main/js/coding-rules')
-rw-r--r-- | server/sonar-web/src/main/js/coding-rules/rule/custom-rule-view.js | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/coding-rules/show-app.js | 70 |
2 files changed, 1 insertions, 71 deletions
diff --git a/server/sonar-web/src/main/js/coding-rules/rule/custom-rule-view.js b/server/sonar-web/src/main/js/coding-rules/rule/custom-rule-view.js index 229c3bb2b88..c975c35d4fb 100644 --- a/server/sonar-web/src/main/js/coding-rules/rule/custom-rule-view.js +++ b/server/sonar-web/src/main/js/coding-rules/rule/custom-rule-view.js @@ -36,7 +36,7 @@ define([ return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), { canWrite: this.options.app.canWrite, templateRule: this.options.templateRule, - permalink: baseUrl + '/coding_rules/show?key=' + encodeURIComponent(this.model.id) + permalink: baseUrl + '/coding_rules/#rule_key=' + encodeURIComponent(this.model.id) }); } }); diff --git a/server/sonar-web/src/main/js/coding-rules/show-app.js b/server/sonar-web/src/main/js/coding-rules/show-app.js deleted file mode 100644 index 126ac3d3401..00000000000 --- a/server/sonar-web/src/main/js/coding-rules/show-app.js +++ /dev/null @@ -1,70 +0,0 @@ -requirejs.config({ - baseUrl: baseUrl + '/js' -}); - - -requirejs([ - 'coding-rules/models/rule', - 'coding-rules/rule-details-view' -], - function (Rule, - RuleDetailsView) { - - var $ = jQuery, - App = new Marionette.Application(); - - App.addInitializer(function () { - var url = baseUrl + '/api/rules/show', - key = decodeURIComponent(window.location.search.substr(5)), - options = { - key: key, - actives: true - }; - $.get(url, options).done(function (data) { - this.ruleDetailsView = new RuleDetailsView({ - app: App, - model: new Rule(data.rule), - actives: data.actives - }); - this.ruleDetailsView.render().$el.appendTo($('.page')); - }); - }); - - App.manualRepository = function () { - return { - key: 'manual', - name: t('coding_rules.manual_rules'), - language: 'none' - }; - }; - - App.getSubCharacteristicName = function (key) { - if (key != null && key !== 'NONE') { - var ch = _.findWhere(App.characteristics, { key: key }), - parent = _.findWhere(App.characteristics, { key: ch.parent }); - return [parent.name, ch.name].join(' > '); - } else { - return null; - } - }; - - var appXHR = $.get(baseUrl + '/api/rules/app').done(function(r) { - App.canWrite = r.canWrite; - App.qualityProfiles = _.sortBy(r.qualityprofiles, ['name', 'lang']); - App.languages = _.extend(r.languages, { - none: 'None' - }); - _.map(App.qualityProfiles, function(profile) { - profile.language = App.languages[profile.lang]; - }); - App.repositories = r.repositories; - App.repositories.push(App.manualRepository()); - App.statuses = r.statuses; - App.characteristics = r.characteristics; - }); - - $.when(window.requestMessages(), appXHR).done(function () { - App.start(); - }); - - }); |