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
iv
gitlab-ce
Commits
596e64e5
Commit
596e64e5
authored
Nov 29, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop rjs from Notes#index
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
071de30f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+6
-3
app/controllers/projects/notes_controller.rb
app/controllers/projects/notes_controller.rb
+14
-1
app/views/projects/notes/index.js.haml
app/views/projects/notes/index.js.haml
+0
-4
No files found.
app/assets/javascripts/notes.js
View file @
596e64e5
...
@@ -6,7 +6,7 @@ var NoteList = {
...
@@ -6,7 +6,7 @@ var NoteList = {
target_type
:
null
,
target_type
:
null
,
init
:
function
(
tid
,
tt
,
path
)
{
init
:
function
(
tid
,
tt
,
path
)
{
NoteList
.
notes_path
=
path
+
"
.js
"
;
NoteList
.
notes_path
=
path
+
"
.js
on
"
;
NoteList
.
target_id
=
tid
;
NoteList
.
target_id
=
tid
;
NoteList
.
target_type
=
tt
;
NoteList
.
target_type
=
tt
;
NoteList
.
target_params
=
"
target_type=
"
+
NoteList
.
target_type
+
"
&target_id=
"
+
NoteList
.
target_id
;
NoteList
.
target_params
=
"
target_type=
"
+
NoteList
.
target_type
+
"
&target_id=
"
+
NoteList
.
target_id
;
...
@@ -411,7 +411,10 @@ var NoteList = {
...
@@ -411,7 +411,10 @@ var NoteList = {
data
:
NoteList
.
target_params
,
data
:
NoteList
.
target_params
,
complete
:
function
(){
$
(
'
.js-notes-busy
'
).
removeClass
(
"
loading
"
)},
complete
:
function
(){
$
(
'
.js-notes-busy
'
).
removeClass
(
"
loading
"
)},
beforeSend
:
function
()
{
$
(
'
.js-notes-busy
'
).
addClass
(
"
loading
"
)
},
beforeSend
:
function
()
{
$
(
'
.js-notes-busy
'
).
addClass
(
"
loading
"
)
},
dataType
:
"
script
"
success
:
function
(
data
)
{
NoteList
.
setContent
(
data
.
html
);
},
dataType
:
"
json
"
});
});
},
},
...
@@ -419,7 +422,7 @@ var NoteList = {
...
@@ -419,7 +422,7 @@ var NoteList = {
* Called in response to getContent().
* Called in response to getContent().
* Replaces the content of #notes-list with the given html.
* Replaces the content of #notes-list with the given html.
*/
*/
setContent
:
function
(
newNoteIds
,
html
)
{
setContent
:
function
(
html
)
{
$
(
"
#notes-list
"
).
html
(
html
);
$
(
"
#notes-list
"
).
html
(
html
);
},
},
...
...
app/controllers/projects/notes_controller.rb
View file @
596e64e5
...
@@ -14,7 +14,20 @@ class Projects::NotesController < Projects::ApplicationController
...
@@ -14,7 +14,20 @@ class Projects::NotesController < Projects::ApplicationController
@discussions
=
discussions_from_notes
@discussions
=
discussions_from_notes
end
end
respond_with
(
@notes
)
respond_to
do
|
format
|
format
.
html
{
redirect_to
:back
}
format
.
json
do
html
=
render_to_string
(
"projects/notes/_notes"
,
layout:
false
,
formats:
[
:html
]
)
render
json:
{
html:
html
,
}
end
end
end
end
def
create
def
create
...
...
app/views/projects/notes/index.js.haml
deleted
100644 → 0
View file @
071de30f
-
unless
@notes
.
blank?
var notesHtml = "
#{
escape_javascript
(
render
'projects/notes/notes'
)
}
";
-
new_note_ids
=
@notes
.
map
(
&
:id
)
NoteList.setContent(
#{
new_note_ids
}
, notesHtml);
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