[#14,refactor][s]: move dialog and notification out of demo/index.html and into DataExplorer view template.
* Believe these are the last items that tie us to demo/index.html but could be wrong!
This commit is contained in:
parent
48dcdd31b0
commit
f8cbb60bf6
@ -41,19 +41,6 @@
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div id="notification-container">
|
||||
<div id="notification">
|
||||
<img src="images/small-spinner.gif" class="notification-loader"><span id="notification-message">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog-overlay" style="display: none; z-index: 101; "> </div>
|
||||
<div class="dialog ui-draggable" style="display: none; z-index: 102; top: 101px; ">
|
||||
<div class="dialog-frame" style="width: 700px; visibility: visible; ">
|
||||
<div class="dialog-content dialog-border"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type='text/mustache' class="busyTemplate">
|
||||
<div id="loading-message">
|
||||
<img src="images/large-spinner.gif">
|
||||
|
||||
@ -173,7 +173,7 @@ a img {
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
#notification-container {
|
||||
.notification-container {
|
||||
width: 400px;
|
||||
left: 520px;
|
||||
display: none;
|
||||
@ -183,7 +183,7 @@ a img {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#notification {
|
||||
.notification {
|
||||
display: inline-block;
|
||||
margin: 0 auto;
|
||||
padding: 5px 8px 4px;
|
||||
|
||||
10
src/util.js
10
src/util.js
@ -153,11 +153,11 @@ var util = function() {
|
||||
|
||||
function notify( message, options ) {
|
||||
if (!options) var options = {};
|
||||
$('#notification-container').show();
|
||||
$('#notification-message').text(message);
|
||||
if (!options.loader) $('.notification-loader').hide();
|
||||
if (options.loader) $('.notification-loader').show();
|
||||
if (!options.persist) setTimeout(function() { $('#notification-container').hide() }, 3000);
|
||||
$('.data-explorer .notification-container').show();
|
||||
$('.data-explorer .notification-message').text(message);
|
||||
if (!options.loader) $('.data-explorer .notification-loader').hide();
|
||||
if (options.loader) $('.data-explorer .notification-loader').show();
|
||||
if (!options.persist) setTimeout(function() { $('.data-explorer .notification-container').hide() }, 3000);
|
||||
}
|
||||
|
||||
function formatMetadata(data) {
|
||||
|
||||
11
src/view.js
11
src/view.js
@ -25,6 +25,17 @@ my.DataExplorer = Backbone.View.extend({
|
||||
</ul> \
|
||||
</div> \
|
||||
<div class="data-view-container"></div> \
|
||||
<div class="dialog-overlay" style="display: none; z-index: 101; "> </div> \
|
||||
<div class="dialog ui-draggable" style="display: none; z-index: 102; top: 101px; "> \
|
||||
<div class="dialog-frame" style="width: 700px; visibility: visible; "> \
|
||||
<div class="dialog-content dialog-border"></div> \
|
||||
</div> \
|
||||
</div> \
|
||||
<div class="notification-container"> \
|
||||
<div class="notification"> \
|
||||
<img src="images/small-spinner.gif" class="notification-loader"><span class="notification-message">Loading...</span> \
|
||||
</div> \
|
||||
</div> \
|
||||
',
|
||||
|
||||
events: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user