I haven't followed the full thread, but it may be an option to pass
through sub-plugin-options via a deep extend. This works quite well
for plugins that use $.ajax internally:
$.fn.ajaxPlugin = function(options) {
// note the first argument for a deep extend
options = $.extend(true, {}, $.ajaxPlugin.defaults, options, { url:
options.url, success: function() {
});
...
});
$.ajaxPlugin.defaults = {
ajax: {
method: "post",
dataType: "json"
}
}
$(...).ajaxPlugin();
$(...).ajaxPlugin({
ajax: {
method: "get"
}
});
Jörn
On Mon, Oct 6, 2008 at 2:25 AM, Scott González <[EMAIL PROTECTED]> wrote:
>
> As a policy we will not implement full access to "sub-plugins". We
> figure out which options makes sense to expose and expose them. This
> helps us keep the API from becoming bloated; there are likely to be a
> lot of sub-plugin options that don't make sense for the main plugin.
> This also allows us to use a more logical option name for the specific
> plugin or expose one option that sets multiple sub-plugin options.
>
> There are two types of users for UI plugins. The first type wants to
> use one specific plugin and just drop it in to their site. The other
> wants to use most of UI and has a deep understanding of how several of
> the plugins work. It can be tricky finding the balance of options to
> expose in each plugin to best support both types of users, but we
> think our current approach creates a good balance. If you have a
> suggestion about how we can improve this, we'd love to hear it.
> Thanks.
>
> On Oct 3, 9:56 am, André Cassal <[EMAIL PROTECTED]> wrote:
>> Ok Scott, you're right..
>>
>> But don't you think we can have a standard way to configure sub-
>> plugins?
>>
>> Because if someone update the draggable or the resizable component
>> with some cool feature we won't be abble to use it in the Dialog
>> widget... that's way I've changed ui.dialog.js code...
>>
>> do you know if I can propose that peace of code?
>>
>> Thanks in advance for you help.
>> Best Regards,
>> Andr'e
>>
>> On Oct 3, 10:37 am, Scott González <[EMAIL PROTECTED]> wrote:
>>
>> > If you want to get that custom, you should be making the dialog
>> > draggable/resizable on your own instead of using the built-in dialog
>> > options.
>>
>> > On Oct 2, 9:11 am, André Cassal <[EMAIL PROTECTED]> wrote:
>>
>> > > Hey guys, I don't know exactly if this is the right place to ask/
>> > > suggest this.. but
>>
>> > > I'm using the ui.dialog draggable and resizable and I don't have way
>> > > to 'talk' with each 'options' from each widget.
>> > > So, I had to add in the code a sub object, something like
>>
>> > > Line 240
>> > > this.uiDialog.draggable({
>> > > cursor : options.dragOptions.cursor,
>>
>> > > When 'dragOptions' is the way to talk with the drag object
>>
>> > > I've made the same thing with the resize object. (line 266)
>>
>> > > I think the right way to do that is using 'extent' to pass all
>> > > 'dragOptions" / "resizeOptions".
>>
>> > > What do you think?
>>
>> > > On Aug 22, 12:58 am, Patrick <[EMAIL PROTECTED]> wrote:
>>
>> > > > Hey!
>>
>> > > > On Jun 25, 3:23 pm, tony h <[EMAIL PROTECTED]> wrote:
>>
>> > > > > I had this problem but managed to fix via setting theiframe
>> > > > > dimensions ondialogopen and resizeStop. You also will find you get
>> > > > > glitches whenresizingdialogs if you have multiple dialogs on the
>> > > > > page with iframes inside. An easy cross-browser way to fix this is
>> > > > > just to hide all iframes on resize and show on resizeStop. Example
>> > > > > below:
>>
>> > > > Yep, in fact resizing adialog-window with an iframe in the background
>> > > > doesnt work! Also dragging thedialogdoesnt work very fine with
>> > > > iframes in the background.
>>
>> > > > Everytime you move your mouse too fast you will get outside thedialog-
>> > > > window with your mouse-pointer. If that happens thedialogdoesnt
>> > > > follow your mouse-pointer anymore until you move your the pointer over
>> > > > thedialog-window again.
>>
>> > > > I did some investigation in the repository. But didnt encounter how
>> > > > the mousepointer-position is determined :p (since $.ui.mouse is used
>> > > > inhttp://ui.jquery.com/bugs/browser/trunk/ui/ui.resizable.js#L15its
>> > > > someting with $.ui.mouse, imo). Didnt take a further look cause
>> > > > lacking of time.
>>
>> > > > So to get this problem done I tried your solution. And yes it solves
>> > > > the problem, but now your iframes will disapear when resizing
>> > > > thedialog-window. Therefore this is an unacceptable solution for me.
>>
>> > > > Here is how i solved the problem:
>> > > > <html>
>> > > > <head>
>> > > > <title>test jQueryUI.dialogwith iframes in the background</title>
>> > > > <script src="http://code.jquery.com/jquery-latest.js"></script>
>> > > > <script>
>> > > > $("#example').dialog({
>> > > > resize: function() {$
>> > > > ("#fix_jqueryUiDialogIframe").css({display:"block"});},
>> > > > resizeStop: function() {$
>> > > > ("#fix_jqueryUiDialogIframe").css({display:"none"});}});
>>
>> > > > </script>
>> > > > </head>
>> > > > <body>
>> > > > <div id="example">
>> > > > mydialog
>> > > > </div>
>> > > > <iframe src="test.html" style="width:100%; height:100%;">
>> > > > this iframe is in the background of thedialog
>> > > > </iframe>
>> > > > <div id="fix_jqueryUiDialogIframe" style="display:none;
>> > > > position:absolute; width:100%; height:100%; background:none;">
>> > > > this div will be displayed when you resize adialog(it will
>> > > > overlap the iframe)
>> > > > </div>
>> > > > </body>
>> > > > </html>
>>
>> > > > Now the iframe(s) will be overlapped by a transperent <div> while
>> > > > resizing thedialog. Its like the iframes are hidden, but only for
>> > > > yourdialog.
>>
>> > > > Anyway I think this is kinda bug, isnt it?
>>
>> > > > - patrick
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---