Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
f493d9a5
Commit
f493d9a5
authored
11 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Use the new user modal dialog
parent
3ea63b04
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/staff/ticket-view.inc.php
+38
-29
38 additions, 29 deletions
include/staff/ticket-view.inc.php
scp/css/scp.css
+5
-0
5 additions, 0 deletions
scp/css/scp.css
scp/js/scp.js
+2
-1
2 additions, 1 deletion
scp/js/scp.js
scp/js/ticket.js
+1
-1
1 addition, 1 deletion
scp/js/ticket.js
with
46 additions
and
31 deletions
include/staff/ticket-view.inc.php
+
38
−
29
View file @
f493d9a5
...
@@ -67,28 +67,9 @@ if($ticket->isOverdue())
...
@@ -67,28 +67,9 @@ if($ticket->isOverdue())
}
?>
}
?>
<?php
<?php
if
(
$thisstaff
->
canEditTickets
())
{
?>
if
(
$thisstaff
->
canEditTickets
())
{
?>
<a
class=
"action-button"
href=
"#"
onclick=
"javascript:
$.userLookup('ajax.php/tickets/
<?php
echo
$ticket
->
getId
();
?>
/change-user',
function(user) {
var cid =
<?php
echo
$ticket
->
getOwnerId
();
?>
;
if(cid!=user.id && $('.dialog#confirm-action #changeuser-confirm').length) {
$('#newuser').html(user.name +' <'+user.email+'>');
$('.dialog#confirm-action #action').val('changeuser');
$('#confirm-form').append('<input type=hidden name=user_id value='+user.id+' />');
$('#overlay').show();
$('.dialog#confirm-action .confirm-action').hide();
$('.dialog#confirm-action p#changeuser-confirm')
.show()
.parent('div').show().trigger('click');
}
});
return false;
"
><i
class=
"icon-edit"
></i>
Change Owner
</a>
<a
class=
"action-button"
href=
"tickets.php?id=
<?php
echo
$ticket
->
getId
();
?>
&a=edit"
><i
class=
"icon-edit"
></i>
Edit
</a>
<a
class=
"action-button"
href=
"tickets.php?id=
<?php
echo
$ticket
->
getId
();
?>
&a=edit"
><i
class=
"icon-edit"
></i>
Edit
</a>
<?php
<?php
}
?>
}
?>
<?php
<?php
if
(
$ticket
->
isOpen
()
&&
!
$ticket
->
isAssigned
()
&&
$thisstaff
->
canAssignTickets
())
{
?>
if
(
$ticket
->
isOpen
()
&&
!
$ticket
->
isAssigned
()
&&
$thisstaff
->
canAssignTickets
())
{
?>
<a
id=
"ticket-claim"
class=
"action-button"
href=
"#claim"
><i
class=
"icon-user"
></i>
Claim
</a>
<a
id=
"ticket-claim"
class=
"action-button"
href=
"#claim"
><i
class=
"icon-user"
></i>
Claim
</a>
...
@@ -101,6 +82,10 @@ if($ticket->isOverdue())
...
@@ -101,6 +82,10 @@ if($ticket->isOverdue())
<div
id=
"action-dropdown-more"
class=
"action-dropdown anchor-right"
>
<div
id=
"action-dropdown-more"
class=
"action-dropdown anchor-right"
>
<ul>
<ul>
<?php
<?php
if
(
$thisstaff
->
canEditTickets
())
{
?>
<li><a
class=
"change-user"
href=
"#tickets/
<?php
echo
$ticket
->
getId
();
?>
/change-user"
><i
class=
"icon-user"
></i>
Change Ticket Owner
</a></li>
<?php
}
if
(
$ticket
->
isOpen
()
&&
(
$dept
&&
$dept
->
isManager
(
$thisstaff
)))
{
if
(
$ticket
->
isOpen
()
&&
(
$dept
&&
$dept
->
isManager
(
$thisstaff
)))
{
if
(
$ticket
->
isAssigned
())
{
?>
if
(
$ticket
->
isAssigned
())
{
?>
...
@@ -162,12 +147,15 @@ if($ticket->isOverdue())
...
@@ -162,12 +147,15 @@ if($ticket->isOverdue())
<table
border=
"0"
cellspacing=
""
cellpadding=
"4"
width=
"100%"
>
<table
border=
"0"
cellspacing=
""
cellpadding=
"4"
width=
"100%"
>
<tr>
<tr>
<th
width=
"100"
>
Client:
</th>
<th
width=
"100"
>
Client:
</th>
<td><a
href=
"ajax.php/form/user-info/
<?php
<td><a
href=
"#tickets/
<?php
echo
$ticket
->
getId
();
?>
/user"
echo
$ticket
->
getOwnerId
();
?>
"
onclick=
"javascript:
onclick=
"javascript:
$('#overlay').show();
$.userLookup('ajax.php/tickets/
<?php
echo
$ticket
->
getId
();
?>
/user',
$('#user-info .body').load(this.href);
function (user) {
$('#user-info').show();
$('#user-'+user.id+'-name').text(user.name);
$('#user-'+user.id+'-email').text(user.email);
$('#user-to-name').text(user.name);
$('#user-to-email').text(user.email);
});
return false;
return false;
"
><i
class=
"icon-user"
></i>
<span
id=
"user-
<?php
echo
$ticket
->
getOwnerId
();
?>
-name"
"
><i
class=
"icon-user"
></i>
<span
id=
"user-
<?php
echo
$ticket
->
getOwnerId
();
?>
-name"
>
<?php
echo
Format
::
htmlchars
(
$ticket
->
getName
());
>
<?php
echo
Format
::
htmlchars
(
$ticket
->
getName
());
...
@@ -198,7 +186,7 @@ if($ticket->isOverdue())
...
@@ -198,7 +186,7 @@ if($ticket->isOverdue())
<tr>
<tr>
<th>
Email:
</th>
<th>
Email:
</th>
<td>
<td>
<?php
echo
$ticket
->
getEmail
();
?>
<span
id=
"user-
<?php
echo
$ticket
->
getOwnerId
();
?>
-email"
>
<?php
echo
$ticket
->
getEmail
();
?>
</span>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -423,10 +411,8 @@ $tcount+= $ticket->getNumNotes();
...
@@ -423,10 +411,8 @@ $tcount+= $ticket->getNumNotes();
</td>
</td>
<td>
<td>
<?php
<?php
$to
=
$ticket
->
getReplyToEmail
();
echo
sprintf
(
'<span id="user-to-name">%s</span> <em><<span id="user-to-email">%s</span>></em>'
,
if
((
$name
=
$ticket
->
getName
())
&&
!
strpos
(
$name
,
'@'
))
$ticket
->
getName
(),
$ticket
->
getReplyToEmail
());
$to
=
sprintf
(
'%s <em><%s></em>'
,
$name
,
$to
);
echo
$to
;
?>
?>
<label><input
type=
'checkbox'
value=
'1'
name=
"emailreply"
id=
"remailreply"
<label><input
type=
'checkbox'
value=
'1'
name=
"emailreply"
id=
"remailreply"
...
@@ -926,3 +912,26 @@ $tcount+= $ticket->getNumNotes();
...
@@ -926,3 +912,26 @@ $tcount+= $ticket->getNumNotes();
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<script
type=
"text/javascript"
src=
"js/ticket.js"
></script>
<script
type=
"text/javascript"
src=
"js/ticket.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
document
).
on
(
'
click
'
,
'
a.change-user
'
,
function
(
e
)
{
e
.
preventDefault
();
var
tid
=
<?php
echo
$ticket
->
getOwnerId
();
?>
;
var
cid
=
<?php
echo
$ticket
->
getOwnerId
();
?>
;
var
url
=
'
ajax.php/
'
+
$
(
this
).
attr
(
'
href
'
).
substr
(
1
);
$
.
userLookup
(
url
,
function
(
user
)
{
if
(
cid
!=
user
.
id
&&
$
(
'
.dialog#confirm-action #changeuser-confirm
'
).
length
)
{
$
(
'
#newuser
'
).
html
(
user
.
name
+
'
<
'
+
user
.
email
+
'
>
'
);
$
(
'
.dialog#confirm-action #action
'
).
val
(
'
changeuser
'
);
$
(
'
#confirm-form
'
).
append
(
'
<input type=hidden name=user_id value=
'
+
user
.
id
+
'
/>
'
);
$
(
'
#overlay
'
).
show
();
$
(
'
.dialog#confirm-action .confirm-action
'
).
hide
();
$
(
'
.dialog#confirm-action p#changeuser-confirm
'
)
.
show
()
.
parent
(
'
div
'
).
show
().
trigger
(
'
click
'
);
}
});
});
});
</script>
This diff is collapsed.
Click to expand it.
scp/css/scp.css
+
5
−
0
View file @
f493d9a5
...
@@ -1277,6 +1277,11 @@ time {
...
@@ -1277,6 +1277,11 @@ time {
padding-right
:
3em
;
padding-right
:
3em
;
}
}
.dialog
a
{
color
:
#184E81
;
}
.dialog
a
.close
{
.dialog
a
.close
{
position
:
absolute
;
position
:
absolute
;
display
:
inline-block
;
display
:
inline-block
;
...
...
This diff is collapsed.
Click to expand it.
scp/js/scp.js
+
2
−
1
View file @
f493d9a5
...
@@ -404,7 +404,8 @@ $(document).ready(function(){
...
@@ -404,7 +404,8 @@ $(document).ready(function(){
$
(
'
.dialog#popup .body
'
).
load
(
url
,
function
()
{
$
(
'
.dialog#popup .body
'
).
load
(
url
,
function
()
{
$
(
'
#overlay
'
).
show
();
$
(
'
#overlay
'
).
show
();
$
(
'
.dialog#popup
'
).
show
();
$
(
'
.dialog#popup
'
).
show
();
$
(
document
).
on
(
'
submit
'
,
'
.dialog#popup form.user
'
,
function
(
e
)
{
$
(
document
).
off
(
'
.user
'
);
$
(
document
).
on
(
'
submit.user
'
,
'
.dialog#popup form.user
'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
var
$form
=
$
(
this
);
var
$form
=
$
(
this
);
var
$dialog
=
$form
.
closest
(
'
.dialog
'
);
var
$dialog
=
$form
.
closest
(
'
.dialog
'
);
...
...
This diff is collapsed.
Click to expand it.
scp/js/ticket.js
+
1
−
1
View file @
f493d9a5
...
@@ -345,7 +345,7 @@ jQuery(function($) {
...
@@ -345,7 +345,7 @@ jQuery(function($) {
});
});
//ticket actions confirmation - Delete + more
//ticket actions confirmation - Delete + more
$
(
'
a#ticket-delete, a#ticket-claim, #action-dropdown-more li a
'
).
click
(
function
(
e
)
{
$
(
'
a#ticket-delete, a#ticket-claim, #action-dropdown-more li a
:not(.change-user)
'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
if
(
$
(
'
.dialog#confirm-action
'
+
$
(
this
).
attr
(
'
href
'
)
+
'
-confirm
'
).
length
)
{
if
(
$
(
'
.dialog#confirm-action
'
+
$
(
this
).
attr
(
'
href
'
)
+
'
-confirm
'
).
length
)
{
var
action
=
$
(
this
).
attr
(
'
href
'
).
substr
(
1
,
$
(
this
).
attr
(
'
href
'
).
length
);
var
action
=
$
(
this
).
attr
(
'
href
'
).
substr
(
1
,
$
(
this
).
attr
(
'
href
'
).
length
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment