mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Fixed dependency on mw, now demo works again
Change-Id: I26599e065a521cf08a16f5a65e36960a692421e9
This commit is contained in:
parent
21ff108c28
commit
17fff0d163
|
@ -169,6 +169,9 @@ include( '../../modules/sandbox/base.php' );
|
|||
|
||||
<!-- ui -->
|
||||
<script src="../../modules/ve2/ui/ve.ui.js"></script>
|
||||
<script>
|
||||
ve.ui.stylesheetPath = '../../modules/ve2/ui/styles/';
|
||||
</script>
|
||||
<script src="../../modules/ve2/ui/ve.ui.Inspector.js"></script>
|
||||
<script src="../../modules/ve2/ui/ve.ui.Tool.js"></script>
|
||||
<script src="../../modules/ve2/ui/ve.ui.Toolbar.js"></script>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
* All classes and functions will be attached to this object to keep the global namespace clean.
|
||||
*/
|
||||
ve.ui = {
|
||||
|
||||
// Path to UI assets for direct loading
|
||||
'stylesheetPath': 'extensions/VisualEditor/modules/ve2/ui/styles/'
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -12,7 +13,9 @@ ve.ui = {
|
|||
* Returns UI stylesheet path
|
||||
*/
|
||||
ve.ui.getStylesheetPath = function() {
|
||||
// gets the path to a UI
|
||||
// TODO: look for mw.util and rewrite
|
||||
return mw.config.get( 'wgExtensionAssetsPath' ) + '/VisualEditor/modules/ve2/ui/styles/';
|
||||
if ( 'mw' in window ) {
|
||||
return mw.config.get( 'wgExtensionAssetsPath' ) + '/VisualEditor/modules/ve2/ui/styles/';
|
||||
} else {
|
||||
return ve.ui.stylesheetPath;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue