gitlab-org--gitlab-foss/app/assets/javascripts/admin.js.coffee

33 lines
866 B
CoffeeScript
Raw Normal View History

class Admin
constructor: ->
$('input#user_force_random_password').on 'change', (elem) ->
elems = $('#user_password, #user_password_confirmation')
2012-09-06 11:32:01 +00:00
if $(@).attr 'checked'
elems.val('').attr 'disabled', true
else
elems.removeAttr 'disabled'
2012-09-11 20:24:53 +00:00
$('.log-tabs a').click (e) ->
e.preventDefault()
$(this).tab('show')
2012-11-29 04:49:11 +00:00
$('.log-bottom').click (e) ->
e.preventDefault()
visible_log = $(".file_content:visible")
visible_log.animate({ scrollTop: visible_log.find('ol').height() }, "fast")
modal = $('.change-owner-holder')
$('.change-owner-link').bind "click", (e) ->
e.preventDefault()
$(this).hide()
modal.show()
$('.change-owner-cancel-link').bind "click", (e) ->
e.preventDefault()
modal.hide()
$('.change-owner-link').show()
@Admin = Admin