0

run jquery.widget function in zul page

asked 2014-12-26 04:10:45 +0800

trongdd gravatar image trongdd
1

I would like to run the following JS with my zul page

$.widget( "ui.dialog", $.ui.dialog, { allowInteraction: function( event ) { return !!$( event.target ).closest( ".other-popups" ).length || this.super( event ); } });

as a solution to a issue with Jquery modal dialog + ckeditor bugs.jqueryui.com/ticket/9087 . However I keep getting $.widget or jq.widget or jq().widget is undefined whatever I try. As I understand Jquery.widget (api.jqueryui.com/jquery.widget) is a widget factory.

I would like some pointer on what I may try to run that. Thanks. I am using ZK 7.0.3

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-12-27 17:46:40 +0800

Darksu gravatar image Darksu
1991 1 4

Hello trongdd,

You could refer to the following in order to get some ideas on how to proceed with your task:

http://books.zkoss.org/wiki/SmallTalks/2010/December/HowtoWrapajQueryUI_Widget

http://zkfiddle.org/sample/1o2l2ph/1-Another-new-ZK-fiddle#source-2

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2014-12-29 02:16:11 +0800

trongdd gravatar image trongdd
1

Thanks Darksu,

I managed to make it run by importing jqueryui.js and use jQuery.widget instead of $.widget. At the end, my problem (ckeditor modal Window focus in zul modal Window) was solved by another way though.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-12-26 04:10:45 +0800

Seen: 28 times

Last updated: Dec 29 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More