Topic on Extension talk:Semantic Forms Inputs

jquery-ui files moved from SF to SMW

3
Clausekwis (talkcontribs)

Hi,

I noticed Semantic Forms Inputs still uses the former location of the jquery-ui files, namely $sfgScriptPath.

Since the files have moved to the SMW core extension, this seems to fix the problem: (in SemanticFormsInputs/includes/SFI_DatePicker.php)

- global $sfgScriptPath, $sfigSettings;
+ global $sfgScriptPath, $sfigSettings, $smwgScriptPath;

- $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.datepicker.css' );
- $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.theme.css' );
- $wgOut->addScript( '<script type="text/javascript" src="' . $sfgScriptPath . '/libs/jquery-ui/jquery.ui.datepicker.min.js"></script> ' );

+ $wgOut->addExtensionStyle( $smwgScriptPath . '/skins/jquery-ui/base/jquery.ui.datepicker.css' );
+ $wgOut->addExtensionStyle( $smwgScriptPath . '/skins/jquery-ui/base/jquery.ui.theme.css' );
+ $wgOut->addScript( '<script type="text/javascript" src="' . $smwgScriptPath . '/libs/jquery-ui/jquery.ui.datepicker.min.js"></script> ' );
Pastakhov (talkcontribs)

Thanks.

F.trott (talkcontribs)

Thanks for your efforts. Nice to see people care for this extension enough to actually dig through the code.

SFI got some rework in the development version available from SVN that includes basing it entirely on the ResourceLoader and removing the sfgScriptPath dependency. Note, that smwgScriptPath is also not needed, as the datepicker is available directly from the jQuery modules included with MW.

Long story short: Try using the development version.

Cheers,

Reply to "jquery-ui files moved from SF to SMW"