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
bb5a73e5
Commit
bb5a73e5
authored
Jan 20, 2011
by
David Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 626658 - Add (take) link to bug edit page to allow quick assigning to the current user
r/a=mkanat
parent
fc329ec4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
field.js
js/field.js
+9
-4
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+10
-0
No files found.
js/field.js
View file @
bb5a73e5
...
@@ -211,11 +211,11 @@ function setupEditLink(id) {
...
@@ -211,11 +211,11 @@ function setupEditLink(id) {
}
}
/* Hide input fields and show the text with (edit) next to it */
/* Hide input fields and show the text with (edit) next to it */
function
hideEditableField
(
container
,
input
,
action
,
field_id
,
original_value
)
{
function
hideEditableField
(
container
,
input
,
action
,
field_id
,
original_value
,
new_value
)
{
YAHOO
.
util
.
Dom
.
removeClass
(
container
,
'bz_default_hidden'
);
YAHOO
.
util
.
Dom
.
removeClass
(
container
,
'bz_default_hidden'
);
YAHOO
.
util
.
Dom
.
addClass
(
input
,
'bz_default_hidden'
);
YAHOO
.
util
.
Dom
.
addClass
(
input
,
'bz_default_hidden'
);
YAHOO
.
util
.
Event
.
addListener
(
action
,
'click'
,
showEditableField
,
YAHOO
.
util
.
Event
.
addListener
(
action
,
'click'
,
showEditableField
,
new
Array
(
container
,
input
));
new
Array
(
container
,
input
,
new_value
));
if
(
field_id
!=
""
){
if
(
field_id
!=
""
){
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
checkForChangedFieldValues
,
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
checkForChangedFieldValues
,
new
Array
(
container
,
input
,
field_id
,
original_value
));
new
Array
(
container
,
input
,
field_id
,
original_value
));
...
@@ -227,9 +227,9 @@ function hideEditableField( container, input, action, field_id, original_value )
...
@@ -227,9 +227,9 @@ function hideEditableField( container, input, action, field_id, original_value )
*
*
* var e: the event
* var e: the event
* var ContainerInputArray: An array containing the (edit) and text area and the input being displayed
* var ContainerInputArray: An array containing the (edit) and text area and the input being displayed
* var ContainerInputArray[0]: the con
ainer that will be hidden usually shows the (edit
) text
* var ContainerInputArray[0]: the con
tainer that will be hidden usually shows the (edit) or (take
) text
* var ContainerInputArray[1]: the input area and label that will be displayed
* var ContainerInputArray[1]: the input area and label that will be displayed
*
*
var ContainerInputArray[2]: the new value to set the input field to when (take) is clicked
*/
*/
function
showEditableField
(
e
,
ContainerInputArray
)
{
function
showEditableField
(
e
,
ContainerInputArray
)
{
var
inputs
=
new
Array
();
var
inputs
=
new
Array
();
...
@@ -246,6 +246,11 @@ function showEditableField (e, ContainerInputArray) {
...
@@ -246,6 +246,11 @@ function showEditableField (e, ContainerInputArray) {
inputs
=
inputArea
.
getElementsByTagName
(
'input'
);
inputs
=
inputArea
.
getElementsByTagName
(
'input'
);
}
}
if
(
inputs
.
length
>
0
)
{
if
(
inputs
.
length
>
0
)
{
// Change the first field's value to ContainerInputArray[2]
// if present before focusing.
if
(
ContainerInputArray
[
2
])
{
inputs
[
0
].
value
=
ContainerInputArray
[
2
];
}
// focus on the first field, this makes it easier to edit
// focus on the first field, this makes it easier to edit
inputs
[
0
].
focus
();
inputs
[
0
].
focus
();
inputs
[
0
].
select
();
inputs
[
0
].
select
();
...
...
template/en/default/bug/edit.html.tmpl
View file @
bb5a73e5
...
@@ -465,6 +465,10 @@
...
@@ -465,6 +465,10 @@
<span>
<span>
[% INCLUDE global/user.html.tmpl who = bug.assigned_to %]
[% INCLUDE global/user.html.tmpl who = bug.assigned_to %]
(<a href="#" id="bz_assignee_edit_action">edit</a>)
(<a href="#" id="bz_assignee_edit_action">edit</a>)
[% IF bug.assigned_to.id != user.id %]
(<a title="Reassign to yourself"
href="#" id="bz_assignee_take_action">take</a>)
[% END %]
</span>
</span>
</div>
</div>
<div id="bz_assignee_input">
<div id="bz_assignee_input">
...
@@ -485,6 +489,12 @@
...
@@ -485,6 +489,12 @@
'bz_assignee_edit_action',
'bz_assignee_edit_action',
'assigned_to',
'assigned_to',
'[% bug.assigned_to.login FILTER js %]' );
'[% bug.assigned_to.login FILTER js %]' );
hideEditableField('bz_assignee_edit_container',
'bz_assignee_input',
'bz_assignee_take_action',
'assigned_to',
'[% bug.assigned_to.login FILTER js %]',
'[% user.login FILTER js %]' );
initDefaultCheckbox('assignee');
initDefaultCheckbox('assignee');
</script>
</script>
[% ELSE %]
[% ELSE %]
...
...
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