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
Kazuhiko Shiozaki
gitlab-ce
Commits
3551df8e
Commit
3551df8e
authored
Sep 09, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor main.js refactor and docs
parent
ad1aa517
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
app/assets/javascripts/main.js.coffee
app/assets/javascripts/main.js.coffee
+8
-6
No files found.
app/assets/javascripts/main.js.coffee
View file @
3551df8e
...
...
@@ -21,8 +21,8 @@ window.disableButtonIfEmptyField = (field_selector, button_selector) ->
closest_submit
.
enable
()
$
->
$
(
".one_click_select"
).
live
'click'
,
->
$
(
this
).
select
()
# Click a .one_click_select field, select the contents
$
(
".one_click_select"
).
live
'click'
,
->
$
(
this
).
select
()
# Disable form buttons while a form is submitting
$
(
'body'
).
on
'ajax:complete, ajax:beforeSend, submit'
,
'form'
,
(
e
)
->
...
...
@@ -66,10 +66,12 @@ $ ->
$
(
this
).
text
(
previewLinkText
)
note
=
$
(
'#note_note'
).
val
()
note
=
'Nothing to preview'
if
note
.
trim
().
length
is
0
$
.
post
(
$
(
this
).
attr
(
'href'
),
{
note
:
note
},
(
data
)
->
if
note
.
trim
().
length
==
0
$
(
'#preview-note'
).
text
(
"Nothing to preview."
)
else
$
.
post
$
(
this
).
attr
(
'href'
),
{
note
:
note
},
(
data
)
->
$
(
'#preview-note'
).
html
(
data
)
)
$
(
'#preview-note, #note_note'
).
toggle
()
e
.
preventDefault
()
...
...
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