From 0b03f8ed5a47e34ca7780f32b177b0aa6b0eb6de Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 28 Nov 2012 18:56:52 -0800 Subject: [PATCH] Tooltips working again on frontend --- .../shortcodes/batch/signup_shortcodes.php | 7 +- e107_themes/bootstrap/theme.php | 11 +-- e107_themes/templates/header_default.php | 10 ++- e107_themes/templates/signup_template.php | 9 ++- e107_web/js/bootstrap/css/tooltip.css | 72 +++++++++++++++++++ e107_web/js/core/front.jquery.js | 18 ++--- 6 files changed, 105 insertions(+), 22 deletions(-) create mode 100644 e107_web/js/bootstrap/css/tooltip.css diff --git a/e107_core/shortcodes/batch/signup_shortcodes.php b/e107_core/shortcodes/batch/signup_shortcodes.php index 13173383f..eb00957f7 100755 --- a/e107_core/shortcodes/batch/signup_shortcodes.php +++ b/e107_core/shortcodes/batch/signup_shortcodes.php @@ -118,7 +118,10 @@ class signup_shortcodes extends e_shortcode function sc_signup_signup_text() { - global $pref, $tp, $SIGNUP_TEXT; + global $SIGNUP_TEXT; + $pref = e107::getPref(); + $tp = e107::getParser(); + if($pref['signup_text']) { @@ -126,7 +129,7 @@ class signup_shortcodes extends e_shortcode } elseif($pref['user_reg_veri']) { - return $SIGNUP_TEXT; + return $SIGNUP_TEXT." "; } } diff --git a/e107_themes/bootstrap/theme.php b/e107_themes/bootstrap/theme.php index 8a87e9233..bf0f46e20 100644 --- a/e107_themes/bootstrap/theme.php +++ b/e107_themes/bootstrap/theme.php @@ -1,10 +1,13 @@ requireCoreLib('core/decorate.js') - ->requireCoreLib('core/tabs.js'); +define("VIEWPORT","width=device-width, initial-scale=1.0"); + +e107::lan('theme'); +e107::js('core','bootstrap/js/bootstrap.min.js'); +e107::css('core','bootstrap/css/bootstrap.min.css'); +e107::css('core','bootstrap/css/bootstrap-responsive.min.css'); +e107::css('core','bootstrap/css/jquery-ui.custom.css'); //$register_sc[]='FS_ADMIN_ALT_NAV'; $no_core_css = TRUE; diff --git a/e107_themes/templates/header_default.php b/e107_themes/templates/header_default.php index d1e403523..b4dc4015c 100644 --- a/e107_themes/templates/header_default.php +++ b/e107_themes/templates/header_default.php @@ -23,13 +23,19 @@ define('ADMIN_AREA',FALSE); $e107 = e107::getInstance(); $e107->sql->db_Mark_Time('(Header Top)'); + + e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2); e107::css('core', 'colorbox/colorbox.css', 'jquery'); // Used for Signup form elements - could be on any page of the site. e107::js('core', 'jquery.mailcheck.min.js','jquery',2); -e107::js("core", "tooltip/jquery.tipsy.js","jquery",3); -e107::css('core', 'tooltip/tipsy.css', 'jquery'); + +e107::js('core','bootstrap/js/bootstrap-tooltip.js','jquery'); +e107::css('core','bootstrap/css/tooltip.css','jquery'); + +//e107::js("core", "tooltip/jquery.tipsy.js","jquery",3); +// e107::css('core', 'tooltip/tipsy.css', 'jquery'); // ------------------ e107::js('core', 'jquery.elastic.js', 'jquery', 2); diff --git a/e107_themes/templates/signup_template.php b/e107_themes/templates/signup_template.php index 2edccaab6..32da56593 100755 --- a/e107_themes/templates/signup_template.php +++ b/e107_themes/templates/signup_template.php @@ -187,11 +187,10 @@ if(!defined($COPPA_FAIL)) if(!defined($SIGNUP_TEXT)) { - $SIGNUP_TEXT = - "{SIGNUP_SIGNUP_TEXT}
". - LAN_SIGNUP_80." ".LAN_SIGNUP_29."

". - LAN_SIGNUP_30."
". - LAN_SIGNUP_85; + $SIGNUP_TEXT = $tp->parseTemplate("{SIGNUP_SIGNUP_TEXT}"); // . + //LAN_SIGNUP_80." ".LAN_SIGNUP_29."

". + //LAN_SIGNUP_30."
". + //LAN_SIGNUP_85; } if(!defined($SIGNUP_BEGIN)) diff --git a/e107_web/js/bootstrap/css/tooltip.css b/e107_web/js/bootstrap/css/tooltip.css new file mode 100644 index 000000000..7c472d48e --- /dev/null +++ b/e107_web/js/bootstrap/css/tooltip.css @@ -0,0 +1,72 @@ +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + padding: 5px; + font-size: 11px; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; +} +.tooltip.right { + margin-left: 3px; +} +.tooltip.bottom { + margin-top: 3px; +} +.tooltip.left { + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} \ No newline at end of file diff --git a/e107_web/js/core/front.jquery.js b/e107_web/js/core/front.jquery.js index 9ba6e13ae..5f1c38f18 100644 --- a/e107_web/js/core/front.jquery.js +++ b/e107_web/js/core/front.jquery.js @@ -2,31 +2,31 @@ $(document).ready(function() { - // $(":input").tipsy({gravity: 'w',fade: true, live: true}); - + $(":input").tooltip(); + /* $(":input,label,.e-tip").each(function() { var field = $(this).nextAll(".field-help"); if(field.length == 0) { - $(this).tipsy({gravity: 'sw',fade: true, live: true}); // Normal 'title' attribute + $(this).tooltip({placement: 'right',fade: true}); // Normal 'title' attribute return; } field.hide(); - $(this).tipsy({ + $(this).tooltip({ title: function() { return field.html(); // field-help when HTML is required. }, fade: true, live: true, html: true, - gravity: 'sw' + placement: 'right' }); }); - + */ // var color = $(".divider").parents().css("background-color"); @@ -50,7 +50,7 @@ $(document).ready(function() data: data, success: function(data) { - // alert(data); + // alert(data); // console.log(data); var a = $.parseJSON(data); @@ -62,11 +62,11 @@ $(document).ready(function() } else if(sort == 'desc') { - $(a.html).prependTo('#comments-container').hide().slideDown(800); + $(a.html).prependTo('#comments-container').hide().slideDown(800); // FIXME - works in jquery 1.7, not 1.8 } else { - $(a.html).appendTo('#comments-container').hide().slideDown(800); + $(a.html).appendTo('#comments-container').hide().slideDown(800); // FIXME - works in jquery 1.7, not 1.8 alert('Thank you for commenting'); // possibly needed as the submission may go unoticed by the user }