mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-20 02:29:37 +00:00
Revert "Display Pivotal Education related courseware"
This reverts commit bf15ee8a6d
.
This commit is contained in:
parent
bf15ee8a6d
commit
7d63246f6b
2 changed files with 0 additions and 66 deletions
|
@ -29,26 +29,6 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="project-courses-widget-template">
|
|
||||||
<h2>Related Courseware</h2>
|
|
||||||
{@ if(hasCourses) { @}
|
|
||||||
<h3 id="education">Pivotal Education</h3>
|
|
||||||
<ul>
|
|
||||||
{@ _.each(courses, function(course) { @}
|
|
||||||
<li><a href="{@= course.url @}">{@= course.name @}</a></li>
|
|
||||||
{@ }); @}
|
|
||||||
</ul>
|
|
||||||
{@ } @}
|
|
||||||
{@ if(hasTalks) { @}
|
|
||||||
<h3 id="talks">Engineering Talks</h3>
|
|
||||||
<ul>
|
|
||||||
{@ _.each(talks, function(talk) { @}
|
|
||||||
<li><a href="{@= talk.url @}">{@= talk.name @}</a></li>
|
|
||||||
{@ }); @}
|
|
||||||
</ul>
|
|
||||||
{@ } @}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/html" id="project-download-widget-controls-template">
|
<script type="text/html" id="project-download-widget-controls-template">
|
||||||
<div class="js-download-widget-selector">
|
<div class="js-download-widget-selector">
|
||||||
<select class='selector selectpicker'>
|
<select class='selector selectpicker'>
|
||||||
|
|
|
@ -11,19 +11,14 @@ Spring.ProjectDocumentationWidget = function () {
|
||||||
var quickStartEl = $('[data-download-widget-controls]');
|
var quickStartEl = $('[data-download-widget-controls]');
|
||||||
var mavenWidgetEl = $('.js-download-maven-widget');
|
var mavenWidgetEl = $('.js-download-maven-widget');
|
||||||
var documentationEl = $('.js-documentation-widget');
|
var documentationEl = $('.js-documentation-widget');
|
||||||
var resourcesEl = $('.project-sidebar-resource--wrapper');
|
|
||||||
|
|
||||||
var projectUrl = apiBaseUrl + "/project_metadata/" + projectId;
|
var projectUrl = apiBaseUrl + "/project_metadata/" + projectId;
|
||||||
var promise = Spring.loadProject(projectUrl);
|
var promise = Spring.loadProject(projectUrl);
|
||||||
var coursesPromise = Spring.loadCourses("https://pivotallms.biglms.com/api/courses");
|
|
||||||
|
|
||||||
promise.then(function (project) {
|
promise.then(function (project) {
|
||||||
Spring.buildDocumentationWidget(documentationEl, project);
|
Spring.buildDocumentationWidget(documentationEl, project);
|
||||||
Spring.buildQuickStartWidget(quickStartEl, mavenWidgetEl, project);
|
Spring.buildQuickStartWidget(quickStartEl, mavenWidgetEl, project);
|
||||||
});
|
});
|
||||||
coursesPromise.then(function(courseware) {
|
|
||||||
Spring.buildCoursesWidget(resourcesEl, courseware);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Spring.buildDocumentationWidget = function (documentationEl, project) {
|
Spring.buildDocumentationWidget = function (documentationEl, project) {
|
||||||
|
@ -34,17 +29,6 @@ Spring.buildDocumentationWidget = function (documentationEl, project) {
|
||||||
}).render();
|
}).render();
|
||||||
|
|
||||||
}
|
}
|
||||||
Spring.buildCoursesWidget = function (resourcesEl, courseware) {
|
|
||||||
if(courseware.hasContent) {
|
|
||||||
var tpl = $("#project-courses-widget-template").text();
|
|
||||||
var view = new Spring.CoursesWidgetView({
|
|
||||||
el: resourcesEl,
|
|
||||||
model: courseware,
|
|
||||||
template: $("#project-courses-widget-template").text()
|
|
||||||
});
|
|
||||||
view.render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Spring.buildQuickStartWidget = function (quickStartEl, mavenWidgetEl, project) {
|
Spring.buildQuickStartWidget = function (quickStartEl, mavenWidgetEl, project) {
|
||||||
new Spring.QuickStartSelectorView({
|
new Spring.QuickStartSelectorView({
|
||||||
el: quickStartEl,
|
el: quickStartEl,
|
||||||
|
@ -63,13 +47,6 @@ Spring.loadProject = function (url) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Spring.loadCourses = function (url) {
|
|
||||||
return $.getJSON(url)
|
|
||||||
.then(function(data) {
|
|
||||||
return new Spring.Courseware(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Spring.Release = function (data) {
|
Spring.Release = function (data) {
|
||||||
_.extend(this, data);
|
_.extend(this, data);
|
||||||
}
|
}
|
||||||
|
@ -86,15 +63,6 @@ Spring.Release.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spring.Courseware = function (data) {
|
|
||||||
this.courses = data["edu1"];
|
|
||||||
this.talks = data["eng1"];
|
|
||||||
this.hasCourses = this.courses != null;
|
|
||||||
this.hasTalks = this.talks != null;
|
|
||||||
this.hasContent = this.hasTalks || this.hasCourses;
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
Spring.Project = function (data) {
|
Spring.Project = function (data) {
|
||||||
_.extend(this, data);
|
_.extend(this, data);
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -119,20 +87,6 @@ Spring.DocumentationWidgetView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Spring.CoursesWidgetView = Backbone.View.extend({
|
|
||||||
initialize: function () {
|
|
||||||
this.template = _.template(this.options.template);
|
|
||||||
_.bindAll(this, "render");
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function () {
|
|
||||||
this.$el.append(
|
|
||||||
this.template(this.model)
|
|
||||||
);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Spring.SnippetView = Backbone.View.extend({
|
Spring.SnippetView = Backbone.View.extend({
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
var snippetType = this.options.snippetType;
|
var snippetType = this.options.snippetType;
|
||||||
|
|
Loading…
Reference in a new issue