diff --git a/changelog.php b/changelog.php index a5d653b..8960d6a 100644 --- a/changelog.php +++ b/changelog.php @@ -14,6 +14,9 @@ - -> Removed ! -> Note +Version 8.1.13 +^ Improved layout for RTL languages + Version 8.1.12 * Prevent access via the 'window.opener' object with submitted links ^ Fix smiley being shown multiple times for the same image if there are multiple shortcuts diff --git a/mod_shoutbox/media/css/mod_shoutbox.css b/mod_shoutbox/media/css/mod_shoutbox.css index 3b3163e..71f5d5c 100644 --- a/mod_shoutbox/media/css/mod_shoutbox.css +++ b/mod_shoutbox/media/css/mod_shoutbox.css @@ -286,3 +286,24 @@ BBCode .jj-underline { text-decoration: underline !important; } + +/** +RTL +**/ +html[dir="rtl"] .jjshoutboxoutput .shout-header { + padding: 0 5px 0 35px; +} +html[dir="rtl"] .jjshoutbox .btn-group .btn { + min-width: 26px; + margin-bottom: 5px; +} +html[dir="rtl"] .jjshoutboxoutput div p { + text-align: right; + padding: 0 5px 0 0; +} +html[dir="rtl"] .jjshoutboxoutput .shout-actions { + position: absolute; + top: 0; + left: 3px; + right: auto; +} \ No newline at end of file diff --git a/mod_shoutbox/media/js/mod_shoutbox.js b/mod_shoutbox/media/js/mod_shoutbox.js index 07f6ad5..298d220 100644 --- a/mod_shoutbox/media/js/mod_shoutbox.js +++ b/mod_shoutbox/media/js/mod_shoutbox.js @@ -210,15 +210,23 @@ JJShoutbox.getRandomArbitrary = function(min, max) /** * Draw the maths question using a canvas */ -JJShoutbox.drawMathsQuestion = function(number1, number2) -{ - var c = document.getElementById('mathscanvas'); - var ctx = c.getContext('2d'); +JJShoutbox.drawMathsQuestion = function(number1, number2, rtl) +{ + var c = document.getElementById('mathscanvas'), + ctx = c.getContext('2d'); ctx.clearRect(0, 0, c.width, c.height); ctx.font = '14px Arial'; ctx.fillStyle = 'grey'; - ctx.fillText(number1 + ' + ' + number2 + ' = ', 10, 20); + + if (rtl == 1) + { + ctx.fillText(parseInt(number1) + ' + ' + parseInt(number2) + ' = ', 70, 20); + } + else + { + ctx.fillText(number1 + ' + ' + number2 + ' = ', 10, 20); + } } @@ -621,7 +629,7 @@ jQuery(document).ready(function($) { params.instance.find('input[name="jjshout[sum2]"]').val(val2); params.instance.find('label[for="math_output"]').text(val1 + ' + ' + val2); params.instance.find('input[name="jjshout[human]"]').val(''); - JJShoutbox.drawMathsQuestion(val1, val2); + JJShoutbox.drawMathsQuestion(val1, val2, params.rtl); } return false; diff --git a/mod_shoutbox/mod_shoutbox.php b/mod_shoutbox/mod_shoutbox.php index dfbcb91..62a022f 100644 --- a/mod_shoutbox/mod_shoutbox.php +++ b/mod_shoutbox/mod_shoutbox.php @@ -58,6 +58,7 @@ $editowntime = $params->get('editown-time', 5); $history = $params->get('history', 1); $remainingLength = JText::_('SHOUT_REMAINING'); +$rtl = JFactory::getLanguage()->isRTL(); // Assemble the factory variables needed $doc = JFactory::getDocument(); diff --git a/mod_shoutbox/mod_shoutbox.xml b/mod_shoutbox/mod_shoutbox.xml index 17035ef..dfb8a52 100644 --- a/mod_shoutbox/mod_shoutbox.xml +++ b/mod_shoutbox/mod_shoutbox.xml @@ -7,7 +7,7 @@ http://www.gnu.org/licenses/gpl-3.0.html admin@joomjunk.co.uk http://www.joomjunk.co.uk - 8.1.12 + 8.1.13 JJSHOUTBOX_DESCRIPTION diff --git a/mod_shoutbox/sql/mysql/updates/8.1.13.sql b/mod_shoutbox/sql/mysql/updates/8.1.13.sql new file mode 100644 index 0000000..bf8ec69 --- /dev/null +++ b/mod_shoutbox/sql/mysql/updates/8.1.13.sql @@ -0,0 +1 @@ +# Placeholder file for database changes for version 8.1.13 \ No newline at end of file diff --git a/mod_shoutbox/sql/postgresql/updates/8.1.13.sql b/mod_shoutbox/sql/postgresql/updates/8.1.13.sql new file mode 100644 index 0000000..bf8ec69 --- /dev/null +++ b/mod_shoutbox/sql/postgresql/updates/8.1.13.sql @@ -0,0 +1 @@ +# Placeholder file for database changes for version 8.1.13 \ No newline at end of file diff --git a/mod_shoutbox/tmpl/default.php b/mod_shoutbox/tmpl/default.php index 9423b43..829ad11 100644 --- a/mod_shoutbox/tmpl/default.php +++ b/mod_shoutbox/tmpl/default.php @@ -203,7 +203,7 @@ class="" - + smileyshow(); ?> @@ -211,14 +211,14 @@ class="" - + smileyshow(); ?> - + smileyshow(); ?> @@ -262,10 +262,15 @@ class="" randomnumber(1); ?> randomnumber(1); ?> - Your browser does not support the HTML5 canvas tag. - - - + + + Your browser does not support the HTML5 canvas tag. + + Your browser does not support the HTML5 canvas tag. + + + + " - /> + > @@ -287,7 +292,7 @@ class="" { ?> > - + @@ -330,7 +335,7 @@ class="" guest && $securityHide == 1)) { ?> - JJShoutbox.drawMathsQuestion(, ); + JJShoutbox.drawMathsQuestion(, , ); var JJ_frameworkType = ''; @@ -422,6 +427,7 @@ class="" instance : JJ_instance, history : JJ_history, session : 'getState(); ?>', + rtl : '', }; JJShoutbox.submitPost(JJ_ShoutPostParams);