Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
29626b08
Commit
29626b08
authored
May 26, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused `showAndHide`, `simpleFormat`, and `linkify` functions
Also removes redundant `unbind` call
parent
39d5a487
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
15 deletions
+0
-15
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+0
-10
app/assets/javascripts/extensions/jquery.js.coffee
app/assets/javascripts/extensions/jquery.js.coffee
+0
-5
No files found.
app/assets/javascripts/application.js.coffee
View file @
29626b08
...
@@ -49,8 +49,6 @@ window.slugify = (text) ->
...
@@ -49,8 +49,6 @@ window.slugify = (text) ->
window
.
ajaxGet
=
(
url
)
->
window
.
ajaxGet
=
(
url
)
->
$
.
ajax
({
type
:
"GET"
,
url
:
url
,
dataType
:
"script"
})
$
.
ajax
({
type
:
"GET"
,
url
:
url
,
dataType
:
"script"
})
window
.
showAndHide
=
(
selector
)
->
window
.
split
=
(
val
)
->
window
.
split
=
(
val
)
->
return
val
.
split
(
/,\s*/
)
return
val
.
split
(
/,\s*/
)
...
@@ -92,15 +90,7 @@ window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) ->
...
@@ -92,15 +90,7 @@ window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) ->
window
.
sanitize
=
(
str
)
->
window
.
sanitize
=
(
str
)
->
return
str
.
replace
(
/<(?:.|\n)*?>/gm
,
''
)
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
=
->
window
.
unbindEvents
=
->
$
(
document
).
unbind
(
'scroll'
)
$
(
document
).
off
(
'scroll'
)
$
(
document
).
off
(
'scroll'
)
window
.
shiftWindow
=
->
window
.
shiftWindow
=
->
...
...
app/assets/javascripts/extensions/jquery.js.coffee
View file @
29626b08
$
.
fn
.
showAndHide
=
->
$
(
@
).
show
().
delay
(
3000
).
fadeOut
()
# Disable an element and add the 'disabled' Bootstrap class
# Disable an element and add the 'disabled' Bootstrap class
$
.
fn
.
extend
disable
:
->
$
.
fn
.
extend
disable
:
->
$
(
@
)
$
(
@
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment