Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
19b81cfb
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
19b81cfb
编写于
6月 28, 2011
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Textbox to enter project/system description is now syntax-highlighted.
上级
e5ac7770
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
40 addition
and
8 deletion
+40
-8
changelog.html
changelog.html
+2
-0
core/pom.xml
core/pom.xml
+1
-1
core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly
...es/hudson/model/AbstractModelObject/descriptionForm.jelly
+2
-1
core/src/main/resources/hudson/model/AbstractModelObject/editDescription.jelly
...es/hudson/model/AbstractModelObject/editDescription.jelly
+2
-1
core/src/main/resources/hudson/model/Hudson/configure.jelly
core/src/main/resources/hudson/model/Hudson/configure.jelly
+2
-1
core/src/main/resources/lib/form/textarea.jelly
core/src/main/resources/lib/form/textarea.jelly
+18
-2
war/src/main/webapp/scripts/hudson-behavior.js
war/src/main/webapp/scripts/hudson-behavior.js
+13
-2
未找到文件。
changelog.html
浏览文件 @
19b81cfb
...
...
@@ -57,6 +57,8 @@ Upcoming changes</a>
<ul
class=
image
>
<li
class=
rfe
>
Groovy script console is now syntax highlighted.
<li
class=
rfe
>
Text area to enter description is now syntax highlighted.
</ul>
</div>
<!--=TRUNK-END=-->
...
...
core/pom.xml
浏览文件 @
19b81cfb
...
...
@@ -392,7 +392,7 @@ THE SOFTWARE.
<dependency>
<groupId>
org.kohsuke.stapler
</groupId>
<artifactId>
stapler-adjunct-codemirror
</artifactId>
<version>
1.
0
</version>
<version>
1.
1
</version>
</dependency>
<dependency>
<!-- this helps us see the source code of the control while we edit Jenkins. -->
<groupId>
org.kohsuke.stapler
</groupId>
...
...
core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly
浏览文件 @
19b81cfb
...
...
@@ -34,7 +34,8 @@ THE SOFTWARE.
<form action="submitDescription" method="post">
<table>
<f:entry help="${app.markupFormatter.helpUrl}">
<f:textarea name="description" value="${it.description}" />
<f:textarea name="description" value="${it.description}"
codemirror-mode="htmlmixed" codemirror-config="mode:'text/html'"/>
</f:entry>
</table>
<div align="right">
...
...
core/src/main/resources/hudson/model/AbstractModelObject/editDescription.jelly
浏览文件 @
19b81cfb
...
...
@@ -33,7 +33,8 @@ THE SOFTWARE.
<form action="submitDescription" method="post">
<table>
<f:entry help="${app.markupFormatter.helpUrl}">
<f:textarea name="description" value="${it.description}" />
<f:textarea name="description" value="${it.description}"
codemirror-mode="htmlmixed" codemirror-config="mode:'text/html'"/>
</f:entry>
</table>
<f:submit value="${%Submit}" />
...
...
core/src/main/resources/hudson/model/Hudson/configure.jelly
浏览文件 @
19b81cfb
...
...
@@ -39,7 +39,8 @@ THE SOFTWARE.
${it.rootDir}
</f:entry>
<f:entry title="${%System Message}" help="/help/system-config/systemMessage.html">
<f:textarea name="system_message" value="${it.systemMessage}" />
<f:textarea name="system_message" value="${it.systemMessage}"
codemirror-mode="htmlmixed" codemirror-config="mode:'text/html'" />
</f:entry>
<f:entry title="${%# of executors}" field="numExecutors">
<f:textbox />
...
...
core/src/main/resources/lib/form/textarea.jelly
浏览文件 @
19b81cfb
...
...
@@ -51,15 +51,31 @@ THE SOFTWARE.
If @field is specified, this will be inferred automatically,
which is the recommended approach.
</st:attribute>
<st:attribute name="codemirror-mode">
Turns this text area into CodeMirror-assisted code editing text area.
This attribute specifies the mode of CodeMirror, such as "text/x-java".
See http://codemirror.net/ for more details.
</st:attribute>
<st:attribute name="codemirror-config">
Specifies additional key/value pairs in the JSON format (except the start and end bracket)
to be passed as CodeMirror option object.
</st:attribute>
</st:documentation>
<f:prepareDatabinding />
<j:set var="value" value="${attrs.value ?: instance[attrs.field] ?: attrs.default}" />
<j:if test="${attrs['codemirror-mode']!=null}">
<st:adjunct includes="
org.kohsuke.stapler.codemirror.mode.${attrs['codemirror-mode']}.${attrs['codemirror-mode']},
org.kohsuke.stapler.codemirror.theme.default"/>
</j:if>
<textarea id="${attrs.id}" style="${attrs.style}"
name ="${attrs.name ?: '_.'+attrs.field}"
class="setting-input ${attrs.checkUrl!=null?'validated':''} ${attrs.class}"
class="setting-input ${attrs.checkUrl!=null?'validated':''} ${attrs
['codemirror-mode']!=null?'codemirror':''} ${attrs
.class}"
checkUrl="${attrs.checkUrl}"
rows="${h.determineRows(value)}">
rows="${h.determineRows(value)}"
codemirror-mode="${attrs['codemirror-mode']}"
codemirror-config="${attrs['codemirror-config']}">
<st:out value="${value}" />
</textarea>
<!-- resize handle -->
...
...
war/src/main/webapp/scripts/hudson-behavior.js
浏览文件 @
19b81cfb
...
...
@@ -723,6 +723,15 @@ var hudsonRules = {
e
=
null
;
// avoid memory leak
},
"
TEXTAREA.codemirror
"
:
function
(
e
)
{
var
h
=
e
.
clientHeight
;
var
config
=
e
.
getAttribute
(
"
codemirror-config
"
)
||
""
;
config
=
eval
(
'
({
'
+
config
+
'
})
'
);
var
w
=
CodeMirror
.
fromTextArea
(
e
,
config
).
getWrapperElement
();
w
.
setAttribute
(
"
style
"
,
"
border:1px solid black;
"
);
w
.
style
.
height
=
h
+
"
px
"
;
},
// deferred client-side clickable map.
// this is useful where the generation of <map> element is time consuming
"
IMG[lazymap]
"
:
function
(
e
)
{
...
...
@@ -1232,8 +1241,10 @@ function replaceDescription() {
{
onComplete
:
function
(
x
)
{
d
.
innerHTML
=
x
.
responseText
;
Behaviour
.
applySubtree
(
d
);
d
.
getElementsByTagName
(
"
TEXTAREA
"
)[
0
].
focus
();
evalInnerHtmlScripts
(
x
.
responseText
,
function
()
{
Behaviour
.
applySubtree
(
d
);
d
.
getElementsByTagName
(
"
TEXTAREA
"
)[
0
].
focus
();
});
}
}
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录