Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e522c25

Browse files
chore(docs): remove unused code
1 parent 5dbc2d6 commit e522c25

File tree

7 files changed

+16
-306
lines changed

7 files changed

+16
-306
lines changed

docs/app/assets/js/angular-bootstrap/bootstrap-prettify.js

-284
This file was deleted.

docs/app/src/app.js

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ angular.module('docsApp', [
1414
'tutorials',
1515
'versions',
1616
'bootstrap',
17-
'bootstrapPrettify',
1817
'ui.bootstrap.dropdown'
1918
])
2019

docs/app/src/tutorials.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
angular.module('tutorials', [])
22

3-
.directive('docTutorialNav', ['templateMerge' ,function(templateMerge) {
3+
.directive('docTutorialNav', function() {
44
var pages = [
55
'',
66
'step_00', 'step_01', 'step_02', 'step_03', 'step_04',
77
'step_05', 'step_06', 'step_07', 'step_08', 'step_09',
88
'step_10', 'step_11', 'step_12', 'the_end'
99
];
1010
return {
11-
compile: function(element, attrs) {
12-
var seq = 1 * attrs.docTutorialNav,
13-
props = {
14-
seq: seq,
15-
prev: pages[seq],
16-
next: pages[2 + seq],
17-
diffLo: seq ? (seq - 1): '0~1',
18-
diffHi: seq
19-
};
11+
scope: {},
12+
template:
13+
'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n' +
14+
'<a ng-href="http://angular.github.io/angular-phonecat/step-{{seq}}/app"><li class="btn btn-primary"><i class="glyphicon glyphicon-play"></i> Live Demo</li></a>\n' +
15+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{diffLo}}...step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
16+
'<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',
17+
link: function(scope, element, attrs) {
18+
var seq = 1 * attrs.docTutorialNav;
19+
scope.seq = seq;
20+
scope.prev = pages[seq];
21+
scope.next = pages[2 + seq];
22+
scope.diffLo = seq ? (seq - 1): '0~1';
23+
scope.diffHi = seq;
2024

2125
element.addClass('btn-group');
2226
element.addClass('tutorial-nav');
23-
element.append(templateMerge(
24-
'<a href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n' +
25-
'<a href="http://angular.github.io/angular-phonecat/step-{{seq}}/app"><li class="btn btn-primary"><i class="glyphicon glyphicon-play"></i> Live Demo</li></a>\n' +
26-
'<a href="https://github.com/angular/angular-phonecat/compare/step-{{diffLo}}...step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
27-
'<a href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>', props));
2827
}
2928
};
30-
}])
29+
})
3130

3231

3332
.directive('docTutorialReset', function() {
@@ -47,4 +46,4 @@ angular.module('tutorials', [])
4746
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}">GitHub</a>\n' +
4847
'</p>'
4948
};
50-
});
49+
});

docs/config/services/deployments/debug.js

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module.exports = function debugDeployment(getVersion) {
1919
'../angular-animate.js',
2020
'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js',
2121
'js/angular-bootstrap/bootstrap.js',
22-
'js/angular-bootstrap/bootstrap-prettify.js',
2322
'js/angular-bootstrap/dropdown-toggle.js',
2423
'components/lunr.js-' + getVersion('lunr.js') + '/lunr.js',
2524
'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js',

docs/config/services/deployments/default.js

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module.exports = function defaultDeployment(getVersion) {
1919
'../angular-animate.min.js',
2020
'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js',
2121
'js/angular-bootstrap/bootstrap.min.js',
22-
'js/angular-bootstrap/bootstrap-prettify.min.js',
2322
'js/angular-bootstrap/dropdown-toggle.min.js',
2423
'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js',
2524
'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js',

docs/config/services/deployments/jquery.js

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = function jqueryDeployment(getVersion) {
2323
'../angular-animate.min.js',
2424
'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js',
2525
'js/angular-bootstrap/bootstrap.min.js',
26-
'js/angular-bootstrap/bootstrap-prettify.min.js',
2726
'js/angular-bootstrap/dropdown-toggle.min.js',
2827
'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js',
2928
'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js',

docs/config/services/deployments/production.js

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module.exports = function productionDeployment(getVersion) {
2222
cdnUrl + '/angular-animate.min.js',
2323
'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js',
2424
'js/angular-bootstrap/bootstrap.min.js',
25-
'js/angular-bootstrap/bootstrap-prettify.min.js',
2625
'js/angular-bootstrap/dropdown-toggle.min.js',
2726
'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js',
2827
'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js',

0 commit comments

Comments
 (0)