Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
bf9c6341
Commit
bf9c6341
authored
Aug 24, 2009
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#550572
by sun and c960657: Fixed CSS+JS regressions related to form-item-[name].
parent
03a5563b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
17 additions
and
27 deletions
+17
-27
includes/form.inc
includes/form.inc
+2
-2
modules/book/book.css
modules/book/book.css
+1
-1
modules/dblog/dblog-rtl.css
modules/dblog/dblog-rtl.css
+1
-1
modules/dblog/dblog.css
modules/dblog/dblog.css
+1
-1
modules/locale/locale.css
modules/locale/locale.css
+1
-1
modules/openid/openid.css
modules/openid/openid.css
+3
-3
modules/openid/openid.js
modules/openid/openid.js
+2
-2
modules/system/system-rtl.css
modules/system/system-rtl.css
+0
-5
modules/system/system.css
modules/system/system.css
+0
-5
modules/system/system.js
modules/system/system.js
+4
-4
modules/taxonomy/vocabulary.js
modules/taxonomy/vocabulary.js
+2
-2
No files found.
includes/form.inc
View file @
bf9c6341
...
...
@@ -2540,10 +2540,10 @@ function theme_form_element($element) {
// Add element's #type and #name as class to aid with JS/CSS selectors.
$class
=
array
(
'form-item'
);
if
(
!
empty
(
$element
[
'#type'
]))
{
$class
[]
=
'form-
item
-'
.
strtr
(
$element
[
'#type'
],
array
(
'_'
=>
'-'
)
)
;
$class
[]
=
'form-
type
-'
.
strtr
(
$element
[
'#type'
],
'_'
,
'-'
);
}
if
(
!
empty
(
$element
[
'#name'
]))
{
$class
[]
=
strtr
(
$element
[
'#name'
],
array
(
' '
=>
'-'
,
'_'
=>
'-'
,
'['
=>
'-'
,
']'
=>
''
))
.
'-wrapper'
;
$class
[]
=
'form-item-'
.
strtr
(
$element
[
'#name'
],
array
(
' '
=>
'-'
,
'_'
=>
'-'
,
'['
=>
'-'
,
']'
=>
''
));
}
$output
=
'<div class="'
.
implode
(
' '
,
$class
)
.
'">'
.
"
\n
"
;
...
...
modules/book/book.css
View file @
bf9c6341
...
...
@@ -38,7 +38,7 @@
html
.js
#edit-book-pick-book
{
display
:
none
;
}
.form-item-book-bid
-wrapper
.description
{
.form-item-book-bid
.description
{
clear
:
both
;
}
#book-admin-edit
select
{
...
...
modules/dblog/dblog-rtl.css
View file @
bf9c6341
/* $Id$ */
.form-item-type
-wrapper
,
.form-item-severity
-wrapper
{
.form-item-type
,
.form-item-severity
{
float
:
right
;
padding-right
:
0
;
padding-left
:
.8em
;
...
...
modules/dblog/dblog.css
View file @
bf9c6341
/* $Id$ */
.form-item-type
-wrapper
,
.form-item-severity
-wrapper
{
.form-item-type
,
.form-item-severity
{
float
:
left
;
/* LTR */
padding-right
:
.8em
;
/* LTR */
margin
:
0.1em
;
...
...
modules/locale/locale.css
View file @
bf9c6341
...
...
@@ -5,7 +5,7 @@
text-decoration
:
line-through
;
}
.form-item-language
-wrapper
,
.form-item-translation
-wrapper
,
.form-item-group
-wrapper
{
.form-item-language
,
.form-item-translation
,
.form-item-group
{
float
:
left
;
/* LTR */
padding-right
:
.8em
;
/* LTR */
margin
:
0.1em
;
...
...
modules/openid/openid.css
View file @
bf9c6341
...
...
@@ -6,11 +6,11 @@
background-repeat
:
no-repeat
;
padding-left
:
20px
;
}
div
.form-item-openid-identifier
-wrapper
{
div
.form-item-openid-identifier
{
display
:
block
;
}
html
.js
#user-login-form
div
.form-item-openid-identifier
-wrapper
,
html
.js
#user-login
div
.form-item-openid-identifier
-wrapper
{
html
.js
#user-login-form
div
.form-item-openid-identifier
,
html
.js
#user-login
div
.form-item-openid-identifier
{
display
:
none
;
}
html
.js
#user-login-form
li
.openid-link
,
...
...
modules/openid/openid.js
View file @
bf9c6341
...
...
@@ -3,8 +3,8 @@
Drupal
.
behaviors
.
openid
=
{
attach
:
function
(
context
)
{
var
loginElements
=
$
(
'
.form-item-name
-wrapper
, .form-item-pass
-wrapper
, li.openid-link
'
);
var
openidElements
=
$
(
'
.form-item-openid-identifier
-wrapper
, li.user-link
'
);
var
loginElements
=
$
(
'
.form-item-name, .form-item-pass, li.openid-link
'
);
var
openidElements
=
$
(
'
.form-item-openid-identifier, li.user-link
'
);
// This behavior attaches by ID, so is only valid once on a page.
if
(
!
$
(
'
#edit-openid-identifier.openid-processed
'
).
size
()
&&
$
(
'
#edit-openid-identifier
'
).
val
())
{
...
...
modules/system/system-rtl.css
View file @
bf9c6341
...
...
@@ -66,11 +66,6 @@ html.js fieldset.collapsed legend a {
background-position
:
98%
50%
;
}
div
.teaser-button-wrapper
{
float
:
left
;
padding-right
:
0
;
padding-left
:
5%
;
}
.teaser-checkbox
div
.form-item
{
float
:
left
;
margin
:
0
0
0
5%
;
...
...
modules/system/system.css
View file @
bf9c6341
...
...
@@ -409,11 +409,6 @@ a.tabledrag-handle-hover .handle {
.teaser-checkbox
{
padding-top
:
1px
;
}
div
.teaser-button-wrapper
{
float
:
right
;
/* LTR */
padding-right
:
5%
;
/* LTR */
margin
:
0
;
}
.teaser-checkbox
div
.form-item
{
float
:
right
;
/* LTR */
margin
:
0
5%
0
0
;
/* LTR */
...
...
modules/system/system.js
View file @
bf9c6341
...
...
@@ -8,15 +8,15 @@
Drupal
.
hideEmailAdministratorCheckbox
=
function
()
{
// Make sure the secondary box is shown / hidden as necessary on page load.
if
(
$
(
'
#edit-update-status-module-1
'
).
is
(
'
:checked
'
))
{
$
(
'
.update-status-module-2
-wrapper
'
).
show
();
$
(
'
.
form-item-
update-status-module-2
'
).
show
();
}
else
{
$
(
'
.update-status-module-2
-wrapper
'
).
hide
();
$
(
'
.
form-item-
update-status-module-2
'
).
hide
();
}
// Toggle the display as necessary when the checkbox is clicked.
$
(
'
#edit-update-status-module-1
'
).
change
(
function
()
{
$
(
'
.update-status-module-2
-wrapper
'
).
toggle
();
$
(
'
.
form-item-
update-status-module-2
'
).
toggle
();
})
};
...
...
@@ -196,7 +196,7 @@ Drupal.behaviors.machineReadableValue = {
// Build selector for the machine readable name.
var
target
=
'
#edit-
'
+
settings
.
target
;
// Build selector for the wrapper element around the target field.
var
wrapper
=
'
.
'
+
settings
.
target
+
'
-wrapper
'
;
var
wrapper
=
'
.
form-item-
'
+
settings
.
target
;
// Do not process the element if we got an error or the given name and the
// machine readable name are identical or the machine readable name is
...
...
modules/taxonomy/vocabulary.js
View file @
bf9c6341
...
...
@@ -4,13 +4,13 @@
Drupal
.
behaviors
.
contentTypes
=
{
attach
:
function
()
{
if
(
$
(
'
#edit-machine-name
'
).
val
()
==
$
(
'
#edit-name
'
).
val
().
toLowerCase
().
replace
(
/
[^
a-z0-9
]
+/g
,
'
_
'
).
replace
(
/_+/g
,
'
_
'
)
||
$
(
'
#edit-machine-name
'
).
val
()
==
''
)
{
$
(
'
#edit
-machine-name
-wrapper
'
).
hide
();
$
(
'
.form-item
-machine-name
'
).
hide
();
$
(
'
#edit-name
'
).
keyup
(
function
()
{
var
machine
=
$
(
this
).
val
().
toLowerCase
().
replace
(
/
[^
a-z0-9
]
+/g
,
'
_
'
).
replace
(
/_+/g
,
'
_
'
);
if
(
machine
!=
'
_
'
&&
machine
!=
''
)
{
$
(
'
#edit-machine-name
'
).
val
(
machine
);
$
(
'
#vocabulary-name-suffix
'
).
empty
().
append
(
'
Machine name:
'
+
machine
+
'
[
'
).
append
(
$
(
'
<a href="#">
'
+
Drupal
.
t
(
'
Edit
'
)
+
'
</a>
'
).
click
(
function
()
{
$
(
'
#edit
-machine-name
-wrapper
'
).
show
();
$
(
'
.form-item
-machine-name
'
).
show
();
$
(
'
#vocabulary-name-suffix
'
).
hide
();
$
(
'
#edit-name
'
).
unbind
(
'
keyup
'
);
return
false
;
...
...
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