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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
c20af32a
Commit
c20af32a
authored
Dec 02, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull together and rename Notes partials
parent
6fc10fa2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
30 deletions
+24
-30
app/views/notes/_create_common_note.js.haml
app/views/notes/_create_common_note.js.haml
+0
-10
app/views/notes/_create_discussion_note.js.haml
app/views/notes/_create_discussion_note.js.haml
+0
-5
app/views/notes/_form.html.haml
app/views/notes/_form.html.haml
+0
-0
app/views/notes/_notes_with_form.html.haml
app/views/notes/_notes_with_form.html.haml
+2
-2
app/views/notes/_reversed_notes_with_form.html.haml
app/views/notes/_reversed_notes_with_form.html.haml
+2
-2
app/views/notes/create.js.haml
app/views/notes/create.js.haml
+15
-3
app/views/notes/index.js.haml
app/views/notes/index.js.haml
+5
-8
No files found.
app/views/notes/_create_common_note.js.haml
deleted
100644 → 0
View file @
6fc10fa2
-
if
note
.
valid?
-
if
note
.
for_wall?
NoteList.appendNewWallNote(
#{
note
.
id
}
, "
#{
escape_javascript
(
render
"notes/note"
,
note:
note
)
}
");
-
else
NoteList.appendNewNote(
#{
note
.
id
}
, "
#{
escape_javascript
(
render
"notes/note"
,
note:
note
)
}
");
-
else
-# TODO: insert form correctly
$(".js-main-target-note").replaceWith("
#{
escape_javascript
(
render
'notes/common_form'
)
}
");
GitLab.GfmAutoComplete.setup();
app/views/notes/_create_discussion_note.js.haml
deleted
100644 → 0
View file @
6fc10fa2
-
if
note
.
valid?
:plain
NoteList.appendNewDiscussionNote("
#{
note
.
discussion_id
}
",
"
#{
escape_javascript
(
render
"notes/diff_notes_with_reply"
,
notes:
[
note
])
}
",
"
#{
escape_javascript
(
render
"notes/note"
,
note:
note
)
}
");
app/views/notes/_
common_
form.html.haml
→
app/views/notes/_form.html.haml
View file @
c20af32a
File moved
app/views/notes/_notes_with_form.html.haml
View file @
c20af32a
%ul
#notes-list
.notes
.
notes-status
.
js-notes-busy
.js-main-target-form
-
if
can?
current_user
,
:write_note
,
@project
=
render
"notes/
common_
form"
=
render
"notes/form"
:javascript
$
(
function
(){
...
...
app/views/notes/_reversed_notes_with_form.html.haml
View file @
c20af32a
.js-main-target-form
-
if
can?
current_user
,
:write_note
,
@project
=
render
"notes/
common_
form"
=
render
"notes/form"
%ul
#new-notes-list
.reversed.notes
%ul
#notes-list
.reversed.notes
.notes-
status
.notes-
busy.js-notes-busy
:javascript
$
(
function
(){
...
...
app/views/notes/create.js.haml
View file @
c20af32a
-
if
note_for_main_target?
(
@note
)
=
render
"create_common_note"
,
note:
@note
-
if
@note
.
valid?
var noteHtml = "
#{
escape_javascript
(
render
"notes/note"
,
note:
@note
)
}
";
-
if
note_for_main_target?
(
@note
)
-
if
@note
.
for_wall?
NoteList.appendNewWallNote(
#{
@note
.
id
}
, noteHtml);
-
else
NoteList.appendNewNote(
#{
@note
.
id
}
, noteHtml);
-
else
var firstDiscussionNoteHtml = "
#{
escape_javascript
(
render
"notes/diff_notes_with_reply"
,
notes:
[
@note
])
}
";
NoteList.appendNewDiscussionNote("
#{
@note
.
discussion_id
}
", firstDiscussionNoteHtml, noteHtml);
-
else
=
render
"create_discussion_note"
,
note:
@note
-# TODO: insert form correctly
$(".js-main-target-note").replaceWith("
#{
escape_javascript
(
render
'notes/common_form'
)
}
");
GitLab.GfmAutoComplete.setup();
\ No newline at end of file
app/views/notes/index.js.haml
View file @
c20af32a
-
unless
@notes
.
blank?
var notesHtml = "
#{
escape_javascript
(
render
'notes/notes'
)
}
";
-
new_note_ids
=
@notes
.
map
(
&
:id
)
-
if
loading_more_notes?
:plain
NoteList.appendMoreNotes(
#{
new_note_ids
}
, "
#{
escape_javascript
(
render
'notes/notes'
)
}
");
NoteList.appendMoreNotes(
#{
new_note_ids
}
, notesHtml);
-
elsif
loading_new_notes?
:plain
NoteList.replaceNewNotes(
#{
new_note_ids
}
, "
#{
escape_javascript
(
render
'notes/notes'
)
}
");
NoteList.replaceNewNotes(
#{
new_note_ids
}
, notesHtml);
-
else
:plain
NoteList.setContent(
#{
new_note_ids
}
, "
#{
escape_javascript
(
render
'notes/notes'
)
}
");
NoteList.setContent(
#{
new_note_ids
}
, notesHtml);
-
else
-
if
loading_more_notes?
:plain
NoteList.finishedLoadingMore();
NoteList.finishedLoadingMore();
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