[Redizajn 1KA] - Sporočila --> Poslana sporočila - v1

This commit is contained in:
tejagerjovic 2022-03-28 17:23:46 +02:00
parent 842695e597
commit 01a474ede8
8 changed files with 221 additions and 97 deletions

View File

@ -22,23 +22,33 @@ class Notifications {
// Prikazemo poslana sporocila // Prikazemo poslana sporocila
if((isset($_GET['t']) && $_GET['t']=='sent') || $tab == 1){ if((isset($_GET['t']) && $_GET['t']=='sent') || $tab == 1){
echo '<div class="title">';
echo '<div class="title_icon"><span class="faicon inv_sent_1"></span></div>';
echo '<h2>'.$lang['srv_notifications_sent'].'</h2>';
echo '</div>';
echo '<div class="notifications_content">'; echo '<div class="notifications_content">';
// Izpis vseh poslanih sporocil // Izpis vseh poslanih sporocil
if($admin_type == 0){ if($admin_type == 0){
echo '<div class="notifications_content_left">'; echo '<div class="notifications_content_left">';
echo '<div class="title">';
echo '<div class="title_icon"><span class="faicon inv_sent_1"></span></div>';
echo '<h2>'.$lang['srv_notifications_sent'].'</h2>';
echo '</div>';
echo '<div class="sent_list">'; echo '<div class="sent_list">';
$this->displaySentMessages(); $this->displaySentMessages();
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
// obrazec za posiljanje sporocil // obrazec za posiljanje sporocil
echo '<div class="notifications_content_right">';
echo '<div class="title">';
echo '<div class="title_icon"><span class="faicon inv_sent_0"></span></div>';
echo '<h2>'.$lang['srv_inv_message_draft_new'].'</h2>';
echo '</div>';
$this->sendMessageForm(); $this->sendMessageForm();
echo '</div>';
} }
else else
echo $lang['srv_notifications_admin_alert']; echo $lang['srv_notifications_admin_alert'];
@ -103,7 +113,6 @@ class Notifications {
$sentMessages[$row['id']] = $row; $sentMessages[$row['id']] = $row;
} }
echo '<ul>'; echo '<ul>';
if(count($sentMessages) > 0){ if(count($sentMessages) > 0){
@ -120,7 +129,7 @@ class Notifications {
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
$text = strip_tags((strlen($message['text']) > 60) ? substr($message['text'], 0, 60).'...' : $message['text']); $text = strip_tags((strlen($message['text']) > 76) ? substr($message['text'], 0, 76).'...' : $message['text']);
echo '<div class="content">'; echo '<div class="content">';
echo $text; echo $text;
echo '</div>'; echo '</div>';
@ -145,24 +154,46 @@ class Notifications {
global $admin_type, $global_user_id, $lang; global $admin_type, $global_user_id, $lang;
echo '<div class="send_form">'; echo '<div class="send_form">';
echo '<span class="clr bold">'.$lang['srv_notifications_send_reciever'].': </span><input type="text" name="recipient" id="recipient">';
// Checkboxa za posiljenje vsem uporabnikoom (slo in ang) //Prejemniki
echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onClick="recipient_all_disable_email();"> <label for="recipient_all_slo"><span class="clr bold">'.$lang['srv_notifications_send_all_slo'].'</span></label></div>'; echo '<div class="setting_holder">';
echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onClick="recipient_all_disable_email();"> <label for="recipient_all_ang"><span class="clr bold">'.$lang['srv_notifications_send_all_ang'].'</span></label></div><br />'; echo '<span class="setting_title">'.$lang['srv_notifications_send_reciever2'].':</span>';
echo '<div class="setting_item">';
echo '<input type="checkbox" value="1" name="recipient_all_slo" id="recipient_all_slo" onChange="recipient_toggle(\'slo\');">';
echo '<label for="recipient_all_slo">'.$lang['srv_notifications_send_all_slo'].'</label>';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="checkbox" value="1" name="recipient_all_ang" id="recipient_all_ang" onChange="recipient_toggle(\'ang\');">';
echo '<label for="recipient_all_ang">'.$lang['srv_notifications_send_all_ang'].'</label>';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="checkbox" value="1" name="recipient_custom" id="recipient_custom" onChange="recipient_toggle(\'custom\');">';
echo '<label for="recipient_custom">'.$lang['srv_notifications_send_custom'].'</label>';
echo '<input type="text" class="text large disabled" name="recipient" id="recipient">';
echo '</div>';
echo '</div>';
// Naslov sporocila // Naslov sporocila
echo '<span class="clr bold">'.$lang['srv_notifications_send_title'].': </span><input type="text" name="title"><br /><br />'; echo '<div class="setting_holder">';
echo $lang['srv_notifications_send_title'].':';
echo '<input type="text" class="text large" name="title">';
echo '</div>';
// Besedilo sporocila (editor) // Besedilo sporocila (editor)
echo '<span class="clr bold">'.$lang['srv_notifications_send_text'].': </span><textarea id="notification" name="notification" autocomplete="off"></textarea><br />'; echo '<label>'.$lang['srv_notifications_send_text'].':</label>';
echo '<textarea id="notification" name="notification" autocomplete="off"></textarea>';
// Avtomatsko prikaži obvestilo po prijavi // Avtomatsko prikaži obvestilo po prijavi
echo '<div style="padding-top:5px;"><input type="checkbox" value="1" name="force_show" id="force_show"> <label for="force_show"><span class="clr bold">'.$lang['srv_notifications_force_show'].'</span></label></div><br />'; echo '<div class="auto_checkbox">';
echo '<input type="checkbox" value="1" name="force_show" id="force_show">';
echo '<label for="force_show">'.$lang['srv_notifications_force_show'].'</label>';
echo '</div>';
echo '<span class="buttonwrapper floatLeft spaceRight"><a class="ovalbutton ovalbutton_orange" href="#" onclick="sendNotification(); return false;">'; echo '<div class="button_holder">';
echo '<span>'.$lang['srv_notifications_send'].'</span>'; echo '<button class="medium blue" onclick="sendNotification(); return false;">'.$lang['srv_notifications_send'].'</button>';
echo '</a></span>'; echo '</div>';
if($note != ''){ if($note != ''){
echo '<br /><br />'; echo '<br /><br />';
@ -309,15 +340,34 @@ class Notifications {
} }
} }
echo '<div class="notifications_content">';
// Refresh vseh poslanih sporocil // Refresh vseh poslanih sporocil
echo '<div class="notifications_content_left">';
echo '<div class="title">';
echo '<div class="title_icon"><span class="faicon inv_sent_1"></span></div>';
echo '<h2>'.$lang['srv_notifications_sent'].'</h2>';
echo '</div>';
echo '<div class="sent_list">'; echo '<div class="sent_list">';
$this->displaySentMessages(); $this->displaySentMessages();
echo '</div>'; echo '</div>';
echo '</div>';
// Refresh obrazca za posiljanje sporocil // Refresh obrazca za posiljanje sporocil
$this->sendMessageForm($note);
echo '<div class="clr"></div>'; echo '<div class="notifications_content_right">';
echo '<div class="title">';
echo '<div class="title_icon"><span class="faicon inv_sent_0"></span></div>';
echo '<h2>'.$lang['srv_inv_message_draft_new'].'</h2>';
echo '</div>';
$this->sendMessageForm($note);
echo '</div>';
echo '</div>';
} }
public function ajax_resolveMessages(){ public function ajax_resolveMessages(){

View File

@ -73,23 +73,31 @@ function closeUnreadMessages(){
$("#unread_notifications").fadeOut(); $("#unread_notifications").fadeOut();
} }
function recipient_all_disable_email(){ function recipient_toggle(type){
if ($( "input[name='recipient_all_slo']" ).is(':checked')) if (type == 'slo') {
var recipient_all_slo = 1; if ($( "input[name='recipient_all_slo']" ).is(':checked')) {
else $( "input[name='recipient_custom']" ).attr("checked", false);
var recipient_all_slo = 0; $("#recipient").addClass('disabled');
if ($( "input[name='recipient_all_ang']" ).is(':checked'))
var recipient_all_ang = 1;
else
var recipient_all_ang = 0;
if(recipient_all_slo == 0 && recipient_all_ang == 0)
$("#recipient").attr('disabled', false);
else
$("#recipient").attr('disabled', true);
} }
}
if (type == 'ang') {
if ($( "input[name='recipient_all_ang']" ).is(':checked')) {
$( "input[name='recipient_custom']" ).attr("checked", false);
$("#recipient").addClass('disabled');
}
}
if (type == 'custom') {
if ($( "input[name='recipient_custom']" ).is(':checked')) {
$( "input[name='recipient_all_slo']" ).attr("checked", false);
$( "input[name='recipient_all_ang']" ).attr("checked", false);
$("#recipient").removeClass('disabled');
}
}
}
// Prikaze popup z neprebranimi sporocili // Prikaze popup z neprebranimi sporocili

View File

@ -7198,13 +7198,15 @@ $lang = array (
'srv_notifications_unread' => "Neprebrana sporočila", 'srv_notifications_unread' => "Neprebrana sporočila",
'srv_notifications_alert' => "Imate novo neprebrano sporočilo!", 'srv_notifications_alert' => "Imate novo neprebrano sporočilo!",
'srv_notifications_admin_alert' => "Pošiljanje je omogočeno samo administratorjem!", 'srv_notifications_admin_alert' => "Pošiljanje je omogočeno samo administratorjem!",
'srv_notifications_send_reciever' => "Prejemnik (e-pošta)", 'srv_notifications_send_reciever2' => "Prejemnik (e-pošta)",
'srv_notifications_send_reciever2' => "Prejemniki",
'srv_notifications_send_title' => "Naslov", 'srv_notifications_send_title' => "Naslov",
'srv_notifications_send_text' => "Besedilo", 'srv_notifications_send_text' => "Besedilo",
'srv_notifications_send' => "Pošlji", 'srv_notifications_send' => "Pošlji",
'srv_notifications_save_send' => "Shrani in pošlji", 'srv_notifications_save_send' => "Shrani in pošlji",
'srv_notifications_send_all_slo' => "Pošlji vsem slovenskim uporabnikom", 'srv_notifications_send_all_slo' => "Vsi slovenski uporabniki",
'srv_notifications_send_all_ang' => "Pošlji vsem angleškim uporabnikom", 'srv_notifications_send_all_ang' => "Vsi angleški uporabniki",
'srv_notifications_send_custom' => "E-poštni naslov po meri:",
'srv_notifications_force_show' => "Prikaži obvestilo avtomatsko po prijavi", 'srv_notifications_force_show' => "Prikaži obvestilo avtomatsko po prijavi",
'slider_min_label_note' => "Labela za Min", 'slider_min_label_note' => "Labela za Min",
'slider_max_label_note' => "Labela za Max", 'slider_max_label_note' => "Labela za Max",

View File

@ -7082,12 +7082,14 @@ $lang = array (
'srv_notifications_alert' => "You have new unread message!", 'srv_notifications_alert' => "You have new unread message!",
'srv_notifications_admin_alert' => "Only administrator can send a notification!", 'srv_notifications_admin_alert' => "Only administrator can send a notification!",
'srv_notifications_send_reciever' => "Recipient (e-mail)", 'srv_notifications_send_reciever' => "Recipient (e-mail)",
'srv_notifications_send_reciever2' => "Recipients",
'srv_notifications_send_title' => "Subject", 'srv_notifications_send_title' => "Subject",
'srv_notifications_send_text' => "Message", 'srv_notifications_send_text' => "Message",
'srv_notifications_send' => "Send", 'srv_notifications_send' => "Send",
'srv_notifications_save_send' => "Save and send", 'srv_notifications_save_send' => "Save and send",
'srv_notifications_send_all_slo' => "Send to all slovenian users", 'srv_notifications_send_all_slo' => "All Slovenian users",
'srv_notifications_send_all_ang' => "Send to all english users", 'srv_notifications_send_all_ang' => "All English users",
'srv_notifications_send_custom' => "Custom e-mail address:",
'srv_notifications_force_show' => "Show notification automatically after login", 'srv_notifications_force_show' => "Show notification automatically after login",
'slider_min_label_note' => "Min's label", 'slider_min_label_note' => "Min's label",
'slider_max_label_note' => "Max's label", 'slider_max_label_note' => "Max's label",

View File

@ -6695,13 +6695,10 @@ and open the template in the editor.
*/ */
/* Invitation table */ /* Invitation table */
span.faicon.inv_sent_0::before { span.faicon.inv_sent_0::before {
font-size: 14px;
content: "\f2b6"; content: "\f2b6";
font-weight: 400;
} }
span.faicon.inv_sent_1::before { span.faicon.inv_sent_1::before {
font-size: 14px;
content: "\f0e0"; content: "\f0e0";
} }
@ -15112,7 +15109,7 @@ fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right div.message_
margin-bottom: 16px; margin-bottom: 16px;
} }
fieldset #obvescanje_sidebyside_holder label { fieldset #obvescanje_sidebyside_holder label {
cursor: default; cursor: text;
} }
fieldset #obvescanje_sidebyside_holder label.bottom4 { fieldset #obvescanje_sidebyside_holder label.bottom4 {
margin-bottom: 4px; margin-bottom: 4px;
@ -22475,6 +22472,7 @@ div.page_obvestila div.title div.title_icon {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-right: 8px; margin-right: 8px;
box-sizing: border-box;
} }
div.page_obvestila div.title h2 { div.page_obvestila div.title h2 {
width: 100%; width: 100%;
@ -22503,7 +22501,7 @@ div.page_obvestila #notifications .notifications_content {
div.page_obvestila #notifications .notifications_content .notifications_content_left { div.page_obvestila #notifications .notifications_content .notifications_content_left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 660px; height: 694px;
box-sizing: border-box; box-sizing: border-box;
width: 50%; width: 50%;
} }
@ -22513,8 +22511,10 @@ div.page_obvestila #notifications .notifications_content .notifications_content_
} }
div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul { div.page_obvestila #notifications .notifications_content .notifications_content_left .sent_list ul {
padding-left: 0; padding-left: 0;
margin-block-start: 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 {
box-sizing: border-box;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 16px; padding: 16px;
@ -22574,6 +22574,50 @@ div.page_obvestila #notifications .notifications_content .notifications_content_
cursor: pointer; cursor: pointer;
border: 1px #1E88E5 solid; border: 1px #1E88E5 solid;
} }
div.page_obvestila #notifications .notifications_content .notifications_content_right {
display: flex;
flex-direction: column;
height: 694px;
box-sizing: border-box;
width: 50%;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder {
margin-bottom: 16px;
display: flex;
flex-direction: column;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder:last-of-type {
margin-bottom: 0;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder .setting_item {
margin-top: 8px;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder .setting_item label {
margin-right: 8px;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form .setting_holder .setting_item input.text {
width: 250px;
height: 28px;
padding: 3px 5px;
}
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 textarea {
width: 100%;
padding: 3px 5px;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form div.auto_checkbox {
margin-top: 16px;
}
div.page_obvestila #notifications .notifications_content .notifications_content_right .send_form div.button_holder {
margin-top: 32px;
margin-bottom: 0;
}
div.page_obvestila #notifications .notifications_content #message { div.page_obvestila #notifications .notifications_content #message {
display: inline; display: inline;
float: left; float: left;
@ -22583,28 +22627,6 @@ div.page_obvestila #notifications .notifications_content #message {
background-color: #1E88E5; background-color: #1E88E5;
border: 1px #E5E5E5 solid; border: 1px #E5E5E5 solid;
} }
div.page_obvestila #notifications .notifications_content .send_form {
display: inline;
float: left;
margin-top: 30px;
padding: 20px;
width: 415px;
background-color: #1E88E5;
border: 1px #E5E5E5 solid;
color: #333333 !important;
}
div.page_obvestila #notifications .notifications_content .send_form input[type=text] {
width: 400px;
padding: 3px 5px;
border: 1px solid #E5E5E5 !important;
color: #333333 !important;
}
div.page_obvestila #notifications .notifications_content .send_form textarea {
width: 400px;
padding: 3px 5px;
border: 1px solid #E5E5E5 !important;
color: #333333 !important;
}
div.page_obvestila #new_notification_alert { div.page_obvestila #new_notification_alert {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;

View File

@ -11,12 +11,9 @@ and open the template in the editor.
/* Invitation table */ /* Invitation table */
span.faicon.inv_sent_0::before { span.faicon.inv_sent_0::before {
font-size: 14px;
content: "\f2b6"; content: "\f2b6";
font-weight: 400;
} }
span.faicon.inv_sent_1::before { span.faicon.inv_sent_1::before {
font-size: 14px;
content: "\f0e0"; content: "\f0e0";
} }
span.faicon.inv_responded_0::before { span.faicon.inv_responded_0::before {

View File

@ -20,6 +20,8 @@ div.page_obvestila {
justify-content: center; justify-content: center;
margin-right: 8px; margin-right: 8px;
box-sizing: border-box;
} }
h2 { h2 {
@ -56,7 +58,7 @@ div.page_obvestila {
.notifications_content_left { .notifications_content_left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 660px; height: 694px;
box-sizing: border-box; box-sizing: border-box;
width: 50%; width: 50%;
@ -67,7 +69,9 @@ div.page_obvestila {
ul { ul {
padding-left: 0; padding-left: 0;
margin-block-start: 0;
li { li {
box-sizing: border-box;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 16px; padding: 16px;
@ -105,7 +109,7 @@ div.page_obvestila {
} }
} }
//Prejeta sporočila //Prejeta sporočila - še stari styling
.recieved_list { .recieved_list {
display: inline; display: inline;
float: left; float: left;
@ -139,10 +143,71 @@ div.page_obvestila {
} }
.notifications_content_right {
display: flex;
flex-direction: column;
height: 694px;
box-sizing: border-box;
width: 50%;
.send_form {
.setting_holder {
margin-bottom: 16px;
display: flex;
flex-direction: column;
&:last-of-type {
margin-bottom: 0;
}
.setting_item {
margin-top: 8px;
label {
margin-right: 8px;
}
input.text {
width: 250px;
height: 28px;
padding: 3px 5px;
}
}
}
input.text {
width: 100%;
}
label {
margin-bottom: 4px;
cursor: text;
}
textarea {
width: 100%;
padding: 3px 5px;
}
div.auto_checkbox {
margin-top: 16px;
}
div.button_holder {
margin-top: 32px;
margin-bottom: 0;
}
}
}
//// Skopiran stari tari styling
#message { #message {
display: inline; display: inline;
@ -153,28 +218,6 @@ div.page_obvestila {
background-color: $blue; background-color: $blue;
border: 1px $gray solid; border: 1px $gray solid;
} }
.send_form {
display: inline;
float: left;
margin-top: 30px;
padding: 20px;
width: 415px;
background-color: $blue;
border: 1px $gray solid;
color: $black !important;
input[type="text"] {
width: 400px;
padding: 3px 5px;
border: 1px solid $gray !important;
color: $black !important;
}
textarea {
width: 400px;
padding: 3px 5px;
border: 1px solid $gray !important;
color: $black !important;
}
}
} }
} }
#new_notification_alert { #new_notification_alert {

View File

@ -31,7 +31,7 @@ fieldset{
} }
label{ label{
cursor: default; cursor: text;
//Label nad editorjem besedila //Label nad editorjem besedila
&.bottom4 { &.bottom4 {