How to make the modal window not movable?

I need a modal Window , but NOT movable, and could not find any information about this behavior in the document. How to disable it?

+4
source share
2 answers

Currently, you can use Client-side Programming to configure a motionless modal (overlapping, pop-up) window, the sample below creates two overlapping windows and makes one of them non-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> 

Literature:

Window.js

ZK client side programming

+3
source

If a Window does not have a title (no title, close button, ...), you cannot move it.
If you want / need a head element, I'm sure this is not the case. to turn off the movement. But I am also interested in this, and I think this should be added to the zk tracker as a function.
I will take a closer look at the Window component, and if I find a way to disable it, I will add this.

+1
source

All Articles