diff options
| author | Igor Minar | 2010-11-16 13:39:50 -0800 | 
|---|---|---|
| committer | Igor Minar | 2010-11-16 13:45:45 -0800 | 
| commit | 4af32de84a264e05eebfa6dbc09ce10fac1e1417 (patch) | |
| tree | 83dd60159ed27d183a6274be306b7891ef37588f | |
| parent | a130bb899d790dc11393276b34d59b2ddd5cc680 (diff) | |
| download | angular.js-4af32de84a264e05eebfa6dbc09ce10fac1e1417.tar.bz2 | |
docs should use ng:include onload
| -rw-r--r-- | docs/directive.template | 2 | ||||
| -rw-r--r-- | docs/doc_widgets.js | 4 | ||||
| -rw-r--r-- | docs/docs.js | 9 | ||||
| -rw-r--r-- | docs/formatter.template | 2 | ||||
| -rw-r--r-- | docs/index.html | 2 | ||||
| -rw-r--r-- | docs/overview.template | 2 | ||||
| -rw-r--r-- | docs/validator.template | 2 | ||||
| -rw-r--r-- | docs/widget.template | 2 | 
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> | 
