Yii Framework Forum: XHEditor - How to disable onbeforeunload dialog - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

XHEditor - How to disable onbeforeunload dialog Rate Topic: -----

#1 User is offline   Rosimildo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 22-February 10

Posted 13 March 2010 - 11:00 AM

I am using this extension:
http://www.yiiframew...nsion/xheditor/

I'd like to disable the "onbeforeunload" dialog, and I don't know how.

Thanks.
0

#2 User is offline   OriginalCopy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-March 09

Posted 13 March 2010 - 11:57 AM

I doubt anyone can help you directly. But you can try to help yourself. The javascript files distributed with that extension are, for whatever reason, minified. Find the unminified source first, then in your text editor, CTRL+F for "beforeunload".
0

#3 User is offline   Rosimildo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 22-February 10

Posted 13 March 2010 - 12:12 PM

View PostRosimildo, on 13 March 2010 - 11:00 AM, said:

I am using this extension:
http://www.yiiframew...nsion/xheditor/

I'd like to disable the "onbeforeunload" dialog, and I don't know how.

Thanks.


Thanks for your quick response... I am still hoping a javascript guru could come up with some smart way of doing it. What is worst is that the dialog include the text being edited, which is absolutely crazy. I can live with the dialog without the text... and all google searches, only give points in Chinese.
0

#4 User is offline   OriginalCopy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-March 09

Posted 13 March 2010 - 12:53 PM

You can unminify the js files with tools like this one: http://www.gosu.pl/decoder/

Looking for "beforeunload" in the unminified version of xheditor-en.js seems to point to the function getSource, on line 958. It might not be that function, you'll have to analyze the code throughfuly. firebug can help here.

Or if you have a live (and simple) page publicly, I could have a look at it. Please replace all the js sources with their unminified versions to make it easy for me.
0

#5 User is offline   Rosimildo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 22-February 10

Posted 14 March 2010 - 11:58 AM

View PostOriginalCopy, on 13 March 2010 - 12:53 PM, said:

You can unminify the js files with tools like this one: http://www.gosu.pl/decoder/

Looking for "beforeunload" in the unminified version of xheditor-en.js seems to point to the function getSource, on line 958. It might not be that function, you'll have to analyze the code throughfuly. firebug can help here.

Or if you have a live (and simple) page publicly, I could have a look at it. Please replace all the js sources with their unminified versions to make it easy for me.


Thanks again, I will look at this a bit deeper later this week. It is spring brake here in USA, and the kids are home. :-)
0

#6 User is offline   Rosimildo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 22-February 10

Posted 17 March 2010 - 12:25 PM

I'd like to let you all know I fixed this download the 1.0RC1 from their web site.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users