Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
efcb224b
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
efcb224b
编写于
6月 17, 2015
作者:
B
Brian Clozel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Display Pivotal Education related courseware"
This reverts commit
c2665868
.
上级
c2665868
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
66 deletion
+0
-66
_includes/widget_templates.html
_includes/widget_templates.html
+0
-20
js/projectDocumentationWidget.js
js/projectDocumentationWidget.js
+0
-46
未找到文件。
_includes/widget_templates.html
浏览文件 @
efcb224b
...
...
@@ -29,26 +29,6 @@
<
/div
>
</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"
>
<
div
class
=
"
js-download-widget-selector
"
>
<
select
class
=
'
selector selectpicker
'
>
...
...
js/projectDocumentationWidget.js
浏览文件 @
efcb224b
...
...
@@ -11,19 +11,14 @@ Spring.ProjectDocumentationWidget = function () {
var
quickStartEl
=
$
(
'
[data-download-widget-controls]
'
);
var
mavenWidgetEl
=
$
(
'
.js-download-maven-widget
'
);
var
documentationEl
=
$
(
'
.js-documentation-widget
'
);
var
resourcesEl
=
$
(
'
.project-sidebar-resource--wrapper
'
);
var
projectUrl
=
apiBaseUrl
+
"
/project_metadata/
"
+
projectId
;
var
promise
=
Spring
.
loadProject
(
projectUrl
);
var
coursesPromise
=
Spring
.
loadCourses
(
"
https://pivotallms.biglms.com/api/courses
"
);
promise
.
then
(
function
(
project
)
{
Spring
.
buildDocumentationWidget
(
documentationEl
,
project
);
Spring
.
buildQuickStartWidget
(
quickStartEl
,
mavenWidgetEl
,
project
);
});
coursesPromise
.
then
(
function
(
courseware
)
{
Spring
.
buildCoursesWidget
(
resourcesEl
,
courseware
);
});
};
Spring
.
buildDocumentationWidget
=
function
(
documentationEl
,
project
)
{
...
...
@@ -34,17 +29,6 @@ Spring.buildDocumentationWidget = function (documentationEl, project) {
}).
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
)
{
new
Spring
.
QuickStartSelectorView
({
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
)
{
_
.
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
)
{
_
.
extend
(
this
,
data
);
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
({
initialize
:
function
()
{
var
snippetType
=
this
.
options
.
snippetType
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录