Hi
How do I minimize a custom widget?
I have added an index.jelly page with content:
<?xml version="1.0" encoding="utf-8"?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"
xmlns:l="/lib/layout">
<l:pane width="2" title="Get a number">
<tr>
<td align="left">Number</td>
<td class="my-count" align="right">${it.number}</td>
</tr>
</l:pane>
<script>
var widget = <st:bind value="${it}"/>;
var upDateInterval = 1000;
window.setInterval(function() {
widget.getNumber(function(t) {
document.getElementsByClassName('my-count')[0].textContent =
t.responseObject();
})
},upDateInterval);
</script>
</j:jelly>
and my class:
@Extension(ordinal = 500)
public class MyWidget extends Widget {
private int x = 0;
@JavaScriptMethod
public int getNumber() {
x++;
return x;
}
}
When I press the minimize icon, nothing happens. Is there some code to add
for this feature to work?
Regards,
Joachim
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/39fac761-30f6-40bf-8ee9-76878fb734d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.