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
28974d04
Commit
28974d04
authored
Jun 28, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
messaging +
parent
e0dff2b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
index.html
app/shared/templates/directives/messaging/index.html
+2
-2
messagingService.js
app/zetalib/messagingService.js
+24
-6
No files found.
app/shared/templates/directives/messaging/index.html
View file @
28974d04
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"side-navigation"
>
<div
class=
"side-navigation"
>
<ul
class=
"channels"
>
<ul
class=
"channels"
>
<li
class=
"title"
>
CHANNELS
<span
class=
"badge"
>
8
</span></li>
<li
class=
"title"
>
CHANNELS
<span
class=
"badge"
>
{{ }}
</span></li>
<li
class=
"notification"
>
Channel One
</li>
<li
class=
"notification"
>
Channel One
</li>
</ul>
</ul>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<ul
class=
"direct-messages"
>
<ul
class=
"direct-messages"
>
<li
class=
"compose"
><span
class=
"glyphicon glyphicon-plus-sign"
></span>
Create New Message
</li>
<li
class=
"compose"
><span
class=
"glyphicon glyphicon-plus-sign"
></span>
Create New Message
</li>
<li
class=
"title"
>
DIRECT MESSAGES
<span
class=
"badge"
>
14
</span></li>
<li
class=
"title"
>
DIRECT MESSAGES
<span
class=
"badge"
>
14
</span></li>
<li
class=
"online
active notification
"
>
Erkan Öğümsöğütlü
</li>
<li
class=
"online
"
ng-class=
"{'active':'active', 'notification': 'notification'}
"
>
Erkan Öğümsöğütlü
</li>
</ul>
</ul>
</div>
</div>
...
...
app/zetalib/messagingService.js
View file @
28974d04
...
@@ -15,7 +15,7 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
...
@@ -15,7 +15,7 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
* @name Generator
* @name Generator
* @description form service's Generator factory service handles all generic form operations
* @description form service's Generator factory service handles all generic form operations
*/
*/
.
factory
(
'MessagingService'
,
function
(
$q
,
$timeout
,
$sce
,
$location
,
$route
,
$compile
,
$log
,
RESTURL
,
$rootScope
,
Moment
,
WSOps
,
FormConstraints
,
$uibModal
)
{
.
factory
(
'MessagingService'
,
function
(
$q
,
$timeout
,
$sce
,
$location
,
$route
,
$compile
,
$log
,
$rootScope
,
Moment
,
WSOps
)
{
var
msg
=
{};
var
msg
=
{};
msg
.
send
=
function
(
msg
)
{
msg
.
send
=
function
(
msg
)
{
/**
/**
...
@@ -24,9 +24,6 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
...
@@ -24,9 +24,6 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
* MSG_TYPES can be follwing;
* MSG_TYPES can be follwing;
*
*
* MSG_TYPES = (
* MSG_TYPES = (
* (1, "Info Notification"),
* (11, "Error Notification"),
* (111, "Success Notification"),
* (2, "Direct Message"),
* (2, "Direct Message"),
* (3, "Broadcast Message"),
* (3, "Broadcast Message"),
* (4, "Channel Message")
* (4, "Channel Message")
...
@@ -87,6 +84,29 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
...
@@ -87,6 +84,29 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
*/
*/
};
};
msg
.
update
=
function
(
msg
,
action
)
{
/**
* update / delete a message here
*/
var
outgoing
=
{
form_params
:
{
view
:
'_zops_'
+
action
+
'_message'
,
message
:
{
'channel'
:
msg
.
channel
,
// this can be both channel and direct msg. remember direct msg is channel
'receiver'
:
msg
.
receiver
,
'client_id'
:
msg
.
client_id
,
// "Client side unique id for referencing this message",
'title'
:
msg
.
title
,
// "Title of the message. Can be blank.",
'body'
:
msg
.
body
,
// "Message body.",
'type'
:
msg
.
TYPE
// type can be one of the above
}
}
};
return
WSOps
.
request
(
outgoing
).
then
(
function
(
data
)
{
$log
.
debug
(
"update request sent"
);
return
data
;
})
};
/**
/**
* use this method to get all messages of channel and direct messages
* use this method to get all messages of channel and direct messages
* REMEMBER; direct messages are also channels, everything is channel on backend!
* REMEMBER; direct messages are also channels, everything is channel on backend!
...
@@ -137,7 +157,5 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
...
@@ -137,7 +157,5 @@ angular.module('ulakbus.messagingService', ['ui.bootstrap'])
return
data
;
return
data
;
});
});
};
};
msg
.
channels
=
[];
return
msg
;
return
msg
;
});
});
\ No newline at end of file
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