https://bugzilla.wikimedia.org/show_bug.cgi?id=31511
--- Comment #14 from [email protected] 2011-10-21 23:51:03 UTC --- (In reply to comment #11) > It is odd, but the proposed change actually adds the buttons two times! FYI: If I remove the line t.init(); from $(document).ready(function(){...}), the gadget will add the buttons only once, as expected. I just don't understand if this is the safe/right way to do this, because of the following: (In reply to comment #9) > (In reply to comment #8) > > * remove the dependency mw.action.edit > > Roan or Krinkle may confirm/correct this, but I think if we remove a > dependency > from a gadget, we will have no guarantee that its functions (in this case > mw.toolbar) will be available when needed. If there was that guarantee even > without indicating the dependency, then what would be the purpose of having > dependencies on ResourceLoader? Could some Resource Loader expert clarify this? Is it safe to remove the dependency "mw.action.edit" even if we use "mw.toolbar" and "mw.toolbar.buttons" in the gadget? (and if so, why?) Besides, if the variable "window.mwCustomEditButtons" is supposed to be customized by user scripts, shouldn't the module "mediawiki.action.edit" have the module "user" as a dependency[1], so that the custom edit buttons (defined on [[User:Example/common.js]]) are granted to be available to function "mw.toolbar.init" when it merges[2] mwCustomEditButtons and "mw.toolbar.buttons" (which will be used to add buttons to the DOM)? [1] On http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_18/phase3/resources/Resources.php?revision=99054&view=markup#l502 [2] On http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_18/phase3/resources/mediawiki.action/mediawiki.action.edit.js?view=markup#l41 -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
