aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/directive.template2
-rw-r--r--docs/doc_widgets.js4
-rw-r--r--docs/docs.js9
-rw-r--r--docs/formatter.template2
-rw-r--r--docs/index.html2
-rw-r--r--docs/overview.template2
-rw-r--r--docs/validator.template2
-rw-r--r--docs/widget.template2
8 files changed, 8 insertions, 17 deletions
diff --git a/docs/directive.template b/docs/directive.template
index a3a11056..84b87ca7 100644
--- a/docs/directive.template
+++ b/docs/directive.template
@@ -35,5 +35,3 @@
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
-
-<script>SyntaxHighlighter.highlight();</script>
diff --git a/docs/doc_widgets.js b/docs/doc_widgets.js
index ed1dad8d..b119e326 100644
--- a/docs/doc_widgets.js
+++ b/docs/doc_widgets.js
@@ -54,10 +54,6 @@
} catch (e) {
alert(e);
}
-
- return function() {
- SyntaxHighlighter.highlight();
- };
});
function indent(text) {
diff --git a/docs/docs.js b/docs/docs.js
index 96fba9cc..99b2aa2f 100644
--- a/docs/docs.js
+++ b/docs/docs.js
@@ -1,7 +1,7 @@
SyntaxHighlighter['defaults'].toolbar = false;
-DocsController.$inject = ['$location', '$browser'];
-function DocsController($location, $browser) {
+DocsController.$inject = ['$location', '$browser', '$window'];
+function DocsController($location, $browser, $window) {
this.pages = NG_PAGES;
window.$root = this.$root;
@@ -26,6 +26,11 @@ function DocsController($location, $browser) {
return 'level-' + depth +
(page.name == this.getTitle() ? ' selected' : '');
};
+
+ this.afterPartialLoaded = function() {
+ $window.scroll(0,0);
+ SyntaxHighlighter.highlight();
+ };
}
diff --git a/docs/formatter.template b/docs/formatter.template
index b0871a2d..af95f729 100644
--- a/docs/formatter.template
+++ b/docs/formatter.template
@@ -31,5 +31,3 @@ var modelValue = angular.formatter.{{shortName}}.parse(userInputString);
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
-
-<script>SyntaxHighlighter.highlight();</script>
diff --git a/docs/index.html b/docs/index.html
index 31630474..f20a1a85 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -39,7 +39,7 @@
</div>
</div>
<div id="section">
- <ng:include src="getCurrentPartial()"></ng:include>
+ <ng:include src="getCurrentPartial()" onload="afterPartialLoaded()"></ng:include>
</div>
</div>
</body>
diff --git a/docs/overview.template b/docs/overview.template
index b05a9b1a..7af05ff4 100644
--- a/docs/overview.template
+++ b/docs/overview.template
@@ -13,5 +13,3 @@
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
-
-<script>SyntaxHighlighter.highlight();</script>
diff --git a/docs/validator.template b/docs/validator.template
index f7b4e888..63d17072 100644
--- a/docs/validator.template
+++ b/docs/validator.template
@@ -37,5 +37,3 @@ angular.validator.{{shortName}}({{paramFirst.name}}{{#paramRest}}{{^default}}, {
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
-
-<script>SyntaxHighlighter.highlight();</script>
diff --git a/docs/widget.template b/docs/widget.template
index 7ca3fcf4..4a20629e 100644
--- a/docs/widget.template
+++ b/docs/widget.template
@@ -37,5 +37,3 @@
<doc:scenario>{{{scenario}}}</doc:scenario>
</doc:example>
{{/example}}
-
-<script>SyntaxHighlighter.highlight();</script>