| ... | @@ -3,6 +3,7 @@ |
... | @@ -3,6 +3,7 @@ |
|
|
user_path: "/api/:version/users/:id.json"
|
|
user_path: "/api/:version/users/:id.json"
|
|
|
notes_path: "/api/:version/projects/:id/notes.json"
|
|
notes_path: "/api/:version/projects/:id/notes.json"
|
|
|
namespaces_path: "/api/:version/namespaces.json"
|
|
namespaces_path: "/api/:version/namespaces.json"
|
|
|
|
project_users_path: "/api/:version/projects/:id/users.json"
|
|
|
|
|
|
|
|
# Get 20 (depends on api) recent notes
|
|
# Get 20 (depends on api) recent notes
|
|
|
# and sort the ascending from oldest to newest
|
|
# and sort the ascending from oldest to newest
|
| ... | @@ -50,6 +51,23 @@ |
... | @@ -50,6 +51,23 @@ |
|
|
).done (users) ->
|
|
).done (users) ->
|
|
|
callback(users)
|
|
callback(users)
|
|
|
|
|
|
|
|
|
# Return project users list. Filtered by query
|
|
|
|
# Only active users retrieved
|
|
|
|
projectUsers: (project_id, query, callback) ->
|
|
|
|
url = Api.buildUrl(Api.project_users_path)
|
|
|
|
url = url.replace(':id', project_id)
|
|
|
|
|
|
|
|
$.ajax(
|
|
|
|
url: url
|
|
|
|
data:
|
|
|
|
private_token: gon.api_token
|
|
|
|
search: query
|
|
|
|
per_page: 20
|
|
|
|
active: true
|
|
|
|
dataType: "json"
|
|
|
|
).done (users) ->
|
|
|
|
callback(users)
|
|
|
|
|
|
|
# Return namespaces list. Filtered by query
|
|
# Return namespaces list. Filtered by query
|
|
|
namespaces: (query, callback) ->
|
|
namespaces: (query, callback) ->
|
|
|
url = Api.buildUrl(Api.namespaces_path)
|
|
url = Api.buildUrl(Api.namespaces_path)
|
| ... | |
... | |
| ... | | ... | |