[#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

@@ -41,19 +41,6 @@
--> -->
</div> </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; ">&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>
<script type='text/mustache' class="busyTemplate"> <script type='text/mustache' class="busyTemplate">
<div id="loading-message"> <div id="loading-message">
<img src="images/large-spinner.gif"> <img src="images/large-spinner.gif">

View File

@@ -173,7 +173,7 @@ a img {
top: -4px; top: -4px;
} }
#notification-container { .notification-container {
width: 400px; width: 400px;
left: 520px; left: 520px;
display: none; display: none;
@@ -183,7 +183,7 @@ a img {
text-align: center; text-align: center;
} }
#notification { .notification {
display: inline-block; display: inline-block;
margin: 0 auto; margin: 0 auto;
padding: 5px 8px 4px; padding: 5px 8px 4px;

View File

@@ -153,11 +153,11 @@ var util = function() {
function notify( message, options ) { function notify( message, options ) {
if (!options) var options = {}; if (!options) var options = {};
$('#notification-container').show(); $('.data-explorer .notification-container').show();
$('#notification-message').text(message); $('.data-explorer .notification-message').text(message);
if (!options.loader) $('.notification-loader').hide(); if (!options.loader) $('.data-explorer .notification-loader').hide();
if (options.loader) $('.notification-loader').show(); if (options.loader) $('.data-explorer .notification-loader').show();
if (!options.persist) setTimeout(function() { $('#notification-container').hide() }, 3000); if (!options.persist) setTimeout(function() { $('.data-explorer .notification-container').hide() }, 3000);
} }
function formatMetadata(data) { function formatMetadata(data) {

View File

@@ -25,6 +25,17 @@ my.DataExplorer = Backbone.View.extend({
</ul> \ </ul> \
</div> \ </div> \
<div class="data-view-container"></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: { events: {