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
fad558c7
Commit
fad558c7
authored
Feb 08, 2008
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 414284: Bug edit page is bad for changing components
Patch By Guy Pyrzak <guy.pyrzak@gmail.com> r=mkanat, a=mkanat
parent
1f0e11b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
11 deletions
+76
-11
field.js
js/field.js
+68
-9
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+8
-2
No files found.
js/field.js
View file @
fad558c7
...
...
@@ -176,18 +176,77 @@ function showEditableField (e, ContainerInputArray) {
*/
function
checkForChangedFieldValues
(
e
,
ContainerInputArray
)
{
var
el
=
document
.
getElementById
(
ContainerInputArray
[
2
]);
var
unhide
=
false
;
if
(
el
)
{
if
(
el
.
value
!=
ContainerInputArray
[
3
]
||
(
el
.
value
==
""
&&
el
.
id
!=
"alias"
)
)
{
YAHOO
.
util
.
Dom
.
setStyle
(
ContainerInputArray
[
0
],
'display'
,
'none'
);
YAHOO
.
util
.
Dom
.
setStyle
(
ContainerInputArray
[
1
],
'display'
,
'inline'
);
}
unhide
=
true
;
}
else
{
var
set_default
=
document
.
getElementById
(
"set_default_"
+
ContainerInputArray
[
2
]);
if
(
set_default
)
{
if
(
set_default
.
checked
){
unhide
=
true
;
}
}
}
}
if
(
unhide
){
YAHOO
.
util
.
Dom
.
setStyle
(
ContainerInputArray
[
0
],
'display'
,
'none'
);
YAHOO
.
util
.
Dom
.
setStyle
(
ContainerInputArray
[
1
],
'display'
,
'inline'
);
}
}
function
hideAliasAndSummary
(
short_desc_value
,
alias_value
)
{
// check the short desc field
hideEditableField
(
'summary_alias_container'
,
'summary_alias_input'
,
'editme_action'
,
'short_desc'
,
short_desc_value
);
// check that the alias hasn't changed
bz_alias_check_array
=
new
Array
(
'summary_alias_container'
,
'summary_alias_input'
,
'alias'
,
alias_value
)
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
checkForChangedFieldValues
,
bz_alias_check_array
);
}
function
showPeopleOnChange
(
field_id_list
)
{
for
(
var
i
=
0
;
i
<
field_id_list
.
length
;
i
++
)
{
YAHOO
.
util
.
Event
.
addListener
(
field_id_list
[
i
],
'change'
,
showEditableField
,
new
Array
(
'bz_qa_contact_edit_container'
,
'bz_qa_contact_input'
));
YAHOO
.
util
.
Event
.
addListener
(
field_id_list
[
i
],
'change'
,
showEditableField
,
new
Array
(
'bz_assignee_edit_container'
,
'bz_assignee_input'
));
}
}
function
assignToDefaultOnChange
(
field_id_list
)
{
showPeopleOnChange
(
field_id_list
);
for
(
var
i
=
0
;
i
<
field_id_list
.
length
;
i
++
)
{
YAHOO
.
util
.
Event
.
addListener
(
field_id_list
[
i
],
'change'
,
setDefaultCheckbox
,
'set_default_assignee'
);
YAHOO
.
util
.
Event
.
addListener
(
field_id_list
[
i
],
'change'
,
setDefaultCheckbox
,
'set_default_qa_contact'
);
}
}
function
initAssignedQA
(){
YAHOO
.
util
.
Event
.
addListener
(
'set_default_qa_contact'
,
'change'
,
boldOnChange
,
'set_default_qa_contact'
);
YAHOO
.
util
.
Event
.
addListener
(
'set_default_assignee'
,
'change'
,
boldOnChange
,
'set_default_assignee'
);
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
checkForChangedFieldValues
,
new
Array
(
'bz_assignee_edit_container'
,
'bz_assignee_input'
,
'set_default_assignee'
,
''
)
);
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
checkForChangedFieldValues
,
new
Array
(
'bz_qa_contact_edit_container'
,
'bz_qa_contact_input'
,
'set_default_qa_contact'
,
''
)
);
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
boldOnChange
,
'set_default_assignee'
);
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
boldOnChange
,
'set_default_qa_contact'
);
}
function
setDefaultCheckbox
(
e
,
field_id
)
{
var
el
=
document
.
getElementById
(
field_id
);
var
elLabel
=
document
.
getElementById
(
field_id
+
"_label"
);
if
(
el
&&
elLabel
)
{
el
.
checked
=
"true"
;
YAHOO
.
util
.
Dom
.
setStyle
(
elLabel
,
'font-weight'
,
'bold'
);
}
}
function
hideAliasAndSummary
(
short_desc_value
,
alias_value
){
// check the short desc field
hideEditableField
(
'summary_alias_container'
,
'summary_alias_input'
,
'editme_action'
,
'short_desc'
,
short_desc_value
);
// check that the alias hasn't changed
bz_alias_check_array
=
new
Array
(
'summary_alias_container'
,
'summary_alias_input'
,
'alias'
,
alias_value
)
YAHOO
.
util
.
Event
.
addListener
(
window
,
'load'
,
checkForChangedFieldValues
,
bz_alias_check_array
);
function
boldOnChange
(
e
,
field_id
){
var
el
=
document
.
getElementById
(
field_id
);
var
elLabel
=
document
.
getElementById
(
field_id
+
"_label"
);
if
(
el
&&
elLabel
)
{
if
(
el
.
checked
){
YAHOO
.
util
.
Dom
.
setStyle
(
elLabel
,
'font-weight'
,
'bold'
);
}
else
{
YAHOO
.
util
.
Dom
.
setStyle
(
elLabel
,
'font-weight'
,
'normal'
);
}
}
}
template/en/default/bug/edit.html.tmpl
View file @
fad558c7
...
...
@@ -379,6 +379,9 @@
<td>
[% PROCESS select selname => "rep_platform" no_td=> 1 %]
[%+ PROCESS select selname => "op_sys" no_td=> 1 %]
<script type="text/javascript">
assignToDefaultOnChange(['product', 'component']);
</script>
</td>
</tr>
...
...
@@ -482,7 +485,7 @@
%]
<br>
<input type="checkbox" id="set_default_assignee" name="set_default_assignee" value="1">
<label for="set_default_assignee">Reset Assignee to default</label>
<label
id="set_default_assignee_label"
for="set_default_assignee">Reset Assignee to default</label>
</div>
<script type="text/javascript">
hideEditableField('bz_assignee_edit_container',
...
...
@@ -526,7 +529,10 @@
%]
<br>
<input type="checkbox" id="set_default_qa_contact" name="set_default_qa_contact" value="1">
<label for="set_default_qa_contact">Reset QA Contact to default</label>
<label for="set_default_qa_contact" id="set_default_qa_contact_label">Reset QA Contact to default</label>
<script type="text/javascript">
initAssignedQA();
</script>
</div>
[% IF bug.qa_contact != "" %]
<script type="text/javascript">
...
...
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