[#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:
Rufus Pollock
2012-01-06 18:57:16 +00:00
parent 48dcdd31b0
commit f8cbb60bf6
4 changed files with 18 additions and 20 deletions

View File

@@ -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) {

View File

@@ -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; ">&nbsp;</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: {