show clear browser location button only if use browser location option is set and minor css fixes

This commit is contained in:
marijus 2014-12-09 15:09:19 +01:00
parent 42fc104272
commit 242713ebef
6 changed files with 8 additions and 15 deletions

View File

@ -1128,7 +1128,7 @@ function status_editor($a,$x,$popup=false) {
'$shortaudio' => t('audio link'),
'$setloc' => t('Set your location'),
'$shortsetloc' => t('set location'),
'$noloc' => t('Clear browser location'),
'$noloc' => ((get_pconfig($x['profile_uid'],'system','use_browser_location')) ? t('Clear browser location') : ''),
'$shortnoloc' => t('clear location'),
'$title' => ((x($x,'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''),
'$placeholdertitle' => t('Title (optional)'),

View File

@ -1,11 +1,5 @@
/* override some bootstrap settings */
/* this might be a bug in bootstrap */
.input-group-addon,
.input-group-btn {
width: unset;
}
/* nav overrides */
nav .badge {

View File

@ -23,10 +23,6 @@ aside#region_1 {
padding: 65px 7px 0px 7px;
}
aside input[type='text'] {
width: 100%;
}
section {
width: 100%;
display: table-cell;

View File

@ -13,6 +13,7 @@
}
.widget-input {
width: 100%;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}

View File

@ -309,7 +309,7 @@ function enableOnUser(){
function jotClearLocation() {
$('#jot-coord').val('');
$('#profile-nolocation-wrapper').hide();
$('#profile-nolocation-wrapper').attr('disabled', true);
}

View File

@ -56,12 +56,14 @@
</button>
</div>
<div class='btn-group'>
<button id="profile-nolocation-wrapper" class="btn btn-default btn-sm" style="display: none;" title="{{$noloc}}" onclick="jotClearLocation();return false;">
<i id="profile-nolocation" class="icon-circle-blank jot-icons"></i>
</button>
<button id="profile-location-wrapper" class="btn btn-default btn-sm" title="{{$setloc}}" onclick="jotGetLocation();return false;">
<i id="profile-location" class="icon-globe jot-icons"></i>
</button>
{{if $noloc}}
<button id="profile-nolocation-wrapper" class="btn btn-default btn-sm" style="display: none;" title="{{$noloc}}" onclick="jotClearLocation();return false;">
<i id="profile-nolocation" class="icon-circle-blank jot-icons"></i>
</button>
{{/if}}
{{else}}
<div class='btn-group'>
{{/if}}