]> source.dussan.org Git - sonarqube.git/commitdiff
Merge remote-tracking branch 'origin/branch-5.0'
authorStas Vilchik <vilchiks@gmail.com>
Mon, 22 Dec 2014 14:35:06 +0000 (15:35 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 22 Dec 2014 14:35:06 +0000 (15:35 +0100)
Conflicts:
server/sonar-web/src/main/js/tests/e2e/views/issues.jade

1  2 
server/sonar-web/Gruntfile.coffee
server/sonar-web/src/main/coffee/issues/app-new.coffee
server/sonar-web/src/main/hbs/issues/issues-help.hbs
server/sonar-web/src/main/js/tests/e2e/views/issues.jade
server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb

index 45c4af59a1f2837434d961c876565f7aa1f5542b,5a58fcb119e33e3e24214849464c87276fdbba10..736f83885b8b984b5fa9963638a9035e659e6eea
@@@ -174,13 -172,9 +174,13 @@@ module.exports = (grunt) -
          name: 'coding-rules/app'
          out: '<%= pkg.assets %>build/js/coding-rules/app.js'
  
 +      codingRulesOld: options:
 +        name: 'coding-rules-old/app'
 +        out: '<%= pkg.assets %>build/js/coding-rules-old/app.js'
 +
        issues: options:
-         name: 'issues/app'
-         out: '<%= pkg.assets %>build/js/issues/app.js'
+         name: 'issues/app-new'
+         out: '<%= pkg.assets %>build/js/issues/app-new.js'
  
        measures: options:
          name: 'measures/app'
index 0000000000000000000000000000000000000000,9ae6f8b3604685dc6d52a04522fedc5176c8072d..c40aeee41de058bdfafdc7ff1dfd2f94d8ee7d01
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,130 +1,130 @@@
 -  'issues/models/facets'
+ requirejs.config
+   baseUrl: "#{baseUrl}/js"
+   paths:
+     'backbone': 'third-party/backbone'
+     'backbone.marionette': 'third-party/backbone.marionette'
+     'handlebars': 'third-party/handlebars'
+   shim:
+     'backbone.marionette':
+       deps: ['backbone']
+       exports: 'Marionette'
+     'backbone':
+       exports: 'Backbone'
+     'handlebars':
+       exports: 'Handlebars'
+ requirejs [
+   'backbone', 'backbone.marionette'
+   'issues/models/state'
+   'issues/layout'
+   'issues/models/issues'
 -    @issues = new Issues()
++  'components/navigator/models/facets'
+   'issues/models/filters'
+   'issues/controller'
+   'issues/router'
+   'issues/workspace-list-view'
+   'issues/workspace-header-view'
+   'issues/facets-view'
+   'issues/filters-view'
+   'issues/help-view'
+   'common/handlebars-extensions'
+ ], (
+   Backbone, Marionette
+   State
+   Layout
+   Issues
+   Facets
+   Filters
+   Controller
+   Router
+   WorkspaceListView
+   WorkspaceHeaderView
+   FacetsView
+   FiltersView
+   HelpView
+ ) ->
+   $ = jQuery
+   App = new Marionette.Application
+   issuesAppProcess = window.process.addBackgroundProcess()
+   App.addInitializer ->
+     @layout = new Layout()
+     $('.issues').empty().append @layout.render().el
+   App.addInitializer ->
+     @state = new State()
 -      collection: @issues
++    @list = new Issues()
+     @facets = new Facets()
+     @filters = new Filters()
+   App.addInitializer ->
+     @controller = new Controller app: @
+   App.addInitializer ->
+     @issuesView = new WorkspaceListView
+       app: @
 -      collection: @issues
++      collection: @list
+     @layout.workspaceListRegion.show @issuesView
+     @issuesView.bindScrollEvents()
+   App.addInitializer ->
+     @workspaceHeaderView = new WorkspaceHeaderView
+       app: @
++      collection: @list
+     @layout.workspaceHeaderRegion.show @workspaceHeaderView
+   App.addInitializer ->
+     @facetsView = new FacetsView
+       app: @
+       collection: @facets
+     @layout.facetsRegion.show @facetsView
+   App.addInitializer ->
+     @filtersView = new FiltersView
+       app: @
+       collection: @filters
+     @layout.filtersRegion.show @filtersView
+   App.addInitializer ->
+     $(window).on 'keypress', (e) =>
+       tagName = e.target.tagName
+       unless tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA'
+         code = e.keyCode || e.which
+         if code == 63
+           @helpView = new HelpView app: @
+           @helpView.render()
+   App.addInitializer ->
+     @controller.fetchFilters().done =>
+       key.setScope 'list'
+       @router = new Router app: @
+       Backbone.history.start()
+       window.process.finishBackgroundProcess issuesAppProcess
+   l10nXHR = window.requestMessages()
+   jQuery.when(l10nXHR).done -> App.start()
index a57ceebd728e12a58e1656293e12761bf02a076d,6279abc6c7e58406a7550f562152ba5fd83a212f..aba0a7cfe3ff9f5dfedeb77c9ecfd62cdf221436
@@@ -1,9 -1,7 +1,9 @@@
  extends ./layouts/main
  
  block header
 -  script(data-main='/js/issues/app-new', src='../js/require.js')
 +  script(src='../js/require.js')
 +  script.
-     window.waitForMocks('/js/issues/app.js');
++    window.waitForMocks('/js/issues/app-new.js');
  
  block body
    #content
index 5d8052da4ddcc1f558fb6b5df998fe94cd95236c,7be788685c10454ff828c1b8546c38b8e2198395..0a1423d24f26bfc4758844dde37b7d632c499a70
@@@ -1,5 -1,5 +1,5 @@@
  <% content_for :script do %>
-   <script data-main="<%= ApplicationController.root_context -%>/js/issues/app" src="<%= ApplicationController.root_context -%>/js/require.js"></script>
+   <script data-main="<%= ApplicationController.root_context -%>/js/issues/app-new" src="<%= ApplicationController.root_context -%>/js/require.js"></script>
  <% end %>
  
 -<div class="issues"></div>
 +<div class="issues search-navigator"></div>