Skip to content

Commit

Permalink
Merge 2096767 into fcf50b9
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjur committed Apr 17, 2013
2 parents fcf50b9 + 2096767 commit d912e86
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions sandbox/sandbox/urls.py
Expand Up @@ -10,11 +10,16 @@

admin.autodiscover()

js_info_dict = {
'packages': ('stores',),
}

urlpatterns = patterns('',
url(r'^dashboard/stores/', include(dashboard_app.urls)),
url(r'^stores/', include(stores_app.urls)),
url(r'^', include(shop.urls)),
url(r'^admin/', include(admin.site.urls)),
url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
)


Expand Down
2 changes: 1 addition & 1 deletion stores/static/stores/js/dashboard.js
Expand Up @@ -147,7 +147,7 @@ stores.dashboard = {
latLng: pos
}, function (responses) {
if (!responses || responses.length < 0) {
alert("did not receive valid geo position");
alert(gettext("did not receive valid geo position"));
}
});
},
Expand Down
2 changes: 1 addition & 1 deletion stores/static/stores/js/stores.js
Expand Up @@ -45,7 +45,7 @@ var stores = (function(s, gmaps, o) {
};
navigator.geolocation.getCurrentPosition(success, error);
} else {
o.messages.error('Your location could not be determined');
o.messages.error(gettext('Your location could not be determined'));
}
});
},
Expand Down
5 changes: 5 additions & 0 deletions stores/templates/stores/partials/extrascripts.html
@@ -1,3 +1,8 @@
{% load staticfiles %}
<script type="text/javascript">
if(typeof gettext === 'undefined') {
jQuery.getScript('{% url django.views.i18n.javascript_catalog %}');
}
</script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=places"></script>
<script type="text/javascript" src="{% static "stores/js/stores.js" %}"></script>

0 comments on commit d912e86

Please sign in to comment.