提交 315bde60 编写于 作者: J Jesse Glick

[FIXED JENKINS-18119] Work around timing issue in sortable object.

Note that when workaround is active, table will not get sorted properly.
Probably OK since tables with large contents that *need* sorting probably take longer to finish rendering.
上级 8549e7b3
...@@ -58,6 +58,9 @@ Upcoming changes</a> ...@@ -58,6 +58,9 @@ Upcoming changes</a>
<li class=bug> <li class=bug>
User icon in People broken if Jenkins root URL unconfigured. User icon in People broken if Jenkins root URL unconfigured.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18118">issue 18118</a>) (<a href="https://issues.jenkins-ci.org/browse/JENKINS-18118">issue 18118</a>)
<li class=bug>
Progress bar sometimes broken in People.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18119">issue 18119</a>)
</ul> </ul>
</div><!--=TRUNK-END=--> </div><!--=TRUNK-END=-->
......
...@@ -44,7 +44,7 @@ import org.kohsuke.stapler.bind.JavaScriptMethod; ...@@ -44,7 +44,7 @@ import org.kohsuke.stapler.bind.JavaScriptMethod;
* (since it may be canceled if the user simply browses to another page while it is running). * (since it may be canceled if the user simply browses to another page while it is running).
* <ol> * <ol>
* <li>Write a {@code <script>} section defining {@code function display(data)}. * <li>Write a {@code <script>} section defining {@code function display(data)}.
* (Call {@code document.getElementById('someid').sortable.refresh()} if using a {@code sortable} table.) * (Call {@code var t = document.getElementById('someid'); if (t.sortable != null) t.sortable.refresh()} if using a {@code sortable} table.)
* <li>Use {@code <l:progressiveRendering handler="${it.something()}" callback="display"/>} from your * <li>Use {@code <l:progressiveRendering handler="${it.something()}" callback="display"/>} from your
* Jelly page to display a progress bar and initialize JavaScript infrastructure. * Jelly page to display a progress bar and initialize JavaScript infrastructure.
* (The callback attribute can take arbitrary JavaScript expression to be evaluated in the browser * (The callback attribute can take arbitrary JavaScript expression to be evaluated in the browser
......
...@@ -88,7 +88,9 @@ THE SOFTWARE. ...@@ -88,7 +88,9 @@ THE SOFTWARE.
} }
r.appendChild(d); r.appendChild(d);
p.sortable.refresh(); if (p.sortable != null) {
p.sortable.refresh();
}
} }
} }
</script> </script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册