aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src
diff options
context:
space:
mode:
authorIgor Minar2011-10-21 21:48:13 -0700
committerIgor Minar2011-10-22 21:32:47 -0700
commitce73ed091b13aeef03b2061623512b87307cd251 (patch)
tree0664231a22d5432c3ad783253e0aeba745e192c0 /docs/src
parent90ac8d57b0d5ef68cb70486edf0590fff225a284 (diff)
downloadangular.js-ce73ed091b13aeef03b2061623512b87307cd251.tar.bz2
feat(docs): add "Loading..." notification
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/templates/docs.css25
-rw-r--r--docs/src/templates/docs.js3
-rw-r--r--docs/src/templates/index.html2
3 files changed, 30 insertions, 0 deletions
diff --git a/docs/src/templates/docs.css b/docs/src/templates/docs.css
index c38252ff..4a2a7fb3 100644
--- a/docs/src/templates/docs.css
+++ b/docs/src/templates/docs.css
@@ -74,6 +74,31 @@ li {
/*----- Global Layout -----*/
+#loading {
+ position: fixed;
+ left: 50%;
+ margin: 1.5em -40px;
+ width: 80px;
+ padding: 0.2em 0.2em;
+ text-align: center;
+ font-weight: bold;
+ font-size: 13px;
+ color: #FFFFFF;
+ border: 1px solid black;
+ background-color: #7989D6;
+
+ -webkit-border-radius: 2px;
+ -moz-border-radius: 2px;
+ border-radius: 2px;
+
+ -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.6);
+ -moz-box-shadow: 0 2px 8px rgba(0,0,0,0.6);
+ box-shadow: 0 2px 8px rgba(0,0,0,0.6);
+
+ z-index: 2; /* just below #fader */
+}
+
+
#container {
width: 1150px;
margin: 0 auto;
diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js
index 40e05586..e91ef5c6 100644
--- a/docs/src/templates/docs.js
+++ b/docs/src/templates/docs.js
@@ -13,6 +13,7 @@ function DocsController($location, $browser, $window, $cookies) {
scope.subpage = false;
scope.offlineEnabled = ($cookies[OFFLINE_COOKIE_NAME] == angular.version.full);
scope.futurePartialTitle = null;
+ scope.loading = 0;
if (!$location.path() || INDEX_PATH.test($location.path())) {
$location.path('/api').replace();
@@ -25,6 +26,7 @@ function DocsController($location, $browser, $window, $cookies) {
scope.sectionId = parts[1];
scope.partialId = parts[2] || 'index';
scope.pages = angular.Array.filter(NG_PAGES, {section: scope.sectionId});
+ scope.loading++;
var i = scope.pages.length;
while (i--) {
@@ -69,6 +71,7 @@ function DocsController($location, $browser, $window, $cookies) {
};
scope.afterPartialLoaded = function() {
+ scope.loading--;
scope.partialTitle = scope.futurePartialTitle;
SyntaxHighlighter.highlight();
$window.scrollTo(0,0);
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index 083fe2ab..64513d58 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -111,6 +111,8 @@
</ul>
</div>
+ <div id="loading" ng:show="loading">Loading...</div>
+
<div id="content-panel">
<h2 ng:bind="partialTitle"></h2>