diff --git a/admin/survey/classes/class.Notifications.php b/admin/survey/classes/class.Notifications.php index 9fe657420..2c70dcef6 100644 --- a/admin/survey/classes/class.Notifications.php +++ b/admin/survey/classes/class.Notifications.php @@ -33,10 +33,8 @@ class Notifications { echo '

'.$lang['srv_notifications_sent'].'

'; echo ''; - echo '
'; $this->displaySentMessages(); echo '
'; - echo ''; // obrazec za posiljanje sporocil echo '
'; @@ -57,19 +55,33 @@ class Notifications { } // Prikazemo prejeta sporocila else{ + + echo '
'; + echo '
'; + echo '

'.$lang['srv_notifications_recieved'].'

'; + echo '
'; + + echo '
'; + + echo '
'; echo '
'; $this->displayRecievedMessages(); echo '
'; + echo '
'; + echo '
'; echo ''; + echo '
'; + + + echo '
'; + } } private function displayRecievedMessages($active=0){ global $admin_type, $global_user_id, $lang; - echo ''.$lang['srv_notifications_recieved'].':'; - // Napolnimo array prejetih sporocil $recievedMessages = array(); @@ -113,11 +125,12 @@ class Notifications { $sentMessages[$row['id']] = $row; } - echo ''; + echo '
'; } - - echo ''; + else //Ni poslanih sporočil + echo '

'.$lang['srv_notifications_sent_none'].'.

'; } // Obrazec za posiljanje sporocila @@ -182,8 +197,10 @@ class Notifications { echo ''; // Besedilo sporocila (editor) - echo ''; + echo $lang['srv_notifications_send_text'].':'; + echo '
'; echo ''; + echo '
'; // Avtomatsko prikaži obvestilo po prijavi echo '
'; @@ -191,15 +208,16 @@ class Notifications { echo ''; echo '
'; - echo '
'; + //Error notes + if($note != ''){ + echo '

'.$note.'

'; + } + + // Gumb pošlji + echo '
'; echo ''; echo '
'; - if($note != ''){ - echo '

'; - echo ''.$note.''; - } - echo '
'; // Inicializiramo editor @@ -314,7 +332,7 @@ class Notifications { $sql = sisplet_query("INSERT INTO srv_notifications (message_id, recipient, viewed) VALUES ('".$message_id."', '".$rowU['id']."', '0')"); if(!$sql) - $note .= mysqli_error($GLOBALS['connect_db']).'
'; + $note .= ''.mysqli_error($GLOBALS['connect_db']).''; } } // Posiljamo na specificen mail @@ -331,12 +349,12 @@ class Notifications { // Dodamo novo sporocilo v bazo $sql = sisplet_query("INSERT INTO srv_notifications (message_id, recipient, viewed) VALUES ('".$message_id."', '".$rowU['id']."', '0')"); if(!$sql) - $note = mysqli_error($GLOBALS['connect_db']); + $note = ''.mysqli_error($GLOBALS['connect_db']).''; else $note = 'Sporočilo je bilo uspešno poslano uporabniku '.$recipient.' ('.$rowU['name'].' '.$rowU['surname'].').'; } else{ - $note = 'Vnešeni email ('.$recipient.') ne pripada nobenemu uporabniku!'; + $note = 'Vnešeni email ('.$recipient.') ne pripada nobenemu uporabniku!'; } } @@ -356,7 +374,6 @@ class Notifications { echo ''; // Refresh obrazca za posiljanje sporocil - echo '
'; echo '
'; diff --git a/admin/survey/script/script.js b/admin/survey/script/script.js index f9d36d4a4..75d095e41 100644 --- a/admin/survey/script/script.js +++ b/admin/survey/script/script.js @@ -1616,6 +1616,10 @@ function create_editor_notification(id) { this.execCommand('selectAll'); }); + if (id == 'notification') + CKEDITOR.config.resize_enabled = false; + CKEDITOR.config.height = 238; + editor_init = true; } diff --git a/lang/1.php b/lang/1.php index 3846c3f04..8622dec32 100644 --- a/lang/1.php +++ b/lang/1.php @@ -7194,6 +7194,7 @@ $lang = array ( 'srv_notifications' => "Sporočila", 'srv_notifications_recieved' => "Prejeta sporočila", 'srv_notifications_sent' => "Poslana sporočila", + 'srv_notifications_sent_none' => "Ni poslanih sporočil", 'srv_notifications_sent_resolve' => "Razreši neprebrane", 'srv_notifications_unread' => "Neprebrana sporočila", 'srv_notifications_alert' => "Imate novo neprebrano sporočilo!", @@ -7201,7 +7202,7 @@ $lang = array ( 'srv_notifications_send_reciever2' => "Prejemnik (e-pošta)", 'srv_notifications_send_reciever2' => "Prejemniki", 'srv_notifications_send_title' => "Naslov", - 'srv_notifications_send_text' => "Besedilo", + 'srv_notifications_send_text' => "Sporočilo", 'srv_notifications_send' => "Pošlji", 'srv_notifications_save_send' => "Shrani in pošlji", 'srv_notifications_send_all_slo' => "Vsi slovenski uporabniki", diff --git a/lang/2.php b/lang/2.php index eb3dba08d..1e351c498 100644 --- a/lang/2.php +++ b/lang/2.php @@ -7077,6 +7077,7 @@ $lang = array ( 'srv_notifications' => "Notifications", 'srv_notifications_recieved' => "Received notifications", 'srv_notifications_sent' => "Sent notifications", + 'srv_notifications_sent_none' => "No sent notifications", 'srv_notifications_sent_resolve' => "Resolve unread", 'srv_notifications_unread' => "Unread messages", 'srv_notifications_alert' => "You have new unread message!", diff --git a/public/css/admin_new.css b/public/css/admin_new.css index 3ce1afed7..0eba585c4 100644 --- a/public/css/admin_new.css +++ b/public/css/admin_new.css @@ -22508,75 +22508,61 @@ div.page_obvestila #notifications .notifications_content .notifications_content_ box-sizing: border-box; width: 50%; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list { overflow-y: auto; border: solid 1px #E5E5E5; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul { padding-left: 0; margin-block-start: 0; + margin-block-end: 0; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li { box-sizing: border-box; list-style-type: none; margin: 0; padding: 16px; - min-height: 58px; + min-height: 78px; background-color: #FFFFFF; border-bottom: solid 1px #E5E5E5; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li:last-of-type { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li:last-of-type, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li:last-of-type { border-bottom: none; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.title_row { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.title_row, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li div.title_row { display: flex; flex-direction: row; margin-bottom: 8px; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.title_row div.subject { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.title_row div.subject, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li div.title_row div.subject { font-weight: 600; margin-right: 8px; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.title_row div.date { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.title_row div.date, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li div.title_row div.date { font-style: italic; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.content { +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li div.content, +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li div.content { font-size: 14px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } -div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li.unread { - border: 1px #FF0000 solid; - background-color: #FF0000; -} -div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list { - display: inline; - float: left; - width: 470px; - min-height: 200px; - margin-right: 60px; -} -div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul { - padding-left: 0; -} -div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li { - list-style-type: none; - margin: 5px 0; - padding: 5px 8px; - background-color: #1E88E5; - border: 1px #1E88E5 solid; -} -div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li:hover { - cursor: pointer; - background-color: #1E88E5; - border: 1px #1E88E5 solid; -} -div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li.unread { - border: 1px #FF0000 solid; - background-color: #FF0000; -} +div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul li.active, div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li.active { cursor: pointer; border: 1px #1E88E5 solid; } +div.page_obvestila #notifications .notifications_content .notifications_content_left .recieved_list ul li { + cursor: pointer; +} div.page_obvestila #notifications .notifications_content .notifications_content_right { display: flex; flex-direction: column; @@ -22597,18 +22583,19 @@ div.page_obvestila #notifications .notifications_content .notifications_content_ } div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder .setting_item label { margin-right: 8px; + cursor: pointer; } div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder .setting_item input.text { width: 250px; height: 28px; padding: 3px 5px; + margin-top: 0; } div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form input.text { width: 100%; } -div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form label { - margin-bottom: 4px; - cursor: text; +div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form div.label { + margin-top: 4px; } div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form textarea { width: 100%; @@ -22621,6 +22608,9 @@ div.page_obvestila #notifications .notifications_content .notifications_content_ margin-top: 32px; margin-bottom: 0; } +div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form div.button_holder.top16 { + margin-top: 16px; +} div.page_obvestila #notifications .notifications_content #message { display: inline; float: left; diff --git a/resources/sass/admin_new/pages/sporocila/sporocila.scss b/resources/sass/admin_new/pages/sporocila/sporocila.scss index c44bcdf0c..e18c26d0c 100644 --- a/resources/sass/admin_new/pages/sporocila/sporocila.scss +++ b/resources/sass/admin_new/pages/sporocila/sporocila.scss @@ -62,20 +62,22 @@ div.page_obvestila { box-sizing: border-box; width: 50%; - // Poslana sporočila - .sent_list { + // Poslana in prejeta sporočila - seznam + .sent_list, + .recieved_list { overflow-y: auto; border: solid 1px $gray; ul { padding-left: 0; margin-block-start: 0; + margin-block-end: 0; li { box-sizing: border-box; list-style-type: none; margin: 0; padding: 16px; - min-height: 58px; + min-height: 78px; background-color: $white; border-bottom: solid 1px $gray; @@ -99,44 +101,23 @@ div.page_obvestila { div.content { font-size: 14px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } - li.unread { - border: 1px $red solid; - background-color: $red; + li.active { + cursor: pointer; + border: 1px $blue solid; } } } - //Prejeta sporočila - še stari styling .recieved_list { - display: inline; - float: left; - width: 470px; - min-height: 200px; - margin-right: 60px; ul { - padding-left: 0; li { - list-style-type: none; - margin: 5px 0; - padding: 5px 8px; - background-color: $blue; - border: 1px $blue solid; - &:hover { - cursor: pointer; - background-color: $blue; - border: 1px $blue solid; - } - } - li.unread { - border: 1px $red solid; - background-color: $red; - } - li.active { cursor: pointer; - border: 1px $blue solid; } } } @@ -167,12 +148,14 @@ div.page_obvestila { label { margin-right: 8px; + cursor: pointer; } input.text { width: 250px; height: 28px; padding: 3px 5px; + margin-top: 0; } } } @@ -181,9 +164,8 @@ div.page_obvestila { width: 100%; } - label { - margin-bottom: 4px; - cursor: text; + div.label { + margin-top: 4px; } textarea { @@ -198,6 +180,9 @@ div.page_obvestila { div.button_holder { margin-top: 32px; margin-bottom: 0; + &.top16 { + margin-top: 16px; + } } }