diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php
index 75ebcfdc6..08bdd432c 100644
--- a/admin/survey/SurveyAdmin.php
+++ b/admin/survey/SurveyAdmin.php
@@ -379,6 +379,9 @@ class SurveyAdmin
echo ' '.$lang['srv_saving'].'';
echo ' ';
+ // Obvestilo o akciji (success...) spodaj levo
+ echo '
';
+
$sqlQuestions = sisplet_query("SELECT s.id, s.naslov, s.tip FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='".$rowFolderSurveys['id']."' ORDER BY g.vrstni_red ASC, s.vrstni_red ASC");
while ($rowQuestions = mysqli_fetch_array($sqlQuestions)) {
$this->displayRightQuestionItem($rowQuestions);
}
+
+ echo '
';
}
}
// Seznam vprasanj iz knjiznice
else{
// Najprej zlistamo vse child folderje
- /*$sqlFolders = sisplet_query("SELECT id, naslov FROM srv_library_folder WHERE parent='".$this->folder_id."' AND tip='".$this->tab."' ORDER BY naslov");
+ $sqlFolders = sisplet_query("SELECT id, naslov FROM srv_library_folder WHERE parent='".$this->folder_id."' AND tip='".$this->tab."' ORDER BY naslov");
if (mysqli_num_rows($sqlFolders) > 0){
// Loop po vseh mapah znotraj parenta
@@ -370,7 +390,7 @@ class LibraryBranching {
}
}
- echo '';
@@ -506,7 +526,7 @@ class LibraryBranching {
if($this->tab == '0' && ($if['folder_uid'] == $global_user_id || $admin_type == 0)){
// Tri pikice za prikaz urejanja folderja
- echo '
';
+ echo '
';
// Skrit div za urejanje folderja
echo '
';
@@ -665,11 +685,12 @@ class LibraryBranching {
}
- // Dobimo root folder uporabnika
- private function getRootFolder(){
+ // Dobimo sistemski root folder in root folder uporabnika
+ private function setRootFolders(){
global $global_user_id;
global $lang;
+ // Root folder uporabnika
$sqlFolder = sisplet_query("SELECT id FROM srv_library_folder WHERE uid='".$global_user_id."' AND parent='0' AND tip='".$this->tab."' AND lang='".$lang['id']."'");
// Za prvic ko pride user, da mu dodamo folder
@@ -684,14 +705,19 @@ class LibraryBranching {
('".$global_user_id."', '".$this->tab."', '".$naslov."', '0', '".$lang['id']."')
");
- $root_folder_id = mysqli_insert_id($GLOBALS['connect_db']);
+ $this->root_folder['user'] = mysqli_insert_id($GLOBALS['connect_db']);
}
else{
$rowFolder = mysqli_fetch_array($sqlFolder);
- $root_folder_id = $rowFolder['id'];
+ $this->root_folder['user'] = $rowFolder['id'];
}
- return $root_folder_id;
+
+ // Sistemski root folder
+ $sqlFolder = sisplet_query("SELECT id FROM srv_library_folder WHERE uid='0' AND parent='0' AND tip='".$this->tab."' AND lang='".$lang['id']."'");
+ $rowFolder = mysqli_fetch_array($sqlFolder);
+
+ $this->root_folder['system'] = $rowFolder['id'];
}
// Seznam folderjev uporabnika
@@ -733,8 +759,8 @@ class LibraryBranching {
$this->tab = (isset($_POST['tab'])) ? (int)$_POST['tab'] : 0;
- // Nastavimo uporabnikov root folder
- $this->root_folder = $this->getRootFolder();
+ // Nastavimo root folder
+ $this->setRootFolders();
// Odpremo popup s knjiznico
@@ -1003,7 +1029,7 @@ class LibraryBranching {
$folder_id = $_POST['folder_id'];
if($folder_id == '' || $folder_id == 0)
- $folder_id = $this->root_folder;
+ $folder_id = $this->root_folder['user'];
if ($item_id > 0) {
@@ -1021,10 +1047,10 @@ class LibraryBranching {
sisplet_query("UPDATE srv_if SET folder='".$folder_id."', label='".$title."' WHERE id='".$id."'");
}
- $this->displayAddIntoLibrarySuccess($item_id, $type, $success=true);
+ //$this->displayAddIntoLibrarySuccess($item_id, $type, $success=true);
}
else{
- $this->displayAddIntoLibrarySuccess($item_id, $type, $success=false);
+ //$this->displayAddIntoLibrarySuccess($item_id, $type, $success=false);
}
}
}
diff --git a/admin/survey/script/library.js b/admin/survey/script/library.js
index 86bf5956c..128b75228 100644
--- a/admin/survey/script/library.js
+++ b/admin/survey/script/library.js
@@ -329,11 +329,15 @@ function showLibraryFolderEdit(element){
if($(element).parent().find('.folder_item_settings').hasClass('displayNone')){
$('.folder_item_settings').addClass('displayNone');
+ $('.dots_ver_folder').removeClass('active');
$(element).parent().find('.folder_item_settings').removeClass('displayNone');
+ $(element).addClass('active');
}
else{
$('.folder_item_settings').addClass('displayNone');
+ $('.dots_ver_folder').removeClass('active');
$(element).parent().find('.folder_item_settings').addClass('displayNone');
+ $(element).removeClass('active');
}
event.stopPropagation();
@@ -391,6 +395,19 @@ function renameLibraryFolder(folder_id){
}
+// Klik na posamezno anketo - prikazemo/skrijemo vprasanja na desni znotraj ankete (desni tab)
+function toggleLibrarySurveyQuestions(folder_id){
+
+ if($('#survey_title_'+folder_id).hasClass('active')){
+ $('#survey_title_'+folder_id).removeClass('active');
+ $('#survey_questions_'+folder_id).hide();
+ }
+ else{
+ $('#survey_title_'+folder_id).addClass('active');
+ $('#survey_questions_'+folder_id).show();
+ }
+}
+
// Klik na posamezen item na desni
function selectLibraryItem(item_id){
@@ -413,10 +430,13 @@ function showLibraryItemEdit(element){
if($(element).parent().find('.item_settings').hasClass('displayNone')){
$('.item_settings').addClass('displayNone');
+ $('.dots_ver_item').removeClass('active');
$(element).parent().find('.item_settings').removeClass('displayNone');
+ $(element).addClass('active');
}
else{
$('.item_settings').addClass('displayNone');
+ $('.dots_ver_item').removeClass('active');
$(element).parent().find('.item_settings').addClass('displayNone');
}
@@ -491,9 +511,13 @@ function insertLibraryItemsIntoSurvey(){
items.push(id + '_' + type);
});
- popupClose();
+
- $("#branching").load('ajax.php?t=libraryBranching&a=addIntoSurvey', {anketa: srv_meta_anketa_id, items: items});
+ $("#branching").load('ajax.php?t=libraryBranching&a=addIntoSurvey', {anketa: srv_meta_anketa_id, items: items}, function(){
+
+ popupClose();
+ actionNotePopup('lib_add_to_survey', 'success');
+ });
}
@@ -512,5 +536,10 @@ function addIntoLibrary(item_id, type){
var title = $('#lib_item_title').val();
var folder_id = $('#lib_item_folder').val();
- $("#general_popup").load('ajax.php?t=libraryBranching&a=addIntoLibrary', {anketa: srv_meta_anketa_id, item_id:item_id, type:type, title:title, folder_id:folder_id});
+ //$("#general_popup").load('ajax.php?t=libraryBranching&a=addIntoLibrary', {anketa: srv_meta_anketa_id, item_id:item_id, type:type, title:title, folder_id:folder_id});
+ $.post('ajax.php?t=libraryBranching&a=addIntoLibrary', {anketa: srv_meta_anketa_id, item_id:item_id, type:type, title:title, folder_id:folder_id}, function(){
+
+ popupClose();
+ actionNotePopup('lib_add_to_lib_type'+type, 'success');
+ });
}
diff --git a/admin/survey/script/script.js b/admin/survey/script/script.js
index 0f314a190..a82b8d202 100644
--- a/admin/survey/script/script.js
+++ b/admin/survey/script/script.js
@@ -5520,3 +5520,22 @@ function popupClose(){
$('#general_popup').fadeOut('slow').html('').attr('class', 'divPopUp');
$('#fade').fadeOut('slow');
}
+
+
+// Note popup spodaj levo
+function actionNotePopup(name, type){
+
+ $('#action_note_holder').html('').load('ajax.php?a=actionNotePopup', {name:name, type:type}, function(){
+
+ setTimeout(function(){
+ actionNotePopupClose();
+ }, 5000);
+ });
+}
+
+function actionNotePopupClose(){
+
+ $('.action_note_box').fadeOut(function(){
+ $('#action_note_holder').html('');
+ });
+}
diff --git a/lang/1.php b/lang/1.php
index baf1a2065..1b20680c0 100644
--- a/lang/1.php
+++ b/lang/1.php
@@ -8449,6 +8449,11 @@ $lang = array (
'alert_missing_arguments' => "Manjkajoči argumenti! Plugin: dataHolder",
+ // Besedila popupa levo spodaj (obvestilo o akciji)
+ "action_note_lib_add_to_lib_type1" => "Vprašanje je bilo dodano v knjižnico",
+ "action_note_lib_add_to_lib_type2" => "Blok je bil dodan v knjižnico",
+ "action_note_lib_add_to_survey" => "Elementi so bili dodani v anketo",
+
);
diff --git a/lang/2.php b/lang/2.php
index ef5535580..85f3a93b4 100644
--- a/lang/2.php
+++ b/lang/2.php
@@ -8344,6 +8344,12 @@ GDPR introduction preview",
+ // Besedila popupa levo spodaj (obvestilo o akciji)
+ "action_note_lib_add_to_lib_type1" => "Question added to library",
+ "action_note_lib_add_to_lib_type2" => "Block added to library",
+ "action_note_lib_add_to_survey_type1" => "Question added to survey",
+ "action_note_lib_add_to_survey_type2" => "Block added to survey",
+
diff --git a/public/css/admin_new.css b/public/css/admin_new.css
index e2ba82573..6c7cc251b 100644
--- a/public/css/admin_new.css
+++ b/public/css/admin_new.css
@@ -5339,6 +5339,10 @@ span.faicon.minus::before {
content: "";
}
+span.faicon.success::before {
+ content: "";
+}
+
span.faicon.close::before {
font-size: 18px;
font-weight: 400;
@@ -7299,6 +7303,69 @@ body.waitlong #loading {
font-size: 14px;
}
+/* Action spodaj desno (npr. uspesno kopiranje...) */
+#action_note_holder {
+ display: flex;
+ flex-direction: column-reverse;
+ z-index: 900;
+ position: fixed;
+ bottom: 16px;
+ left: 16px;
+}
+#action_note_holder .action_note_box {
+ display: flex;
+ align-items: center;
+ position: relative;
+ box-sizing: border-box;
+ width: 275px;
+ height: 38px;
+ padding: 0 16px;
+ font-size: 14px;
+ background-color: #FFFFFF;
+ border: 1px solid #1E88E5;
+ border-radius: 2px;
+}
+#action_note_holder .action_note_box.success {
+ border-color: #1E88E5;
+}
+#action_note_holder .action_note_box.success .faicon:before {
+ color: #1E88E5;
+}
+#action_note_holder .action_note_box.error {
+ border-color: #FF0000;
+}
+#action_note_holder .action_note_box.error .faicon:before {
+ color: #FF0000;
+}
+#action_note_holder .action_note_box span.faicon {
+ margin-right: 8px;
+}
+#action_note_holder .action_note_box span.faicon::before {
+ font-size: 15px;
+}
+#action_note_holder .action_note_box span.text {
+ font-size: 14px;
+}
+#action_note_holder .action_note_box .close {
+ cursor: pointer;
+ position: absolute !important;
+ top: 10px;
+ right: 10px;
+ z-index: 9999;
+ font-size: 12px !important;
+ color: #777777;
+}
+#action_note_holder .action_note_box .close:hover {
+ color: #333333;
+}
+#action_note_holder .action_note_box .close span {
+ color: #777777;
+ text-decoration: none;
+}
+#action_note_holder .action_note_box .close span:hover {
+ color: #333333;
+}
+
/*
Popupi z alerti
*/
@@ -13429,6 +13496,11 @@ and open the template in the editor.
display: none;
position: absolute;
right: 0;
+ padding: 7px 8px;
+ margin-right: 0;
+}
+.tab_content .content_left ul li.folder_item .dots_ver.active {
+ display: block !important;
}
.tab_content .content_left ul li.folder_item .folder_item_settings {
padding: 16px;
@@ -13479,6 +13551,18 @@ and open the template in the editor.
flex-direction: column;
width: 760px;
}
+.tab_content .content_right .folder_title {
+ margin-bottom: 16px;
+ font-size: 18px;
+ font-weight: 700;
+}
+.tab_content .content_right .folder_title .faicon {
+ margin-right: 8px;
+ color: #1E88E5;
+}
+.tab_content .content_right .folder_title .faicon:before {
+ font-size: 18px;
+}
.tab_content .content_right .question_list {
display: flex;
flex-direction: column;
@@ -13488,14 +13572,45 @@ and open the template in the editor.
padding: 16px;
border-bottom: 1px #E5E5E5 solid;
}
+.tab_content .content_right .question_list .spacer {
+ margin-top: 8px;
+}
.tab_content .content_right .question_list .survey_title {
- margin: 16px 0 8px 0;
- font-weight: 600;
- text-transform: uppercase;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ position: relative;
+ box-sizing: border-box;
+ min-height: 36px;
+ max-width: 100%;
+ width: 710px;
+ padding: 0 16px;
+ margin: 0 0 8px 0;
+ border: 1px #E5E5E5 solid;
+ border-radius: 2px;
}
.tab_content .content_right .question_list .survey_title:first-child {
margin-top: 0;
}
+.tab_content .content_right .question_list .survey_title:hover {
+ background-color: #F8F8F8;
+}
+.tab_content .content_right .question_list .survey_title.active {
+ border-color: #1E88E5;
+}
+.tab_content .content_right .question_list .survey_title.active .faicon:before {
+ color: #1E88E5;
+}
+.tab_content .content_right .question_list .survey_title span {
+ margin-right: 8px;
+ font-size: 14px;
+}
+.tab_content .content_right .question_list .survey_title span.faicon:before {
+ color: #D3D3D3;
+}
+.tab_content .content_right .question_list .survey_questions {
+ display: none;
+}
.tab_content .content_right .question_list .question_item_holder,
.tab_content .content_right .question_list .folder_item_holder {
cursor: pointer;
@@ -13574,6 +13689,8 @@ and open the template in the editor.
display: none;
position: absolute;
right: 0;
+ padding: 7px 8px;
+ margin-right: 0;
}
.tab_content .content_right .question_list .question_item_holder .question_item_info .dots_ver:before,
.tab_content .content_right .question_list .question_item_holder .folder_item_info .dots_ver:before,
@@ -13581,6 +13698,18 @@ and open the template in the editor.
.tab_content .content_right .question_list .folder_item_holder .folder_item_info .dots_ver:before {
color: #333333;
}
+.tab_content .content_right .question_list .question_item_holder .question_item_info .dots_ver.active,
+.tab_content .content_right .question_list .question_item_holder .folder_item_info .dots_ver.active,
+.tab_content .content_right .question_list .folder_item_holder .question_item_info .dots_ver.active,
+.tab_content .content_right .question_list .folder_item_holder .folder_item_info .dots_ver.active {
+ display: block;
+}
+.tab_content .content_right .question_list .question_item_holder .question_item_info .folder_empty:before,
+.tab_content .content_right .question_list .question_item_holder .folder_item_info .folder_empty:before,
+.tab_content .content_right .question_list .folder_item_holder .question_item_info .folder_empty:before,
+.tab_content .content_right .question_list .folder_item_holder .folder_item_info .folder_empty:before {
+ color: #D3D3D3;
+}
.tab_content .content_right .question_list .question_item_holder .question_item_info .item_settings,
.tab_content .content_right .question_list .question_item_holder .folder_item_info .item_settings,
.tab_content .content_right .question_list .folder_item_holder .question_item_info .item_settings,
diff --git a/resources/sass/admin_new/basic/icons/standard.scss b/resources/sass/admin_new/basic/icons/standard.scss
index 5ee572821..777876e98 100644
--- a/resources/sass/admin_new/basic/icons/standard.scss
+++ b/resources/sass/admin_new/basic/icons/standard.scss
@@ -17,6 +17,10 @@ span.faicon.minus::before{
content: "\f068";
}
+// Kljukica
+span.faicon.success::before{
+ content: "\f058";
+}
span.faicon.close::before{
font-size: 18px;
font-weight: 400;
@@ -679,4 +683,3 @@ span.faicon.list::before{
span.faicon.link-chain::before{
content: "\f0c1";
}
-
diff --git a/resources/sass/admin_new/components/popup/loader.scss b/resources/sass/admin_new/components/popup/loader.scss
index 046275db1..8e6449348 100644
--- a/resources/sass/admin_new/components/popup/loader.scss
+++ b/resources/sass/admin_new/components/popup/loader.scss
@@ -54,3 +54,85 @@ body.waitlong {
font-size: 14px;
}
}
+
+/* Action spodaj desno (npr. uspesno kopiranje...) */
+#action_note_holder {
+ display: flex;
+ flex-direction: column-reverse;
+
+ z-index: 900;
+ position: fixed;
+ bottom: 16px;
+ left: 16px;
+
+ .action_note_box{
+ display: flex;
+ align-items: center;
+
+ position: relative;
+ box-sizing: border-box;
+ width: 275px;
+ height: 38px;
+ padding: 0 16px;
+
+ font-size: 14px;
+
+ background-color: $white;
+ border: 1px solid $blue;
+ border-radius: 2px;
+
+ &.success{
+ border-color: $blue;
+
+ .faicon:before{
+ color: $blue;
+ }
+ }
+
+ &.error{
+ border-color: $red;
+
+ .faicon:before{
+ color: $red;
+ }
+ }
+
+ span.faicon{
+ margin-right: 8px;
+
+ &::before{
+ font-size: 15px;
+ }
+ }
+
+ span.text{
+ font-size: 14px;
+ }
+
+ .close{
+ cursor: pointer;
+
+ position: absolute !important;
+ top: 10px;
+ right: 10px;
+ z-index: 9999;
+
+ font-size: 12px !important;
+ color: $very-dark-gray;
+
+ &:hover{
+ color: $black;
+ }
+
+ span{
+ color: $very-dark-gray;
+ text-decoration: none;
+
+ &:hover{
+ color: $black;
+ }
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/resources/sass/admin_new/pages/survey_edit/library.scss b/resources/sass/admin_new/pages/survey_edit/library.scss
index dac169423..2bbdc820a 100644
--- a/resources/sass/admin_new/pages/survey_edit/library.scss
+++ b/resources/sass/admin_new/pages/survey_edit/library.scss
@@ -134,6 +134,12 @@
position: absolute;
right: 0;
+ padding: 7px 8px;
+ margin-right: 0;
+
+ &.active{
+ display: block !important;
+ }
}
.folder_item_settings{
@@ -168,6 +174,22 @@
width: 760px;
+ .folder_title{
+ margin-bottom: 16px;
+
+ font-size: 18px;
+ font-weight: 700;
+
+ .faicon{
+ margin-right: 8px;
+ color: $blue;
+
+ &:before{
+ font-size: 18px;
+ }
+ }
+ }
+
.question_list{
display: flex;
flex-direction: column;
@@ -179,15 +201,55 @@
border-bottom: 1px $gray solid;
- .survey_title{
- margin: 16px 0 8px 0;
+ .spacer{
+ margin-top: 8px;
+ }
- font-weight: 600;
- text-transform: uppercase;
+ .survey_title{
+ cursor: pointer;
+
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ box-sizing: border-box;
+ min-height: 36px;
+ max-width: 100%;
+ width: 710px;
+ padding: 0 16px;
+ margin: 0 0 8px 0;
+
+ border: 1px $gray solid;
+ border-radius: 2px;
&:first-child{
margin-top: 0;
}
+
+ &:hover{
+ background-color: $light-gray;
+ }
+
+ &.active{
+ border-color: $blue;
+
+ .faicon:before{
+ color: $blue;
+ }
+ }
+
+ span{
+ margin-right: 8px;
+ font-size: 14px;
+
+ &.faicon:before{
+ color: $dark-gray2;
+ }
+ }
+ }
+
+ .survey_questions{
+ display: none;
}
.question_item_holder,
@@ -261,10 +323,20 @@
position: absolute;
right: 0;
+ padding: 7px 8px;
+ margin-right: 0;
&:before{
color: $black;
}
+
+ &.active{
+ display: block;
+ }
+ }
+
+ .folder_empty:before{
+ color: $dark-gray2;
}
.item_settings{