Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
added loading bar for ajax call
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Apr 2, 2015
1 parent 7110747 commit 413816a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
17 changes: 16 additions & 1 deletion _sass/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,28 @@ a:hover {

}
option{
margin: 2px 0;
margin: 2px auto;
text-align: center;
}
.form-control:focus{
border:0;
box-shadow:none;
}

.hide{
display:none;
}
#loading{
background-image:url("../images/loader.gif");
background-size:cover;
position:fixed;
top:60%;
left:50%;
width:80px;
height:80px;
z-index:1030;
}

#map-view{
width:100vw;
height:400px;
Expand Down
Binary file added images/icon_dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<option value="routes">routes</option>
</select>
</span>
<span class="h2"> BY </span>
<span style="margin-left:10px" class="h2"> BY </span>
<span id="parameterMenu" class="btn-group dropdown h2">
<select class="form-control" id="parameter">
<option> </option>
Expand All @@ -30,8 +30,9 @@
<p class="run">
<button class="btn btn-med btn-default">RUN QUERY</button>
</p>
<div id="loading" class="hide"></div>
<div class="custom-popup" id="map-view"></div>
<div class="backgrid-container" id="results"></div>
<div class="backgrid-container white-text" id="results"></div>

</script>

Expand Down
5 changes: 3 additions & 2 deletions js/developer-playground.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
$(document).ready(function () {
$(document).ajaxStart(function() {
// start spinner, add style here
console.log("Start spinner here");
$("#loading").removeClass("hide");

})
$(document).ajaxComplete(function(event, request, settings) {
// stop spinner, add style here
$("#loading").addClass("hide");
console.log("Stop spinner here");
})
DeveloperPlayground.startQueryBuilderView = new DeveloperPlayground.StartQueryBuilderView();
Expand Down

0 comments on commit 413816a

Please sign in to comment.