Javascript function does not work

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Javascript function does not work

יגאל חיטרון
Hi. Some script stopped working. Looks like the function

$( '<div>' ).dialog( ... ) // 1 parameter

does not work any more. But it still works on different wiki. Was there
some breaking change? Thank you.
Igal (User:IKhitron)
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Javascript function does not work

Alex Monk
Is the jquery.ui.dialog module loaded in RL?
Where is this failing and where is it fine?

‪On Fri, 8 Feb 2019 at 14:47, ‫יגאל חיטרון‬‎ <[hidden email]>
wrote:‬

> Hi. Some script stopped working. Looks like the function
>
> $( '<div>' ).dialog( ... ) // 1 parameter
>
> does not work any more. But it still works on different wiki. Was there
> some breaking change? Thank you.
> Igal (User:IKhitron)
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Javascript function does not work

יגאל חיטרון
Works on hewiki.
Does not on enwiki, eswiki, ruwiki.
Thanks,
Igal

‫בתאריך יום ו׳, 8 בפבר׳ 2019 ב-16:50 מאת ‪Alex Monk‬‏ <‪[hidden email]
‬‏>:‬

> Is the jquery.ui.dialog module loaded in RL?
> Where is this failing and where is it fine?
>
> ‪On Fri, 8 Feb 2019 at 14:47, ‫יגאל חיטרון‬‎ <[hidden email]>
> wrote:‬
>
> > Hi. Some script stopped working. Looks like the function
> >
> > $( '<div>' ).dialog( ... ) // 1 parameter
> >
> > does not work any more. But it still works on different wiki. Was there
> > some breaking change? Thank you.
> > Igal (User:IKhitron)
> > _______________________________________________
> > Wikitech-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Javascript function does not work

יגאל חיטרון
So, nobody knows what happened? If so, I should create a phab ticket.
Igal
On Feb 8, 2019 16:51, "יגאל חיטרון" <[hidden email]> wrote:

> Works on hewiki.
> Does not on enwiki, eswiki, ruwiki.
> Thanks,
> Igal
>
> ‫בתאריך יום ו׳, 8 בפבר׳ 2019 ב-16:50 מאת ‪Alex Monk‬‏ <‪[hidden email]
> ‬‏>:‬
>
>> Is the jquery.ui.dialog module loaded in RL?
>> Where is this failing and where is it fine?
>>
>> ‪On Fri, 8 Feb 2019 at 14:47, ‫יגאל חיטרון‬‎ <[hidden email]>
>> wrote:‬
>>
>> > Hi. Some script stopped working. Looks like the function
>> >
>> > $( '<div>' ).dialog( ... ) // 1 parameter
>> >
>> > does not work any more. But it still works on different wiki. Was there
>> > some breaking change? Thank you.
>> > Igal (User:IKhitron)
>> > _______________________________________________
>> > Wikitech-l mailing list
>> > [hidden email]
>> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>> _______________________________________________
>> Wikitech-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Javascript function does not work

Eran Rosenthal
Hi Igal,
We are trying to avoid using jquery.ui in favor or OOUI to get a more
modern interface. jquery dialog module is NOT loaded by default  (and if it
works for you in any wiki, likely you enabled some gadget that relay on it
or it was enabled as default gadget)
Though not all people like OOUI, and though it may be harder to do simple
stuff, it provides some benefits when creating larger infrastructure of
dialogs.

So the short answer wrap your function:
mw.loader.using('jquery.ui.dialog', function() {
$( '<div>' ).dialog( ... ) // 1 parameter
})

The better way to do it: Follow
https://www.mediawiki.org/wiki/OOUI/Windows/Dialogs

Eran




‪On Tue, Feb 12, 2019 at 9:45 PM ‫יגאל חיטרון‬‎ <[hidden email]>
wrote:‬

> So, nobody knows what happened? If so, I should create a phab ticket.
> Igal
> On Feb 8, 2019 16:51, "יגאל חיטרון" <[hidden email]> wrote:
>
> > Works on hewiki.
> > Does not on enwiki, eswiki, ruwiki.
> > Thanks,
> > Igal
> >
> > ‫בתאריך יום ו׳, 8 בפבר׳ 2019 ב-16:50 מאת ‪Alex Monk‬‏ <‪
> [hidden email]
> > ‬‏>:‬
> >
> >> Is the jquery.ui.dialog module loaded in RL?
> >> Where is this failing and where is it fine?
> >>
> >> ‪On Fri, 8 Feb 2019 at 14:47, ‫יגאל חיטרון‬‎ <[hidden email]>
> >> wrote:‬
> >>
> >> > Hi. Some script stopped working. Looks like the function
> >> >
> >> > $( '<div>' ).dialog( ... ) // 1 parameter
> >> >
> >> > does not work any more. But it still works on different wiki. Was
> there
> >> > some breaking change? Thank you.
> >> > Igal (User:IKhitron)
> >> > _______________________________________________
> >> > Wikitech-l mailing list
> >> > [hidden email]
> >> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> >> _______________________________________________
> >> Wikitech-l mailing list
> >> [hidden email]
> >> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> >
> >
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l