Merge branch 'master' of https://git.1ka.si/git/1ka
This commit is contained in:
commit
c209d6e05d
@ -2317,7 +2317,7 @@ class BranchingAjax {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_comment_field ($spremenljivka, $type, $view, $form=true) {
|
function add_comment_field ($spremenljivka, $type, $view, $form=true, $buttons=true) {
|
||||||
global $admin_type;
|
global $admin_type;
|
||||||
global $global_user_id;
|
global $global_user_id;
|
||||||
global $lang;
|
global $lang;
|
||||||
@ -2327,6 +2327,7 @@ class BranchingAjax {
|
|||||||
|
|
||||||
echo '<textarea name="vsebina" placeholder="'.$lang['srv_comments_add_comment'].'" id="vsebina_'.$spremenljivka.'_'.$view.'"></textarea>';
|
echo '<textarea name="vsebina" placeholder="'.$lang['srv_comments_add_comment'].'" id="vsebina_'.$spremenljivka.'_'.$view.'"></textarea>';
|
||||||
|
|
||||||
|
if ($buttons) {
|
||||||
echo '<div class="button_holder bottom0">';
|
echo '<div class="button_holder bottom0">';
|
||||||
|
|
||||||
if($_GET['a'] == 'comment_manage')
|
if($_GET['a'] == 'comment_manage')
|
||||||
@ -2336,6 +2337,7 @@ class BranchingAjax {
|
|||||||
|
|
||||||
echo ' <button class="medium blue" onclick="add_comment(\''.$spremenljivka.'\', \''.$type.'\', \''.$view.'\', $(\'#vsebina_'.$spremenljivka.'_'.$view.'\').val()); return false;">'.$lang['srv_comments_new'].'</button>';
|
echo ' <button class="medium blue" onclick="add_comment(\''.$spremenljivka.'\', \''.$type.'\', \''.$view.'\', $(\'#vsebina_'.$spremenljivka.'_'.$view.'\').val()); return false;">'.$lang['srv_comments_new'].'</button>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
if (($type == 0 || $view==3) && ($admin_type == 0 || $global_user_id==$rowanketa['insert_uid'])) {
|
if (($type == 0 || $view==3) && ($admin_type == 0 || $global_user_id==$rowanketa['insert_uid'])) {
|
||||||
echo '<div class="comment_bottom">';
|
echo '<div class="comment_bottom">';
|
||||||
|
@ -1406,22 +1406,79 @@ class SurveyAdmin
|
|||||||
if ($nereseno > 99)
|
if ($nereseno > 99)
|
||||||
$nereseno = '99+';
|
$nereseno = '99+';
|
||||||
|
|
||||||
echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack has_comment"><span class="faicon comments" title="' . $lang['srv_view_comment'] . '">';
|
echo '<div class="fa-stack has_comment"><span class="faicon comments" id="nereseno" onclick="toggleCommentDropdown(); return false;">';
|
||||||
echo '<span class="comment_number">'.$nereseno.'</span>';
|
echo '<span class="comment_number">'.$nereseno.'</span>';
|
||||||
echo '</span></div></a>';
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments" title="' . $lang['srv_view_comment'] . '">';
|
echo '<div class="fa-stack" ><span class="faicon comments" id="vkljuceno" onclick="toggleCommentDropdown(); return false;">';
|
||||||
echo '</span></div></a>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if ($nereseno > 0)
|
if ($nereseno > 0)
|
||||||
echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='. $row['id'].'&a=urejanje" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments icon-orange fa-stack-1x user_access_locked" title="' . $lang['srv_view_comment'] . '"></span></div></a>';
|
echo '<div class="fa-stack"><span class="faicon comments icon-orange fa-stack-1x user_access_locked">';
|
||||||
else
|
else
|
||||||
echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=urejanje" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments user_access_locked" title="' . $lang['srv_view_comment'] . '"></span></div></a>';
|
echo '<div class="fa-stack"><span class="faicon comments user_access_locked">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '</span></div>'; //zaključi ikono
|
||||||
|
|
||||||
|
//dropdown na klik ikone
|
||||||
|
echo '<div id="comment_dropdown" class="displayNone">';
|
||||||
|
|
||||||
|
echo '<div class="title">';
|
||||||
|
echo '<span class="faicon comment_dropdown"></span>';
|
||||||
|
echo $lang['comments'];
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
$comment_link = 'window.location.href=\'' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji\'; return false;';
|
||||||
|
echo '<div class="links" onclick="'.$comment_link.'">';
|
||||||
|
echo $lang['srv_testiranje_komentarji_anketa_title'];
|
||||||
|
echo ' (' . $comment_count['question']['unresolved'];
|
||||||
|
echo '/' . $comment_count['question']['all'] . ')';
|
||||||
|
echo '<span class="faicon fa-angle-right"></span>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
$comment_link = 'window.location.href=\'' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji_anketa\'; return false;';
|
||||||
|
echo '<div class="links" onclick="'.$comment_link.'">';
|
||||||
|
echo $lang['srv_testiranje_komentarji_title'];
|
||||||
|
echo ' (' . ($comment_count['survey_resp']['unresolved'] + $comment_count['survey_admin']['unresolved']); //nerešeni
|
||||||
|
echo '/' . ($comment_count['survey_resp']['all'] + $comment_count['survey_admin']['all']) . ')'; //vsi
|
||||||
|
echo '<span class="faicon fa-angle-right"></span>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '<div id="comment_field">';
|
||||||
|
$ba = new BranchingAjax($this->anketa);
|
||||||
|
$ba->add_comment_field(0, '1', '4', false, false);
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '<div class="button_holder">';
|
||||||
|
echo ' <button class="small blue" onclick="toggleCommentDropdown(); return false;">'.$lang['srv_zapri'].'</button>';
|
||||||
|
|
||||||
|
echo '<div class="options">';
|
||||||
|
echo '<div class="square" onclick="CommentDropdownClearText(); return false;">';
|
||||||
|
echo '<span class="faicon fa-times"></span>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="square blue" onclick="add_comment(\'0\', \'1\', \'4\', $(\'#vsebina_0_4\').val()); return false;">';
|
||||||
|
echo '<span class="faicon fa-paper-plane"></span>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '</div>'; //button holder
|
||||||
|
|
||||||
|
echo '</div>'; //comment_dropdown
|
||||||
|
|
||||||
|
// Klik izven - zapremo dropdown
|
||||||
|
echo '<script>
|
||||||
|
$(document).mouseup(function(e){
|
||||||
|
var container = $("#comment_dropdown");
|
||||||
|
|
||||||
|
if (!container.is(e.target) && container.has(e.target).length === 0){
|
||||||
|
$("#comment_dropdown").addClass("displayNone");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
}
|
}
|
||||||
@ -1433,12 +1490,14 @@ class SurveyAdmin
|
|||||||
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
|
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
|
||||||
|
|
||||||
if($userAccess->checkUserAccess('komentarji')) {
|
if($userAccess->checkUserAccess('komentarji')) {
|
||||||
echo '<a href="' . $site_url . 'admin/survey/ajax.php?anketa='.$row['id'].'&a=comments_onoff&do=on" title="' . $lang['srv_preview_comments'] . '"><div class="fa-stack inactive_comments"><span class="faicon comments" title="' . $lang['srv_preview_comments'] . '">';
|
$comment_link = 'window.location.href=\'' . $site_url . 'admin/survey/ajax.php?anketa='.$row['id'].'&a=comments_onoff&do=on\'; return false;';
|
||||||
|
echo '<div class="fa-stack inactive_comments" onclick="'.$comment_link.'"><span class="faicon comments" title="' . $lang['srv_preview_comments'] . '">';
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=urejanje" title="' . $lang['srv_preview_comments'] . '"><div class="fa-stack"><span class="faicon comments user_access_locked" title="' . $lang['srv_preview_comments'] . '">';
|
$comment_link = 'window.location.href=\'' . $site_url . 'admin/survey/ajax.php?anketa='.$row['id'].'&a=urejanje\'; return false;';
|
||||||
|
echo '<div class="fa-stack" onclick="'.$comment_link.'"><span class="faicon comments user_access_locked" title="' . $lang['srv_preview_comments'] . '">';
|
||||||
echo '</span></div></a>';
|
}
|
||||||
|
echo '</span></div>';
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
@ -4760,13 +4760,18 @@ class SurveyAdminAjax {
|
|||||||
sisplet_query("UPDATE srv_user SET deleted = '1', time_edit = NOW() WHERE id = '$usr_id'");
|
sisplet_query("UPDATE srv_user SET deleted = '1', time_edit = NOW() WHERE id = '$usr_id'");
|
||||||
sisplet_query('COMMIT');
|
sisplet_query('COMMIT');
|
||||||
|
|
||||||
|
// Pobrišemo vse datoteke
|
||||||
|
$SDF = SurveyDataFile::get_instance();
|
||||||
|
$SDF->init($this->anketa);
|
||||||
|
$SDF->clearFiles();
|
||||||
|
|
||||||
echo '0';
|
echo '0';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo 'Error: Invalid user ID!';
|
echo 'Error: Invalid user ID!';
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($_GET['a'] == 'dataDeleteMultipleRow') { // V DELU...
|
} elseif ($_GET['a'] == 'dataDeleteMultipleRow') {
|
||||||
|
|
||||||
// ulovimo json objekt z userji za brisanje
|
// ulovimo json objekt z userji za brisanje
|
||||||
if ( is_array($_POST['users']) && count($_POST['users']) > 0 ) {
|
if ( is_array($_POST['users']) && count($_POST['users']) > 0 ) {
|
||||||
@ -4779,6 +4784,11 @@ class SurveyAdminAjax {
|
|||||||
|
|
||||||
sisplet_query("UPDATE srv_user SET deleted = '1', time_edit = NOW() WHERE id IN (".$users.")");
|
sisplet_query("UPDATE srv_user SET deleted = '1', time_edit = NOW() WHERE id IN (".$users.")");
|
||||||
sisplet_query('COMMIT');
|
sisplet_query('COMMIT');
|
||||||
|
|
||||||
|
// Pobrišemo vse datoteke
|
||||||
|
$SDF = SurveyDataFile::get_instance();
|
||||||
|
$SDF->init($this->anketa);
|
||||||
|
$SDF->clearFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($_GET['a'] == 'dataCopyRow') {
|
} elseif ($_GET['a'] == 'dataCopyRow') {
|
||||||
|
@ -475,12 +475,15 @@ class LibraryBranching {
|
|||||||
echo ' <span class="faicon list"></span>';
|
echo ' <span class="faicon list"></span>';
|
||||||
echo ' <span class="title">'.substr(strip_tags($spremenljivka['naslov']), 0, 40).'</span>';
|
echo ' <span class="title">'.substr(strip_tags($spremenljivka['naslov']), 0, 40).'</span>';
|
||||||
|
|
||||||
// Urejanje Vprasanja
|
|
||||||
if($this->tab == '0' && ($spremenljivka['folder_uid'] == $global_user_id || $admin_type == 0)){
|
echo '<div class="right_icons">';
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
echo ' <span class="faicon monitor" onClick="previewVprasanje(\''.$spremenljivka['id'].'\');"></span>';
|
echo ' <span class="faicon monitor" onClick="previewVprasanje(\''.$spremenljivka['id'].'\');"></span>';
|
||||||
|
|
||||||
|
// Urejanje Vprasanja
|
||||||
|
if($this->tab == '0' && ($spremenljivka['folder_uid'] == $global_user_id || $admin_type == 0)){
|
||||||
|
|
||||||
// Tri pikice za prikaz urejanja vprasanja
|
// Tri pikice za prikaz urejanja vprasanja
|
||||||
echo ' <span class="faicon dots_ver dots_ver_item" onClick="showLibraryItemEdit(this);"></span>';
|
echo ' <span class="faicon dots_ver dots_ver_item" onClick="showLibraryItemEdit(this);"></span>';
|
||||||
|
|
||||||
@ -493,6 +496,9 @@ class LibraryBranching {
|
|||||||
echo ' </div>';
|
echo ' </div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
echo ' </div>';
|
echo ' </div>';
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
@ -5712,3 +5712,10 @@ function toggleAddUser(){
|
|||||||
$("#new_user_option").toggleClass('displayNone');
|
$("#new_user_option").toggleClass('displayNone');
|
||||||
$("#existing_user_option").toggleClass('displayNone');
|
$("#existing_user_option").toggleClass('displayNone');
|
||||||
}
|
}
|
||||||
|
function CommentDropdownClearText () {
|
||||||
|
$("#vsebina_0_4").value = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleCommentDropdown () {
|
||||||
|
$("#comment_dropdown").toggleClass('displayNone');
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -707,3 +707,7 @@ span.faicon.screwdriver::before{
|
|||||||
font-weight: 600 !important;
|
font-weight: 600 !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.faicon.fa-x::before{
|
||||||
|
content: "\58";
|
||||||
|
}
|
@ -321,11 +321,17 @@
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right_icons{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.dots_ver{
|
.dots_ver{
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
padding: 7px 8px;
|
padding: 7px 8px;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
|
|
||||||
@ -341,10 +347,8 @@
|
|||||||
.monitor{
|
.monitor{
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
right: 22px;
|
|
||||||
padding: 7px 8px;
|
padding: 7px 8px;
|
||||||
margin-right: 0;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder_empty:before{
|
.folder_empty:before{
|
||||||
@ -359,6 +363,8 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
top: 35px;
|
top: 35px;
|
||||||
|
|
||||||
|
width: 140px;
|
||||||
|
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
|
||||||
ul li{
|
ul li{
|
||||||
|
@ -681,7 +681,9 @@ div.page_komentarji_anketa {
|
|||||||
margin: 0px 3px;
|
margin: 0px 3px;
|
||||||
}
|
}
|
||||||
#quick_comments_link {
|
#quick_comments_link {
|
||||||
a {
|
|
||||||
|
position:relative;
|
||||||
|
|
||||||
span.link {
|
span.link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px !important;
|
padding: 3px !important;
|
||||||
@ -711,7 +713,6 @@ div.page_komentarji_anketa {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.has_comment {
|
&.has_comment {
|
||||||
@ -728,12 +729,151 @@ div.page_komentarji_anketa {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
color: $white !important;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&.inactive_comments {
|
&.inactive_comments {
|
||||||
span.faicon::before {
|
span.faicon::before {
|
||||||
color: $dark-blue !important;
|
color: $dark-blue !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#comment_dropdown {
|
||||||
|
position: absolute;
|
||||||
|
background-color: $white;
|
||||||
|
top: 35px;
|
||||||
|
right: 0;
|
||||||
|
width: 305px;
|
||||||
|
|
||||||
|
z-index: 9999;
|
||||||
|
|
||||||
|
box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.12);
|
||||||
|
border-radius: 2px;
|
||||||
|
|
||||||
|
font-family: $font_family;
|
||||||
|
|
||||||
|
padding: 12px;
|
||||||
|
|
||||||
|
cursor: auto !important;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
|
||||||
|
border-bottom: 1px $gray solid;
|
||||||
|
|
||||||
|
font-size: 14px !important;
|
||||||
|
color: $black;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-content: center;
|
||||||
|
|
||||||
|
span.faicon.comment_dropdown {
|
||||||
|
margin-right: 6px;
|
||||||
|
line-height: 17px !important;
|
||||||
|
&::before{
|
||||||
|
color: $blue !important;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px !important;
|
||||||
|
content: "\f27a";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
color: $blue;
|
||||||
|
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px !important;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-content: center;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
width: fit-content;
|
||||||
|
|
||||||
|
|
||||||
|
span.faicon {
|
||||||
|
margin-left: 8px;
|
||||||
|
line-height: 17px !important;
|
||||||
|
&::before{
|
||||||
|
color: $blue !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#comment_field {
|
||||||
|
|
||||||
|
padding-top: 16px;
|
||||||
|
border-top: 1px solid $gray;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
height: 130px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.button_holder {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 8px;
|
||||||
|
border-top: 1px solid $gray;
|
||||||
|
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
button {
|
||||||
|
min-width: 128px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.options {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.square {
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid $blue;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
margin-left: 8px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
|
||||||
|
color: $blue;
|
||||||
|
font-size: 14px !important;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.blue {
|
||||||
|
background-color: $blue;
|
||||||
|
span.faicon::before {
|
||||||
|
font-size: 14px !important;
|
||||||
|
color: $white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span.faicon::before {
|
||||||
|
$font_weight: 400;
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#quick_comments_link.newCss {
|
#quick_comments_link.newCss {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user