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
Jérome Perrin
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
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
9 deletions
+21
-9
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
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
No files found.
app/assets/javascripts/notes.js
View file @
596e64e5
...
...
@@ -6,7 +6,7 @@ var NoteList = {
target_type
:
null
,
init
:
function
(
tid
,
tt
,
path
)
{
NoteList
.
notes_path
=
path
+
"
.js
"
;
NoteList
.
notes_path
=
path
+
"
.js
on
"
;
NoteList
.
target_id
=
tid
;
NoteList
.
target_type
=
tt
;
NoteList
.
target_params
=
"
target_type=
"
+
NoteList
.
target_type
+
"
&target_id=
"
+
NoteList
.
target_id
;
...
...
@@ -411,7 +411,10 @@ var NoteList = {
data
:
NoteList
.
target_params
,
complete
:
function
(){
$
(
'
.js-notes-busy
'
).
removeClass
(
"
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 = {
* Called in response to getContent().
* Replaces the content of #notes-list with the given html.
*/
setContent
:
function
(
newNoteIds
,
html
)
{
setContent
:
function
(
html
)
{
$
(
"
#notes-list
"
).
html
(
html
);
},
...
...
app/controllers/projects/notes_controller.rb
View file @
596e64e5
...
...
@@ -14,7 +14,20 @@ class Projects::NotesController < Projects::ApplicationController
@discussions
=
discussions_from_notes
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
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);
config/initializers/1_settings.rb
View file @
596e64e5
...
...
@@ -30,7 +30,7 @@ class Settings < Settingslogic
gitlab
.
relative_url_root
].
join
(
''
)
end
# check that values in `current` (string or integer) is a contant in `modul`.
def
verify_constant_array
(
modul
,
current
,
default
)
values
=
default
||
[]
...
...
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