提交 937315a2 编写于 作者: K Kohsuke Kawaguchi

Delete button will highlight what it is going to delete

上级 d74ef278
......@@ -57,6 +57,8 @@ Upcoming changes</a>
<ul class=image>
<li class=rfe>
Slave status monitor page shows when the data is last obtained
<li class=rfe>
Delete button to highlight what it is going to delete.
<li class=rfe>
Breadcrumb is reworked to show descendants to provide additional navigational shortcuts.
(<a href="https://wiki.jenkins-ci.org/display/JENKINS/FOSDEM+UI+Enhancement+discussion+notes+2013">discussion</a>)
......
......@@ -119,10 +119,18 @@ Behaviour.specify("INPUT.repeatable-add", 'repeatable', 0, function(e) {
});
Behaviour.specify("INPUT.repeatable-delete", 'repeatable', 0, function(e) {
makeButton(e,function(e) {
var b = makeButton(e,function(e) {
repeatableSupport.onDelete(e.target);
});
e = null; // avoid memory leak
var be = $(b.get("element"));
be.on("mouseover",function() {
$(this).up(".repeated-chunk").addClassName("hover");
});
be.on("mouseout",function() {
$(this).up(".repeated-chunk").removeClassName("hover");
});
e = be = null; // avoid memory leak
});
// radio buttons in repeatable content
......
......@@ -808,6 +808,14 @@ TABLE.fingerprint-in-build TD {
/* ========================= repeatable elements ========================= */
.repeated-chunk {
border: 2px dashed transparent;
}
.repeated-chunk.hover {
border-color: #CCC;
}
.repeated-chunk .show-if-last { visibility: hidden; }
.repeated-chunk.last .show-if-last { visibility: visible; }
......@@ -966,12 +974,7 @@ TEXTAREA.rich-editor {
padding-left: 20px;
}
.hetero-list-container.with-drag-drop .repeated-chunk.hover {
border: 2px dashed #CCC;
}
.hetero-list-container.with-drag-drop .repeated-chunk {
border: 2px dashed transparent;
padding: 0.5em;
margin-top: 0.5em;
margin-bottom: 0.5em;
......
......@@ -470,6 +470,8 @@ function registerRegexpValidator(e,regexp,message) {
* button element
* @param onclick
* onclick handler
* @return
* YUI Button widget.
*/
function makeButton(e,onclick) {
var h = e.onclick;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册