Reputation: 9461
I would like a modal Window
but NOT movable, and couldn't find any information about this behavior in document. How do I disable it?
Upvotes: 4
Views: 1877
Reputation: 1463
Currently you can use Client Side Programming to customize a not movable modal (overlapped, popup) window, the sample below create two overlapped window and make one of them not movable
<zk xmlns:w="client">
<window title="center win, movable" border="normal"
position="center,center"
onCreate="self.doOverlapped();" />
<window title="top win, not movable" border="normal"
sclass="z-window-not-movable"
position="center,top"
onCreate="self.doOverlapped();">
<attribute w:name="bind_"><![CDATA[
function (a, b, c) {
if (!this.$class.ignoremoveOverridden) {
this.$class.ignoremoveOverridden = true;
var oldImove = this.$class._ignoremove;
this.$class._ignoremove = function (dg, pointer, evt) {
var wgt = dg.control;
if (jq(wgt.$n()).hasClass('z-window-not-movable')) {
return true;
}
return oldImove.apply(wgt, arguments);
}
}
this.$bind_(a, b, c);
}
]]></attribute>
</window>
</zk>
References:
Upvotes: 3
Reputation: 3400
If a Window
has no header (no title, close button, ...) you can not move it.
If you want/need the head element, I am pretty sure thre is no build in way
to disable the movement. But I am interested in this too and I think this should
be added to zk tracker as a feature.
I will take a more detailed look at the Window
component and if I find a way
to disable it, I will add this.
Upvotes: 1