User "Catrope" changed the status of MediaWiki.r98837.

Old Status: new
New Status: ok

User "Catrope" also posted a comment on MediaWiki.r98837.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98837#c23715
Commit summary:

[RL2] Implement "create" mode
* New option 'extraquery' in doModifyGadget so that this function can be 
re-used for gadget creation by only adding two query values.
* Moving some query parameters out of the default data object in 
doModifyGadget, and making them optional instead (when creating a new gadget, 
the gadget object will not have a definitiontimestamp)
* New mw.gadgets.api.doCreateGadget method
* Commenting out function body of .mw-gadgets-delete click callback. That way 
it will not be prevented following by nothing and instead the 
NS_GADGET_DEFINITION fallback will actually be fallen back to (until the AJAX 
doDeleteGadget is implemented)
* Add clearGadgetCache and clearCategoryCache to mw.gadgets.api, this is needed 
to make sure mw.gadgets.api.getGadgetData will return a fresh list of gadgets 
when doing the availability check in the front-end.
* i18n messages update

Comment:

<pre>
+                                               success: function( response ) {
+                                                       mw.log( 
'mw.gadgets.api.doModifyGadget: success', arguments );
+                                                       $form.dialog( 'close' );
+                                                       
window.location.reload();
+                                               },
+                                               error: function( error ) {
+                                                       mw.log( 
'mw.gadgets.api.doModifyGadget: error', arguments );
+                                                       // @todo Notification: 
$formNotif.add( .. );
+                                               }
</pre>
You shouldn't duplicate the success and error callbacks here. Store them in a 
local variable or something.

OK otherwise, marking as such.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to