events:
'click .js-toggle-filters': 'toggleFilters'
'click .js-filter': 'applyFilter'
- 'click .js-new-search': 'newSearch'
'click .js-filter-save-as': 'saveAs'
'click .js-filter-save': 'save'
'click .js-filter-copy': 'copy'
filter.fetch().done => @options.app.controller.applyFilter filter
- newSearch: ->
- @options.app.controller.newSearch()
-
-
saveAs: ->
query = @options.app.controller.getQuery '&'
url = "#{baseUrl}/issues/save_as_form?#{query}"
workspaceComponentViewerRegion: '.issues-workspace-component-viewer'
- initialize: ->
- $(window).on 'scroll.issues-layout', (=> @onScroll())
-
-
- onClose: ->
- $(window).off 'scroll.issues-layout'
-
-
- onScroll: ->
- scrollTop = $(window).scrollTop()
- $('.search-navigator').toggleClass 'sticky', scrollTop >= @topOffset
- @$('.search-navigator-side').css top: Math.max(0, Math.min(@topOffset - scrollTop, @topOffset))
-
-
- showSpinner: (region) ->
- @[region].show new Marionette.ItemView
- template: _.template('<i class="spinner"></i>')
-
-
showComponentViewer: ->
@scroll = $(window).scrollTop()
$('.issues').addClass 'issues-extended-view'
events: ->
_.extend super,
+ 'click .js-new-search': 'newSearch'
'click .js-back': 'returnToList'
window.onBulkIssues = @_onBulkIssues
+ newSearch: ->
+ @options.app.controller.newSearch()
+
+
returnToList: ->
@options.app.controller.closeComponentViewer()
<div class="search-navigator-filters-header">
<span class="search-navigator-filters-name">{{t 'coding_rules.page'}}</span>
</div>
-
-<div class="search-navigator-filters-actions">
- <div class="button-group">
- <button class="js-new-search" id="coding-rules-new-search">{{t 'issue_filter.new_search'}}</button>
- {{#if canWrite}}
- <button class="js-create-manual-rule">{{t 'coding_rules.create'}}</button>
- {{/if}}
- </div>
-</div>
<div class="container-side container-side-left">
+ <div class="search-navigator-filters"></div>
<div class="search-navigator-side">
- <div class="search-navigator-filters"></div>
<div class="search-navigator-facets"></div>
</div>
</div>
<div class="container-main">
+ <div class="search-navigator-workspace-header"></div>
<div class="search-navigator-workspace">
- <div class="search-navigator-workspace-header"></div>
<div class="search-navigator-workspace-list"></div>
<div class="search-navigator-workspace-details"></div>
</div>
</div>
{{/notNull}}
- {{#if canWrite}}
- <div class="search-navigator-header-buttons button-group">
+ <div class="search-navigator-header-buttons button-group">
+ <button class="js-new-search" id="coding-rules-new-search">{{t 'issue_filter.new_search'}}</button>
+ {{#if canWrite}}
+ <button class="js-create-manual-rule">{{t 'coding_rules.create'}}</button>
<button class="js-bulk-change">{{t 'bulk_change'}}</button>
- </div>
- {{/if}}
+ {{/if}}
+ </div>
</div>
<div class="search-navigator-filters-actions">
<div class="button-group">
- <button class="js-new-search" id="issues-new-search">{{t 'issue_filter.new_search'}}</button>
-
{{#if state.canManageFilters}}
{{#if filter.canModify}}
{{#if state.changed}}<button class="js-filter-save" id="issues-filter-save">{{t 'save'}}</button>{{/if}}
+
<div class="container-side container-side-left">
+ <div class="search-navigator-filters"></div>
<div class="search-navigator-side">
- <div class="search-navigator-filters"></div>
<div class="search-navigator-facets"></div>
</div>
</div>
<div class="container-main">
+ <div class="search-navigator-workspace-header"></div>
<div class="search-navigator-workspace">
- <div class="search-navigator-workspace-header"></div>
<div class="search-navigator-workspace-list"></div>
<div class="issues-workspace-component-viewer"></div>
</div>
<div class="search-navigator-header-buttons button-group">
+ <button class="js-new-search" id="issues-new-search">{{t 'issue_filter.new_search'}}</button>
<button id="issues-reload" class="js-reload">{{t 'reload'}}</button>
{{#if state.canBulkChange}}
<button id="issues-bulk-change" class="js-bulk-change">{{t 'bulk_change'}}</button>
define([
- 'coding-rules/rule/manual-rule-creation-view',
'templates/coding-rules'
-], function (ManualRuleCreationView) {
+], function () {
return Marionette.ItemView.extend({
template: Templates['coding-rules-filters'],
- events: {
- 'click .js-new-search': 'newSearch',
- 'click .js-create-manual-rule': 'createManualRule'
- },
-
- newSearch: function () {
- this.options.app.controller.newSearch();
- },
-
- createManualRule: function() {
- new ManualRuleCreationView({
- app: this.options.app
- }).render();
- },
-
serializeData: function () {
return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
canWrite: this.options.app.canWrite
define([
'components/navigator/workspace-header-view',
'coding-rules/bulk-change-popup-view',
+ 'coding-rules/rule/manual-rule-creation-view',
'templates/coding-rules'
-], function (WorkspaceHeaderView, BulkChangePopup) {
+], function (WorkspaceHeaderView, BulkChangePopup, ManualRuleCreationView) {
var $ = jQuery;
events: function () {
return _.extend(WorkspaceHeaderView.prototype.events.apply(this, arguments), {
'click .js-back': 'onBackClick',
- 'click .js-bulk-change': 'onBulkChangeClick'
+ 'click .js-bulk-change': 'onBulkChangeClick',
+ 'click .js-new-search': 'newSearch',
+ 'click .js-create-manual-rule': 'createManualRule'
});
},
}).render();
},
+ newSearch: function () {
+ this.options.app.controller.newSearch();
+ },
+
+ createManualRule: function() {
+ new ManualRuleCreationView({
+ app: this.options.app
+ }).render();
+ },
+
serializeData: function () {
return _.extend(WorkspaceHeaderView.prototype.serializeData.apply(this, arguments), {
canWrite: this.options.app.canWrite
position: relative;
.clearfix;
padding: 5px 10px;
- background-color: @barBackgroundColor;
}
.search-navigator-filters-selected {