Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -112,9 +112,18 @@ |
113 | 113 | 'remoteBasePath' => $smwgScriptPath, |
114 | 114 | 'group' => 'ext.smw' |
115 | 115 | ); |
| 116 | + |
| 117 | + $wgResourceModules['ext.smw'] = $moduleTemplate + array( |
| 118 | + 'scripts' => array( |
| 119 | + 'resources/ext.smw.js', |
| 120 | + 'resources/ext.smw.compat.js', |
| 121 | + ), |
| 122 | + ); |
| 123 | + |
116 | 124 | $wgResourceModules['ext.smw.style'] = $moduleTemplate + array( |
117 | 125 | 'styles' => 'skins/SMW_custom.css' |
118 | 126 | ); |
| 127 | + |
119 | 128 | $wgResourceModules['ext.smw.tooltips'] = $moduleTemplate + array( |
120 | 129 | 'scripts' => 'skins/SMW_tooltip.js', |
121 | 130 | 'dependencies' => array( |
Index: trunk/extensions/SemanticMediaWiki/resources/ext.smw.js |
— | — | @@ -0,0 +1,45 @@ |
| 2 | +/** |
| 3 | + * JavasSript for Semantic MediaWiki. |
| 4 | + * @see http://semantic-mediawiki.org/ |
| 5 | + * |
| 6 | + * @licence GNU GPL v3 or later |
| 7 | + * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
| 8 | + */ |
| 9 | + |
| 10 | +window.semanticMediaWiki = new( function() { |
| 11 | + |
| 12 | + this.log = function( message ) { |
| 13 | + if ( typeof mediaWiki === 'undefined' ) { |
| 14 | + if ( typeof console !== 'undefined' ) { |
| 15 | + console.log( 'SMW: ' + message ); |
| 16 | + } |
| 17 | + } |
| 18 | + else { |
| 19 | + return mediaWiki.log.call( mediaWiki.log, 'SMW: ' + message ); |
| 20 | + } |
| 21 | + } |
| 22 | + |
| 23 | + this.msg = function() { |
| 24 | + if ( typeof mediaWiki === 'undefined' ) { |
| 25 | + message = window.wgSMWMessages[arguments[0]]; |
| 26 | + |
| 27 | + for ( var i = arguments.length - 1; i > 0; i-- ) { |
| 28 | + message = message.replace( '$' + i, arguments[i] ); |
| 29 | + } |
| 30 | + |
| 31 | + return message; |
| 32 | + } |
| 33 | + else { |
| 34 | + return mediaWiki.msg.apply( mediaWiki.msg, arguments ); |
| 35 | + } |
| 36 | + } |
| 37 | + |
| 38 | +} )(); |
| 39 | + |
| 40 | +window.smw = window.semanticMediaWiki; |
| 41 | + |
| 42 | +(function( $ ) { $( document ).ready( function() { |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +} ); })( jQuery ); |
Property changes on: trunk/extensions/SemanticMediaWiki/resources/ext.smw.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 47 | + native |
Index: trunk/extensions/SemanticMediaWiki/resources/ext.smw.compat.js |
Property changes on: trunk/extensions/SemanticMediaWiki/resources/ext.smw.compat.js |
___________________________________________________________________ |
Added: svn:eol-style |
2 | 48 | + native |