Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
e48eee72
Commit
e48eee72
authored
Jul 19, 2016
by
Vladimir Baranov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rref #5392. Add all messaging API methods to service, create ui flow for new direct channel
parent
11302f66
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
263 additions
and
150 deletions
+263
-150
messaging.js
app/components/messaging/messaging.js
+7
-2
messaging_forms.js
app/components/messaging/messaging_forms.js
+1
-1
messaging_service.js
app/components/messaging/messaging_service.js
+254
-146
index.html
app/components/messaging/templates/index.html
+1
-1
No files found.
app/components/messaging/messaging.js
View file @
e48eee72
...
...
@@ -20,8 +20,13 @@ angular.module("ulakbus.messaging")
$scope
.
directChannels
=
groupedChannels
[
MessagingService
.
CHANNEL_TYPE
.
DIRECT
];
});
this
.
startDirectChannel
=
function
(){
this
.
createDirectChannel
=
function
(
user
){
// user format is ['username', 'key', 'avatarUrl']
var
key
=
user
[
1
];
MessagingService
.
create_direct_channel
(
key
)
.
then
(
function
(
result
){
$log
.
info
(
"Channel for user "
,
user
[
0
],
"created: "
,
result
);
});
};
$scope
.
hideApp
=
function
(){
...
...
app/components/messaging/messaging_forms.js
View file @
e48eee72
...
...
@@ -11,7 +11,7 @@ angular.module("ulakbus.messaging")
},
link
:
function
(
iScope
,
iElem
,
iAttrs
,
messagingCtrl
){
iScope
.
selectUser
=
function
(
user
){
messagingCtrl
.
start
DirectChannel
(
user
);
messagingCtrl
.
create
DirectChannel
(
user
);
iScope
.
hide
();
}
},
...
...
app/components/messaging/messaging_service.js
View file @
e48eee72
This diff is collapsed.
Click to expand it.
app/components/messaging/templates/index.html
View file @
e48eee72
...
...
@@ -16,7 +16,7 @@
<ul
class=
"direct-messages"
>
<li
class=
"title"
>
DIRECT MESSAGES
<span
class=
"add-action glyphicon glyphicon-plus-sign"
ng-click=
"showSearch.user = true"
></span></li>
<li
class=
"online"
ng-class=
"{'active':'active', 'notification': 'notification'}"
>
Erkan Öğümsöğütlü
</li>
<li
ng-class=
"{'notification': userChannel.unread}"
ng-repeat=
"userChannel in directChannels"
>
{{userChannel.name}}
</li>
</ul>
</div>
...
...
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