Sidebar works after sidebar ajax calls.

This commit is contained in:
Jacob Schatz 2016-02-02 19:42:19 -05:00
parent d87e317be4
commit 599e554ad4
6 changed files with 10 additions and 9 deletions

View file

@ -212,7 +212,7 @@ $ ->
$this = $(this)
$this.attr 'value', $this.val()
$('.right-sidebar').on 'click', '.gutter-toggle', (e) ->
$(document).on 'click', 'aside .gutter-toggle', (e) ->
e.preventDefault()
$this = $(this)
$thisIcon = $this.find 'i'

View file

@ -10,7 +10,7 @@ class @IssuableContext
$(".issuable-sidebar .inline-update").on "change", ".js-assignee", ->
$(this).submit()
$(".edit-link").click (e) ->
$(document).on "click",".edit-link", (e) ->
block = $(@).parents('.block')
block.find('.selectbox').show()
block.find('.value').hide()

View file

@ -97,7 +97,7 @@
.gutter-toggle {
margin-left: 10px;
border-left: 1px solid #F0F0F0;
border-left: 1px solid $border-gray-light;
padding-left: 10px;
}
}
@ -221,6 +221,7 @@
text-align: center;
margin-left: -19px;
padding-bottom: 10px;
color: #999999;
span {
display: block;

View file

@ -1,3 +1,3 @@
$('.issuable-sidebar').html("#{escape_javascript(render 'shared/issuable/sidebar', issuable: @issue)}");
$('.issuable-sidebar').parent().effect('highlight')
new Issue();
$('aside.right-sidebar').parent().html("#{escape_javascript(render 'shared/issuable/sidebar', issuable: @issue)}");
$('aside.right-sidebar').effect('highlight')
new Issue();

View file

@ -1,3 +1,3 @@
$('.issuable-sidebar').html("#{escape_javascript(render 'shared/issuable/sidebar', issuable: @merge_request)}");
$('.issuable-sidebar').parent().effect('highlight')
$('aside.right-sidebar')[0].outerHTML= "#{escape_javascript(render 'shared/issuable/sidebar', issuable: @merge_request)}";
$('aside.right-sidebar').effect('highlight')
merge_request = new MergeRequest();

View file

@ -23,7 +23,7 @@
%a.btn.btn-default.disabled{href: '#'}
Next
= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update', 'data-type' => 'json'} do |f|
= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f|
.block.assignee
.sidebar-collapsed-icon
- if issuable.assignee