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
4198fb54
Commit
4198fb54
authored
Jul 28, 2016
by
Vladimir Baranov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rref #5392. Add read_only users and units to channel
parent
1d5f8f37
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
8 deletions
+33
-8
app.css
app/app.css
+19
-1
messaging.js
app/components/messaging/messaging.js
+8
-5
add_user_unit.html
app/components/messaging/templates/add_user_unit.html
+5
-1
index.html
app/components/messaging/templates/index.html
+1
-1
No files found.
app/app.css
View file @
4198fb54
...
@@ -2611,6 +2611,7 @@ table.dataTable thead .sorting:after {
...
@@ -2611,6 +2611,7 @@ table.dataTable thead .sorting:after {
outline
:
none
;
outline
:
none
;
}
}
.chat-app
.close-chat-popup-window
{
.chat-app
.close-chat-popup-window
{
width
:
50px
;
width
:
50px
;
height
:
50px
;
height
:
50px
;
...
@@ -2735,7 +2736,7 @@ table.dataTable thead .sorting:after {
...
@@ -2735,7 +2736,7 @@ table.dataTable thead .sorting:after {
.chat-app
.add-user-unit
input
{
.chat-app
.add-user-unit
input
{
width
:
400px
;
width
:
400px
;
margin-top
:
4
0px
;
margin-top
:
1
0px
;
height
:
50px
;
height
:
50px
;
padding-left
:
15px
;
padding-left
:
15px
;
border
:
1px
solid
#ccc
;
border
:
1px
solid
#ccc
;
...
@@ -2743,6 +2744,23 @@ table.dataTable thead .sorting:after {
...
@@ -2743,6 +2744,23 @@ table.dataTable thead .sorting:after {
outline
:
none
;
outline
:
none
;
}
}
.chat-app
.add-user-unit
.checkbox-inline
{
width
:
50%
;
margin-left
:
25%
;
margin-top
:
20px
;
padding-left
:
25px
;
border
:
none
;
}
.chat-app
.add-user-unit
.checkbox-inline
input
{
width
:
20px
;
margin-top
:
0
;
margin-left
:
-25px
;
border
:
none
;
height
:
20px
;
}
.chat-app-close-btn
{
.chat-app-close-btn
{
display
:
block
;
display
:
block
;
position
:
absolute
;
position
:
absolute
;
...
...
app/components/messaging/messaging.js
View file @
4198fb54
...
@@ -210,8 +210,10 @@ angular.module("ulakbus.messaging")
...
@@ -210,8 +210,10 @@ angular.module("ulakbus.messaging")
};
};
scope
.
onChange
(
""
);
scope
.
onChange
(
""
);
}
}
}).
then
(
function
(
userKey
){
}).
then
(
function
(
user
){
return
MessagingService
.
add_members
(
getKey
(
channel
),
[
userKey
]);
var
userKey
=
user
.
key
;
var
channelKey
=
getKey
(
channel
);
return
MessagingService
.
add_members
(
channelKey
,
[
userKey
],
user
.
readonly
);
});
});
break
;
break
;
...
@@ -229,9 +231,10 @@ angular.module("ulakbus.messaging")
...
@@ -229,9 +231,10 @@ angular.module("ulakbus.messaging")
};
};
scope
.
onChange
(
""
);
scope
.
onChange
(
""
);
}
}
}).
then
(
function
(
unitKey
){
}).
then
(
function
(
unit
){
var
channelKey
=
getKey
(
iScope
.
selectedChannel
);
var
unitKey
=
unit
.
key
;
return
MessagingService
.
add_members
(
channelKey
,
unitKey
);
var
channelKey
=
getKey
(
channel
);
return
MessagingService
.
add_members
(
channelKey
,
unitKey
,
unit
.
readonly
);
});
});
break
;
break
;
}
}
...
...
app/components/messaging/templates/add_user_unit.html
View file @
4198fb54
<div
class=
"chat-popup-window add-user-unit"
style=
"display:block;"
>
<div
class=
"chat-popup-window add-user-unit"
style=
"display:block;"
>
<div
class=
"close-chat-popup-window"
ng-click=
"cancel()"
><span
class=
"glyphicon glyphicon-remove"
></span></div>
<div
class=
"close-chat-popup-window"
ng-click=
"cancel()"
><span
class=
"glyphicon glyphicon-remove"
></span></div>
<h3>
{{title}}
</h3>
<h3>
{{title}}
</h3>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
ng-model=
"readonly"
/>
Read only
</label>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<input
type=
"text"
ng-model=
"query"
ng-change=
"onChange(query)"
placeholder=
"{{placeholder}}"
>
<input
type=
"text"
ng-model=
"query"
ng-change=
"onChange(query)"
placeholder=
"{{placeholder}}"
>
</div>
</div>
<div
class=
"search-results"
>
<div
class=
"search-results"
>
<span
class=
"loader"
ng-show=
"loading"
></span>
<span
class=
"loader"
ng-show=
"loading"
></span>
<div
class=
"user"
ng-repeat=
"item in searchResult"
ng-click=
"done(
item[1]
)"
>
<div
class=
"user"
ng-repeat=
"item in searchResult"
ng-click=
"done(
{key: item[1], readonly: readonly}
)"
>
<img
ng-src=
"{{item[2]}}"
ng-show=
"item[2]"
>
<img
ng-src=
"{{item[2]}}"
ng-show=
"item[2]"
>
<div
class=
"user-name"
>
{{item[0]}}
</div>
<div
class=
"user-name"
>
{{item[0]}}
</div>
</div>
</div>
...
...
app/components/messaging/templates/index.html
View file @
4198fb54
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<ul
class=
"channels"
>
<ul
class=
"channels"
>
<li
class=
"title"
>
KANALLAR
<span
class=
"add-action glyphicon glyphicon-plus-sign"
ng-click=
"createChannel()"
></span></li>
<li
class=
"title"
>
KANALLAR
<span
class=
"add-action glyphicon glyphicon-plus-sign"
ng-click=
"createChannel()"
></span></li>
<li
ng-class=
"{'unread': ch.unread, 'active': isChannelSelected(ch)}"
title=
"{{ch.description}}"
ng-repeat=
"ch in publicChannels"
ng-click=
"selectChannel(ch)"
>
{{ch.name}}
</li>
<li
ng-class=
"{'unread': ch.unread, '
public-ro-channel': ch.read_only, '
active': isChannelSelected(ch)}"
title=
"{{ch.description}}"
ng-repeat=
"ch in publicChannels"
ng-click=
"selectChannel(ch)"
>
{{ch.name}}
</li>
</ul>
</ul>
<ul
class=
"direct-messages"
>
<ul
class=
"direct-messages"
>
...
...
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