r90242 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90241‎ | r90242 | r90243 >
Date:22:51, 16 June 2011
Author:brion
Status:deferred
Tags:
Comment:
CodeEditor: add an interface for gadget loader to override the local $wgExtensionAssetsPath for CodeEditor's usage (to load its icons)
Modified paths:
  • /trunk/extensions/CodeEditor/modules/jquery.codeEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeEditor/modules/jquery.codeEditor.js
@@ -70,7 +70,8 @@
7171 */
7272 context.fn = $.extend( context.fn, {
7373 'codeEditorToolbarIcon': function() {
74 - var iconPath = wgExtensionAssetsPath + '/CodeEditor/images/';
 74+ // When loaded as a gadget, one may need to override the wiki's own assets path.
 75+ var iconPath = mw.config.get('wgCodeEditorAssetsPath', mw.config.get('wgExtensionAssetsPath')) + '/CodeEditor/images/';
7576 return iconPath + (context.codeEditorActive ? 'code-selected.png' : 'code.png');
7677 },
7778 'setupCodeEditorToolbar': function() {

Status & tagging log