summaryrefslogtreecommitdiffstats
path: root/admin/survey/Branching.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/Branching.php')
-rw-r--r--admin/survey/Branching.php4631
1 files changed, 2938 insertions, 1693 deletions
diff --git a/admin/survey/Branching.php b/admin/survey/Branching.php
index 08ff025..6c48009 100644
--- a/admin/survey/Branching.php
+++ b/admin/survey/Branching.php
@@ -5,22 +5,8 @@ class Branching {
var $anketa; // trenutna anketa
var $grupa; // trenutna grupa
var $spremenljivka; // trenutna spremenljivka
- //var $SurveyAdmin = null; // globalna spremenljivka za SurveyAdmin // SurveyAdmin se nikjer vec ne klice iz Branchinga
-
- //var $sidebar; // ali prikazemo sidebar: 0-ne, 1-vprasanja, 2-library // sidebara nimamo vec
- //var $collapsed_content; // ali prikazujemo vseibno IFa (ce ne se poklice z ajaxom) // to se bo pa mogoce se uporabil, pri skrivanju ifov, zaenkrat se pa ne
var $skin = 0;
-
- // teh nastavitev se ne uporablja vec
- // tele nastavitve so tudi v BranchingAjax in jih je treba tudi tam popravit!
-
- //var $maxIfCount = 0; // koliko ifov je meja za prikaz. Če je 0 prikeže vse
- //var $autoRecount = 0; // ce je vec kot 50 spremenljivk nimamo avtomatskega prestevilcevanja
-
- //var $new = true; // spremenljivka za nov nacin prikaza ifov (s checkboxi), ker bo zihr treba se nazaj dajat... (v Branching.php in branching.js)
- //var $full_screen_edit = false; // Ali editiramo v full screen nacinu
-
var $expanded = false; // ali prikazujemo anketo razsirjeno (prikazan predogled vprasanja) ali skrceno (samo 1 vrstica za vprasanje)
var $db_table = '';
@@ -34,7 +20,7 @@ class Branching {
var $prevajanje = false;
var $imageadded = array();
- //$imageadded[$spremenljivka] = false;
+
/**
* @desc konstruktor
@@ -84,8 +70,7 @@ class Branching {
SurveyInfo::getInstance()->SurveyInit($this->anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- $this->db_table = '_active';
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
UserSetting :: getInstance()->Init($global_user_id);
@@ -102,7 +87,7 @@ class Branching {
}
/**
- * @desc inicializacija branchinga (samo prvi�, na za�etku), prepi�e vrstni red iz normalenga urejanja
+ * @desc inicializacija branchinga (samo prvic, na zacetku), prepise vrstni red iz normalenga urejanja
*/
function init_branching () {
@@ -147,44 +132,39 @@ class Branching {
$gl = new Glasovanje($this->anketa);
- //div z nastavitvami za glasovanje
- echo ' <div id="glas_settings">';
- //$this->display_glasovanje_settings();
+ // div z nastavitvami za glasovanje
+ echo ' <div class="glas_settings_holder">';
+ echo ' <div id="glas_settings">';
$gl->display_glasovanje_settings();
- echo ' </div> <!-- /glas_settings -->';
+ echo ' </div>';
+ echo ' </div>';
echo '<div id="placeholder">';
- echo '<div id="branching" class="branching_new expanded branching_glasovanje">';
-
- //$this->branching_struktura();
+ echo ' <div id="branching" class="branching_new expanded branching_glasovanje">';
$gl = new Glasovanje($this->anketa);
$gl->vprasanja();
+ echo ' </div>'; // #branching
- echo '</div>'; // #branching
-
- //$this->vprasanje_float_editing();
- echo '<div id="vprasanje_float_editing" class="float_glasovanje"></div>';
+ echo ' <div id="vprasanje_float_editing" class="float_glasovanje"></div>';
echo '</div>'; // #placeholder
-
- $this->toolbox();
}
// Navadna anketa ali forma
else{
+
+ Common::Init($this->anketa);
+
echo '<div id="placeholder">';
- echo '<div id="branching" class="branching_new'.($this->expanded?' expanded':' collapsed').($this->survey_type==1?' branching_forma':'').'">';
-
- Common::Init($this->anketa);
+ echo ' <div id="branching" class="branching_new'.($this->expanded?' expanded':' collapsed').($this->survey_type==1?' branching_forma':'').'">';
echo Common::checkStruktura();
$this->branching_struktura();
+ echo ' </div>';
- echo '</div>'; // #branching
-
- $this->vprasanje_float_editing();
+ echo ' <div id="vprasanje_float_editing"></div>';
echo '</div>'; // #placeholder
@@ -192,11 +172,11 @@ class Branching {
}
// forma in glasovanje - hitre nastavitve na desni - ce imamo odprto knjiznico ne prikazemo zaradi prekrivanja
- if ( ($this->survey_type == 1 || $this->survey_type == 0) && ($row['toolbox'] < 3) ) {
+ if ( $this->survey_type == 1 || $this->survey_type == 0 ) {
echo '<div id="quick_settings_holder" '.($this->survey_type==0 ? ' class="glas_quick_settings"':'').'>';
- echo '<div id="quick_settings" '.($this->survey_type==0 ? ' class="glas_quick_settings"':'').'>';
+ echo ' <div id="quick_settings" '.($this->survey_type==0 ? ' class="glas_quick_settings"':'').'>';
$this->toolbox_settings();
- echo '</div>';
+ echo ' </div>';
echo '</div>';
}
@@ -208,33 +188,9 @@ class Branching {
}
?><script> var vprasanje_tracking = <?=$row['vprasanje_tracking']?>; </script><?php
-
- /*echo '<script>';
- echo 'alert(document.getElementsByTagName("*").length);';
- echo '</script>';*/
-
}
- function vprasanje_float_editing () {
-
- echo '<div id="vprasanje_float_editing"></div>';
-
- }
-
- /**
- * prikaze zgornji toolbox z nastavitvami
- *
- */
- /*function toolbox_nastavitve () {
-
- $row = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<div id="toolbox_nastavitve"'.($row['toolbox']>=3?' class="library"':'').'>';
- $this->display_toolbox_nastavitve();
- echo '</div>';
- }*/
-
/**
* prikaze zgornji toolbox z nastavitvami
*
@@ -259,49 +215,6 @@ class Branching {
$full_view = (int)$row_query_fv['full_view'] == 1 ? true : false;
$full_view = true;
- echo '<div class="floatLeft">';
- # skrčen / razširjen
- if ($this->expanded) {
- echo '<span title="'.$lang['srv_expanded_1'].'"><a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=expanded&value=0"><span class="faicon expanded"></span>'.$lang['srv_expanded_0_short'].'</a></span> ';
- $sqle = sisplet_query("SELECT count(*) AS c FROM srv_branching WHERE ank_id='$this->anketa'");
- $rowe = mysqli_fetch_array($sqle);
- if ($rowe['c'] > 15 && !isset($_COOKIE['expanded']))
- echo '<span class="expanded-tooltip top">'.$lang['srv_expaned_text'].' <a href="#" onclick="$(this).closest(\'.expanded-tooltip\').hide(); var d = new Date(); d.setDate(d.getDate()+30); document.cookie=\'expanded=1;expires=\'+d.toUTCString(); return false;" class="close">'.$lang['srv_zapri'].'</a><span class="arrow"></span></span>';
- } else {
- echo '<span title="'.$lang['srv_expanded_0'].'"><a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=expanded&value=1"><span class="faicon compress"></span>'.$lang['srv_expanded_0_short'].'</a></span> ';
- }
- echo Help::display('srv_branching_expanded');
-
- echo '</div>';
-
-
- echo '<div class="floatRight">';
-
- # find & replace
- if ($row['locked'] == 0) {
- echo '<a href="#" onclick="find_replace(); return false;" title="'.$lang['srv_find_replace'].'" ><span class="faicon replace"></span></a>';
- }
-
- if ($row['locked'] == 0 && $full_view == true) {
- echo '<a href="#" onclick="javascript:pagebreak_all(); return false;" title="'.$lang['srv_pagebreak_all'].'"><span class="faicon paragraph"></span></a> '."\n";
- }
-
- # Hrošč je viden samo če imamo ife in razširjen pogled
- if ($row['locked'] == 0 && $full_view == true) { // if ($row['flat'] == 0)
- echo '<a href="#" onclick="check_pogoji(); return false;" title="'.$lang['srv_check_pogoji'].'"><span class="faicon bug"></span></a> '."\n";
- }
-
- if ($row['locked'] == 0 && $full_view == true) {
- echo '<a href="#" onclick="prestevilci(); return false;"><span class="faicon hashtag" title="'.$lang['srv_grupe_recount_branching'].'"></span></a>' . Help :: display('srv_grupe_recount_branching') ."\n";
- }
-
- if ($has_if == true && $full_view == true || ($has_if == true && $this->expanded == false)) {
- echo '<a href="#" onClick="expandCollapseAllPlusMinus(\'expand\'); return false;"><span class="faicon plus_square" title="'.$lang['srv_expand'].'"></span></a>'."\n";
- echo '<a href="#" onClick="expandCollapseAllPlusMinus(\'collapse\'); return false;"><span class="faicon minus_square" title="'.$lang['srv_collapse'].'"></span></a>'."\n";
- }
-
- echo '</div>';
-
// prikaz blokov kot zavihke
echo '<div class="blockSwitch">';
$sql = sisplet_query("SELECT i.* FROM srv_if i, srv_branching b WHERE i.tab='1' AND i.tip='1' AND i.id=b.element_if AND b.ank_id='$this->anketa' ORDER BY b.parent, b.vrstni_red");
@@ -336,20 +249,20 @@ class Branching {
*
*/
function toolbox () {
-
+
$row = SurveyInfo::getInstance()->getSurveyRow();
- if($this->survey_type != 0)
- $this->toolbox_basic2();
+ echo '<div class="toolbox_holder open">';
+
+ $this->toolbox_basic2();
+
+ echo '<script> $(function(){ init_toolbox(); }) </script>';
- if ($row['toolbox'] >= 3)
- $this->toolbox_library();
+ // Predpregled tipa vprašanj
+ $this->getTipPreviewHtml();
+
+ echo '</div>';
- ?><script>
- $(function () {
- init_toolbox();
- });
- </script><?php
// Mobile add question
MobileSurveyAdmin::displayAddQuestion($this->anketa);
@@ -367,96 +280,134 @@ class Branching {
$this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type");
$hierarhija = SurveyInfo::getInstance()->checkSurveyModule('hierarhija');
- // Toolbox napredne nastavitve (prestevilci, dodaj prelome, debug...)
- if($this->survey_type > 1 && !SurveyInfo::getInstance()->checkSurveyModule('hierarhija') ){
-
- echo '<div id="toolbox_advanced_settings">';
-
- echo '<span class="faicon icon-blue wheel_32"></span>';
-
- $this->toolbox_add_advanced_settings();
-
- echo '</div>';
- }
-
- echo '<div id="toolbox_basic"'.($this->survey_type==1?' class="forma"':'').($hierarhija ? ' class="toolbox-hierarhija"' : '').'>';
+ echo '<div id="toolbox_basic" class="toolbox '.($this->survey_type==1?' forma':'').($hierarhija ? ' toolbox-hierarhija' : '').'">';
if ($row['locked'] == 1) {
- // Ce ima uporabnik prepreceno moznost odklepanja ankete
$d = new Dostop();
- if(($hierarhija && SurveyInfo::getSurveyModules('hierarhija') == 2) || $d->checkDostopSub('lock') && ($admin_type != 0 && $admin_type != 1)){
+
+ // Ce ima uporabnik prepreceno moznost odklepanja ankete
+ $prevent_unlock = 0;
+ if(SurveyInfo::getSurveyModules('hierarhija') == 2 || (!$d->checkDostopSub('lock') && $row['locked'] == 1 && $admin_type != 0 && $admin_type != 1))
+ $prevent_unlock = 1;
+
+ if($prevent_unlock == 1){
echo '<div id="locked_toolbar">';
- echo '<span class="sprites lock_big"></span>';
+ echo ' <span class="sprites lock_big"></span>';
echo '</div>';
}
else{
- //echo '<a href="#" title="'.$lang['srv_anketa_locked_1'].'" onclick="javascript:anketa_lock(\''.$this->anketa.'\', \'0\');"><p style="text-align:center" ><span class="sprites lock_close_white"></span></p></a>';
echo '<div id="locked_toolbar">';
- echo '<span class="sprites lock_big pointer" onclick="javascript:anketa_lock(\''.$this->anketa.'\', \'0\', \''.$row['mobile_created'].'\');"></span>';
+ echo ' <span class="sprites lock_big pointer" onclick="javascript:anketa_lock(\''.$this->anketa.'\', \'0\', \''.$row['mobile_created'].'\');"></span>';
echo '</div>';
}
if(!$hierarhija) {
- echo '<p class="new_spr" tip="1"><span class="faicon icon-white radio_32"></span></p>';
- echo '<p class="new_spr" tip="2"><span class="faicon icon-white check_32"></span></p>';
+ echo '<div class="toolbox_item new_spr" tip="1"><span class="item_icon faicon icon-white radio_32"></span> <span class="item_text">'.$lang['srv_vprasanje_radio'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
+
+ echo '<div class="toolbox_item new_spr" tip="2"><span class="item_icon faicon icon-white check_32"></span> <span class="item_text">'.$lang['srv_vprasanje_checkbox'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
}
- echo '<p class="new_spr" tip="6"><span class="faicon icon-white matrix_32"></span></p>';
- echo '<p class="new_spr" tip="21"><span class="faicon icon-white abc_32"></span></p>';
+ echo '<div class="toolbox_item new_spr" tip="6"><span class="item_icon faicon icon-white matrix_32"></span> <span class="item_text">'.$lang['srv_vprasanje_multigrid'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
- if(!$hierarhija)
- echo '<p class="new_spr" tip="7"><span class="faicon icon-white number_32"></span></p>';
+ echo '<div class="toolbox_item new_spr" tip="21"><span class="item_icon faicon icon-white abc_32"></span> <span class="item_text">'.$lang['srv_vprasanje_text'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
- echo '<p class="new_spr" tip="5"><span class="faicon icon-white nagovor"></span></p>';
+ if(!$hierarhija){
+ echo '<div class="toolbox_item new_spr" tip="7"><span class="item_icon faicon icon-white number_32"></span> <span class="item_text">'.$lang['srv_vprasanje_number'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
+ }
+
+ echo '<div class="toolbox_item new_spr" tip="5"><span class="item_icon faicon icon-white nagovor"></span> <span class="item_text">'.$lang['srv_vprasanje_label'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
if(!$hierarhija) {
- echo '<div class="new_adv"><span class="faicon icon-white plus_32"></span>';
+ echo '<div class="toolbox_item new_adv"><span class="item_icon faicon icon-white plus_32"></span> <span class="item_text">'.$lang['srv_mobile_add_question'].'</span>';
$this->toolbox_add_advanced();
echo '</div>';
+
+ echo '<div class="toolbox_border"></div>';
}
+ // Knjiznica
+ echo '<div class="toolbox_item open_lib"><span class="item_icon faicon library"></span><span class="item_text">'.$lang['srv_library'].'</span></div>';
+ echo '<div class="toolbox_border open_lib"></div>';
+
// normalna anketa
if ($this->survey_type != 1){
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
- echo '<p class="new_if '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" tip="9999"><span class="faicon icon-white if_32"></span></p>';
- echo '<p class="new_block '.(!$userAccess->checkUserAccess($what='block') ? 'user_access_locked' : '').'" tip="9998"><span class="faicon icon-white block_32"></span></p>';
- }
+ echo '<div class="toolbox_item new_if '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" tip="9999"><span class="item_icon faicon icon-white if_32"></span> <span class="item_text">'.$lang['srv_condition'].'</span></div>';
+ echo '<div class="toolbox_border new_if"></div>';
+
+ echo '<div class="toolbox_item new_block '.(!$userAccess->checkUserAccess($what='block') ? 'user_access_locked' : '').'" tip="9998"><span class="item_icon faicon icon-white block_32"></span> <span class="item_text">'.$lang['srv_block_random_blocks'].'</span></div>';
+ }
+
+ // Pobrisana vprasanja
+ $vd = new VprasanjeDeleted($this->anketa);
+ $deleted_vrasanja_count = $vd->countDeletedVprasanja();
+ echo '<div id="vprasanje_deleted_border" class="toolbox_border '.($deleted_vrasanja_count == 0 ? 'displayNone' : '').'"></div>';
+ echo '<div id="vprasanje_deleted_toolbox" class="toolbox_item open_deleted '.($deleted_vrasanja_count == 0 ? 'displayNone' : '').'"><span class="item_icon faicon delete"></span><span class="item_text">'.$lang['srv_deleted_vprasanja'].' (<span id="vprasanje_deleted_count">'.$deleted_vrasanja_count.'</span>)</span></div>';
}
else {
if(!$hierarhija) {
- echo '<p class="new_spr" tip="1"><span class="faicon icon-white radio_32"></span></p>';
- echo '<p class="new_spr" tip="2"><span class="faicon icon-white check_32"></span></p>';
+ echo '<div class="toolbox_item new_spr" tip="1"><span class="item_icon faicon icon-white radio_32"></span> <span class="item_text">'.$lang['srv_vprasanje_radio'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
+
+ echo '<div class="toolbox_item new_spr" tip="2"><span class="item_icon faicon icon-white check_32"></span> <span class="item_text">'.$lang['srv_vprasanje_checkbox'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
}
- echo '<p class="new_spr" tip="6"><span class="faicon icon-white matrix_32"></span></p>';
- echo '<p class="new_spr" tip="21"><span class="faicon icon-white abc_32"></span></p>';
+ echo '<div class="toolbox_item new_spr" tip="6"><span class="item_icon faicon icon-white matrix_32"></span> <span class="item_text">'.$lang['srv_vprasanje_multigrid'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
+
+ echo '<div class="toolbox_item new_spr" tip="21"><span class="item_icon faicon icon-white abc_32"></span> <span class="item_text">'.$lang['srv_vprasanje_text'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
- if(!$hierarhija)
- echo '<p class="new_spr" tip="7"><span class="faicon icon-white number_32"></span></p>';
+ if(!$hierarhija){
+ echo '<div class="toolbox_item new_spr" tip="7"><span class="item_icon faicon icon-white number_32"></span> <span class="item_text">'.$lang['srv_vprasanje_number'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
+ }
- echo '<p class="new_spr" tip="5"><span class="faicon icon-white nagovor"></span></p>';
+ echo '<div class="toolbox_item new_spr" tip="5"><span class="item_icon faicon icon-white nagovor"></span> <span class="item_text">'.$lang['srv_vprasanje_label'].'</span></div>';
+ echo '<div class="toolbox_border"></div>';
if(!$hierarhija) {
- echo '<div class="new_adv"><span class="faicon icon-white plus_32"></span>';
+ echo '<div class="toolbox_item new_adv"><span class="item_icon faicon icon-white plus_32"></span> <span class="item_text">'.$lang['srv_mobile_add_question'].'</span>';
$this->toolbox_add_advanced();
echo '</div>';
+
+ echo '<div class="toolbox_border"></div>';
}
+ // Knjiznica
+ echo '<div class="toolbox_item open_lib" onClick="displayLibraryPopup();"><span class="item_icon faicon library"></span><span class="item_text">'.$lang['srv_library'].'</span></div>';
+ echo '<div class="toolbox_border open_lib"></div>';
+
// normalna anketa
if ($this->survey_type != 1){
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
- echo '<p class="new_if '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" tip="9999"><span class="faicon icon-white if_32"></span></p>';
- echo '<p class="new_block '.(!$userAccess->checkUserAccess($what='block') ? 'user_access_locked' : '').'" tip="9998"><span class="faicon icon-white block_32"></span></p>';
+ echo '<div class="toolbox_item new_if '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" tip="9999"><span class="item_icon faicon icon-white if_32"></span> <span class="item_text">'.$lang['srv_condition'].'</span></div>';
+ echo '<div class="toolbox_border new_if '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'"></div>';
+
+ echo '<div class="toolbox_item new_block '.(!$userAccess->checkUserAccess($what='block') ? 'user_access_locked' : '').'" tip="9998"><span class="item_icon faicon icon-white block_32"></span> <span class="item_text">'.$lang['srv_block_random_blocks'].'</span></div>';
}
+
+ // Pobrisana vprasanja
+ $vd = new VprasanjeDeleted($this->anketa);
+ $deleted_vrasanja_count = $vd->countDeletedVprasanja();
+ echo '<div id="vprasanje_deleted_border" class="toolbox_border '.($deleted_vrasanja_count == 0 ? 'displayNone' : '').'"></div>';
+ echo '<div id="vprasanje_deleted_toolbox" class="toolbox_item open_deleted '.($deleted_vrasanja_count == 0 ? 'displayNone' : '').'" onClick="displayVprasanjeDeletedPopup();"><span class="item_icon faicon delete"></span><span class="item_text">'.$lang['srv_deleted_vprasanja'].' (<span id="vprasanje_deleted_count">'.$deleted_vrasanja_count.'</span>)</span></div>';
}
echo '</div>';
@@ -466,324 +417,1058 @@ class Branching {
* prikaze popup z vsemi tipi vprasanj
*
*/
- function toolbox_add_advanced() {
+ function toolbox_add_advanced($popup=false) {
global $lang;
global $site_url;
global $admin_type;
global $global_user_id;
- $spr = $_POST['spr'];
- $if = $_POST['if'];
- $endif = $_POST['endif'];
-
+
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
- echo '<div id="toolbox_add_advanced">';
- echo '<p class="toolbox_add_title">'.$lang['srv_add_question_type'].' '.Help::display('srv_toolbox_add_advanced').'</p>';
- echo '<p class="new_question">'.$lang['srv_new_question_text'].'</p>';
+ echo '<div id="toolbox_add_advanced'.($popup ? '_popup' : '').'" class="toolbox_expand">';
- echo '<a style="position:absolute; right:10px; top:10px" href="#" title="'.$lang['srv_zapri'].'" onclick="$(\'#toolbox_add_advanced\').hide(); return false;">';
- echo '<span class="faicon close"></span>';
- echo '</a>';
+ // Naslov v oknu
+ echo '<div class="toolbox_expand_title">';
+ echo $lang['srv_add_question_type'].' '.Help::display('srv_toolbox_add_advanced');
+ echo '<span class="subtitle">'.$lang['srv_new_question_text'].'</span>';
+ echo '</div>';
- echo '<div class="holder">';
- echo '<p class="naslov">'.$lang['srv_sklop_osnovna2'].'</p>';
- echo '<div class="clr"></div>';
+ // Vsebina okna
+ echo '<div class="toolbox_expand_segments_holder">';
- echo '<p class="new_spr adv" tip="1"><span class="sprites radio3"></span> '.$lang['srv_vprasanje_tip_1'].'</p>';
- echo '<p class="new_spr adv" tip="3"><span class="sprites osnovna_vprasanja"></span> '.$lang['srv_vprasanje_tip_1'].' - '.$lang['srv_dropdown'].'</p>';
- echo '<p class="new_spr adv" tip="2"><span class="sprites checkbox3"></span> '.$lang['srv_vprasanje_tip_2'].'</p>';
- echo '<div class="clr"></div>';
- echo '<p class="naslov">'.$lang['srv_vprasanje_tables'].'</p>';
- echo '<div class="clr"></div>';
+ // Segment kategorije
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_sklop_osnovna2'].'</p>';
- echo '<p class="new_spr podtip adv" tip="6" podtip="0"><span class="sprites table"></span> '.$lang['srv_classic'].'</p>';
- echo '<p class="new_spr podtip adv" tip="6" podtip="1"><span class="sprites table"></span> '.$lang['srv_diferencial2'].'</p>';
- echo '<p class="new_spr podtip adv" tip="6" podtip="2"><span class="sprites table"></span> '.$lang['srv_table_dropdown'].'</p>';
- echo '<p class="new_spr podtip adv" tip="6" podtip="3"><span class="sprites table"></span> '.$lang['srv_double_grid'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="1">'.$lang['srv_vprasanje_tip_1'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="3">'.$lang['srv_vprasanje_tip_1'].' - '.$lang['srv_dropdown'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="2">'.$lang['srv_vprasanje_tip_2'].'</p>';
- echo '<div class="clr"></div>';
- echo '<p class="naslov">'.$lang['srv_sklop_posebna'].'</p>';
- echo '<div class="clr"></div>';
+ echo '</div>';
- echo '<p class="new_spr adv" tip="5"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_5'].'</p>';
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_location') ? 'user_access_locked' : '').'" tip="26"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_26'].'</p>';
-
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_heatmap') ? 'user_access_locked' : '').'" tip="27"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_heatmap'].'</p>';
-
- echo '<p class="new_spr adv" tip="8"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_8'].'</p>';
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_ranking') ? 'user_access_locked' : '').'" tip="17"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_17'].'</p>';
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_sum') ? 'user_access_locked' : '').'" tip="18"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_18'].'</p>';
+ // Segment vnos
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_sklop_osnovna_vnos2'].'</p>';
- echo '</div>';
- echo '<div class="holder">';
+ echo '<p class="new_spr adv segment_option" tip="7">'.$lang['srv_vprasanje_tip_7'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="21">'.$lang['srv_vprasanje_tip_21'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="7" podtip="2">'.$lang['srv_number_insert_1'].'</p>';
- echo '<p class="naslov">'.$lang['srv_sklop_osnovna_vnos2'].'</p>';
- echo '<div class="clr"></div>';
+ echo '</div>';
- echo '<p class="new_spr adv" tip="7"><span class="sprites number"></span> '.$lang['srv_vprasanje_tip_7'].'</p>';
- echo '<p class="new_spr adv" tip="21"><span class="sprites text"></span> '.$lang['srv_vprasanje_tip_21'].'</p>';
- echo '<p class="new_spr podtip adv" tip="7" podtip="2"><span class="sprites number"></span> '.$lang['srv_number_insert_1'].'</p>';
- echo '<div class="clr"></div>';
- echo '<p class="naslov">'.$lang['srv_sklop_tabele_ostale'].'</p>';
- echo '<div class="clr"></div>';
+ // Segment tabele
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_vprasanje_tables'].'</p>';
- echo '<p class="new_spr adv" tip="16"><span class="sprites table"></span> '.$lang['srv_vprasanje_tip_16'].'</p>';
- echo '<p class="new_spr adv" tip="20"><span class="sprites table"></span> '.$lang['srv_vprasanje_tip_20'].'</p>';
- echo '<p class="new_spr adv" tip="19"><span class="sprites table"></span> '.$lang['srv_vprasanje_tip_19'].'</p>';
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_multitable') ? 'user_access_locked' : '').'" tip="24"><span class="sprites table"></span> '.$lang['srv_survey_table_multiple'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="6" podtip="0">'.$lang['srv_classic'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="6" podtip="1">'.$lang['srv_diferencial2'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="6" podtip="2">'.$lang['srv_table_dropdown'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="6" podtip="3">'.$lang['srv_double_grid'].'</p>';
- echo '<div class="clr"></div>';
- echo '<p class="naslov">'.$lang['srv_standardni_vnosi'].'</p>';
- echo '<div class="clr"></div>';
+ echo '</div>';
- echo '<p class="new_spr podtip adv" tip="21" podtip="2"><span class="faicon preview icon-blue"></span> '.$lang['email'].'</p>';
- echo '<p class="new_spr podtip adv" tip="21" podtip="3"><span class="faicon preview icon-blue"></span> '.$lang['url'].'</p>';
- echo '<p class="new_spr podtip adv" tip="21" podtip="4"><span class="faicon preview icon-blue"></span> '.$lang['srv_tip_standard_993'].'</p>';
- echo '<p class="new_spr podtip adv" tip="21" podtip="7"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_long_21_7'].'</p>';
- echo '<p class="new_spr podtip adv" tip="21" podtip="1"><span class="faicon preview icon-blue"></span> '.$lang['srv_captcha_edit'].'</p>';
- echo '<p class="new_spr podtip adv" tip="1" podtip="10"><span class="faicon preview icon-blue"></span> '.$lang['srv_gdpr'].'</p>';
- echo '</div>';
+ // Segment ostale tabele
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_sklop_tabele_ostale'].'</p>';
- echo '<div class="holder">';
+ echo '<p class="new_spr adv segment_option" tip="16">'.$lang['srv_vprasanje_tip_16'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="20">'.$lang['srv_vprasanje_tip_20'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="19">'.$lang['srv_vprasanje_tip_19'].'</p>';
+
+ if(!$userAccess->checkUserAccess($what='question_type_multitable')){
+ echo '<div class="user_access_locked locked">';
+ }
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_multitable') ? 'user_access_locked' : '').'" tip="24">'.$lang['srv_survey_table_multiple'].'</p>';
+ if(!$userAccess->checkUserAccess($what='question_type_multitable')){
+ echo '</div>';
+ }
- if (($lang['id'] == '1' || $lang['id'] == '2') && ($site_url == 'https://www.1ka.si/' || strpos($site_url, 'localhost') !== false ) ) {
+ echo '</div>';
- echo '<p class="naslov">'.$lang['srv_demografija'].'</p>';
- echo '<div class="clr"></div>';
- if ($lang['id'] == '1') {
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XSPOL').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_spol'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XSTAR2a4').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_starost'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XZST1surs4').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_zakonski_stan'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XDS2a4').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_status'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XIZ1a2').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_izobrazba'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XLOKACREGk').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_lokacija'].'</p>';
- }
+ // Segment posebna vprasanja
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_sklop_posebna'].'</p>';
- if ($lang['id'] == '2') {
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XSEX').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_spol'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XAGE').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_starost'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XMRSTS').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_zakonski_stan'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XSTS').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_status'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XEDU').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_izobrazba'].'</p>';
- echo '<p class="new_spr podtip adv" tip="23" podtip="'.Demografija::getInstance()->getSpremenljivkaID('XLOC').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_demografija_lokacija'].'</p>';
- }
+ echo '<p class="new_spr adv segment_option" tip="5">'.$lang['srv_vprasanje_tip_5'].'</p>';
+ if(!$userAccess->checkUserAccess($what='question_type_location')){
+ echo '<div class="user_access_locked locked">';
+ }
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_location') ? 'user_access_locked' : '').'" tip="26">'.$lang['srv_vprasanje_tip_26'].'</p>';
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_heatmap') ? 'user_access_locked' : '').'" tip="27">'.$lang['srv_vprasanje_heatmap'].'</p>';
+ if(!$userAccess->checkUserAccess($what='question_type_multitable')){
+ echo '</div>';
+ }
+ echo '<p class="new_spr adv segment_option" tip="8">'.$lang['srv_vprasanje_tip_8'].'</p>';
+
+ if(!$userAccess->checkUserAccess($what='question_type_ranking')){
+ echo '<div class="user_access_locked locked">';
}
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_ranking') ? 'user_access_locked' : '').'" tip="17">'.$lang['srv_vprasanje_tip_17'].'</p>';
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_sum') ? 'user_access_locked' : '').'" tip="18">'.$lang['srv_vprasanje_tip_18'].'</p>';
+ if(!$userAccess->checkUserAccess($what='question_type_multitable')){
+ echo '</div>';
+ }
+
+ echo '</div>';
- echo '<p class="new_spr_spacer"></p>';
- echo '<p class="new_spr_spacer" style="height: 22px;"></p>';
- echo '<div class="clr"></div>';
- echo '<p class="naslov">'.$lang['srv_advanced_features'].'</p>';
- echo '<div class="clr"></div>';
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_standardni_vnosi'].'</p>';
+
+ echo '<p class="new_spr podtip adv segment_option" tip="21" podtip="2">'.$lang['email'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="21" podtip="3">'.$lang['url'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="21" podtip="4">'.$lang['srv_tip_standard_993'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="21" podtip="7">'.$lang['srv_vprasanje_tip_long_21_7'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="21" podtip="1">'.$lang['srv_captcha_edit'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="1" podtip="10">'.$lang['srv_gdpr'].'</p>';
+
+ echo '</div>';
+
+
+ echo '<div class="toolbox_expand_segment">';
+ echo '<p class="segment_title">'.$lang['srv_advanced_features'].'</p>';
+
+ if(!$userAccess->checkUserAccess($what='question_type_calculation')){
+ echo '<div class="user_access_locked locked">';
+ }
// Kalkulacija
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_calculation') ? 'user_access_locked' : '').'" tip="22"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_22'].'</p>';
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_calculation') ? 'user_access_locked' : '').'" tip="22">'.$lang['srv_vprasanje_tip_22'].'</p>';
// Kvota
- echo '<p class="new_spr adv '.(!$userAccess->checkUserAccess($what='question_type_quota') ? 'user_access_locked' : '').'" tip="25"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_25'].'</p>';
+ echo '<p class="new_spr adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_quota') ? 'user_access_locked' : '').'" tip="25">'.$lang['srv_vprasanje_tip_25'].'</p>';
// Loop
- echo '<p class="new_loop '.(!$userAccess->checkUserAccess($what='loop') ? 'user_access_locked' : '').'" tip="9997"><span class="faicon preview icon-blue"></span> '.$lang['srv_zanka'].'</p>';
+ echo '<p class="new_loop segment_option '.(!$userAccess->checkUserAccess($what='loop') ? 'user_access_locked' : '').'" tip="9997">'.$lang['srv_zanka'].'</p>';
// Signature
- echo '<p class="new_spr podtip adv '.(!$userAccess->checkUserAccess($what='question_type_signature') ? 'user_access_locked' : '').'" tip="21" podtip="6"><span class="faicon preview icon-blue"></span> '.$lang['srv_signature_edit'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option '.(!$userAccess->checkUserAccess($what='question_type_signature') ? 'user_access_locked' : '').'" tip="21" podtip="6">'.$lang['srv_signature_edit'].'</p>';
+
+
// Chat (nagovor z gumbom za vklop chata) - ce je vklopljen modul chat
if (SurveyInfo::getInstance()->checkSurveyModule('chat')){
- echo '<p class="new_spr podtip adv" tip="5" podtip="2"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_5_2'].'</p>';
+ echo '<p class="new_spr podtip adv segment_option" tip="5" podtip="2">'.$lang['srv_vprasanje_tip_5_2'].'</p>';
}
// Socialna omrezja
if (SurveyInfo::getInstance()->checkSurveyModule('social_network')){
- echo '<p class="new_spr adv" tip="9"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_9'].'</p>';
+ echo '<p class="new_spr adv segment_option" tip="9">'.$lang['srv_vprasanje_tip_9'].'</p>';
}
elseif(!$userAccess->checkUserAccess($what='question_type_signature')){
- echo '<p class="new_sn adv" tip="9" style="float:left; width:150px; margin:1px 0 1px 1px; padding:4px 7px;"><a href="index.php?anketa='.$this->anketa.'&a=social_network" class="user_access_locked"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_9'].'</A></p>';
+ echo '<p class="new_sn adv segment_option" tip="9" style="float:left; width:150px; margin:1px 0 1px 1px; padding:4px 7px;"><a href="index.php?anketa='.$this->anketa.'&a=social_network" class="user_access_locked">'.$lang['srv_vprasanje_tip_9'].'</A></p>';
}
else{
- echo '<p style="float:left; width:150px; margin:1px 0 1px 1px; padding:4px 7px;"><a href="index.php?anketa='.$this->anketa.'&a=social_network" '.(!$userAccess->checkUserAccess($what='question_type_signature') ? 'class="user_access_locked"' : '').'"><span class="faicon preview icon-blue"></span> '.$lang['srv_vprasanje_tip_9'].'</A></p>';
+ echo '<p class="segment_option"><a href="index.php?anketa='.$this->anketa.'&a=social_network" '.(!$userAccess->checkUserAccess($what='question_type_signature') ? 'class="user_access_locked"' : '').'">'.$lang['srv_vprasanje_tip_9'].'</a></p>';
}
+ if(!$userAccess->checkUserAccess($what='question_type_calculation')){
+ echo '</div>';
+ }
+
echo '</div>';
- //echo '<a style="position:absolute; right:10px; bottom:10px" href="#" onclick=" $(\'#toolbox_add_advanced\').addClass(\'dragging\'); setTimeout(function() { $(\'#toolbox_add_advanced\').removeClass(\'dragging\'); }, 500); return false;">'.$lang['srv_zapri'].'</a>';
+ echo '</div>';
+
+
+ if($popup){
+ echo '<div class="button_holder">';
+ echo ' <button class="small blue" onClick="$(\'#fullscreen\').hide().html(\'\'); $(\'#fade\').fadeOut(\'slow\');">'.$lang['srv_zapri'].'</button>';
+ echo '</div>';
+
+ // Klik izven okna - zapremo okno
+ echo '<script>
+ $(document).mouseup(function(e){
+ var container = $("#toolbox_add_advanced_popup, .toolbox_expand_title, .toolbox_expand_segments_holder, .button_holder");
+
+ if (!container.is(e.target) && container.has(e.target).length === 0 && $("#toolbox_add_advanced_popup").length){
+ $(\'#fullscreen\').hide().html(\'\'); $(\'#fade\').fadeOut(\'slow\');
+ }
+ });
+ </script>';
+ }
+
echo '</div>';
}
- /**
- * prikaze popup z vsemi tipi vprasanj
- *
- */
- function toolbox_add_advanced_settings() {
- global $lang;
- global $admin_type;
- global $site_url;
- global $global_user_id;
+ /**
+ * preview
+ *
+ */
+ private function getTipPreviewHtml(){
+ global $lang;
+ global $global_user_id;
- echo '<div id="toolbox_advanced_settings_holder">';
- echo '<span class="advanced_settings_title">'.$lang['srv_advanced_settings_title'].'</span>';
+ // Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
+ if (!$this->anketa > 0)
+ return;
- $row = SurveyInfo::getInstance()->getSurveyRow();
+ if ( ($_GET['a'] != '' || !isset($_GET['anketa'])) && $_GET['a'] != 'branching' )
+ return;
- # preverimo ali imamo ife. Če so, izpisujemo vse ikonce
- $sql_select = "SELECT count(*) AS if_count FROM srv_branching WHERE element_if > 0 AND ank_id = '".$this->anketa."'";
- $sql_query = sisplet_query($sql_select);
- $row_query = mysqli_fetch_array($sql_query);
- $has_if = (int)$row_query['if_count'] > 0 ? true : false;
- # ali prikazujemo vse ikonice ali samo "simpl" ikonice
- $sql_select_fv = "SELECT count(*) AS full_view FROM srv_user_setting_for_survey WHERE sid='".$this->anketa."' AND uid='".$global_user_id."' AND what='display_full_toolbox' AND value='1'";
- $sql_query_fv = sisplet_query($sql_select_fv);
- $row_query_fv = mysqli_fetch_array($sql_query_fv);
- $full_view = (int)$row_query_fv['full_view'] == 1 ? true : false;
- $full_view = true;
+ echo '<div id="tip_preview" class="toolbox_preview">';
- // Razsiri / skrci
- if($this->survey_type > 1){
- if($this->expanded) {
- echo '<p>';
- echo '<a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=expanded&value=0" title="'.$lang['srv_expanded_0'].'">';
- echo '<span class="advanced_setting"><span class="faicon compress"></span></span>';
- echo $lang['srv_expand_0'];
- echo '</a>';
- echo '</p>';
- }
- else {
- echo '<p>';
- echo '<a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=expanded&value=1" title="'.$lang['srv_expanded_1'].'">';
- echo '<span class="advanced_setting"><span class="faicon expand"></span></span>';
- echo $lang['srv_expand_1'];
- echo '</a>';
- echo '</p>';
- }
- }
- if ($has_if == true/* && $full_view == true || ($has_if == true && $this->expanded == false)*/) {
- echo '<p>';
- echo '<a href="#" onClick="expandCollapseAllPlusMinus(\'expand\'); return false;"><span class="advanced_setting"><span class="faicon plus_square" title="'.$lang['srv_expand'].'"></span></span>'.$lang['srv_expand'].'</a>'."\n";
- echo '<a href="#" onClick="expandCollapseAllPlusMinus(\'collapse\'); return false;"><span class="advanced_setting" style="margin-left: 15px;"><span class="faicon minus_square" title="'.$lang['srv_collapse'].'"></span></span>'.$lang['srv_collapse'].'</a>'."\n";
- echo '</p>';
- }
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+ $userAccess = UserAccess::getInstance($global_user_id);
- # find & replace
- if ($row['locked'] == 0) {
- echo '<p>';
- echo '<a href="#" onclick="find_replace(); return false;" title="'.$lang['srv_find_replace_words'].'" ><span class="advanced_setting"><span class="faicon replace"></span></span>'.$lang['srv_find_replace_words'].'</a>';
- echo '</p>';
- }
+ // tip 9999 - IF
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9999" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_toolbox_if'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='if')){
+ $userAccess->displayNoAccessText($what='if');
+ }
+ echo '</div>';
- if ($row['locked'] == 0 && $full_view == true) {
- echo '<p>';
- echo '<a href="#" onclick="javascript:pagebreak_all(); return false;" title="'.$lang['srv_pagebreak_all'].'"><span class="advanced_setting"><span class="faicon paragraph"></span></span>'.$lang['srv_pagebreak_all'].'</a> '."\n";
- echo '</p>';
- }
+ // tip 9998 - Block
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9998" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_toolbox_block'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='block')){
+ $userAccess->displayNoAccessText($what='block');
+ }
+ echo '</div>';
- # Hrošč je viden samo če imamo ife in razširjen pogled
- if ($row['locked'] == 0 && $full_view == true) { // if ($row['flat'] == 0)
- echo '<p>';
- echo '<a href="#" onclick="javascript:check_pogoji(); return false;" title="'.$lang['srv_check_pogoji'].'"><span class="advanced_setting"><span class="faicon bug"></span></span>'.$lang['srv_check_pogoji'].'</a> '."\n";
- echo '</p>';
- }
+ // tip 9997 - Loop
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9997" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_toolbox_loop'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='loop')){
+ $userAccess->displayNoAccessText($what='loop');
+ }
+ echo '</div>';
- if ($row['locked'] == 0 && $full_view == true) {
- echo '<p>';
- echo '<a href="#" onclick="prestevilci(); return false;"><span class="advanced_setting"><span class="faicon hashtag" title="'.$lang['srv_grupe_recount_branching'].'"></span></span>'.$lang['srv_grupe_recount_branching'].'</a>' . Help :: display('srv_grupe_recount_branching') ."\n";
- echo '</p>';
- }
- // Knjiznica na desni
- if ($row['locked'] == 0) {
- if($row['toolbox'] >= 3){
- echo '<p>';
- echo '<a href="#" onclick="change_mode(\'toolboxback\', \'1\'); return false;" title="'.$lang['srv_library_hide'].'" ><span class="advanced_setting"><span class="faicon library smaller"></span></span>'.$lang['srv_library_hide'].'</a>';
- echo '</p>';
- }
- else{
- echo '<p>';
- echo '<a href="#" onclick="change_mode(\'toolbox\', \'3\'); return false;" title="'.$lang['srv_library_show'].'" ><span class="advanced_setting"><span class="faicon library smaller"></span></span>'.$lang['srv_library_show'].'</a>';
- echo '</p>';
- }
- }
+ // tip 1_1 - radio
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="radio" checked />' . $lang['srv_tip_sample_t1_o1'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_tip_sample_t1_o2'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_tip_sample_t1_o3'] . '</div>';
+ echo '</div>';
+ echo '</div>';
- echo '</div>';
+ // tip 1_10 - gdpr
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_10" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_gdpr_intro_title'] . '</div><br />';
+ echo '<div class="tip_sample_text">' . $lang['srv_gdpr_intro'] . '.<br />'.$lang['srv_gdpr_intro4'].'</div>';
+ echo '<div class="tip_sample_option"><input type="radio" checked />' . $lang['srv_gdpr_intro_no'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_gdpr_intro_yes'] . '</div>';
+ echo '</div>';
+ echo '</div>';
- // prikaz blokov kot zavihke
- /*echo '<div class="blockSwitch">';
- $sql = sisplet_query("SELECT i.* FROM srv_if i, srv_branching b WHERE i.tab='1' AND i.tip='1' AND i.id=b.element_if AND b.ank_id='$this->anketa' ORDER BY b.parent, b.vrstni_red");
- if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
- $i = 0;
- while ($row = mysqli_fetch_array($sql)) {
- if ($i++ != 0) echo ' | ';
- $label = ($row['label'] == ''?$lang['srv_blok'].' ('.$row['number'].')':$row['label']);
- echo '<p>';
- echo '<a href="index.php?anketa='.$this->anketa.'&parent_if='.$row['id'].'">'.$label.'</a> ';
- echo '</p>';
- }
- echo '</div>';*/
- }
+ // tip 1 - radio (horizontalno)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '&nbsp;<span style="font-weight: normal;"><input type="radio" checked />' . $lang['srv_tip_sample_t1_o1'] . '&nbsp;<input type="radio" />' . $lang['srv_tip_sample_t1_o2'] . '</span></div>';
+ echo '</div>';
+ echo '</div>';
- /**
- * prikaz knjiznice v toolboxu na levi strani
- *
- */
- function toolbox_library () {
- global $lang;
+ // tip 1_2 - radio (horizontalno - nova vrstica)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_tip_sample_t1_o1'] . '&nbsp;<input type="radio" checked />' . $lang['srv_tip_sample_t1_o2'] . '&nbsp;<input type="radio" />' . $lang['srv_tip_sample_t1_o3'] . '</div>';
+ echo '</div>';
+ echo '</div>';
- $row = SurveyInfo::getInstance()->getSurveyRow();
+ // tip 1_5 - radio potrditev
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_5" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1_5'] . '</div>';
+ echo '<div class="tip_sample_option gray"><input type="button" disabled value="' . $lang['srv_potrdi'] . '"></div>';
+ echo '</div>';
+ echo '</div>';
- //glede na to kje smo se nahajali se vrnemo (na osnovne oz napredne moznosti)
- //$row['toolbox'] == 3 ? $preklop = 1 : $preklop = 2;
+ // tip 1_6 - select box
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_6" class="tip_preview_sub">';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t3'] . '</div>';
+ echo '<div class="tip_sample_option"><select size="3"><option>' . $lang['srv_tip_sample_t3_oc'] . '</option><option>' . $lang['srv_tip_sample_t3_oc'] . '</option><option>' . $lang['srv_tip_sample_t3_oc'] . '</option></select></div>';
+ echo '</div>';
+ echo '</div>';
- echo '<div id="toolbox_library" class="library">';
+ // tip 1_8 - Drag-drop
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_8" class="tip_preview_sub">';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
- //echo '<p style="position:absolute; top:-30px"><a href="#" onclick="change_mode(\'toolboxback\', \''.$preklop.'\'); return false;">'.$lang['srv_nazajnavprasanja'].'</a></p>';
+ echo '<div style="float: left; width: 150px; height: 110px; border-right: 1px black solid;">';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o1'] . '</div></div>';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o2'] . '</div></div>';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o3'] . '</div></div>';
+ echo '</div>';
+ echo '<div style="float: left; width: 150px; height: 110px; margin-left: 30px;">';
+ echo '<div class="tip_sample_option"><div class="dragdrop_preview_frame"></div></div>';
+ echo '</div>';
+ echo '<div class="clr"></div>';
- //zgornja navigacija toolboxa
- /*echo '<table id="toolbox_menu" cellspacing="0" cellpadding="0"><tr>';
- echo '<td class="noactive" style="border-right: 1px #888888 solid; border-bottom: 1px #888888 solid;"><a href="#" onclick="change_mode(\'toolboxback\', \''.$preklop.'\'); return false;">'.$lang['srv_novaspremenljivka'].'</a></td>';
- //echo '<td class="noactive"><a href="#" onclick="change_mode(\'toolbox\', \'2\'); return false;">'.$lang['srv_advanced'].'</a></td>';
- echo '<td class="handle">'.$lang['srv_library'].'</td>';
- echo '</tr></table>';*/
+ echo '</div>';
+ echo '</div>';
- if ($row['locked'] == 1) {
+ // tip 1_9 - custom radio picture
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_9" class="tip_preview_sub">';
+ echo '<div class="tip_sample">';
- //echo '<p><img src="img_0/lock.png" /> '.$lang['srv_anketa_locked_1'].'</p>';
- echo '<p>';
- echo '<span class="sprites lock_close"></span> '.$lang['srv_anketa_locked_1'];
- echo '</p>';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
+ // star
+ echo '<div style="clear: both;padding-bottom:10px;">';
+ for ($i = 1; $i < 4; $i++) {
+ echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio star"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
+ }
+ echo '</div>';
- } else {
+ // thumb
+ echo '<div style="clear: both;padding-bottom:10px;">';
+ for ($i = 1; $i < 4; $i++) {
+ echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio thumb"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
+ }
+ echo '</div>';
- echo '<div id="library_holder">';
- $l = new Library();
- $l->display();
- echo '</div>';
- }
+ //smiley
+ echo '<div style="clear: both;padding-bottom:10px;">';
+ for ($i = 1; $i < 4; $i++) {
+ echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio smiley"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
+ }
+ echo '</div>';
- echo '</div>';
- }
+ // heart
+ echo '<div style="clear: both;padding-bottom:10px;">';
+ for ($i = 1; $i < 4; $i++) {
+ echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio heart"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
+ }
+ echo '</div>';
+
+ // flag
+ echo '<div style="clear: both;padding-bottom:10px;">';
+ for ($i = 1; $i < 4; $i++) {
+ echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio flag"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
+ }
+ echo '</div>';
+
+ // user
+ echo '<div style="clear: both;">';
+ for ($i = 1; $i < 4; $i++) {
+ echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio user"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
+ }
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 1_10 - Image HotSpot
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_10" class="tip_preview_sub">';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_hotspot_preview_text_radio'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/hotspot.png" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 1_11 - Vizualna anlaogna skala
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_1_11" class="tip_preview_sub">';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
+
+ echo '<div style="clear: both;padding-bottom:10px;">';
+ for ($i = 1; $i < 7; $i++) {
+ echo '<div class="variabla custom_radio visual-radio-scale" style="padding: 0 5px;">
+ <label>
+ <input type="radio">
+ <span class="enka-vizualna-skala siv-7'.$i.'"></span>
+ <div class="custom_radio_answer">('.$i.')</div>
+ </label>
+ </div>';
+ }
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+
+ // tip 2 - checkbox
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t2'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o1'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="checkbox" />' . $lang['srv_tip_sample_t2_o2'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o3'] . '</div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 2_1 - check(horizontalno)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_2_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t2'] . '&nbsp;<span style="font-weight: normal;"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o2'] . '&nbsp;<input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o3'] . '</span></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 2_2 - check (horizontalno - nova vrstica)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_2_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t2'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o1'] . '&nbsp;<input type="checkbox" />' . $lang['srv_tip_sample_t2_o2'] . '&nbsp;<input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o3'] . '</div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 2_8 - Drag-drop
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_2_8" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
+
+ echo '<div style="float: left; width: 150px; height: 110px; border-right: 1px black solid;">';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o1'] . '</div></div>';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o2'] . '</div></div>';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o3'] . '</div></div>';
+ echo '</div>';
+
+ echo '<div style="float: left; width: 150px; height: 110px; margin-left: 30px;">';
+ echo '<div class="tip_sample_option"><div class="dragdrop_preview_frame"></div></div>';
+ echo '</div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 2_10 - Image HotSpot
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_2_10" class="tip_preview_sub">';
+ // echo '<div>Primer tipa vprašanj: label.</div>';
+ //echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_hotspot_preview_text_checkbox'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/hotspot.png" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 3 - select
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_3" class="tip_preview_sub">';
+ // echo '<div>Primer tipa vprašanj: select.</div>';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t3'] . '</div>';
+ echo '<div class="tip_sample_option"><select><option>' . $lang['srv_tip_sample_t3_oc'] . '</option></select></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21 - besedilo*
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21'] . '</div>';
+ echo '<div class="tip_sample_option"><textarea style="width:150px; height:25px; padding:0 4px;">abc</textarea></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21_1 - cpatcha
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_1_o1'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/captcha.jpg" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" value="VZHVP" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21_2 - email
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">'.$lang['srv_tip_sample_t21_2_o1'].' ('.$lang['srv_email_example'].')</div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option bottom">' . $lang['srv_email_example_txt'] . '</div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21_3 - url
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_3" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_3_o1'] . '</div>';
+ echo '<div class="tip_sample_option">(' . $lang['srv_url_example'] . ')</div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21_4 - upload
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_4" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_4_o1'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="file" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21_5 - textbox box
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_5" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21'] . '</div>';
+ echo '<div class="tip_sample_option"><textarea style="width:250px; height:36px">abc</textarea></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 21_6 - elektronski podpis
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_6" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo ' <div class="tip_sample_text">' . $lang['srv_tip_sample_t21_6'] . '</div>';
+ echo ' <div class="tip_sample_option">';
+ echo ' <div class="textarea"></div>';
+ echo ' <div class="button">'.$lang['srv_signature_clear'].'</div>';
+ echo ' </div>';
+ echo ' <span>'.$lang['srv_signature_name'].'</span>';
+ echo ' <input type="text" />';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_signature')){
+ $userAccess->displayNoAccessText($what='question_type_signature');
+ }
+ echo '</div>';
+
+ // tip 21_7 - fotografija
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_21_7" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_7'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/webcam_record.png" height="64"/></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 5 - label
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_5" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t5'] . '</div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 5_2 - nagovor za aktivacijo chata
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_5_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_chat_question_text'] . '</div>';
+ echo '<div class="tip_sample_option"><div class="tawk-chat-activation button" style="padding:6px 0px;">'.$lang['srv_chat_turn_on'].'</div></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 26 - lokacija
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_26" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t26_1'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/mojalokacija.png" /></div>';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_location')){
+ $userAccess->displayNoAccessText($what='question_type_location');
+ }
+ echo '</div>';
+
+ // tip 26_2 - multi lokacija
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_26_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t26_2'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/lokacija.png" /></div>';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_location')){
+ $userAccess->displayNoAccessText($what='question_type_location');
+ }
+ echo '</div>';
+
+ // tip 26_1 - moja lokacija
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_26_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t26_1'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/mojalokacija.png" /></div>';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_location')){
+ $userAccess->displayNoAccessText($what='question_type_location');
+ }
+ echo '</div>';
+
+ // tip 6 - multigrid
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
+ echo '<div class="tip_sample_option"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t6_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_o2'] . '</span> <span>' . $lang['srv_tip_sample_t6_o3'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v1'] . '</div><span><input type="radio" name="a" /></span><span><input type="radio" checked name="a" /></span><span><input type="radio" name="a" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v2'] . '</div><span><input type="radio" name="b" /></span><span><input type="radio" /></span><span><input type="radio" name="b" checked /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v3'] . '</div><span><input type="radio" name="c" /></span><span><input type="radio" /></span><span><input type="radio" name="c" checked /></span></div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_1 - multigrid (semanticni diferencial)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t61'] . ':</div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span>1</span><span>2</span><span>3</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t61_v1x'] . '</div><span><input type="radio" name="d" /></span><span><input type="radio" name="d" /></span><span><input type="radio"name="d" /></span>' . $lang['srv_tip_sample_t61_v1y'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t61_v2x'] . '</div><span><input type="radio" name="e" /></span><span><input type="radio" name="e" /></span><span><input type="radio" name="e" /></span>' . $lang['srv_tip_sample_t61_v2y'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t61_v3x'] . '</div><span><input type="radio" name="f" /></span><span><input type="radio" name="f" checked /></span><span><input type="radio" /></span>' . $lang['srv_tip_sample_t61_v3y'] . '</div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_2 - multigrid (dropdown)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v1'] . '</div><span><select><option>' . $lang['srv_tip_sample_t6_o1'] . '</option></select></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v2'] . '</div><span><select><option>' . $lang['srv_tip_sample_t6_o1'] . '</option></select></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v3'] . '</div><span><select><option>' . $lang['srv_tip_sample_t6_o1'] . '</option></select></span></div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_3 - multigrid (double grid)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_3" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span></span><span>' . $lang['srv_tip_sample_t6_v1'] . '</span><span style="border-right: 1px #e5e5e5 solid;"></span><span></span><span>' . $lang['srv_tip_sample_t6_v3'] . '</span><span></span></div>';
+ echo '<div style="clear:left"></div>';
+
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t6_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_o2'] . '</span><span style="border-right: 1px #e5e5e5 solid;">' . $lang['srv_tip_sample_t6_o3'] . '</span><span>&nbsp;' . $lang['srv_tip_sample_t6_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_o2'] . '</span><span>' . $lang['srv_tip_sample_t6_o3'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>www.xxx.si</div><span><input type="radio" /></span><span><input type="radio" /></span><span style="border-right: 1px #e5e5e5 solid;"><input type="radio" name="g" checked /></span><span><input type="radio" name="l" checked /></span><span><input type="radio" /></span><span><input type="radio" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>www.yyy.si</div><span><input type="radio" /></span><span><input type="radio" name="j" checked /></span><span style="border-right: 1px #e5e5e5 solid;"><input type="radio" /></span><span><input type="radio" /></span><span><input type="radio" name="h" checked /></span><span><input type="radio" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>www.zzz.si</div><span><input type="radio" /></span><span><input type="radio" name="i" checked /></span><span style="border-right: 1px #e5e5e5 solid;"><input type="radio" /></span><span><input type="radio" /></span><span><input type="radio" /></span><span><input type="radio" name="k" checked /></span></div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+
+ // tip 6_4 - multigrid (one against another)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_4" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6_4'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t6_4_v1'] . '</div><span><input type="radio" name="l" checked/></span><span>' . $lang['srv_tip_sample_t6_4_vmes'] . '</span><span><input type="radio"name="l" /></span>' . $lang['srv_tip_sample_t6_4_v2'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t6_4_v1'] . '</div><span><input type="radio" name="m" /></span><span>' . $lang['srv_tip_sample_t6_4_vmes'] . '</span><span><input type="radio" name="m" checked/></span>' . $lang['srv_tip_sample_t6_4_v3'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t6_4_v3'] . '</div><span><input type="radio" name="n" checked/></span><span>' . $lang['srv_tip_sample_t6_4_vmes'] . '</span><span><input type="radio" name="n" /></span>' . $lang['srv_tip_sample_t6_4_v2'] . '</div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_5 - multigrid (max diff)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_5" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6_5'] . '</div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t6_5_c1'] . '</span><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t6_5_c2'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span><input type="radio" name="o" checked/></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v1'] . '</div><span><input type="radio" name="p" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span><input type="radio" name="o" /></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v2'] . '</div><span><input type="radio" name="p" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span><input type="radio" name="o" /></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v3'] . '</div><span><input type="radio" name="p" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option2"><div>&nbsp;</div><span><input type="radio" name="o" /></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v4'] . '</div><span><input type="radio" name="p" checked/></span></div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_6 - multigrid (select box)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_6" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6_6'] . '</div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v1'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1a'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2a'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3a'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4a'] . '</option></select></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v2'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1b'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2b'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3b'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4b'] . '</option></select></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v3'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1c'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2c'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3c'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4c'] . '</option></select></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v4'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1d'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2d'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3d'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4d'] . '</option></select></span></div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_8 - multigrid (Tabela Da/Ne)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_8" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
+ echo '<div class="tip_sample_option"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t6_8_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_8_o2'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v1'] . '</div><span><input type="radio" checked name="a" /></span><span><input type="radio" name="a" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v2'] . '</div><span><input type="radio" /></span><span><input type="radio" name="b" checked /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v3'] . '</div><span><input type="radio" /></span><span><input type="radio" name="c" checked /></span></div>';
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_9 - Drag-drop
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_9" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+
+ echo '<div class="tip_sample">';
+
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
+
+ echo '<div style="float: left; width: 200px; height: 150px; border-right: 1px black solid;">';
+ echo '<div class="tip_sample_option"></div><br /><br />';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t6_v1'] . '</div></div>';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t6_v2'] . '</div></div>';
+ echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t6_v3'] . '</div></div>';
+ echo '</div>';
+
+ echo '<div style="float: left; width: 200px; height: 180px; margin-left: 20px;">';
+ echo '<div class="tip_sample_option">';
+ echo '<ul style="list-style-type: none;">';
+
+ echo '<li >
+ <div class="dragdrop_preview_frame_grid_title">' . $lang['srv_tip_sample_t6_o1'] . '</div>
+ </li>'; //izpis "naslova" okvirja
+ echo '<li>
+ <div class="dragdrop_preview_frame_grid"></div>
+ </li>' . "\n"; //izpis okvirja
+ echo '<li >
+ <div class="dragdrop_preview_frame_grid_title">' . $lang['srv_tip_sample_t6_o2'] . '</div>
+ </li>'; //izpis "naslova" okvirja
+ echo '<li>
+ <div class="dragdrop_preview_frame_grid"></div>
+ </li>' . "\n"; //izpis okvirja
+ echo '<li >
+ <div class="dragdrop_preview_frame_grid_title">' . $lang['srv_tip_sample_t6_o3'] . '</div>
+ </li>'; //izpis "naslova" okvirja
+ echo '<li>
+ <div class="dragdrop_preview_frame_grid"></div>
+ </li>' . "\n"; //izpis okvirja
+ echo '</ul>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="clr"></div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ // tip 6_10 - Image HotSpot
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_6_10" class="tip_preview_sub">';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_hotspot_preview_text_radio_grid'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_0/hotspot.png" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 16 - multicheckbox
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_16" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t16'] . '</div>';
+ echo '<div class="tip_sample_option"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t16_o1'] . '</span><span>' . $lang['srv_tip_sample_t16_o2'] . '</span> <span>' . $lang['srv_tip_sample_t16_o3'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t16_v1'] . '</div><span><input type="checkbox" checked /></span><span><input type="checkbox" /></span><span><input type="checkbox" checked /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t16_v2'] . '</div><span><input type="checkbox" checked /></span><span><input type="checkbox" /></span><span><input type="checkbox" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t16_v3'] . '</div><span><input type="checkbox" /></span><span><input type="checkbox" checked /></span><span><input type="checkbox" checked /></span></div>';
+ echo '<div class="clr"></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 19 - multitext
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_19" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t19'] . '</div>';
+ echo '<div class="tip_sample_option"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t19_o1'] . '</span><span>' . $lang['srv_tip_sample_t19_o2'] . '</span><span>' . $lang['srv_tip_sample_t19_o3'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t19_v1'] . '</div><span><input type="text" value="abc" /></span><span><input type="text" value="abc" /></span><span><input type="text" value="abc" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t19_v2'] . '</div><span><input type="text" value="abc" /></span><span><input type="text" value="abc" /></span><span><input type="text" value="abc" /></span></div>';
+ echo '<div class="clr"></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 20 - multinumber
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_20" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t20'] . '</div>';
+ echo '<div class="tip_sample_option"><div>&nbsp;</div><span>' . $lang['srv_tip_sample_t20_o1'] . '</span><span>' . $lang['srv_tip_sample_t20_o2'] . '</span><span>' . $lang['srv_tip_sample_t20_o3'] . '</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t20_v1'] . '</div><span><input type="text" value="4" /></span><span><input type="text" value="0" /></span><span><input type="text" value="2" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t20_v2'] . '</div><span><input type="text" value="8" /></span><span><input type="text" value="22" /></span><span><input type="text" value="7" /></span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t20_v3'] . '</div><span><input type="text" value="6" /></span><span><input type="text" value="12" /></span><span><input type="text" value="6" /></span></div>';
+ echo '<div class="clr"></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 7 - number
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_7" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t7'] . '</div>';
+ echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t7_o1'] . '<input type="text" value="123" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 7_2 - slider
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_7_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t7_2'] . '</div>';
+ echo '<div class="tip_sample_option"><img src="img_new/slider.png" height="40"/></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 8 - datum
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_8" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t8'] . '</div>';
+ echo '<div class="tip_sample_option"><input type="text" size="20"/><span id="starts_img" class="sprites calendar" style="float:none; margin-bottom:0"></span></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 17 - Razvrščanje prestavljanje (default)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_17" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t17'] . '</div>';
+
+ echo '<div class="ranking_preview_holder">';
+ echo ' <div class="ranking_preview_left">';
+ echo ' <div class="razvrscanje_preview">' . $lang['srv_tip_sample_t17_o1'] . '</div>';
+ echo ' <div class="razvrscanje_preview">' . $lang['srv_tip_sample_t17_o2'] . '</div>';
+ echo ' <div class="razvrscanje_preview">' . $lang['srv_tip_sample_t17_o3'] . '</div>';
+ echo ' </div>';
+
+ echo ' <div class="ranking_preview_right">';
+ echo ' <div class="razvrscanje_preview_frame">1.</div>';
+ echo ' <div class="razvrscanje_preview_frame">2.</div>';
+ echo ' <div class="razvrscanje_preview_frame">3.</div>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_ranking')){
+ $userAccess->displayNoAccessText($what='question_type_ranking');
+ }
+ echo '</div>';
+
+ // tip 171 - Razvrščanje ostevilcevanje (design = 1)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_17_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t171'] . '</div>';
+
+ echo '<div class="tip_sample_option" style="margin-top: 5px;"><input type="text" size="1"/>' . $lang['srv_tip_sample_t171_o1'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option" style="margin-top: 5px;"><input type="text" size="1"/>' . $lang['srv_tip_sample_t171_o2'] . '</div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option" style="margin-top: 5px;"><input type="text" size="1"/>' . $lang['srv_tip_sample_t171_o3'] . '</div>';
+ echo '<div style="clear:left"></div>';
+
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_ranking')){
+ $userAccess->displayNoAccessText($what='question_type_ranking');
+ }
+ echo '</div>';
+
+ // tip 172 - Razvrščanje premikanje (design = 2)
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_17_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t172'] . '</div>';
+ echo '<div class="tip_sample_option"><span>&nbsp;</span><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t172_o1'] . '</div><span>&nbsp;</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><span>&nbsp;</span><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t172_o2'] . '</div><span>&nbsp;</span></div>';
+ echo '<div style="clear:left"></div>';
+ echo '<div class="tip_sample_option"><span>&nbsp;</span><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t172_o3'] . '</div><span>&nbsp;</span></div>';
+ echo '<div class="clr"></div>';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_ranking')){
+ $userAccess->displayNoAccessText($what='question_type_ranking');
+ }
+ echo '</div>';
+
+ // tip 18 - vsota
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_18" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t18'] . '</div>';
+ echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t18_o1'] . '<input type="text" value="9" /></div>';
+ echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t18_o2'] . '<input type="text" value="10" /></div>';
+ echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t18_o3'] . '<input type="text" value="5" /></div>';
+ echo '<div class="tip_sample_option sum">' . $lang['srv_tip_sample_t18_o4'] . '<input type="text" value="24" /></div>';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_sum')){
+ $userAccess->displayNoAccessText($what='question_type_sum');
+ }
+ echo '</div>';
+
+ // tip 24 - Kombinirana tabela
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_24" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_survey_table_multiple'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_multitable')){
+ $userAccess->displayNoAccessText($what='question_type_multitable');
+ }
+ echo '</div>';
+
+ // tip 27 - Heatmap
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_27" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_vprasanje_heatmap'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_heatmap')){
+ $userAccess->displayNoAccessText($what='question_type_heatmap');
+ }
+ echo '</div>';
+
+ // tip 22 - Kalkulacija
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_22" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_vprasanje_tip_long_22'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_calculation')){
+ $userAccess->displayNoAccessText($what='question_type_calculation');
+ }
+ echo '</div>';
+
+ // tip 25 - Kvota
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_25" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo $lang['srv_vprasanje_tip_long_25'];
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='question_type_quota')){
+ $userAccess->displayNoAccessText($what='question_type_quota');
+ }
+ echo '</div>';
+
+ // tip 9 - SN-imena
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div><span class="faicon add"></span>' . $lang['srv_add_field'] . '</div>';
+ echo '</div>';
+ if(!$userAccess->checkUserAccess($what='social_network')){
+ $userAccess->displayNoAccessText($what='social_network');
+ }
+ echo '</div>';
+
+ // tip 9_1 - SN-imena - fiksno st. polj
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9_1" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 9_2 - SN-imena - 1 textbox
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9_2" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
+ echo '<div class="tip_sample_option"><textarea rows="10"></textarea></div>';
+ echo '</div>';
+ echo '</div>';
+
+ // tip 9_3 - SN-imena - vnos stevila polj
+ echo '<div name="tip_preview_sub" id="tip_preview_sub_9_3" class="tip_preview_sub">';
+ echo '<span>' . $lang['srv_new_question'] . '</span>';
+ echo '<div class="tip_sample">';
+ echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
+ echo '<div class="tip_sample_option">' . $lang['srv_design_count'] . ': <input type="text" size="4" style="margin-bottom: 3px;" value="3" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '<div class="tip_sample_option"><input type="text" /></div>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>'; // tip_preview
+ }
/**
* hitre nastavitve - na dnu pri formi
*
*/
- function toolbox_settings ($status1='none', $status2='none') {
+ function toolbox_settings ($status1='none') {
global $lang;
global $admin_type;
- $row = Cache::srv_spremenljivka($row2['spr_id']);
$rowA = SurveyInfo::getInstance()->getSurveyRow();
SurveySetting::getInstance()->Init($this->anketa);
@@ -791,7 +1476,7 @@ class Branching {
$emailDiv = SurveySetting::getInstance()->getSurveyMiscSetting('srvtoolbox_form_email');
- //OBVESCANJE
+ // OBVESCANJE
$sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '$this->anketa'");
if (!$sqlAlert)
echo mysqli_error($GLOBALS['connect_db']);
@@ -799,52 +1484,50 @@ class Branching {
$rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0) ? $checked = true : $checked = false;
- echo '<p style="margin: 6px 0;">';
- $alertDiv == 1 ? $obvescanje = 0 : $obvescanje = 1;
- echo '<a href="#" onClick="change_form_quicksettings(\'form_settings_obvescanje\');">';
+ $alertDiv == 1 ? $obvescanje = 0 : $obvescanje = 1;
+
- $img = ($status1 == 'none') ? ' class="faicon icon-blue plus"' : ' class="faicon icon-blue minus"';
- echo '<span '.$img.' id="obvescanje_switch" style="cursor:pointer;"></span> ';
+ echo '<div class="header" onClick="change_form_quicksettings();">';
+ echo '<span>'.$lang['srv_alert_link_form'].'</span><span id="obvescanje_switch" class="faicon '.($status1 == 'none' ? 'arrow2_d' : 'arrow2_u').'"></span>';
+ echo '</div>';
- echo '<b>' . $lang['srv_alert_link_form'] . '</b></a>';
- echo '</p>';
- //echo '<span class="nastavitveSpan4" style="width: 100%;"><label>' . $lang['srv_alert_prejemnik'] . '</label></span><br />';
$sas = new SurveyAdminSettings();
echo '<div id="form_settings_obvescanje" class="form_bottom_settings" style="display: '.$status1.';">';
// avtor ankete oz osebe z dostopom
- echo '<p class="whole"><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="quick_settings(\'' . $row2['spr_id'] . '\', this, \'finish_author\'); return false;"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_finish_author">';
+ echo '<div class="setting_row">';
+ echo '<input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="quick_settings(this, \'finish_author\'); return false;"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
+ echo ' <span id="label_alert_finish_author">';
$sas->display_alert_label('finish_author',($rowAlert['finish_author'] == 1), true);
- echo '</span></p>';
+ echo ' </span>';
+ echo '</div>';
// posebej navedeni maili
- echo '<p class="whole"><input type="checkbox" name="alert_finish_other" id="alert_finish_other" value="1"' . ($checked ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'finish_other\'); quick_settings(\'' . $row2['spr_id'] . '\', this, \'finish_other\'); return false;"><label for="alert_finish_other">' . $lang['email_prejemniki'] . ($checked ? $lang['email_one_per_line'] : '' ) . '</label></p>';
-
- echo '<p id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="hidden"' : '' ).'>';
- echo '<label for="alert_finish_other_emails">' . $lang['email'] . ':</label>';
- echo '<textarea name="alert_finish_other_emails" id="alert_finish_other_emails" style="height:100px; width:60%; margin-left: 10px;" onBlur="quick_settings(\'' . $row2['spr_id'] . '\', this.value, \'finish_other_emails\');">' . $rowAlert['finish_other_emails'] . '</textarea>';
- echo '</p>';
-
- //respondent iz cms
- /*echo '<p><input type="checkbox" name="alert_finish_respondent_cms" id="alert_finish_respondent_cms" value="1" onChange="quick_settings(\'' . $row2['spr_id'] . '\', this, \'finish_respondent_cms\'); return false;" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_finish_respondent_cms">';
- $sas->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1), true);
- echo '</span></p>';*/
-
- //respondent
- echo '<p class="whole"><input type="checkbox" class="enka-admin-custom" name="alert_finish_respondent" id="alert_finish_respondent" value="1" onChange="quick_settings(\'' . $row2['spr_id'] . '\', this, \'finish_respondent\'); return false;" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . '>';
- echo '<span class="enka-checkbox-radio "></span>';
- echo '<span id="label_alert_finish_respondent">';
+ echo '<div class="setting_row">';
+ echo ' <input type="checkbox" name="alert_finish_other" id="alert_finish_other" value="1"' . ($checked ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'finish_other\'); quick_settings(this, \'finish_other\'); return false;"><label for="alert_finish_other">' . $lang['email_prejemniki'] . ($checked ? $lang['email_one_per_line'] : '' ) . '</label>';
+
+ echo ' <div id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="displayNone"' : '' ).'>';
+ echo ' <label for="alert_finish_other_emails">' . $lang['email'] . ':</label>';
+ echo ' <textarea name="alert_finish_other_emails" id="alert_finish_other_emails" style="height:100px; width:60%; margin-left: 10px;" onBlur="quick_settings(this.value, \'finish_other_emails\');">' . $rowAlert['finish_other_emails'] . '</textarea>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ // respondent
+ echo '<div class="setting_row">';
+ echo ' <input type="checkbox" class="enka-admin-custom" name="alert_finish_respondent" id="alert_finish_respondent" value="1" onChange="quick_settings(this, \'finish_respondent\'); return false;" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . '>';
+ echo ' <span id="label_alert_finish_respondent">';
$sas->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1), true);
- echo '</span></p>';
+ echo ' </span>';
+ echo '</div>';
- echo '<a style=" margin: 5px 0 5px 10px;" href="index.php?anketa=' . $this->anketa . '&a=alert" ><span class="strong">'.$lang['srv_detail_settings'].'</span></a>';
+ echo '<div class="setting_row bottom">';
+ echo ' <a href="index.php?anketa=' . $this->anketa . '&a=alert" class="noline">'.$lang['srv_detail_settings'].'<span class="faicon arrow2_r"></span></a>';
echo '</div>';
- echo '<div id="clr" class="clr" ></div>';
+ echo '</div>';
}
/**
@@ -862,28 +1545,28 @@ class Branching {
echo '<div class="left">';
if ($lang['id'] == '1') {
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSPOL\');" '.($this->check_demografija_exists('XSPOL')?'checked':'').' value="XSPOL" id="XSPOL"><span class="enka-checkbox-radio"></span><label for="XSPOL">'.$lang['srv_demografija_spol'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSTAR2a4\');" '.($this->check_demografija_exists('XSTAR2a4')?'checked':'').' value="XSTAR2a4" id="XSTAR2a4"><span class="enka-checkbox-radio"></span><label for="XSTAR2a4">'.$lang['srv_demografija_starost'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XZST1surs4\');" '.($this->check_demografija_exists('XZST1surs4')?'checked':'').' value="XZST1surs4" id="XZST1surs4"><span class="enka-checkbox-radio"></span><label for="XZST1surs4">'.$lang['srv_demografija_zakonski_stan'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSPOL\');" '.($this->check_demografija_exists('XSPOL')?'checked':'').' value="XSPOL" id="XSPOL"><label for="XSPOL"<span class="enka-checkbox-radio"></span>>'.$lang['srv_demografija_spol'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSTAR2a4\');" '.($this->check_demografija_exists('XSTAR2a4')?'checked':'').' value="XSTAR2a4" id="XSTAR2a4"><label for="XSTAR2a4"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_starost'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XZST1surs4\');" '.($this->check_demografija_exists('XZST1surs4')?'checked':'').' value="XZST1surs4" id="XZST1surs4"><label for="XZST1surs4"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_zakonski_stan'].'</label></p>';
echo '</div><div class="left">';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XDS2a4\');" '.($this->check_demografija_exists('XDS2a4')?'checked':'').' value="XDS2a4" id="XDS2a4"><span class="enka-checkbox-radio"></span><label for="XDS2a4">'.$lang['srv_demografija_status'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XIZ1a2\');" '.($this->check_demografija_exists('XIZ1a2')?'checked':'').' value="XIZ1a2" id="XIZ1a2"><span class="enka-checkbox-radio"></span><label for="XIZ1a2">'.$lang['srv_demografija_izobrazba'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XLOKACREGk\');" '.($this->check_demografija_exists('XLOKACREGk')?'checked':'').' value="XLOKACREGk" id="XLOKACREGk"><span class="enka-checkbox-radio"></span><label for="XLOKACREGk">'.$lang['srv_demografija_lokacija'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XDS2a4\');" '.($this->check_demografija_exists('XDS2a4')?'checked':'').' value="XDS2a4" id="XDS2a4"><label for="XDS2a4"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_status'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XIZ1a2\');" '.($this->check_demografija_exists('XIZ1a2')?'checked':'').' value="XIZ1a2" id="XIZ1a2"><label for="XIZ1a2"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_izobrazba'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XLOKACREGk\');" '.($this->check_demografija_exists('XLOKACREGk')?'checked':'').' value="XLOKACREGk" id="XLOKACREGk"><label for="XLOKACREGk"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_lokacija'].'</label></p>';
//echo '<p><input type="checkbox" name="demografija[]" value="'.Demografija::getInstance()->getSpremenljivkaID('XPODJPRIH').'" id="XPODJPRIH"> <label for="XPODJPRIH">'.$lang['srv_demografija_podjetja'].'</label></p>';
}
if ($lang['id'] == '2') {
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSEX\');" '.($this->check_demografija_exists('XSEX')?'checked':'').' value="XSEX" id="XSEX"><span class="enka-checkbox-radio"></span><label for="XSEX">'.$lang['srv_demografija_spol'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XAGE\');" '.($this->check_demografija_exists('XAGE')?'checked':'').' value="XAGE" id="XAGE"><span class="enka-checkbox-radio"></span><label for="XAGE">'.$lang['srv_demografija_starost'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XMRSTS\');" '.($this->check_demografija_exists('XMRSTS')?'checked':'').' value="XMRSTS" id="XMRSTS"><span class="enka-checkbox-radio"></span><label for="XMRSTS">'.$lang['srv_demografija_zakonski_stan'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSEX\');" '.($this->check_demografija_exists('XSEX')?'checked':'').' value="XSEX" id="XSEX"><label for="XSEX"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_spol'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XAGE\');" '.($this->check_demografija_exists('XAGE')?'checked':'').' value="XAGE" id="XAGE"><label for="XAGE"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_starost'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XMRSTS\');" '.($this->check_demografija_exists('XMRSTS')?'checked':'').' value="XMRSTS" id="XMRSTS"><label for="XMRSTS"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_zakonski_stan'].'</label></p>';
echo '</div><div class="left">';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSTS\');" '.($this->check_demografija_exists('XSTS')?'checked':'').' value="XSTS" id="XSTS"><span class="enka-checkbox-radio"></span><label for="XSTS">'.$lang['srv_demografija_status'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XEDU\');" '.($this->check_demografija_exists('XEDU')?'checked':'').' value="XEDU" id="XEDU"><span class="enka-checkbox-radio"></span><label for="XEDU">'.$lang['srv_demografija_izobrazba'].'</label></p>';
- echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XLOC\');" '.($this->check_demografija_exists('XLOC')?'checked':'').' value="XLOC" id="XLOC"><span class="enka-checkbox-radio"></span><label for="XLOC">'.$lang['srv_demografija_lokacija'].'</label></p>'; //echo '<p><input type="checkbox" name="demografija[]" value="'.Demografija::getInstance()->getSpremenljivkaID('XPODJPRIH').'" id="XPODJPRIH"> <label for="XPODJPRIH">'.$lang['srv_demografija_podjetja'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XSTS\');" '.($this->check_demografija_exists('XSTS')?'checked':'').' value="XSTS" id="XSTS"><label for="XSTS"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_status'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XEDU\');" '.($this->check_demografija_exists('XEDU')?'checked':'').' value="XEDU" id="XEDU"><label for="XEDU"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_izobrazba'].'</label></p>';
+ echo '<p><input type="checkbox" class="enka-admin-custom" name="demografija[]" onchange="demografija_new(\'XLOC\');" '.($this->check_demografija_exists('XLOC')?'checked':'').' value="XLOC" id="XLOC"><label for="XLOC"><span class="enka-checkbox-radio"></span>'.$lang['srv_demografija_lokacija'].'</label></p>'; //echo '<p><input type="checkbox" name="demografija[]" value="'.Demografija::getInstance()->getSpremenljivkaID('XPODJPRIH').'" id="XPODJPRIH"> <label for="XPODJPRIH">'.$lang['srv_demografija_podjetja'].'</label></p>';
}
echo '</div>';
@@ -964,6 +1647,7 @@ class Branching {
*/
function branching_struktura () {
global $lang;
+ global $global_user_id;
// naenkrat preberemo vse spremenljivke, da ne delamo queryja vsakic posebej
Cache::cache_all_srv_spremenljivka($this->anketa, true);
@@ -1003,7 +1687,128 @@ class Branching {
}
echo '</div>';
- }
+ }
+
+ // Napredne nastavitve v sredini zgoraj
+ echo '<div class="top_center_settings">';
+
+ echo '<div class="left_settings">';
+
+ $url0 = "'" . "index.php?anketa=".$this->anketa."&a=branching&change_mode=1&what=expanded&value=0" . "'";
+ $url1 = "'" . "index.php?anketa=".$this->anketa."&a=branching&change_mode=1&what=expanded&value=1" . "'";
+
+ echo '<div class="settings_group">';
+ // Razširi
+ echo '<div title="'.$lang['srv_expanded_1'].'" class="square rectangle left '.($this->expanded ? 'active':'').'" onClick="window.location='.$url1.';return false;">';
+ //echo '<span class="faicon expand-new"></span>';
+ echo '<span class="expand-new-icon faicon"></span>';
+ echo '<span class="text hide_mobile">'.$lang['srv_expand'].'</span>';
+ echo '</div>';
+
+ //echo '<div class="line"></div>';
+
+ //Skrči
+ echo '<div title="'.$lang['srv_expanded_0'].'" class="square rectangle right '.($this->expanded ? '':'active').'" onClick="window.location='.$url0.';return false;">';
+ echo '<span class="faicon collapse-new-icon"></span><span class="text hide_mobile">'.$lang['srv_collapse'].'</span>';
+ echo '</div>';
+
+ echo '</div>';// settings group
+
+ // Napredne nastavitve dropdown
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+ # preverimo ali imamo ife. Če so, izpisujemo vse ikonce
+ $sql_select = "SELECT count(*) AS if_count FROM srv_branching WHERE element_if > 0 AND ank_id = '".$this->anketa."'";
+ $sql_query = sisplet_query($sql_select);
+ $row_query = mysqli_fetch_array($sql_query);
+ $has_if = (int)$row_query['if_count'] > 0 ? true : false;
+
+ # ali prikazujemo vse ikonice ali samo "simpl" ikonice
+ $sql_select_fv = "SELECT count(*) AS full_view FROM srv_user_setting_for_survey WHERE sid='".$this->anketa."' AND uid='".$global_user_id."' AND what='display_full_toolbox' AND value='1'";
+ $sql_query_fv = sisplet_query($sql_select_fv);
+ $row_query_fv = mysqli_fetch_array($sql_query_fv);
+ $full_view = (int)$row_query_fv['full_view'] == 1 ? true : false;
+ $full_view = true;
+
+ #odpri vse - zapri vse bloki
+ if ($has_if == true && $full_view == true || ($has_if == true && $this->expanded == false)) {
+ echo '<div class="settings_group">';
+ //echo '<span class="setting_text hide_mobile">'.$lang['srv_expand_colapse'].': </span>';
+
+ echo '<div class="button" onClick="expandCollapseAllPlusMinus(\'expand\'); return false;" title="'.$lang['srv_expand_open_title'].'">';
+ echo '<span class="faicon plus_square blue right" title="'.$lang['srv_expand_open_title'].'"></span>';
+ echo '<span class="hide_mobile">'.$lang['srv_expand_open'].'</span>';
+ echo '</div>';
+
+ echo '<div class="button" onClick="expandCollapseAllPlusMinus(\'collapse\'); return false;" title="'.$lang['srv_collapse_close_title'].'">';
+ echo '<span class="faicon minus_square blue right" title="'.$lang['srv_collapse_close_title'].'"></span>';
+ echo '<span class="hide_mobile">'.$lang['srv_collapse_close'].'</span>';
+ echo '</div>';
+ echo '</div>';// settings group
+ }
+ echo '</div>';
+
+ echo '<div class="right_settings">';
+
+ echo '<div class="settings_group no_margin">';
+ // Arhiviraj - ENKLIK ARHIV
+ echo '<div class="button '.($row['locked'] == 0 ? '' : 'no_margin').'" onclick="oneClickArchive();" title="'.$lang['srv_analiza_arhiviraj_ttl2'].'">';
+ echo '<span class="faicon arhiv blue right"></span>';
+ echo '<span class="hide_mobile">'.$lang['srv_analiza_arhiviraj'].'</span>';
+ echo '</div>';
+
+ if ($row['locked'] == 0) {
+ echo '<div id="top_napredne_holder">';
+
+ echo '<div title="'.$lang['srv_quick_settings_napredno'].'" id="top_napredne_gumb" class="button no_margin" onclick="toggleSurveyTopSettings(); return false;">';
+ echo '<span id="top_napredne_icon" class="faicon ellipsis-h blue"></span>';
+ echo '</div>';
+
+ echo '<div id="top_napredne_dropdown" class="displayNone">';
+
+ # find & replace
+ echo '<p class="segment_option">';
+ echo '<a href="#" onclick="find_replace(); toggleSurveyTopSettings(); return false;" title="'.$lang['srv_find_replace_words'].'" ><span class="faicon replace"></span>'.$lang['srv_find_replace_words'].'</a>';
+ echo '</p>';
+
+ if ($full_view == true) {
+ #prelom strani
+ echo '<p class="segment_option">';
+ echo '<a href="#" onclick="javascript:pagebreak_all(); toggleSurveyTopSettings(); return false;" title="'.$lang['srv_pagebreak_all'].'"><span class="faicon paragraph"></span>'.$lang['srv_pagebreak_all'].'</a> '."\n";
+ echo '</p>';
+
+ # Hrošč je viden samo če imamo ife in razširjen pogled
+ //if ($row['flat'] == 0)
+ echo '<p class="segment_option">';
+ echo '<a href="#" onclick="javascript:check_pogoji(); toggleSurveyTopSettings(); return false;" title="'.$lang['srv_check_pogoji'].'"><span class="faicon bug"></span>'.$lang['srv_check_pogoji'].'</a> '."\n";
+ echo '</p>';
+
+ #prestevilci
+ echo '<p class="segment_option">';
+ echo '<a href="#" onclick="prestevilci(); toggleSurveyTopSettings(); return false;"><span class="faicon hashtag" title="'.$lang['srv_grupe_recount_branching'].'"></span>'.$lang['srv_grupe_recount_branching'].'</a>' . Help :: display('srv_grupe_recount_branching') ."\n";
+ echo '</p>';
+ }
+
+ echo '</div>';
+ echo '</div>';
+ }
+
+
+ //Klik izven razprith nastavitev - zapremo okno
+ echo '<script>
+ $(document).mouseup(function(e){
+ var container = $("#top_napredne_dropdown");
+ var gumb = $("#top_napredne_gumb");
+
+ if (!container.is(e.target) && container.has(e.target).length === 0 && !gumb.is(e.target) && gumb.has(e.target).length === 0){
+ $("#top_napredne_dropdown").addClass("displayNone");
+ $("#top_napredne_gumb").removeClass("border_blue");
+ }
+ });
+ </script>';
+
+ echo '</div>'; // settings group
+ echo '</div>'; // left settings
+ echo '</div>'; //top_center_settings
echo '<ul class="first '.($this->locked?'locked':'').'">';
@@ -1019,11 +1824,14 @@ class Branching {
// napis uvod na začetku
echo '<li id="droppable_0-0" class="nodrop">';
- echo '<span class="pb_on permanent"><span>'.$lang['srv_intro_page'].'</span></span>';
+ echo ' <div class="pb_on permanent">';
+ echo ' <div class="pb_page">'.$lang['srv_intro_page'].'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
echo '</li>';
echo '<li id="droppable_0-0" class="nodrop">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
// Ce imamo slucajno GDPR preduvod
@@ -1040,7 +1848,7 @@ class Branching {
echo '</li>';
echo '<li id="droppable_0-0" class="nodrop">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
}
}
@@ -1063,13 +1871,14 @@ class Branching {
echo '<li id="droppable_0-0" class="drop empty_vrivanje" spr="0" if="0" endif="0">';
- echo ' <div class="empty_vrivanje_title">'.$lang['srv_new_survey_success2'].'</div>';
+ echo ' <div class="empty_vrivanje_title">'.$lang['srv_new_survey_success'].'</div>';
- echo ' <div class="empty_vrivanje_subtitle">';
- printf ($lang['srv_new_survey_success3'], 'index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=toolbox&value=3');
- echo ' </div>';
+ echo ' <div class="empty_vrivanje_buttons">';
+ echo ' <button class="medium blue" onClick="toolbox_add_advanced_popup();">'.$lang['srv_new_survey_success_button_create'].'</button>';
+ echo ' <button class="medium white-blue" onClick="displayLibraryPopup();">'.$lang['srv_new_survey_success_button_template'].'</button>';
+ echo ' </div>';
- MobileSurveyAdmin::displayNoQuestions($this->anketa);
+ MobileSurveyAdmin::displayNoQuestions($this->anketa);
echo '</li>';
}
@@ -1077,9 +1886,10 @@ class Branching {
if ($first > 0) {
+ // Uvodni element (pri formi ga ni)
if ($this->survey_type != 1) {
echo '<li id="droppable_0-0-2" class="nodrop" spr="0" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
$first = $this->find_first_spr();
@@ -1087,37 +1897,53 @@ class Branching {
// Zaenkrat imamo vedno isti text za strani
if ($first > 0){
- /*$gr = $this->getGrupa4Spremenljivka($first);*/
$gr = $this->getGrupa4Spremenljivka($first);
$naslov = $lang['srv_stran'].' '.$gr['vrstni_red'];
}
else
$naslov = $lang['srv_stran'].' 1';
- echo '<span class="pb_on permanent"><span>'.$naslov.'</span></span>';
+ echo ' <div class="pb_on permanent">';
+ echo ' <div class="pb_page">'.$naslov.'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
+
echo '</li>';
}
echo '<li id="droppable_0-0-0" class="drop" spr="0" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
}
+ // Dodani elementi v anketi (vprasanja, pogoji...)
foreach (Cache::srv_branching_parent($this->anketa, $parent) AS $k => $rowQ) {
$this->display_element($rowQ['element_spr'], $rowQ['element_if']);
}
- // zakljucek - pri formi ga ni
+ // Gumb za dodajanje vprasanja
+ if ($first > 0 && !$this->locked) {
+ echo '<li id="droppable_0-0" class="nodrop bottom_vrivanje">';
+ echo ' <div class="bottom_vrivanje_buttons">';
+ echo ' <button class="medium blue" onClick="toolbox_add_advanced_popup();">'.$lang['srv_new_survey_success_button_create'].'</button>';
+ echo ' </div>';
+ echo '</li>';
+ }
+
+ // Zakljucek - pri formi ga ni
if ($this->survey_type != 1) {
// napis zakljucek prikazemo tukaj in ne za zadnjo spremenljivko da je lepse
echo '<li id="droppable_'.'0'.'-'.'0'.'-1" class="nodrop" spr="'.'0'.'" if="0" endif="0">';
- echo '<span class="pb_on permanent"><span>'.$lang['srv_end_page'].'</span></span>';
+ echo ' <div class="pb_on permanent">';
+ echo ' <div class="pb_page">'.$lang['srv_end_page'].'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
echo '</li>';
echo '<li id="droppable_'.'0'.'-'.'0'.'-0" class="nodrop" spr="'.'0'.'" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
echo '<li id="-2" class="spr">';
@@ -1180,18 +2006,17 @@ class Branching {
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
- #$this->survey_type = SurveyAdmin::getSurvey_type($this->anketa);
$this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type");
if ($row['flat'] == 0)
- $zamik = ( $this->level($spremenljivka,0) > 0 ? ' style="padding-left:'.(10+$this->level($spremenljivka,0)*20).'px"' : '' );
+ $zamik = ( $this->level($spremenljivka,0) > 0 ? ' style="padding-left:'.($this->level($spremenljivka,0)*32).'px"' : '' );
else
$zamik = '';
$row = Cache::srv_spremenljivka($spremenljivka);
$row1 = Cache::srv_branching($spremenljivka, 0);
- echo '<li id="branching_'.$spremenljivka.'" class="spr'.' '.($row['tip']==22?' calculation':'').' '.($row['tip']==25?' quota':'').'" '.$zamik.' tip="'.$row['tip'].'" signature="'.$row['signature'].'">';
+ echo '<li id="branching_'.$spremenljivka.'" class="spr spr_tip_'.$row['tip'].' '.($row['tip']==22?' calculation':'').' '.($row['tip']==25?' quota':'').'" '.$zamik.' tip="'.$row['tip'].'" signature="'.$row['signature'].'">';
if ($this->expanded) {
$this->vprasanje($spremenljivka);
} else {
@@ -1199,76 +2024,75 @@ class Branching {
}
echo '</li>';
- //echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'" class="drop" spr="'.$row['id'].'" if="0" endif="0">';
if ($this->pagebreak($spremenljivka)) {
+
$gr = $this->getGrupa4Spremenljivka($this->find_next_spr($spremenljivka));
+
if ($gr['id'] > 0) {
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-2" class="drop" spr="'.$row['id'].'" if="0" endif="0" drop="2">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
// ++ zadnji pagebreak prikazan izven ifa //
// ce je spremenljivka zadnja v IFu, ne prikazemo PB, ker ga bomo za ENDIFom
$rows = Cache::srv_branching($spremenljivka, 0);
if ( $this->find_last_in_if($rows['parent']) != $spremenljivka ) {
- echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-1" class="nodrop" spr="'.$row['id'].'" if="0" endif="0">';
- //echo '<span class="pb_on" title="'.$lang['srv_rem_pagebreak'].'"><span>'.$gr['naslov'].'</span></span>';
- echo '<span class="pb_on" title="'.$lang['srv_rem_pagebreak'].'"><span>'.$lang['srv_stran'].' '.$gr['vrstni_red'].'</span></span>';
+
+ echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-1" class="nodrop" spr="'.$row['id'].'" if="0" endif="0">';
+ echo ' <div class="pb_on not-permanent" title="'.$lang['srv_rem_pagebreak'].'">';
+ echo ' <div class="pb_page">'.$lang['srv_stran'].' '.$gr['vrstni_red'].'</div>';
+ echo ' <div class="pb_page_hover"><span class="faicon delete_circle"></span>'.$lang['srv_rem_pagebreak'].'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
echo '</li>';
+
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-0" class="drop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
}
- // -- zadnji pagebreak prikazan izven ifa //
- } elseif($this->survey_type != 1) {
+
+ }
+ // -- zadnji pagebreak prikazan izven ifa //
+ elseif($this->survey_type != 1) {
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-2" class="drop" spr="'.$row['id'].'" if="0" endif="0" drop="2">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
-
- /*echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-1" class="nodrop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_on">'.$lang['srv_end_label'].'</span>';
- echo '</li>';
-
- echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-0" class="nodrop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
- echo '</li>';*/
}
- } elseif ($spremenljivka == $this->find_last_spr() && $this->survey_type != 1) { // zadnja spremenljivka - zakljucek
+ }
+ elseif ($spremenljivka == $this->find_last_spr() && $this->survey_type != 1) { // zadnja spremenljivka - zakljucek
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-2" class="drop" spr="'.$row['id'].'" if="0" endif="0" drop="2">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
- /*echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-1" class="nodrop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_on">'.$lang['srv_end_label'].'</span>';
- echo '</li>';
-
- echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-0" class="nodrop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
- echo '</li>';*/
-
- } elseif ($this->survey_type != 1) { //pri formi ne dovolimo dodajanja page-breakov
+ }
+ // pri formi ne dovolimo dodajanja page-breakov
+ elseif ($this->survey_type != 1) {
// tuki pustimo, da se PB lahko dodaja za spremenljivko in za ifom (pol se prikaze za ifom)
// -- v zadnji spremenljivki za ifom ne prikazemo dodajanja
$rows = Cache::srv_branching($spremenljivka, 0);
if ( $this->find_last_in_if($rows['parent']) != $spremenljivka ) {
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'" class="drop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_new" title="'.$lang['srv_add_pagebreak'].'"></span>';
+ echo ' <div class="pb_new" title="'.$lang['srv_add_pagebreak'].'">';
+ echo ' <div class="pb_page_hover"><span class="faicon paragraph"></span>'.$lang['srv_add_pagebreak'].'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
echo '</li>';
- } else { // zadnji spremenljivki v ifu izpisemo PB izven ifa (da je bolj pregledno in lepse)
+ }
+ // zadnji spremenljivki v ifu izpisemo PB izven ifa (da je bolj pregledno in lepse)
+ else {
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'" class="drop" spr="'.$row['id'].'" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
}
- } elseif ($this->survey_type == 1) { // forma
+ }
+ // forma
+ elseif ($this->survey_type == 1) {
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'" class="drop" spr="'.$row['id'].'" if="0" endif="0">';
echo '</li>';
}
-
- //echo '</li>';
-
}
function display_if_label($if) {
@@ -1282,7 +2106,7 @@ class Branching {
if ($rowb['tip'] == 0) {
$this->conditions_display($if);
} elseif ($rowb['tip'] == 1) {
- echo '<strong class="clr_bl">BLOCK</strong> <span class="colorblock">('.$rowb['number'].')</span>'.($rowb['enabled']==2?' FALSE ':'').($rowb['label']!=''?' <span class="if_comment">( '.$rowb['label'].' )</span>':'').'';
+ echo '<span class="clr_bl">BLOCK</span> <span class="colorblock">('.$rowb['number'].')</span>'.($rowb['enabled']==2?' FALSE ':'').($rowb['label']!=''?' <span class="if_comment">( '.$rowb['label'].' )</span>':'').'';
} elseif ($rowb['tip'] == 2) {
$this->loop_display($if);
}
@@ -1299,7 +2123,7 @@ class Branching {
$rowb = Cache::srv_if($if);
if ($row['flat'] == 0)
- $zamik = ( $this->level(0,$if) > 0 ? ' style="padding-left:'.(10+$this->level(0,$if)*20).'px"' : '' );
+ $zamik = ( $this->level(0,$if) > 0 ? ' style="padding-left:'.($this->level(0,$if)*32).'px"' : '' );
else
$zamik = '';
@@ -1308,7 +2132,7 @@ class Branching {
// plusminus
if ($row['flat'] == 0)
- echo '<a class="pm '.($rowb['collapsed']==1 && $row['flat']==0?'plus':'minus').'"></a>';
+ echo '<span class="pm faicon '.($rowb['collapsed']==1 && $row['flat']==0 ? 'plus' : 'minus').'"></span>';
$this->display_if_label($if);
@@ -1333,28 +2157,41 @@ class Branching {
$sqle = sisplet_query("SELECT ank_id, parent, element_spr, element_if FROM srv_branching WHERE parent='{$rowi['parent']}' AND vrstni_red>'{$rowi['vrstni_red']}' AND ank_id='$this->anketa'");
- if ($rows['pagebreak'] == 1 AND (mysqli_num_rows($sqle)>0 || $rowi['parent']==0) ) {
+ if (isset($rows['pagebreak']) && $rows['pagebreak'] == 1 AND (mysqli_num_rows($sqle)>0 || $rowi['parent']==0) ) {
$gr = $this->getGrupa4Spremenljivka($this->find_next_spr($spr));
if ($gr['id'] > 0) {
- echo '<li './*id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-2"*/' class="nodrop" spr="'.$spr.'" if="0" endif="0">';
- echo '<span class="pb_off"></span>';
+ echo '<li class="nodrop" spr="'.$spr.'" if="0" endif="0">';
+ echo ' <div class="pb_off"></div>';
echo '</li>';
- echo '<li './*id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'-1"*/' class="nodrop" spr="'.$spr.'" if="0" endif="0">';
- echo '<span class="pb_on" title="'.$lang['srv_rem_pagebreak'].'">'.$lang['srv_stran'].' '.$gr['vrstni_red'].'</span>';
+
+ echo '<li class="nodrop" spr="'.$spr.'" if="0" endif="0">';
+ echo ' <div class="pb_on not-permanent" title="'.$lang['srv_rem_pagebreak'].'">';
+ echo ' <div class="pb_page">'.$lang['srv_stran'].' '.$gr['vrstni_red'].'</div>';
+ echo ' <div class="pb_page_hover"><span class="faicon delete_circle"></span>'.$lang['srv_rem_pagebreak'].'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
echo '</li>';
}
-
}
// zadnji spremenljivki v ifu, tudi dodamo PB izven pagebreaka (da se doda, tam kjer se potem prikaže)
- if ($rows['pagebreak'] == 0 AND (mysqli_num_rows($sqle)>0 || $rowi['parent']==0) ) {
+ // ce gre za zadnji if v anketi ne pustimo dodajanja page breaka
+ if (isset($rows['pagebreak']) && $rows['pagebreak'] == 0
+ && (mysqli_num_rows($sqle) > 0 || $rowi['parent'] == 0)
+ && ($if != $this->find_last_if_branching())
+ ){
+
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'" class="drop" spr="0" if="'.$if.'" endif="1" spr_pb="'.$spr.'">';
- echo '<span class="pb_new" title="'.$lang['srv_add_pagebreak'].'"></span>';
+ echo ' <div class="pb_new" title="'.$lang['srv_add_pagebreak'].'">';
+ echo ' <div class="pb_page_hover"><span class="faicon paragraph"></span>'.$lang['srv_add_pagebreak'].'</div>';
+ echo ' <div class="pb_line"></div>';
+ echo ' </div>';
echo '</li>';
- } else {
+ }
+ else {
echo '<li id="droppable_'.$row1['parent'].'-'.$row1['vrstni_red'].'" class="drop" spr="0" if="'.$if.'" endif="1">';
echo '</li>';
}
@@ -1370,8 +2207,8 @@ class Branching {
$rowb = Cache::srv_if($if);
if ($row['flat'] == 0) {
- $zamik = ($this->level(0, $if) > 0 ? ' style="padding-left:' . (10 + $this->level(0, $if) * 20) . 'px"' : '');
- $zaklepaj = ($this->level(0, $if) > 0 ? 'margin-left:-' . (10 + $this->level(0, $if) * 20) . 'px;width:' . (15 + $this->level(0, $if) * 20) . 'px;' : '');
+ $zamik = ($this->level(0, $if) > 0 ? ' style="padding-left:' . ($this->level(0, $if) * 32) . 'px"' : '');
+ $zaklepaj = ($this->level(0, $if) > 0 ? 'margin-left:-' . ($this->level(0, $if) * 32) . 'px;width:' . ($this->level(0, $if) * 32) . 'px;' : '');
}
else {
$zamik = '';
@@ -1386,11 +2223,12 @@ class Branching {
}
echo '<li id="branching_endif'.$if.'" class="'.($rowb['tip']==0?'endif':($rowb['tip']==1?'endblock':'endloop')).'"'.$zamik.'>';
- echo '<span class="'.($rowb['tip']==0?' clr_if':($rowb['tip']==1?' clr_bl':' clr_lp')).'"><strong>'.($rowb['tip']==0?'ENDIF':($rowb['tip']==1?'ENDBLOCK':'ENDLOOP')).'</strong></span> <span class="'.($rowb['tip']==0?'colorif':($rowb['tip']==1?'colorblock':'colorloop')).'">('.$rowb['number'].')</span>'."\n\r";
+ echo '<span class="'.($rowb['tip']==0?' clr_if':($rowb['tip']==1?' clr_bl':' clr_lp')).'">'.($rowb['tip']==0?'ENDIF':($rowb['tip']==1?'ENDBLOCK':'ENDLOOP')).'</span> <span class="'.($rowb['tip']==0?'colorif':($rowb['tip']==1?'colorblock':'colorloop')).'">('.$rowb['number'].')</span>'."\n\r";
// Dodajanje komentarjev na if/blok
if ($this->displayKomentarji !== false) {
- $this->if_komentarji($if, $rowb['tip']);
+ $sc = new SurveyComments($this->anketa);
+ $sc->display_if_komentarji($if, $rowb['tip']);
}
echo '</li>';
@@ -1423,15 +2261,15 @@ class Branching {
// Kvota
if($tip == 25){
$SQ = new SurveyQuotas($this->anketa);
- echo '<span class="quotavariable">('.$variable.')</span> '.$SQ->quota_display(-$spremenljivka).' <span class="spr_comment">( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )</span>';
+ echo '<span class="quotavariable">('.$variable.')</span> '.$SQ->quota_display(-$spremenljivka).' <span class="spr_comment">('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')</span>';
}
// Kalkulacija
else if($tip == 22){
- echo '<span class="calculationvariable">('.$variable.')</span> '.$this->calculations_display(-$spremenljivka).' <span class="spr_comment">( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )</span>';
+ echo '<span class="calculationvariable">('.$variable.')</span> '.$this->calculations_display(-$spremenljivka).' <span class="spr_comment">('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')</span>';
}
// Navadne spremenljivke
else{
- echo '<span class="colorvariable">('.$variable.')</span> '.$spanred.skrajsaj(strip_tags($naslov), 80).($spanred!=''?'</span>':'').' <span class="spr_comment">( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )</span>';
+ echo '<span class="colorvariable">('.$variable.')</span> '.$spanred.skrajsaj(strip_tags($naslov), 80).($spanred!=''?'</span>':'').' <span class="spr_comment">('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')</span>';
}
}
@@ -1450,6 +2288,13 @@ class Branching {
global $site_url;
$row = Cache::srv_spremenljivka($spremenljivka);
+
+ // novi missingi - vse tabele razen kombinirane
+ //dodatne missing vrednosti (ne vem, zavrnil...)
+ # preberemo iz class.SurveyMissingValues
+ $smv = new SurveyMissingValues($this->anketa);
+ # katere missinge imamo na voljo
+ $missing_values = $smv->GetUnsetValuesForSurvey();
$this->prevajanje = $prevajanje;
@@ -1461,9 +2306,10 @@ class Branching {
save('lang_id', $this->lang_id);
$rowl = \App\Controllers\LanguageController::srv_language_spremenljivka($spremenljivka);
- if (strip_tags($rowl['naslov']) != '') $row['naslov'] = $rowl['naslov'];
- if (strip_tags($rowl['info']) != '') $row['info'] = $rowl['info'];
- if ($rowl['vsota'] != '') $row['vsota'] = $rowl['vsota'];
+
+ if (isset($rowl['naslov']) && strip_tags($rowl['naslov']) != '') $row['naslov'] = $rowl['naslov'];
+ if (isset($rowl['info']) && strip_tags($rowl['info']) != '') $row['info'] = $rowl['info'];
+ if (isset($rowl['vsota']) && $rowl['vsota'] != '') $row['vsota'] = $rowl['vsota'];
}
$this->survey_type = SurveyInfo::getInstance()->getSurveyColumn("survey_type");
@@ -1497,13 +2343,15 @@ class Branching {
$string = '';
// statusi: reminder, timer, in še kaj
if ($row['sistem'] == 1)
- $string = $string . $lang['srv_system_text'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_system_text'].'</span>';
if ($row['visible'] == 0)
- $string .= $lang['srv_hidden_text'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_hidden_text'].'</span>';
if ($row['dostop'] != 4) {
- $string = $string . $lang['srv_visible_dostop'].' ';
+
+ $string .= '<span class="item">'.$lang['srv_visible_dostop'].' ';
+
switch ($row['dostop']) {
case 3: $string .= strtolower($lang['see_registered']);
break;
@@ -1514,65 +2362,62 @@ class Branching {
case 0; $string .= strtolower($lang['see_admin']);
break;
}
- $string .= '&nbsp;|&nbsp;';
+ $string .= '</span>';
}
if ($row['reminder'] > 0) {
if ($row['reminder'] == 1) {
- // echo '<img src="img_'.$this->skin.'/reminder_soft.png" alt="'.$lang['srv_reminder_soft'].'" />';
- $string = $string . $lang['srv_reminder_soft'];
- } else {
- // echo '<img src="img_'.$this->skin.'/reminder_hard.png" alt="'.$lang['srv_reminder_hard'].'" />';
- $string = $string . $lang['srv_reminder_hard'];
+ $string .= '<span class="item">'.$lang['srv_reminder_soft'].'</span>';
+ }
+ else {
+ $string .= '<span class="item">'.$lang['srv_reminder_hard'].'</span>';
}
- $string = $string . '&nbsp;|&nbsp;';
}
$sqlv = sisplet_query("SELECT spr_id, if_id FROM srv_validation WHERE spr_id = '$spremenljivka'");
if (mysqli_num_rows($sqlv) > 0) {
- $string = $string . $lang['srv_validation'];
- $string = $string . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_validation'].'</span>';
}
if ($row['timer'] > 0) {
- $string = $string . $lang['srv_timer_on_time'];
- $string = $string . (substr(bcdiv($row['timer'], 60), 0, 4)) . '' . $lang['srv_minutes'] . ' ';
- $string = $string . (bcmod($row['timer'], 60)) . '' . $lang['srv_seconds'] . '';
- $string = $string . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_timer_on_time'];
+ $string .= (substr(bcdiv($row['timer'], 60), 0, 4)) . '' . $lang['srv_minutes'] . ' ';
+ $string .= (bcmod($row['timer'], 60)) . '' . $lang['srv_seconds'] . '';
+ $string .= '</span>';
}
//izrišemo še ostale statuse: statistika, orientacija, sortiranje
if ($row['tip'] <= 3 && $row['stat'] && $this->survey_type != 0) {
- $string = $string . $lang['srv_stat_on'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_stat_on'].'</span>';
}
// Status orentacije - navadna vprasanja
if((in_array($row['tip'], array('1', '2', '21', '7', '8')) && $row['orientation'] != '1') || ($row['tip'] == '3' && $row['orientation'] == '1')){
- $string .= $this->getVprasanjeOrientationString($row['tip'], $row['orientation']) . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$this->getVprasanjeOrientationString($row['tip'], $row['orientation']) . '</span>';
}
// Status orentacije - tabele
elseif(in_array($row['tip'], array('6', '16')) && $row['enota'] != '0'){
- $string .= $this->getVprasanjeOrientationString($row['tip'], $row['enota']) . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$this->getVprasanjeOrientationString($row['tip'], $row['enota']) . '</span>';
}
if ($row['tip'] == 1 && $row['hidden_default'] == 1) {
- $string = $string . $lang['srv_potrditev'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_potrditev'].'</span>';
}
if ($row['random']) {
$arrayRandomText = array (
- 0 => $lang['srv_random_off'],
- 1 => $lang['srv_random_on'],
- 2 => $lang['srv_sort_asc'],
- 3 => $lang['srv_sort_desc']
+ 0 => $lang['srv_random_off'],
+ 1 => $lang['srv_random_on'],
+ 2 => $lang['srv_sort_asc'],
+ 3 => $lang['srv_sort_desc']
);
- $string = $string . $arrayRandomText[$row['random']] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$arrayRandomText[$row['random']].'</span>';
}
//skriti checkboxi
if ($row['checkboxhide'] != 0)
- $string = $string . $lang['srv_checkboxhide_disabled'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_checkboxhide_disabled'].'</span>';
// Kljucavnica ce je vprasanje zaklenjeno
if($question_locked){
@@ -1580,22 +2425,20 @@ class Branching {
}
// Ce je zaklenjeno ampak ga lahko ureja ker je admin ali avtor
elseif($row['locked']){
- $string = $string . $lang['srv_locked_text'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_locked_text'].'</span>';
}
// Ce je onemogoceno vprasanje
$disabled_vprasanje = $spremenljivkaParams->get('disabled_vprasanje') ? $spremenljivkaParams->get('disabled_vprasanje') : 0;
if($disabled_vprasanje){
- $string = $string . $lang['srv_disabled_text'] . '&nbsp;|&nbsp;';
+ $string .= '<span class="item">'.$lang['srv_disabled_text'].'</span>';
}
- //zbrisemo zadnji "|" iz niza
- $string = substr($string, 0, -7);
- $string = '<span class="red">' . $string . '</span>';
echo $string;
echo '</div>';
+
echo '</div>'; // - spremenljivka_settings
// --- Zgornja vrstica pri editiranju vprasanj -->
@@ -1614,12 +2457,12 @@ class Branching {
// kalkulacija
if ($row['tip'] == 22) {
- $row['naslov'] = ''.$this->calculations_display(-$spremenljivka).' <span class="spr_comment">( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )</span>';
+ $row['naslov'] = ''.$this->calculations_display(-$spremenljivka).' <span class="spr_comment">('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')</span>';
}
// Kvota
else if($row['tip'] == 25){
$SQ = new SurveyQuotas($this->anketa);
- $row['naslov'] = ''.$SQ->quota_display(-$spremenljivka).' <span class="spr_comment">( '.$lang['srv_vprasanje_tip_long_'.$row['tip']].' )</span>';
+ $row['naslov'] = ''.$SQ->quota_display(-$spremenljivka).' <span class="spr_comment">('.$lang['srv_vprasanje_tip_long_'.$row['tip']].')</span>';
}
// Inline ifi so disablani ce nimamo ustreznega paketa
@@ -1627,14 +2470,6 @@ class Branching {
echo '<div id="spremenljivka_contentdiv' . $spremenljivka . '" class="content_div_normalmode">';
- if ( in_array($row['tip'], array(1,2,6,16,19,20)) ) {
- if ($row['enota'] != 10 && $row['orientation'] != 10){
- echo '<div class="add-variable tip_'.$row['tip'].'"><a href="#" onclick="vprasanje_fullscreen(\''.$spremenljivka.'\'); return false;" title="'.$lang['srv_novavrednost'].'"><span class="faicon add small"></span> '.$lang['srv_novavrednost'].'</a></div>';
-
- MobileSurveyAdmin::displayAddQuestionCategory($this->anketa, $spremenljivka, $row['tip']);
- }
- }
-
// kalkulacija
if ($row['tip'] == 22) {
echo '<div class="naslov '.($row['orientation']==0?'floatLeft':'').' calculation">';
@@ -1666,13 +2501,13 @@ class Branching {
@include($file);
}
else{
- echo '<div class="naslov '.($row['orientation']==0?'':'').' naslov_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" spr_id="'.$row['id'].'" '.(strpos($row['naslov'], $lang['srv_new_vprasanje'])!==false || strpos($row['naslov'], $lang1['srv_new_vprasanje'])!==false || $this->lang_id!=null ? ' default="1"':'').'>';
+ echo '<div class="naslov '.($row['orientation']==0?'':'').' naslov_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" spr_id="'.$row['id'].'" '.(strpos($row['naslov'], $lang['srv_new_vprasanje'])!==false || (isset($lang1['srv_new_vprasanje']) && strpos($row['naslov'], $lang1['srv_new_vprasanje'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>';
echo $row['naslov'];
echo '</div>';
}
if ($row['info'] != '')
- echo '<div class="spremenljivka_info info_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" spr_id="'.$row['id'].'" '.($row['info']==$lang['note'] || $row['info']==$lang1['note'] || $this->lang_id!=null ? ' default="1"':'').'>' . $row['info'] . '</div>';
+ echo '<div class="spremenljivka_info info_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" spr_id="'.$row['id'].'" '.($row['info']==$lang['note'] || (isset($lang1['note']) && $row['info']==$lang1['note']) || $this->lang_id!=null ? ' default="1"':'').'>' . $row['info'] . '</div>';
echo '<span class="faicon edit-vprasanje icon-as_link display_editor" onclick="inline_load_editor(this); return false;"></span>';
@@ -1696,7 +2531,7 @@ class Branching {
else{
echo'
<script>
- $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html("'.$r['info'].'");
+ $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html('.json_encode($r['info']).');
</script>
';
}
@@ -1716,7 +2551,7 @@ class Branching {
else{
echo'
<script>
- $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html("'.$r['info'].'");
+ $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html('.json_encode($r['info']).');
</script>
';
}
@@ -1737,7 +2572,7 @@ class Branching {
else{
echo'
<script>
- $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html("'.$r['info'].'");
+ $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html('.json_encode($r['info']).'));
</script>
';
}
@@ -1757,7 +2592,7 @@ class Branching {
else{
echo'
<script>
- $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html("'.$r['info'].'");
+ $("#spremenljivka_content_'.$spremenljivka.' div.spremenljivka_info.info_inline").html('.json_encode($r['info']).');
</script>
';
}
@@ -1766,11 +2601,14 @@ class Branching {
}
- echo '<div id="variable_holder" class="variable_holder '.($this->lang_id==null?'allow_new':'').'"><!-- variable holder -->';
+ $leftmargin = (($row['tip'] <= 2 && $row['orientation'] == 10) || ($row['tip'] == 1 && ($row['orientation'] == 9 || $row['orientation'] == 11)))
+ ? ' left11' : '';
+
+ echo '<div id="variable_holder" class="variable_holder '.($this->lang_id==null?'allow_new':'').$leftmargin.'"><!-- variable holder -->';
// radio, checkbox, select
if ($row['tip'] <= 3) {
-
+
if ($row['tip'] == 3 || $row['orientation'] == 6)
echo '<div class="edit_mode '.($this->lang_id==null?'allow_new':'').'">';
@@ -1829,6 +2667,8 @@ class Branching {
$num = mysqli_num_rows($sql1);
$size = $num * 50;
+ echo '<div class="ranking_holder">';
+
//zaslon razdelimo na dva dela - izris leve strani
echo '<div id="half" class="dropzone '.($this->lang_id==null?'allow_new':'').'" style="width: 50%; min-height:' . $size . 'px; float: left; border-right: 1px solid black;">';
@@ -1865,47 +2705,57 @@ class Branching {
//echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
echo '<div class="variabla" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
// Ikona za upload slike
- echo ' <span class="sprites image_upload pointer" onclick="vrednost_insert_image(\''.$row1['id'].'\', false); return false;" title="'.$lang['upload_img2'].'"></span>';
+ echo ' <span class="faicon image_upload pointer" onclick="vrednost_insert_image(\''.$row1['id'].'\', false); return false;" title="'.$lang['upload_img2'].'"></span>';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
+
echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" style="float:none" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
//koda za notranji IF
if ($row1['if_id'] > 0) {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
if ($this->condition_check($row1['if_id']) != 0)
echo ' <span class="faicon warning icon-orange"></span>';
}
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+
}
else{
if ($length > 30) $class = 'ranking_long'; $class = 'ranking';
- //echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
+
echo '<div class="variabla" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
+
echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" style="float:none" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
- //koda za notranji IF
+
+ // koda za notranji IF
if ($row1['if_id'] > 0) {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
if ($this->condition_check($row1['if_id']) != 0)
echo ' <span class="faicon warning icon-orange"></span>';
- }
+ }
+
+ echo ' <div class="icons_holder no_grow">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
}
@@ -1924,8 +2774,7 @@ class Branching {
echo '</div>';
- echo '<div class="clr"></div>';
-
+ echo '</div>';
}
//Image hot spot @ radio ********************************************************************************************************
@@ -1968,20 +2817,24 @@ class Branching {
// Ce je variabla ne vem in imamo vklopljen prikaz ob opozorilu -> rdec
$missing_warning = '';
- if(($row1['other'] == '-97' && $row['alert_show_97'] > 0)
+ if(($row1['other'] == '-96' && $row['alert_show_96'] > 0)
+ || ($row1['other'] == '-97' && $row['alert_show_97'] > 0)
|| ($row1['other'] == '-98' && $row['alert_show_98'] > 0)
|| ($row1['other'] == '-99' && $row['alert_show_99'] > 0)){
$missing_warning = ' red';
}
if ($row['tip'] == 1 && $row['orientation'] != 8 && $row['orientation'] != 10) {
- //echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'"><span class="sprites move_updown_orange inline inline_move" title="'.$lang['srv_move'].'"></span> <input type="radio" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" /> <label for="foo_' . $row1['id'] . '">' . $row1['naslov'] . '</label>';
+
if($row['orientation'] == 6){
- echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">
+ <span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>
+ <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div>
+ <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
elseif($row['orientation'] == 7){
- //echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span><div class="variable_inline variable_inline_'.$row['id'].'" contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false?' default="1"':'').'>' . $row1['naslov'] . '</div> <input type="radio" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" onclick="return false" />';
- echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span><div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+
+ echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span><div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
if ($row1['other'] == 1){
$otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1);
@@ -1997,44 +2850,62 @@ class Branching {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
if ($this->condition_check($row1['if_id']) != 0)
echo ' <span class="faicon warning icon-orange"></span>';
}
+
+ if($row1['other'] != 0 && $row1['other'] != 1){
+ echo ' <div class="missing_settings">
+ <div class="stamp_holder inline">
+ <span class="missing_stamp">'.$lang['srv_other_system'].$missing_values[$row1['other']].'</span>
+ </div>
+ <div class="missing_alert_holder inline" '.(($row['reminder'] > 0)?'':' style="display:none;"').'>
+ <form name="vprasanje_edit">
+ <input type="hidden" name="alert_show_'.abs($row1['other']).'_'.$row['id'].'" value="0" />
+ <input type="checkbox" id="alert_show_'.abs($row1['other']).'_'.$row['id'].'" name="alert_show_'.abs($row1['other']).'_'.$row['id'].'" value="1"
+ '.($row['alert_show_'.abs($row1['other'])]=='1'?' checked':'').'
+ onChange="vprasanje_save(true, '.$row['id'].');">
+ <label for="alert_show_'.abs($row1['other']).'_'.$row['id'].'" class="title"><span id="alert_show_'.abs($row1['other']).'_text">'.$lang['srv_alert_show_missing_general'].'</span> '.Help::display('srv_alert_show_general').'</label>
+ </form>
+ </div>
+ </div>';
+ }
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
if($row['tip'] == 1)
- echo ' <span class="faicon odg_if_follow inline inline_if_follow '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="follow_up_condition(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_follow_up'].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_no '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
-
+ echo ' <span class="faicon odg_if_follow inline inline_if_follow '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="follow_up_condition(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_follow_up'].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo '</div>';
echo '<input type="radio" class="enka-admin-custom" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" onclick="return false" />';
echo '<span class="enka-checkbox-radio"></span>';
- echo'</div>';
+ echo '</div>';
}
elseif($row['orientation'] == 9){
echo '<div class="variabla custom_radio ' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">
- <label>
<input type="radio" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" onclick="return false" />
- <span class="enka-custom-radio '.($spremenljivkaParams->get('customRadio') ? $spremenljivkaParams->get('customRadio') : '').'"></span>
+ <label><span class="enka-custom-radio '.($spremenljivkaParams->get('customRadio') ? $spremenljivkaParams->get('customRadio') : '').'"></span>
<div class="custom_radio_answer">('.$row1['naslov'].')</div>
</label>
</div>';
}
elseif( $row['orientation'] == 11){
-
+ //ali so smeskoti pobarvani ali samo sivi
+ $colored = ($spremenljivkaParams->get('visual_type') == 1 ? 'colored' : '');
$stVsehEnot = mysqli_num_rows($sql1);
//
echo '<div class="variabla custom_radio visual-radio-scale ' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">
<label>
<input type="radio" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" onclick="return false" />
- <span class="enka-vizualna-skala siv-'.$stVsehEnot.$row1['naslov'].'"></span>
+ <span class="enka-vizualna-skala siv-'.$stVsehEnot.$row1['naslov'].' '.$colored.'"></span>
<div class="custom_radio_answer">('.$row1['naslov'].')</div>
</label>
</div>';
@@ -2048,27 +2919,27 @@ class Branching {
echo ' <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div>';
// Ikona za upload slike
- echo ' <span class="sprites image_upload pointer" onclick="vrednost_insert_image(\''.$row1['id'].'\', false); return false;" title="'.$lang['upload_img2'].'"></span>';
+ echo ' <span class="faicon image_upload pointer" onclick="vrednost_insert_image(\''.$row1['id'].'\', false); return false;" title="'.$lang['upload_img2'].'"></span>';
// Slika oz. text (brez moznosti editiranja) - samo če je vnesen kaksen text ali slika
- echo ' <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
else{
echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
echo ' <span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <input type="radio" class="enka-admin-custom enka-inline" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" onclick="return false" /><span class="enka-checkbox-radio"></span>';
echo ' <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div>';
- echo ' <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
}
}
elseif ($row['tip'] == 2 && $row['orientation'] != 10) {
if($row['orientation'] == 6){
- echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
elseif($row['orientation'] == 7){
//echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id="'.$row1['id'].'" contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false?' default="1"':'').'>' . $row1['naslov'] . '</div><input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" ' . (($row['checkboxhide'] == 1) ? 'class="hidden" ' : '') . ' onclick="return false" />';
- echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id="'.$row1['id'].'" contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id="'.$row1['id'].'" contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
if ($row1['other'] == 1){
$otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1);
@@ -2084,7 +2955,7 @@ class Branching {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
@@ -2092,13 +2963,32 @@ class Branching {
echo ' <span class="faicon warning icon-orange"></span>';
}
+ if($row1['other'] != 0 && $row1['other'] != 1){
+ echo ' <div class="missing_settings">
+ <div class="stamp_holder inline">
+ <span class="missing_stamp">'.$lang['srv_other_system'].$missing_values[$row1['other']].'</span>
+ </div>
+ <div class="missing_alert_holder inline" '.(($row['reminder'] > 0)?'':' style="display:none;"').'>
+ <form name="vprasanje_edit">
+ <input type="hidden" name="alert_show_'.abs($row1['other']).'_'.$row['id'].'" value="0" />
+ <input type="checkbox" id="alert_show_'.abs($row1['other']).'_'.$row['id'].'" name="alert_show_'.abs($row1['other']).'_'.$row['id'].'" value="1"
+ '.($row['alert_show_'.abs($row1['other'])]=='1'?' checked':'').'
+ onChange="vprasanje_save(true, '.$row['id'].');">
+ <label for="alert_show_'.abs($row1['other']).'_'.$row['id'].'" class="title"><span id="alert_show_'.abs($row1['other']).'_text">'.$lang['srv_alert_show_missing_general'].'</span> '.Help::display('srv_alert_show_general').'</label>
+ </form>
+ </div>
+ </div>';
+ }
+
+ echo ' <div class="icons_holder">';
+
echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
if($row['tip'] == 1)
- echo ' <span class="faicon odg_if_follow inline inline_if_follow '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="follow_up_condition(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_follow_up'].'"></span>';
+ echo ' <span class="faicon odg_if_follow inline inline_if_follow '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="follow_up_condition(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_follow_up'].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
-
+ echo ' </div>';
echo'<input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="enka-admin-custom ' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onclick="return false" />';
echo '<span class="enka-checkbox-radio"></span>';
@@ -2113,19 +3003,19 @@ class Branching {
echo ' <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div>';
// Ikona za upload slike
- echo ' <span class="sprites image_upload pointer" onclick="vrednost_insert_image(\''.$row1['id'].'\', false); return false;" title="'.$lang['upload_img2'].'"></span>';
+ echo ' <span class="faicon image_upload pointer" onclick="vrednost_insert_image(\''.$row1['id'].'\', false); return false;" title="'.$lang['upload_img2'].'"></span>';
// Slika oz. text (brez moznosti editiranja) - samo če je vnesen kaksen text ali slika
- echo ' <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
else{
- echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="enka-admin-custom enka-inline' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onclick="return false" /><span class="enka-checkbox-radio"></span><div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id="'.$row1['id'].'" contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="enka-admin-custom enka-inline' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onclick="return false" /><span class="enka-checkbox-radio"></span><div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id="'.$row1['id'].'" contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline '.$missing_warning.'" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
}
}
elseif ($row['tip'] == 3) {
//echo ' <option value="">' . $row1['naslov'] . '</option>';
- echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
+ echo ' <div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'"><span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span> <div class="variable_inline variable_inline_'.$row['id'].'" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" vre_id='.$row1['id'].' tabindex="1">'.$row1['variable'].'</div><div id="vre_id_' . $row1['id'] . '" vre_id='.$row1['id'].' contenteditable="'.(!$locked?'true':'false').'" class="vrednost_inline" tabindex="1" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'] . '</div>';
}
@@ -2144,28 +3034,53 @@ class Branching {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
if ($this->condition_check($row1['if_id']) != 0)
echo ' <span class="faicon warning icon-orange"></span>';
}
+
+ if($row1['other'] != 0 && $row1['other'] != 1){
+ echo ' <div class="missing_settings">
+ <div class="stamp_holder inline">
+ <span class="missing_stamp">'.$lang['srv_other_system'].$missing_values[$row1['other']].'</span>
+ </div>';
+
+ //if($row['tip'] != 3) {
+ echo '<div class="missing_alert_holder inline" '.(($row['reminder'] > 0)?'':' style="display:none;"').'>
+ <form name="vprasanje_edit">
+ <input type="hidden" name="alert_show_'.abs($row1['other']).'_'.$row['id'].'" value="0" />
+ <input type="checkbox" id="alert_show_'.abs($row1['other']).'_'.$row['id'].'" name="alert_show_'.abs($row1['other']).'_'.$row['id'].'" value="1"
+ '.($row['alert_show_'.abs($row1['other'])]=='1'?' checked':'').'
+ onChange="vprasanje_save(true, '.$row['id'].');">
+ <label for="alert_show_'.abs($row1['other']).'_'.$row['id'].'" class="title"><span id="alert_show_'.abs($row1['other']).'_text">'.$lang['srv_alert_show_missing_general'].'</span> '.Help::display('srv_alert_show_general').'</label>
+ </form>
+ </div>';
+ //}
+
+ echo '</div>';
+ }
+
+
+ echo ' <div class="icons_holder">';
echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
// Kljukica za kviz
if(SurveyInfo::getInstance()->checkSurveyModule('quiz')){
- $sqlQ = sisplet_query("SELECT * FROM srv_quiz_vrednost WHERE spr_id='".$row['id']."' AND vre_id='".$row1['id']."'");
+ $sqlQ = sisplet_query("SELECT * FROM srv_quiz_vrednost WHERE spr_id='".$row['id']."' AND vre_id='".$row1['id']."'");
echo ' <span class="faicon correct inline '.(mysqli_num_rows($sqlQ) > 0 ? ' show-correct' : '').'" spr_id="'.$row['id'].'" vre_id="'.$row1['id'].'" title="'.$lang['srv_vrednost_correct'].'"></span>';
}
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
-
- if($row['tip'] == 1 || $row['tip'] == 2 || $row['tip'] == 3)
- echo ' <span class="faicon odg_if_follow inline inline_if_follow '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="follow_up_condition(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_follow_up'].'"></span>';
+
+ if($row['tip'] == 1 || $row['tip'] == 2 || $row['tip'] == 3)
+ echo ' <span class="faicon odg_if_follow inline inline_if_follow '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="follow_up_condition(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_follow_up'].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
echo '</div>';
@@ -2214,7 +3129,8 @@ class Branching {
echo '</div>';
}
}
- // multigrid, multicheckbox, multitext, multinumber prikaz
+
+ // multigrid, multicheckbox, multitext, multinumber prikaz
elseif ($row['tip'] == 6 || $row['tip'] == 16 || $row['tip'] == 19 || $row['tip'] == 20 || $row['tip'] == 24) {
$spremenljivkaParams = new enkaParameters($row['params']);
@@ -2259,7 +3175,44 @@ class Branching {
$sizebox = '$("#grids_count option:selected").val()';
$display = ($row['tip'] == 6 && $row['enota'] == 8) ? ' style="display:none;"' : '';
- $grid_plus_minus = '<div class="grid-plus-minus"><a href="#" onclick="change_selectbox_size_1(\'' . $row['id'] . '\', \'' . $lang['srv_select_box_vse'] . '\'); grid_plus_minus(\'1\'); return false;" title="'.$lang['srv_grid_add'].'"><span class="faicon add small '.$spremenljivka.'" '.$display.'></span></a> <a href="#" onclick="grid_plus_minus(\'0\'); return false;" title="'.$lang['srv_grid_remove'].'"><span class="faicon delete_circle"></span></a></div>';
+
+ #kateri missingi so nastavljeni
+ //ignoriraj pri testiranje->komentarji
+ if($_GET['a'] !== 'komentarji' && $_GET['a'] !== 'komentarji_anketa'){
+ $already_set_mv = array();
+ $sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_grid WHERE spr_id='".$spremenljivka."' AND other != 0");
+
+ while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
+ $already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov'];
+ }
+
+ $missing_menu_items = '';
+
+ if (count($missing_values) > 0) {
+ foreach ($missing_values AS $mv_key => $mv_text) {
+ $missing_menu_items =
+ '<li><input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').'
+ name="missing_value_checkbox_'.$row['id'].'[]" id="missing_value_'.$row['id'].'_'.$mv_key.'" value="'.$mv_key.'" title="'.$mv_text.'"
+ onChange="grid_add_remove_missing(this, '.$row['id'].');">
+ <label for="missing_value_'.$row['id'].'_'.$mv_key.'" class="pointer">'.$mv_text.'</label></li>'
+ .$missing_menu_items;
+ }
+ }
+
+ $grid_plus_minus = '<div class="grid-plus-minus">
+ <a href="#" onclick="change_selectbox_size_1(\'' . $row['id'] . '\', \'' . $lang['srv_select_box_vse'] . '\'); grid_plus_minus(\'1\'); return false;" title="'.$lang['srv_grid_add'].'"><span class="faicon add '.$spremenljivka.'" '.$display.'></span></a>
+ <a href="#" onclick="grid_plus_minus(\'0\'); return false;" title="'.$lang['srv_grid_remove'].'"><span class="faicon delete_circle"></span></a>
+ <a href="#" onclick="toggle_missing_dropdown_table('.$spremenljivka.'); return false;" title="'.$lang['srv_manjkajoce_vrednosti'].'"><span class="faicon fa-ellipsis-h"></span></a>
+ </div>
+ <div id="table_missings_menu_'.$spremenljivka.'" class="table_missings_menu">
+ <form name="vprasanje_edit">
+ <ul>
+ <li><strong>'.$lang['srv_manjkajoce_vrednosti'].' '.Help::display('srv_missing_values').'</strong></li>
+ '.$missing_menu_items.'
+ </ul></form></div>
+ ';
+ }
+ //konec missingov
//izrisemo multigride z dropdowni in select box
if($row['tip'] == 6 && ($row['enota'] == 2 || $row['enota'] == 6)) {
@@ -2310,7 +3263,7 @@ class Branching {
if ($naslov != '') $row2['naslov'] = $naslov;
}
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
}
@@ -2354,12 +3307,15 @@ class Branching {
echo '<tr class="variabla" id="variabla_'.$row1['id'].'">';
echo '<td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="f_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
if ($row1['if_id'] > 0) {
echo ' <span class="red" style="cursor:pointer" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">*</span>';
@@ -2382,7 +3338,7 @@ class Branching {
$sql2 = sisplet_query("SELECT id, naslov, vrstni_red FROM srv_grid WHERE spr_id='$row[id]' AND other=0 ORDER BY vrstni_red");
$row2 = mysqli_fetch_array($sql2);
- echo '<td class="preview_mode">';
+ echo '<td class="preview_mode" style="width: 320px;">';
if ($row['enota'] == 6){
echo '<select style="width: 100px;" multiple="">';
@@ -2502,7 +3458,7 @@ class Branching {
if ($naslov != '') $row2['naslov'] = $naslov;
}
if ($row2['vrstni_red'] == $i) {
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
} else {
echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
@@ -2544,12 +3500,15 @@ class Branching {
echo '<tr class="variabla" id="variabla_'.$row1['id'].'">';
echo '<td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="f_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost_grid'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
if ($row1['if_id'] > 0) {
echo ' <span class="red" style="cursor:pointer" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">*</span>';
@@ -2637,7 +3596,7 @@ class Branching {
echo ' <thead>';
- echo ' <tr>';
+ echo ' <tr class="row_subtitle">';
echo ' <td></td>';
echo ' <td style="width:' . $spacesize . '%"></td>';
@@ -2656,26 +3615,25 @@ class Branching {
}
// Urejanje podnaslova 1. grida
- echo ' <td class="grid_header" colspan="'.$colspan.'">';
- echo '<div class="grid_subtitle_inline" grid_id=1 contenteditable="'.(!$locked?'true':'false').'" grid_subtitle="grid_subtitle1">' . $row['grid_subtitle1'] . '</div>';
- echo '</td>';
+ echo ' <td class="grid_header" colspan="'.$colspan.'">';
+ echo ' <div class="grid_subtitle_inline" grid_id=1 contenteditable="'.(!$locked?'true':'false').'" grid_subtitle="grid_subtitle1">' . $row['grid_subtitle1'] . '</div>';
+ echo ' </td>';
- echo ' <td style="width:0px;"></td>';
+ echo ' <td class="spacer double no-border"></td>';
// Urejanje podnaslova 2. grida
- echo ' <td class="grid_header" colspan="'.$colspan.'">';
- echo '<div class="grid_subtitle_inline" grid_id=2 contenteditable="'.(!$locked?'true':'false').'" grid_subtitle="grid_subtitle2">' . $row['grid_subtitle2'] . '</div>';
- echo '</td>';
+ echo ' <td class="grid_header" colspan="'.$colspan.'">';
+ echo ' <div class="grid_subtitle_inline" grid_id=2 contenteditable="'.(!$locked?'true':'false').'" grid_subtitle="grid_subtitle2">' . $row['grid_subtitle2'] . '</div>';
+ echo ' </td>';
- echo '<td style="width:' . $spacesize*3 . '%"></td>';
+ echo ' <td style="width:' . $spacesize*3 . '%"></td>';
echo ' </tr>';
// urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
+ echo ' <tr id="grid_variable_'.$row['id'].'" class="row_variable_inline" '.$show_variable_row.'>';
echo ' <td></td>';
- //echo ' <td style="width:' . $spacesize . '%"></td>';
echo ' <td></td>';
$bg = 1;
@@ -2696,7 +3654,7 @@ class Branching {
}
}
- echo '<td style="width:' . $spacesize*3 . '%"></td>';
+ echo '<td class="spacer double no-border"></td>';
echo '</tr>';
@@ -2715,7 +3673,7 @@ class Branching {
if ($naslov != '') $row2['naslov'] = $naslov;
}
if ($row2['vrstni_red'] == $i) {
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
} else {
echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
@@ -2736,7 +3694,7 @@ class Branching {
}
}
- echo '<td style="width:0px; border-left: 1px black solid;"></td>';
+ echo '<td class="spacer double"></td>';
//DRUGI DEL GRIDA
//$sql2 = sisplet_query("SELECT naslov, vrstni_red FROM srv_grid WHERE spr_id='$row[id]' AND other=0 AND part='2' ORDER BY vrstni_red");
@@ -2802,12 +3760,15 @@ class Branching {
echo ' <tr class="variabla" id="variabla_'.$row1['id'].'">';
echo ' <td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="f_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
+
+ echo ' <div class="icons_holder">';
echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost_grid'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
if ($row1['if_id'] > 0) {
echo ' <span class="red" style="cursor:pointer" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">*</span>';
@@ -2856,7 +3817,7 @@ class Branching {
}
}
- echo '<td style="width:1%; border-left: 1px black solid;"></td>';
+ echo '<td class="spacer double"></td>';
//DRUGI DEL GRIDA
//razlicni vnosi glede na tip multigrida
@@ -2908,7 +3869,7 @@ class Branching {
echo ' <table class="grid_header_table '.($this->lang_id==null?'allow_new':'').'">';
// urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
+ echo ' <tr id="grid_variable_'.$row['id'].'" class="row_variable_inline" '.$show_variable_row.'>';
echo ' <td></td>';
$bg = 1;
@@ -2945,10 +3906,10 @@ class Branching {
echo ' <td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon delete small inline inline_delete right8" title="'.$lang['srv_brisivrednost'].'"></span>';
//levi stolpec možnosti
- echo '<div style="text-align:right;" id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div style="text-align:right;" id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost_grid'])!==false || (isset($lang1['srv_new_vrednost_grid']) && strpos($row1['naslov'], $lang1['srv_new_vrednost_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
if ($row1['if_id'] > 0) {
echo ' <span class="red" style="cursor:pointer" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">*</span>';
@@ -2996,7 +3957,7 @@ class Branching {
// desni stolpec možnosti, predelani bivši diferencial
- echo ' <td style="text-align:left;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="f_'.$row1['id'].'_2"><div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'_2" '.(strpos($row1['naslov2'], $lang['srv_new_vrednost'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '</div></td>';
+ echo ' <td style="text-align:left;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="f_'.$row1['id'].'_2"><div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'_2" '.(strpos($row1['naslov2'], $lang['srv_new_vrednost_grid'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '</div></td>';
// Zadnja bela celica kjer se nahajajo ikone za mouseover
echo '<td class="white" style="min-width:20px;"></td>';
@@ -3017,7 +3978,7 @@ class Branching {
echo ' <thead>'; //začetek glave oz. naslovne vrstice tabele
// urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
+ echo ' <tr id="grid_variable_'.$row['id'].'" class="row_variable_inline" '.$show_variable_row.'>';
$bg = 1;
@@ -3046,11 +4007,11 @@ class Branching {
}
if ($row2['vrstni_red'] == $i) {
- //echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ //echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
$label_text = ($row2['id'] % 2 == 0 ? $lang['srv_maxdiff_label1'] : $lang['srv_maxdiff_label2']);
//ce je default besedilo "Vpišite besedilo" spremeni labelo v "Najmanj pomemben" in "Najbolj pomemben", drugace pokazi v labelah, kar je v bazi
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'"'.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . ($row2['naslov'] == $lang['srv_new_grid'] ? $label_text : $row2['naslov']) . '</div></td>';
+ echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'"'.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . ($row2['naslov'] == $lang['srv_new_grid'] ? $label_text : $row2['naslov']) . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
echo '<td></td>';
@@ -3072,6 +4033,7 @@ class Branching {
echo '<td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row_grid_mv['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row_grid_mv['id'].'" '.(strpos($row_grid_mv['naslov'], $lang['srv_new_grid'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row_grid_mv['naslov'] . '</div></td>';
}
}
+
echo ' </tr>';
echo '</thead>'; //konec glave oz. naslovne vrstice tabele
@@ -3099,15 +4061,20 @@ class Branching {
//sredinski del z besedilom
echo ' <td style="text-align:center;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
+
+ echo ' <div class="icons_holder">';
echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+ //ce je other, ga izrisi drugace
+ $style = ($row1['other'] == 1) ? 'style="flex-grow: 0;margin-left: auto;"' : '';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" '.$style.' contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost_grid'])!==false || (isset($lang1['srv_new_vrednost_grid']) && strpos($row1['naslov'], $lang1['srv_new_vrednost_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
- if ($row1['if_id'] > 0) {
+ if (isset($row1['if_id']) && $row1['if_id'] > 0) {
echo ' <span class="red" style="cursor:pointer" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">*</span>';
if ($this->condition_check($row1['if_id']) != 0)
echo ' <span class="faicon warning icon-orange"></span>';
@@ -3118,9 +4085,9 @@ class Branching {
$otherHeight = ($spremenljivkaParams->get('otherHeight') ? $spremenljivkaParams->get('otherHeight') : 1);
if ($otherHeight > 1)
- echo '<textarea name="" rows="'.$otherHeight.'" style="max-width:50%; '.($otherWidth != -1 ? ' width:'.$otherWidth.'%;' : '').'" disabled="disabled"></textarea>';
+ echo '<textarea name="" rows="'.$otherHeight.'" style="margin-right:auto; max-width:50%; '.($otherWidth != -1 ? ' width:'.$otherWidth.'%;' : '').'" disabled="disabled"></textarea>';
else
- echo '<input type="text" name="" value="" style="max-width:50%; '.($otherWidth != -1 ? ' width:'.$otherWidth.'%;' : '').'" disabled="disabled" />';
+ echo '<input type="text" name="" value="" style="margin-right:auto; max-width:50%; '.($otherWidth != -1 ? ' width:'.$otherWidth.'%;' : '').'" disabled="disabled" />';
}
echo '</td>';
@@ -3129,6 +4096,9 @@ class Branching {
// desni del radio button
echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="radio" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value="" data-col="2"/><span class="enka-checkbox-radio"></span></td>';
+ //zadnji stolpec za ikone
+ echo '<td style="width:80px;"></td>';
+
//urejanje navpicnega dela grupiranja radio button - vodoravni je urejen po defaultu s pomočjo atributa name
echo'
<script>
@@ -3186,8 +4156,11 @@ class Branching {
$num = mysqli_num_rows($sql1);
$size = $num * 50;
+
+ echo '<div class="ranking_holder">';
+
//zaslon razdelimo na dva dela - izris leve strani
- echo '<div id="half" class="dropzone '.($this->lang_id==null?'allow_new':'').'" style="width: 50%; min-height:' . $size . 'px; float: left; border-right: 1px solid black;">';
+ echo '<div id="half" class="dropzone '.($this->lang_id==null?'allow_new':'').'">';
while ($row1 = mysqli_fetch_array($sql1)) {
@@ -3214,38 +4187,48 @@ class Branching {
if ($length > 30) $class = 'ranking_long'; $class = 'ranking';
- //echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
+
echo '<div class="variabla" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
+
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+
+
+
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" style="float:none" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
+
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
-
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" style="float:none" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
- //koda za notranji IF
+ echo ' </div>';
+
+ // koda za notranji IF
if ($row1['if_id'] > 0) {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
if ($this->condition_check($row1['if_id']) != 0)
echo ' <span class="faicon warning icon-orange"></span>';
}
- echo '</div>';
+ echo '</div>';
}
+
echo '</div>';
+
//izris desne strani**************************************************************************************
//***********za skatlasto obliko
$display_drag_and_drop_new_look = ($spremenljivkaParams->get('display_drag_and_drop_new_look') ? $spremenljivkaParams->get('display_drag_and_drop_new_look') : 0); //za checkbox
//***********za skatlasto obliko - konec
- echo '<div id="half2" class="dropzone" style="width: 49%; min-height:' . $size . 'px; float: right;">';
+ echo '<div id="half2" class="dropzone">';
$sql2 = sisplet_query("SELECT id, naslov, variable, vrstni_red FROM srv_grid WHERE spr_id='$spremenljivka' AND other=0 ORDER BY vrstni_red");
$row2 = mysqli_fetch_array($sql2);
@@ -3265,7 +4248,7 @@ class Branching {
</li>'."\n"; //izpis "oznake" okvirja
if($display_drag_and_drop_new_look == 0){
echo '<li>
- <div class="grid_inline_droppable_title grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div>
+ <div class="grid_inline_droppable_title grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div>
</li>'."\n"; //izpis "naslova" okvirja
echo '<li>
<div class="dragdrop_frame_grid"></div>
@@ -3275,7 +4258,7 @@ class Branching {
<div class="dragdrop_frame_grid_box"></div>
</li>'."\n"; //izpis okvirja
echo '<li>
- <div class="grid_inline_droppable_title_box grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div>
+ <div class="grid_inline_droppable_title_box grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div>
</li>'."\n"; //izpis "naslova" okvirja
}
@@ -3314,12 +4297,11 @@ class Branching {
echo '</ul>';
- echo '</div>'; //half2_$spremenljivka
+ echo '</div>'; // half2_$spremenljivka
- echo '<div class="clr"></div>';
+ echo '</div>'; // end ranking_holder;
//***********************Drag and drop grid konec*************************************************************
-
}
//Image hot spot********************************************************************************************************
elseif( ($row['tip'] == 6) && $row['enota'] == 10){ //image hot spot
@@ -3339,10 +4321,10 @@ class Branching {
elseif($row['num_useMax'] == 1)
$limit = '(max '.$row['vsota_limit'].')';
else
- $limit = '';
+ $limit = $lang['srv_number_text'];
if ($row['vsota_show'] == 1 && $limit != '') {
- echo '<span style="color: red;">'.$limit.'</span>';
+ echo '<span class="left16" style="color: red;">'.$limit.'</span>';
}
}
@@ -3377,6 +4359,9 @@ class Branching {
//********************** za izris traku - konec
+ $sliderTableStyle = "";
+ $sliderTableColspan = "";
+
if ($row['tip'] == 20) { //ce je tabela s stevili
if ($row['ranking_k'] == 1){ //ce so stevila v obliki drsnikov
$slider_handle = ($spremenljivkaParams->get('slider_handle') ? $spremenljivkaParams->get('slider_handle') : 0);
@@ -3439,31 +4424,20 @@ class Branching {
}
}
- }else{
- $sliderTableStyle = "";
- $sliderTableColspan = "";
}
- echo ' <table '.$sliderTableStyle.' class="grid_header_table '.($this->lang_id==null?'allow_new':'').'">';
- echo ' <thead>';
-
-
- //vrstica z nadnaslovi ###################################################################################
- echo ' <thead>';
-
-
- //vrstica z nadnaslovi
- echo '<tr '.$display_trak_num_of_titles.' class="display_trak_num_of_titles_'.$row['id'].'">';
+ echo ' <table '.$sliderTableStyle.' class="grid_header_table '.($this->lang_id==null?'allow_new':'').'">';
+ echo ' <thead>';
+ // vrstica z nadnaslovi
+ echo '<tr '.$display_trak_num_of_titles.' class="row_subtitle display_trak_num_of_titles_'.$row['id'].'">';
echo ' <td></td>';
echo ' <td></td>';
-
for ($j = 1; $j <= $row['grids']; $j++) {
- //echo '<td>'.$j.'</td>';
if($j == 1){
$nadnaslov_floating = 'left';
}
@@ -3474,14 +4448,15 @@ class Branching {
$nadnaslov_floating = 'none';
}
- echo '<td class="trak_inline_nadnaslov" grd="g_'.$j.'" ><div grid="'.$j.'" id="trak_nadnaslov_'.$j.'_'.$spremenljivka.'" name="trak_nadnaslov_'.$j.'" class="trak_inline_nadnaslov" style="float:'.$nadnaslov_floating.'; display:inline" contenteditable="'.(!$locked?'true':'false').'" '.(strpos($trak_nadnaslov[$j], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $trak_nadnaslov[$j] . '</div></td>';
+ if(isset($trak_nadnaslov[$j]))
+ echo '<td class="trak_inline_nadnaslov" grd="g_'.$j.'" ><div grid="'.$j.'" id="trak_nadnaslov_'.$j.'_'.$spremenljivka.'" name="trak_nadnaslov_'.$j.'" class="trak_inline_nadnaslov" style="float:'.$nadnaslov_floating.'; display:inline" contenteditable="'.(!$locked?'true':'false').'" '.(strpos($trak_nadnaslov[$j], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $trak_nadnaslov[$j] . '</div></td>';
}
echo '</tr>';
-
//vrstica z nadnaslovi - konec ###################################################################################
+
// urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
+ echo ' <tr id="grid_variable_'.$row['id'].'" class="row_variable_inline" '.$show_variable_row.'>';
echo ' <td></td>';
echo ' <td></td>';
@@ -3520,7 +4495,7 @@ class Branching {
if ($naslov != '') $row2['naslov'] = $naslov;
}
if ($row2['vrstni_red'] == $i) {
- echo ' <td '.$sliderTableColspan.' class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline '.$trak_class_input.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ echo ' <td '.$sliderTableColspan.' class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline '.$trak_class_input.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
} else {
echo ' <td '.$sliderTableColspan.' class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
@@ -3632,14 +4607,9 @@ class Branching {
echo ' <tr class="variabla" '.$style.' id="variabla_'.$row1['id'].'">';
echo ' <td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
if($row['enota'] != 9){
-
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.((isset($lang1['srv_new_vrednost_grid']) && strpos($row1['naslov'], $lang1['srv_new_vrednost_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
}
if ($row1['if_id'] > 0) {
@@ -3691,15 +4661,14 @@ class Branching {
echo '</td>';
}
- } elseif($row['tip'] == 16) {
+ }
+ elseif($row['tip'] == 16) {
echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="checkbox" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value="" /><span class="enka-checkbox-radio"></span></td>';
-
- } elseif ($row['tip'] == 19) {
- echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><textarea style="width:'.$taWidth.'em; height:'.($taHeight*12).'px" name="foo_' . $row1['id'] . '"></textarea></td>';
-
- } elseif ($row['tip'] == 20) {
-
- //echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="text" style="width:'.$taWidth.'em;" name="foo_' . $row1['id'] . '" value="" />';
+ }
+ elseif ($row['tip'] == 19) {
+ echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><textarea style="width:'.$taWidth.'em;" rows="'.$taHeight.'" name="foo_' . $row1['id'] . '"></textarea></td>';
+ }
+ elseif ($row['tip'] == 20) {
if ($row['ranking_k'] == 1) { //ce je slider
@@ -3720,6 +4689,7 @@ class Branching {
//za custom opisne labele
//moznosti urejanja opisnih label drsnika
+ $slider_CustomDescriptiveLabels = '';
if($slider_VmesneDescrLabel){
for($i=1; $i<=$slider_NumofDescrLabels; $i++){
if($prevajanje == false){
@@ -3731,7 +4701,8 @@ class Branching {
$slider_CustomDescriptiveLabelsTmp = preg_replace("/\s|&nbsp;/",' ',$slider_CustomDescriptiveLabelsTmp); //za odstranitev morebitnih presledkov, ki lahko delajo tezave pri polju za drsnik
if($i == 1){
$slider_CustomDescriptiveLabels = $slider_CustomDescriptiveLabelsTmp;
- }else{
+ }
+ else{
$slider_CustomDescriptiveLabels .= "; ".$slider_CustomDescriptiveLabelsTmp;
}
}
@@ -3756,17 +4727,18 @@ class Branching {
</script>
<?
}
+
//Zadnja bela celica kjer se nahajajo ikone za mouseover, ko je slider
if($slider_VmesneDescrLabel){
$mouseOverStyle = '';
- }else{
+ }
+ else{
$mouseOverStyle = 'style="min-width:80px;"';
}
- echo '<td class="white" '.$mouseOverStyle.'></td>';
- //echo ' </tr>';
- //Zadnja bela celica kjer se nahajajo ikone za mouseover, ko je slider - konec
-
- }else{
+
+ echo '<td class="white" '.$mouseOverStyle.'></td>';
+ }
+ else{
echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="text" style="width:'.$taWidth.'em;" name="foo_' . $row1['id'] . '" value="" />';
}
@@ -3796,12 +4768,21 @@ class Branching {
// diferencial
if ($row['enota'] == 1 && $row['tip'] == 6) {
echo ' <td></td>';
- echo ' <td style="text-align:left;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="f_'.$row1['id'].'_2"><div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'_2" '.(strpos($row1['naslov2'], $lang['srv_new_vrednost'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '</div></td>';
+ echo ' <td style="text-align:left;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="f_'.$row1['id'].'_2"><div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'_2" '.(strpos($row1['naslov2'], $lang['srv_new_vrednost_grid'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '</div></td>';
}
if ($row['ranking_k'] != 1) { //ce ni slider
// Zadnja bela celica kjer se nahajajo ikone za mouseover
- echo '<td class="white" style="min-width:80px;"></td>';
+ echo '<td class="white" style="min-width:84px; padding-left:0;">';
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit" style="margin-left:0;"></span>';
+ echo ' </div>';
+
+ echo ' </td>';
echo ' </tr>';
}
@@ -3896,8 +4877,11 @@ class Branching {
//ce je drsnik in moramo urediti opisne labele - konec ##################################################
}
- // textbox -- not any more
- } elseif ($row['tip'] == 4) {
+
+ // textbox -- not any more
+ }
+
+ elseif ($row['tip'] == 4) {
$taSize = ($spremenljivkaParams->get('taSize') ? $spremenljivkaParams->get('taSize') : 1);
$taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
@@ -3924,7 +4908,7 @@ class Branching {
// textbox*
elseif ($row['tip'] == 21) {
- if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit'])
+ if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit'])
$limit = '('.$lang['srv_text_length_char_num'].$row['vsota_min'].')';
elseif($row['num_useMin'] == 1 && $row['num_useMax'] == 1)
$limit = '('.$lang['srv_text_length_char_num'].'min '.$row['vsota_min'].', max '.$row['vsota_limit'].')';
@@ -3941,9 +4925,7 @@ class Branching {
if($taWidth == -1)
$taWidth = 30;
- echo '<table class="text_vrednost" style="width: 100%; text-align: left">';
- if($row['orientation'] != 3)
- echo '<tr>';
+ echo '<div class="text_vrednost orientation_'.$row['orientation'].'">';
$_others = array();
$sql1 = sisplet_query("SELECT id, naslov, variable, size, other, hidden, naslov2 FROM srv_vrednost WHERE spr_id='$row[id]' AND vrstni_red > 0 ORDER BY vrstni_red");
@@ -3951,77 +4933,102 @@ class Branching {
if ((int)$row1['other'] == 0) {
- // sirina celice td
- $cell = $row['text_kosov'] == 1 ? 100 : $row1['size'] ;
+ // sirina celice
+ $cell_width = $row['text_kosov'] > 0 ? 100 / $row['text_kosov'] : 100;
+
+ echo '<div id="f_'.$row1['id'].'" class="grid_question position_'.$row['text_orientation'].' '.($row['text_kosov'] > 1 ? 'multiple' : '').'" style="width:'.$cell_width.'%">';
+
// sirina vnosnega polja
$input = $taWidth;
- if($row['orientation'] == 3)
- echo '<tr>';
- echo '<td class="grid_question" style="width: '.$cell.'%; text-align:left" id="f_'.$row1['id'].'">';
+ if ($this->lang_id != null) {
+ save('lang_id', $this->lang_id);
+ $naslov = \App\Controllers\LanguageController::getInstance()->srv_language_vrednost($row1['id']);
+ if ($naslov != '') $row1['naslov'] = $naslov;
+ }
+
+ // Polje za enoto
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
- if($row['text_orientation'] == 1 || $row['text_orientation'] == 3){
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" style="float:none; display:inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
- if ($row['text_orientation'] == 3)
- echo '<br />';
- }
if ($taSize > 1)
- echo '<textarea id="txt_f_' .$row1['id'] .'" vre_id="'.$row1['id'].'_2" name="foo_' . $row['id'] . '" rows="' . $taSize . '" style="width: ' . $input . '%; margin-left:15px" ' .($locked?'disabled="disabled" ':' class="textfield_editable" contenteditable="true" ETF="true"') .'>' .$row1['naslov2'] .'</textarea>';
+ echo '<textarea id="txt_f_' .$row1['id'] .'" vre_id="'.$row1['id'].'_2" name="foo_' . $row['id'] . '" rows="' . $taSize . '" style="width: ' . $input . '%;" ' .($locked?'disabled="disabled" ':' class="textfield_editable" contenteditable="true" ETF="true"') .'>' .$row1['naslov2'] .'</textarea>';
else
- echo '<input id="txt_f_' .$row1['id'] .'" vre_id="'.$row1['id'].'_2" type="text" style="width: ' . $input . '%; margin-left:15px" ' .($locked?'disabled="disabled" ':' class="textfield_editable" contenteditable="true" ETF="true"') .' value="' .$row1['naslov2'] .'" />';
-
- if($row['text_orientation'] == 2){
- echo '<br /><div id="vre_id_'.$row1['id'].'" class="vrednost_inline" style="float:none; display:inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
- }
- echo '</td>';
- if($row['orientation'] == 3)
- echo '</tr>';
+ echo '<input id="txt_f_' .$row1['id'] .'" vre_id="'.$row1['id'].'_2" type="text" style="width: ' . $input . '%;" ' .($locked?'disabled="disabled" ':' class="textfield_editable" contenteditable="true" ETF="true"') .' value="' .$row1['naslov2'] .'" />';
+
+ echo '</div>';
}
else {
# imamo opcijo drugo prikažemo kot checkbox
$_others[] = $row1;
}
}
- if($row['orientation'] != 3)
- echo '</tr>';
- echo '</table>';
+
+ echo '</div>';
+
- if ($row['vsota_show'] == 1 && $limit != '')
- echo '<span id="variabla_limit_'.$spremenljivka.'" class="variabla_limit '.$cssFloat.'" style="padding: 0 15px 0 10px;">'.$limit.'</span>';
+ if ($row['vsota_show'] == 1 && $limit != '')
+ echo '<div id="variabla_limit_'.$spremenljivka.'" class="variabla_limit">'.$limit.'</div>';
if (count($_others)> 0 ) {
+
+ echo '<div class="text_vrednost_missing">';
+
foreach ($_others AS $oKey => $_other) {
- if ($this->lang_id != null) {
- save('lang_id', $this->lang_id);
- $naslov = \App\Controllers\LanguageController::getInstance()->srv_language_vrednost($_other['id']);
- if ($naslov != '') $_other['naslov'] = $naslov;
- }
-
- // Ce je variabla ne vem in imamo vklopljen prikaz ob opozorilu -> rdec
- $missing_warning = '';
- if(($_other['variable'] == '-97' && $row['alert_show_97'] > 0)
- || ($_other['variable'] == '-98' && $row['alert_show_98'] > 0)
- || ($_other['variable'] == '-99' && $row['alert_show_99'] > 0)){
- $missing_warning = ' red';
- }
+ if ($this->lang_id != null) {
+ save('lang_id', $this->lang_id);
+ $naslov = \App\Controllers\LanguageController::getInstance()->srv_language_vrednost($_other['id']);
+ if ($naslov != '') $_other['naslov'] = $naslov;
+ }
+
+ // Ce je variabla ne vem in imamo vklopljen prikaz ob opozorilu -> rdec
+ $missing_warning = '';
+ if(($_other['variable'] == '-97' && $row['alert_show_97'] > 0)
+ || ($_other['variable'] == '-98' && $row['alert_show_98'] > 0)
+ || ($_other['variable'] == '-99' && $row['alert_show_99'] > 0)){
+ $missing_warning = ' red';
+ }
- echo '<div class="variabla' . $cssFloat . '" id="variabla_'.$_other['id'].'" other="'.$_other['other'].'">';
- echo ' <input type="checkbox" name="foo_' . $_other['id'] . '" id="foo_' . $_other['id'] . '" value="" class="' . (($_other['checkboxhide'] == 1) ? 'hidden' : '') . '" onClick="return false;"/>';
- echo '<div id="vre_id_'.$_other['id'].'" class="vrednost_inline '.$missing_warning.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$_other['id'].'">' . $_other['naslov'] . '</div>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo '<div class="variabla' . $cssFloat . '" id="variabla_'.$_other['id'].'" other="'.$_other['other'].'">';
+ echo ' <input type="checkbox" name="foo_' . $_other['id'] . '" id="foo_' . $_other['id'] . '" value="" class="enka-admin-custom ' . ((isset($_other['checkboxhide']) && $_other['checkboxhide'] == 1) ? 'hidden' : '') . '" onClick="return false;"/>';
+ echo '<span class="enka-checkbox-radio "></span>';
+ echo '<div id="vre_id_'.$_other['id'].'" class="vrednost_inline '.$missing_warning.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$_other['id'].'">' . $_other['naslov'] . '</div>';
+
+ if($_other['other'] != 0 && $_other['other'] != 1){
+ echo ' <div class="missing_settings">
+ <div class="stamp_holder inline">
+ <span class="missing_stamp">'.$lang['srv_other_system'].$missing_values[$_other['other']].'</span>
+ </div>
+ <div class="missing_alert_holder inline" '.(($row['reminder'] > 0)?'':' style="display:none;"').'>
+ <form name="vprasanje_edit">
+ <input type="hidden" name="alert_show_'.abs($_other['other']).'_'.$spremenljivka.'" value="0" />
+ <input type="checkbox" id="alert_show_'.abs($_other['other']).'_'.$spremenljivka.'" name="alert_show_'.abs($_other['other']).'_'.$spremenljivka.'" value="1"
+ '.($row['alert_show_'.abs($_other['other'])]=='1'?' checked':'').'
+ onChange="vprasanje_save(true, '.$spremenljivka.');">
+ <label for="alert_show_'.abs($_other['other']).'_'.$spremenljivka.'" class="title"><span id="alert_show_'.abs($_other['other']).'_text">'.$lang['srv_alert_show_missing_general'].'</span> '.Help::display('srv_alert_show_general').'</label>
+ </form>
+ </div>
+ </div>';
+ }
- echo '</div>';
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($_other['hidden'] == 1) ? 'show-hidden' : '').(($_other['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$_other['hidden'].'" odg_id="'.$_other['id'].'" title="'.$lang['srv_hide-disable_answer-'.$_other['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$_other['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+ echo '</div>';
}
+
+ echo '</div>';
}
+
+ $this->missings_menu($spremenljivka);
}
// number
- elseif ($row['tip'] == 7) {
+ elseif ($row['tip'] == 7) {
if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit'])
$limit = '('.$row['vsota_min'].')';
@@ -4052,20 +5059,19 @@ class Branching {
if($taWidth == -1)
$taWidth = 10;
- $cssFloat = ' floatLeft';
-
$sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE spr_id='$row[id]' AND other = 0 ");
$row1 = mysqli_fetch_array($sql1);
$sqlOther = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$row[id]' AND vrstni_red>0 AND other != 0");
$num_other = mysqli_num_rows($sqlOther);
- $num_all = $num_other+$row['size'];
- $cell_width = 'width:'.(80/$num_all).'% ';
if ( $row['ranking_k'] == '0' ) {
- echo '<div class="variabla' . $cssFloat . '" style="'.$cell_width.'clear:none" id="variabla_'.$row1['id'].'">';
+ echo '<div class="number_vrednost enota_'.$row['enota'].'">';
+
+
+ echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
if ($this->lang_id != null) {
save('lang_id', $this->lang_id);
@@ -4074,28 +5080,24 @@ class Branching {
}
if($row['enota'] == 1)
- echo ' <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" style="float:none; display:inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '</div>
- <input type="text" name="foo_' . $row['id'] . '" style="width: '.$taWidth.'em; float:none" id="foo_'.$row1['id'].'">';
+ echo ' <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '</div>
+ <input type="text" name="foo_' . $row['id'] . '" style="width:'.$taWidth.'em;" id="foo_'.$row1['id'].'">';
elseif($row['enota'] == 2)
- echo ' <input type="text" name="foo_' . $row['id'] . '" style="width: '.$taWidth.'em; float:none" id="foo_'.$row1['id'].'" > <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" style="float:none; display:inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null?' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo ' <input type="text" name="foo_' . $row['id'] . '" style="width:'.$taWidth.'em;" id="foo_'.$row1['id'].'" > <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null?' default="1"':'').'>' . $row1['naslov'].'</div>';
else
- echo ' <input type="text" name="foo_' . $row['id'] . '" style="width: '.$taWidth.'em; float:none" id="foo_'.$row1['id'].'" >';
- echo '</div>';
+ echo ' <input type="text" name="foo_' . $row['id'] . '" style="width:'.$taWidth.'em;" id="foo_'.$row1['id'].'" >';
+
+ echo '</div>';
+
// Omejitev vnosa
- if ($row['orientacija'] == 1) {
- echo '<div class="clr">ccc</div>';
- $cssFloat = '';
- }else {
- $cssFloat = ' floatLeft';
- }
if ($row['vsota_show'] == 1 && $limit != '') {
- echo '<span id="variabla_limit_'.$spremenljivka.'" class="variabla_limit '.$cssFloat.'" style="padding: 0 15px 0 10px;">'.$limit.'</span>';
- } elseif($row['size'] != 2 && $limit == '') {
- echo '<span id="variabla_limit_'.$spremenljivka.'" class="variabla_limit '.$cssFloat.' editingOnly" style="padding-left: 10px;">'.$lang['srv_number_text'].'</span>';
+ echo '<div id="variabla_limit_'.$spremenljivka.'" class="variabla_limit">'.$limit.'</div>';
+ }
+ elseif($row['size'] != 2 && $limit == '') {
+ echo '<div id="variabla_limit_'.$spremenljivka.'" class="variabla_limit editingOnly">'.$lang['srv_number_text'].'</div>';
}
- $cssFloat = ' floatLeft';
if ($row['size'] == 2) {
@@ -4107,35 +5109,32 @@ class Branching {
if ($naslov != '') $row1['naslov'] = $naslov;
}
- echo '<div class="variabla' . $cssFloat . '" style="width:'.$cell_width.'% !important; clear:none" id="variabla_'.$row1['id'].'">';
+ echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
if($row['enota'] == 1){
if($taWidth > 40)
echo '<br />';
- echo ' <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" style="float:none; display:inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '</div>
- <input type="text" name="foo_' . $row['id'] . '" style="width: '.$taWidth.'em; float:none" id="foo_'.$row1['id'].'">';
+ echo ' <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov'] . '</div>
+ <input type="text" name="foo_' . $row['id'] . '" style="width:'.$taWidth.'em;" id="foo_'.$row1['id'].'">';
}
elseif($row['enota'] == 2)
- echo ' <input type="text" name="foo_' . $row['id'] . '" style="width: '.$taWidth.'em; float:none" id="foo_'.$row1['id'].'"> <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" style="float:none; display:inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo ' <input type="text" name="foo_' . $row['id'] . '" style="width:'.$taWidth.'em;" id="foo_'.$row1['id'].'"> <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov'].'</div>';
else
- echo ' <input type="text" name="foo_' . $row['id'] . '" style="width: '.$taWidth.'em; float:none" id="foo_'.$row1['id'].'">';
+ echo ' <input type="text" name="foo_' . $row['id'] . '" style="width:'.$taWidth.'em;" id="foo_'.$row1['id'].'">';
echo '</div>';
- //Omejitev vnosa
- if ($row['orientacija'] == 1) {
- echo '<div class="clr">ccc</div>';
- $cssFloat = '';
- }else {
- $cssFloat = ' floatLeft';
- }
+ // Omejitev vnosa
if ($row['vsota_show'] == 1 && $limit2 != '') {
- echo '<span id="variabla_limit_'.$spremenljivka.'" class="variabla_limit '.$cssFloat.'" style="padding-left: 10px;">'.$limit2.'</span>';
- } elseif($limit == '' && $limit2 == '') {
- echo '<span id="variabla_limit_'.$spremenljivka.'" class="variabla_limit '.$cssFloat.' editingOnly" style="padding-left: 10px;">'.$lang['srv_number_text'].'</span>';
+ echo '<div id="variabla_limit_'.$spremenljivka.'" class="variabla_limit">'.$limit2.'</div>';
+ }
+ elseif($limit == '' && $limit2 == '') {
+ echo '<div id="variabla_limit_'.$spremenljivka.'" class="variabla_limit editingOnly">'.$lang['srv_number_text'].'</div>';
}
}
- }//ranking_k == 0
-
+ echo '</div>';
+ }
+
+ //ranking_k == 0
if ( $row['ranking_k'] == '1' ) {
echo '<div id="variabla_'.$row1['id'].'">';
@@ -4222,18 +5221,21 @@ class Branching {
//za custom opisne labele
//moznosti urejanja opisnih label drsnika
+ $slider_CustomDescriptiveLabels = '';
if($slider_VmesneDescrLabel){
for($i=1; $i<=$slider_NumofDescrLabels; $i++){
if($prevajanje == false){
$slider_CustomDescriptiveLabelsTmp = ($spremenljivkaParams->get('slider_Labela_opisna_'.$i) ? $spremenljivkaParams->get('slider_Labela_opisna_'.$i) : '');
- }else if ($prevajanje == true){
+ }
+ else if ($prevajanje == true){
$slider_CustomDescriptiveLabelsTmp = $custom_ar[$i-1];
}
$slider_CustomDescriptiveLabelsTmp = preg_replace("/\s|&nbsp;/",' ',$slider_CustomDescriptiveLabelsTmp); //za odstranitev morebitnih presledkov, ki lahko delajo tezave pri polju za drsnik
if($i == 1){
$slider_CustomDescriptiveLabels = $slider_CustomDescriptiveLabelsTmp;
- }else{
+ }
+ else{
$slider_CustomDescriptiveLabels .= "; ".$slider_CustomDescriptiveLabelsTmp;
}
}
@@ -4259,10 +5261,8 @@ class Branching {
</script>
<?
}
- echo '<br />';
- echo '<br />';
- echo '<br />';
-
+
+
//tabela za labele podrocij in podrocja
echo '<table '.$display_labele_podrocij.' style="width:85%">';
@@ -4380,14 +5380,37 @@ class Branching {
$missing_warning = ' red';
}
- echo '<div class="variabla' . $cssFloat . '" style="'.$cell_width.'" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
- echo '<input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onClick="return false;"/>';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$missing_warning.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'">' . $row1['naslov'] . '</div>';
+ echo '<div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
+ echo '<input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="enka-admin-custom ' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onClick="return false;"/>';
+ echo '<span class="enka-checkbox-radio "></span>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$missing_warning.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'">' . $row1['naslov'] . '</div>';
+
+ if($row1['other'] != 0 && $row1['other'] != 1){
+ echo ' <div class="missing_settings">
+ <div class="stamp_holder inline">
+ <span class="missing_stamp">'.$lang['srv_other_system'].$missing_values[$row1['other']].'</span>
+ </div>
+ <div class="missing_alert_holder inline" '.(($row['reminder'] > 0)?'':' style="display:none;"').'>
+ <form name="vprasanje_edit">
+ <input type="hidden" name="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" value="0" />
+ <input type="checkbox" id="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" name="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" value="1"
+ '.($row['alert_show_'.abs($row1['other'])]=='1'?' checked':'').'
+ onChange="vprasanje_save(true, '.$spremenljivka.');">
+ <label for="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" class="title"><span id="alert_show_'.abs($row1['other']).'_text">'.$lang['srv_alert_show_missing_general'].'</span> '.Help::display('srv_alert_show_general').'</label>
+ </form>
+ </div>
+ </div>';
+ }
+ echo ' <div class="icons_holder">';
echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+
echo '</div>';
}
+
+ $this->missings_menu($spremenljivka);
}
// label
@@ -4423,15 +5446,38 @@ class Branching {
}
echo '<div class="variabla' . $cssFloat . '" id="variabla_'.$row1['id'].'" other="'.$row1['other'].'">';
- echo '<input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onClick="return false;"/>';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$missing_warning.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'">' . $row1['naslov'] . '</div>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo '<input type="checkbox" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" class="enka-admin-custom ' . (($row['checkboxhide'] == 1) ? 'hidden' : '') . '" onClick="return false;"/>';
+ echo '<span class="enka-checkbox-radio "></span>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$missing_warning.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'">' . $row1['naslov'] . '</div>';
+
+ if($row1['other'] != 0 && $row1['other'] != 1){
+ echo ' <div class="missing_settings">
+ <div class="stamp_holder inline">
+ <span class="missing_stamp">'.$lang['srv_other_system'].$missing_values[$row1['other']].'</span>
+ </div>
+ <div class="missing_alert_holder inline" '.(($row['reminder'] > 0)?'':' style="display:none;"').'>
+ <form name="vprasanje_edit">
+ <input type="hidden" name="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" value="0" />
+ <input type="checkbox" id="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" name="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" value="1"
+ '.($row['alert_show_'.abs($row1['other'])]=='1'?' checked':'').'
+ onChange="vprasanje_save(true, '.$spremenljivka.');">
+ <label for="alert_show_'.abs($row1['other']).'_'.$spremenljivka.'" class="title"><span id="alert_show_'.abs($row1['other']).'_text">'.$lang['srv_alert_show_missing_general'].'</span> '.Help::display('srv_alert_show_general').'</label>
+ </form>
+ </div>
+ </div>';
+ }
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+
echo '</div>';
}
+ $this->missings_menu($spremenljivka);
}
// ranking
@@ -4443,9 +5489,12 @@ class Branching {
$num = mysqli_num_rows($sql1);
$size = $num * 50;
+ echo '<div class="ranking_holder design_'.$row['design'].' '.($this->lang_id==null ? 'allow_new' : '').'">';
+
// n=k
if ($row['design'] == 2) {
- echo '<div id="half_' . $row['podpora'] . '" class="dropzone '.($this->lang_id==null?'allow_new':'').'" style="min-height:' . $size . 'px;">';
+
+ echo '<div id="half_' . $row['podpora'] . '" class="dropzone '.($this->lang_id==null?'allow_new':'').'">';
while ($row1 = mysqli_fetch_array($sql1)) {
@@ -4469,10 +5518,6 @@ class Branching {
echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" style="float:none" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
@@ -4482,7 +5527,7 @@ class Branching {
echo '<div style="text-align: center;">';
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
@@ -4492,8 +5537,16 @@ class Branching {
echo '</div>';
}
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+
echo '</div>';
}
+
echo '</div>';
}
@@ -4501,7 +5554,7 @@ class Branching {
elseif ($row['design'] == 0) {
//zaslon razdelimo na dva dela - izris leve strani
- echo '<div id="half" class="dropzone '.($this->lang_id==null?'allow_new':'').'" style="width: 50%; min-height:' . $size . 'px; float: left; border-right: 1px solid black;">';
+ echo '<div id="half" class="dropzone '.($this->lang_id==null ? 'allow_new' : '').'">';
while ($row1 = mysqli_fetch_array($sql1)) {
@@ -4525,10 +5578,6 @@ class Branching {
echo '<div class="variabla" id="variabla_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" style="float:none" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
@@ -4537,7 +5586,7 @@ class Branching {
echo '<div style="text-align: center;">';
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
@@ -4548,12 +5597,21 @@ class Branching {
echo '</div>';
}
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+
echo '</div>';
}
+
echo '</div>';
+
// izris desne strani
- echo '<div id="half2" class="dropzone" style="width: 49%; min-height:' . $size . 'px; float: right;">';
+ echo '<div id="half2" class="dropzone">';
if($row['ranking_k'] == 0)
$max = mysqli_num_rows($sql1);
@@ -4565,8 +5623,6 @@ class Branching {
}
echo '</div>';
-
- echo '<div class="clr"></div>';
}
// cifre - dropdown
@@ -4584,10 +5640,6 @@ class Branching {
echo '<div class="variabla '.$cssFloat.'" id="variabla_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
- echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
- echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
- echo ' <span class="faicon edit2 inline inline_edit"></span>';
//echo '<input type="textfield" size="2"> ';
echo '<select style="width:50px; margin-top:0; float:left;">';
@@ -4596,15 +5648,15 @@ class Branching {
echo ' <option>'.$i.'</option>';
}
echo '</select>';
-
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline '.$class.'" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
+
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
//koda za notranji IF
if ($row1['if_id'] > 0) {
echo ' <span class="red">*</span>';
- echo ' <span style="font-size:9px; cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
+ echo ' <span style="cursor:pointer" id="if_notranji_'.$row1['id'].'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">';
$this->conditions_display($row1['if_id']);
echo '</span>';
@@ -4612,6 +5664,13 @@ class Branching {
echo ' <span class="faicon warning icon-orange"></span>';
}
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+ echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
+ echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
+ echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
+
echo '</div>';
}
}
@@ -4622,6 +5681,8 @@ class Branching {
//izris hotspot nastavitev za dodajanje slike
$this->vprasanje_hotspot($row['id'], $row['tip'], $row['design']);
}
+
+ echo '</div>';
}
// vsota
@@ -4641,14 +5702,17 @@ class Branching {
if ($naslov != '') $row1['naslov'] = $naslov;
}
- echo '<div class="variabla variabla_vsota" id="variabla_'.$row1['id'].'" style="width:100%; ">';
+ echo '<div class="variabla variabla_vsota" id="variabla_'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
+
+ echo ' <div class="icons_holder">';
echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
+ echo ' </div>';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline vrednost_inline_vsota '.$class.'" style="width:'.($gridWidth*7).'px" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline vrednost_inline_vsota" style="width:'.$gridWidth.'%" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>'.$row1['naslov'].'</div>';
echo ' <input type="text" name="foo_' . $row['id'] . '" maxlength="8" size="5">';
if ($row1['if_id'] > 0) {
@@ -4664,6 +5728,7 @@ class Branching {
$row1 = Cache::srv_spremenljivka($row['id']);
+ $limit = '';
if($row['vsota_limit'] != 0 && $row['vsota_limit'] == $row['vsota_min'])
$limit = '('.$row['vsota_min'].')';
elseif($row['vsota_limit'] != 0 && $row['vsota_min'] != 0)
@@ -4676,21 +5741,17 @@ class Branching {
$vsota = ($row1['vsota'] != '') ? $row1['vsota'] : $lang['srv_vsota_text'];
- echo '<table class="variabla_vsota"><tr>';
+ echo '<div class="variabla_vsota sum">';
- echo ' <td class="text">';
- echo ' <div class="variabla_vsota_sum">';
- echo ' <div style="width:'.($gridWidth*7).'px;" id="vsota_'.$row['id'].'" name="vsota" class="variabla_vsota_inline vrednost_inline_vsota" style="display:inline" contenteditable="'.(!$locked?'true':'false').'" '.(strpos($vsota, $lang['srv_vsota_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $vsota . '</div>';
- echo ' </div>';
- echo ' </td>';
+ echo ' <div class="variabla_vsota_border"></div>';
+
+ echo ' <div style="width:'.$gridWidth.'%;" id="vsota_'.$row['id'].'" name="vsota" class="variabla_vsota_inline vrednost_inline_vsota" style="display:inline; width:'.$gridWidth.'%;" contenteditable="'.(!$locked?'true':'false').'" '.(strpos($vsota, $lang['srv_vsota_text'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $vsota . '</div>';
- echo ' <td class="input">';
- echo ' <input type="text" name="foo_' . $row['id'] . '" maxlength="8" size="5" >';
+ echo ' <input type="text" name="foo_' . $row['id'] . '" maxlength="8" size="5" >';
if ($row['vsota_show'] == 1)
- echo ' <label style="color: red; padding-left: 5px;">'.$limit.'</label>';
- echo ' </td>';
+ echo ' <label style="color: red; padding-left: 5px;">'.$limit.'</label>';
- echo '</tr></table>';
+ echo '</div>';
}
// SN - imena
@@ -4738,11 +5799,11 @@ class Branching {
$sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE spr_id='$row[id]' ORDER BY $orderby");
while ($row1 = mysqli_fetch_array($sql1)) {
- echo ' <p' . '><input type="radio" class="enka-admin-custom" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" "/><span class="enka-checkbox-radio"></span> <label for="foo_' . $row1['id'] . '">' . $row1['naslov'] . '</label></p>';
+ echo ' <p' . '><input type="radio" class="enka-admin-custom" name="foo_' . $row['id'] . '" id="foo_' . $row1['id'] . '" value="" "/><label for="foo_' . $row1['id'] . '"><span class="enka-checkbox-radio"></span> ' . $row1['naslov'] . '</label></p>';
}
if ($row['textfield'] == 1) {
- echo ' <p' . '><input type="radio" class="enka-admin-custom" name="foo_' . $row['id'] . '" id="foo_-3" value="" "/><span class="enka-checkbox-radio"></span> <label for="foo_-3">' . $row['textfield_label'] . '</label> <input type="text" name="" value="" /></p>';
+ echo ' <p' . '><input type="radio" class="enka-admin-custom" name="foo_' . $row['id'] . '" id="foo_-3" value="" "/><label for="foo_-3"><span class="enka-checkbox-radio"></span> ' . $row['textfield_label'] . '</label> <input type="text" name="" value="" /></p>';
}
}
@@ -4788,7 +5849,9 @@ class Branching {
else
$map_data[] = $sql1;
- echo '<span id="variabla_no_value_'.$spremenljivka.'" '. (($cssFloat != '') ? 'class="'.$cssFloat.'"' : '') .' style="width:auto !important; color: red; padding-left: 10px; display:'. ((count($map_data) > 0) ? 'none' : 'inline-block') .';">'.$lang['srv_branching_no_value_map'].'</span>';
+ echo '<span id="variabla_no_value_'.$spremenljivka.'" '. (($cssFloat != '') ? 'class="'.$cssFloat.'"' : '') .'
+ style="width:auto !important; color: red; margin-bottom: 12px; display:'. ((count($map_data) > 0) ? 'none' : 'inline-block') .';">'.
+ $lang['srv_branching_no_value_map'].'</span>';
//get info shapes
$sql2 = sisplet_query("SELECT lat, lng, address, overlay_id FROM srv_vrednost_map
@@ -4821,7 +5884,7 @@ class Branching {
?>
<script type="text/javascript">
//naredi padding variable_holder na desni in levi strani (default je samo na levi)
- document.getElementById('br_map_<?php echo $spremenljivka; ?>').parentElement.style.padding = "0px 30px";
+ document.getElementById('br_map_<?php echo $spremenljivka; ?>').parentElement.style.padding = "0px 16px";
//preveri, ce je google API ze includan (ce se je vedno icludal, je prislo do errorjev)
if((typeof google === 'object' && typeof google.maps === 'object')){
@@ -4981,26 +6044,38 @@ class Branching {
elseif( ($row['tip'] == 27)){ //Heatmap
$this->vprasanje_heatmap($row['id'], $row['tip']);
}
-
-
-
- //echo '<div id="clr" class="clr"></div>';
+
echo '</div>';
- if ($row['orientation']==0 || $row['orientation']==2 || $row['tip'] == 17) echo '<div class="clr"></div>'; // kjer so vsi divi floatani, da se raztegne okvir vprasanja
+
+ // Add variable - hover
+ if ( in_array($row['tip'], array(1,2,6,16,19,20)) ) {
+ if ($row['enota'] != 10 && $row['orientation'] != 10){
+ echo '<div class="add-variable tip_'.$row['tip'].'"><a href="#" class="noline" onclick="add_question_category(\''.$spremenljivka.'\'); return false;" title="'.$lang['srv_novavrednost'].'"><span class="faicon add"></span>'.$lang['srv_novavrednost'].'</a></div>';
+
+ MobileSurveyAdmin::displayAddQuestionCategory($this->anketa, $spremenljivka, $row['tip']);
+ }
+ }
+
+
+ // kjer so vsi divi floatani, da se raztegne okvir vprasanja
+ if ($row['orientation']==0 || $row['orientation']==2 || $row['tip'] == 17)
+ echo '<div class="clr"></div>';
echo '</div><!-- end:variable_holder -->';
- //echo ' </div>';
if ($this->displayKomentarji !== false) {
- $this->vprasanje_komentarji($spremenljivka);
+ $sc = new SurveyComments($this->anketa);
+ $sc->display_vprasanje_komentarji($spremenljivka);
}
- echo ' </div> <!-- spremenljivka_content_' . $spremenljivka . ' -->';
+ echo ' </div> <!-- spremenljivka_content_' . $spremenljivka . ' -->';
}
function vprasanje_grid_multiple ($spremenljivka) {
global $lang;
+ global $lang1;
+ global $global_user_id;
$row = Cache::srv_spremenljivka($spremenljivka);
@@ -5015,65 +6090,48 @@ class Branching {
echo ' <table class="grid_header_table '.($this->lang_id==null?'allow_new':'').'">';
echo ' <thead>';
+
// podnaslovi gridov
- if ($row['grid_subtitle1'] == '1') {
- echo ' <tr>';
+ $sql2 = sisplet_query("SELECT s.id, s.naslov, s.grids FROM srv_spremenljivka s, srv_grid_multiple m WHERE s.id = m.spr_id AND parent = '".$row['id']."' ORDER BY m.vrstni_red");
+ if ($row['grid_subtitle1'] == '1' && mysqli_num_rows($sql2) > 0) {
+
+ echo ' <tr class="row_subtitle">';
echo ' <td></td>';
- //echo ' <td style="width:' . $spacesize . '%"></td>';
echo ' <td></td>';
- $sql2 = sisplet_query("SELECT s.id, s.naslov, s.grids FROM srv_spremenljivka s, srv_grid_multiple m WHERE s.id = m.spr_id AND parent = '".$row['id']."' ORDER BY m.vrstni_red");
+ $col = 1;
+ $tip_prev = 0;
+ $id_prev = 0;
+
while ($row2 = mysqli_fetch_array($sql2)) {
-
-
+
+ if ($id_prev == 0) $id_prev = $row2['id'];
+
+ if ($tip_prev != $row2['tip']) $col++;
+ $tip_prev = $row2['tip'];
+
if ($this->lang_id != null) {
save('lang_id', $this->lang_id);
$rowl = \App\Controllers\LanguageController::srv_language_spremenljivka($row2['id']);
if (strip_tags($rowl['naslov']) != '') $row2['naslov'] = $rowl['naslov'];
- }
-
-
- echo ' <td colspan="'.$row2['grids'].'" class="grid_header" grd="g_'.$row2['id'].'"><div class="naslov_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" spr_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_vprasanje'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ }
+ echo ' <td colspan="'.$row2['grids'].'" class="grid_header '.($id_prev!=$row2['id']?'col_border ':'').'" grd="g_'.$row2['id'].'"><div class="naslov_inline grid_subtitle_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" spr_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_vprasanje'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
}
echo ' </tr>';
}
- // urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
- echo ' <td></td>';
- //echo ' <td style="width:' . $spacesize . '%"></td>';
- echo ' <td></td>';
-
- $bg = 1;
-
- $sql2 = sisplet_query("SELECT id, variable, vrstni_red FROM srv_grid WHERE spr_id='$row[id]' AND other=0 ORDER BY vrstni_red");
- $row2 = mysqli_fetch_array($sql2);
-
- for ($i = 1; $i <= $row['grids']; $i++) {
- if ($row2['vrstni_red'] == $i) {
- echo ' <td class=" ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_variable_inline" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'">' . $row2['variable'] . '</div></td>';
- $row2 = mysqli_fetch_array($sql2);
- } else {
- echo ' <td class=" ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
- }
- }
- echo '</tr>';
-
- $grid_plus_minus = '<div class="grid-plus-minus"><a href="#" onclick="grid_multiple_add(\''.$row['id'].'\'); return false;" title="'.$lang['srv_gridmultiple_add'].'">'.$lang['add'].' <span class="faicon add icon-blue"></span></a></div>';
-
- echo ' <tr>';
- echo ' <td></td>';
- //echo ' <td style="width:' . $spacesize . '%"></td>';
- echo ' <td></td>';
$bg = 1;
- //$sql2 = sisplet_query("SELECT g.* FROM srv_grid g, srv_grid_multiple m WHERE g.spr_id = m.spr_id AND parent = '".$row['id']."' ORDER BY m.vrstni_red, g.vrstni_red");
-
$sqlM = sisplet_query("SELECT spr_id FROM srv_grid_multiple WHERE parent='$spremenljivka' ORDER BY vrstni_red");
if(mysqli_num_rows($sqlM) > 0){
+
+ echo ' <tr>';
+ echo ' <td></td>';
+ echo ' <td></td>';
+
$multiple = array();
while ($rowM = mysqli_fetch_array($sqlM)) {
$multiple[] = $rowM['spr_id'];
@@ -5081,37 +6139,36 @@ class Branching {
$sql2 = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode(',', $multiple).") ORDER BY m.vrstni_red, g.vrstni_red");
$row2 = mysqli_fetch_array($sql2);
+ $col = 1;
+ $tip_prev = 0;
+ $id_prev = 0;
+
for ($i = 1; $i <= mysqli_num_rows($sql2); $i++) {
+
+ if ($id_prev == 0) $id_prev = $row2['id'];
+
+ if ($tip_prev != $row2['tip']) $col++;
+ $tip_prev = $row2['tip'];
+
if ($this->lang_id != null) {
$naslov = \App\Controllers\LanguageController::srv_language_grid($row2['spr_id'], $row2['id']);
if ($naslov != '') $row2['naslov'] = $naslov;
}
- if (true) {
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" spr_id="'.$row2['spr_id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
- $row2 = mysqli_fetch_array($sql2);
- } else {
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
- }
+ echo ' <td class="grid_header '.($bg % 2 == 0 ? 'grid_light' : 'grid_dark').' '.($id_prev==$row2['id'] && $col!=2?'col_border ':'').'" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" spr_id="'.$row2['spr_id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+
+ $row2 = mysqli_fetch_array($sql2);
}
- }
-
- #kateri missingi so nastavljeni
- $sql_grid_mv = sisplet_query("SELECT * FROM srv_grid WHERE spr_id='".$spremenljivka."' AND other != 0");
- if (mysqli_num_rows($sql_grid_mv) > 0 ) {
- echo '<td class=""></td>';
- while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
- echo '<td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row_grid_mv['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row_grid_mv['id'].'" '.(strpos($row_grid_mv['naslov'], $lang['srv_new_grid'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row_grid_mv['naslov'] . '</div></td>';
- }
+ echo ' </tr>';
}
- echo ' </tr>';
// linki za urejanje pod-spremenljivk tabele
+ $grid_plus_minus = '<div class="grid-plus-minus"><a href="#" class="noline" onclick="grid_multiple_add(\''.$row['id'].'\'); return false;" title="'.$lang['srv_gridmultiple_add'].'"><span class="faicon add icon-blue"></span><span>'.$lang['add'].'</span></a></div>';
+
echo ' <tr class="sub-table">';
echo ' <td>'.$grid_plus_minus.'</td>';
- //echo ' <td style="width:' . $spacesize . '%"></td>';
echo ' <td></td>';
$bg = 1;
@@ -5127,7 +6184,9 @@ class Branching {
if ($tip_prev != $row2['tip']) $col++;
$tip_prev = $row2['tip'];
- echo ' <td class="grid_header ' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" colspan="'.$row2['grids'].'"><a href="#" onclick="grid_multiple_edit(\''.$row['id'].'\', \''.$row2['id'].'\'); return false;">'.$lang['edit3'].'</a></td>';
+ echo ' <td class="grid_header ' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" colspan="'.$row2['grids'].'">';
+ echo ' <div class="grid-subtable-edit"><a href="#" class="noline" onclick="grid_multiple_edit(\''.$row['id'].'\', \''.$row2['id'].'\'); return false;">'.$lang['edit3'].'</a></div>';
+ echo ' </td>';
$id_prev = $row2['id'];
}
@@ -5148,14 +6207,17 @@ class Branching {
}
echo ' <tr class="variabla" id="variabla_'.$row1['id'].'">';
- echo ' <td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" '.($gridWidth == -1 ? '' : $css ).' id="'.$row1['id'].'">';
+ echo ' <td class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="'.$row1['id'].'">';
echo '<span class="faicon move_updown inline inline_move" title="'.$lang['srv_move'].'"></span>';
- echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
+
+ echo ' <div class="icons_holder">';
+ echo ' <span class="faicon delete small inline inline_delete" title="'.$lang['srv_brisivrednost'].'"></span>';
echo ' <span class="faicon odg_hidden inline inline_hidden '. (($row1['hidden'] == 1) ? 'show-hidden' : '').(($row1['hidden'] == 2) ? 'show-disable' : '') .'" odg_vre="'.$row1['hidden'].'" odg_id="'.$row1['id'].'" title="'.$lang['srv_hide-disable_answer-'.$row1['hidden']].'"></span>';
echo ' <span class="faicon odg_if_not inline inline_if_not '.(!$userAccess->checkUserAccess($what='if') ? 'user_access_locked' : '').'" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
echo ' <span class="faicon edit2 inline inline_edit"></span>';
-
- echo '<div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo ' </div>';
+
+ echo '<div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost_grid'])!==false || (isset($lang1['srv_new_vrednost_grid']) && strpos($row1['naslov'], $lang1['srv_new_vrednost_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
if ($row1['if_id'] > 0) {
echo ' <span class="red" style="cursor:pointer" onclick="vrednost_condition_editing(\''.$row1['id'].'\'); return false;" title="'.$lang['srv_podif_edit'].'">*</span>';
@@ -5198,20 +6260,22 @@ class Branching {
if ($tip_prev != $row2['tip']) $col++;
$tip_prev = $row2['tip'];
+ // Radio podtabela
if($row2['tip'] == 6) {
- //echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '">'.($row2['enota']!=2?'<input type="radio" name="foo_' . $row1['id'] . '" value="">':'').'</td>';
echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '">'.(($row2['enota']!=2 && $row2['enota']!=6)?'<input type="radio" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value=""><span class="enka-checkbox-radio"></span>':'').'</td>';
-
- } elseif($row2['tip'] == 16) {
- //echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="checkbox" name="foo_' . $row1['id'] . '" value=""></td>';
+ }
+ // Checkbox podtabela
+ elseif($row2['tip'] == 16) {
echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '">'.(($row2['enota']!=2 && $row2['enota']!=6)?'<input type="checkbox" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value=""><span class="enka-checkbox-radio"></span>':'').'</td>';
+ }
+ // Text podtabela
+ elseif ($row2['tip'] == 19) {
+ echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="text" class="small" name="foo_' . $row1['id'] . '" value=""></td>';
+ }
+ // Number podtabela
+ elseif ($row2['tip'] == 20) {
- } elseif ($row2['tip'] == 19) {
- echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><textarea style="width:3em; height:12px" name="foo_' . $row1['id'] . '"></textarea></td>';
-
- } elseif ($row2['tip'] == 20) {
-
- echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="text" style="width:'.$taWidth.'em;" name="foo_' . $row1['id'] . '" value="">';
+ echo ' <td style="width:' . $cellsize . '%" class="' .($id_prev!=$row2['id']?'col_border ':'').($col%2==0?'col_dark ':'') . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="text" class="small" name="foo_' . $row1['id'] . '" value="">';
if ($row['ranking_k'] == 1) {
echo '<div style="width:100%">';
@@ -5225,7 +6289,6 @@ class Branching {
echo '</div>';
- //<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css" type="text/css" media="all" />
?>
<script>
$(function() {
@@ -5244,18 +6307,20 @@ class Branching {
#kateri missingi so nastavljeni
$sql_grid_mv = sisplet_query("SELECT id FROM srv_grid WHERE spr_id='".$spremenljivka."' AND other != 0");
if (mysqli_num_rows($sql_grid_mv) > 0 ) {
- //echo '<td style="width:' . $spacesize . '%"></td>';
- echo '<td></td>';
+
+ echo '<td></td>';
+
while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
- if($row['tip'] == 6) {
+
+ if($row['tip'] == 6) {
echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="radio" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value="" /><span class="enka-checkbox-radio"></span></td>';
- } elseif($row['tip'] == 16) {
+ }
+ elseif($row['tip'] == 16) {
echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="checkbox" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value="" /><span class="enka-checkbox-radio"></span></td>';
- } else {
+ }
+ else {
echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="radio" class="enka-admin-custom" name="foo_' . $row1['id'] . '" value="" /><span class="enka-checkbox-radio"></span></td>';
-// echo ' <td style="width:' . $cellsize . '%" class="' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"><input type="text" style="width: 90%;" name="foo_' . $row1['id'] . '" value="" /></td>';
}
-
}
}
@@ -5263,8 +6328,12 @@ class Branching {
if ($row['enota'] == 1 && $row['tip'] == 6) {
//echo ' <td style="width:' . $spacesize . '%"></td>';
echo ' <td></td>';
- echo ' <td style="text-align:left;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="f_'.$row1['id'].'_2"><div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'_2" '.(strpos($row1['naslov2'], $lang['srv_new_vrednost'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '</div></td>';
+ echo ' <td style="text-align:left;" class="grid_question ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" id="f_'.$row1['id'].'_2"><div class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'_2" '.(strpos($row1['naslov2'], $lang['srv_new_vrednost_grid'])!==false || $this->lang_id!=null ?' default="1"':'').'>' . $row1['naslov2'] . '</div></td>';
}
+
+ // Zadnja bela celica kjer se nahajajo ikone za mouseover
+ echo '<td class="white" style="min-width:80px;"></td>';
+
echo ' </tr>';
$bg++;
@@ -5272,144 +6341,56 @@ class Branching {
echo ' </tbody>';
echo ' </table>';
-
}
-
- /**
- * komentarji na vprasanje - vrstica se izpise na dnu prikaza vprasanja
- *
- * @param mixed $spremenljivka
- */
- function vprasanje_komentarji ($spremenljivka) {
+ //generira dropdown in menu za missinge
+ public function missings_menu($spremenljivka){
global $lang;
- global $admin_type;
- global $global_user_id;
- SurveySetting::getInstance()->Init($this->anketa);
- $question_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment');
- $question_resp_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment');
- $question_resp_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment_viewadminonly');
-
- $question_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewadminonly');
- $question_comment_viewauthor = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewauthor');
-
- if (!($admin_type <= $question_comment && $question_comment!='') && !($question_resp_comment==1)) return;
- if ($_GET['a'] == 'komentarji') return; // v komentarjih tut ne izpisujemo te vrstice
-
- echo '<div id="surveycommentcontainer_'.$spremenljivka.'" class="printHide comment_container_inline">';
-
- // komentarji na vprasanje
- if ($admin_type <= $question_comment && $question_comment != '') {
-
- // Dodaj komentar
- echo ' <span class="floatRight spaceLeft"><a href="#" id="surveycomment_'.$spremenljivka.'_0" class="surveycomment" type="1" subtype="q_admin_add" spremenljivka="'.$spremenljivka.'" view="0" onclick="return false;" title="'.$lang['srv_question_comment'].'"> ';
- //echo '<img src="img_' . $this->skin . '/comment.png" alt="'.$lang['srv_question_comment'].'" title="'.$lang['srv_question_comment'].'" > ';
- echo '<span class="faicon inline_comment"></span> ';
- echo $lang['srv_add_comment'];
- echo '</a></span>';
- echo ' <script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_0\'); }); </script>';
+ if($_GET['a'] !== 'komentarji' && $_GET['a'] !== 'komentarji_anketa'){
$row = Cache::srv_spremenljivka($spremenljivka);
- if ($row['thread'] == 0) {
- $row['count'] = 0;
- } else {
- if ($admin_type <= $question_comment_viewadminonly) {
- $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]'");
- } elseif ($question_comment_viewauthor==1) {
- $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]' AND uid='$global_user_id'");
- } else {
- $sql = sisplet_query("SELECT * FROM post WHERE 1 = 0");
- }
- $row = mysqli_fetch_array($sql);
- $row['count']--;//1. je default comment
- }
-
- // Poglej komentarje
- if ($admin_type <= $question_comment_viewadminonly || $question_comment_viewauthor==1) {
- echo '&nbsp;&nbsp;&nbsp;<span class="floatRight spaceRight" id="comment_add_'.$spremenljivka.'"'.($row['count']==0?' style="visibility:hidden"':'').'><a href="#" id="surveycomment_'.$spremenljivka.'_1" class="surveycomment" type="1" subtype="q_admin_all" spremenljivka="'.$spremenljivka.'" view="1" onclick="return false;" title="'.$lang['srv_question_comments'].'"> ';
- //echo '<img src="img_' . $this->skin . '/comments.png" alt="'.$lang['srv_question_comments'].'" title="'.$lang['srv_question_comments'].'" > ';
- echo '<span class="faicon inline_double_comment"></span> ';
- echo $lang['srv_view_comment'].''.($row['count']>0?' ('.$row['count'].')':'');
- echo '</a></span>';
- echo ' <script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_1\'); }); </script>';
+ $spremenljivkaParams = new enkaParameters($row['params']);
+
+ # preberemo missing vrednosti iz class.SurveyMissingValues - kateri so na voljo v anketi
+ $smv = new SurveyMissingValues($this->anketa);
+ $missing_values = $smv->GetUnsetValuesForSurvey();
+
+ # kateri missingi so nastavljeni
+ $already_set_mv = array();
+ $sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_vrednost WHERE spr_id='".$spremenljivka."' AND other != 0");
+ while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
+ $already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov'];
}
- }
- // komentarji respondentov
- if (($question_resp_comment==1) AND ($admin_type <= $question_resp_comment_viewadminonly)) {
+ $missing_menu_items = '';
- echo '&nbsp;<span class="spaceRight floatRight" style="padding-right:10px">';
- $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spremenljivka'");
- $row = mysqli_fetch_array($sql);
+ if (count($missing_values) > 0) {
+ foreach ($missing_values AS $mv_key => $mv_text) {
+ $missing_menu_items = '
+ <li>
+ <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').'
+ onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); close_missing_menu(\'' . $row['id'] . '\');"
+ id="missing_value_'.$row['id'].'_'.$mv_key.'">
+ <label for="missing_value_'.$row['id'].'_'.$mv_key.'" class="pointer">'.$mv_text.'</label></li>'
+ .$missing_menu_items;
+ }
- if ($row['count'] > 0) {
- echo '<a href="#" id="surveycomment_'.$spremenljivka.'_2" class="surveycomment" type="2" subtype="q_resp_all" spremenljivka="'.$spremenljivka.'" onclick="return false;">';
- echo '<span class="faicon inline_comment icon-orange"></span> ';
- echo $lang['srv_repondent_comment'].' ('.$row['count'].')';
- echo '</a>';
- echo ' <script> $(function() { load_comment(\'#surveycomment_'.$spremenljivka.'_2\'); }); </script>';
}
- echo '</span>';
- }
- echo '</div>';
- }
-
- /**
- * komentarji na if oz. blok - vrstica se izpise na dnu prikaza ifa oz. bloka
- *
- * @param mixed $if_id (id ifa ali bloka)
- * @param mixed $block (ali gre za if ali blok)
- */
- function if_komentarji ($if_id, $block=0) {
- global $lang;
- global $admin_type;
- global $global_user_id;
-
- SurveySetting::getInstance()->Init($this->anketa);
- $question_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment');
-
- $question_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewadminonly');
- $question_comment_viewauthor = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewauthor');
-
- if (!($admin_type <= $question_comment && $question_comment!='')) return;
- if ($_GET['a'] == 'komentarji') return; // v komentarjih tut ne izpisujemo te vrstice
+ if (count($missing_values) > 0) {
- // komentarji na if ali blok
- if ($admin_type <= $question_comment && $question_comment != '') {
-
- // Dodaj komentar
- echo ' <span class="floatRight spaceLeft"><a href="#" id="surveycomment_'.$if_id.'_0" class="surveycomment" type="'.($block==1 ? '6' : '5').'" subtype="'.($block==1 ? 'blok_admin_add' : 'if_admin_add').'" spremenljivka="'.$if_id.'" view="0" onclick="return false;" title="'.$lang['srv_question_comment'].'"> ';
- //echo '<img src="img_' . $this->skin . '/comment.png" alt="'.$lang['srv_question_comment'].'" title="'.$lang['srv_question_comment'].'" > ';
- echo '<span class="faicon inline_comment"></span> ';
- echo $lang['srv_add_comment'];
- echo '</a></span>';
- echo ' <script> $(function() { load_comment(\'#surveycomment_'.$if_id.'_0\'); }); </script>';
-
- $row = Cache::srv_if($if_id);
- if ($row['thread'] == 0) {
- $row['count'] = 0;
- } else {
- if ($admin_type <= $question_comment_viewadminonly) {
- $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]'");
- } elseif ($question_comment_viewauthor==1) {
- $sql = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]' AND uid='$global_user_id'");
- } else {
- $sql = sisplet_query("SELECT * FROM post WHERE 1 = 0");
- }
- $row = mysqli_fetch_array($sql);
- $row['count']--;//1. je default comment
- }
-
- // Poglej komentarje
- if ($admin_type <= $question_comment_viewadminonly || $question_comment_viewauthor==1) {
- echo '&nbsp;&nbsp;&nbsp;<span class="floatRight spaceRight" id="comment_add_'.$if_id.'"'.($row['count']==0?' style="visibility:hidden"':'').'><a href="#" id="surveycomment_'.$if_id.'_1" class="surveycomment" type="'.($block==1 ? '6' : '5').'" subtype="'.($block==1 ? 'blok_admin_all' : 'if_admin_all').'" spremenljivka="'.$if_id.'" view="1" onclick="return false;" title="'.$lang['srv_question_comments'].'"> ';
- //echo '<img src="img_' . $this->skin . '/comments.png" alt="'.$lang['srv_question_comments'].'" title="'.$lang['srv_question_comments'].'" > ';
- echo '<span class="faicon inline_double_comment"></span> ';
- echo $lang['srv_view_comment'].''.($row['count']>0?' ('.$row['count'].')':'');
- echo '</a></span>';
- echo ' <script> $(function() { load_comment(\'#surveycomment_'.$if_id.'_1\'); }); </script>';
+ echo '<div class="missing_dropdown_link">
+ <a href="#" onclick="toggle_missing_dropdown_table('.$spremenljivka.'); return false;" title="'.$lang['srv_manjkajoce_vrednosti'].'">'.
+ $lang['srv_manjkajoce_vrednosti'].'&nbsp;&nbsp;<span class="faicon arrow2_d small"></span></a>
+ </div>
+ <div>
+ <div id="table_missings_menu_'.$row['id'].'" class="table_missings_menu mm_extra">
+ <form name="vprasanje_edit"><ul>
+ <li><strong>'.$lang['srv_manjkajoce_vrednosti'].' '.Help::display('srv_missing_values').'</strong></li>
+ '.$missing_menu_items.'
+ </ul></form></div></div>
+ ';
}
}
}
@@ -5432,11 +6413,15 @@ class Branching {
$this->Survey = new \App\Controllers\SurveyController(true);
$lang = $l;
+
save('lang_id', $this->lang_id);
+
$rowl = \App\Controllers\LanguageController::srv_language_spremenljivka($id);
- if ($id == -1) {
+
+ if ($id == -1 && isset($rowl['naslov'])) {
if (strip_tags($rowl['naslov']) != '') $row['introduction'] = $rowl['naslov'];
- } else {
+ }
+ elseif(isset($rowl['naslov'])) {
if (strip_tags($rowl['naslov']) != '') $row['conclusion'] = $rowl['naslov'];
}
}
@@ -5524,7 +6509,7 @@ class Branching {
// prikažemo nastavitve vprasanja
$fullscreen = ( isset($_POST['fullscreen']) && $_POST['fullscreen'] != 'undefined') ? (int)$_POST['fullscreen'] : false;
- echo '<div id="spr_settings_intro_concl" >'."\n\r";
+ echo '<div id="spr_settings_intro_concl" class="spr_settings">'."\n\r";
if ($id == -1) {
$show = $row['show_intro'];
@@ -5545,25 +6530,21 @@ class Branching {
// <-- Editor teksta vprasanja ---
echo '<div class="spremenljivka_tekst_form">';
echo '<div class="naslov naslov_inline" contenteditable="'.(!$this->locked?'true':'false').'" spr_id="'.$id.'" tabindex="1" '.(strpos($text, $selectall)!==false?' default="1"':'').'>'.$text.'</div>';
- echo '<div class="clr"></div>';
echo '<span class="faicon edit-vprasanje icon-as_link display_editor" onclick="inline_load_editor(this); return false;"></span>';
// opomba
if ($opomba != '' && $this->lang_id == null) {
- echo '<table style="margin-top:5px; width:100%"><tr>';
- echo '<td style="width:120px;">'.$lang['note'].' ('.$lang['srv_internal'].'):</td>';
- echo '<td >';
- echo '<span>'.$opomba.'</span>';
- echo '</td>';
- echo '</tr></table>';
+
+ echo '<div class="opomba_holder">';
+ echo '*'.$lang['note'].' ('.$lang['srv_internal'].'): '.$opomba;
+ echo '</div>';
}
+
echo '</div>';
// --- Editor teksta vprasanja -->
-
- echo '<div class="clr"></div>';
-
- } else { // urejanje uvoda,zakljucka
+ }
+ else { // urejanje uvoda,zakljucka
// <-- Zgornja vrstica pri editiranju vprasanj ---
echo '<div class="spremenljivka_settings spremenljivka_settings_active">';
@@ -5576,9 +6557,8 @@ class Branching {
// prikažemo nastavitve vprasanja
$fullscreen = ( isset($_POST['fullscreen']) && $_POST['fullscreen'] != 'undefined') ? (int)$_POST['fullscreen'] : false;
- echo '<div id="spr_settings_intro_concl" >'."\n\r";
+ echo '<div id="spr_settings_intro_concl" class="spr_settings">'."\n\r";
echo ' <span id="visible_introconcl_'.$id.'" class="extra_opt">';
- //$this->introconcl_visible($id);
echo ' </span>'."\n\r";
echo '</div>';
@@ -5601,7 +6581,6 @@ class Branching {
echo '<div id="editor_display_' . $id. '" class="editor_display" >';
echo '<div class="faicon edit-vprasanje icon-as_link pointer lightRed" onmouseover="editor_display(\'' . $id . '\'); $(this).parent().hide();" style="width:auto;" title="'.$lang['srv_editor'].'">';
- //echo '<img src="img_' . $this->skin . '/settings.png" />';
echo '<span class="faicon edit-vprasanje icon-as_link"></span>';
echo'</div>';
echo '</div>';
@@ -5713,16 +6692,14 @@ class Branching {
// <-- Editor teksta vprasanja ---
echo '<div class="spremenljivka_tekst_form">';
echo '<div class="naslov naslov_inline">'.$text.'</div>';
- echo '<div class="clr"></div>';
-
echo '</div>';
// --- Editor teksta vprasanja -->
-
echo '<div class="clr"></div>';
// Da/ne variable
+ echo '<div class="content_div_normalmode">';
echo '<div id="variable_holder" class="variable_holder">';
echo '<div class="variabla">';
@@ -5740,6 +6717,7 @@ class Branching {
echo '</div>';
echo '</div>';
+ echo '</div>';
echo '<br />';
@@ -5793,7 +6771,7 @@ class Branching {
/**
* @desc prikaze pogoje v IFu
*/
- function conditions_display($if, $long_alert=0, $notranji_pogoj=0) {
+ function conditions_display($if, $long_alert=0, $notranji_pogoj=0, $vrednost=0) {
global $lang;
$row_if = Cache::srv_if($if);
@@ -5890,6 +6868,7 @@ class Branching {
else
echo $row2['variable'];
}
+
// multigrid
} elseif ($row['vre_id'] > 0) {
@@ -5897,7 +6876,7 @@ class Branching {
// Preverimo pogoj -1
$sqlX = sisplet_query("SELECT * FROM srv_condition_grid WHERE cond_id='$row[id]' AND grd_id='-1'");
- if (!$sql2) echo mysqli_error($GLOBALS['connect_db']);
+ if (!$sqlX) echo mysqli_error($GLOBALS['connect_db']);
if(mysqli_num_rows($sqlX) > 0){
echo '-1';
$j++;
@@ -6031,48 +7010,55 @@ class Branching {
echo ' ) ';
}
- //echo '</span>';
if ($row_if['label'] != '') {
echo ' <span class="if_comment">(';
echo ' '.$row_if['label'].' ';
echo ')</span> ';
-
}
$condition_check = $this->condition_check($if);
if ($long_alert) {
- if ($c == 1 && $spr_id == 0)
- if ($this->count_spr_in_if($if) > 1) {
+
+ if ($c == 1 && $spr_id == 0){
+
+ if ($this->count_spr_in_if($if) > 1) {
echo '<em>'.$lang['srv_edit_condition_question'].'</em>';
- } else {
+ }
+ else {
$spr = $this->find_first_in_if($if);
$r = Cache::srv_spremenljivka($spr);
- if (!$spr > 0) $r['variable'] = '';
- echo '<em>'.sprintf($lang['srv_edit_condition_question1'], '<span class="variable">'.$r['variable'].'</span>').'</em>';
+
+ if (!$spr > 0)
+ $r['variable'] = '';
+
+ if(($vrednost == -4))
+ echo '<em>'.sprintf($lang['srv_edit_validation_question1'], '<span class="variable">'.$r['variable'].'</span>').'</em>';
+ else
+ echo '<em>'.sprintf($lang['srv_edit_condition_question1'], '<span class="variable">'.$r['variable'].'</span>').'</em>';
}
- //if ($condition_check >= 1 && $condition_check <= 5 ) {
- echo '<span class="error_display">';
- if ($condition_check == 1)
- echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_oklepaji'].'</span>';
- if ($condition_check == 2) {
- if (mysqli_num_rows($sql) > 1) // ko nardimo nov if, ne prikazemo takoj errorja
- echo '<span class="faicon warning icon-orange"></span> <span style="color:red">'.$lang['srv_error_spremenljivka'].'</span>';
- } elseif ($condition_check == 3)
- echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_vrednost'].'</span>';
- if ($condition_check == 4)
- echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_numericno'].'</span>';
- if ($condition_check == 5)
- echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_calculation'].'</span>';
- if ($condition_check == 6)
- echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_date'].'</span>';
- echo '</span>';
- //}
- } else {
+ echo '<span class="error_display">';
+ if ($condition_check == 1)
+ echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_oklepaji'].'</span>';
+ if ($condition_check == 2) {
+ if (mysqli_num_rows($sql) > 1) // ko nardimo nov if, ne prikazemo takoj errorja
+ echo '<span class="faicon warning icon-orange"></span> <span style="color:red">'.$lang['srv_error_spremenljivka'].'</span>';
+ } elseif ($condition_check == 3)
+ echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_vrednost'].'</span>';
+ if ($condition_check == 4)
+ echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_numericno'].'</span>';
+ if ($condition_check == 5)
+ echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_calculation'].'</span>';
+ if ($condition_check == 6)
+ echo '<span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_date'].'</span>';
+ echo '</span>';
+ }
+ }
+ else {
if ($condition_check != 0)
- echo ' <span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_if_error'].'</span>';
+ echo ' <span class="if_warning"><span class="faicon warning"></span>'.$lang['srv_if_error'].'</span>';
}
@@ -6094,7 +7080,7 @@ class Branching {
$rowb = Cache::srv_if($if);
//začetek oklepaja za ZANKO
- echo '<strong class="clr_lp">LOOP</strong> <span class="colorloop">('.$rowb['number'].')</span>';
+ echo '<span class="clr_lp">LOOP</span> <span class="colorloop">('.$rowb['number'].')</span>';
$sql = sisplet_query("SELECT l.spr_id, s.variable FROM srv_loop l, srv_spremenljivka s WHERE l.if_id='$if' AND l.spr_id=s.id");
$row = mysqli_fetch_array($sql);
@@ -6182,6 +7168,85 @@ class Branching {
return true;
}
+ function check_pogoji_output () {
+ global $lang;
+
+ $output = '';
+
+ $code = $this->check_pogoji();
+
+ // ce je vse ok, preverimo se loope
+ if ($code === true)
+ $code = $this->check_loops();
+
+ // ce je vse ok, preverimo se validacije
+ if ($code === true)
+ $code = $this->check_validation();
+
+ // ce je vse ok, preverimo se imena variabel (vprasanj in variabel znotraj vprasanj)
+ if ($code === true)
+ $code = $this->check_variable();
+
+ // ce je vse ok, preverimo se vrednosti stolpcev v gridu (ce je slucajno kaksna prazna)
+ if ($code === true)
+ $code = $this->check_grid_value();
+
+ if ($code === true) return '1';
+
+ $output .= '<div class="bottom8">';
+ if ($code['type'] == 'if' || $code['type'] == 'podif')
+ $output .= $lang['srv_check_pogoji_not_ok'];
+ elseif ($code['type'] == 'loop')
+ $output .= $lang['srv_loop_no_nesting'];
+ elseif ($code['type'] == 'question_variable')
+ $output .= $lang['srv_duplicate_question_variable'];
+ elseif ($code['type'] == 'variable')
+ $output .= $lang['srv_duplicate_variables'];
+ elseif ($code['type'] == 'grid_value')
+ $output .= $lang['srv_empty_grid_values'];
+
+ $output .= '</div>';
+
+ // napaka v ifih
+ if ($code['type'] == 'if') {
+ $sql = sisplet_query("SELECT id, number FROM srv_if WHERE id = '$code[id]'");
+ $row = mysqli_fetch_array($sql);
+ $output .= '<p class="">'.$lang['srv_check_pogoji_if'].' <a class="noline" href="javascript:condition_editing(\''.$row['id'].'\');$(\'#fullscreen\').fadeOut(\'slow\'); popupClose();"><b>'.$row['number'].'</b></a>.</p>';
+ }
+ // napaka v podifih, ki so nastavljeni na vrednosti spremenljivk
+ elseif ($code['type'] == 'podif') {
+ $sql = sisplet_query("SELECT id, naslov, variable FROM srv_spremenljivka WHERE id = '$code[id]'");
+ $row = mysqli_fetch_array($sql);
+ $output .= '<p>'.$lang['srv_check_pogoji_spremenljivka'].': <b><a href="javascript:vprasanje_fullscreen(\''.$row['id'].'\');$(\'#fullscreen\').fadeOut(\'slow\'); popupClose();">'.$row['variable'].' - '.strip_tags($row['naslov']).'</a></b></p>';
+ }
+ // napaka z gnezdenjem loopov
+ elseif ($code['type'] == 'loop') {
+ $sql = sisplet_query("SELECT id, number FROM srv_if WHERE id = '$code[id]'");
+ $row = mysqli_fetch_array($sql);
+ $output .= '<p>'.$lang['srv_check_pogoji_loop'].' <a href="javascript:condition_editing(\''.$row['id'].'\');$(\'#fullscreen\').fadeOut(\'slow\'); popupClose();"><b>'.$row['number'].'</b></a></p>';
+ }
+ elseif ($code['type'] == 'validation') {
+ $sql = sisplet_query("SELECT id, naslov, variable FROM srv_spremenljivka WHERE id = '$code[id]'");
+ $row = mysqli_fetch_array($sql);
+ $output .= '<p>'.$lang['srv_check_validacija'].': <b><a href="javascript:vprasanje_fullscreen(\''.$row['id'].'\');$(\'#fullscreen\').fadeOut(\'slow\'); popupClose();">'.$row['variable'].' - '.strip_tags($row['naslov']).'</a></b></p>';
+ }
+ // napaka z imeni variabel
+ elseif ($code['type'] == 'variable') {
+ foreach ($code['vars'] AS $var) {
+ $output .= '<strong>'.$var.'</strong><br />';
+ };
+ }
+ // napaka z vrednostmi v gridu
+ elseif ($code['type'] == 'grid_value') {
+ foreach ($code['vars'] AS $var) {
+ $output .= '<strong>'.$var.'</strong><br />';
+ };
+ }
+
+
+ return $output;
+ }
+
/**
* preveri celo anketo, ce so loopi pravilno postavljeni
* gleda pa to, da loopi niso vgnezdeni en znotraj drugega
@@ -6284,15 +7349,44 @@ class Branching {
}
}
}
-
- /*if(count($spr_errors))
- return $spr_errors;*/
if(count($var_errors))
return $var_errors;
return true;
}
+
+ /**
+ * preveri, da vrednosti gridov (multigrid vprasanja) v anketi niso prazne
+ *
+ */
+ public function check_grid_value () {
+
+ $spr_errors = array();
+ $vars = array();
+
+ // Poiscemo gride, ki imajo prazno vrednost
+ $sql = sisplet_query("SELECT grid.vrstni_red, s.id AS spr_id, s.variable AS spr_variable
+ FROM srv_grid grid, srv_spremenljivka s, srv_grupa g
+ WHERE grid.spr_id=s.id AND s.gru_id=g.id AND g.ank_id='".$this->anketa."'
+ AND (grid.variable='' OR grid.variable='<br>')
+ ");
+ if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
+
+ while ($row = mysqli_fetch_array($sql)) {
+ $vars[] = $row['spr_variable'] . ' - ' . $row['vrstni_red'];
+ }
+
+ if(count($vars)){
+ $spr_errors['type'] = 'grid_value';
+ $spr_errors['code'] = '7';
+ $spr_errors['vars'] = $vars;
+
+ return $spr_errors;
+ }
+
+ return true;
+ }
/**
@@ -6563,9 +7657,7 @@ class Branching {
echo '<h2>'.$lang['urejanje_pogoj_popup_vrednost'].'</h2>';
echo '<div class="popup_close"><a href="#" onClick="vrednost_condition_editing_close(\''.$vrednost.'\', \''.$if.'\'); return false;"">✕</a></div>';
- echo '<span class="bold">'.$lang['urejanje_podif_alert'].'</span>';
-
- echo '<br /><br />';
+ echo '<span class="semi-bold">'.$lang['urejanje_podif_alert'].'</span>';
$sql = sisplet_query("SELECT naslov FROM srv_vrednost WHERE id='$vrednost'");
$row = mysqli_fetch_assoc($sql);
@@ -6573,7 +7665,7 @@ class Branching {
}
// Pogoj pri npr. obvescanju
elseif($vrednost == -3){
- echo '<h2>'.$lang['urejanje_pogoj_popup'].'</h2>';
+ echo '<h2>IF - '.$lang['urejanje_pogoj_popup'].'</h2>';
echo '<div class="popup_close"><a href="#" onClick="alert_if_close(\''.$vrednost.'\', \''.$if.'\'); return false;">✕</a></div>';
}
// Validacija
@@ -6601,26 +7693,56 @@ class Branching {
// gumbi na desni v novem oknu
if ($vrednost==0) {
- // floating box
+ // floating box
echo '<div id="div_condition_editing_float">';
+
+ echo '<div class="condition_header">';
+
+ echo '<span class="faicon edit"></span>';
+
if ($row['tip'] == 0)
- echo '<h2>'.$lang['oblikovanje_if'].'</h2>';
+ echo $lang['oblikovanje_if'];
elseif ($row['tip'] == 1)
- echo '<h2>'.$lang['oblikovanje_blok'].'</h2>';
+ echo $lang['oblikovanje_blok'];
elseif ($row['tip'] == 2)
- echo '<h2>'.$lang['srv_loop_urejanje'].'</h2>';
+ echo $lang['srv_loop_urejanje'];
- if ($row['tip'] == 0)
- echo '<p class="heading">'.$lang['srv_edit_condition_question'].'</p>';
- elseif ($row['tip'] == 1)
- echo '<p class="heading">'.$lang['srv_block_desc'].'</p>';
+ echo '</div>';
+
+
+ echo '<div class="condition_edit">';
+
+
+ echo '<fieldset><legend>'.$lang['srv_common_settings'].'</legend>';
+ if ($row['tip'] == 0){
+ echo '<div class="condition_setting_holder">';
+ echo ' <div class="condition_setting_line">';
+ echo '<p>'.$lang['srv_edit_condition_question'].'</p>';
+ echo ' </div>';
+ echo '</div>';
+ }
+ elseif ($row['tip'] == 1){
+ echo '<div class="condition_setting_holder">';
+ echo ' <div class="condition_setting_line">';
+ echo '<p>'.$lang['srv_block_desc'].'</p>';
+ echo ' </div>';
+ echo '</div>';
+ }
+
if ($vrednost != -1 && $vrednost != -2) {
- echo '<p><span class="title">';
- echo ($row['tip']==0?$lang['srv_if_label']:($row['tip']==1?$lang['srv_block_label']:$lang['srv_loop_label'])).':</span>';
- echo '<span class="content"><input type="text" name="label_'.$if.'" id="label_'.$if.'" value="'.$row['label'].'" ></span>';
- echo '</p>';
+
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line half-half">';
+ echo ' <label>'.($row['tip'] == 0 ? $lang['srv_if_label'] : ($row['tip'] == 1 ? $lang['srv_block_label'] :$lang['srv_loop_label'])).':</label>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="label_'.$if.'" id="label_'.$if.'" value="'.$row['label'].'">';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -6629,23 +7751,41 @@ class Branching {
' });' .
'});';
echo '</script>';
-
}
+ // Dodaj blok/if v knjiznico
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line with-icon">';
+ echo ' <span onClick="displayAddIntoLibraryPopup(\''.$if.'\', \'2_'.$row['tip'].'\');"><span class="faicon library"></span>'.$lang['srv_library_add_to_lib'].'</span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
+
+
if ($row['tip'] == 0 || $row['tip'] == 1) {
- echo '<fieldset>';
+ echo '<fieldset><legend>'.($row['tip'] == 1 ? $lang['srv_block_enabled'] : $lang['srv_if_enabled']).'</legend>';
- echo '<p><span class="title">'.($row['tip'] == 1 ? $lang['srv_block_enabled'] : $lang['srv_if_enabled']).':</span>';
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="radio" class="enka-admin-custom" value="0" name="if_edit" id="if_edit_0" '.($row['enabled']==0?' checked="checked"':'').' onClick="if_edit_enabled(\''.$row['id'].'\', $(this).val())" /><label for="if_edit_0">'.$lang['srv_if_enabled_'.$row['tip']].'</label>';
+ echo ' </div>';
- echo'<span class="displayBlock" style="padding:5px 0 0 5px;">';
- echo '<label for="if_edit_0"><input type="radio" class="enka-admin-custom" value="0" name="if_edit" id="if_edit_0" '.($row['enabled']==0?' checked="checked"':'').' onClick="if_edit_enabled(\''.$row['id'].'\', $(this).val())" /><span class="enka-checkbox-radio"></span>'.$lang['srv_if_enabled_'.$row['tip']].'</label>';
- if ($row['tip'] == 0)
- echo '<span class="spaceLeft"><label for="if_edit_1"><input type="radio" value="1" name="if_edit" id="if_edit_1" class="enka-admin-custom" '.($row['enabled']==1?' checked="checked"':'').' onClick="if_edit_enabled(\''.$row['id'].'\', $(this).val())" /><span class="enka-checkbox-radio"></span>'.$lang['srv_if_enabled_1'].'</label></span>';
- echo '<span class="spaceLeft"><label for="if_edit_2"><input type="radio" value="2" name="if_edit" id="if_edit_2" class="enka-admin-custom" '.($row['enabled']==2?' checked="checked"':'').' onClick="if_edit_enabled(\''.$row['id'].'\', $(this).val())" /><span class="enka-checkbox-radio"></span>'.$lang['srv_if_enabled_2'].'</label></span>';
- echo '</span>';
+ if ($row['tip'] == 0){
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="radio" value="1" name="if_edit" id="if_edit_1" class="enka-admin-custom" '.($row['enabled']==1?' checked="checked"':'').' onClick="if_edit_enabled(\''.$row['id'].'\', $(this).val())" /><label for="if_edit_1">'.$lang['srv_if_enabled_1'].'<label for="if_edit_1"></label>';
+ echo ' </div>';
+ }
- echo '</p>';
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="radio" value="2" name="if_edit" id="if_edit_2" class="enka-admin-custom" '.($row['enabled']==2?' checked="checked"':'').' onClick="if_edit_enabled(\''.$row['id'].'\', $(this).val())" /><label for="if_edit_2">'.$lang['srv_if_enabled_2'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
echo '</fieldset>';
}
@@ -6653,15 +7793,18 @@ class Branching {
// Posebna nastavitev vrednosti statusa panelista ce je vklopljen modul "panel"
if ($row['tip'] == 0 && SurveyInfo::getInstance()->checkSurveyModule('panel')) {
- echo '<fieldset>';
- echo '<p><span class="title">'.$lang['srv_panel_if'].':</span>';
+ echo '<fieldset><legend>'.$lang['srv_panel_if'].'</legend>';
- $sp = new SurveyPanel($this->anketa);
+ $sp = new SurveyPanel($this->anketa);
$panel_if = $sp->getPanelIf($if);
-
- echo'<span class="displayBlock" style="padding:5px 0 0 5px;">';
- echo '<input type="text" name="panel_status_'.$if.'" id="panel_status_'.$if.'" value="'.$panel_if.'" ></span>';
- echo '</span>';
+
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="text" class="text medium" name="panel_status_'.$if.'" id="panel_status_'.$if.'" value="'.$panel_if.'" ></span>';
+ echo ' </div>';
+
+ echo '</div>';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -6671,28 +7814,40 @@ class Branching {
'});';
echo '</script>';
- echo '</p>';
echo '</fieldset>';
}
if ($row['tip'] == 1) {
- echo '<fieldset>';
+ echo '<fieldset><legend>'.$lang['srv_block_random'].' '.Help::display('srv_block_random').'</legend>';
// Blok ki prikaze nakljucno razvrscena vprasanja (in samo doloceno stevilo)
- echo '<p>';
- echo ' <span class="title">'.$lang['srv_block_random'].': </span>'.Help::display('srv_block_random');
- echo ' <span class="displayBlock" style="padding:5px 0 0 5px;">';
- echo ' <label for="if_random_-1"><input type="radio" value="-1" class="enka-admin-custom small-padding" name="if_random" id="if_random_-1" '.($row['random']==-1?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val());" /><span class="enka-checkbox-radio"></span>'.$lang['no1'].'</label>';
- echo ' <span class="spaceLeft"><label for="if_random_-2"><input type="radio" value="-2" class="enka-admin-custom small-padding" name="if_random" id="if_random_-2" '.($row['random']==-2?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val())" /><span class="enka-checkbox-radio"></span>'.$lang['srv_block_random_blocks'].'</label></span>';
- echo ' <span class="spaceLeft"><label for="if_random_0"><input type="radio" value="0" class="enka-admin-custom small-padding" name="if_random" id="if_random_0" '.($row['random']>=0?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val())" /><span class="enka-checkbox-radio"></span>'.$lang['srv_block_random_questions'].'</label></span>';
- echo ' </span>';
- echo '</p>';
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="radio" value="-1" class="enka-admin-custom small-padding" name="if_random" id="if_random_-1" '.($row['random']==-1?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val());" /><label for="if_random_-1">'.$lang['no1'].'</label>';
+ echo ' </div>';
+
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="radio" value="-2" class="enka-admin-custom small-padding" name="if_random" id="if_random_-2" '.($row['random']==-2?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val())" /><label for="if_random_-2">'.$lang['srv_block_random_blocks'].'</label>';
+ echo ' </div>';
+
+ echo ' <div class="condition_setting_line">';
+ echo ' <input type="radio" value="0" class="enka-admin-custom small-padding" name="if_random" id="if_random_0" '.($row['random']>=0?' checked="checked"':'').' onClick="if_blok_random(\''.$row['id'].'\', $(this).val())" /><label for="if_random_0">'.$lang['srv_block_random_questions'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
// Stevilo vprasanj ki jih nakljucno izberemo (ce je zgornja "da")
- echo '<p id="if_blok_random_cnt" '.(($row['random'] >= 0) ? '' : ' style="display:none;"').'><span class="title">'.$lang['srv_block_random_cnt'].':</span><span class="content">';
- echo '<select onchange="if_blok_random_cnt(\''.$row['id'].'\', $(this).val());">';
- echo ' <option value="0" '.($row['random']==0 ? 'selected' : '').'>'.$lang['srv_block_random_all'].'</option>';
+ echo '<div id="if_blok_random_cnt" class="condition_setting_holder" '.(($row['random'] >= 0) ? '' : ' style="display:none;"').'>';
+
+ echo ' <div class="condition_setting_line half-half">';
+ echo ' <label>'.$lang['srv_block_random_cnt'].':</label>';
+
+ echo ' <span class="content">';
+ echo ' <select class="dropdown medium" onchange="if_blok_random_cnt(\''.$row['id'].'\', $(this).val());">';
+ echo ' <option value="0" '.($row['random']==0 ? 'selected' : '').'>'.$lang['srv_block_random_all'].'</option>';
$sqlB = sisplet_query("SELECT count(*) AS cnt_spr FROM srv_branching
WHERE ank_id='".$this->anketa."' AND parent='".$row['id']."' AND element_spr>'0'
ORDER BY vrstni_red");
@@ -6702,102 +7857,119 @@ class Branching {
echo ' <option value="'.$i.'" '.($row['random']==$i ? 'selected' : '').'>'.$i.'</option>';
}
}
- echo '</select>';
-
+ echo ' </select>';
+ echo ' </span>';
+
+ echo ' </div>';
+
+ echo '</div>';
+
+
// Blok ki vsebuje horizontalno urejena vprasanja
- echo '<p><span class="title">'.$lang['srv_orientacija_vprasanja'].':</span><span class="content">';
- echo '<select name="if_blok_horizontal" onchange="if_blok_horizontal(\''.$row['id'].'\', $(this).val());">';
- echo ' <option value="0" '.($row['horizontal']==0?'selected':'').'>'.$lang['srv_orientacija_classic'].'</option>';
- echo ' <option value="2" '.($row['horizontal']==2?'selected':'').'>'.$lang['srv_orientacija_expand'].'</option>';
- echo ' <option value="1" '.($row['horizontal']==1?'selected':'').'>'.$lang['srv_orientacija_horizontalna_3'].'</option>';
- echo '</select>';
- echo '</span></p>';
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line half-half">';
+ echo ' <label>'.$lang['srv_orientacija_vprasanja'].':</label>';
+ echo ' <span class="content">';
+ echo ' <select class=dropdown medium" name="if_blok_horizontal" onchange="if_blok_horizontal(\''.$row['id'].'\', $(this).val());">';
+ echo ' <option value="0" '.($row['horizontal']==0?'selected':'').'>'.$lang['srv_orientacija_classic'].'</option>';
+ echo ' <option value="2" '.($row['horizontal']==2?'selected':'').'>'.$lang['srv_orientacija_expand'].'</option>';
+ echo ' <option value="1" '.($row['horizontal']==1?'selected':'').'>'.$lang['srv_orientacija_horizontalna_3'].'</option>';
+ echo ' </select>';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
// Blok kot zavihek
- echo '<p><span class="title">'.$lang['srv_block_tab'].':</span><span class="content">';
- echo '<select name="if_blok_tab" onchange="if_blok_tab(\''.$row['id'].'\', $(this).val());">';
- echo ' <option value="0" '.($row['tab']==0?'selected':'').'>'.$lang['no'].'</option>';
- echo ' <option value="1" '.($row['tab']==1?'selected':'').'>'.$lang['yes'].'</option>';
- echo '</select>';
- echo '</span></p>';
-
+ echo '<div class="condition_setting_holder">';
+
+ echo ' <div class="condition_setting_line half-half">';
+ echo ' <label>'.$lang['srv_block_tab'].':</label>';
+ echo' <span class="content">';
+ echo ' <select class="dropdown medium" name="if_blok_tab" onchange="if_blok_tab(\''.$row['id'].'\', $(this).val());">';
+ echo ' <option value="0" '.($row['tab']==0?'selected':'').'>'.$lang['no'].'</option>';
+ echo ' <option value="1" '.($row['tab']==1?'selected':'').'>'.$lang['yes'].'</option>';
+ echo ' </select>';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
// Opozorilo, da mora biti blok na svoji strani (ce je vklopljena katera od zgornjih nastavitev)
- echo '<p id="blok_pb_warning" '.($row['tab']==1 || $row['horizontal']==1 || $row['random']>=0 ? '' : ' style="display:none;"').'><span class="red bold">'.$lang['srv_block_pbWarning'].'</span></p>';
-
+ echo '<div id="blok_pb_warning" class="condition_setting_holder" '.($row['tab']==1 || $row['horizontal']==1 || $row['random']>=0 ? '' : ' style="display:none;"').'>';
+ echo ' <div class="condition_setting_line half-half">';
+ echo ' <span class="red bold">'.$lang['srv_block_pbWarning'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+
echo '</fieldset>';
}
+
+ echo '</div>';
- echo '<span id="condition_editing_bottom_placeholder"></span>';
-
- echo '<span class="buttonwrapper spaceRight floatLeft" id="if_remove_all" style="margin-bottom:10px">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="if_remove(\''.$if.'\', \'1\', \'0\'); return false;" title="'.($row['tip'] == 0 ? $lang['srv_if_rem_all'] : ($row['tip']==1?$lang['srv_block_rem_all']:$lang['srv_loop_rem_all']) ).'"><span>'.($row['tip'] == 0 ? $lang['srv_if_rem_all'] : ($row['tip']==1?$lang['srv_block_rem_all']:$lang['srv_loop_rem_all']) ).'</span></a>'."\n\r";
- echo '</span>';
+ echo '<div class="remove_condition_holder">';
- echo '<div class="clr"></div>';
+ echo ' <div id="if_remove_all" onclick="if_remove(\''.$if.'\', \'1\', \'0\'); return false;" title="'.($row['tip'] == 0 ? $lang['srv_if_rem_all'] : ($row['tip']==1?$lang['srv_block_rem_all']:$lang['srv_loop_rem_all']) ).'">';
+ echo ($row['tip'] == 0 ? $lang['srv_if_rem_all'] : ($row['tip']==1?$lang['srv_block_rem_all']:$lang['srv_loop_rem_all']) );
+ echo ' </div>';
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="condition_editing_close(\''.$if.'\'); return false;">'.$lang['srv_zapri'].'</a>';
- echo '</span>';
+ echo ' <div onclick="if_remove(\''.$if.'\'); return false;" title="'.($row['tip'] == 0 ? $lang['srv_if_rem_only'] : ($row['tip']==1?$lang['srv_block_rem_only']:$lang['srv_loop_rem_only']) ).'">';
+ echo ' <span class="faicon delete"></span>';
+ echo ($row['tip'] == 0 ? $lang['srv_if_rem_only'] : ($row['tip']==1?$lang['srv_block_rem_only']:$lang['srv_loop_rem_only']) );
+ echo ' </div>';
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="if_remove(\''.$if.'\'); return false;" title="'.($row['tip'] == 0 ? $lang['srv_if_rem'] : ($row['tip']==1?$lang['srv_block_rem']:$lang['srv_loop_rem']) ).'"><span>'.($row['tip'] == 0 ? $lang['srv_if_rem'] : ($row['tip']==1?$lang['srv_block_rem']:$lang['srv_loop_rem']) ).'</span></a>'."\n\r";
- echo '</span>';
+ echo '</div>';
- echo '</div>'; // -- div_condition_editing_float
+
+ echo '<div class="button_holder">';
- }
- // filter v DisplayData
- elseif ($vrednost == -1) {
- // tega niti ni vec...
- }
- // profili filtrov
- elseif ($vrednost == -2) {
+ echo ' <button class="small blue" onclick="condition_editing_close(\''.$if.'\'); return false;">';
+ echo $lang['srv_zapri'];
+ echo ' </button>';
+
+ echo '</div>';
+
+ echo '</div>'; // -- div_condition_editing_float
}
// klasicen popup v #div_condition_editing, uporablja se npr pri ifih za obvescanje
- elseif ($vrednost == -3) {
- echo '<span class="buttonwrapper floatRight">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="alert_if_close(\''.$vrednost.'\', \''.$if.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
- echo '<span class="buttonwrapper spaceRight floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="alert_if_close(\''.$vrednost.'\', \''.$if.'\'); return false;"><span>'.$lang['srv_zapri'].'</span></a>';
- echo '</span>';
- echo '<span class="buttonwrapper spaceRight floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="alert_if_remove(\''.$if.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span>'.$lang['srv_if_rem'].'</span></a>'."\n\r";
- echo '</span>';
-
+ elseif ($vrednost == -3) {
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="alert_if_remove(\''.$if.'\'); return false;" title="'.$lang['srv_if_rem'].'">'.$lang['srv_if_rem'].'</button>';
+ echo '<button class="medium blue" onclick="alert_if_close(\''.$vrednost.'\', \''.$if.'\'); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '</div>';
}
// validacija
- elseif ($vrednost == -4) {
- echo '<span class="buttonwrapper floatRight">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="validation_if_close(\''.$this->spremenljivka.'\', \''.$if.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
- echo '<span class="buttonwrapper spaceRight floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="validation_if_close(\''.$this->spremenljivka.'\', \''.$if.'\'); return false;"><span>'.$lang['srv_zapri'].'</span></a>';
- echo '</span>';
- echo '<span class="buttonwrapper spaceRight floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="validation_if_remove(\''.$this->spremenljivka.'\', \''.$if.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span>'.$lang['srv_if_rem'].'</span></a>'."\n\r";
- echo '</span>';
-
+ elseif ($vrednost == -4) {
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" title="'.$lang['srv_if_rem'].'" onClick="validation_if_remove(\''.$this->spremenljivka.'\', \''.$if.'\'); return false;">'.$lang['srv_if_rem'].'</button>';
+ echo '<button class="medium blue" onClick="validation_if_close(\''.$this->spremenljivka.'\', \''.$if.'\'); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '</div>';
+ }
+ // analize, podatki, vabila ipd
+ elseif ($vrednost == -2) {
}
// filter na vrednosti
- else {
- echo '<span class="buttonwrapper floatRight">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="vrednost_condition_editing_close_save(\''.$vrednost.'\', \''.$if.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
- echo '<span class="buttonwrapper spaceRight floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_condition_editing_close(\''.$vrednost.'\', \''.$if.'\'); return false;"><span>'.$lang['srv_zapri'].'</span></a>';
- echo '</span>';
- echo '<span class="buttonwrapper spaceRight floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_if_remove(\''.$if.'\', \''.$vrednost.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span>'.$lang['srv_if_rem'].'</span></a>'."\n\r";
- echo '</span>';
+ else {
+
+ echo '<div class="button_holder" id="if_popup_butons">';
+ echo '<button class="medium white-black" onClick="vrednost_condition_editing_close(\''.$vrednost.'\', \''.$if.'\'); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium white-blue" onClick="vrednost_if_remove(\''.$if.'\', \''.$vrednost.'\'); return false;">'.$lang['srv_if_rem'].'</button>';
+ echo '<button class="medium blue" onclick="vrednost_condition_editing_close_save(\''.$vrednost.'\', \''.$if.'\'); return false;">'.$lang['srv_potrdi'].'</button>';
+ echo '</div>';
}
- echo '<div class="clr"></div>';
+ echo '</div>';
?><script>
- $('#div_condition_editing_inner').sortable({items: 'form', handle: 'img.move', stop: function () {
+ $('#div_condition_editing_inner').sortable({items: 'form', handle: 'span.move', stop: function () {
condition_sort(<?=$if?>);
} });
@@ -6814,13 +7986,9 @@ class Branching {
echo '<div class="condition_editing_preview">';
- //echo '<div class="condition_editing_naslov">'.$lang['sintaksa_if'].'</div>';
-
echo '<div class="condition_editing_naslov_holder">';
echo '<div id="div_condition_editing_conditions">';
- //zacetni oklepaj za if
-// echo '<span class="zacetni-oklepaj" id="zacetni_oklepaj_'.$if.'" style="display:none;"></span>';
- $this->conditions_display($if, 1, 1);
+ $this->conditions_display($if, 1, 1, $vrednost);
echo '</div>';
echo '</div>';
echo '</div><!-- condition_editing_preview -->';
@@ -6836,25 +8004,28 @@ class Branching {
$spr_id = $row1['spr_id'];
}
- if ( ! ( mysqli_num_rows($sql1)==1 && $spr_id==0 ) ) {
- echo '<div id="div_condition_editing_operators" style="padding-left:1%">'.$lang['srv_add_cond'].' '.Help::display('srv_if_operator').':
-
- <a href="#" onclick="condition_add(\''.$if.'\', \'0\', \'0\', \''.$vrednost.'\'); return false;"><strong>&nbsp;AND&nbsp;</strong></a>,
- <a href="#" onclick="condition_add(\''.$if.'\', \'0\', \'1\', \''.$vrednost.'\'); return false;"><strong>&nbsp;AND NOT&nbsp;</strong></a>,
- <a href="#" onclick="condition_add(\''.$if.'\', \'1\', \'0\', \''.$vrednost.'\'); return false;"><strong>&nbsp;OR&nbsp;</strong></a>,
- <a href="#" onclick="condition_add(\''.$if.'\', \'1\', \'1\', \''.$vrednost.'\'); return false;"><strong>&nbsp;OR NOT&nbsp;</strong></a></div>';
- }
+ echo '</div><!-- class="condition_editing_body"-->';
- echo '</div><!-- class="condition_editing_body"-->';
+
+ if ( ! ( mysqli_num_rows($sql1)==1 && $spr_id==0 ) ) {
+ echo '<div id="div_condition_editing_operators" class="div_condition_bottom">'.$lang['srv_add_cond'].' '.Help::display('srv_if_operator').':
- // blok
- } elseif ($row['tip'] == 1) {
+ <a href="#" class="noline" onclick="condition_add(\''.$if.'\', \'0\', \'0\', \''.$vrednost.'\'); return false;">AND</a>,
+ <a href="#" class="noline" onclick="condition_add(\''.$if.'\', \'0\', \'1\', \''.$vrednost.'\'); return false;">AND NOT</a>,
+ <a href="#" class="noline" onclick="condition_add(\''.$if.'\', \'1\', \'0\', \''.$vrednost.'\'); return false;">OR</a>,
+ <a href="#" class="noline" onclick="condition_add(\''.$if.'\', \'1\', \'1\', \''.$vrednost.'\'); return false;">OR NOT</a></div>';
+ }
+ }
+ // blok
+ elseif ($row['tip'] == 1) {
//ko imamo BLOCK prikažemo začetek oklepaja
- echo '<strong class="clr_bl">BLOCK</strong> <span class="colorblock">('.$row['number'].')</span>'.($row['enabled']==2?' FALSE ':'').($row['label']!=''?' <span class="if_comment">( '.$row['label'].' )</span>':'').'';
+ echo '<span class="clr_bl">BLOCK</span> <span class="colorblock">('.$row['number'].')</span>'.($row['enabled']==2?' FALSE ':'').($row['label']!=''?' <span class="if_comment">( '.$row['label'].' )</span>':'').'';
+
+ }
// zanka
- } elseif ($row['tip'] == 2) {
+ elseif ($row['tip'] == 2) {
//začetni oklepaj za zanko
$this->loop_display($if);
@@ -6906,16 +8077,19 @@ class Branching {
if ($vrednost == 0) { // ce imamo obicn if v branchingu ali v DisplayData
$vrstni_red = $this->vrstni_red($this->find_before_if($row['if_id']));
- } elseif ($vrednost == -1 or $vrednost == -2 or $vrednost == -3) { // filter v DisplayData.php (prikazemo vse spremenljivke)
+ }
+ elseif ($vrednost == -1 or $vrednost == -2 or $vrednost == -3) { // filter v DisplayData.php (prikazemo vse spremenljivke)
$vrstni_red = PHP_INT_MAX;
- } elseif ($vrednost == -4) { // validacija
+ }
+ elseif ($vrednost == -4) { // validacija
if (!$this->spremenljivka > 0) {
$sqlv = sisplet_query("SELECT spr_id FROM srv_validation WHERE if_id = '$row[if_id]'");
$rowv = mysqli_fetch_array($sqlv);
$this->spremenljivka = $rowv['spr_id'];
}
$vrstni_red = $this->vrstni_red($this->spremenljivka);
- } else { // ce imamo podif na vrednosti
+ }
+ else { // ce imamo podif na vrednosti
$sqlv = sisplet_query("SELECT spr_id FROM srv_vrednost WHERE if_id='$row[if_id]'");
$rowv = mysqli_fetch_array($sqlv);
$vrstni_red = $this->vrstni_red($rowv['spr_id']);
@@ -6925,81 +8099,93 @@ class Branching {
if (!$sql_count) die();
$row_count = mysqli_fetch_array($sql_count);
- if ($row['vrstni_red'] == 1 && $row_count['count'] > 1) {
- echo '<table class="tbl_condition_editing">';
- echo '<tr>';
- echo '<th style="text-align:center; width:50px">'.$lang['srv_oklepaji'].'</th>'; // gumbi oklepaji
- echo '<th style="width:70px">&nbsp;</th>'; // logicni operatorji
- echo '<th style="width:50px">&nbsp;</th>'; // oklepaji
- echo '<th >&nbsp;</th>';
- echo '<th style="text-align:center; width:50px;">'.$lang['srv_zaklepaji'].'</th>'; // gumbi zaklepaji
- echo '<th style="text-align:center; width:60px">'.$lang['edit2'].'</th>'; // move
- echo '</tr>';
- echo '</table>';
- } elseif ($row['vrstni_red'] == 1) {
- echo '<table class="tbl_condition_editing"><tr><th>&nbsp;</th></tr></table>';
+ // form
+ echo '<form name="condition_'.$condition.'" action="" method="post" onsubmit="condition_edit(\''.$condition.'\'); return false;" id="condition_'.$condition.'">';
+
+
+ // Operator pred pogojem
+ echo '<div class="condition_editing_row conjunction">';
+
+ $operator = $row['conjunction'].'_'.$row['negation'];
+
+ echo '<input type="hidden" name="conjunction_'.$condition.'" id="conjunction_'.$condition.'" value="'.$row['conjunction'].'_'.$row['negation'].'" />';
+
+ // Prikazujemo samo pri prvem in ce je ze izbran not
+ if ($row['vrstni_red'] == 1) {
+
+ if($row['negation'] == 1)
+ echo '<span style="font-weight:bold"><a href="#" onclick="conjunction_edit(\''.$condition.'\', \'0\', \'0\'); return false;">&nbsp;&nbsp;not&nbsp;&nbsp;</a></span>';
+ }
+ else {
+
+ echo '<select name="conjunction_dropdown_'.$condition.'" id="conjunction_dropdown_'.$condition.'" class="dropdown medium" onChange="conjunction_dropdown_edit(\''.$condition.'\'); return false;">';
+ echo ' <option value="0_0" '.($operator == '0_0' ? 'selected="selected"' : '').'>AND</option>';
+ echo ' <option value="1_0" '.($operator == '1_0' ? 'selected="selected"' : '').'>OR</option>';
+ echo ' <option value="0_1" '.($operator == '0_1' ? 'selected="selected"' : '').'>AND NOT</option>';
+ echo ' <option value="1_1" '.($operator == '1_1' ? 'selected="selected"' : '').'>OR NOT</option>';
+ echo '</select>';
}
+ echo '</div>';
+
+
+ // Urejanje 1 vrstice pogoja
+ echo '<div class="condition_editing_row">';
- // form
- echo '<form name="condition_'.$condition.'" action="" method="post" onsubmit="condition_edit(\''.$condition.'\'); return false;" id="condition_'.$condition.'">'."\n\r";
- echo '<table class="tbl_condition_editing" style="margin-bottom:10px; background-color:white" >';
- echo '<tr>';
+ // Move handle
+ echo '<div class="move_holder">';
+ if ($row_count['count'] != 1 )
+ echo '<span class="faicon move_updown move" title="'.$lang['srv_move'].'"></span>';
+ echo '</div>';
+
+
+ // Glavni del urejanja
+ echo '<div class="white_holder">';
+
// left_bracket
+ echo '<div class="column bracket left">';
+
if ($row_count['count'] != 1 || $row['left_bracket']>0 || $row['right_bracket']>0) {
- echo '<td class="tbl_ce_lol white" style="width:50px; text-align:center;" >';
- echo '<a href="#" onclick="javascript:bracket_edit_new(\''.$condition.'\', \''.$vrednost.'\', \'left\', \'plus\' ); return false;" title="'.$lang['srv_oklepaj_add'].'"><span class="faicon add small"></span></a>';
- if ($row['left_bracket'] > 0)
+
+ echo '<div class="bracket_icons">';
+
+ echo '<a href="#" onclick="javascript:bracket_edit_new(\''.$condition.'\', \''.$vrednost.'\', \'left\', \'plus\' ); return false;" title="'.$lang['srv_oklepaj_add'].'"><span class="faicon add"></span></a>';
+
+ if ($row['left_bracket'] > 0)
echo '<a href="#" onclick="javascript:bracket_edit_new(\''.$condition.'\', \''.$vrednost.'\', \'left\', \'minus\'); return false;" title="'.$lang['srv_oklepaj_rem'].'"><span class="faicon delete_circle"></span></a>';
else
echo '<span class="faicon delete_circle icon-grey_normal"></span>';
- } else {
- echo '<td class="tbl_ce_lol white" style="width:50px; text-align:center;" >';
- }
- echo '</td>';
+ echo '</div>';
- // conjunction
- echo '<td class="tbl_ce_tb white" style="width:70px; text-align:center">';
- if ($row['vrstni_red'] == 1) {
- echo '<input type="hidden" name="conjunction_'.$condition.'" id="conjunction_'.$condition.'" value="'.$row['conjunction'].'_'.$row['negation'].'" />';
+ echo '<div class="bracket_text">'.$lang['srv_oklepaji'].'</div>';
+ }
- // prikazujemo samo ce je ze izbran not
- if ($row['negation']==1)
- echo '<span style="font-weight:bold"><a href="#" onclick="conjunction_edit(\''.$condition.'\', \'0\', \'0\'); return false;">&nbsp;&nbsp;not&nbsp;&nbsp;</a></span>';
+ echo '</div>';
- } else {
- echo '<input type="hidden" name="conjunction_'.$condition.'" id="conjunction_'.$condition.'" value="'.$row['conjunction'].'_'.$row['negation'].'" />';
+ // display bracket
+ echo '<div class="column display_bracket left">';
- if ($row['conjunction']==0 && $row['negation']==0)
- echo '<span style="font-weight:bold"><a href="#" onclick="conjunction_edit(\''.$condition.'\', \'1\', \'0\'); return false;" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;&nbsp;AND&nbsp;&nbsp;</a></span>';
- if ($row['conjunction']==1 && $row['negation']==0)
- echo '<span style="font-weight:bold"><a href="#" onclick="conjunction_edit(\''.$condition.'\', \'0\', \'1\'); return false;" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;&nbsp;OR&nbsp;&nbsp;</a></span>';
- if ($row['conjunction']==0 && $row['negation']==1)
- echo '<span style="font-weight:bold"><a href="#" onclick="conjunction_edit(\''.$condition.'\', \'1\', \'1\'); return false;" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;AND NOT&nbsp;</a></span>';
- if ($row['conjunction']==1 && $row['negation']==1)
- echo '<span style="font-weight:bold"><a href="#" onclick="conjunction_edit(\''.$condition.'\', \'0\', \'0\'); return false;" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;OR NOT&nbsp;</a></span>';
+ for ($i=1; $i<=$row['left_bracket']; $i++) echo ' ( ';
- }
- echo '</td>';
+ echo '</div>';
- // display bracket
- echo '<td class="tbl_ce_tb white" style="width:50px; text-align:center" nowrap>';
- for ($i=1; $i<=$row['left_bracket']; $i++) echo ' ( ';
- echo '</td>';
// spremenljivka
- echo '<td class="tbl_ce_tb white" style="width:150px">'.($row['spr_id']=='0'?'<span class="red">'.$lang['srv_select_spr'].'!</span>':'').'<br />';
- echo '<select class="spremenljivka_select spaceRight" name="spremenljivka_'.$condition.'" id="spremenljivka_'.$condition.'" size="1" style="width:150px" onchange="javascript:fill_value(\''.$condition.'\', \''.$vrednost.'\');">'."\n\r";
+ echo '<div class="column variable">';
+
+ if($row['spr_id']=='0')
+ echo '<span class="red">'.$lang['srv_select_spr'].'!</span><br />';
+
+ echo '<select class="spremenljivka_select dropdown medium" name="spremenljivka_'.$condition.'" id="spremenljivka_'.$condition.'" size="1" style="width:150px" onchange="javascript:fill_value(\''.$condition.'\', \''.$vrednost.'\');">';
echo '<option value="0"></option>';
echo '<option value="-1"'.($row['spr_id']==-1?' selected="selected"':'').' style="color:blue">&nbsp;&nbsp;&nbsp; '.$lang['srv_random_groups'].'</option>';
echo '<option value="-2"'.($row['spr_id']==-2?' selected="selected"':'').' style="color:blue">&nbsp;&nbsp;&nbsp; '.$lang['srv_calc'].'</option>';
// Kvota
- //if($admin_type == 0)
echo '<option value="-3"'.($row['spr_id']==-3?' selected="selected"':'').' style="color:blue">&nbsp;&nbsp;&nbsp; '.$lang['srv_quota'].'</option>';
echo '<option value="-4"'.($row['spr_id']==-4?' selected="selected"':'').' style="color:blue">&nbsp;&nbsp;&nbsp; '.$lang['srv_device'].'</option>';
@@ -7197,14 +8383,15 @@ class Branching {
}
}
- echo '</select><br />&nbsp;'."\n\r";
- echo '</td>';
+ echo '</select>';
+
+ echo '</div>';
// span, ki se updata ob spremembi spremenljivke
- echo '<td class="tbl_ce_tb white">';
+ echo '<div class="column operator">';
- echo '<span id="fill_vrednost_'.$condition.'">'."\n\r";
+ echo '<span id="fill_vrednost_'.$condition.'" class="fill_vrednost">';
if ($edit_fill_value == $condition)
$edit_value = true;
@@ -7217,50 +8404,56 @@ class Branching {
$this->fill_value($condition, $row['spr_id'], $row['vre_id'], $row['grd_id'], $edit_value);
- echo '</span>'."\n\r";
- echo '</td>';
+ echo '</span>';
+
+ echo '</div>';
+
// display right bracket
- echo '<td class="tbl_ce_tb white" style="width:50px; text-align:center" nowrap>';
+ echo '<div class="column display_bracket right">';
+
if ($row_count['count'] != 1 || $row['right_bracket']>0 || $row['left_bracket']>0) {
for ($i=1; $i<=$row['right_bracket']; $i++) echo ' ) ';
}
- echo '</td>';
+
+ echo '</div>';
+
// right_bracket buttons
+ echo '<div class="column bracket right">';
+
if ($row_count['count'] != 1 || $row['right_bracket']>0 || $row['left_bracket']>0) {
- echo '<td class="tbl_ce_tb white" style="width:50px; text-align:center" nowrap>';
+ echo '<div class="bracket_icons">';
+
if ($row['right_bracket'] > 0)
echo '<a href="#" onclick="javascript:bracket_edit_new(\''.$condition.'\', \''.$vrednost.'\', \'right\', \'minus\'); return false;" title="'.$lang['srv_zaklepaj_rem'].'"><span class="faicon delete_circle"></span></a>';
else
echo '<span class="faicon delete_circle icon-grey_normal"></span>';
- echo '<a href="#" onclick="javascript:bracket_edit_new(\''.$condition.'\', \''.$vrednost.'\', \'right\', \'plus\' ); return false;" title="'.$lang['srv_zaklepaj_add'].'"><span class="faicon add small"></span></a>';
- }
- else {
- echo '<td class="tbl_ce_tb white" style="width:50px; text-align:center" nowrap>';
+ echo '<a href="#" onclick="javascript:bracket_edit_new(\''.$condition.'\', \''.$vrednost.'\', \'right\', \'plus\' ); return false;" title="'.$lang['srv_zaklepaj_add'].'"><span class="faicon add"></span></a>';
+
+ echo '</div>';
+
+ echo '<div class="bracket_text">'.$lang['srv_zaklepaji'].'</div>';
}
- echo '</td>';
+ echo '</div>';
- // move
- echo '<td class="tbl_ce_tb white" style="text-align:right; width:30px">';
- if ($row_count['count'] != 1 )
- echo '<img src="img_0/move_updown.png" class="move" title="'.$lang['srv_move'].'" />';
- echo '</td>';
- // remove
- echo '<td class="tbl_ce_lor white" style="text-align:left; width:30px">';
+ echo '</div>';
+
+
+ // Delete icon
+ echo '<div class="delete_holder">';
if ($row_count['count'] != 1 )
- echo '<a href="#" onclick="condition_remove(\''.$row['if_id'].'\', \''.$condition.'\', \''.$vrednost.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span class="faicon delete icon-grey_dark_link"></span></a>'."\n";
- echo '</td>';
+ echo '<a href="#" onclick="condition_remove(\''.$row['if_id'].'\', \''.$condition.'\', \''.$vrednost.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span class="faicon delete"></span></a>';
+ echo '</div>';
- echo '</tr>';
- echo '</table>';
+ echo '</div>';
- echo '</form>'."\n\r";
+ echo '</form>';
}
/**
@@ -7277,17 +8470,17 @@ class Branching {
// navadne spremenljivke (vkljucno z multigrid)
if ($spremenljivka > 0) {
+ $preview = '';
+
// zato, da z JS vemo kaj poslat po AJAXu, ID vrednosti ali text
echo '<input type="hidden" name="tip_'.$condition.'" id="tip_'.$condition.'" value="'.$row1['tip'].'" >';
// operator
- echo '<select name="operator_'.$condition.'" id="operator_'.$condition.'" onchange="javascript:condition_edit(\''.$condition.'\');" style="width:45px">'."\n\r";
+ echo '<select name="operator_'.$condition.'" id="operator_'.$condition.'" class="dropdown medium operator" onchange="javascript:condition_edit(\''.$condition.'\');">'."\n\r";
echo ' <option value="0"'.($row['operator']==0?' selected="selected"':'').'>=</option>'."\n\r";
echo ' <option value="1"'.($row['operator']==1?' selected="selected"':'').'>&ne;</option>'."\n\r";
- // echo ' <option value="1"'.($row['operator']==1?' selected':'').'>≠</option>'."\n\r";
if ($row1['tip'] == 7 || $row1['tip'] == 8 || $row1['tip'] == 22 || $row1['tip'] == 25 || $row1['tip'] == 20 || $row1['tip'] == 18) {
- // number in compute in tabela number ma dodatne operatorje
echo ' <option value="2"'.($row['operator']==2?' selected="selected"':'').'><</option>'."\n\r";
echo ' <option value="3"'.($row['operator']==3?' selected="selected"':'').'><=</option>'."\n\r";
echo ' <option value="4"'.($row['operator']==4?' selected="selected"':'').'>></option>'."\n\r";
@@ -7307,7 +8500,7 @@ class Branching {
// number in textbox, vsota imajo textovni input (ter compute in kvota)
if ($row1['tip'] == 4 || $row1['tip'] == 21 || $row1['tip'] == 7 || $row1['tip'] == 22 || $row1['tip'] == 25 || $row1['tip'] == 18)
{
- echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" value="'.$row['text'].'" style="width:140px" >';
+ echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" class="medium" value="'.$row['text'].'">';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -7351,13 +8544,12 @@ class Branching {
// obicajna spremenljivka
if ($vrednost <= 0) {
- echo '<span id="edit_fill_value_'.$condition.'"'.($edit_value?'':' style="display: none"').'>';
+ echo '<span id="edit_fill_value_'.$condition.'" class="edit_fill_value" '.($edit_value?'':' style="display: none"').'>';
$sql1 = sisplet_query("SELECT COUNT(*) AS count FROM srv_condition_vre WHERE cond_id='$condition'");
$row1 = mysqli_fetch_array($sql1);
- if ($row1['count'] == 0) echo '<span class="red">';
- echo $lang['srv_note_vrednost'].':<br />';
- if ($row1['count'] == 0) echo '</span>';
+
+ echo '<span '.($row1['count'] == 0 ? 'class="red"' : '').'>'.$lang['srv_note_vrednost'].':</span>';
$sql = sisplet_query("SELECT id, naslov, variable FROM srv_vrednost WHERE spr_id='$spremenljivka' ORDER BY vrstni_red ASC");
while ($row = mysqli_fetch_array($sql)) {
@@ -7368,9 +8560,9 @@ class Branching {
else
$selected = '';
- echo '<label for="vrednost_'.$condition.'_'.$row['id'].'" style="height:1em; overflow:hidden;" nowrap><input type="checkbox" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_'.$row['id'].'" value="'.$row['id'].'" class="enka-admin-custom" '.$selected.' onclick="condition_edit(\''.$condition.'\');" /><span class="enka-checkbox-radio"></span> ('.$row['variable'].') '.strip_tags($row['naslov']).'</label><br />'."\n\r";
+ echo '<input type="checkbox" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_'.$row['id'].'" value="'.$row['id'].'" class="enka-admin-custom" '.$selected.' onclick="condition_edit(\''.$condition.'\');" /><label for="vrednost_'.$condition.'_'.$row['id'].'"><span class="enka-checkbox-radio"></span> ('.$row['variable'].') '.strip_tags($row['naslov']).'</label>';
if ($selected != '')
- $preview .= /*($preview!=''?', ':'').*/'('.$row['variable'].') '.strip_tags($row['naslov']).'<br>';
+ $preview .= '<span>('.$row['variable'].') '.strip_tags($row['naslov']).'</span>';
}
@@ -7379,21 +8571,22 @@ class Branching {
$rowC = mysqli_fetch_array($sqlC);
$current_grupa = $this->getGrupa4If($rowC['if_id']);
$selected_grupa = $this->getGrupa4Spremenljivka($spremenljivka);
- if($selected_grupa['vrstni_red'] != $current_grupa['vrstni_red']){
+ if(isset($selected_grupa['vrstni_red']) && isset($current_grupa['vrstni_red']) && $selected_grupa['vrstni_red'] != $current_grupa['vrstni_red']){
$sql1 = sisplet_query("SELECT * FROM srv_condition_vre WHERE cond_id='$condition' AND vre_id='-1'");
if (mysqli_num_rows($sql1) > 0)
$selected = ' checked="checked"';
else
$selected = '';
- echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_-1" value="-1"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><span class="enka-checkbox-radio"></span><label for="vrednost_'.$condition.'_-1" style="height:1em; overflow:hidden;" nowrap> (-1) '.$lang['srv_mv_Ni odgovoril'].'</label><br />'."\n\r";
+ echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_-1" value="-1"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><label for="vrednost_'.$condition.'_-1"><span class="enka-checkbox-radio"></span>(-1) '.$lang['srv_mv_Ni odgovoril'].'</label>';
if ($selected != '')
- $preview .= '(-1) '.$lang['srv_mv_Ni odgovoril'].'<br>';
+ $preview .= '<span>(-1) '.$lang['srv_mv_Ni odgovoril'].'</span>';
}
echo '</span>';
- echo '<a href="#" onclick="edit_fill_value(\''.$condition.'\'); return false;" id="preview_fill_value_'.$condition.'"'.($edit_value?' style="display: none"':'').' title="'.$lang['srv_note_vrednost'].'!">'.($preview!=''?$preview:$lang['srv_error_vrednost']).'</a>';
+ echo '<div id="preview_fill_value_'.$condition.'" class="preview_fill_value" '.($edit_value ? 'style="display:none"' : '').'>'.($preview != '' ? $preview : $lang['srv_error_vrednost']).'</div>';
+ echo '<a href="#" id="preview_fill_link_'.$condition.'" '.($edit_value ? 'style="display:none"' : '').' onclick="edit_fill_value(\''.$condition.'\'); return false;" title="'.$lang['srv_note_vrednost'].'!"><span class="faicon edit"></span></a>';
// multigrid (tuki mamo poleg spremenljivke vrednost, ki oznacuje element)
} elseif ($vrednost > 0) {
@@ -7401,13 +8594,12 @@ class Branching {
// tabela radio, tabela checkbox
if ($grid == 0) {
- echo '<span id="edit_fill_value_'.$condition.'"'.($edit_value?'':' style="display: none"').'>';
+ echo '<span id="edit_fill_value_'.$condition.'" class="edit_fill_value" '.($edit_value?'':' style="display: none"').'>';
$sql1c = sisplet_query("SELECT COUNT(*) AS count FROM srv_condition_grid WHERE cond_id='$condition'");
$row1c = mysqli_fetch_array($sql1c);
- if ($row1c['count'] == 0) echo '<span class="red">';
- echo $lang['srv_note_vrednost'].':<br />';
- if ($row1c['count'] == 0) echo '</span>';
+
+ echo '<span '.($row1c['count'] == 0 ? 'class="red"' : '').'>'.$lang['srv_note_vrednost'].':</span>';
if ($row1['tip'] == 6 || $row1['tip'] == 16) {
@@ -7427,9 +8619,9 @@ class Branching {
$sql2 = sisplet_query("SELECT naslov, variable FROM srv_grid WHERE id='$i' AND spr_id='$row[id]'");
$row2 = mysqli_fetch_array($sql2);
- echo '<label for="vrednost_'.$condition.'_'.$i.'" style="height:1em; overflow:hidden;" nowrap><input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_'.$i.'" value="'.$i.'"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><span class="enka-checkbox-radio"></span> ('.$row2['variable'].') '.strip_tags($row2['naslov']).'</label><br />'."\n\r";
+ echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_'.$i.'" value="'.$i.'"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><label for="vrednost_'.$condition.'_'.$i.'"><span class="enka-checkbox-radio"></span> ('.$row2['variable'].') '.strip_tags($row2['naslov']).'</label>';
if ($selected != '')
- $preview .= /*($preview!=''?', ':'').*/'('.$row2['variable'].') '.strip_tags($row2['naslov']).'<br>';
+ $preview .= '<span>('.$row2['variable'].') '.strip_tags($row2['naslov']).'</span>';
}
// Ce je bilo vprasanje na prejsnji strani imamo tudi pogoj -1 (neodgovor)
@@ -7437,15 +8629,16 @@ class Branching {
$rowC = mysqli_fetch_array($sqlC);
$current_grupa = $this->getGrupa4If($rowC['if_id']);
$selected_grupa = $this->getGrupa4Spremenljivka($spremenljivka);
+
if($selected_grupa['vrstni_red'] != $current_grupa['vrstni_red']){
$sql1 = sisplet_query("SELECT * FROM srv_condition_grid WHERE cond_id='$condition' AND grd_id='-1'");
if (mysqli_num_rows($sql1) > 0)
$selected = ' checked="checked"';
else
$selected = '';
- echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_-1" value="-1"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><span class="enka-checkbox-radio"></span><label for="vrednost_'.$condition.'_-1" style="height:1em; overflow:hidden;" nowrap> (-1) '.$lang['srv_mv_Ni odgovoril'].'</label><br />'."\n\r";
+ echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_-1" value="-1"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><label for="vrednost_'.$condition.'_-1"><span class="enka-checkbox-radio"></span>(-1) '.$lang['srv_mv_Ni odgovoril'].'</label>';
if ($selected != '')
- $preview .= '(-1) '.$lang['srv_mv_Ni odgovoril'].'<br>';
+ $preview .= '<span>(-1) '.$lang['srv_mv_Ni odgovoril'].'</span>';
}
// ranking
@@ -7464,22 +8657,23 @@ class Branching {
else
$selected = '';
- echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_'.$i.'" value="'.$i.'"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><span class="enka-checkbox-radio"></span><label for="vrednost_'.$condition.'_'.$i.'" style="height:1em; overflow:hidden;" nowrap> ('.$i.') '.$i.'. '.$lang['srv_position'].'</label><br />'."\n\r";
+ echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$condition.'" id="vrednost_'.$condition.'_'.$i.'" value="'.$i.'"'.$selected.' onclick="condition_edit(\''.$condition.'\');" /><label for="vrednost_'.$condition.'_'.$i.'"><span class="enka-checkbox-radio"></span>('.$i.') '.$i.'. '.$lang['srv_position'].'</label>';
if ($selected != '')
- $preview .= /*($preview!=''?', ':'').*/'('.$i.') '.$i.'. '.$lang['srv_position'].'<br>';
+ $preview .= '<span>('.$i.') '.$i.'. '.$lang['srv_position'].'</span>';
}
}
echo '</span>';
- echo '<a href="#" onclick="edit_fill_value(\''.$condition.'\'); return false;" id="preview_fill_value_'.$condition.'"'.($edit_value?' style="display: none"':'').' title="'.$lang['srv_note_vrednost'].'!">'.($preview!=''?$preview:$lang['srv_error_vrednost']).'</a>';
-
+ echo '<div id="preview_fill_value_'.$condition.'" class="preview_fill_value" '.($edit_value ? 'style="display:none"' : '').'>'.($preview != '' ? $preview : $lang['srv_error_vrednost']).'</div>';
+ echo '<a href="#" id="preview_fill_link_'.$condition.'" '.($edit_value ? 'style="display:none"' : '').' onclick="edit_fill_value(\''.$condition.'\'); return false;" title="'.$lang['srv_note_vrednost'].'!"><span class="faicon edit"></span></a>';
+
// tabela text, tabela stevilo
} else {
- echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" value="'.$row['text'].'" style="width:140px" >';
+ echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" class="medium" value="'.$row['text'].'">';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -7499,14 +8693,14 @@ class Branching {
// zato, da z JS vemo kaj poslat po AJAXu, ID vrednosti ali text
echo '<input type="hidden" name="tip_'.$condition.'" id="tip_'.$condition.'" value="-1" />'."\n\r";
- echo $lang['srv_groups'].': <select name="modul_'.$condition.'" id="modul_'.$condition.'" style="width:40px" onchange="javascript:fill_ostanek(\''.$condition.'\');">'."\n\r";
+ echo '<label>'.$lang['srv_groups'].':</label><select name="modul_'.$condition.'" id="modul_'.$condition.'" class="dropdown medium" onchange="javascript:fill_ostanek(\''.$condition.'\');">'."\n\r";
for ($i=2; $i<=64; $i++)
echo '<option value="'.$i.'"'.($row['modul']==$i?' selected="selected"':'').'>'.$i.'</option>';
echo '</select>'."\n\r";
- echo '<span id="'.$condition.'_ostanek">';
+ echo '<span id="'.$condition.'_ostanek" class="ostanek">';
$this->fill_ostanek($condition);
echo '</span>'."\n\r";
@@ -7517,22 +8711,22 @@ class Branching {
echo '<input type="hidden" name="tip_'.$condition.'" id="tip_'.$condition.'" value="-2" />'."\n\r";
$text = $this->calculations_display($condition);
- if ($text == '<span class="calculations_display"></span>') $text = $lang['srv_editcalculation'];
+ if ($text == '<span class="calculations_display"></span>')
+ $text = '';
- echo ' <a href="#" onclick="calculation_editing(\''.$condition.'\', \'0\', \''.$vrednost.'\'); $(\'#calculation\').css({\'position\': \'absolute\'}); return false;">'.$text.'</a> ';
+ echo $text.'<a href="#" onclick="calculation_editing(\''.$condition.'\', \'0\', \''.$vrednost.'\'); $(\'#calculation\').css({\'position\': \'absolute\'}); return false;"><span class="faicon edit"></span></a> ';
// operator
- echo '<select name="operator_'.$condition.'" id="operator_'.$condition.'" onchange="javascript:condition_edit(\''.$condition.'\');" style="width:45px">'."\n\r";
+ echo '<select name="operator_'.$condition.'" id="operator_'.$condition.'" onchange="javascript:condition_edit(\''.$condition.'\');" class="dropdown medium">'."\n\r";
echo ' <option value="0"'.($row['operator']==0?' selected':'').'>=</option>'."\n\r";
echo ' <option value="1"'.($row['operator']==1?' selected':'').'>&ne;</option>'."\n\r";
-// echo ' <option value="1"'.($row['operator']==1?' selected':'').'>≠</option>'."\n\r";
echo ' <option value="2"'.($row['operator']==2?' selected':'').'><</option>'."\n\r";
echo ' <option value="3"'.($row['operator']==3?' selected':'').'><=</option>'."\n\r";
echo ' <option value="4"'.($row['operator']==4?' selected':'').'>></option>'."\n\r";
echo ' <option value="5"'.($row['operator']==5?' selected':'').'>>=</option>'."\n\r";
echo '</select> '."\n\r";
- echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" value="'.$row['text'].'" style="width:40px;" />';
+ echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" class="medium" value="'.$row['text'].'" />';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -7550,22 +8744,22 @@ class Branching {
$SQ = new SurveyQuotas($this->anketa);
$text = $SQ->quota_display($condition);
- if ($text == '<span class="quota_display"></span>') $text = $lang['srv_edit_quota'];
+ if ($text == '<span class="quota_display"></span>')
+ $text = '';
- echo ' <a href="#" onclick="quota_editing(\''.$condition.'\', \'0\', \''.$vrednost.'\'); $(\'#quota\').css({\'position\': \'absolute\'}); return false;">'.$text.'</a> ';
+ echo $text.'<a href="#" onclick="quota_editing(\''.$condition.'\', \'0\', \''.$vrednost.'\'); $(\'#quota\').css({\'position\': \'absolute\'}); return false;"><span class="faicon edit"></span></a> ';
// operator
- echo '<select name="operator_'.$condition.'" id="operator_'.$condition.'" onchange="javascript:condition_edit(\''.$condition.'\');" style="width:45px">'."\n\r";
+ echo '<select name="operator_'.$condition.'" id="operator_'.$condition.'" onchange="javascript:condition_edit(\''.$condition.'\');" class="dropdown medium">'."\n\r";
echo ' <option value="0"'.($row['operator']==0?' selected':'').'>=</option>'."\n\r";
echo ' <option value="1"'.($row['operator']==1?' selected':'').'>&ne;</option>'."\n\r";
-// echo ' <option value="1"'.($row['operator']==1?' selected':'').'>≠</option>'."\n\r";
echo ' <option value="2"'.($row['operator']==2?' selected':'').'><</option>'."\n\r";
echo ' <option value="3"'.($row['operator']==3?' selected':'').'><=</option>'."\n\r";
echo ' <option value="4"'.($row['operator']==4?' selected':'').'>></option>'."\n\r";
echo ' <option value="5"'.($row['operator']==5?' selected':'').'>>=</option>'."\n\r";
echo '</select> '."\n\r";
- echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" value="'.$row['text'].'" style="width:40px;" />';
+ echo '<input type="text" name="text_'.$condition.'" id="text_'.$condition.'" class="medium" value="'.$row['text'].'" />';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -7581,7 +8775,7 @@ class Branching {
// zato, da z JS vemo kaj poslat po AJAXu, ID vrednosti ali text
echo '<input type="hidden" name="tip_'.$condition.'" id="tip_'.$condition.'" value="-4" />'."\n\r";
- echo $lang['srv_device_type'].': <select name="text_'.$condition.'" id="text_'.$condition.'" style="width:100px" onchange="javascript:condition_edit(\''.$condition.'\');">'."\n\r";
+ echo '<label>'.$lang['srv_device_type'].':</label><select name="text_'.$condition.'" id="text_'.$condition.'" class="dropdown medium" onchange="javascript:condition_edit(\''.$condition.'\');">'."\n\r";
echo '<option value="-1"'.($row['text']=='' || $row['text']=='-1'?' selected="selected"':'').'>'.$lang['srv_device_type_select'].'</option>';
echo '<option value="0"'.($row['text']=='0'?' selected="selected"':'').'>'.$lang['srv_para_graph_device0'].'</option>';
echo '<option value="1"'.($row['text']=='1'?' selected="selected"':'').'>'.$lang['srv_para_graph_device1'].'</option>';
@@ -7600,12 +8794,12 @@ class Branching {
$sql = sisplet_query("SELECT * FROM srv_condition WHERE id='$condition'");
$row = mysqli_fetch_array($sql);
- echo $lang['srv_group'].': <select name="ostanek_'.$condition.'" id="ostanek_'.$condition.'" style="width:40px" onchange="javascript:condition_edit(\''.$condition.'\');">'."\n\r";
+ echo '<label>'.$lang['srv_group'].':</label><select name="ostanek_'.$condition.'" id="ostanek_'.$condition.'" class="dropdown medium" onchange="javascript:condition_edit(\''.$condition.'\');">';
for ($i=0; $i<$row['modul']; $i++)
echo '<option value="'.$i.'"'.($row['ostanek']==$i?' selected="selected"':'').'>'.($i+1).'</option>';
- echo '</select>'."\n\r";
+ echo '</select>';
}
@@ -7638,11 +8832,12 @@ class Branching {
$prev_grupa = 0;
- echo '<table style="width:100%"><tr>';
+ echo '<div class="condition_editing_row loop_row">';
+ echo '<div class="white_holder">';
- echo '<td style="width:40%; text-align:center">';
+ echo '<div class="column">';
- echo $lang['srv_loop_for'].' <select name="spremenljivka_'.$if.'" id="spremenljivka_'.$if.'" size="1" style="width:150px" onchange="javascript:fill_value_loop(\''.$if.'\');">';
+ echo $lang['srv_loop_for'].' <select name="spremenljivka_'.$if.'" id="spremenljivka_'.$if.'" class="dropdown medium" size="1" style="width:150px; margin: 0 8px;" onchange="javascript:fill_value_loop(\''.$if.'\');">';
echo '<option value="0"></option>';
$sql1 = sisplet_query("SELECT s.id, s.naslov, s.variable, s.gru_id, g.naslov AS grupa_naslov
@@ -7671,7 +8866,10 @@ class Branching {
if ($spremenljivka > 0 && ($tip==2 || $tip==3))
echo $lang['srv_loop_for_when'].(!$advanced?' '.$lang['srv_loop_when_checked']:'');
- echo '</td><td>';
+ echo '</div>';
+
+
+ echo '<div class="column options">';
if ($spremenljivka > 0 && ($tip==2 ||$tip==3)) { // spremenljivka je izbrana in ne gre za sn-imena
@@ -7701,8 +8899,8 @@ class Branching {
if (mysqli_num_rows($sql3) > 0) $selected = ' checked'; else $selected = '';
echo '<input type="checkbox" class="enka-admin-custom" name="vrednost_'.$if.'" id="vrednost_'.$if.'_'.$row2['id'].'" value="'.$row2['id'].'" '.$selected.' onclick="loop_edit(\''.$if.'\');" />';
- echo '<span class="enka-checkbox-radio"></span>';
- echo'<label for="vrednost_'.$if.'_'.$row2['id'].'"> ('.$row2['variable'].') '.strip_tags($row2['naslov']).'</label><br />';
+ echo '<label for="vrednost_'.$if.'_'.$row2['id'].'"><span class="enka-checkbox-radio"></span>';
+ echo ' ('.$row2['variable'].') '.strip_tags($row2['naslov']).'</label>';
}
}
@@ -7714,18 +8912,24 @@ class Branching {
} elseif ($tip == 9) { //SN-imena - uporabimo vedno vseh 20 vrednosti
}
- echo '</td>';
+ echo '</div>';
+
if (!$advanced && $spremenljivka>0 && ($tip==2 || $tip==3)) {
- echo '<td><a href="#" onclick="$(\'#branching_if'.$if.'\').load(
+ echo '<div class="column">';
+
+ echo '<a href="#" onclick="$(\'#branching_if'.$if.'\').load(
\'ajax.php?t=branching&a=condition_editing\', {
\'if\' : '.$if.',
anketa : '.$this->anketa.',
advanced: 1
- }); return false;">'.$lang['srv_advanced_options'].'</a></td>';
+ }); return false;">'.$lang['srv_advanced_options'].'</a>';
+
+ echo '</div>';
}
- echo '</tr></table>';
+ echo '</div>';
+ echo '</div>';
if ($spremenljivka > 0) {
$sql2 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id='$spremenljivka'");
@@ -7736,12 +8940,12 @@ class Branching {
if ($max == 0) $max = 20;
}
- echo '<p style="margin-left:10px; margin-top:40px">'.$lang['srv_loop_max'].': <select name="max" onchange="loop_edit_max('.$if.', this.value);">';
+ echo '<div class="div_condition_bottom loop_bottom">'.$lang['srv_loop_max'].': <select name="max" class="dropdown medium" onchange="loop_edit_max('.$if.', this.value);">';
if ($tip != 7)
echo '<option value="0"'.(0==$max?' selected':'').'>'.$lang['srv_all'].'</option>';
for ($i=1; $i<=$count; $i++)
echo '<option value="'.$i.'"'.($i==$max?' selected':'').'>'.$i.'</option>';
- echo '</select></p>';
+ echo '</select></div>';
}
}
@@ -7812,9 +9016,7 @@ class Branching {
$variable = $row1['variable'].'['.$row1g['variable'].']';
}
- if ($long_alert) $echo .= '<strong>';
$echo .= $variable;
- if ($long_alert) $echo .= '</strong>';
// konstante
} elseif ($row['spr_id'] == -1) {
@@ -7843,11 +9045,11 @@ class Branching {
if ( $calculation_check != 0) {
- if ($calculation_check == 1)
- $echo .= '<br /><span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_spremenljivka'].'</span>';
- elseif ($calculation_check == 2)
- $echo .= '<br /><span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_spremenljivka'].'</span>';
- elseif ($calculation_check == 3)
+ //if ($calculation_check == 1)
+ //$echo .= '<br /><span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_spremenljivka'].'</span>';
+ //elseif ($calculation_check == 2)
+ //$echo .= '<br /><span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_spremenljivka'].'</span>';
+ if ($calculation_check == 3)
$echo .= '<br /><span class="faicon warning icon-orange"></span> <span class="red">'.$lang['srv_error_oklepaji'].'</span>';
}
@@ -7862,74 +9064,68 @@ class Branching {
function calculation_editing ($condition, $vrednost=0) {
global $lang;
- echo '<div class="popup_close"><a href="#" onClick="calculation_editing_close(\''.$condition.'\', \''.$vrednost.'\'); return false;">✕</a></div>';
+ echo '<div class="popup_close"><a href="#" onClick="popupClose(); return false;">✕</a></div>';
- echo '<div id="calculation_editing_inner">';
+ echo '<div id="calculation_editing_inner" class="podatki">';
$this->calculation_editing_inner($condition, $vrednost);
- echo '</div>';
+ echo '</div>';
+
+ echo '<div id="bottom_options">';
- echo '<div id="bottom_space">';
+ echo '<div class="setting_horizontal_wrapper">';
$row = Cache::srv_spremenljivka(-$condition);
- if ($condition < 0) {
- echo '<p style="float:left; padding:0; margin:0; margin-left:20px">'.$lang['srv_variable'].': <input type="text" id="variable_'.(-$condition).'" value="'.$row['variable'].'" onkeyup="calculation_edit_variable(\''.-$condition.'\');" style="width:60px" /></p>';
+ if ($condition < 0) {
+ echo '<div class="setting_holder">';
+ echo '<label for="variable_'.(-$condition).'">'.$lang['srv_editcalculation_new'].':</label>';
+ echo '<input type="text" class="large" id="variable_'.(-$condition).'" value="'.$row['variable'].'" onkeyup="calculation_edit_variable(\''.-$condition.'\');" />';
+ echo '</div>';
}
// Nastavitev števila decimalk
- echo '<p style="clear:both;float:left; padding:0; margin:10px 0 0 20px;">'.$lang['srv_results_num_digits'].':';
- echo ' <select id="decimalna_'.(-$condition).'" onChange="calculation_edit_decimalna(\''.-$condition.'\');">';
+ echo '<div class="setting_holder">';
+ echo '<label for="decimalna_'.(-$condition).'">'.$lang['srv_results_num_digits'].':</label>';
+ echo ' <select class="dropdown large w130" id="decimalna_'.(-$condition).'" onChange="calculation_edit_decimalna(\''.-$condition.'\');">';
for($i=0; $i<=10; $i++){
echo ' <option value="'.$i.'" '.($row['decimalna'] == $i ? ' selected="selected"' : '').'>'.$i.'</option>';
}
echo '</select>';
- echo '</p>';
+ echo '</div>';
+
+ echo '</div>';
+
- // Nastavitev kako se obravnava missing v kalkulaciji (kot 0 ali za celo kalkulacijo kot -88)
+ // Nastavitev, kako se obravnava missing v kalkulaciji (kot 0 ali za celo kalkulacijo kot -88)
$newParams = new enkaParameters($row['params']);
$calcMissing = $newParams->get('calcMissing', '0');
- echo '<p style="float:left; padding:0; margin:10px 0 0 20px;">';
- echo '<input type="checkbox" class="enka-admin-custom" value="1" '.($calcMissing == 1 ? ' checked="checked"' : '').' id="calcMissing_'.(-$condition).'" onChange="calculation_edit_missing(\''.-$condition.'\');"> ';
- echo '<span class="enka-checkbox-radio"></span>';
- echo '<label for="calcMissing_'.(-$condition).'">'.$lang['srv_editcalculation_missing'].'</label> '.Help::display('srv_calculation_missing');
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" value="1" '.($calcMissing == 1 ? ' checked="checked"' : '').' id="calcMissing_'.(-$condition).'" onChange="calculation_edit_missing(\''.-$condition.'\');"> ';
+ echo '<label for="calcMissing_'.(-$condition).'">'.$lang['srv_editcalculation_missing'];
+ //echo ' '.Help::display('srv_calculation_missing').'</label>';
+ echo '</div>';
- echo '<div id="condition_editing_close">';
+ echo '</div>';
- // kalkulacija kot spremenljivka (lahko jo zbrisemo)
- if ($condition < 0) {
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="brisi_spremenljivko(\''.(-$condition).'\'); return false;"><span>'.$lang['srv_anketadelete_txt'].'</span></a>';
- echo '</span>';
- }
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="calculation_editing_close(\''.$condition.'\', \''.$vrednost.'\'); return false;"><span>'.$lang['srv_zapri'].'</span></a>';
- echo '</span>';
+ echo '<div id="condition_editing_close" class="podatki">';
- echo '<span class="buttonwrapper floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="calculation_editing_close(\''.$condition.'\', \''.$vrednost.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
+ echo ' <div class="button_holder">';
- echo '</div>';
+ // kalkulacija kot spremenljivka (lahko jo zbrisemo)
+ if ($condition < 0)
+ echo ' <button class="medium white-blue" onclick="brisi_spremenljivko(\''.(-$condition).'\'); return false;">'.$lang['srv_anketadelete_txt'].'</button>';
+
+ echo ' <button class="medium white-blue" onclick="window.location.reload(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo ' <button class="medium blue" onclick="window.location.reload(); return false;">'.$lang['srv_potrdi'].'</button>';
+ echo ' </div>';
+
echo '</div>';
- echo '<div id="arrows_more_calculation" onclick=" $(\'#calculation_editing_inner\').animate({ scrollTop: $(\'#calculation_editing_inner\').attr(\'scrollHeight\') }, 2000); "><img src="img_0/bullet_arrow_down.png" /> '.$lang['srv_more'].'</div>';
?><script>
- $('#calculation_editing_inner').sortable({items: 'form', handle: 'img.move', stop: function () {
+ $('#calculation_editing_inner').sortable({items: 'form', handle: '.move', stop: function () {
calculation_sort(<?=$condition?>);
} });
-
- $('#calculation_editing_inner').scroll(function() {
- if ( isScrolledIntoView('#calculation_editing_operators', '#calculation_editing_inner') )
- $('#arrows_more_calculation').fadeOut(1000);
- else
- $('#arrows_more_calculation').fadeIn(1000);
- });
- $('#calculation_editing_inner').resize(function() {
- $('#calculation_editing_inner').scroll();
- });
- $('#calculation_editing_inner').scroll();
</script><?
}
@@ -7938,33 +9134,32 @@ class Branching {
echo '<div class="calculation_editing_preview">';
- echo '<h2>'.$lang['srv_calc'].'</h2>';
+ echo '<h2><span class="blue faicon edit"></span>'.$lang['srv_calc'].'</h2>';
echo '<div id="calculation_editing_calculations">';
echo $this->calculations_display($condition, 1);
echo '</div>';
echo '</div>';
- echo '<div class="condition_editing_body">';
- echo '<h2>'.$lang['srv_editcalculation'].'</h2>';
- echo '</div>';
+ echo '<div class="calculation_editing_body">';
$sql = sisplet_query("SELECT * FROM srv_calculation WHERE cnd_id = '$condition' ORDER BY vrstni_red");
if (mysqli_num_rows($sql) == 0) {
sisplet_query("INSERT INTO srv_calculation (id, cnd_id, vrstni_red) VALUES ('', '$condition', '1')");
$sql = sisplet_query("SELECT * FROM srv_calculation WHERE cnd_id = '$condition' ORDER BY vrstni_red");
}
- while ($row = mysqli_fetch_array($sql)) {
+ while ($row = mysqli_fetch_array($sql)) {
$this->calculation_edit($row['id'], $vrednost);
}
- echo '<p id="calculation_editing_operators" style="margin-left:62px; height:50px;">'.$lang['srv_add_cond'].':
- <a href="#" onclick="calculation_add(\''.$condition.'\', \'0\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px">&nbsp;+&nbsp;</strong></a>,
- <a href="#" onclick="calculation_add(\''.$condition.'\', \'1\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px">&nbsp;-&nbsp;</strong></a>,
- <a href="#" onclick="calculation_add(\''.$condition.'\', \'2\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px">&nbsp;*&nbsp;</strong></a>,
- <a href="#" onclick="calculation_add(\''.$condition.'\', \'3\', \''.$vrednost.'\'); return false;"><strong style="font-size:18px">&nbsp;/&nbsp;</strong></a>
- </p><br><br>';
+ echo '<p class="div_calculation_bottom" id="calculation_editing_operators">'.$lang['srv_add_cond'].':
+ <a href="#" onclick="calculation_add(\''.$condition.'\', \'0\', \''.$vrednost.'\'); return false;" class="noline"><strong style="font-size:18px">&nbsp;+&nbsp;</strong></a>,
+ <a href="#" onclick="calculation_add(\''.$condition.'\', \'1\', \''.$vrednost.'\'); return false;" class="noline"><strong style="font-size:18px">&nbsp;-&nbsp;</strong></a>,
+ <a href="#" onclick="calculation_add(\''.$condition.'\', \'2\', \''.$vrednost.'\'); return false;" class="noline"><strong style="font-size:18px">&nbsp;*&nbsp;</strong></a>,
+ <a href="#" onclick="calculation_add(\''.$condition.'\', \'3\', \''.$vrednost.'\'); return false;" class="noline"><strong style="font-size:18px">&nbsp;/&nbsp;</strong></a>
+ </p>';
+ echo '</div>';
}
/**
@@ -7990,51 +9185,14 @@ class Branching {
if (!$sql_count) die();
$row_count = mysqli_fetch_array($sql_count);
- if ($row['vrstni_red'] == 1 && $row_count['count'] > 1) {
- echo '<table class="tbl_condition_editing">';
- echo '<tr>';
- echo '<th style="text-align:center; width:50px">'.$lang['srv_oklepaji'].'</th>'; // gumbi oklepaji
- echo '<th style="width:70px">&nbsp;</th>'; // logicni operatorji
- echo '<th style="width:50px">&nbsp;</th>'; // oklepaji
- echo '<th >&nbsp;</th>';
- echo '<th style="text-align:center; width:50px;">'.$lang['srv_zaklepaji'].'</th>'; // gumbi zaklepaji
- echo '<th style="text-align:center; width:60px">'.$lang['edit2'].'</th>'; // move
- echo '</tr>';
- echo '</table>';
-
- } elseif ($row['vrstni_red'] == 1) {
- echo '<table class="tbl_condition_editing"><tr><th>&nbsp;</th></tr></table>';
- }
// form
- echo '<form name="calculation_'.$calculation.'" id="calculation_'.$calculation.'" action="" method="post" onsubmit="calculation_edit(\''.$calculation.'\'); return false;">'."\n\r";
-
- echo '<table class="tbl_condition_editing" style="margin-bottom:10px; padding-bottom:10px; background-color:white">';
- echo '<tr>';
-
+ echo '<form name="calculation_'.$calculation.'" id="calculation_'.$calculation.'" action="" method="post" onsubmit="calculation_edit(\''.$calculation.'\'); return false;">'."\n\r";
- // left_bracket
- if ($row_count['count'] != 1 || $row['left_bracket']>0 || $row['right_bracket']>0) {
-
- echo '<td class="tbl_ce_lol white" style="width:50px; text-align:center;" >';
- echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'left\', \'plus\' ); return false;" title="'.$lang['srv_oklepaj_add'].'"><span class="faicon add small"></span></a>';
-
- if ($row['left_bracket'] > 0)
- echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'left\', \'minus\'); return false;" title="'.$lang['srv_oklepaj_rem'].'"><span class="faicon delete_circle"></span></a>';
- else
- echo '<span class="faicon delete_circle icon-grey_normal"></span>';
- }
- else {
- echo '<td class="tbl_ce_lol white" style="width:50px; text-align:center;" >';
- }
- echo '</td>';
// operator
- echo '<td class="tbl_ce_tb white" style="width:77px; text-align:center">';
-
- if ($row['vrstni_red'] == 1) {
- // nimamo nic..
- } else {
+ if ($row['vrstni_red'] > 1) {
+ echo '<div class="condition_editing_row operator">';
if ($row['operator']==0)
echo '<a href="#" onclick="calculation_operator_edit(\''.$calculation.'\', \'1\'); return false;" style="font-weight:bold; font-size:18px" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;+&nbsp;</a>';
@@ -8044,22 +9202,60 @@ class Branching {
echo '<a href="#" onclick="calculation_operator_edit(\''.$calculation.'\', \'3\'); return false;" style="font-weight:bold; font-size:18px" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;*&nbsp;</a>';
if ($row['operator']==3)
echo '<a href="#" onclick="calculation_operator_edit(\''.$calculation.'\', \'0\'); return false;" style="font-weight:bold; font-size:18px" title="'.$lang['srv_edit_condition_conjunction'].'">&nbsp;/&nbsp;</a>';
+
+ echo '</div>';
}
- echo '</td>';
+ echo '<div class="condition_editing_row">';
+
+ // move
+ echo '<div class="move_holder">';
+ if ($row_count['count'] != 1 )
+ echo '<span class="faicon move_updown move" title="'.$lang['srv_move'].'" />';
+ echo '</div>';
+
+
+ // Srednji bel del
+ echo '<div class="white_holder">';
+
+ // left_bracket
+ echo '<div class="column bracket left">';
+
+ if ($row_count['count'] != 1 || $row['left_bracket']>0 || $row['right_bracket']>0) {
+
+ echo '<div class="bracket_icons">';
+
+ echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'left\', \'plus\' ); return false;" title="'.$lang['srv_oklepaj_add'].'"><span class="faicon add"></span></a>';
+
+ if ($row['left_bracket'] > 0)
+ echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'left\', \'minus\'); return false;" title="'.$lang['srv_oklepaj_rem'].'"><span class="faicon delete_circle"></span></a>';
+ else
+ echo '<span class="faicon delete_circle icon-grey_normal"></span>';
+
+ echo '</div>';
+
+ echo '<div class="bracket_text">'.$lang['srv_oklepaji'].'</div>';
+ }
+
+ echo '</div>';
// left_bracket
- echo '<td class="tbl_ce_tb white" style="width:40px; text-align:center">';
+ echo '<div class="column display_bracket left">';
+
for ($i=$row['left_bracket']; $i>0; $i--) {
- echo ' ( '; }
- echo '</td>';
+ echo ' ( ';
+ }
+
+ echo '</div>';
// spremenljivka
- echo '<td class="tbl_ce_tb white" style="width:auto">';
- if ($row['spr_id']==0) echo '<span class="red">'.$lang['srv_select_spr'].'!</span>';
- echo '<br />';
- echo '<select name="calculation_spremenljivka_'.$calculation.'" id="calculation_spremenljivka_'.$calculation.'" size="1" style="width:'.($row['spr_id']==-1?'100':'150').'px" onchange="javascript:calculation_edit(\''.$calculation.'\', \''.$vrednost.'\');">'."\n\r";
+ echo '<div class="column variable">';
+
+ if ($row['spr_id']==0)
+ echo '<span class="red">'.$lang['srv_select_spr'].'!</span>';
+
+ echo '<select name="calculation_spremenljivka_'.$calculation.'" id="calculation_spremenljivka_'.$calculation.'" size="1" class="dropdown medium" style="width:'.($row['spr_id']==-1?'100':'150').'px" onchange="javascript:calculation_edit(\''.$calculation.'\', \''.$vrednost.'\');">'."\n\r";
echo '<option value="0"></option>';
echo '<option value="-1"'. ($row['spr_id']==-1 ?' selected="selected"':'').' style="color: blue">&nbsp;&nbsp;&nbsp; '.$lang['srv_number'].'</option>';
@@ -8173,8 +9369,7 @@ class Branching {
// number vnos
if ($row['spr_id'] == -1) {
- //if ($row['number'] == 0) $row['number'] = '';
- echo ' <input type="text" name="number" id="calculation_number_'.$calculation.'" value="'.$row['number'].'" style="width:40px" >';
+ echo ' <input type="text" name="number" id="calculation_number_'.$calculation.'" value="'.$row['number'].'" class="medium" style="width: 40px;">';
echo '<script type="text/javascript">'; // shranimo ko zapustmo input polje
echo '$(document).ready(function() {' .
@@ -8183,56 +9378,56 @@ class Branching {
' });' .
'});';
echo '</script>';
-
}
- echo '<br />&nbsp;'."\n\r";
- echo '</td>';
-
+ echo '</div>';
// right_bracket
- echo '<td class="tbl_ce_tb white" style="width:40px; text-align:center">';
+ echo '<div class="column display_bracket right">';
+
for ($i=$row['right_bracket']; $i>0; $i--) {
echo ' ) ';
}
- echo '</td>';
+ echo '</div>';
// right_bracket buttons
+ echo '<div class="column bracket right">';
+
if ($row_count['count'] != 1 || $row['right_bracket']>0 || $row['left_bracket']>0) {
- echo '<td class="tbl_ce_lor" style="width:50px; text-align:center" nowrap>';
+
+ echo '<div class="bracket_icons">';
+
if ($row['right_bracket'] > 0)
echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'right\', \'minus\'); return false;" title="'.$lang['srv_zaklepaj_rem'].'"><span class="faicon delete_circle"></span></a>';
else
echo '<span class="faicon delete_circle icon-grey_normal"></span>';
- echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'right\', \'plus\' ); return false;" title="'.$lang['srv_zaklepaj_add'].'"><span class="faicon add small"></span></a>';
- } else {
- echo '<td class="tbl_ce_lor white" style="width:50px; text-align:center" nowrap>';
-// echo '<span class="sprites delete_blue_light"></span>';
-// echo '<span class="sprites add_blue_light"></span>';
- }
- echo '</td>';
+ echo '<a href="#" onclick="javascript:calculation_bracket_edit_new(\''.$calculation.'\', \''.$vrednost.'\', \'right\', \'plus\' ); return false;" title="'.$lang['srv_zaklepaj_add'].'"><span class="faicon add"></span></a>';
- // move
- echo '<td class="tbl_ce_bck_blue white" style="text-align:right; width:30px">';
- if ($row_count['count'] != 1 )
- echo '<img src="img_0/move_updown.png" class="move" title="'.$lang['srv_move'].'" />';
- echo '</td>';
+ echo '</div>';
+
+ echo '<div class="bracket_text">'.$lang['srv_zaklepaji'].'</div>';
+ }
+
+ echo '</div>';
+
+ echo '</div>';
+
// remove
- echo '<td class="tbl_ce_bck_blue white" style="text-align:left; width:30px">';
+ echo '<div class="delete_holder">';
+
$sql3 = sisplet_query("SELECT * FROM srv_calculation WHERE cnd_id='$row[cnd_id]'");
if (mysqli_num_rows($sql3) != 1 )
- echo ' <a href="#" onclick="calculation_remove(\''.$row['cnd_id'].'\', \''.$calculation.'\', \''.$vrednost.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span class="faicon delete icon-grey_dark_link delte-if-block"></span></a>'."\n\r";
- echo '</td>';
-
+ echo ' <a href="#" onclick="calculation_remove(\''.$row['cnd_id'].'\', \''.$calculation.'\', \''.$vrednost.'\'); return false;" title="'.$lang['srv_if_rem'].'"><span class="faicon delete"></span></a>'."\n\r";
+
+ echo '</div>';
- echo '</tr>';
- echo '</table>';
- echo '</form>'."\n\r";
+ echo '</div>';
+ echo '</form>';
}
/**
@@ -8268,7 +9463,7 @@ class Branching {
$variable_ok = true;
foreach ($variable_array AS $spr => $var) {
- if ($spr != $row['id'] && $var == $variable) {
+ if ($var == $variable) {
$variable_ok = false;
}
}
@@ -8313,7 +9508,7 @@ class Branching {
function nova_spremenljivka($grupa, $grupa_vrstni_red, $vrstni_red, $kuki = 0) {
global $lang;
- if ($kuki == 0)
+ if ($kuki == 0 && isset($_COOKIE['srv_clipboard_' . $this->anketa]))
$kuki = $_COOKIE['srv_clipboard_' . $this->anketa];
$variable = $this->generate_variable();
@@ -8380,6 +9575,7 @@ class Branching {
'naslov' => "'".mysqli_real_escape_string($GLOBALS['connect_db'], $row['naslov'])."'",
'variable' => "'".mysqli_real_escape_string($GLOBALS['connect_db'], $variable)."'",
'variable_custom' => "'$variable_custom'",
+ 'vrstni_red' => "'$vrstni_red'",
'thread' => "'0'",
'edit_graf' => "'0'", // naknadno popravimo editiranje grafov - po kopiranju je onemogoceno
);
@@ -8460,7 +9656,7 @@ class Branching {
$condition = SurveyCopy::preformCopyTable('srv_condition', 'id', SurveyCopy::sql2array($qry_src_condition), $pre_set);
// condtition grid, tabela srv_condition_grid
- if (count($condition) > 0) {
+ if (is_countable($condition) && count($condition) > 0) {
foreach ($condition AS $orig => $bckp) {
// condtition grid, tabela srv_condition_grid
$qry_src_condition_grid = sisplet_query("SELECT * FROM srv_condition_grid WHERE cond_id = '".$orig."'");
@@ -8472,7 +9668,7 @@ class Branching {
}
// condtition vrednost, tabela srv_condition_vre
- if (count($condition) > 0) {
+ if (is_countable($condition) && count($condition) > 0) {
foreach ($condition AS $orig => $bckp) {
$qry_src_condition_vre = sisplet_query("SELECT * FROM srv_condition_vre WHERE cond_id = '$orig'");
//$src_srv_condition_vre = SurveyCopy::arrayfilter($arr_src['srv_condition_vre'], 'cond_id', $orig);
@@ -8510,28 +9706,17 @@ class Branching {
}
+
+ }
// nova (prazna) spremenljivka
- } else {
-
+ else {
// pri glasovanju ustvarimo samo prvic novo spr. z default 2 variablami
if(isset($_POST['survey_type']) && $_POST['survey_type'] == 0)
$size = 2;
else
$size = 3;
- if($type < 990)
- $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '<p>$lang[srv_new_vprasanje]</p>', '$variable', '$size', '$type', '$vrstni_red')");
- //standardna vprasanja -> email, url, file upload, ime priimek
- else{
- if($type == 991) //email
- $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '<p>Vnesite vaš email naslov</p>', 'email', '1', '4', '$vrstni_red')");
- elseif($type == 992) //url
- $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '<p>Vnesite URL</p>', 'url', '1', '4', '$vrstni_red')");
- elseif($type == 993) //file upload
- $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red) VALUES ('', '$grupa', '<p>Naložite datoteko</p>', 'upload', '1', '4', '$vrstni_red')");
- elseif($type == 994) //ime priimek
- $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, tip, vrstni_red, text_kosov, text_orientation) VALUES ('', '$grupa', '<p>Vnesite ime in priimek</p>', 'name', '1', '21', '$vrstni_red', '2', '2')");
- }
+ $sql = sisplet_query("INSERT INTO srv_spremenljivka (id, gru_id, naslov, variable, size, vrstni_red) VALUES ('', '$grupa', '<p>$lang[srv_new_vprasanje]</p>', '$variable', '$size', '$vrstni_red')");
if (!$sql)
echo mysqli_error($GLOBALS['connect_db']);
@@ -8539,6 +9724,7 @@ class Branching {
$spremenljivka = mysqli_insert_id($GLOBALS['connect_db']);
}
+
// vnesemo -4 tag v podatke, ki oznacuje novo spremenljivko
$sql = sisplet_query("SELECT id FROM srv_user WHERE ank_id = '$this->anketa'");
$query_values = "";
@@ -8549,6 +9735,12 @@ class Branching {
if (mysqli_num_rows($sql) > 0)
sisplet_query("INSERT INTO srv_data_vrednost".$this->db_table." (spr_id, vre_id, usr_id) VALUES $query_values");
+
+ // Preverimo ce smo presegli limit za stevilo vprasanj
+ $check = new SurveyCheck($this->anketa);
+ $check->checkLimitSpremenljivke();
+
+
return $spremenljivka;
}
@@ -8559,10 +9751,12 @@ class Branching {
*/
function if_new ($endif, $parent, $if_id, $vrstni_red, $spremenljivka, $if, $copy=0, $no_content=0, $include_element=true) {
- if ($copy > 0)
- $cookie = $copy;
- else
- $cookie = substr($_COOKIE['srv_clipboard_'.$this->anketa], 3);
+ $cookie = 0;
+
+ if ($copy > 0)
+ $cookie = $copy;
+ elseif(isset($_COOKIE['srv_clipboard_'.$this->anketa]))
+ $cookie = substr($_COOKIE['srv_clipboard_'.$this->anketa], 3);
// Dodaten pogoj da nikoli ne vstavimo v srv_branching elementa ki ima element_spr=0 in element_if=0 (potem lahko pride do neskoncnega loopa kjer se dodajajo grupe v anketo)
if ($if_id == 0) die('copy error2');
@@ -8578,9 +9772,9 @@ class Branching {
// ob pastanju zbrisemo clipboard
setcookie('srv_clipboard_'.$this->anketa, '', time()-3600);
-
- // navaden nov if (pri ENDIFu je nov if prazen, zato ne dodamo nicesar)
- } else {
+ }
+ // navaden nov if (pri ENDIFu je nov if prazen, zato ne dodamo nicesar)
+ else {
$s = sisplet_query("INSERT INTO srv_condition (id, if_id, vrstni_red) VALUES ('', '$if_id', '1')");
if (!$s) echo mysqli_error($GLOBALS['connect_db']);
@@ -8706,6 +9900,9 @@ class Branching {
SurveyCopy::preformCopyTable('srv_calculation', null, SurveyCopy::sql2array($sql2), $pre_set);
}
+
+ $vre_id = array();
+
// zanka
// srv_loop
$qry_src_loop = sisplet_query("SELECT * FROM srv_loop WHERE if_id = '$if_copied'");
@@ -8806,7 +10003,7 @@ class Branching {
if ($spr < 0)
return $spr;
- if ($this->if_copy_spremenljivke[$spr] > 0)
+ if (isset($this->if_copy_spremenljivke[$spr]) && $this->if_copy_spremenljivke[$spr] > 0)
return $this->if_copy_spremenljivke[$spr];
$sql = sisplet_query("SELECT g.ank_id FROM srv_spremenljivka s, srv_grupa g WHERE s.id = '$spr' AND s.gru_id=g.id");
@@ -8827,7 +10024,7 @@ class Branching {
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
$row = mysqli_fetch_array($sql);
- $spr_copy = $this->if_copy_spremenljivke[$row['spr_id']];
+ $spr_copy = (isset($this->if_copy_spremenljivke[$row['spr_id']])) ? $this->if_copy_spremenljivke[$row['spr_id']] : 0;
if ($spr_copy > 0) {
$vrstni_red = $row['vrstni_red'];
@@ -8838,7 +10035,8 @@ class Branching {
return $row['id'];
- } else {
+ }
+ else {
$sql = sisplet_query("SELECT g.ank_id FROM srv_vrednost v, srv_spremenljivka s, srv_grupa g WHERE v.id='$vre' AND v.spr_id=s.id AND s.gru_id=g.id");
$row = mysqli_fetch_array($sql);
@@ -8847,7 +10045,6 @@ class Branching {
return $vre;
else
return 0;
-
}
}
@@ -9070,7 +10267,7 @@ class Branching {
$gru_id = $this->find_grupa($gru_vr);
- if ($this->spremenljivka_grupa[$row['element_spr']]['vrstni_red'] != $spr_vr OR $this->spremenljivka_grupa[$row['element_spr']]['gru_id'] != $gru_id) {
+ if (!isset($this->spremenljivka_grupa[$row['element_spr']]) || $this->spremenljivka_grupa[$row['element_spr']]['vrstni_red'] != $spr_vr || $this->spremenljivka_grupa[$row['element_spr']]['gru_id'] != $gru_id) {
if ( $gru_id > 0 ) {
sisplet_query("UPDATE srv_spremenljivka SET vrstni_red = '$spr_vr', gru_id='$gru_id' WHERE id = '$row[element_spr]'");
@@ -9189,7 +10386,8 @@ class Branching {
// naslednij je na isti strani
$next = $vrstni_red + 1;
$sql = sisplet_query("SELECT id FROM srv_spremenljivka WHERE vrstni_red='$next' AND gru_id='$row[gru_id]'");
- if (mysqli_num_rows($sql) > 0) {
+
+ if (mysqli_num_rows($sql) > 0) {
$row = mysqli_fetch_array($sql);
return $row['id'];
}
@@ -9197,12 +10395,17 @@ class Branching {
// naslednik je na naslednji strani
$sql = sisplet_query("SELECT g.vrstni_red FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND s.id='$spremenljivka'");
$row = mysqli_fetch_array($sql);
+
$grupa_red = $row['vrstni_red'];
$next = $grupa_red + 1;
- $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$next' ORDER BY s.vrstni_red ASC LIMIT 1");
- $row = mysqli_fetch_array($sql);
- return $row['id'];
+ $sql2 = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$next' ORDER BY s.vrstni_red ASC LIMIT 1");
+ $row2 = mysqli_fetch_array($sql2);
+
+ if(isset($row2['id']))
+ return $row2['id'];
+
+ return 0;
}
/**
@@ -9234,12 +10437,16 @@ class Branching {
$row = mysqli_fetch_array($sql);
$grupa_red = $row['vrstni_red'];
$prev = $grupa_red - 1;
- $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$prev' ORDER BY s.vrstni_red DESC LIMIT 1");
- $row = mysqli_fetch_array($sql);
-
- $this->find_prev_spr[$spremenljivka] = $row['id'];
- return $row['id'];
-
+
+ $sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND g.vrstni_red = '$prev' ORDER BY s.vrstni_red DESC LIMIT 1");
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+ $this->find_prev_spr[$spremenljivka] = $row['id'];
+
+ return $row['id'];
+ }
+
+ return 0;
}
var $prev_srv_branching = 0; // zacasna spremenljivka
@@ -9276,11 +10483,15 @@ class Branching {
return $this->find_last_spr;
$sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' ORDER BY g.vrstni_red DESC, s.vrstni_red DESC LIMIT 1");
- $row = mysqli_fetch_array($sql);
+
+ if ( mysqli_num_rows($sql) > 0 ){
+ $row = mysqli_fetch_array($sql);
+ $this->find_last_spr = $row['id'];
- $this->find_last_spr = $row['id'];
- return $row['id'];
+ return $row['id'];
+ }
+ return 0;
}
/**
@@ -9290,14 +10501,34 @@ class Branching {
function find_last_spr_branching ($parent = 0) {
$sql = sisplet_query("SELECT element_spr, element_if FROM srv_branching WHERE ank_id='$this->anketa' AND parent='$parent' ORDER BY vrstni_red DESC LIMIT 1");
- $row = mysqli_fetch_array($sql);
+
+ if ( mysqli_num_rows($sql) > 0 ){
+ $row = mysqli_fetch_array($sql);
+
+ if ($row['element_spr'] > 0)
+ return $row['element_spr'];
+ else
+ return $this->find_last_spr_branching($row['element_if']);
+ }
- if ($row['element_spr'] > 0) return $row['element_spr'];
+ return 0;
+ }
- if ( mysqli_num_rows($sql) > 0 )
- return $this->find_last_spr_branching($row['element_if']);
+ /**
+ * poisce zadnji if v tabeli srv_branching
+ *
+ */
+ private function find_last_if_branching ($parent = 0) {
- return 0;
+ $sql = sisplet_query("SELECT element_if FROM srv_branching WHERE ank_id='$this->anketa' AND parent='$parent' ORDER BY vrstni_red DESC LIMIT 1");
+
+ if ( mysqli_num_rows($sql) > 0 ){
+ $row = mysqli_fetch_array($sql);
+
+ return $row['element_if'];
+ }
+
+ return 0;
}
/**
@@ -9309,9 +10540,14 @@ class Branching {
function getGrupa4Spremenljivka($spremenljivka) {
$sql = sisplet_query("SELECT g.* FROM srv_grupa AS g WHERE g.id = (SELECT s.gru_id FROM srv_spremenljivka as s WHERE s.id = '$spremenljivka')");
- $row = mysqli_fetch_assoc($sql);
- return $row;
+ if ( mysqli_num_rows($sql) > 0 ){
+ $row = mysqli_fetch_assoc($sql);
+
+ return $row;
+ }
+
+ return 0;
}
/**
@@ -9322,28 +10558,47 @@ class Branching {
*/
function getGrupa4If($if_id) {
- $sqlBr = sisplet_query("SELECT vrstni_red FROM srv_branching WHERE ank_id='$this->anketa' AND element_if='$if_id'");
- $rowBr = mysqli_fetch_assoc($sqlBr);
- $vrstni_red_if = $rowBr['vrstni_red'];
+ $row = array();
- if($vrstni_red_if == 1){
- $sql = sisplet_query("SELECT * FROM srv_grupa WHERE ank_id='$this->anketa' AND vrstni_red='1'");
- $row = mysqli_fetch_assoc($sql);
+ // Najprej preverimo, ce imamo v ifu kaksno vprasanje - potem je 1. vprasanje na isti strani
+ $spr_in_if = $this->get_subspr($if_id);
+ if(count($spr_in_if) > 0){
+ $row = $this->getGrupa4Spremenljivka($spr_in_if[0]);
+ return $row;
}
- else{
- $sqlB = sisplet_query("SELECT element_spr, pagebreak FROM srv_branching WHERE ank_id='$this->anketa' AND vrstni_red<'$vrstni_red_if' AND element_spr>'0' ORDER BY vrstni_red DESC");
- $rowB = mysqli_fetch_assoc($sqlB);
- if($rowB['pagebreak'] == 0){
- $row = $this->getGrupa4Spremenljivka($rowB['element_spr']);
+ // If nima znotraj se nobenega vprasanja - moramo poiskati prejsnje vprasanje in ugotoviti stran - NI SE CISTO OK - JE TREBA DODELATI
+ $sqlBr2 = sisplet_query("SELECT vrstni_red, parent FROM srv_branching WHERE ank_id='$this->anketa' AND element_if='$if_id'");
+ if(mysqli_num_rows($sqlBr2) > 0){
+
+ $rowBr2 = mysqli_fetch_assoc($sqlBr2);
+
+ $vrstni_red_if = isset($rowBr2['vrstni_red']) ? $rowBr2['vrstni_red'] : null;
+ $parent_if = isset($rowBr2['parent']) ? $rowBr2['parent'] : null;
+
+ if($vrstni_red_if == 1){
+ $sql = sisplet_query("SELECT * FROM srv_grupa WHERE ank_id='$this->anketa' AND vrstni_red='1'");
+ $row = mysqli_fetch_assoc($sql);
}
else{
- $prev_grupa = $this->getGrupa4Spremenljivka($rowB['element_spr']);
- $row['id'] = $this->find_grupa($prev_grupa['vrstni_red']+1);
- $row['vrstni_red'] = $prev_grupa['vrstni_red']+1;
+ $sqlB = sisplet_query("SELECT element_spr, pagebreak
+ FROM srv_branching
+ WHERE ank_id='".$this->anketa."' AND vrstni_red<'".$vrstni_red_if."' AND parent='".$parent_if."' AND element_spr>'0'
+ ORDER BY vrstni_red DESC
+ ");
+ $rowB = mysqli_fetch_assoc($sqlB);
+
+ if(isset($rowB['pagebreak']) && $rowB['pagebreak'] == 0 && $rowB['element_spr']){
+ $row = $this->getGrupa4Spremenljivka($rowB['element_spr']);
+ }
+ else{
+ $prev_grupa = $this->getGrupa4Spremenljivka($rowB['element_spr']);
+ $row['id'] = $this->find_grupa($prev_grupa['vrstni_red']+1);
+ $row['vrstni_red'] = $prev_grupa['vrstni_red']+1;
+ }
}
}
-
+
return $row;
}
@@ -9357,11 +10612,12 @@ class Branching {
return $this->find_first_spr;
$sql = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' ORDER BY g.vrstni_red ASC, s.vrstni_red ASC LIMIT 1");
- $row = mysqli_fetch_array($sql);
-
- $this->find_first_spr = $row['id'];
- return $row['id'];
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+ $this->find_first_spr = $row['id'];
+ }
+ return $this->find_first_spr;
}
/**
@@ -9415,24 +10671,17 @@ class Branching {
* poisce naslednji element (spremenljivko, if, blok) in vrne njegov row (parent, vrstni_red, element_spr, element_if)
* v primeru ENDIFA, vrne prazno
*
- * @param mixed $spr
- * @param mixed $if
*/
- var $find_next_element = array();
function find_next_element($parent, $vrstni_red) {
- if (isset($this->find_next_element[$spr][$if]))
- return $this->find_next_element[$spr][$if];
-
$sql = sisplet_query("SELECT parent, vrstni_red, element_spr, element_if FROM srv_branching WHERE parent='$parent' AND vrstni_red>'$vrstni_red' AND ank_id='$this->anketa' ORDER BY vrstni_red ASC LIMIT 1");
if (mysqli_num_rows($sql) > 0) {
$row = mysqli_fetch_array($sql);
- $this->find_next_element[$spr][$if] = $row;
- } else {
- $this->find_next_element[$spr][$if] = null;
- }
- return $this->find_next_element[$spr][$if];
+ return $row;
+ }
+
+ return null;
}
/**
@@ -9604,8 +10853,11 @@ class Branching {
$vrstni_red = 1;
$this->vrstni_red_branching_fun(0, $vrstni_red);
}
-
- return $this->vrstni_red_branching[$if][$spremenljivka];
+
+ if(isset($this->vrstni_red_branching[$if][$spremenljivka]))
+ return $this->vrstni_red_branching[$if][$spremenljivka];
+ else
+ return null;
}
/**
@@ -9652,7 +10904,7 @@ class Branching {
$vrstni_red = 1;
- $sql = sisplet_query("SELECT element_spr, element_if FROM srv_branching WHERE parent='$parent' AND ank_id='$this->anketa' ORDER BY vrstni_red ASC");
+ $sql = sisplet_query("SELECT element_spr, element_if, vrstni_red FROM srv_branching WHERE parent='$parent' AND ank_id='$this->anketa' ORDER BY vrstni_red ASC");
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
while ($row = mysqli_fetch_array($sql)) {
@@ -9798,33 +11050,36 @@ class Branching {
// Vprasalnik se shranjuje avt.
echo '<div class="forma_bottom_inner changes">';
- echo '<table><tr><td><span class="faicon bottom_saving icon-blue" style="float:left; display:inline;"></span></td>';
- echo '<td>'.$lang['srv_vprasalnik_autosave'].'</td></tr></table>';
+ echo ' <span class="faicon bottom_saving"></span>';
+ echo ' <span>'.$lang['srv_vprasalnik_autosave'].'</span>';
echo '</div>';
echo '<div class="forma_bottom_inner links">';
// Preview
- echo '<a href="' . SurveyInfo::getSurveyLink() . '?preview=on" title="'.$lang['srv_poglejanketo'].'" target="_blank">';
- echo '<span class="faicon bottom_preview"></span> ';
- echo $lang['srv_poglejanketo2'];
+ echo '<a href="' . SurveyInfo::getSurveyLink() . '?preview=on" title="'.$lang['srv_poglejanketo'].'" target="_blank" class="noline">';
+ echo ' <button class="medium-rounded white-gray">';
+ echo ' <span class="faicon monitor"></span> '.$lang['srv_poglejanketo2'];
+ echo ' </button>';
echo '</a>';
// Testiranje
if($this->survey_type != 0 && $this->survey_type != 1){
if ($d->checkDostopSub('test')){
- echo '<a href="index.php?anketa='.$this->anketa.'&a=testiranje" title="'.$lang['srv_testiranje'].'">';
- echo '<span class="faicon bottom_test"></span> ';
- echo $lang['srv_testiranje'];
+ echo '<a href="index.php?anketa='.$this->anketa.'&a=testiranje" title="'.$lang['srv_testiranje'].'" class="noline">';
+ echo ' <button class="medium-rounded white-gray">';
+ echo ' <span class="faicon bottom_test"></span> '.$lang['srv_testiranje'];
+ echo ' </button>';
echo '</a>';
}
}
-
+
// Objava
if ($d->checkDostopSub('publish')){
- echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=vabila" '.$lang['srv_vabila'].' title="'.$lang['srv_vabila'].'">';
- echo '<span class="faicon bottom_publish"></span> ';
- echo $lang['srv_vabila'];
+ echo '<a href="index.php?anketa=' . $this->anketa . '&amp;a=vabila" '.$lang['srv_vabila'].' title="'.$lang['srv_vabila'].'" class="noline">';
+ echo ' <button class="medium-rounded white-gray">';
+ echo ' <span class="faicon data_link"></span> '.$lang['srv_vabila'];
+ echo ' </button>';
echo '</a>';
}
@@ -9835,22 +11090,6 @@ class Branching {
}
}
- /**
- * @desc Če je anketa aktivna, preverimo da ni slučajno potekel čas aktivnosti,
- * če je, jo deaktiviramo
- */
- function checkSurveyActive($anketa = null) {
- // pretecena anketa, kontroliramo datum na: starts in expire
- sisplet_query("UPDATE srv_anketa SET active = '0' WHERE id='" . ($anketa ? $anketa : $this->anketa) . "' AND active = '1' AND expire < CURDATE()");
-
- SurveyInfo :: getInstance()->SurveyInit($this->anketa);
- // vsilimo refresh podatkov
- SurveyInfo :: getInstance()->resetSurveyData();
-
- $sqls = sisplet_query("SELECT active FROM srv_anketa WHERE id='" . ($anketa ? $anketa : $this->anketa) . "'");
- $rows = mysqli_fetch_assoc($sqls);
- return $rows['active'];
- }
/**
* vrne array vseh spremenljivk, ki se pojavljajo v loopu
@@ -10005,9 +11244,11 @@ class Branching {
$row = Cache::srv_spremenljivka($spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
$hotspot_image = ($spremenljivkaParams->get('hotspot_image') ? $spremenljivkaParams->get('hotspot_image') : "");
+
+ // Ce je vprasanje ali anketa zaklenjena
+ $locked = ($this->locked) ? true : false;
//zaslon razdelimo na dva dela - izris leve strani***************************************
- //echo '<div id="half_hot_spot_1" style="width: 50%; class="grid_header_table '.($this->lang_id==null?'allow_new':'').'">';
echo '<div id="half_hot_spot_1" class="hotspot" style="width: 40%; float: left;">';
@@ -10045,8 +11286,8 @@ class Branching {
}else if(substr($hotspot_image, 0, 4) == '<img'){
$hotspot_image_button_text = $lang['srv_hot_spot_edit_image']; //drugace pokazi tekst za urejanje slike
}
- //echo '<p><span class="title" ><button id="hot_spot_regions_add_image_'.$row['id'].'" type="button" onclick=" hotspot_edit('.$row['id'].')">'.$hotspot_image_button_text.'</button></span></p>';
- echo '<p><span class="sprites image_upload pointer" onclick=" hotspot_edit('.$row['id'].')"></span></p>';
+
+ echo '<p style="margin-left:16px;"><span class="faicon image_upload pointer" onclick=" hotspot_edit('.$row['id'].')"></span></p>';
//Slika
echo '<div id="hotspot_image_'.$row['id'].'" class="vrednost_inline_hotspot" contenteditable="false" spr_id="'.$row['id'].'">'.$hotspot_image.'</div>';
@@ -10073,14 +11314,14 @@ class Branching {
else{
while ($row1 = mysqli_fetch_array($sql1)) {
- echo ' <div style="display:none;" other="'.$row1['other'].'" class="variabla" id="variabla_'.$row1['id'].'">';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '<div style="display:none;" other="'.$row1['other'].'" class="variabla" id="variabla_'.$row1['id'].'">';
+ echo ' <div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
echo '</div>';
}
while ($row1_missing = mysqli_fetch_array($sql1_missing)) {
echo '<div class="variabla" other="'.$row1_missing['other'].'" id="variabla_'.$row1_missing['id'].'"><input disabled type="'.$input.'">';
- echo '<div id="vre_id_'.$row1_missing['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1_missing['id'].'" '.(strpos($row1_missing['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1_missing['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1_missing['naslov'].'</div>';
+ echo ' <div id="vre_id_'.$row1_missing['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1_missing['id'].'" '.(strpos($row1_missing['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1_missing['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1_missing['naslov'].'</div>';
echo '</div>';
}
}
@@ -10125,7 +11366,7 @@ class Branching {
echo ' <thead>';
// urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
+ echo ' <tr id="grid_variable_'.$row['id'].'">';
echo ' <td></td>';
$bg = 1;
@@ -10135,7 +11376,7 @@ class Branching {
for ($i = 1; $i <= $row['grids']; $i++) {
if ($row2['vrstni_red'] == $i) {
- echo ' <td class=" ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_variable_inline" '.$show_variable_inline.' contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'">' . $row2['variable'] . '</div></td>';
+ echo ' <td class=" ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_variable_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'">' . $row2['variable'] . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
} else {
echo ' <td class=" ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
@@ -10144,7 +11385,7 @@ class Branching {
echo '</tr>';
echo ' <tr>';
- echo ' <td>'.$grid_plus_minus.'</td>';
+ echo ' <td></td>';
$bg = 1;
@@ -10157,7 +11398,7 @@ class Branching {
if ($naslov != '') $row2['naslov'] = $naslov;
}
if ($row2['vrstni_red'] == $i) {
- echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || strpos($row2['naslov'], $lang1['srv_new_grid'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
+ echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '" grd="g_'.$row2['id'].'"><div class="grid_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" grd_id="'.$row2['id'].'" '.(strpos($row2['naslov'], $lang['srv_new_grid'])!==false || (isset($lang1['srv_new_grid']) && strpos($row2['naslov'], $lang1['srv_new_grid'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row2['naslov'] . '</div></td>';
$row2 = mysqli_fetch_array($sql2);
} else {
echo ' <td class="grid_header ' . ($bg % 2 == 0 ? 'grid_light' : 'grid_dark') . '"></td>';
@@ -10179,7 +11420,7 @@ class Branching {
}
}
- echo '<td style="width:' . $spacesize*3 . '%"></td>';
+ echo '<td></td>';
echo ' </tr>';
echo '</thead>';
@@ -10217,7 +11458,7 @@ class Branching {
echo ' <thead>';
// urejanje vrednosti
- echo ' <tr id="grid_variable_'.$row['id'].'" '.$show_variable_row.'>';
+ echo ' <tr id="grid_variable_'.$row['id'].'">';
echo ' <td></td>';
$bg = 1;
@@ -10232,11 +11473,11 @@ class Branching {
echo '</tr>';
echo ' <tr>';
- echo ' <td>'.$grid_plus_minus.'</td>';
+ echo ' <td></td>';
$bg = 1;
- echo '<td style="width:' . $spacesize*3 . '%"></td>';
+ echo '<td></td>';
echo ' </tr>';
echo '</thead>';
@@ -10260,77 +11501,81 @@ class Branching {
$spremenljivkaParams = new enkaParameters($row['params']);
$hotspot_image = ($spremenljivkaParams->get('hotspot_image') ? $spremenljivkaParams->get('hotspot_image') : "");
$spremenljivkaParams->set('multi_input_type', 'marker');
+
+ // Ce je vprasanje ali anketa zaklenjena
+ $locked = ($this->locked) ? true : false;
echo '<div id="half_hot_spot_1" class="hotspot" style="width: 40%; float: left;">';
- $sql1 = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$row[id]' AND other = 0 ORDER BY vrstni_red");
- $sql1_missing = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$row[id]' AND other != 0 ORDER BY vrstni_red");
+ $sql1 = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$row[id]' AND other = 0 ORDER BY vrstni_red");
+ $sql1_missing = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$row[id]' AND other != 0 ORDER BY vrstni_red");
+
+ //GUMB za nalaganje in urejanje slike
+ if ( ($hotspot_image == '') || substr($hotspot_image, 0, 4) != '<img'){ //ce ni slike
+ $hotspot_image_button_text = $lang['srv_hot_spot_load_image']; //pokazi tekst za upload slike
+ }
+ else if(substr($hotspot_image, 0, 4) == '<img'){
+ $hotspot_image_button_text = $lang['srv_hot_spot_edit_image']; //drugace pokazi tekst za urejanje slike
+ }
+
+ echo '<p style="margin-left:16px;"><span class="faicon image_upload pointer" onclick=" hotspot_edit('.$row['id'].')"></span></p>';
- //GUMB za nalaganje in urejanje slike
- if ( ($hotspot_image == '') || substr($hotspot_image, 0, 4) != '<img'){ //ce ni slike
- $hotspot_image_button_text = $lang['srv_hot_spot_load_image']; //pokazi tekst za upload slike
- }
- else if(substr($hotspot_image, 0, 4) == '<img'){
- $hotspot_image_button_text = $lang['srv_hot_spot_edit_image']; //drugace pokazi tekst za urejanje slike
- }
+ echo '<div id="hotspot_image_'.$row['id'].'" class="vrednost_inline_hotspot" contenteditable="false" spr_id="'.$row['id'].'">'.$hotspot_image.'</div>';
+
+
+ //skrita varianta od koder poberem height in width za urejanje obmocij
+ //izbira ustreznega radio ali checkbox za prikazovanje ob missingu
+ $input = "checkbox";
+
+ echo '<div id="hotspot_image_'.$row['id'].'_hidden" style="display: none;" class="vrednost_inline_hotspot" contenteditable="false" spr_id="'.$row['id'].'">'.$hotspot_image.'</div>';
- echo '<p><span class="sprites image_upload pointer" onclick=" hotspot_edit('.$row['id'].')"></span></p>';
-
- echo '<div id="hotspot_image_'.$row['id'].'" class="vrednost_inline_hotspot" contenteditable="false" spr_id="'.$row['id'].'">'.$hotspot_image.'</div>';
-
-
- //skrita varianta od koder poberem height in width za urejanje obmocij
- //izbira ustreznega radio ali checkbox za prikazovanje ob missingu
- $input = "checkbox";
-
- echo '<div id="hotspot_image_'.$row['id'].'_hidden" style="display: none;" class="vrednost_inline_hotspot" contenteditable="false" spr_id="'.$row['id'].'">'.$hotspot_image.'</div>';
-
- echo '<div id="hotspot_regions_hidden_menu_'.$row['id'].'">';
-
- if (mysqli_num_rows($sql1) == 0){
- echo '<div class="variabla">';
- echo '</div>';
- }
- else{
- while ($row1 = mysqli_fetch_array($sql1)) {
-
- echo '<div style="display:none;" other="'.$row1['other'].'" class="variabla" id="variabla_'.$row1['id'].'">';
- echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
- echo '</div>';
- }
- while ($row1_missing = mysqli_fetch_array($sql1_missing)) {
- echo '<div class="variabla" other="'.$row1_missing['other'].'" id="variabla_'.$row1_missing['id'].'"><input disabled type="'.$input.'">';
- echo '<div id="vre_id_'.$row1_missing['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1_missing['id'].'" '.(strpos($row1_missing['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1_missing['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1_missing['naslov'].'</div>';
- echo '</div>';
- }
- }
+ echo '<div id="hotspot_regions_hidden_menu_'.$row['id'].'">';
+
+ if (mysqli_num_rows($sql1) == 0){
+ echo '<div class="variabla">';
echo '</div>';
-
- ?>
- <script>
- $(document).ready(function(){
- //resize slike ob razlicnih dogodkih
- hotspot_image_resize(<?=$row['id']?>);
- //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
- //hotspot_image_button_update(<?=$row['id']?>, '<?=$lang['srv_hot_spot_load_image']?>', '<?=$lang['srv_hot_spot_edit_image']?>');
-
- $("#hotspot_image_<?=$row['id']?>")
- .mouseup(function(){//ko prst dvignemo iz miskine tipke
- hotspot_image_resize(<?=$row['id']?>); //
- //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
- })
- .mouseover(function(){//ko z misko gremo mimo
- hotspot_image_resize(<?=$row['id']?>); //
- //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
- })
- .mouseout(function(){//ko z misko gremo ven
- hotspot_image_resize(<?=$row['id']?>); //
- //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
- })
-
- });
- </script>
- <?
+ }
+ else{
+ while ($row1 = mysqli_fetch_array($sql1)) {
+
+ echo '<div style="display:none;" other="'.$row1['other'].'" class="variabla" id="variabla_'.$row1['id'].'">';
+ echo '<div id="vre_id_'.$row1['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1['id'].'" '.(strpos($row1['naslov'], $lang['srv_new_vrednost'])!==false || (isset($lang1['srv_new_vrednost']) && strpos($row1['naslov'], $lang1['srv_new_vrednost'])!==false) || $this->lang_id!=null ? ' default="1"':'').'>' . $row1['naslov'].'</div>';
+ echo '</div>';
+ }
+ while ($row1_missing = mysqli_fetch_array($sql1_missing)) {
+ echo '<div class="variabla" other="'.$row1_missing['other'].'" id="variabla_'.$row1_missing['id'].'"><input disabled type="'.$input.'">';
+ echo '<div id="vre_id_'.$row1_missing['id'].'" class="vrednost_inline" contenteditable="'.(!$locked?'true':'false').'" tabindex="1" vre_id="'.$row1_missing['id'].'" '.(strpos($row1_missing['naslov'], $lang['srv_new_vrednost'])!==false || strpos($row1_missing['naslov'], $lang1['srv_new_vrednost'])!==false || $this->lang_id!=null ? ' default="1"':'').'>' . $row1_missing['naslov'].'</div>';
+ echo '</div>';
+ }
+ }
+ echo '</div>';
+
+ ?>
+ <script>
+ $(document).ready(function(){
+ //resize slike ob razlicnih dogodkih
+ hotspot_image_resize(<?=$row['id']?>);
+ //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
+ //hotspot_image_button_update(<?=$row['id']?>, '<?=$lang['srv_hot_spot_load_image']?>', '<?=$lang['srv_hot_spot_edit_image']?>');
+
+ $("#hotspot_image_<?=$row['id']?>")
+ .mouseup(function(){//ko prst dvignemo iz miskine tipke
+ hotspot_image_resize(<?=$row['id']?>); //
+ //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
+ })
+ .mouseover(function(){//ko z misko gremo mimo
+ hotspot_image_resize(<?=$row['id']?>); //
+ //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
+ })
+ .mouseout(function(){//ko z misko gremo ven
+ hotspot_image_resize(<?=$row['id']?>); //
+ //show_hot_spot_settings (<?=$row['id']?>, <?=$row['enota']?>, <?=$row['tip']?>);
+ })
+
+ });
+ </script>
+ <?
+
echo ' </div>';
//***********************Heatmap konec*************************************************************
}