From 6fd1263bff475d02421dac5d8bc97eadea14d5b3 Mon Sep 17 00:00:00 2001 From: rsudev Date: Sat, 28 Mar 2015 00:15:40 +0100 Subject: Fix Tests Now they are green again locally --- .../geocaching/connector/gc/GCConstantsTest.java | 10 +- tests/src/cgeo/geocaching/test/mock/GC2CJPF.html | 4212 ++++++++++---------- 2 files changed, 2047 insertions(+), 2175 deletions(-) diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java index ef50709..066b3a9 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java @@ -11,8 +11,8 @@ import android.text.Html; public class GCConstantsTest extends AndroidTestCase { // adapt the following after downloading new mock html files - public static final String MOCK_LOGIN_NAME = "JoSaMaJa"; - public static final int MOCK_CACHES_FOUND = 484; + public static final String MOCK_LOGIN_NAME = "ra_sch"; + public static final int MOCK_CACHES_FOUND = 1298; public static void testLocation() { // GC37GFJ @@ -26,15 +26,15 @@ public class GCConstantsTest extends AndroidTestCase { } public static void testCacheCount() { - assertCacheCount(1510, " 1.510 Caches Found"); - assertCacheCount(1510, " 1,510 Caches Found"); + assertCacheCount(1510, "1.510 Finds"); + assertCacheCount(1510, "1,510 Finds"); assertCacheCount(MOCK_CACHES_FOUND, MockedCache.readCachePage("GC2CJPF")); } private static void assertCacheCount(final int count, final String html) { try { assertEquals(count, Integer.parseInt(TextUtils.getMatch(html, GCConstants.PATTERN_CACHES_FOUND, true, "0").replaceAll("[,.]", ""))); - } catch (NumberFormatException e) { + } catch (final NumberFormatException e) { fail(); } } diff --git a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.html b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.html index ea96e8c..432ee5a 100644 --- a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.html +++ b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.html @@ -4,23 +4,19 @@ GC2CJPF Kinderwald KiC (Multi-cache) in Niedersachsen, Germany created by Tom03 - - - + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + -
+
- - - + + +
- + - - - - + + + + - - - - - -
-

- Geocaching.com -

-
-
-
-
-

- - Geocaching - -

-
- -
-

- -

-

- - Hello, JoSaMaJa (Sign Out)
- Premium Member - - - 484 Caches Found - -

-
-
-
-
- -
+ -
- -
- - - - -
- - - x -
- - -
-
-

- Multi-cache -

- -

- Kinderwald KiC -

-
-
- A cache by Tom03 -
-
- Hidden - : - 2010-07-31 - -
-
- -
-
-
-
- -
-
- Difficulty:
-
- 2.5 out of 5 -
-
-
-
- Terrain:
-
- 2 out of 5 -
-
- -
-
- -

- Size: Size: small (small) +

+

+ Geocaching.com

- +
-
- - -
- -
- - 22 - - Favorites -
+
+
+

+ -
- -

+
+ +
+
- - -
- -

- Related Web Page - -

- - - -
-
-
-

- - - N 52° 25.504 E 009° 39.852 - -
- - UTM: 32U E 545164 N 5808524
-
- Other Conversions -

-
-
- In Niedersachsen, Germany
- N N 23.5 km from your home location -
-
- -
- -
- - Please note - - Use of geocaching.com services is subject to the terms and conditions in our disclaimer. -
- - -
- - Personal Cache Note - - - - - +
+ +
+
+ +
+ + + + +
+ + + x +
+ + + +
+ +
+

+ Multi-cache +

+ +

+ Kinderwald KiC +

+
+
+ A cache by Tom03 +
+
+ Hidden + : + 2010-07-31 + +
+
+ +
+
+
+
+ +
+
+ Difficulty:
+
+ 2.5 out of 5 +
+
+
+
+ Terrain:
+
+ 2 out of 5 +
+
+ +
+
+ +

+ Size: Size: small (small) +

+ +
+
+ + + + + +
+ +

+ + Related Web Page + +

+ + + +
+
+
+

+ + + N 52° 25.504 E 009° 39.852 + +
+ + UTM: 32U E 545164 N 5808524
+
+ Other Conversions +

+
+
+ In Niedersachsen, Germany
+ N N 308.9 km from your home location +
+
+ +
+ +
+ + Please note + + Use of geocaching.com services is subject to the terms and conditions in our disclaimer. +
+ + +
+ + Personal Cache Note + + + + +
+ +

Geocache Description:

+
+ Von Nachwuchs-Cachern für Nachwuchs-Cacher. - - -
- -
-
- + + +
+ +
+
+ Kleiner Multi über 7 Stationen. Länge ca. 1 km + 1km für den Rückweg. Die ZS befinden sich alle am KLEINEN BACH innerhalb des Kinderwaldes. Die Fragen müssen nicht in der aufgeführten Reihenfolge beantwortet werden, ihr könnt auch mit der letzten Frage anfangen !

Nähere Infos zum Kinderwald gibt es unter www.kinderwald.de
@@ -619,916 +530,856 @@ F=H+A-B-C

Viel Spaß !

-P.S. An warmen Tagen Badesachen und Handtuch mitnehmen.
- -
- -

- - -

-

- - Additional Hints - (Decrypt)

- Qnf Svany vfg hagre Fgrvara
-

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)

-
-
-
- -
- - -
- - -
- - Log your visit - - -
- - - - -
-
- - - -
- -

- Attributes -

- - -
- - +P.S. An warmen Tagen Badesachen und Handtuch mitnehmen. + +
+ +

+ + +

+

+ + Additional Hints + (Decrypt)

+ Qnf Svany vfg hagre Fgrvara
+

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)

+
+
+
+ +
+ + +
+ + +
+ + Log your visit + + + +
+ + + + +
+
+ + + +
+ +

+ Attributes +

+ + +
+ +
- - + + -
+
- -

+ +

Advertising with Us

-
-
-
- - - - -
- -

- Inventory -

-
- - +
+
+
+ + + + +
+ +

+ Inventory +

+
+ +
- -

There are no Trackables in this cache.

- -
- - - -
- - -
- - -
- -

Bookmark Lists

-
- - - - -

- View all bookmark lists... -

- -
- - -
- - - - -
- -

My Bookmark Lists

-
- - - - -

- -

- -
- - -
- - - - -
- - -
- -

- Additional Waypoints 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -   - -   - - Prefix - - Lookup - - Name - - Coordinate - -   -
- - - Hide Coordinates - - Final Location - - - FN - - FINAL - - GC2CJPF Final (Final Location) - - ???  - - -   -   - - -
-   - - Note: - - -
- - - Visible - - Parking Area - - - PK - - PARKNG - - GC2CJPF Parking (Parking Area) - - N 52° 25.384 E 009° 39.023  - - -   -   - - -
-   - - Note: - - Kein "offizieller" Parkplatz, Parken trotzdem möglich. -
- - - Visible - - Question to Answer - - - ST - - START - - GC2CJPF Start (Question to Answer) - - N 52° 25.504 E 009° 39.852  - - -   -   - - -
-   - - Note: - - -
- - - Visible - - Reference Point - - - WO - - SCENIC - - Aussichtspunkt (Reference Point) - - N 52° 25.488 E 009° 39.432  - - -   -   - - -
-   - - Note: - - Ehemalige Finallocation wo es gebrannt hat. Gleichzeitig netter Aussichtspunkt. -
- -

- - | - Show Hidden Waypoints - Hide Hidden Waypoints -

- - - -

+ +

There are no Trackables in this cache.

+ +
+ + + +
+ + +
+ + +
+

+ Bookmark Lists +

+ +
+ + + + +
+ + +
+ +

+ Additional Waypoints 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +   + +   + + Prefix + + Lookup + + Name + + Coordinate + +   +
+ + + Hide Coordinates + + Final Location + + + FN + + FINAL + + GC2CJPF Final (Final Location) + + ???  + + +   +   + + +
+   + + Note: + + +
+ + + Visible + + Parking Area + + + PK + + PARKNG + + GC2CJPF Parking (Parking Area) + + N 52° 25.384 E 009° 39.023  + + +   +   + + +
+   + + Note: + + Kein "offizieller" Parkplatz, Parken trotzdem möglich. +
+ + + Visible + + Virtual Stage + + + ST + + START + + GC2CJPF Start (Virtual Stage) + + N 52° 25.504 E 009° 39.852  + + +   +   + + +
+   + + Note: + + +
+ + + Visible + + Reference Point + + + WO + + SCENIC + + Aussichtspunkt (Reference Point) + + N 52° 25.488 E 009° 39.432  + + +   +   + + +
+   + + Note: + + Ehemalige Finallocation wo es gebrannt hat. Gleichzeitig netter Aussichtspunkt. +
+ +

+ + | + Show Hidden Waypoints + Hide Hidden Waypoints +

+ + + +

- -
- -
- -
-
- To print the map in Firefox and Opera, enable background images in the print dialog. - - Close - -
-
+ +
+ +
+ +
+
+ To print the map in Firefox and Opera, enable background images in the print dialog. + + Close + +
+
-
- -

- Find... -
- -

- -

- For online maps... -

- - - +
+ +

+ Find... +
+ +

+ +

+ For online maps... +

+ + + + + +
    + +
+ +
+

+ 218 Logged Visits +

+ +

Found it 195     Didn't find it 4     Write note 8     Temporarily Disable Listing 2     Enable Listing 2     Publish Listing 1     Needs Maintenance 3     Owner Maintenance 3     

+

+ View Logbook | View the Image Gallery of 21 images +

+

+ **Warning! Spoilers may be included in the descriptions or links. +

+
+ +
+ + + + + + + + +
+ + +
+
+

+ + Current Time:
Last Updated: on 02/08/2015 10:40:31 (UTC-08:00) Pacific Time (US & Canada) (18:40 GMT)
Rendered From:Unknown
Coordinates are in the WGS84 datum +
+

+
- -
    - -
- -
-

- 171 Logged Visits -

- -

Found it 151     Didn't find it 3     Write note 7     Temporarily Disable Listing 2     Enable Listing 2     Publish Listing 1     Needs Maintenance 2     Owner Maintenance 3     

-

- View Logbook | View the Image Gallery of 17 images -

-

- **Warning! Spoilers may be included in the descriptions or links. -

-
- -
- - - - - - - - -
- - -
-
-

- - Current Time:
Last Updated: on 08/05/2013 08:44:42 Pacific Daylight Time (15:44 GMT)
Rendered From:Unknown
Coordinates are in the WGS84 datum -
-

-
- -
- -
-
-
-
-
+
+ +
+ +
- -
-
-

- - About -

- -
-
-

- - Press -

- -
-
-

- - Questions & Suggestions -

- -
-
-

- - Resources + + +

-
-
-

- Copyright - © 2000-2013 - Groundspeak, Inc. - All Rights Reserved. - Groundspeak Terms of Use - | - Privacy Policy -

-
+ +
+ +
+ - -
- + + + - - + + - $.ajax({ - type: "POST", - cache: false, - url: '/datastore/favorites.svc/update?u=' + userToken + '&f=false', - success: function () { - canUpdateFavoriteStatus = true; - gotScore = false; - showFavoriteScore(); - } - }); - - return false; - } - }); - - $(function () { - - // CSP Section - if ($("#cspMessage").length) { - - var editLink = $('a[href*="report.aspx"]').attr('href'); - - $("#cspMessage").prepend('

Please take a moment to check the listing and ensure it is ready to enable. Clicking "Submit for Review" will enable your cache page.

'); - $("#cspMessage").prepend('

Once it is enabled, you will receive a confirmation email that it was successfully submitted. It is peak season for cache placement. Your volunteer reviewer will strive to begin the review process within the next 7 days.

'); - $("#cspMessage").prepend('

Your cache page has not been reviewed yet. It will not appear in the review queue until you enable it.

'); - - $("#cspGoBack").click(function (e) { - e.preventDefault(); - window.location = editLink; - return false; - }); - - $("#cspSubmit").click(function (e) { - e.preventDefault(); - $.pageMethod("/seek/cache_details.aspx/EnableCSPCache", JSON.stringify({ dto: { ut: userToken } }), function (r) { - var r = JSON.parse(r.d); - if (r.success == true) { - window.location = '/seek/cache_details.aspx?guid=' + r.guid; - } else { - alert("There was an error enabling your cache."); - } - }); - return false; - }); - - $("#cspConfirm").change(function() { - if ($("#cspConfirm").is(":checked")) { - $("#cspSubmit").removeAttr('disabled'); - $("#cspGoBack").attr('disabled', true); - } else { - $("#cspSubmit").attr('disabled', true); - $("#cspGoBack").removeAttr('disabled'); - } - }); - } - - - //override coords - if (typeof(userDefinedCoords) != "undefined") { - if (userDefinedCoords.status == "success" && userDefinedCoords.data.isUserDefined == true) { - mapLatLng = $.extend({}, mapLatLng, userDefinedCoords.data); - $("#uxLatLon") - .data("isOverridden", true) - .addClass("myLatLon"); - } else if (userDefinedCoords.status == "success") { - mapLatLng = $.extend({}, mapLatLng, userDefinedCoords.data); - } else { - $("#uxLatLonLink").contents().unwrap(); - } - } else { - $("#uxLatLonLink").contents().unwrap(); - } - - - var cacheNoteText = { - DefaultText: 'Click to enter a note', - ErrorInSaving: 'There was an error saving page. Please refresh the page and try again.', - SavingText: 'Please wait, saving your note...' - }; - - - $("time.timeago").timeago(); - - $(".button").button(); - - var sn = Cookie.get('sn'); - - if ($('#trNotPM').length > 0) { - $('#trNotPM').toggle(!sn); - } - - $("#cache_note").editInPlace({ - callback: function (unused, enteredText) { - var me = $(this); - - var et = $.trim(enteredText); - if (et.length > 500 ) { - et = et.substr(0, 500); - } - $.pageMethod("/seek/cache_details.aspx/SetUserCacheNote", JSON.stringify({ dto: { et: et, ut: userToken} }), function (r) { - var r = JSON.parse(r.d); - if (r.success == true) { - if ($.trim(r.note) == "") { - $("#cache_note").text(cacheNoteText.DefaultText); - } else { - $("#cache_note").text(r.note); - } - - me.effect('highlight', { color: '#ffb84c' }, 'slow'); - } else { - alert(cacheNoteText.ErrorInSaving); - $("#cache_note").text(cacheNoteText.DefaultText); - } - - }); - - return cacheNoteText.SavingText; - } - , default_text: cacheNoteText.DefaultText - , field_type: "textarea" - , textarea_rows: "7" - , textarea_cols: "65" - , show_buttons: true - , bg_over: "#dad7cb" - //, callback_skip_dom_reset: true - - }); - - $("#lnk_slippyMap").click(function(e) { - e.preventDefault(); - loadDynamicMap(); - return false; - }); - - $(".inplace_field").live("focus", function () { - if ($(this).data("created") == null) { - $(this).data("created", true) - $(this).countable({ - maxLength: 500 - }); - } - }); - - $("#pcn_help").qtip({ - content: 'Enter your own notes here. No other user will be able to access them.', - position: { - my: 'top center', - at: 'bottom center' - }, - style: { - classes: 'ui-tooltip-dark ui-tooltip-rounded pcn-tooltip' - }, - }); - $("a.decrypt-link").html(decryptLogs ? locString.encrypt : locString.decrypt); - - if ($("#cache_logs_container").length > 0) { - - appendNewLogs(initalLogs); - - if (DetectMobileQuick()) { - $("#pnlButtonLoad") - .show() - .find("a.MobileButton") - .click(function (e) { - e.preventDefault(); - callLogLoad(false); - return false; - }) - .button(); - if(!DetectTierTablet()){ - $("a.MobileButton").addClass("Phone"); - } - } else { - $("#pnlLazyLoad").show(); - - $(window).endlessScroll({ - fireOnce: true, - fireDelay: 500, - bottomPixels: ($(document).height() - $("#cache_logs_container").offset().top) + 50, - ceaseFire: function(){ - // stop the scrolling if the last page is reached. - return (isLoggedIn == false) || (totalPages < currentPageIdx); - }, - callback: function() { - if (!isBusy) { - - isBusy = true; - $tfoot.show(); - callLogLoad(true); - } - } - }); - } - } - - if (!isLoggedIn) { - $("#cache_logs_table").find("tfoot").hide(); - } - - if (mapLatLng != null) { - - $("#uxLatLonLink").qtip({ - suppress:false, - content: buildCacheCoordMenu(), - position: { - my: 'left top', - at: 'right top', - adjust: { - x: 10, y: -10 - } - }, - show: { - ready: false, - event: "click", - solo: true - }, hide: { - event: 'unfocus' - }, - style: { - tip: { - corner: false - }, - classes: 'ui-tooltip-widget' - }, - events: { - show: function () { - if ($("#uxLatLon").data("isOverridden")) { - $("a.ccu-restore").show(); - } else { - $("a.ccu-restore").hide(); - } - - if (userDefinedCoords.status != "success") { - $("div.ccu-update").hide(); - } else { - $("div.ccu-update").show(); - } - } - } - }).click(function (e) { - e.preventDefault(); - return false; - }); - - setStaticMaps(); - //$("#staticMap").lazyload(); - } - }); - - function setStaticMaps() { - var llBounds = new L.LatLngBounds(); - - var map = new L.Map('map_preview_canvas', { - center: new L.LatLng(mapLatLng.lat, mapLatLng.lng), - zoom: 10, - doubleClickZoom: false, - dragging: false, - touchZoom: false, - scrollWheelZoom: false, - attributionControl: false - }) - .addControl(new L.Control.Attribution({ prefix: 'About our maps' })); - - var mapLarge = new L.Map('map_canvas', { - center: new L.LatLng(mapLatLng.lat, mapLatLng.lng), - zoom: 14, - doubleClickZoom: true, - dragging: true, - touchZoom: false, - scrollWheelZoom: false, - zoomControl: true, - attributionControl: false - }) - .addControl(new L.Control.Attribution({ prefix: 'About our maps' })) - .addControl(new L.Control.Scale()); - - llBounds.extend(new L.LatLng(mapLatLng.lat, mapLatLng.lng)); - - var tileOptions = { - tileUrl: "http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg", - name: "mpqosm", - alt: "MapQuest", - //attribution: "Tiles Courtesy of MapQuest , Map and map data © 2012 OpenStreetMap and contributors, CC-BY-SA. ", - subdomains: "1234", - tileSize: 256, - minZoom: 0, - maxZoom: 18 - }; - - map.addLayer(new L.TileLayer(tileOptions.tileUrl, tileOptions)); - mapLarge.addLayer(new L.TileLayer(tileOptions.tileUrl, tileOptions)); - - var pinIcon = L.Icon.extend({ - iconSize: new L.Point(20, 23), - iconAnchor: new L.Point(10,23), - shadowUrl: null - }); - - var mkA = new L.Marker(new L.LatLng(mapLatLng.lat, mapLatLng.lng), - { - icon: new pinIcon({iconUrl:'/images/wpttypes/pins/' + mapLatLng.type + '.png', iconAnchor: new L.Point(10,23)}), - title: mapLatLng.name - }) - .on("click", function () { - document.getElementById("uxlrgMap").scrollIntoView(true); - return false; - }); - - var mkA2 = new L.Marker(new L.LatLng(mapLatLng.lat, mapLatLng.lng), { - icon: new pinIcon({iconUrl:'/images/wpttypes/pins/' + mapLatLng.type + '.png', iconAnchor: new L.Point(10,23)}), - clickable: false, zIndexOffset:99, title: mapLatLng.name - }); - - map.addLayer(mkA); - mapLarge.addLayer(mkA2); - - $("#ctl00_ContentBody_uxNotesAboutPrinting").fancybox({ - overlayShow: false - }); - - if (cmapAdditionalWaypoints != null && cmapAdditionalWaypoints.length > 0) { - - for (var x = 0, len = cmapAdditionalWaypoints.length; x < len; x++) { - - var item = cmapAdditionalWaypoints[x], - ll = new L.LatLng(item.lat, item.lng), - marker = new L.Marker(ll, { - icon: new pinIcon({iconUrl:'/images/wpttypes/pins/' + item.type + '.png', iconAnchor: new L.Point(10,23)}), - title: item.name, - clickable:false - }); - - llBounds.extend(ll); - mapLarge.addLayer(marker); - } - var bz = mapLarge.getBoundsZoom(llBounds.pad(1.1)); - - mapLarge.setView(new L.LatLng(mapLatLng.lat, mapLatLng.lng), bz); - } - } - - var lnkDH = $('#ctl00_ContentBody_lnkDH'); - function dht() { - try { - $('#div_hint').html(convertROTStringWithBrackets($('#div_hint').html())); - var linkText = ((lnkDH.attr('title') == 'Decrypt') ? 'Encrypt' : 'Decrypt'); - lnkDH - .text(linkText) - .attr('title', linkText); - } catch (e) { - alert(e); - return false; - } - return false; - } - - function buildCacheCoordMenu() { - var curLatLng = new LatLon(mapLatLng.lat, mapLatLng.lng) - $.template( "tmplCacheCoordinateUpdate_CoordItem", "${t}${v}" ); - - var $menu = $("
"); - - $( "#tmpl_CacheCoordinateUpdate" ).tmpl( { - ll: [mapLatLng.lat, mapLatLng.lng], - ll_formatted: mapLatLng.oldLatLngDisplay - } ).appendTo( $menu ); - - $menu.find("button.ccu-button").button(); - - $menu.delegate("button.ccu-parse", "click", function (e) { - e.preventDefault(); - var $this = $(e.target), - $parse =$this.closest('dd').find(".cc-parse-text"), - parseCoords = $.trim($parse.val()); - - if (parseCoords.length == 0) { - alert('Please provide valid coordinates.'); - } else { - $.getJSON("/api/geocode", { parse: parseCoords}, function (response) { - if (response.status == "success") { - var newLatLng = new LatLon(response.data.lat, response.data.lng); - - // update the displayed coords - var dist = curLatLng.rhumbDistanceTo(newLatLng); - var bearingTo = curLatLng.rhumbBearingTo(newLatLng); - var bearing = bearingTo >= 0 || bearingTo < 22.5 ? "N" : bearingTo >= 22.5 || bearingTo < 67.5 ? "NE" : bearingTo >= 67.5 || bearingTo < 112.5 ? "E" : bearingTo >= 112.5 || bearingTo < 157.5 ? "SE" : bearingTo >= 157.5 || bearingTo < 202.5 ? "S" : bearingTo >= 202.5 || bearingTo < 247.5 ? "SW" : bearingTo >= 247.5 || bearingTo < 292.5 ? "W" : bearingTo >= 292.5 || bearingTo < 337.5 ? "NW" : "N"; - - var formats = response.data.formats; - // all these finds, make me feel dirty - $menu - .find("span.ccu-parseverify-coords").text(formats.DM).end() - .find("dl.ccu-parse").hide().end() - .find("dl.ccu-parseverify").show().end() - .find("button.ccu-parseverify-accept") - .data("utm", '') - .data("dm", formats.DM) - .data("lat", response.data.lat) - .data("lng", response.data.lng) - .end(); - } else { - alert("Sorry unable to parse the coordinates you entered."); - } - }); - } - - return false; - }); - - $menu.delegate("button.ccu-parseverify-accept", "click", function (e) { - e.preventDefault(); - var $this = $(this); - // update to webmethod - $.pageMethod("/seek/cache_details.aspx/SetUserCoordinate", JSON.stringify({ dto: { data: {lat: $this.data("lat"), lng: $this.data("lng") }, ut: userToken } }), function (r) { - var r = JSON.parse(r.d); - if (r.status == "success") { - window.location.reload(); - } else { - $("#uxLatLonLink").qtip('hide'); - } - - }); - - return false; - }); - - $menu.delegate("button.ccu-parseverify-cancel", "click", function (e) { - e.preventDefault(); - $menu - .find("input.cc-parse-text").val('').end() - .find("dl.ccu-parse").show().end() - .find("dl.ccu-parseverify").hide().end(); - return false; - }); - - $menu.delegate("a.ccu-restore", "click", function (e) { - e.preventDefault(); - - $.pageMethod("/seek/cache_details.aspx/ResetUserCoordinate", JSON.stringify({ dto: { ut: userToken } }), function (r) { - var r = JSON.parse(r.d); - if (r.status == "success") { - window.location.reload(); - } - }); - - return false; - }); - - return $menu; - } - - GSPK = window.GSPK || {}; - GSPK.Selector = {}; - GSPK.Selector.getSelected = function(){ - var t = null; - if ( window.getSelection ){ - t = window.getSelection(); - }else if(document.getSelection){ - t = document.getSelection(); - }else if(document.selection){ - t = document.selection.createRange().text; - } - return t; - } - //--> - - - - - - -
- - - -
- - + (function () { + var elem = document.createElement('script'); + + elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; + elem.async = true; + elem.type = "text/javascript"; + var scpt = document.getElementsByTagName('script')[0]; + scpt.parentNode.insertBefore(elem, scpt); + })(); + + + + + + -- cgit v1.1