#9073 order by language tips
This commit is contained in:
parent
8ea9a0fc7e
commit
d8cfc68585
|
@ -190,6 +190,7 @@ class TipsWindow
|
|||
|
||||
public function getRandomTip($return=false)
|
||||
{
|
||||
global $config;
|
||||
$exclude = get_parameter('exclude', '');
|
||||
|
||||
$sql = 'SELECT id, title, text, url
|
||||
|
@ -203,7 +204,7 @@ class TipsWindow
|
|||
}
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY RAND()';
|
||||
$sql .= ' ORDER BY CASE WHEN id_lang = "'.$config['language'].'" THEN id_lang END DESC, RAND()';
|
||||
|
||||
$tip = db_get_row_sql($sql);
|
||||
|
||||
|
@ -684,7 +685,7 @@ class TipsWindow
|
|||
$res = db_process_sql_insert(
|
||||
'twelcome_tip_file',
|
||||
[
|
||||
'twelcome_tip_file' => $idTip,
|
||||
'twelcome_tip_file' => $id,
|
||||
'filename' => $image,
|
||||
'path' => 'images/tips/',
|
||||
]
|
||||
|
|
|
@ -18,9 +18,6 @@ $(document).ready(function() {
|
|||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
$(".carousel .images").ready(function() {
|
||||
activeCarousel();
|
||||
});
|
||||
|
||||
$("#checkbox_tips_startup").ready(function() {
|
||||
$("#checkbox_tips_startup").on("click", function() {
|
||||
|
@ -263,6 +260,7 @@ function load_tips_modal(settings) {
|
|||
$(".dialog_tips .ui-dialog-titlebar").addClass("tips_header");
|
||||
$(".dialog_tips .ui-dialog-titlebar").removeClass("ui-helper-clearfix");
|
||||
render_counter();
|
||||
activeCarousel();
|
||||
},
|
||||
error: function(data) {
|
||||
console.error(data);
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 464px;
|
||||
max-height: 290px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding-top: 20px;
|
||||
|
@ -186,6 +185,7 @@ span.disable {
|
|||
.image-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
.image-tip img {
|
||||
max-width: 350px;
|
||||
|
|
Loading…
Reference in New Issue