Possibly make switches work on IE8 (untested)

This commit is contained in:
Stefan Parviainen 2015-01-01 11:33:00 +01:00
parent 70f0019905
commit ef6680f7ad
21 changed files with 28 additions and 18 deletions

View File

@ -7,6 +7,7 @@
}
/* first-of-type needed to style switches */
#sellpage-edit label.mainlabel,
#sellpage-edit label:first-of-type {
width: 300px;
}

View File

@ -4,6 +4,7 @@
}
/* first-of-type needed to style switches */
#group-edit-form label.mainlabel,
#group-edit-form label:first-of-type {
float: left;
width: 300px;

View File

@ -29,6 +29,7 @@ ul#settings-privacy-macros {
}
/* first-of-type needed to be able to style switches */
#settings-permissions-wrapper .field label.mainlabel,
#settings-permissions-wrapper .field label:first-of-type {
width: 350px;
}
@ -43,6 +44,7 @@ ul#settings-privacy-macros {
}
/* first-of-type needed to be able to style switches */
#settings-notifications .field label.mainlabel,
#settings-notifications .field label:first-of-type {
margin-left: 20px;
width: 330px;

View File

@ -5,6 +5,7 @@
}
/* first-of-type needed to style switches */
.field label.mainlabel,
.thing-label, .field label:first-of-type, .thing-verb-label, .thing-profile-label{
float: left;
width: 350px;

View File

@ -307,6 +307,7 @@ footer {
}
/* first-of-type needed to style switches */
#main-login .field.checkbox label.mainlabel,
#main-login .field.checkbox label:first-of-type {
margin-bottom: 0;
float: left;
@ -376,6 +377,7 @@ footer {
margin-top: 20px;
}
/* first-of-type needed to style switches */
#profile-edit-wrapper .field label.mainlabel,
#profile-edit-wrapper .field label:first-of-type {
width: 175px;
}
@ -1244,6 +1246,7 @@ footer {
}
/* first-of-type needed to style switches */
.field label.mainlabel,
.field label:first-of-type {
float: left;
width: 350px;
@ -2358,6 +2361,7 @@ aside .nav > li > a:hover, aside .nav > li > a:focus {
/* Hide the placeholder label which is used for styling switches */
/* Many places give a width to all labels, so need to specifically set these to 0 width */
/* This should probably be moved to core */
.field.checkbox label.switchlabel,
.field.checkbox label:nth-of-type(2) {
width: 0px;
margin: 0px;
@ -2371,6 +2375,7 @@ aside .nav > li > a:hover, aside .nav > li > a:focus {
margin-left: -9999px;
visibility: hidden;
}
.field.checkbox input + label.switchlabel,
.field.checkbox input + label:nth-of-type(2) {
display: block;
position: relative;

View File

@ -1,6 +1,6 @@
<tr>
<td>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
</td>
<td class="abook-them">
<input type="checkbox" name='them_{{$field.0}}' id='them_id_{{$field.0}}' value="1" disabled="disabled" {{if $field.2}}checked="checked"{{/if}} />

View File

@ -1,4 +1,4 @@
<div class='field checkbox'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}}><label for='id_{{$field.0}}'></label><span class='field_help'>{{$field.3}}</span>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}}><label class="switchlabel" for='id_{{$field.0}}'></label><span class='field_help'>{{$field.3}}</span>
</div>

View File

@ -1,5 +1,5 @@
<div class='field input color'>
<label for='id_{{$field.0}}' id='label_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}' id='label_{{$field.0}}'>{{$field.1}}</label>
<input class='color' name='{{$field.0}}' id='id_{{$field.0}}' type="text" value="{{$field.2}}">{{if $field.4}} <span class="required">{{$field.4}}</span> {{/if}}
<span id='help_{{$field.0}}' class='field_help'>{{$field.3}}</span>
<div id='end_{{$field.0}}' class='field_end'></div>

View File

@ -1,5 +1,5 @@
<div class='field combobox'>
<label for='id_{{$field.0}}' id='id_{{$field.0}}_label'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}' id='id_{{$field.0}}_label'>{{$field.1}}</label>
{{* html5 don't work on Chrome, Safari and IE9 see https://github.com/thgreasi/datalist-polyfill
<input id="id_{{$field.0}}" type="text" list="data_{{$field.0}}" >
<datalist id="data_{{$field.0}}" >

View File

@ -1,5 +1,5 @@
<div class='field custom'>
<label for='{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='{{$field.0}}'>{{$field.1}}</label>
{{$field.2}}
<span class='field_help'>{{$field.3}}</span>
</div>

View File

@ -1,5 +1,5 @@
<div class='field input'>
<label for='id_{{$field.0}}' id='label_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}' id='label_{{$field.0}}'>{{$field.1}}</label>
<input name='{{$field.0}}' id='id_{{$field.0}}' type="text" value="{{$field.2}}">{{if $field.4}} <span class="required">{{$field.4}}</span> {{/if}}
<span id='help_{{$field.0}}' class='field_help'>{{$field.3}}</span>
<div id='end_{{$field.0}}' class='field_end'></div>

View File

@ -1,4 +1,4 @@
<div class='field checkbox'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="{{$field.3}}" {{if $field.2}}checked="true"{{/if}}><label for='id_{{$field.0}}'></label><span class='field_help'>{{$field.4}}</span>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="{{$field.3}}" {{if $field.2}}checked="true"{{/if}}><label class="switchlabel" for='id_{{$field.0}}'></label><span class='field_help'>{{$field.4}}</span>
</div>

View File

@ -1,5 +1,5 @@
<div class='field password'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<input type='password' name='{{$field.0}}' id='id_{{$field.0}}' value="{{$field.2}}">
<span class='field_help'>{{$field.3}}</span>
</div>

View File

@ -1,5 +1,5 @@
<div class='field radio'>
<label for='id_{{$field.0}}_{{$field.2}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}_{{$field.2}}'>{{$field.1}}</label>
<input type="radio" name='{{$field.0}}' id='id_{{$field.0}}_{{$field.2}}' value="{{$field.2}}" {{if $field.4}}checked="true"{{/if}}>
<span class='field_help'>{{$field.3}}</span>
</div>

View File

@ -1,5 +1,5 @@
<div class='field richtext'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<textarea name='{{$field.0}}' id='id_{{$field.0}}' class="fieldRichtext">{{$field.2}}</textarea>
<span class='field_help'>{{$field.3}}</span>
</div>

View File

@ -1,5 +1,5 @@
<div class='field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<select name='{{$field.0}}' id='id_{{$field.0}}'>
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
</select>

View File

@ -1,5 +1,5 @@
<div class='field select'>
<label style="font-weight: normal;" for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" style="font-weight: normal;" for='id_{{$field.0}}'>{{$field.1}}</label>
<select disabled="true" name='{{$field.0}}' id='id_{{$field.0}}'>
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
</select>

View File

@ -1,5 +1,5 @@
<div class='field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<select name='{{$field.0}}' id='id_{{$field.0}}'>
{{$field.4}}
</select>

View File

@ -1,5 +1,5 @@
<div class='field textarea'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<textarea name='{{$field.0}}' id='id_{{$field.0}}' {{if $field.4}}{{$field.4}}{{/if}} >{{$field.2}}</textarea>
<span class='field_help'>{{$field.3}}</span>
</div>

View File

@ -1,6 +1,6 @@
<script>$(document).ready(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>
<div class='field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<select name='{{$field.0}}' id='id_{{$field.0}}' {{if $field.5=='preview'}}onchange="previewTheme(this);"{{/if}} >
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
</select>

View File

@ -1,5 +1,5 @@
<div class='field yesno'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
<div class='onoff' id="id_{{$field.0}}_onoff">
<input type="hidden" name='{{$field.0}}' id='id_{{$field.0}}' value="{{$field.2}}">
<a href="#" class='off'>