Skip to content

Commit

Permalink
Open311: removed trailing slash from API Urls and bugfixes on UI
Browse files Browse the repository at this point in the history
  • Loading branch information
stonaz committed Apr 9, 2014
1 parent 0b18d1a commit 60938c8
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
6 changes: 3 additions & 3 deletions nodeshot/open311/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
'service_discovery',
name='api_service_discovery'),

url(r'^open311/services.json/$',
url(r'^open311/services.json$',
'service_definition_list',
name='api_service_definition_list'),

url(r'^open311/services/(?P<service_type>[-\w]+).json/$',
url(r'^open311/services/(?P<service_type>[-\w]+).json$',
'service_definition_detail',
name='api_service_definition_detail'),

url(r'^open311/requests.json/$',
'service_request_list',
name='api_service_request_list'),

url(r'^open311/requests/(?P<service_code>[-\w]+)-(?P<request_id>[-\w]+).json/$',
url(r'^open311/requests/(?P<service_code>[-\w]+)-(?P<request_id>[-\w]+).json$',
'service_request_detail',
name='api_service_request_detail'),
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions nodeshot/ui/open311_demo/static/open311/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,11 @@ function populateOpen311Div(nodeSlug, create) {
var status = node.status;
var nodeLayer = node.layer;
var requestID = nodeSlug;
var url = window.__BASEURL__ + 'open311/request/' + nodeSlug

var tmplMarkup = $('#tmplOpen311Popup').html();
var compiledTmpl = _.template(tmplMarkup, {
service_request_id: requestID,
status: status,
url: url,
});
$(nodeDiv).append(compiledTmpl);
$(nodeDiv).on('click',function(){showRequestDetail(requestID,node)});
Expand Down
6 changes: 0 additions & 6 deletions nodeshot/ui/open311_demo/templates/open311.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ <h3><strong>Insert request details</strong></h3>
<script id="tmplOpen311Popup" type="text/template">
<strong>Request ID: </strong><%= service_request_id %><br>
<strong>Status: </strong><%= status %><br>
<!--<a href="<%= url %>">View details</a>-->
<button class="btn btn-success">View details</button>
</script>

Expand Down Expand Up @@ -197,11 +196,6 @@ <h3><strong>Insert request details</strong></h3>
<td style="width:15%"><%= dislikes %></td>
<td></td></tr>
</table>
<!--<div id="insert_vote" class="insert_vote">
<button id="likeButton">I like it</button>
<button id="unlikeButton">I don't</button>

</div>-->
<div id="vote_messages" class="thanks_messages"></div>
<div id="vote_error_messages" class="error_messages"></div>
</div>
Expand Down

0 comments on commit 60938c8

Please sign in to comment.