- Patch #482636 by quicksketch: further clean-up of the form IDs/classes.

merge-requests/26/head
Dries Buytaert 2009-07-04 14:57:23 +00:00
parent 2e0a4d26af
commit a0d19b0810
8 changed files with 12 additions and 16 deletions

View File

@ -2610,11 +2610,7 @@ function theme_form_element($element) {
$class[] = strtr($element['#name'], array('_' => '-', '[' => '-', ']' => '')) . '-wrapper';
}
$output = '<div class="' . implode(' ', $class) . '"';
if (!empty($element['#id'])) {
$output .= ' id="' . $element['#id'] . '-wrapper"';
}
$output .= ">\n";
$output = '<div class="' . implode(' ', $class) . '">' . "\n";
$required = !empty($element['#required']) ? '<span class="form-required" title="' . $t('This field is required.') . '">*</span>' : '';
if (!empty($element['#title']) && empty($element['#form_element_skip_title'])) {

View File

@ -38,7 +38,7 @@
html.js #edit-book-pick-book {
display: none;
}
#edit-book-bid-wrapper .description {
.form-item-book-bid-wrapper .description {
clear: both;
}
#book-admin-edit select {

View File

@ -1,6 +1,6 @@
/* $Id$ */
#edit-type-wrapper, #edit-severity-wrapper {
.form-item-type-wrapper, .form-item-severity-wrapper {
float: right;
padding-right: 0;
padding-left: .8em;

View File

@ -1,6 +1,6 @@
/* $Id$ */
#edit-type-wrapper, #edit-severity-wrapper {
.form-item-type-wrapper, .form-item-severity-wrapper {
float: left; /* LTR */
padding-right: .8em; /* LTR */
margin: 0.1em;

View File

@ -5,7 +5,7 @@
text-decoration: line-through;
}
#edit-language-wrapper, #edit-translation-wrapper, #edit-group-wrapper {
.form-item-language-wrapper, .form-item-translation-wrapper, .form-item-group-wrapper {
float: left; /* LTR */
padding-right: .8em; /* LTR */
margin: 0.1em;

View File

@ -4,13 +4,13 @@
Drupal.behaviors.contentTypes = {
attach: function () {
if ($('#edit-type').val() == $('#edit-name').val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_') || $('#edit-type').val() == '') {
$('#edit-type-wrapper').hide();
$('.form-item-type-wrapper').hide();
$('#edit-name').keyup(function () {
var machine = $(this).val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_');
if (machine != '_' && machine != '') {
$('#edit-type').val(machine);
$('#node-type-name-suffix').empty().append(' Machine name: ' + machine + ' [').append($('<a href="#">' + Drupal.t('Edit') + '</a>').click(function () {
$('#edit-type-wrapper').show();
$('.form-item-type-wrapper').show();
$('#node-type-name-suffix').hide();
$('#edit-name').unbind('keyup');
return false;

View File

@ -6,11 +6,11 @@
background-repeat: no-repeat;
padding-left: 20px;
}
div#edit-openid-identifier-wrapper {
div.form-item-openid-identifier-wrapper {
display: block;
}
html.js #user-login-form div#edit-openid-identifier-wrapper,
html.js #user-login div#edit-openid-identifier-wrapper {
html.js #user-login-form div.form-item-openid-identifier-wrapper,
html.js #user-login div.form-item-openid-identifier-wrapper {
display: none;
}
html.js #user-login-form li.openid-link,

View File

@ -3,8 +3,8 @@
Drupal.behaviors.openid = {
attach: function (context) {
var loginElements = $('#edit-name-wrapper, #edit-pass-wrapper, li.openid-link');
var openidElements = $('#edit-openid-identifier-wrapper, li.user-link');
var loginElements = $('.form-item-name-wrapper, .form-item-pass-wrapper, li.openid-link');
var openidElements = $('.form-item-openid-identifier-wrapper, 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()) {