Fixed up JS comments

This commit is contained in:
Phil Hughes 2016-05-20 09:20:35 +01:00
parent 7df4b16b56
commit fac08c3bcd
2 changed files with 4 additions and 5 deletions

View file

@ -106,9 +106,8 @@ issuable_created = false
checkChanged: -> checkChanged: ->
checked_issues = $('.selected_issue:checked') checked_issues = $('.selected_issue:checked')
if checked_issues.length > 0 if checked_issues.length > 0
ids = [] ids = $.map checked_issues, (value) ->
$.each checked_issues, (index, value) -> $(value).data('id')
ids.push $(value).data('id')
$('#update_issues_ids').val ids $('#update_issues_ids').val ids
$('.issues-other-filters').hide() $('.issues-other-filters').hide()

View file

@ -26,9 +26,9 @@
newUrl = decodeURIComponent(url) newUrl = decodeURIComponent(url)
for paramName, paramValue of params for paramName, paramValue of params
pattern = new RegExp "\\b(#{paramName}=).*?(&|$)" pattern = new RegExp "\\b(#{paramName}=).*?(&|$)"
if !paramValue? if not paramValue?
newUrl = newUrl.replace pattern, '' newUrl = newUrl.replace pattern, ''
else if url.search(pattern) >= 0 else if url.search(pattern) isnt -1
newUrl = newUrl.replace pattern, "$1#{paramValue}$2" newUrl = newUrl.replace pattern, "$1#{paramValue}$2"
else else
newUrl = "#{newUrl}#{(if newUrl.indexOf('?') > 0 then '&' else '?')}#{paramName}=#{paramValue}" newUrl = "#{newUrl}#{(if newUrl.indexOf('?') > 0 then '&' else '?')}#{paramName}=#{paramValue}"