summaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-12-17 15:14:08 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-12-18 11:02:51 +0100
commit3f38540619ece91a5f77cdd202ba339d3eb41462 (patch)
tree17386de2fc2b0972bb5f42453af3fcf4ffcb416f /server/sonar-web/src/main/js/apps/coding-rules
parenta76c4cc7cee9d6974324d93d936b904eab4960dc (diff)
downloadsonarqube-3f38540619ece91a5f77cdd202ba339d3eb41462.tar.gz
sonarqube-3f38540619ece91a5f77cdd202ba339d3eb41462.zip
install webpack
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/app.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/filters-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/partials.js8
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js8
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-custom-rule-creation.hbs2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs2
7 files changed, 10 insertions, 18 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/app.js b/server/sonar-web/src/main/js/apps/coding-rules/app.js
index feb040c3562..da579fc59c6 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/app.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/app.js
@@ -12,8 +12,6 @@ import WorkspaceListView from './workspace-list-view';
import WorkspaceHeaderView from './workspace-header-view';
import FacetsView from './facets-view';
import FiltersView from './filters-view';
-import './partials';
-import '../../helpers/handlebars-helpers';
var App = new Marionette.Application(),
init = function () {
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/filters-view.js b/server/sonar-web/src/main/js/apps/coding-rules/filters-view.js
index 51359305d94..9d54403297e 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/filters-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/filters-view.js
@@ -17,6 +17,8 @@ export default Marionette.ItemView.extend({
},
serializeData: function () {
- return _.extend(this._super(), { canWrite: this.options.app.canWrite });
+ return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
+ canWrite: this.options.app.canWrite
+ });
}
});
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/partials.js b/server/sonar-web/src/main/js/apps/coding-rules/partials.js
deleted file mode 100644
index 9eb9de128e6..00000000000
--- a/server/sonar-web/src/main/js/apps/coding-rules/partials.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import Handlebars from 'hbsfy/runtime';
-import ActivationPartial from './templates/_coding-rules-workspace-list-item-activation.hbs';
-import FacetHeaderPartial from './templates/facets/_coding-rules-facet-header.hbs';
-import MarkdownTipsPartial from '../../components/common/templates/_markdown-tips.hbs';
-
-Handlebars.registerPartial('_coding-rules-workspace-list-item-activation', ActivationPartial);
-Handlebars.registerPartial('_coding-rules-facet-header', FacetHeaderPartial);
-Handlebars.registerPartial('_markdown-tips', MarkdownTipsPartial);
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js
index e861820b8e8..32a89029883 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js
@@ -9,7 +9,7 @@ export default ModalForm.extend({
template: Template,
ui: function () {
- return _.extend(this._super(), {
+ return _.extend(ModalForm.prototype.ui.apply(this, arguments), {
qualityProfileSelect: '#coding-rules-quality-profile-activation-select',
qualityProfileSeverity: '#coding-rules-quality-profile-activation-severity',
qualityProfileActivate: '#coding-rules-quality-profile-activation-activate',
@@ -18,13 +18,13 @@ export default ModalForm.extend({
},
events: function () {
- return _.extend(this._super(), {
+ return _.extend(ModalForm.prototype.events.apply(this, arguments), {
'click @ui.qualityProfileActivate': 'activate'
});
},
onRender: function () {
- this._super();
+ ModalForm.prototype.onRender.apply(this, arguments);
this.ui.qualityProfileSelect.select2({
width: '250px',
@@ -128,7 +128,7 @@ export default ModalForm.extend({
var availableProfiles = this.getAvailableQualityProfiles(this.options.rule.get('lang')),
contextProfile = this.options.app.state.get('query').qprofile;
- return _.extend(this._super(), {
+ return _.extend(ModalForm.prototype.serializeData.apply(this, arguments), {
change: this.model && this.model.has('severity'),
params: params,
qualityProfiles: availableProfiles,
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-custom-rule-creation.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-custom-rule-creation.hbs
index 660c4a57d51..dcb9cd973a9 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-custom-rule-creation.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-custom-rule-creation.hbs
@@ -34,7 +34,7 @@
<td>
<textarea name="markdown_description" id="coding-rules-custom-rule-creation-html-description"
class="coding-rules-markdown-description" rows="15">{{{mdDesc}}}</textarea>
- <span class="text-right">{{> '_markdown-tips' }}</span>
+ <span class="text-right">{{> '../../../../components/common/templates/_markdown-tips' }}</span>
</td>
</tr>
<tr class="property">
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs
index 49856ca84f5..858bebf3854 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs
@@ -35,7 +35,7 @@
<td>
<textarea name="markdown_description" id="coding-rules-manual-rule-creation-html-description"
class="coding-rules-markdown-description" rows="15">{{{mdDesc}}}</textarea>
- <span class="text-right">{{> '_markdown-tips' }}</span>
+ <span class="text-right">{{> '../../../../components/common/templates/_markdown-tips' }}</span>
</td>
</tr>
</table>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs
index d24143dc42c..f9ad18feb91 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs
@@ -36,7 +36,7 @@
<a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
</td>
<td class="text-right">
- {{> '_markdown-tips' }}
+ {{> '../../../../components/common/templates/_markdown-tips' }}
</td>
</tr>
</tbody>