mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:55:14 +00:00
use browser location if the location is "."
This commit is contained in:
parent
132f3606b2
commit
01bcd030e5
4 changed files with 13 additions and 14 deletions
|
@ -1248,8 +1248,6 @@ function z_status_editor($a, $x, $popup = false) {
|
||||||
$plaintext = true;
|
$plaintext = true;
|
||||||
|
|
||||||
|
|
||||||
$feature_voting = false; // feature_enabled($x['profile_uid'], 'consensus_tools');
|
|
||||||
if(x($x, 'hide_voting'))
|
|
||||||
$feature_voting = false;
|
$feature_voting = false;
|
||||||
|
|
||||||
$feature_nocomment = Apps::system_app_installed($x['profile_uid'], 'No Comment');
|
$feature_nocomment = Apps::system_app_installed($x['profile_uid'], 'No Comment');
|
||||||
|
|
|
@ -212,7 +212,7 @@ function string2bb(element) {
|
||||||
replace: function(item) { return "$1" + item.text + ' '; },
|
replace: function(item) { return "$1" + item.text + ' '; },
|
||||||
template: smiley_format
|
template: smiley_format
|
||||||
};
|
};
|
||||||
this.attr('autocomplete','off');
|
|
||||||
|
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
|
||||||
|
@ -266,8 +266,6 @@ function string2bb(element) {
|
||||||
template: tag_format
|
template: tag_format
|
||||||
};
|
};
|
||||||
|
|
||||||
this.attr('autocomplete', 'off');
|
|
||||||
|
|
||||||
var textcomplete;
|
var textcomplete;
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
|
||||||
|
@ -301,8 +299,6 @@ function string2bb(element) {
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.attr('autocomplete','off');
|
|
||||||
|
|
||||||
var textcomplete;
|
var textcomplete;
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
|
||||||
|
@ -339,8 +335,6 @@ function string2bb(element) {
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.attr('autocomplete','off');
|
|
||||||
|
|
||||||
var textcomplete;
|
var textcomplete;
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
|
||||||
|
@ -378,7 +372,6 @@ function string2bb(element) {
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.attr('autocomplete','off');
|
|
||||||
|
|
||||||
var textcomplete;
|
var textcomplete;
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
@ -460,7 +453,6 @@ function string2bb(element) {
|
||||||
template: bbco_format
|
template: bbco_format
|
||||||
};
|
};
|
||||||
|
|
||||||
this.attr('autocomplete','off');
|
|
||||||
|
|
||||||
var Textarea = Textcomplete.editors.Textarea;
|
var Textarea = Textcomplete.editors.Textarea;
|
||||||
|
|
||||||
|
|
|
@ -227,6 +227,16 @@ var activeCommentText = '';
|
||||||
function jotGetLocation() {
|
function jotGetLocation() {
|
||||||
reply = prompt("{{$whereareu}}", $('#jot-location').val());
|
reply = prompt("{{$whereareu}}", $('#jot-location').val());
|
||||||
if(reply && reply.length) {
|
if(reply && reply.length) {
|
||||||
|
// A single period indicates "use my browser location"
|
||||||
|
if(reply == '.') {
|
||||||
|
if(navigator.geolocation) {
|
||||||
|
reply = '';
|
||||||
|
navigator.geolocation.getCurrentPosition(function(position) {
|
||||||
|
$('#jot-coord').val(position.coords.latitude + ' ' + position.coords.longitude);
|
||||||
|
$('#profile-nolocation-wrapper').attr('disabled', false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
$('#jot-location').val(reply);
|
$('#jot-location').val(reply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
<input type="hidden" id="jot-postid" name="post_id" value="{{$post_id}}" />
|
<input type="hidden" id="jot-postid" name="post_id" value="{{$post_id}}" />
|
||||||
<input type="hidden" id="jot-webpage" name="webpage" value="{{$webpage}}" />
|
<input type="hidden" id="jot-webpage" name="webpage" value="{{$webpage}}" />
|
||||||
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
||||||
<!--input type="hidden" id="jot-consensus" name="consensus" value="{{if $consensus}}{{$consensus}}{{else}}0{{/if}}" -->
|
|
||||||
<input type="hidden" id="jot-nocomment" name="nocomment" value="{{if $nocomment}}{{$nocomment}}{{else}}0{{/if}}" />
|
<input type="hidden" id="jot-nocomment" name="nocomment" value="{{if $nocomment}}{{$nocomment}}{{else}}0{{/if}}" />
|
||||||
|
|
||||||
{{if $webpage}}
|
{{if $webpage}}
|
||||||
|
|
Loading…
Reference in a new issue