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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
cbbcceb2
Commit
cbbcceb2
authored
Jun 28, 2010
by
Reed Loden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 179626 - Hide, rather than disable, requestee fields when the flags aren't in the "?" state.
[r=mkanat a=mkanat]
parent
86f63e23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
flag.js
js/flag.js
+8
-8
No files found.
js/flag.js
View file @
cbbcceb2
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
*
*
* ***** END LICENSE BLOCK ***** */
* ***** END LICENSE BLOCK ***** */
//
Enables or disabl
es a requestee field depending on whether or not
//
Shows or hid
es a requestee field depending on whether or not
// the user is requesting the corresponding flag.
// the user is requesting the corresponding flag.
function
toggleRequesteeField
(
flagField
,
no_focus
)
function
toggleRequesteeField
(
flagField
,
no_focus
)
{
{
...
@@ -34,18 +34,18 @@ function toggleRequesteeField(flagField, no_focus)
...
@@ -34,18 +34,18 @@ function toggleRequesteeField(flagField, no_focus)
var
requesteeField
=
document
.
getElementById
(
id
);
var
requesteeField
=
document
.
getElementById
(
id
);
if
(
!
requesteeField
)
return
;
if
(
!
requesteeField
)
return
;
//
Enable or disabl
e the requestee field based on the value
//
Show or hid
e the requestee field based on the value
// of the flag field.
// of the flag field.
if
(
flagField
.
value
==
"?"
)
{
if
(
flagField
.
value
==
"?"
)
{
requesteeField
.
disabled
=
false
;
YAHOO
.
util
.
Dom
.
removeClass
(
requesteeField
.
parentNode
,
'bz_default_hidden'
)
;
if
(
!
no_focus
)
requesteeField
.
focus
();
if
(
!
no_focus
)
requesteeField
.
focus
();
}
else
}
else
requesteeField
.
disabled
=
true
;
YAHOO
.
util
.
Dom
.
addClass
(
requesteeField
.
parentNode
,
'bz_default_hidden'
)
;
}
}
//
Disabl
es requestee fields when the window is loaded since they shouldn't
//
Hid
es requestee fields when the window is loaded since they shouldn't
// be enabled until the user requests that flag type.
// be enabled until the user requests that flag type.
function
disabl
eRequesteeFields
()
function
hid
eRequesteeFields
()
{
{
var
inputElements
=
document
.
getElementsByTagName
(
"input"
);
var
inputElements
=
document
.
getElementsByTagName
(
"input"
);
var
selectElements
=
document
.
getElementsByTagName
(
"select"
);
var
selectElements
=
document
.
getElementsByTagName
(
"select"
);
...
@@ -68,8 +68,8 @@ function disableRequesteeFields()
...
@@ -68,8 +68,8 @@ function disableRequesteeFields()
id
=
inputElement
.
name
.
replace
(
/requestee
(
_type
)?
-
(\d
+
)
/
,
"flag$1-$2"
);
id
=
inputElement
.
name
.
replace
(
/requestee
(
_type
)?
-
(\d
+
)
/
,
"flag$1-$2"
);
flagField
=
document
.
getElementById
(
id
);
flagField
=
document
.
getElementById
(
id
);
if
(
flagField
&&
flagField
.
value
!=
"?"
)
if
(
flagField
&&
flagField
.
value
!=
"?"
)
inputElement
.
disabled
=
true
;
YAHOO
.
util
.
Dom
.
addClass
(
inputElement
.
parentNode
,
'bz_default_hidden'
)
;
}
}
}
}
}
}
YAHOO
.
util
.
Event
.
addListener
(
window
,
"load"
,
disabl
eRequesteeFields
);
YAHOO
.
util
.
Event
.
onDOMReady
(
hid
eRequesteeFields
);
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