de-IDifying labels in notice form to fix issue with geo pin activating the wrong place when cloning the form

Note that changes to the attachment from <label for/><input id/> to <label><input></label> affect some of the existing styles which attempt to place them both in the same place based on having a common parent. Only 'neo' has been fully tested and fixed for this case, as the others all fail due to the new layout anyway. :)
This commit is contained in:
Brion Vibber 2011-03-08 12:01:12 -08:00
parent 9185364f5a
commit ba1ada2880
34 changed files with 111 additions and 98 deletions

View File

@ -187,12 +187,14 @@ class NoticeForm extends Form
if (common_config('attachments', 'uploads')) {
$this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
// TRANS: Input label in notice form for adding an attachment.
$this->out->element('label', array('for' => 'notice_data-attach'),_('Attach'));
$this->out->element('input', array('id' => 'notice_data-attach',
$this->out->elementStart('label', array('class' => 'notice_data-attach'));
$this->out->text(_('Attach'));
$this->out->element('input', array('class' => 'notice_data-attach',
'type' => 'file',
'name' => 'attach',
// TRANS: Title for input field to attach a file to a notice.
'title' => _('Attach a file.')));
$this->out->elementEnd('label');
}
if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto');
@ -210,6 +212,7 @@ class NoticeForm extends Form
// @fixme checkbox method allows no way to change the id without changing the name
//$this->out->checkbox('notice_data-geo', _('Share my location'), true);
$this->out->elementStart('label', 'notice_data-geo');
$this->out->element('input', array(
'name' => 'notice_data-geo',
'type' => 'checkbox',
@ -218,11 +221,10 @@ class NoticeForm extends Form
'checked' => true, // ?
));
$this->out->text(' ');
$this->out->element('label', array('class' => 'notice_data-geo',
'for' => $this->id() . '-notice_data-geo'),
// TRANS: Field label to add location to a notice.
_('Share my location'));
// TRANS: Field label to add location to a notice.
$this->out->text(_('Share my location'));
$this->out->elementEnd('label');
$this->out->elementEnd('div');
// TRANS: Text to not share location for a notice in notice form.
$share_disable_text = _('Do not share my location');

View File

@ -108,7 +108,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
#form_notice label[for="notice_data-attach"] {
display:none;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;

View File

@ -17,13 +17,13 @@ max-width:451px;
display:none;
}
.realtime-popup #form_notice label[for=notice_data-attach],
.realtime-popup #form_notice #notice_data-attach,
.realtime-popup #form_notice label.notice_data-attach,
.realtime-popup #form_notice input.notice_data-attach,
.realtime-popup #form_notice label.notice_data-geo {
top:0;
}
.realtime-popup #form_notice #notice_data-attach {
.realtime-popup #form_notice input.notice_data-attach {
left:auto;
right:0;
}

View File

@ -597,19 +597,19 @@ float:left;
font-size:1.3em;
margin-bottom:7px;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
position:absolute;
top:25px;
right:10.5%;
cursor:pointer;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
text-indent:-9999px;
width:16px;
height:16px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
padding:0;
height:16px;
}

View File

@ -462,11 +462,11 @@ float:left;
font-size:1.3em;
margin-bottom:7px;
}
#form_notice label[for=notice_data-attach] {
#form_notice label.notice_data-attach {
text-indent:-9999px;
}
#form_notice label[for=notice_data-attach],
#form_notice #notice_data-attach {
#form_notice label.notice_data-attach,
#form_notice input.notice_data-attach {
position:absolute;
top:25px;
right:49px;
@ -474,7 +474,7 @@ width:16px;
height:16px;
cursor:pointer;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
text-indent:-279px;
}
#form_notice #notice_submit label {

View File

@ -172,14 +172,14 @@ color:#333333;
#form_notice.warning .count {
color:#000000;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
background-position:0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
opacity:0;
}
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,

View File

@ -114,8 +114,8 @@ address {
height: 54px;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
top: 27px;
}

View File

@ -61,7 +61,7 @@ line-height:auto;
color:#FFFFFF;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}

View File

@ -94,7 +94,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
.form_notice label[for="notice_data-attach"] {
display:none;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;

View File

@ -161,8 +161,8 @@ address {
border-radius: 6px;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
top: 27px;
right: 86px;
}
@ -594,7 +594,7 @@ padding-right:0;
right: 6px !important;
}
.realtime-popup .form_notice label[for=notice_data-attach], .realtime-popup .form_notice #notice_data-attach {
.realtime-popup .form_notice label.notice_data-attach, .realtime-popup .form_notice input.notice_data-attach {
right: 74px;
top: 3px !important;
}

View File

@ -65,7 +65,7 @@ line-height:auto;
color:#FFFFFF;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}

View File

@ -99,7 +99,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
.form_notice label[for="notice_data-attach"] {
display:none;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;

View File

@ -493,19 +493,19 @@ float:left;
font-size:1.3em;
margin-bottom:7px;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
position:absolute;
top:25px;
right:10.5%;
cursor:pointer;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
text-indent:-9999px;
width:16px;
height:16px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
padding:0;
height:16px;
}
@ -1602,7 +1602,7 @@ background:none;
}
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,
@ -1787,10 +1787,10 @@ color:#000000;
#form_notice.warning .count {
color:#000000;
}
#form_notice label[for=notice_data-attach] {
#form_notice label.notice_data-attach {
background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
opacity:0;
}

View File

@ -34,7 +34,7 @@ height:16px;
width:16px;
display:block;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
filter: alpha(opacity = 0);
left:33.5%;
}

View File

@ -152,14 +152,14 @@ color:#333333;
.entity_actions .dialogbox input {
color:#000000;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
background-position:0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
opacity:0;
}
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,

View File

@ -16,7 +16,7 @@ background-color:#C8D1D5;
.form_notice .count + label {
background:transparent url(../../base/images/icons/icons-01.gif) no-repeat 0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}
.notice-options form.form_favor input.submit {

View File

@ -153,14 +153,14 @@ color:#333333;
.entity_actions .dialogbox input {
color:#000000;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
background-position:0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
opacity:0;
}
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,

View File

@ -16,7 +16,7 @@ background-color:#D9DADB;
.form_notice .count + label {
background:transparent url(../../base/images/icons/icons-01.gif) no-repeat 0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}
.notice-options form.form_favor input.submit {

View File

@ -234,7 +234,7 @@ p.instructions {
/*-- FORMS --*/
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,
@ -292,7 +292,7 @@ button.minimize,
.form_notice label.notice_data-geo.checked {
background-position:0 -1846px;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
background-position:0 -328px;
}
button.close {
@ -937,19 +937,19 @@ z-index:2;
.form_notice label {
float:left;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
position:absolute;
top:2em;
right: 3em;
cursor:pointer;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
text-indent:-9999px;
width:16px;
height:16px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
opacity: 0;
padding:0;
height:1.6em;

View File

@ -45,7 +45,7 @@ padding:0 4px;
background:transparent url(../images/icons/icons-01.png) no-repeat 0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}
.form_notice .notice_data-geo_wrap label {

View File

@ -114,7 +114,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
#form_notice label[for="notice_data-attach"] {
display:none;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;

View File

@ -160,8 +160,7 @@ address {
border-radius: 6px;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach {
top: 27px;
right: 86px;
}
@ -434,8 +433,8 @@ td.entity_profile { /* cf directory table */
#entity_remote_subscribe .dialogbox {
border: 1px solid #7B4E82;
border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
@ -612,7 +611,7 @@ padding-right:0;
right: 6px !important;
}
.realtime-popup .form_notice label[for=notice_data-attach], .realtime-popup .form_notice #notice_data-attach {
.realtime-popup .form_notice label.notice_data-attach, .realtime-popup .form_notice input.notice_data-attach {
right: 74px;
top: 3px !important;
}
@ -637,8 +636,8 @@ padding-right:0;
}
.bookmark-notice-count {
border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
padding: 1px 6px;
font-size: 1.2em;
@ -676,8 +675,8 @@ padding-right:0;
}
ul.bookmark-tags a {
border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
padding: 1px 6px;
background: #f2f2f2;
@ -761,8 +760,8 @@ ul.bookmark-tags a:hover {
/* Onboard specific styles */
.onboard-flash {
border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
font-size: 1.1em;
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.5);

View File

@ -22,11 +22,11 @@ display:block;
width: 106px;
max-width: 106px;
}
.form_notice #notice_data-attach_selected,
.form_notice input.notice_data-attach_selected,
.form_notice #notice_data-geo_selected {
width:78.75%;
}
.form_notice #notice_data-attach_selected button,
.form_notice input.notice_data-attach_selected button,
.form_notice #notice_data-geo_selected button {
padding:0 4px;
}
@ -65,7 +65,7 @@ line-height:auto;
color:#FFFFFF;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}

View File

@ -99,7 +99,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
.form_notice label[for="notice_data-attach"] {
display:none;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;

View File

@ -450,19 +450,24 @@ float:left;
font-size:1.3em;
margin-bottom:7px;
}
#form_notice label[for=notice_data-attach],
#form_notice #notice_data-attach {
#form_notice label.notice_data-attach,
#form_notice input.notice_data-attach {
position:absolute;
top:25px;
cursor:pointer;
}
#form_notice label[for=notice_data-attach] {
#form_notice label.notice_data-attach {
top:25px;
}
#form_notice input.notice_data-attach {
top:0;
}
#form_notice label.notice_data-attach {
text-indent:-9999px;
left:394px;
width:16px;
height:16px;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
left:183px;
padding:0;
height:16px;

View File

@ -192,14 +192,14 @@ color:#333333;
#form_notice.warning .count {
color:#000000;
}
#form_notice label[for=notice_data-attach] {
#form_notice label.notice_data-attach {
background-position:0 -328px;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
opacity:0;
}
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,

View File

@ -226,21 +226,28 @@ address .poweredby {
color: #333 !important;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
position:absolute;
top: 31px;
right: 88px;
cursor:pointer;
}
.form_notice label.notice_data-attach {
top: 31px;
right: 88px;
}
.form_notice input.notice_data-attach {
/* Positioned inside the label */
top: 0;
right: 0;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
text-indent:-9999px;
width:16px;
height:16px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
padding:0;
height:16px;
}
@ -348,7 +355,7 @@ address .poweredby {
opacity: 1;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
opacity:0;
}
@ -1724,7 +1731,7 @@ body.realtime-popup {
width: 86px;
}
.realtime-popup .form_notice label[for=notice_data-attach], .form_notice #notice_data-attach {
.realtime-popup .form_notice label.notice_data-attach {
right: 70px;
}
@ -1734,7 +1741,7 @@ body.realtime-popup {
/* icons */
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,
@ -1921,7 +1928,7 @@ background-position:0 -1648px;
#new_group a {
background-position:0 -1054px;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
background-position: 0 -328px;
}
.form_notice label.notice_data-geo {

View File

@ -61,7 +61,7 @@ line-height:auto;
color:#FFFFFF;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}

View File

@ -230,8 +230,8 @@ h6 {font-size: 1em;}
border: 1px solid #9495b7;
}
.form_notice label[for=notice_data-attach],
.form_notice #notice_data-attach {
.form_notice label.notice_data-attach,
.form_notice input.notice_data-attach {
top: 27px;
right: 86px;
}

View File

@ -63,7 +63,7 @@ line-height:auto;
color:#FFFFFF;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}

View File

@ -99,7 +99,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
.form_notice label[for="notice_data-attach"] {
display:none;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;

View File

@ -328,15 +328,15 @@ a,
color:#000000;
}
.form_notice label[for=notice_data-attach] {
.form_notice label.notice_data-attach {
background-position:0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
opacity:0;
}
.form_notice label[for=notice_data-attach],
.form_notice label.notice_data-attach,
#export_data li a.rss,
#export_data li a.atom,
#export_data li a.foaf,

View File

@ -9,7 +9,7 @@ background-color:#C8D1D5;
.form_notice .count + label {
background:transparent url(../../base/images/icons/icons-01.gif) no-repeat 0 -328px;
}
.form_notice #notice_data-attach {
.form_notice input.notice_data-attach {
filter: alpha(opacity=0);
}
.notice-options form.form_favor input.submit {

View File

@ -109,7 +109,7 @@ iPhone/iPod Touch, Android, Opera Mini Simulator
#form_notice label[for="notice_data-attach"] {
display:none;
}
#form_notice #notice_data-attach {
#form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;