]> git.mxchange.org Git - friendica.git/commitdiff
ability to clear browser location on individual posts
authorMike Macgirvin <mike@macgirvin.com>
Wed, 20 Oct 2010 07:33:17 +0000 (00:33 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Wed, 20 Oct 2010 07:33:17 +0000 (00:33 -0700)
images/noglobe.gif [new file with mode: 0644]
view/jot-header.tpl
view/jot.tpl
view/jot_geotag.tpl
view/theme/default/style.css

diff --git a/images/noglobe.gif b/images/noglobe.gif
new file mode 100644 (file)
index 0000000..81e1765
Binary files /dev/null and b/images/noglobe.gif differ
index bdf0cb610621720be56b7ece7390ba102a06f4ff..81c513484ac0f718b9675f6476a78d256983f37c 100644 (file)
@@ -118,6 +118,11 @@ tinyMCE.init({
                }
        }
 
+       function jotClearLocation() {
+               $('#jot-coord').val('');
+               $('#profile-nolocation-wrapper').hide();
+       }
+
        $geotag
 
 </script>
index 363c4617f93a32504e765e59cf89f6d11afe5dfe..6590cace8f086dca413404247bbe0ce1664006d4 100644 (file)
                <img id="profile-video" src="images/youtube_icon.gif" alt="Insert YouTube video" title="Insert YouTube video" onclick="jotGetVideo();" />
        </div> 
        <div id="profile-location-wrapper" style="display: $visitor;" >
-               <img id="profile-location" src="images/globe.gif" alt="Set your location" title="Set your lcoation" onclick="jotGetLocation();" />
+               <img id="profile-location" src="images/globe.gif" alt="Set your location" title="Set your location" onclick="jotGetLocation();" />
+       </div> 
+       <div id="profile-nolocation-wrapper" style="display: none;" >
+               <img id="profile-nolocation" src="images/noglobe.gif" alt="Clear Browser Location" title="Clear Browser Location" onclick="jotClearLocation();" />
        </div> 
        <div id="profile-rotator-wrapper" style="display: $visitor;" >
                <img id="profile-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" />
index 835cc9ebb9d4d464d73ec936a665c02ebaaf0b14..c140d5627eb7d9647184ea7a159fb10c1ab02b62 100644 (file)
@@ -2,6 +2,7 @@
        if(navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(function(position) {
                        $('#jot-coord').val(position.coords.latitude + ',' + position.coords.longitude);
+                       $('#profile-nolocation-wrapper').show();
                });
        }
 
index 066456e5463400d4536c038a944d9f943cd0c4ae..32d8eeba0dc6db211cb860fea803a452dfb915ae 100644 (file)
@@ -79,7 +79,8 @@ blockquote:before {
 }
 
 #jot-perms-icon, 
-#profile-location, 
+#profile-location,
+#profile-nolocation, 
 #profile-video, 
 #profile-link, 
 #wall-image-upload,
@@ -943,6 +944,10 @@ input#dfrn-url {
        float: left;
        margin-left: 20px;
 }
+#profile-nolocation-wrapper {
+       float: left;
+       margin-left: 20px;
+}
 
 #profile-jot-perms {
        float: left;