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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ff3dc13f
Commit
ff3dc13f
authored
Jul 15, 2016
by
Luke "Jared" Bennett
Committed by
Luke Bennett
Aug 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review changes
parent
6b7c0a93
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
app/assets/javascripts/abuse_reports.js.coffee
app/assets/javascripts/abuse_reports.js.coffee
+16
-14
app/assets/stylesheets/pages/admin.scss
app/assets/stylesheets/pages/admin.scss
+9
-4
No files found.
app/assets/javascripts/abuse_reports.js.coffee
View file @
ff3dc13f
class
@
AbuseReports
class
@
AbuseReports
MAX_MESSAGE_LENGTH
=
300
MAX_MESSAGE_LENGTH
=
300
MESSAGE_CELL_SELECTOR
=
'
table tbody tr
td:nth-child(3)'
MESSAGE_CELL_SELECTOR
=
'
.abuse-reports
td:nth-child(3)'
constructor
:
->
constructor
:
->
$
(
MESSAGE_CELL_SELECTOR
).
each
@
truncateLongMessage
$
(
MESSAGE_CELL_SELECTOR
).
each
@
truncateLongMessage
$
(
document
).
on
'click'
,
"
#{
MESSAGE_CELL_SELECTOR
}
"
,
@
toggleMessageTruncation
$
(
document
)
.
off
'click'
,
MESSAGE_CELL_SELECTOR
.
on
'click'
,
MESSAGE_CELL_SELECTOR
,
@
toggleMessageTruncation
truncateLongMessage
:
->
truncateLongMessage
:
->
messageCellElement
=
$
(
this
)
$
messageCellElement
=
$
(
this
)
reportMessage
=
messageCellElement
.
text
()
reportMessage
=
$
messageCellElement
.
text
()
if
reportMessage
.
length
>
MAX_MESSAGE_LENGTH
if
reportMessage
.
length
>
MAX_MESSAGE_LENGTH
messageCellElement
.
attr
'data-
original-message'
,
reportMessage
$messageCellElement
.
data
'
original-message'
,
reportMessage
messageCellElement
.
attr
'data-
message-truncated'
,
'true'
$messageCellElement
.
data
'
message-truncated'
,
'true'
messageCellElement
.
text
"
#{
reportMessage
.
substr
0
,
MAX_MESSAGE_LENGTH
}
..."
$
messageCellElement
.
text
"
#{
reportMessage
.
substr
0
,
MAX_MESSAGE_LENGTH
}
..."
toggleMessageTruncation
:
->
toggleMessageTruncation
:
->
messageCellElement
=
$
(
this
)
$
messageCellElement
=
$
(
this
)
originalMessage
=
messageCellElement
.
attr
'data-
original-message'
originalMessage
=
$messageCellElement
.
data
'
original-message'
return
if
not
originalMessage
return
if
not
originalMessage
if
messageCellElement
.
attr
(
'data-
message-truncated'
)
is
'true'
if
$messageCellElement
.
data
(
'
message-truncated'
)
is
'true'
messageCellElement
.
attr
'data-
message-truncated'
,
'false'
$messageCellElement
.
data
'
message-truncated'
,
'false'
messageCellElement
.
text
originalMessage
$
messageCellElement
.
text
originalMessage
else
else
messageCellElement
.
attr
'data-
message-truncated'
,
'true'
$messageCellElement
.
data
'
message-truncated'
,
'true'
messageCellElement
.
text
"
#{
originalMessage
.
substr
0
,
MAX_MESSAGE_LENGTH
}
..."
$
messageCellElement
.
text
"
#{
originalMessage
.
substr
0
,
MAX_MESSAGE_LENGTH
}
..."
app/assets/stylesheets/pages/admin.scss
View file @
ff3dc13f
...
@@ -100,10 +100,15 @@
...
@@ -100,10 +100,15 @@
.abuse-reports
{
.abuse-reports
{
table-layout
:
fixed
;
table-layout
:
fixed
;
td
{
.action-buttons
a
{
vertical-align
:
top
!
important
;
&
.action-buttons
a
{
white-space
:
normal
;
white-space
:
normal
;
}
}
@media
(
min-width
:
$screen-sm-min
)
{
th
{
width
:
15%
;
&
.wide
{
width
:
55%
;
}
}
}
}
}
}
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