mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 04:36:11 +10:00
Remove unused showAndHide, simpleFormat, and linkify functions
Also removes redundant `unbind` call
This commit is contained in:
@@ -49,8 +49,6 @@ window.slugify = (text) ->
|
||||
window.ajaxGet = (url) ->
|
||||
$.ajax({type: "GET", url: url, dataType: "script"})
|
||||
|
||||
window.showAndHide = (selector) ->
|
||||
|
||||
window.split = (val) ->
|
||||
return val.split( /,\s*/ )
|
||||
|
||||
@@ -92,15 +90,7 @@ window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) ->
|
||||
window.sanitize = (str) ->
|
||||
return str.replace(/<(?:.|\n)*?>/gm, '')
|
||||
|
||||
window.linkify = (str) ->
|
||||
exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig
|
||||
return str.replace(exp,"<a href='$1'>$1</a>")
|
||||
|
||||
window.simpleFormat = (str) ->
|
||||
linkify(sanitize(str).replace(/\n/g, '<br />'))
|
||||
|
||||
window.unbindEvents = ->
|
||||
$(document).unbind('scroll')
|
||||
$(document).off('scroll')
|
||||
|
||||
window.shiftWindow = ->
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
$.fn.showAndHide = ->
|
||||
$(@).show().
|
||||
delay(3000).
|
||||
fadeOut()
|
||||
|
||||
# Disable an element and add the 'disabled' Bootstrap class
|
||||
$.fn.extend disable: ->
|
||||
$(@)
|
||||
|
||||
Reference in New Issue
Block a user