diff --git a/src/scripts/tagged_assets.js b/src/scripts/tagged_assets.js
index 1c95fec..e06d80d 100644
--- a/src/scripts/tagged_assets.js
+++ b/src/scripts/tagged_assets.js
@@ -25,7 +25,7 @@
if (!node.picture) {
warnNoPicture();
} else {
- loadingBarShow();
+ $(window).trigger('pillar:workStart');
// TODO: show 'loading' thingy
$.get('/api/files/' + node.picture)
@@ -34,7 +34,6 @@
console.log(msg);
})
.done(function(resp) {
- loadingBarHide();
// Render the picture if it has the proper size.
var show_variation = null;
@@ -57,6 +56,9 @@
.attr('width', variation.width)
.attr('height', variation.height);
thumbnail_container.append(img);
+ })
+ .always(function(){
+ $(window).trigger('pillar:workStop');
});
}
diff --git a/src/templates/projects/view.pug b/src/templates/projects/view.pug
index 551c1f7..b3cb826 100644
--- a/src/templates/projects/view.pug
+++ b/src/templates/projects/view.pug
@@ -378,32 +378,34 @@ script.
function loadNodeContent(url, nodeId) {
- loadingBarShow();
+ var $projectContext = $('#project_context')
+ $projectContext.trigger('pillar:workStart')
$.get(url, function(dataHtml) {
// Update the DOM injecting the generate HTML into the page
- $('#project_context').html(dataHtml);
+ $projectContext.html(dataHtml);
})
.done(function(){
updateUi(nodeId, 'view');
})
.fail(function(dataResponse) {
- $('#project_context').html($(''));
+ $projectContext.html($(''));
$('#server_error').attr('src', url);
})
.always(function(){
- loadingBarHide();
+ $projectContext.trigger('pillar:workStop')
$('.button-edit-icon').addClass('pi-edit').removeClass('pi-spin spin');
});
}
function loadProjectContent(url) {
- loadingBarShow();
+ var $projectContext = $('#project_context')
+ $projectContext.trigger('pillar:workStart')
$.get(url, function(dataHtml) {
// Update the DOM injecting the generated HTML into the page
- $('#project_context').html(dataHtml);
+ $projectContext.html(dataHtml);
})
.done(function() {
updateUi('', 'view');
@@ -411,11 +413,11 @@ script.
addMenuDisable(['texture']);
})
.fail(function(dataResponse) {
- $('#project_context').html($(''));
+ $projectContext.html($(''));
$('#server_error').attr('src', url);
})
.always(function(){
- loadingBarHide();
+ $projectContext.trigger('pillar:workStop')
$('.button-edit-icon').addClass('pi-edit').removeClass('pi-spin spin');
});
}