estrify Posted March 26, 2013 Posted March 26, 2013 Hi, This is a simple workaround to include in UniGUI framework the fantastic work done by Eirik Lorentsen and published at http://www.eirik.net/Ext/ux/util/AlwaysOnTop.html.For us, this is a must have feature needed as the developed application starts to get more and more complicated with more and more options, filters and parameters.With some time and dedication, it might be possible to achieve similar functionality provided by floating panels within professional applications like Photoshop or Lightroom...Attached, there is a simple project to show the how-to. Use it under your own risk so we don't know if there are significant inteferences with UniGUI framework.We hope that Farshad could consider to include this functionality within UniGUI framework as a "AlwaysOnTop" property of standard forms.Tested with UniGUI v0.93.0.996. IE8 and FF18 browsers.Regards, AlwaysOnTop.rar 3 Quote
tappatappa Posted May 13, 2013 Posted May 13, 2013 I tried to compile and run the project, but Avira detected a virus inside the generated .exe (false positive, i guess..) 'TR/Fraud.Gen7' [trojan] By the way, very important feature, in my opinion. Quote
Schlingel Posted May 13, 2013 Posted May 13, 2013 I tried to compile and run the project, but Avira detected a virus inside the generated .exe (false positive, i guess..) 'TR/Fraud.Gen7' [trojan] By the way, very important feature, in my opinion. This is a known bug in Avira .... Just renaming the project "Project1" to a different name then it runs. - ... Any program with names "Project 1" is detected as a virus Quote
tappatappa Posted May 14, 2013 Posted May 14, 2013 This is a known bug in Avira .... Just renaming the project "Project1" to a different name then it runs. - ... Any program with names "Project 1" is detected as a virus ok, that was a newbie question. Thanks! Quote
tappatappa Posted May 14, 2013 Posted May 14, 2013 I tried to create another project using this workaround for AlwaysOnTop, but I failed. Here is what I did: Copy-Paste AlwaysOnTop.js in the project root ServerModule->CustomFiles="AlwaysOnTop.js" Form->TUniClientEvents->ExtEvents->OnBeforerender : function window.OnBeforerender(sender) { Ext.apply(sender, { alwaysOnTop: true }); } Unfortunately, this was not enough the form shows as a regular form. I've also tried to put the full path to AlwaysOnTop.js under ServerModule.CustomFiles: nothing changes. What am I missing here? Quote
estrify Posted May 14, 2013 Author Posted May 14, 2013 I tried to create another project using this workaround for AlwaysOnTop, but I failed. Here is what I did: Copy-Paste AlwaysOnTop.js in the project root ServerModule->CustomFiles="AlwaysOnTop.js" Form->TUniClientEvents->ExtEvents->OnBeforerender : function window.OnBeforerender(sender) { Ext.apply(sender, { alwaysOnTop: true }); } Unfortunately, this was not enough the form shows as a regular form. I've also tried to put the full path to AlwaysOnTop.js under ServerModule.CustomFiles: nothing changes. What am I missing here? I think that was all... It could be the following: be sure that you are writing code within OnBeforerender of Ext.Window, not of Ext.form.FormPanel... Quote
tappatappa Posted May 14, 2013 Posted May 14, 2013 I think that was all... It could be the following: be sure that you are writing code within OnBeforerender of Ext.Window, not of Ext.form.FormPanel... Are you sure that this (taken from AlwaysOnTop.js) Ext.application({ name: 'AlwaysOnTopDemo', controllers: [ 'Ext.ux.util.AlwaysOnTop' ] }); is the proper way to get the controller? I inspected my generated page source and this is the order in which the scripts are loaded: ... <script src="ext-4.1.1a/ext-all.js"></script> <script src="ext-4.1.1a/uni-0.93.0.995/ext-sync-min.js"></script> <script type="text/javascript"> Ext.Loader.setConfig({enabled:true,paths:{"Ext.uni":"ext-4.1.1a/uni-0.93.0.995"}}); </script> <link rel=stylesheet href="ext-4.1.1a/uni-0.93.0.995/css/uni-xtheme-common.css" /> <link rel=stylesheet href="ext-4.1.1a/uni-0.93.0.995/css/uni-xtheme-blue.css" /> <script src="/AlwaysOnTop.js"></script> <script src="ext-4.1.1a/uni-0.93.0.995/ext-treenode-plugin.js"></script> <script src="ext-4.1.1a/uni-0.93.0.995/unicanvas-min.js"></script> <script src="ext-4.1.1a/examples/ux/form/MultiSelect.js"></script> <script src="ext-4.1.1a/uni-0.93.0.995/ext-unigui-min.js"></script> ... maybe the alwaysontop controller gets lost Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.