Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
62dc5cbf
Commit
62dc5cbf
authored
Jul 20, 2020
by
Давид Добряков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update bugswatcher templates
parent
67fa8cb7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
2 deletions
+85
-2
editusers.cgi
editusers.cgi
+1
-1
bugs-watcher.css
js/etersoft/bugs-watcher.css
+11
-0
bugsWatcher.js
js/etersoft/bugsWatcher.js
+54
-0
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+4
-0
bugswatcher.html.tmpl
template/en/default/etersoft/bugswatcher.html.tmpl
+6
-0
edit.html.tmpl
template/ru/default/bug/edit.html.tmpl
+3
-1
bugswatcher.html.tmpl
template/ru/default/etersoft/bugswatcher.html.tmpl
+6
-0
No files found.
editusers.cgi
View file @
62dc5cbf
...
...
@@ -743,7 +743,7 @@ sub userDataToVars {
# Find indirect bless permission.
$query
=
qq{SELECT groups.id
FROM
groups
, group_group_map AS ggm
FROM
`groups`
, group_group_map AS ggm
WHERE groups.id = ggm.grantor_id
AND ggm.member_id IN ($grouplist)
AND ggm.grant_type = ?
...
...
js/etersoft/bugs-watcher.css
0 → 100644
View file @
62dc5cbf
.bugs-watcher
{
color
:
#009966
!important
;
}
.worker
::before
{
content
:
","
}
.worker
:last-child::before
{
content
:
""
!important
}
js/etersoft/bugsWatcher.js
0 → 100644
View file @
62dc5cbf
document
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
const
url
=
`
${
window
.
location
.
origin
}
`
;
const
siteUrl
=
window
.
location
.
origin
;
const
bugID
=
location
.
href
.
split
(
'='
)[
1
];
const
email
=
document
.
querySelector
(
'#useremail'
).
className
;
const
socket
=
io
.
connect
(
url
,
{
'forceNew'
:
true
});
let
userToken
=
!
localStorage
[
siteUrl
]
?
undefined
:
JSON
.
parse
(
localStorage
[
siteUrl
]).
userToken
;
socket
.
emit
(
'addUser'
,
{
bugID
:
bugID
,
email
:
email
});
function
showUser
(
data
)
{
let
workerEmail
=
data
.
email
;
let
workerId
=
data
.
id
;
let
workersList
=
document
.
querySelector
(
"#workers"
).
innerHTML
!==
""
?
Array
.
from
(
document
.
querySelectorAll
(
"#workers > a"
)).
map
((
elem
)
=>
{
return
elem
.
dataset
[
"email"
]
})
:
undefined
;
if
(
!
workersList
||
!
workersList
.
includes
(
workerEmail
))
{
fetch
(
`https://bugs.etersoft.ru/rest/user/
${
workerEmail
}
`
).
then
((
name
)
=>
{
return
name
.
json
()
}).
then
((
name
)
=>
{
name
=
name
.
users
[
0
].
real_name
;
let
worker
=
`
<a href="maito:
${
workerEmail
}
" id="
${
workerId
}
" data-email="
${
workerEmail
}
" title="
${
name
}
">
${
name
}
</a><span class="worker
${
workerId
}
"></span>
`
;
document
.
querySelector
(
"#workers"
).
innerHTML
+=
worker
;
});
}
}
socket
.
on
(
'showAllUsers'
,
function
(
data
)
{
if
(
data
[
bugID
]
!==
undefined
)
{
for
(
worker
in
data
[
bugID
])
{
let
user
=
{
id
:
worker
,
email
:
data
[
bugID
][
worker
]
}
showUser
(
user
);
}
}
})
socket
.
on
(
'deleteUser'
,
function
(
data
)
{
let
id
=
data
.
id
;
let
email
=
data
.
email
;
if
(
document
.
getElementById
(
id
))
{
document
.
getElementById
(
id
).
remove
();
document
.
querySelector
(
`.
${
id
}
`
).
remove
();
}
})
});
template/en/default/bug/edit.html.tmpl
View file @
62dc5cbf
...
...
@@ -8,6 +8,7 @@
[% PROCESS bug/time.html.tmpl %]
[% PROCESS etersoft/timersplash.html.tmpl %]
[% IF Param('comment_taggers_group') %]
[% IF user.can_tag_comments %]
<div id="bz_ctag_div" class="bz_default_hidden">
...
...
@@ -110,6 +111,9 @@
<td id="bz_show_bug_column_2" class="bz_show_bug_column">
<table>
[%# *** Reported and modified dates *** %]
[% PROCESS etersoft/bugswatcher.html.tmpl %]
[% PROCESS section_dates %]
[% PROCESS section_cclist %]
...
...
template/en/default/etersoft/bugswatcher.html.tmpl
0 → 100644
View file @
62dc5cbf
<tr><th class="field_label bugs-watcher">In work:</th><td class="field-value" id="workers"></td></tr>
<div style="display: none;" id="useremail" class="[% user.email FILTER html %]"></div>
<link rel="stylesheet" type="text/css" href="/js/etersoft/bugs-watcher.css" />
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
<script language="javascript" type="text/javascript" src="/js/etersoft/bugsWatcher.js?20_07_2020"></script>
template/ru/default/bug/edit.html.tmpl
View file @
62dc5cbf
...
...
@@ -9,7 +9,6 @@
[% PROCESS bug/time.html.tmpl %]
[% PROCESS etersoft/timersplash.html.tmpl %]
[% IF Param('comment_taggers_group') %]
[% IF user.can_tag_comments %]
<div id="bz_ctag_div" class="bz_default_hidden">
...
...
@@ -112,6 +111,9 @@
<td id="bz_show_bug_column_2" class="bz_show_bug_column">
<table>
[%# *** Reported and modified dates *** %]
[% PROCESS etersoft/bugswatcher.html.tmpl %]
[% PROCESS section_dates %]
[% PROCESS section_cclist %]
...
...
template/ru/default/etersoft/bugswatcher.html.tmpl
0 → 100644
View file @
62dc5cbf
<tr><th class="field_label bugs-watcher">В работе у:</th><td class="field-value" id="workers"></td></tr>
<div style="display: none;" id="useremail" class="[% user.email FILTER html %]"></div>
<link rel="stylesheet" type="text/css" href="/js/etersoft/bugs-watcher.css" />
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
<script language="javascript" type="text/javascript" src="/js/etersoft/bugsWatcher.js?20_07_2020"></script>
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