Vabila - popravki popupov

This commit is contained in:
pero1203 2022-10-21 11:16:13 +02:00
parent 0aa42e58b8
commit 850ff9be46
4 changed files with 72 additions and 59 deletions

View File

@ -5482,27 +5482,20 @@ class SurveyInvitationsNew {
echo '<div id="inv_error_note" class="displayNone"></div>';
echo '<table>';
echo '<tr><td class="bold">'.$lang['srv_inv_recipient_list_name'].'</td>';
echo '<td>';
echo '<input type="text" id="rec_profile_name" value="'.$sqlRow['name'].'" autofocus="autofocus" style="width: 200px;">';
echo '</td></tr>';
echo '</table>';
echo '<p>'.$lang['srv_inv_recipient_list_name'].'</p>';
echo '<input type="text" id="rec_profile_name" class="text large" value="'.$sqlRow['name'].'" autofocus="autofocus">';
echo '<input type="hidden" id="rec_profile_pid" value="'.$pid.'" >';
echo '<br class="clr" />';
echo '<span class="buttonwrapper floatRight spaceRight" title="'.$lang['srv_cancel'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;" ><span>'.$lang['srv_cancel'].'</span></a></span>';
echo '<span class="buttonwrapper floatRight spaceRight" title="'.$lang['save'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="inv_update_rec_profile(); return false;"><span>'.$lang['save'].'</span></a></span>';
echo '<br class="clr" />';
echo '<div class="button_holder">';
echo ' <button class="medium white-blue" onclick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;" >'.$lang['srv_cancel'].'</button>';
echo ' <button class="medium blue" onclick="inv_update_rec_profile(); return false;">'.$lang['save'].'</button>';
echo '</div>';
echo '</div>'; # id="inv_view_arch_recipients"
sisplet_query("COMMIT");
}
echo json_encode($return);
exit;
}
@ -6625,39 +6618,49 @@ class SurveyInvitationsNew {
global $lang;
echo '<div id="inv_recipients_profile_name">';
echo $lang['srv_inv_message_draft_new_save'].':&nbsp;';
# polovimo vsa sporočila
$sql_string = "SELECT * FROM srv_invitations_messages WHERE ank_id = '$this->sid'";
$sql_query = sisplet_query($sql_string);
echo '<h2>'.$lang['message'].'</h2>';
echo '<div class="popup_close"><a href="#" onClick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;">✕</a></div>';
echo '<select onchange="inv_new_message_list_change(this);" autofocus="autofocus" tabindex="2">';
echo '<option value="0" selected="selected" class="gray bold">'.$lang['srv_inv_message_draft_new'].'</option>';
$messages = array();
while ( $row = mysqli_fetch_assoc($sql_query) ) {
$messages[$row['id']] = $row;
#'.((int)$_POST['mid'] == $row['id'] ? ' selected="selected"' : '').'
echo '<option value="'.$row['id'].'" comment="'.$row['comment'].'">'.$row['naslov'].'</option>';
}
echo '</select>';
#'.((int)$_POST['mid'] > 0 ? ' class="displayNone"' : '').'
echo '<span id="new_message_list_span">';
echo '<br><br/>';
echo '<label>'.$lang['srv_inv_message_rename_new_name'];
echo '<div class="setting_holder">';
echo ' <span class="setting_title">'.$lang['srv_inv_message_draft_new_save'].':</span>';
# polovimo vsa sporočila
$sql_string = "SELECT * FROM srv_invitations_messages WHERE ank_id = '$this->sid'";
$sql_query = sisplet_query($sql_string);
echo ' <select onchange="inv_new_message_list_change(this);" class="dropdown medium" autofocus="autofocus" tabindex="2">';
echo ' <option value="0" selected="selected" class="gray bold">'.$lang['srv_inv_message_draft_new'].'</option>';
$messages = array();
while ( $row = mysqli_fetch_assoc($sql_query) ) {
$messages[$row['id']] = $row;
echo ' <option value="'.$row['id'].'" comment="'.$row['comment'].'">'.$row['naslov'].'</option>';
}
echo ' </select>';
echo '</div>';
echo '<div id="new_message_list_span" class="setting_holder">';
echo ' <span class="setting_title">'.$lang['srv_inv_message_rename_new_name'].'</span>';
$newName = $this->generateMessageName();
echo ' <input type="text" id="rec_profile_name" class="text medium" value="'.$newName.'" tabindex="1" autofocus="autofocus">';
echo '</div>';
echo '<input type="text" id="rec_profile_name" value="'.$newName.'" tabindex="1" autofocus="autofocus">';
echo '</label>';
echo '</span>';
echo '<br/><br/>';
echo $lang['srv_inv_message_draft_list_comment'];
#.((int)$_POST['mid'] > 0 ? $messages[(int)$_POST['mid']]['comment'] : '').
echo '<textarea id="inv_message_comment" tabindex="3" rows="2" style="width:200px;"></textarea>';
echo '<br class="clr" /><br class="clr" />';
echo '<span class="buttonwrapper floatRight" title="'.$lang['save'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="inv_message_save_details(); return false;"><span>'.$lang['save'].'</span></a></span>';
echo '<span class="buttonwrapper floatRight spaceRight" title="'.$lang['srv_cancel'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;" ><span>'.$lang['srv_cancel'].'</span></a></span>';
echo '<br class="clr" />';
echo '</div>'; # id="inv_view_arch_recipients"
echo '<div class="setting_holder">';
echo ' <span class="setting_title">'.$lang['srv_inv_message_draft_list_comment'].'</span>';
echo ' <textarea id="inv_message_comment" tabindex="3" rows="2"></textarea>';
echo '</div>';
echo '<div class="button_holder">';
echo ' <button class="medium white-blue" onclick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;" >'.$lang['srv_cancel'].'</button>';
echo ' <button class="medium blue" onclick="inv_message_save_details(); return false;">'.$lang['save'].'</button>';
echo '</div>';
echo '</div>';
}
@ -8747,20 +8750,9 @@ class SurveyInvitationsNew {
list($pid, $name, $comment, $uid) = mysqli_fetch_row($sql_query);
echo '<div id="inv_recipients_profile_name" class="access">';
echo '<form id="inv_list_edit_form" name="inv_list_edit_form" autocomplete="off">';
/*
echo '<span id="new_recipients_list_span" >';
echo '<label>'.$lang['srv_inv_recipient_list_name'];
echo '<input type="text" id="rec_profile_name" name="rec_profile_name" value="'.$name.'" tabindex="1" autofocus="autofocus">';
echo '</label>';
echo '</span>';
echo '<br/><br/>';
echo $lang['srv_inv_recipient_list_comment'];
echo '<textarea id="rec_profile_comment" name="rec_profile_comment" tabindex="3" rows="5" >'.$comment.'</textarea>';
echo '<br/>';
*/
$this->displayListAccess($pid);
# skrita polja za respondente in polja
echo '<input id="profile_id" name="profile_id" type="hidden" value="'.($_POST['pid']).'" >';
@ -8771,10 +8763,6 @@ class SurveyInvitationsNew {
echo '</form>';
echo '</div>'; # id="inv_view_arch_recipients"
/* echo '<script type="text/javascript">';
echo "$('#rec_profile_name').focus();";
echo '</script>';
*/
}
function listGetName() {

View File

@ -564,12 +564,17 @@ function invMessageRename() {
}
);
}
// najprej dodatno poeditiramo sporočilo
function inv_message_save_advanced(mid) {
// najprej dodatno poeditiramo sporočilo
$('#fade').fadeTo('slow', 1);
$('#fullscreen').addClass('divPopUp PopUpNarrow');
$('#fullscreen').html('').fadeIn('slow');
$("#fullscreen").load('ajax.php?t=invitations&a=edit_message_details', {anketa:srv_meta_anketa_id, noNavi:'true', mid:mid});
}
function inv_message_save_forward(mid) {
//v kolikor je CKEditor vklopljen potem, ga odstranimo pred skranjevanjem
if(CKEDITOR.instances['inv_message_body']){
@ -894,6 +899,7 @@ function inv_edit_rec_profile() {
var pid = $("#inv_import_list_profiles ol li.active").attr("pid");
$('#fade').fadeTo('slow', 1);
$('#fullscreen').addClass('divPopUp PopUpNarrow');
$('#fullscreen').html('').fadeIn('slow');
$("#fullscreen").load('ajax.php?t=invitations&a=edit_rec_profile', {anketa:srv_meta_anketa_id, pid:pid, noNavi:'true'});
}

View File

@ -8583,6 +8583,11 @@ div#invListAccess {
overflow: auto;
}
#inv_recipients_profile_name input[type=text],
#inv_recipients_profile_name textarea {
width: 100%;
}
/*
Header scss - top line, menu...
*/

View File

@ -795,4 +795,18 @@ div.edit_user_content {
div#invListAccess {
max-height: 200px;
overflow: auto;
}
/////// VABILA ////////
#inv_recipients_profile_name{
//@include popup_general();
//width: 600px !important;
input[type="text"],
textarea{
width: 100%;
}
}