diff --git a/css/style.css b/css/style.css index e9192b3e..b33e9b67 100755 --- a/css/style.css +++ b/css/style.css @@ -58,7 +58,7 @@ text-align: center; } -.documentslist .document { +.documentslist .document, .documentslist .progress { display: inline-block; height: 200px; width: 200px; @@ -67,6 +67,14 @@ vertical-align: top; border-radius: 5px; } + + +.documentslist .progress{ + position:absolute; + z-index:5; + background: #e8e8e8 url('%webroot%/core/img/loading.gif') 50% 50% no-repeat; +} + .documentslist .document:hover, .documentslist .document a:focus { background-color: #ddd; diff --git a/js/documents.js b/js/documents.js index 30c9d581..cdda91d6 100644 --- a/js/documents.js +++ b/js/documents.js @@ -86,6 +86,13 @@ var documentsMain = { $(document.body).removeClass('claro'); $('title').text(documentsMain.UI.mainTitle); }); + }, + showProgress : function(){ + $('.documentslist .progress').show(); + }, + + hideProgress : function(){ + $('.documentslist .progress').hide(); } }, @@ -283,10 +290,11 @@ var documentsMain = { if (documentsMain.isGuest){ return; } - + documentsMain.UI.showProgress(); jQuery.when(documentsMain.loadDocuments()) .then(function(){ documentsMain.renderDocuments(); + documentsMain.UI.hideProgress(); }); }, @@ -313,7 +321,7 @@ var documentsMain = { hasDocuments = false; //remove all but template - $('.documentslist .document:not(.template)').remove(); + $('.documentslist .document:not(.template,.progress)').remove(); jQuery.each(this._documents, function(i,document){ var docElem = $('.documentslist .template').clone(); diff --git a/templates/documents.php b/templates/documents.php index 9b179ec0..7c2f69e1 100755 --- a/templates/documents.php +++ b/templates/documents.php @@ -28,6 +28,8 @@ +
  • +