[Bug 21363] Can't add dialogs with a user script

2009-11-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=21363


Roan Kattouw roan.katt...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from Roan Kattouw roan.katt...@gmail.com  2009-11-02 10:05:52 
UTC ---
Fixed in r58423. Note that this revision also changed the calling convention
for open/closeDialog from openDialog( { 'dialog': 'myDialogID' } ); to
openDialog( 'myDialogID' );


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 21363] Can't add dialogs with a user script

2009-10-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=21363


Roan Kattouw roan.katt...@gmail.com changed:

   What|Removed |Added

 CC||roan.katt...@gmail.com




--- Comment #1 from Roan Kattouw roan.katt...@gmail.com  2009-10-31 11:09:45 
UTC ---
Have you tested that this patch doesn't break the toolbar itself? Also, the
change suggests that the following JS would work:

var mydialog = {
//  modules: { // remove this line
mydialog: {
  titleMsg: 'mydialog-title',
  id: 'mydialog-id',
  init: mydialoginit,
  html: mydialoghtml,
  dialog: {
width:400,
buttons: {
 ...
}
  }
}
//  }  // remove this line
}
$j('#wpTextbox1').wikiEditor('addDialog', mydialog);


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 21363] Can't add dialogs with a user script

2009-10-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=21363





--- Comment #2 from Alex Z. mrzmanw...@gmail.com  2009-10-31 19:34:33 UTC ---
That change gives the same error as before.

The problem is that the current addDialog function is creating something like
this:

finalobject = {
  'modules': {
userSuppliedObject
  }
}

So when the create function iterates over that, it adds the 'modules' object to
the dialogs list.

Technically this works:
var mydialog = {
//  modules: { // remove this line
//mydialog: {
  titleMsg: 'mydialog-title',
  id: 'mydialog-id',
  init: mydialoginit,
  html: mydialoghtml,
  dialog: {
width:400,
buttons: {
 ...
}
  }
//}
//  }  // remove this line
$j('#wpTextbox1').wikiEditor('addDialog', mydialog);

But it only allows you to create one dialog called 'modules.'

The change doesn't seem to have any effect on the rest of the toolbar, though
my test wasn't exhaustive.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l