Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12292
OTRS-1ClickSpam.js
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 22 2014, 2:25 AM
2014-11-22 02:25:24 (UTC+0)
Size
608 B
Referenced Files
None
Subscribers
None
OTRS-1ClickSpam.js
View Options
$
(
function
()
{
$
(
'.MasterAction'
).
each
(
function
()
{
var
$spam
=
$
(
'<li>'
);
$spam
.
append
(
$
(
'<button>'
).
text
(
'1-click spam'
)
);
$spam
.
click
(
function
oneClickSpam
(
clickEvent
)
{
var
ticketid
=
this
.
id
.
match
(
/TicketID_(\d+)/
)[
1
];
clickEvent
.
preventDefault
();
clickEvent
.
stopPropagation
();
$
.
get
(
'index.pl?Action=AgentTicketMove&TicketID='
+
ticketid
+
'&DestQueue=Junk'
,
function
()
{
// TODO: Implement error handling here.
$
(
this
).
hide
();
}.
bind
(
this
)
);
}.
bind
(
this
)
)
$
(
this
).
find
(
'ul.Actions'
).
append
(
$spam
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11748
Default Alt Text
OTRS-1ClickSpam.js (608 B)
Attached To
Mode
T56755: Create OTRS patch for "1-click spam" disposal
Attached
Detach File
Event Timeline
Log In to Comment