/edit/ should work

This commit is contained in:
Sanj 2012-08-14 19:37:26 +05:30
parent 71d4a919b2
commit 8ce41032c5
4 changed files with 11 additions and 5 deletions

View File

@ -150,7 +150,7 @@ map.addLayer(drawnItems);
var wmsLayers = {};
wmsLayers['Test Warped Map'] = L.tileLayer.wms("http://mapwarper.net/maps/wms/336", {
'format': 'image/png'
});//.addTo(map);
}).addTo(map);
var baseLayers = {
'OpenStreetMap': cloudmade,
@ -236,8 +236,9 @@ $(function() {
var val = $(this).val();
for (wmsLayer in wmsLayers) {
if (wmsLayers.hasOwnProperty(wmsLayer)) {
wmsLayers[wmsLayer].setOpacity(val / 10);
wmsLayers[wmsLayer].setOpacity(val);
}
}
});
});

View File

@ -9,11 +9,16 @@ def index(request):
def edit(request, ctype_id):
ctypes = []
content_type_id = int(ctype_id)
for c in ContentType.objects.all():
if hasattr(c.model_class(), 'is_openmumbai_model'):
ctypes.append(c)
try:
content_type_id = int(ctype_id)
except:
content_type_id = ctypes[0].id
context = RequestContext(request, {
'ctypes': ctypes,
'content_type_id': content_type_id

View File

@ -53,7 +53,7 @@ CONTENT_TYPE_ID = {{ content_type_id }};
</option>
{% endfor %}
</select> <br />
Overlay Opacity: <input type="range" min="0" max="10" value="10" id="opacityRange" />
Overlay Opacity: <input type="range" min="0" max="1" step="0.1" value="1" id="opacityRange" />
<ul id="itemsList">
</ul>
<div id="itemInfo">

View File

@ -15,7 +15,7 @@ urlpatterns = patterns('',
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^$', 'places.views.index', name='index'),
url(r'^geojson/(?P<ctype_id>[0-9]+)$', 'base.views.geojson', name='geojson'),
url(r'^edit/(?P<ctype_id>[0-9]+)$', 'places.views.edit', name='edit'),
url(r'^edit/(?P<ctype_id>[0-9]*)$', 'places.views.edit', name='edit'),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)