diff --git a/changelog.php b/changelog.php index 3fa8bb7..ce50db5 100644 --- a/changelog.php +++ b/changelog.php @@ -15,6 +15,12 @@ - -> Removed ! -> Note +Version 1.5.5 +# Slider container will no longer overlap other elements +^ CSS enhancements +- Removed jQuery option and thus dropping support for IE8 +- Removed support for Joomla 3.0 and 3.1 + Version 1.5.4 + Used more unique naming convertions to prevent overrides - Removed unnecessary jQuery file for (Joomla 3.2) diff --git a/mod_social_slider/fields/jquery.php b/mod_social_slider/fields/jquery.php deleted file mode 100644 index f98d26d..0000000 --- a/mod_social_slider/fields/jquery.php +++ /dev/null @@ -1,48 +0,0 @@ - -* @copyright Copyright (C) 2011 - 2014 JoomJunk. All Rights Reserved -* @license GPL v3.0 or later http://www.gnu.org/licenses/gpl-3.0.html -*/ - -defined('_JEXEC') or die('Restricted access'); - -JFormHelper::loadFieldClass('list'); - -/** - * Form Field class for JoomJunk. - * Provides radio button inputs for the jQuery insertation in Joomla 2.5 only - * - * @package JJ_Social_Slider - * @since 1.3.0 - */ -class JFormFieldjQuery extends JFormFieldList -{ - /** - * The form field type. - * - * @var string - * @since 1.3.0 - */ - protected $type = 'jQuery'; - - /** - * Method to get the list field input markup. - * - * @return string The field input markup if version is less than Joomla 3.0, else text string. - * - * @since 1.3.0 - */ - protected function getInput() - { - if (version_compare(JVERSION,'3.0.0','ge')) - { - return '' . JText::_('JJ_SOCIAL_SLIDER_NOJQUERY_30') . ''; - } - else - { - return parent::getInput(); - } - } -} diff --git a/mod_social_slider/fields/sorting.php b/mod_social_slider/fields/sorting.php index b041fa2..a71f185 100644 --- a/mod_social_slider/fields/sorting.php +++ b/mod_social_slider/fields/sorting.php @@ -56,7 +56,7 @@ protected function getInput() 'sort_19' => JText::_('COM_MODULES_CUSTOM4_FIELDSET_LABEL'), 'sort_20' => JText::_('COM_MODULES_CUSTOM5_FIELDSET_LABEL') ); - $document = JFactory::getDocument(); + $doc = JFactory::getDocument(); // Inject jQuery onto the page JHtml::_('jquery.framework'); @@ -65,24 +65,24 @@ protected function getInput() JHtml::_('script', 'mod_social_slider/jquery-sortable.js', false, true); // Now initialize the plugin - $document->addScriptDeclaration(' - jQuery(document).ready(function($) { - var group = $("#sortable").sortable({ - pullPlaceholder: false, - onDrop: function (item, container, _super) { - $("#' . $this->id . '").val(group.sortable("serialize").get().join("\n")) - _super(item, container) - }, - serialize: function (parent, children, isContainer) { - return isContainer ? children.join() : parent.attr("id") - }, - }) - }); + $doc->addScriptDeclaration(' + jQuery(document).ready(function($) { + var group = $("#sortable").sortable({ + pullPlaceholder: false, + onDrop: function (item, container, _super) { + $("#' . $this->id . '").val(group.sortable("serialize").get().join("\n")) + _super(item, container) + }, + serialize: function (parent, children, isContainer) { + return isContainer ? children.join() : parent.attr("id") + }, + }) + }); '); // Add in relevant styles $icon = JUri::root() . 'media/mod_social_slider/icons/'; - $document->addStyleDeclaration(' + $doc->addStyleDeclaration(' body.dragging, body.dragging * { cursor: move !important; } diff --git a/mod_social_slider/language/en-GB/en-GB.mod_social_slider.ini b/mod_social_slider/language/en-GB/en-GB.mod_social_slider.ini index 590a457..683aa2a 100644 --- a/mod_social_slider/language/en-GB/en-GB.mod_social_slider.ini +++ b/mod_social_slider/language/en-GB/en-GB.mod_social_slider.ini @@ -4,7 +4,7 @@ ; @ Released under GNU/GPL 3.0 License ; Note : All ini files need to be saved as UTF-8 -JJ_SOCIAL_SLIDER_DESC="
Copyright (C) 2014 JoomJunk
Released under GNU/GPL 3.0 License
Website: www.joomjunk.co.uk
Social Slider is a simple module that appears in a fixed position, either on the left or right hand side of your page. Upon hovering over an icon, the bar slides out using CSS3 or jQuery animations, providing a small caption which you can link to a social network page.
" +JJ_SOCIAL_SLIDER_DESC="Copyright (C) 2014 JoomJunk
Released under GNU/GPL 3.0 License
Website: www.joomjunk.co.uk
Social Slider is a simple module that appears in a fixed position, either on the left or right hand side of your page. Upon hovering over an icon, the bar slides out using CSS3 transitions, providing a small caption which you can link to a social network page.
" COM_MODULES_FACEBOOK_FIELDSET_LABEL="Facebook" COM_MODULES_TWITTER_FIELDSET_LABEL="Twitter" @@ -144,11 +144,6 @@ JJ_SOCIAL_SLIDER_ICON_COLOUR="Icon Colour" JJ_SOCIAL_SLIDER_ICON_COLOUR_DESC="Select whether you would likes to have black or white icons" JJ_SOCIAL_SLIDER_ICONS_WHITE="White" JJ_SOCIAL_SLIDER_ICONS_BLACK="Black" -JJ_SOCIAL_SLIDER_CSS="CSS" -JJ_SOCIAL_SLIDER_JQUERY_CSS="jQuery or CSS" -JJ_SOCIAL_SLIDER_JQUERY_CSS_DESC="Choose whether you would like to use jQuery or CSS animations" -JJ_SOCIAL_SLIDER_JQUERY="jQuery" -JJ_SOCIAL_SLIDER_NOJQUERY_30="jQuery is included locally in Joomla 3.x by default" JJ_SOCIAL_SLIDER_TAB="Target" JJ_SOCIAL_SLIDER_TAB_DESC="Select whether you want the social network to open in the same or a new tab" JJ_SOCIAL_SLIDER_TAB_NEW="New tab" diff --git a/mod_social_slider/language/en-GB/en-GB.mod_social_slider.sys.ini b/mod_social_slider/language/en-GB/en-GB.mod_social_slider.sys.ini index f30fcc6..53ba1eb 100644 --- a/mod_social_slider/language/en-GB/en-GB.mod_social_slider.sys.ini +++ b/mod_social_slider/language/en-GB/en-GB.mod_social_slider.sys.ini @@ -4,5 +4,5 @@ ; @ Released under GNU/GPL 3.0 License ; Note : All ini files need to be saved as UTF-8 -JJ_SOCIAL_SLIDER_DESC="Copyright (C) 2014 JoomJunk
Released under GNU/GPL 3.0 License
Website: www.joomjunk.co.uk
Social Slider is a simple module that appears in a fixed position, either on the left or right hand side of your page. Upon hovering over an icon, the bar slides out using CSS3 or jQuery animations, providing a small caption which you can link to a social network page.
" -JJ_SOCIAL_SLIDER_JOOMLA_VERSION_OUTDATED="This module requires Joomla 3.2 or higher. There are packages available for download at www.joomjunk.co.uk available for Joomla 2.5" +JJ_SOCIAL_SLIDER_DESC="Copyright (C) 2014 JoomJunk
Released under GNU/GPL 3.0 License
Website: www.joomjunk.co.uk
Social Slider is a simple module that appears in a fixed position, either on the left or right hand side of your page. Upon hovering over an icon, the bar slides out using CSS3 transitions, providing a small caption which you can link to a social network page.
" +JJ_SOCIAL_SLIDER_JOOMLA_VERSION_OUTDATED="This module requires Joomla 2.5 or Joomla 3.2+." diff --git a/mod_social_slider/media/css/style.css b/mod_social_slider/media/css/style.css index de99b13..3928f9c 100644 --- a/mod_social_slider/media/css/style.css +++ b/mod_social_slider/media/css/style.css @@ -33,6 +33,9 @@ ul#jj_sl_navigation li a { -o-transition: all 0.3s ease; transition: all 0.3s ease; } +ul.jj_sl_navigation li a:focus { + outline: 0; +} ul#jj_sl_navigation li a .jj_social_text { display: inline-block; width: 130px; diff --git a/mod_social_slider/mod_social_slider.php b/mod_social_slider/mod_social_slider.php index aeb4364..110fc99 100644 --- a/mod_social_slider/mod_social_slider.php +++ b/mod_social_slider/mod_social_slider.php @@ -27,12 +27,7 @@ $position = $params->get('position', 'left'); } -$document = JFactory::getDocument(); - -if ($params->get('jquery_css') == 0) -{ - JHtml::_('jquery.framework'); -} +$doc = JFactory::getDocument(); $slides = array( 'sort_1' => 'facebook', @@ -57,19 +52,20 @@ 'sort_20' => 'custom5' ); -$style1 = 'ul#jj_sl_navigation li a {' +$css = ""; + +$css .= 'ul#jj_sl_navigation li a {' . 'background-color:' . $params->get('slide_colour') . ';' . 'text-align:' . $position . ';' . 'color:' . $params->get('text_colour') . ' !important;' . '}'; -$document->addStyleDeclaration($style1); - + if ($params->get('disable') == 1) { $mobile = '@media screen and (max-width: ' . $params->get("mobile_width", "480px") . '){' . 'ul#jj_sl_navigation { display: none; }' . '}'; - $document->addStyleDeclaration($mobile); + $doc->addStyleDeclaration($mobile); } if ($params->get('disable') == 2) @@ -77,154 +73,109 @@ $mobile_tablet = '@media screen and (max-width: ' . $params->get("tablet_width", "768px") . '){' . 'ul#jj_sl_navigation { display: none; }' . '}'; - $document->addStyleDeclaration($mobile_tablet); + $doc->addStyleDeclaration($mobile_tablet); } if ($position == "left") { - if ($params->get('jquery_css') == 0) - { - $js_left = ' - (function($){ - $(function() { - $("#jj_sl_navigation a").css("marginLeft", "-140px") - $("#jj_sl_navigation > li").hover( - function () { - $("a",$(this)).stop().animate({"marginLeft":"-2px"},200); - }, - function () { - $("a",$(this)).stop().animate({"marginLeft":"-140px"},200); - } - ); - }); - })(jQuery); - '; - $css = ''; - $document->addScriptDeclaration($js_left); - } - else - { - $css = 'ul#jj_sl_navigation li { ' - . 'margin-left: -140px;' - . '-webkit-transition: margin-left 0.3s;' - . '-moz-transition: margin-left 0.3s;' - . '-ms-transition: margin-left 0.3s;' - . '-o-transition: margin-left 0.3s;' - . 'transition: margin-left 0.3s;' - . '}'; + $css .= 'ul#jj_sl_navigation li { ' + . 'left: 0;' + . 'position:relative;' + . '-webkit-transition: left 0.3s;' + . '-moz-transition: left 0.3s;' + . '-ms-transition: left 0.3s;' + . '-o-transition: left 0.3s;' + . 'transition: left 0.3s;' + . '}'; + + $css .= 'ul#jj_sl_navigation { ' + . $position . ': -140px;' + . $params->get('top_bottom', 'top') . ':' . $params->get('top') . 'px;' + . '}' + . 'ul#jj_sl_navigation li:hover { ' + . 'left: 140px;' + . '}' + . 'ul#jj_sl_navigation li a { ' + . 'padding: 11px 0px 11px 10px;' + . 'margin-left: -2px;' + . '}'; + + foreach ($slides as $slide => $social){ + if (strpos($social, "custom") === false) + { + $css .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { + background-position: 144px 50%; + background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $social . '-' . $params->get('icon_colour') . '.png); + }'; + } + else + { + $css .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { + background-position: 144px 50%; + background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $params->get( $social . '_image') . '); + }'; + } } - $style = ""; - $style .= 'ul#jj_sl_navigation { ' - . $position . ':0px;' - . $params->get('top_bottom', 'top') . ':' . $params->get('top') . 'px;' - . '}' - . 'ul#jj_sl_navigation li:hover { ' - . 'margin-left: 0px;' - . '}' - . 'ul#jj_sl_navigation li a { ' - . 'padding: 11px 0px 11px 10px;' - . 'margin-left: -2px;' - . '}'; - foreach ($slides as $slide => $social){ - if (strpos($social, "custom") === false) - { - $style .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { - background-position: 144px 50%; - background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $social . '-' . $params->get('icon_colour') . '.png); - }'; - } - else - { - $style .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { - background-position: 144px 50%; - background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $params->get( $social . '_image') . '); - }'; - } - } } elseif ($position == "right") { - if ($params->get('jquery_css') == 0) - { - $js_right = ' - (function($){ - $(function() { - $("#jj_sl_navigation a").css("marginLeft", "140px") - $("#jj_sl_navigation > li").hover( - function () { - $("a",$(this)).stop().animate({"marginLeft":"2px"},200); - }, - function () { - $("a",$(this)).stop().animate({"marginLeft":"140px"},200); - } - ); - }); - })(jQuery); - '; - $css = 'ul#jj_sl_navigation li {position: relative;} ul#jj_sl_navigation{right: -140px;}'; - $document->addScriptDeclaration($js_right); - } - else - { - $css = 'ul#jj_sl_navigation li { ' - . 'right: -138px;' - . 'position:relative;' - . '-webkit-transition: right 0.3s;' - . '-moz-transition: right 0.3s;' - . '-ms-transition: right 0.3s;' - . '-o-transition: right 0.3s;' - . 'transition: right 0.3s;' - . '}'; - } + $css .= 'ul#jj_sl_navigation li { ' + . 'right: 0;' + . 'position:relative;' + . '-webkit-transition: right 0.3s;' + . '-moz-transition: right 0.3s;' + . '-ms-transition: right 0.3s;' + . '-o-transition: right 0.3s;' + . 'transition: right 0.3s;' + . '}'; + + $css .= 'ul#jj_sl_navigation { ' + . $position . ':-140px;' + . $params->get('top_bottom', 'top') . ':' . $params->get('top') . 'px;' + . '}' + . 'ul#jj_sl_navigation li:hover { ' + . 'right: 140px;' + . '}' + . 'ul#jj_sl_navigation li a { ' + . 'padding: 11px 10px 11px 0px;' + . '}'; - $style = ""; - $style .= 'ul#jj_sl_navigation { ' - . $position . ':0px;' - . $params->get('top_bottom', 'top') . ':' . $params->get('top') . 'px;' - . '}' - . 'ul#jj_sl_navigation li:hover { ' - . 'right: 0px;' - . '}' - . 'ul#jj_sl_navigation li a { ' - . 'padding: 11px 10px 11px 0px;' - . '}'; - foreach ($slides as $slide => $social){ - if (strpos($social, "custom") === false) - { - $style .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { - background-position: 4px 50%; - background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $social . '-' . $params->get('icon_colour') . '.png); - }'; - } - else - { - $style .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { - background-position: 4px 50%; - background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $params->get( $social . '_image') . '); - }'; - } - } + foreach ($slides as $slide => $social){ + if (strpos($social, "custom") === false) + { + $css .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { + background-position: 4px 50%; + background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $social . '-' . $params->get('icon_colour') . '.png); + }'; + } + else + { + $css .= 'ul#jj_sl_navigation .jj_sl_' . $social . ' a { + background-position: 4px 50%; + background-image: url(' . JUri::root() . 'media/mod_social_slider/icons/' . $params->get( $social . '_image') . '); + }'; + } + } } -$custom_css = 'ul#jj_sl_navigation .jj_sl_custom1 a:hover{ - background-color: ' . $params->get('custom1_colour') . '; - } - ul#jj_sl_navigation .jj_sl_custom2 a:hover{ - background-color: ' . $params->get('custom2_colour') . '; - } - ul#jj_sl_navigation .jj_sl_custom3 a:hover{ - background-color: ' . $params->get('custom3_colour') . '; - } - ul#jj_sl_navigation .jj_sl_custom4 a:hover{ - background-color: ' . $params->get('custom4_colour') . '; - } - ul#jj_sl_navigation .jj_sl_custom5 a:hover{ - background-color: ' . $params->get('custom5_colour') . '; - }'; -$document->addStyleDeclaration($custom_css); -$document->addStyleDeclaration($style); -$document->addStyleDeclaration($css); +$css .= 'ul#jj_sl_navigation .jj_sl_custom1 a:hover{ + background-color: ' . $params->get('custom1_colour') . '; + } + ul#jj_sl_navigation .jj_sl_custom2 a:hover{ + background-color: ' . $params->get('custom2_colour') . '; + } + ul#jj_sl_navigation .jj_sl_custom3 a:hover{ + background-color: ' . $params->get('custom3_colour') . '; + } + ul#jj_sl_navigation .jj_sl_custom4 a:hover{ + background-color: ' . $params->get('custom4_colour') . '; + } + ul#jj_sl_navigation .jj_sl_custom5 a:hover{ + background-color: ' . $params->get('custom5_colour') . '; + }'; + +$doc->addStyleDeclaration($css); require JModuleHelper::getLayoutPath('mod_social_slider'); diff --git a/mod_social_slider/mod_social_slider.xml b/mod_social_slider/mod_social_slider.xml index a92e427..bed81f0 100644 --- a/mod_social_slider/mod_social_slider.xml +++ b/mod_social_slider/mod_social_slider.xml @@ -7,7 +7,7 @@