mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix contact image bug in Messages.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -88,10 +88,10 @@
|
||||
echo " #message_new_layer {\n";
|
||||
echo " z-index: 999999;\n";
|
||||
echo " position: absolute;\n";
|
||||
echo " left: 0px;\n";
|
||||
echo " top: 0px;\n";
|
||||
echo " right: 0px;\n";
|
||||
echo " bottom: 0px;\n";
|
||||
echo " left: 0;\n";
|
||||
echo " top: 0;\n";
|
||||
echo " right: 0;\n";
|
||||
echo " bottom: 0;\n";
|
||||
echo " text-align: center;\n";
|
||||
echo " vertical-align: middle;\n";
|
||||
echo " }\n";
|
||||
@@ -115,10 +115,10 @@
|
||||
echo " #message_media_layer {\n";
|
||||
echo " z-index: 999999;\n";
|
||||
echo " position: absolute;\n";
|
||||
echo " left: 0px;\n";
|
||||
echo " top: 0px;\n";
|
||||
echo " right: 0px;\n";
|
||||
echo " bottom: 0px;\n";
|
||||
echo " left: 0;\n";
|
||||
echo " top: 0;\n";
|
||||
echo " right: 0;\n";
|
||||
echo " bottom: 0;\n";
|
||||
echo " text-align: center;\n";
|
||||
echo " vertical-align: middle;\n";
|
||||
echo " }\n";
|
||||
@@ -255,7 +255,7 @@
|
||||
echo " function load_thread(number, contact_uuid) {\n";
|
||||
echo " clearTimeout(timer_thread);\n";
|
||||
echo " $('#thread').load('messages_thread.php?number=' + encodeURIComponent(number) + '&contact_uuid=' + encodeURIComponent(contact_uuid), function(){\n";
|
||||
echo " $('div#thread_messages').animate({ 'max-height': $(window).height() - 450 }, 200, function() {\n";
|
||||
echo " $('div#thread_messages').animate({ 'max-height': $(window).height() - 470 }, 200, function() {\n";
|
||||
echo " $('#thread_messages').scrollTop(Number.MAX_SAFE_INTEGER);\n"; //chrome
|
||||
echo " $('span#thread_bottom')[0].scrollIntoView(true);\n"; //others
|
||||
//note: the order of the above two lines matters!
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
echo " function refresh_thread(number, contact_uuid, onsent) {\n";
|
||||
echo " $('#thread_messages').load('messages_thread.php?refresh=true&number=' + encodeURIComponent(number) + '&contact_uuid=' + encodeURIComponent(contact_uuid), function(){\n";
|
||||
echo " $('div#thread_messages').animate({ 'max-height': $(window).height() - 450 }, 200, function() {\n";
|
||||
echo " $('div#thread_messages').animate({ 'max-height': $(window).height() - 470 }, 200, function() {\n";
|
||||
echo " $('#thread_messages').scrollTop(Number.MAX_SAFE_INTEGER);\n"; //chrome
|
||||
echo " $('span#thread_bottom')[0].scrollIntoView(true);\n"; //others
|
||||
//note: the order of the above two lines matters!
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
|
||||
if (!is_null(array_diff($numbers, $destinations))) {
|
||||
$numbers = array_diff($numbers, $destinations);
|
||||
$numbers = array_diff($numbers, $destinations);
|
||||
}
|
||||
|
||||
//get contact (primary attachment) images and cache them
|
||||
@@ -222,4 +222,4 @@
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -220,23 +220,20 @@
|
||||
//message bubble
|
||||
echo "<span class='message-bubble message-bubble-".($message['message_direction'] == 'inbound' ? 'em' : 'me')."'>";
|
||||
//contact image em
|
||||
if (
|
||||
$message['message_direction'] == 'inbound' &&
|
||||
is_array($_SESSION['tmp']['messages']['contact_em'][$contact_uuid]) &&
|
||||
@sizeof($_SESSION['tmp']['messages']['contact_em'][$contact_uuid]) != 0
|
||||
) {
|
||||
echo "<div class='message-bubble-image-em'>\n";
|
||||
echo " <img class='message-bubble-image-em'><br />\n";
|
||||
echo "</div>\n";
|
||||
if ($message['message_direction'] == 'inbound') {
|
||||
if (is_array($_SESSION['tmp']['messages']['contact_em'][$contact_uuid]) && @sizeof($_SESSION['tmp']['messages']['contact_em'][$contact_uuid]) != 0) {
|
||||
echo "<div class='message-bubble-image-em'>\n";
|
||||
echo " <img class='message-bubble-image-em'><br />\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
//contact image me
|
||||
else if (
|
||||
is_array($_SESSION['tmp']['messages']['contact_me']) &&
|
||||
@sizeof($_SESSION['tmp']['messages']['contact_me']) != 0
|
||||
) {
|
||||
echo "<div class='message-bubble-image-me'>\n";
|
||||
echo " <img class='message-bubble-image-me'><br />\n";
|
||||
echo "</div>\n";
|
||||
else {
|
||||
if (is_array($_SESSION['tmp']['messages']['contact_me']) && @sizeof($_SESSION['tmp']['messages']['contact_me']) != 0) {
|
||||
echo "<div class='message-bubble-image-me'>\n";
|
||||
echo " <img class='message-bubble-image-me'><br />\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
echo "<div style='display: table;'>\n";
|
||||
//message
|
||||
@@ -335,4 +332,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user