aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/api-documentation/layout.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-17 16:15:28 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-18 10:47:27 +0200
commit890ab0b59cdb3902f4869eabf8ca534814f1b3dd (patch)
tree0ed74726957e590f6506e378366ea15bf21bfcbd /server/sonar-web/src/main/js/apps/api-documentation/layout.js
parentce60ac8d2e137f33bb111668e54e78c195c73d79 (diff)
downloadsonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.tar.gz
sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.zip
migrate js apps to es2015 modules
Diffstat (limited to 'server/sonar-web/src/main/js/apps/api-documentation/layout.js')
-rw-r--r--server/sonar-web/src/main/js/apps/api-documentation/layout.js41
1 files changed, 20 insertions, 21 deletions
diff --git a/server/sonar-web/src/main/js/apps/api-documentation/layout.js b/server/sonar-web/src/main/js/apps/api-documentation/layout.js
index ac46b9c1bc6..229b48ec560 100644
--- a/server/sonar-web/src/main/js/apps/api-documentation/layout.js
+++ b/server/sonar-web/src/main/js/apps/api-documentation/layout.js
@@ -1,25 +1,24 @@
-define([
- './templates'
-], function () {
+import Marionette from 'backbone.marionette';
+import './templates';
- return Marionette.LayoutView.extend({
- template: Templates['api-documentation-layout'],
+export default Marionette.LayoutView.extend({
+ template: Templates['api-documentation-layout'],
- regions: {
- headerRegion: '.search-navigator-workspace-header',
- actionsRegion: '.search-navigator-filters',
- searchRegion: '.api-documentation-search',
- resultsRegion: '.api-documentation-results',
- detailsRegion: '.search-navigator-workspace-details'
- },
-
- onRender: function () {
- var navigator = this.$('.search-navigator');
- navigator.addClass('sticky search-navigator-extended-view');
- var top = navigator.offset().top;
- this.$('.search-navigator-workspace-header').css({ top: top });
- this.$('.search-navigator-side').css({ top: top }).isolatedScroll();
- }
- });
+ regions: {
+ headerRegion: '.search-navigator-workspace-header',
+ actionsRegion: '.search-navigator-filters',
+ searchRegion: '.api-documentation-search',
+ resultsRegion: '.api-documentation-results',
+ detailsRegion: '.search-navigator-workspace-details'
+ },
+ onRender: function () {
+ var navigator = this.$('.search-navigator');
+ navigator.addClass('sticky search-navigator-extended-view');
+ var top = navigator.offset().top;
+ this.$('.search-navigator-workspace-header').css({ top: top });
+ this.$('.search-navigator-side').css({ top: top }).isolatedScroll();
+ }
});
+
+