#9073 fixed bug in firts tips
This commit is contained in:
parent
dfb93d2cf5
commit
ad4750c409
|
@ -145,7 +145,6 @@ class TipsWindow
|
|||
|
||||
<script>
|
||||
var totalTips = <?php echo $this->totalTips; ?>;
|
||||
var idTips = [<?php echo $initialTip['id']; ?>];
|
||||
var url = '<?php echo ui_get_full_url('ajax.php'); ?>';
|
||||
var page = '<?php echo $this->ajaxController; ?>';
|
||||
</script>
|
||||
|
@ -177,6 +176,7 @@ class TipsWindow
|
|||
'text' => $initialTip['text'],
|
||||
'url' => $initialTip['url'],
|
||||
'files' => $initialTip['files'],
|
||||
'id' => $initialTip['id'],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* globals $, idTips, totalTips, idTips, url, page */
|
||||
/* globals $, idTips, totalTips, url, page */
|
||||
$(".carousel .images").ready(function() {
|
||||
if ($(".carousel .images img").length > 1) {
|
||||
$(".carousel .images").bxSlider({ controls: true });
|
||||
|
@ -79,6 +79,8 @@ function render_counter() {
|
|||
}
|
||||
|
||||
function next_tip() {
|
||||
console.log(JSON.stringify(idTips));
|
||||
console.log(totalTips);
|
||||
if (idTips.length >= totalTips) {
|
||||
idTips = [];
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* ============================================================================
|
||||
*/
|
||||
$output = '';
|
||||
|
||||
$output .= '<script>var idTips = ['.$id.'];</script>';
|
||||
$output .= '<div class="window">';
|
||||
$output .= '<div class="tips_header">';
|
||||
$output .= '<p class="title">'.__('Hello! These are the tips of the day.').'</p>';
|
||||
|
|
Loading…
Reference in New Issue