diff options
| author | lsces <lester@lsces.co.uk> | 2014-06-04 00:13:51 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2014-06-04 00:13:51 +0100 |
| commit | 165301fd4856a37933de9dd6c86fa45fba9d1e06 (patch) | |
| tree | 46ed4d96e507dc243892543880a7250511b6d9c4 | |
| parent | 1246086c12971ce78fd98667597da7b0f2eeecaf (diff) | |
| download | themes-165301fd4856a37933de9dd6c86fa45fba9d1e06.tar.gz themes-165301fd4856a37933de9dd6c86fa45fba9d1e06.tar.bz2 themes-165301fd4856a37933de9dd6c86fa45fba9d1e06.zip | |
Local file hosting in place of google
| -rw-r--r-- | BitSmarty.php | 2 | ||||
| -rw-r--r-- | BitThemes.php | 19 | ||||
| -rw-r--r-- | bit_setup_inc.php | 2 | ||||
| -rw-r--r-- | smartyplugins/function.html_select_date.php | 16 | ||||
| -rw-r--r-- | smartyplugins/function.html_select_time.php | 18 | ||||
| -rw-r--r-- | smartyplugins/function.jscalendar.php | 2 |
6 files changed, 29 insertions, 30 deletions
diff --git a/BitSmarty.php b/BitSmarty.php index f7a0543..e1db91d 100644 --- a/BitSmarty.php +++ b/BitSmarty.php @@ -14,7 +14,7 @@ * required setup */ -require_once( dirname( __FILE__ ).'/smarty/libs/SmartyBC.class.php' ); +require_once( '/srv/website/externals/smarty/libs/SmartyBC.class.php' ); /** diff --git a/BitThemes.php b/BitThemes.php index 7a5bf7d..760d20e 100644 --- a/BitThemes.php +++ b/BitThemes.php @@ -1512,13 +1512,22 @@ class BitThemes extends BitSingleton { case 'jquerylocal': $joined = FALSE; if( defined( 'IS_LIVE' ) && IS_LIVE ) { - $this->loadJavascript( $pLibPath.'js/jquery.min.js', FALSE, $pos++, $joined ); - $this->loadJavascript( $pLibPath.'js/jquery-ui.custom.min.js', FALSE, $pos++, $joined ); + $this->loadJavascript( CONFIG_PKG_PATH.'js/jquery.min.js', FALSE, $pos++, $joined ); + $this->loadJavascript( CONFIG_PKG_PATH.'js/jquery-ui-1.10.3.custom.min.js', FALSE, $pos++, $joined ); + $this->loadJavascript( CONFIG_PKG_PATH.'js/bootstrap.min.js', FALSE, $pos++, $joined ); +// $this->loadJavascript( CONFIG_PKG_PATH.'ink/js/autoload.js', FALSE, $pos++, $joined ); +// $this->loadCss( CONFIG_PKG_PATH.'css/pepper-grinder/jquery-ui-1.10.3.custom.min.css', FALSE, $pos++, $joined ); +// $this->loadCss( CONFIG_PKG_PATH.'ink/css/ink.css', FALSE, $pos++, $joined ); +// $this->loadCss( CONFIG_PKG_PATH.'ink/css/colourstrap-icons.css', FALSE, $pos++, $joined ); } else { - $this->loadJavascript( $pLibPath.'development-bundle/jquery.js', FALSE, $pos++, $joined ); - $this->loadJavascript( $pLibPath.'development-bundle/ui/jquery-ui.custom.js', FALSE, $pos++, $joined ); + $this->loadJavascript( CONFIG_PKG_PATH.'js/jquery.js', FALSE, $pos++, $joined ); + $this->loadJavascript( CONFIG_PKG_PATH.'js/jquery-ui-1.10.3.custom.js', FALSE, $pos++, $joined ); + $this->loadJavascript( CONFIG_PKG_PATH.'js/bootstrap.js', FALSE, $pos++, $joined ); +// $this->loadJavascript( CONFIG_PKG_PATH.'ink/js/autoload.js', FALSE, $pos++, $joined ); +// $this->loadCss( CONFIG_PKG_PATH.'css/pepper-grinder/jquery-ui-1.10.3.custom.css', FALSE, $pos++, $joined ); +// $this->loadCss( CONFIG_PKG_PATH.'ink/css/ink.css', FALSE, $pos++, $joined ); +// $this->loadCss( CONFIG_PKG_PATH.'ink/css/colourstrap-icons.css', FALSE, $pos++, $joined ); } - $this->loadCss( UTIL_PKG_PATH.'javascript/libs/jquery/development-bundle/themes/base/jquery.ui.all.css' ); case 'yui': $this->loadJavascript( $pLibPath.'yuiloader-dom-event/yuiloader-dom-event.js', FALSE, $pos++ ); break; diff --git a/bit_setup_inc.php b/bit_setup_inc.php index 1bf967e..f54f1ec 100644 --- a/bit_setup_inc.php +++ b/bit_setup_inc.php @@ -35,7 +35,7 @@ $gBitSmarty->assign_by_ref( 'gBitThemes', $gBitThemes ); // load some core javascript files $gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/bitweaver.js', TRUE, 1 ); -$gBitThemes->loadAjax( 'jquery' ); +$gBitThemes->loadAjax( 'jquerylocal' ); if( !$gBitSystem->isFeatureActive( 'site_disable_fat' )) { $gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/libs/fat.js', TRUE, 50 ); diff --git a/smartyplugins/function.html_select_date.php b/smartyplugins/function.html_select_date.php index ef0f8d7..fc0609d 100644 --- a/smartyplugins/function.html_select_date.php +++ b/smartyplugins/function.html_select_date.php @@ -18,7 +18,7 @@ * and end year values. (Monte) * - 1.2 added support for yyyy-mm-dd syntax for * time value. (Jan Rosier) - * - 1.3 added support for choosing format for + * - 1.3 added support for choosing format for * month values (Gary Loescher) * - 1.3.1 added support for choosing format for * day values (Marcus Bointon) @@ -33,8 +33,6 @@ function smarty_function_html_select_date($params, &$pSmarty) { global $gBitSystem; - $pSmarty->loadPlugin( 'smarty_modifier_make_timestamp' ); - $pSmarty->loadPlugin( 'smarty_modifier_html_options' ); /* Default values. */ $prefix = "Date_"; $start_year = strftime("%Y"); @@ -79,19 +77,17 @@ function smarty_function_html_select_date($params, &$pSmarty) // If $time is not in format yyyy-mm-dd if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $time)) { // then $time is empty or unix timestamp or mysql timestamp - // using smarty_make_timestamp to get an unix timestamp and // strftime to make yyyy-mm-dd // Just in case the offset moves us into another day. - $time = smarty_make_timestamp($time); $date = new BitDate(0); // sets the offset for the user - necessary because BitDate is a bitwack $offset = $date->get_display_offset(); $time = $date->getDisplayDateFromUTC( $time ); - $time = $gBitSystem->mServerTimestamp->strftime('%Y-%m-%d', smarty_make_timestamp($time), TRUE); + $time = $gBitSystem->mServerTimestamp->strftime('%Y-%m-%d', $time, TRUE); } // Now split this in pieces, which later can be used to set the select $time = explode("-", $time); - + // make syntax "+N" or "-N" work with start_year and end_year if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) { if ($match[1] == '+') { @@ -107,7 +103,7 @@ function smarty_function_html_select_date($params, &$pSmarty) $start_year = strftime('%Y') - $match[2]; } } - + $field_order = strtoupper($field_order); $html_result = $month_result = $day_result = $year_result = ""; @@ -143,13 +139,13 @@ function smarty_function_html_select_date($params, &$pSmarty) $month_result .= ' ' . $all_extra; } $month_result .= '>'."\n"; - + $month_result .= smarty_function_html_options(array('output' => $month_names, 'values' => $month_values, 'selected' => $month_values[$time[1]-1], 'print_result' => false), $pSmarty); - + $month_result .= '</select>'; } diff --git a/smartyplugins/function.html_select_time.php b/smartyplugins/function.html_select_time.php index 179b0d6..616d233 100644 --- a/smartyplugins/function.html_select_time.php +++ b/smartyplugins/function.html_select_time.php @@ -17,13 +17,10 @@ * @param array * @param Smarty * @return string - * @uses smarty_make_timestamp() */ function smarty_function_html_select_time($params, &$gBitSmarty) { global $gBitSystem; - $gBitSmarty->loadPlugin( 'smarty_modifier_make_timestamp' ); - $gBitSmarty->loadPlugin( 'smarty_modifier_html_options' ); /* Default values. */ $prefix = "Time_"; $time = time(); @@ -47,7 +44,6 @@ function smarty_function_html_select_time($params, &$gBitSmarty) extract($params); - $time = smarty_make_timestamp($time); $date = new BitDate(0); // sets the offset for the user - necessary because BitDate is a bitwack $offset = $date->get_display_offset(); @@ -99,7 +95,7 @@ function smarty_function_html_select_time($params, &$gBitSmarty) $html_result .= ' ' . $all_extra; } $html_result .= '>'."\n"; - + $html_result .= smarty_function_html_options(array('output' => $minutes, 'values' => $minutes, 'selected' => $selected, @@ -119,7 +115,7 @@ function smarty_function_html_select_time($params, &$gBitSmarty) } else { $html_result .= '"' . $prefix . 'Second"'; } - + if (null !== $second_extra){ $html_result .= ' ' . $second_extra; } @@ -127,7 +123,7 @@ function smarty_function_html_select_time($params, &$gBitSmarty) $html_result .= ' ' . $all_extra; } $html_result .= '>'."\n"; - + $html_result .= smarty_function_html_options(array('output' => $seconds, 'values' => $seconds, 'selected' => $selected, @@ -144,7 +140,7 @@ function smarty_function_html_select_time($params, &$gBitSmarty) } else { $html_result .= '"' . $prefix . 'Meridian"'; } - + if (null !== $meridian_extra){ $html_result .= ' ' . $meridian_extra; } @@ -152,7 +148,7 @@ function smarty_function_html_select_time($params, &$gBitSmarty) $html_result .= ' ' . $all_extra; } $html_result .= '>'."\n"; - + $html_result .= smarty_function_html_options(array('output' => array('AM', 'PM'), 'values' => array('am', 'pm'), 'selected' => $selected, @@ -165,9 +161,9 @@ function smarty_function_html_select_time($params, &$gBitSmarty) // Enforce LTR direction of time entry regardless of overall directionality. // - print $html_result; // + print '<span dir="ltr">'.$html_result.'</span>'; - + $html_result = '<span dir="ltr">' . $html_result . '</span>'; - + return $html_result; } diff --git a/smartyplugins/function.jscalendar.php b/smartyplugins/function.jscalendar.php index 93e31fa..6941195 100644 --- a/smartyplugins/function.jscalendar.php +++ b/smartyplugins/function.jscalendar.php @@ -23,8 +23,6 @@ function smarty_function_jscalendar($params, &$gBitSmarty) { global $gBitSystem; if( $gBitSystem->isFeatureActive( 'site_use_jscalendar' ) ) { - //$gBitSmarty->loadPlugin( 'smarty_modifier_make_timestamp' ); - //$gBitSmarty->loadPlugin( 'smarty_modifier_html_options' ); // Default values $inputField = ''; // ID of the input field |
