|
From: <be...@us...> - 2014-01-30 10:13:31
|
Revision: 12281
http://sourceforge.net/p/xoops/svn/12281
Author: beckmi
Date: 2014-01-30 10:13:27 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
fix for cancel button in javascript (currently it still entered the text, even if canceled),
added title, replaced hard-coded text
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php 2014-01-30 08:35:15 UTC (rev 12280)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php 2014-01-30 10:13:27 UTC (rev 12281)
@@ -5,10 +5,11 @@
public function encode($textarea_id)
{
$config = parent::loadConfig( dirname(__FILE__) );
- $code = "<img src='{$this->image_path}/soundcloud.png' alt='SoundCloud' "
- . "onclick='xoopsCodeSoundCloud(\"{$textarea_id}\",\""
- . htmlspecialchars('Enter SoundCloud Profile URL', ENT_QUOTES)
- . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+
+ $code = "<img src='{$this->image_path}/soundcloud.png' alt='" . _XOOPS_FORM_ALT_SOUNDCLOUD
+ . "' title='" . _XOOPS_FORM_ALT_SOUNDCLOUD . "' '"
+ . "' onclick='xoopsCodeSoundCloud(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTER_SOUNDCLOUD_URL, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeSoundCloud(id, enterSoundCloud)
{
@@ -20,7 +21,9 @@
}
var domobj = xoopsGetElementById(id);
+ if (text.length > 0) {
xoopsInsertText(domobj, "[soundcloud]"+text+"[/soundcloud]");
+ }
domobj.focus();
}
EOH;
|