mw.toolbar: Clean up code and jsduckify
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 10 Jun 2013 02:59:17 +0000 (04:59 +0200)
committerOri.livneh <ori@wikimedia.org>
Mon, 10 Jun 2013 17:39:05 +0000 (17:39 +0000)
commit97c8120f995cb333fb86c82b7b9adbe0994faddb
tree77bcfaf66adce52d0f7b5fc0d53c527e685a3e64
parent99f810bbc188809324dde484b06b76507ff62f89
mw.toolbar: Clean up code and jsduckify

* Removed remnants of the 7th 'selectText' parameter. This
  was still tossed around in a few places, but in the function
  it ends up in (toolbar.insertTags) it is no longer used.
* Per code conventions, don't use jQuery's magic attrMap
  argument, instead call the (in this case attr) method directly.
* Optimise way we get the reference to the detached Array#slice,
  access 'slice' on local array instead of global variabile
  lookup for 'Array' and accessing prototype (learned from jQuery core).
* Link "mw.toolbar.addButton" is invalid in jsduck, members
  of modules are accessed by a hash sign. Should be
  "mw.toolbar#addButton" or even just #addButton in this case.
* Eliminated scrollEditBox function by inlining its contents into the
  $( document ).ready handler.

Change-Id: I867f2bcfd97e00a498a963e5d9730e5b0d36dcae
maintenance/jsduck/categories.json
maintenance/jsduck/config.json
resources/mediawiki.action/mediawiki.action.edit.js