@@ -11,19 +11,14 @@ Spring.ProjectDocumentationWidget = function () {
11
11
var quickStartEl = $ ( '[data-download-widget-controls]' ) ;
12
12
var mavenWidgetEl = $ ( '.js-download-maven-widget' ) ;
13
13
var documentationEl = $ ( '.js-documentation-widget' ) ;
14
- var resourcesEl = $ ( '.project-sidebar-resource--wrapper' ) ;
15
14
16
15
var projectUrl = apiBaseUrl + "/project_metadata/" + projectId ;
17
16
var promise = Spring . loadProject ( projectUrl ) ;
18
- var coursesPromise = Spring . loadCourses ( "https://pivotallms.biglms.com/api/courses" ) ;
19
17
20
18
promise . then ( function ( project ) {
21
19
Spring . buildDocumentationWidget ( documentationEl , project ) ;
22
20
Spring . buildQuickStartWidget ( quickStartEl , mavenWidgetEl , project ) ;
23
21
} ) ;
24
- coursesPromise . then ( function ( courseware ) {
25
- Spring . buildCoursesWidget ( resourcesEl , courseware ) ;
26
- } ) ;
27
22
} ;
28
23
29
24
Spring . buildDocumentationWidget = function ( documentationEl , project ) {
@@ -34,17 +29,6 @@ Spring.buildDocumentationWidget = function (documentationEl, project) {
34
29
} ) . render ( ) ;
35
30
36
31
}
37
- Spring . buildCoursesWidget = function ( resourcesEl , courseware ) {
38
- if ( courseware . hasContent ) {
39
- var tpl = $ ( "#project-courses-widget-template" ) . text ( ) ;
40
- var view = new Spring . CoursesWidgetView ( {
41
- el : resourcesEl ,
42
- model : courseware ,
43
- template : $ ( "#project-courses-widget-template" ) . text ( )
44
- } ) ;
45
- view . render ( ) ;
46
- }
47
- }
48
32
Spring . buildQuickStartWidget = function ( quickStartEl , mavenWidgetEl , project ) {
49
33
new Spring . QuickStartSelectorView ( {
50
34
el : quickStartEl ,
@@ -63,13 +47,6 @@ Spring.loadProject = function (url) {
63
47
} ) ;
64
48
}
65
49
66
- Spring . loadCourses = function ( url ) {
67
- return $ . getJSON ( url )
68
- . then ( function ( data ) {
69
- return new Spring . Courseware ( data ) ;
70
- } ) ;
71
- }
72
-
73
50
Spring . Release = function ( data ) {
74
51
_ . extend ( this , data ) ;
75
52
}
@@ -86,15 +63,6 @@ Spring.Release.prototype = {
86
63
}
87
64
}
88
65
89
- Spring . Courseware = function ( data ) {
90
- this . courses = data [ "edu1" ] ;
91
- this . talks = data [ "eng1" ] ;
92
- this . hasCourses = this . courses != null ;
93
- this . hasTalks = this . talks != null ;
94
- this . hasContent = this . hasTalks || this . hasCourses ;
95
- return this ;
96
- } ;
97
-
98
66
Spring . Project = function ( data ) {
99
67
_ . extend ( this , data ) ;
100
68
var self = this ;
@@ -119,20 +87,6 @@ Spring.DocumentationWidgetView = Backbone.View.extend({
119
87
}
120
88
} ) ;
121
89
122
- Spring . CoursesWidgetView = Backbone . View . extend ( {
123
- initialize : function ( ) {
124
- this . template = _ . template ( this . options . template ) ;
125
- _ . bindAll ( this , "render" ) ;
126
- } ,
127
-
128
- render : function ( ) {
129
- this . $el . append (
130
- this . template ( this . model )
131
- ) ;
132
- return this ;
133
- }
134
- } ) ;
135
-
136
90
Spring . SnippetView = Backbone . View . extend ( {
137
91
initialize : function ( ) {
138
92
var snippetType = this . options . snippetType ;
0 commit comments