hideOnClick is all about the modal layer; click the modal layer and the window closes.
closeOnClickOut is all about clicking anything but the window or its contents. Click outside the window and it closes, even if there isn't a modal layer. I need to change that name though; you're right, it's now ambiguous. It should be hideOnMaskClick or something. On Wed, Nov 11, 2009 at 3:10 PM, Jon Hancock <[email protected]> wrote: > > thanks. this works. > So what's the difference between hideOnClick: false and > closeOnClickOut: false ? > Jon > > On Nov 11, 4:56 pm, Aaron Newton <[email protected]> wrote: > > modalOptions: {hideOnClick: false}, << this is deprecated, just replace > it > > with > > > > hideOnClick: false > > > > > > > > On Wed, Nov 11, 2009 at 1:53 PM, Jon Hancock <[email protected]> > wrote: > > > > > I suppose my option may be getting munged somewhere. It does work in > > > clientcide 2.1.0. > > > I am using a subclass of StickyWin.Modal.Ajax as follows: > > > > > try { > > > var MyDialog = new Class({ > > > Extends: StickyWin.Modal.Ajax, > > > initialize: function(options){ > > > options = new Hash(options) > > > var width = options['width'] || '500px'; > > > var default_options = new Hash({ > > > allowMultiple: false, > > > url: "url", > > > caption: "title", > > > wrapWithUi: true, > > > relativeTo: $('header-container'), > > > offset: {x: -120, y: 150}, > > > destroyOnClose: true, > > > closeOnEsc: false, > > > closeOnClickOut: false, > > > showNow: true, > > > fadeDuration: 500, > > > fadeTransition: 'sine:in:out', > > > modalOptions: {hideOnClick: false}, > > > uiOptions: {width: width, cornerHandle: > > > false, closeButton: true}, > > > onDisplay: function() { > > > var my_form = > > > $(this).getElement('form'); > > > myUtils.setFocus(my_form); > > > }, > > > handleResponse: function(response){ > > > var responseScript = ""; > > > > > this.Request.response.text.stripScripts(function(script){ > > > responseScript += script; }); > > > if (this.options.wrapWithUi) > > > response = StickyWin.ui > > > (this.options.caption, response, this.options.uiOptions); > > > this.setContent(response); > > > this.afterSetContent(); > > > this.show(); > > > if (this.evalScripts) > > > $exec(responseScript); > > > this.fireEvent('update'); > > > }, > > > jsonError: function(json){ > > > var dialogFormMessage = > > > $('dialog-form-message'); > > > if (dialogFormMessage) { > > > > dialogFormMessage.set({html: > > > json["error"]}); > > > } > > > }, > > > jsonSuccess: $empty > > > }); > > > this.addEvent('update', function(){ > > > var form = $(this).getElement('form'); > > > var stickyWin = this; > > > form.addEvent('submit', function(event){ > > > event.stop(); > > > new Request.JSON({ > > > url: > stickyWin.options.url, > > > data: > this.toQueryString(), > > > onSuccess: > function(json) { > > > if > (json["error"] > > > !== undefined) { > > > > > stickyWin.options.jsonError(json) > > > } > > > else { > > > > > stickyWin.options.jsonSuccess(json); > > > > > stickyWin.hide(); > > > } > > > } > > > }).send(); > > > }); > > > }); > > > > > this.parent(default_options.extend(options).getClean()); > > > }, > > > afterSetContent: function(){ > > > var dialogMessage = $('dialog-message'); > > > if (dialogMessage) { > > > dialogMessage.set('html', > > > this.options.message); > > > } > > > } > > > }); > > > } catch(e){}; > > > > > On Nov 11, 4:42 pm, Aaron Newton <[email protected]> wrote: > > > > I just created a simple test and it seems to work fine: > > > > > >http://mooshell.net/pUnDa/ > > > > > > On Wed, Nov 11, 2009 at 1:36 PM, Jon Hancock <[email protected]> > > > wrote: > > > > > > > sorry, my first post was not complete. I do already have this set > > > > > modalOptions: {hideOnClick: false} > > > > > > > it doesn't work ;( > > > > > thanks, Jon > > > > > > > On Nov 11, 4:29 pm, Aaron Newton <[email protected]> wrote: > > > > > > The modal version has an option to close when you click the modal > > > layer. > > > > > > Set hideOnClick to false and see if that doesn't fix it. > > > > > > > > On Wed, Nov 11, 2009 at 12:48 PM, Jon Hancock < > [email protected] > > > > > > > wrote: > > > > > > > > > I just migrated from mootools 1.2.3 to 1.2.4.2. Everything > went > > > > > > > smooth expect for one aspect of StickyWin behavior. > > > > > > > In my StickyWin options, I have closeOnClickOut: false which is > the > > > > > > > default. In clientcide 2.1.0, it worked well, or maybe I > > > misinterpret > > > > > > > what closeOnClickOut is supposed to mean. Either way, in > > > clientcide > > > > > > > 2.2.0 I can't seem to find a option that keeps the windows from > > > > > > > closing when you click out of it. > > > > > > > If it matters, I'm actually using StickyWin.Modal.Ajax and my > ui > > > > > > > options are uiOptions: {width: width, cornerHandle: false, > > > > > > > closeButton: true}, > > > > > > > > > thanks, Jon >
