summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/class.Vprasanje.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/class.Vprasanje.php')
-rw-r--r--admin/survey/classes/class.Vprasanje.php6175
1 files changed, 3495 insertions, 2680 deletions
diff --git a/admin/survey/classes/class.Vprasanje.php b/admin/survey/classes/class.Vprasanje.php
index 50ba1b6..bfceb6a 100644
--- a/admin/survey/classes/class.Vprasanje.php
+++ b/admin/survey/classes/class.Vprasanje.php
@@ -13,6 +13,8 @@ class Vprasanje {
var $db_table = '';
var $expanded = 0;
+
+ protected $survey_type = null;
/**
* konstruktor
@@ -31,8 +33,7 @@ class Vprasanje {
SurveyInfo::getInstance()->SurveyInit($this->anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- $this->db_table = '_active';
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
if (SurveyInfo::getInstance()->getSurveyColumn('expanded') == 1)
$this->expanded = 1;
@@ -43,65 +44,102 @@ class Vprasanje {
*
*/
function display () {
-
- $this->tabs();
+ global $lang;
+
+ $row = Cache::srv_spremenljivka($this->spremenljivka);
+
+
+ echo '<div class="vprasanje_edit_holder">';
+
+ echo '<div id="vprasanje_header">';
+ echo ' <span class="faicon edit"></span>'.$lang['settings'];
+ echo '</div>';
+
+ // Uvod, kalkulacija in kvota nimajo tabov
+ if($this->spremenljivka != -1 && $row['tip'] != '22' && $row['tip'] != '25'){
+ echo '<div id="vprasanje_tabs">';
+ $this->tabs();
+ echo '</div>';
+ }
echo '<div id="vprasanje_edit">';
$this->vprasanje_edit();
echo '</div>';
- $this->edit_buttons();
+ echo '<div class="button_holder">';
+ $this->edit_buttons();
+ echo '</div>';
+
+ echo '</div>';
}
+
/**
* izrise tabe pri urejanju vprasanja
*
*/
- function tabs () {
+ private function tabs () {
global $lang;
global $admin_type;
$row = Cache::srv_spremenljivka($this->spremenljivka);
$rows = SurveyInfo::getInstance()->getSurveyRow();
- echo '<div id="vprasanje_tabs">';
-
- echo '<a href="#" class="tab_link active" id="tab_link_0" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'0\'); return false;">'.$lang['srv_osnovno'].'</a>';
-
if ($this->spremenljivka > 0 && !Demografija::getInstance()->isDemografija($row['variable']) ) {
- // Tab napredno
- echo '<a href="#" class="tab_link" id="tab_link_1" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'1\'); return false;">'.$lang['srv_napredno'].'</a>';
-
- // Tab pogoji
- echo '<a href="#" class="tab_link" id="tab_link_2" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'2\'); return false;">'.$lang['srv_condition'].'</a>';
-
- // Tab validacija
- echo '<a href="#" class="tab_link" id="tab_link_7" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'7\'); return false;">'.$lang['srv_validation'].'</a>';
-
- // Tab opomba
- echo '<a href="#" class="tab_link" id="tab_link_3" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'3\'); return false;">'.$lang['srv_note'].($row['note']!=''?'*':'').'</a>';
-
- // Tab tracking sprememb na vprašanju
- if (($admin_type == 0 || $admin_type == 1) && $rows['vprasanje_tracking'] > 0){
- echo '<div class="tab_link_tracking">';
- echo '<a href="#" class="tab_link" id="tab_link_6" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'6\'); return false;" title="'.$lang['hour_archive'].'"><span>'.$lang['hour_archive'].'</span></a>';
- echo '</div>';
- }
+ // Tab osnovno
+ echo '<div class="tab_link active" id="tab_link_0" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'0\'); return false;">';
+ echo ' <span>'.$lang['srv_osnovno'].'</span>';
+ echo '</div>';
+
+ // Tab napredno
+ echo '<div class="tab_link" id="tab_link_1" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'1\'); return false;">';
+ echo ' <span>'.$lang['srv_napredno'].'</span>';
+ echo '</div>';
+
+ // Tab validacija
+ echo '<div class="tab_link" id="tab_link_7" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'7\'); return false;">';
+ echo ' <span>'.$lang['srv_validation'].'</span>';
+ echo '</div>';
+
+ // Tab tracking sprememb na vprašanju
+ if (($admin_type == 0 || $admin_type == 1) && $rows['vprasanje_tracking'] > 0){
+ echo '<div class="tab_link tracking" id="tab_link_6" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'6\'); return false;" title="'.$lang['hour_archive'].'">';
+ echo ' <span><span>'.$lang['hour_archive'].'</span>';
+ echo '</div>';
+ }
}
else {
- $star = '';
+ // Uvod
if ($this->spremenljivka == -1) {
- if ($rows['thread_intro']!=0 || $rows['intro_note']!='') $star = '*';
- } else {
- if ($rows['thread_concl']!=0 || $rows['concl_note']!='') $star = '*';
+
+ // Tab osnovno
+ /*echo '<div class="tab_link active" id="tab_link_0" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'0\'); return false;">';
+ echo ' <span>'.$lang['srv_osnovno'].'</span>';
+ echo '</div>';
+
+ // Tab opomba
+ $star = '';
+ if ($rows['thread_intro']!=0 || $rows['intro_note']!='')
+ $star = '*';
+
+ echo '<div class="tab_link" id="tab_link_3" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'3\'); return false;">';
+ echo ' <span>'.$lang['srv_note'].$star.'</span>';
+ echo '</div>';*/
+ }
+ else {
+ // Tab osnovno
+ echo '<div class="tab_link active" id="tab_link_0" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'0\'); return false;">';
+ echo ' <span>'.$lang['srv_osnovno'].'</span>';
+ echo '</div>';
+
+ // Tab napredno
+ echo '<div class="tab_link" id="tab_link_1" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'1\'); return false;">';
+ echo ' <span>'.$lang['srv_napredno'].'</span>';
+ echo '</div>';
}
-
- echo '<a href="#" class="tab_link" id="tab_link_3" onclick="vprasanje_tab(\''.$this->spremenljivka.'\', \'3\'); return false;">'.$lang['srv_note'].$star.'</a>';
- }
-
- echo '</div>';
+ }
}
/**
@@ -117,36 +155,59 @@ class Vprasanje {
echo '<input type="hidden" name="anketa" value="'.$this->anketa.'" />';
echo '<input type="hidden" name="spremenljivka" value="'.$this->spremenljivka.'" />';
- echo '<div id="tab_0" class="tab" style="display:block">';
- $this->vprasanje_osnovno();
- echo '</div>';
-
- if ($this->spremenljivka > 0) {
-
- echo '<div id="tab_1" class="tab" style="display:none">';
- $this->vprasanje_napredno();
- echo '</div>';
-
- echo '<div id="tab_2" class="tab" style="display:none">';
- $this->vprasanje_pogoji();
- echo '</div>';
-
- echo '<div id="tab_7" class="tab" style="display:none">';
- $this->vprasanje_validation();
- echo '</div>';
-
- echo '<div id="tab_6" class="tab" style="display:none">';
- $this->vprasanje_display_tracking();
- echo '</div>';
- }
-
- echo '<div id="tab_3" class="tab" style="display:none">';
- $this->vprasanje_komentarji();
- echo '</div>';
+
+ // Uvod
+ if ($this->spremenljivka == -1) {
+ echo '<div id="tab_0" class="tab" style="display:block">';
+ $this->edit_uvod();
+ echo '</div>';
+ }
+ // Zakljucek
+ elseif ($this->spremenljivka == -2) {
+ echo '<div id="tab_0" class="tab" style="display:block">';
+ $this->edit_zakljucek();
+ echo '</div>';
+
+ echo '<div id="tab_1" class="tab" style="display:none">';
+ $this->edit_zakljucek_napredno();
+ echo '</div>';
+ }
+ // Statistika
+ elseif($this->spremenljivka == -3) {
+ echo '<div id="tab_0" class="tab" style="display:block">';
+ $this->edit_statistika();
+ echo '</div>';
+ }
+ // Vprasanje
+ else {
+
+ // Kalkulacija in kvota imata samo validacijo, nobenih drugih nastavitev
+ if($row['tip'] == '22' || $row['tip'] == '25'){
+
+ echo '<div id="tab_7" class="tab" style="display:block">';
+ $this->vprasanje_validation();
+ echo '</div>';
+ }
+ else{
+ echo '<div id="tab_0" class="tab" style="display:block">';
+ $this->vprasanje_osnovno();
+ echo '</div>';
+
+ echo '<div id="tab_1" class="tab" style="display:none">';
+ $this->vprasanje_napredno();
+ echo '</div>';
+
+ echo '<div id="tab_7" class="tab" style="display:none">';
+ $this->vprasanje_validation();
+ echo '</div>';
+
+ echo '<div id="tab_6" class="tab" style="display:none">';
+ $this->vprasanje_display_tracking();
+ echo '</div>';
+ }
+ }
echo '</form>';
-
- echo '<span id="vprasanje_edit_bottom_placeholder"></span>';
}
/**
@@ -157,320 +218,314 @@ class Vprasanje {
global $lang;
global $site_url;
- //uvod
- if ($this->spremenljivka == -1) {
- $this->edit_uvod();
-
- //zakljucek
- } elseif ($this->spremenljivka == -2) {
- $this->edit_zakljucek();
-
- //statistika
- } elseif($this->spremenljivka == -3) {
- $this->edit_statistika();
-
- } else {
-
- $row = Cache::srv_spremenljivka($this->spremenljivka);
- $spremenljivkaParams = new enkaParameters($row['params']);
-
- // demografija
- if (Demografija::getInstance()->isDemografija($row['variable'])) {
-
- // variabla na vrhu in izbira druge demografije
- $this->variable();
-
- // izbira tipa demografije
- echo '<fieldset><legend>'.$lang['srv_question_type'].'</legend>';
- echo '<p><span class="title">'.$lang['srv_select_type'].':</span><span class="content"><select style="width:150px" name="tip" id="spremenljivka_tip_' . $row['id'] . '" size="1" spr_id="' . $row['id'] . '" onChange="change_demografija(\'' . $row['id'] . '\', $(this).val());" data-ajax="true">';
-
- foreach (Demografija::getInstance()->getSeznam($row['variable']) AS $variabla) {
- echo '<option value="'.Demografija::getInstance()->getSpremenljivkaID($variabla).'" '.($row['variable'] == $variabla?'selected':'').'>'.$variabla.'</option>';
- }
-
- echo '</select></span></p>';
-
- echo '<script type="text/javascript">';
- echo '$(document).ready(function() { ';
- echo '$("#spremenljivka_tip_' . $row['id'] . '").selectbox();'; // kreira custom dropdown z možnostjo predogleda vprašanja
- echo '});';
- echo '</script>';
-
- echo '<p><strong>'.$lang[$row['variable']].'</strong></p>';
-
- echo '</fieldset>';
-
- // reminder
- $this->edit_reminder();
-
-
- }
- // navadno vprasanje
- else {
-
- // variabla na vrhu
- $this->variable(1);
-
- // prikaz vprasanja - postavitev
- if ( in_array($row['tip'], array(1, 2, 3, 6, 7, 16, 17, 20, 9, 26, 27)) ) {
- $this->edit_subtip();
- }
-
- // Nastavitev za postavitev texbox za besedilo, number, datum - vodoravno ob ali pod vprasanjem
- if ( in_array($row['tip'], array(21, 7, 8)) ) {
+ $row = Cache::srv_spremenljivka($this->spremenljivka);
+ $spremenljivkaParams = new enkaParameters($row['params']);
+
+ // demografija
+ if (Demografija::getInstance()->isDemografija($row['variable'])) {
+
+ // variabla na vrhu in izbira druge demografije
+ $this->variable();
+
+ // izbira tipa demografije
+ echo '<fieldset><legend>'.$lang['srv_question_type'].'</legend>';
+ echo '<p><span class="title">'.$lang['srv_select_type'].':</span><span class="content"><select style="width:150px" name="tip" id="spremenljivka_tip_' . $row['id'] . '" size="1" spr_id="' . $row['id'] . '" onChange="change_demografija(\'' . $row['id'] . '\', $(this).val());" data-ajax="true">';
+
+ foreach (Demografija::getInstance()->getSeznam($row['variable']) AS $variabla) {
+ echo '<option value="'.Demografija::getInstance()->getSpremenljivkaID($variabla).'" '.($row['variable'] == $variabla?'selected':'').'>'.$variabla.'</option>';
+ }
+
+ echo '</select></span></p>';
+
+ echo '<script type="text/javascript">';
+ echo '$(document).ready(function() { ';
+ echo '$("#spremenljivka_tip_' . $row['id'] . '").selectbox();'; // kreira custom dropdown z možnostjo predogleda vprašanja
+ echo '});';
+ echo '</script>';
+
+ echo '<p><strong>'.$lang[$row['variable']].'</strong></p>';
+
+ echo '</fieldset>';
+
+ // reminder
+ $this->edit_reminder();
+ }
+ // navadno vprasanje
+ else {
+
+ // TIP IN PODTIP VPRASANJA
+ echo '<fieldset class="first">';
- // Ce nimamo slider-ja
- if($row['tip'] != 7 || $row['ranking_k'] != 1){
- $this->edit_orientation();
- }
- }
-
- // datum-min/max date
- if ( in_array($row['tip'], array(8)) ) {
- $this->edit_date_range();
- $this->edit_date_withTime();
- }
-
- // Lokacija
- if ( in_array($row['tip'], array(26)) ) {
- $this->edit_input_type_map();
- $this->fokus_mape();
- $this->userLocation();
- $this->markerPodvprasanje();
- $this->naslov_podvprasanja_map();
- $this->st_markerjev();
- $this->dodaj_SearchBox();
- }
-
- // pri nagovoru ni smiselno dodajat opozoril
- if ( ! in_array($row['tip'], array(5)) ) {
- $this->edit_reminder();
- }
+ // Izbira tipa vprasanja
+ $this->variable(1);
+
+ // prikaz vprasanja - postavitev
+ if ( in_array($row['tip'], array(1, 2, 3, 6, 7, 16, 17, 20, 9, 26, 27)) ) {
+ $this->edit_subtip();
+ }
+
+ // Nastavitev za postavitev texbox za besedilo, number, datum - vodoravno ob ali pod vprasanjem
+ if ( in_array($row['tip'], array(21, 7, 8)) ) {
- // opomba na vprasanje
- $this->edit_opomba();
-
- if (($row['tip'] == 7 || $row['tip'] == 20) && $row['ranking_k'] == 1) {
+ // Ce nimamo slider-ja
+ if($row['tip'] != 7 || $row['ranking_k'] != 1){
+ $this->edit_orientation();
+ }
+ }
- echo '<fieldset><legend>'.$lang['slider_properties_note'].'</legend>';
- $this->edit_sliders_settings();
- echo '</fieldset>';
- }
+ echo '</fieldset>';
+
+
+ // POGOSTE NASTAVITVE
+ echo '<fieldset><legend>'.$lang['srv_common_settings'].'</legend>';
+
+ // datum-min/max date
+ if ( in_array($row['tip'], array(8)) ) {
+ $this->edit_date_range();
+ $this->edit_date_withTime();
+ }
- // Hotspot
- if( in_array($row['tip'], array(1, 2, 6, 17)) ){
- $this->edit_hot_spot_settings();
- }
-
- if ( in_array($row['tip'], array(6, 16, 19, 20)) ) {
+ // Lokacija
+ if ( in_array($row['tip'], array(26)) ) {
+ $this->edit_input_type_map();
+ $this->fokus_mape();
+ $this->userLocation();
+ $this->markerPodvprasanje();
+ $this->naslov_podvprasanja_map();
+ $this->st_markerjev();
+ $this->dodaj_SearchBox();
+ }
- if ($row['ranking_k'] != 1){
- echo '<fieldset><legend>'.$lang['srv_kategorije_odgovorov'].'</legend>';
- }
- if ( in_array($row['tip'], array(6, 16)) ) {
- $this->edit_grid_subtitle();
- }
-
- $this->edit_grid();
-
- // Uporaba label
- $this->edit_column_labels();
-
- // Ponovi glavo v gridu vsakih x vrstic
- if ( in_array($row['tip'], array(6, 16)) )
- $this->edit_grid_repeat_header();
-
- $this->edit_drag_and_drop_new_look();
-
- if ($row['ranking_k'] != 1){
- echo '</fieldset>';
- }
-
- // Merska lestvica (ordinalna ali nominalna)
- if ($row['tip'] == 6){
- $this->edit_skala_new();
- }
-
- echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
- $this->edit_grid_missing();
- echo '</fieldset>';
- }
+ // pri nagovoru ni smiselno dodajat opozoril
+ if ( ! in_array($row['tip'], array(5)) ) {
+ $this->edit_reminder();
+ }
- // kategorije vprasanj
- if ( in_array($row['tip'], array(1, 2, 3, 6, 16, 17, 18, 19, 20, 24)) ) {
-
- if ( in_array($row['tip'], array(1, 2, 3, 17, 18)) ){
- echo '<fieldset class="kategorije_odgovorov" id="kategorije_odgovorov_'.$row['id'].'"><legend>'.$lang['srv_kategorije_odgovorov'].'</legend>';
- }
- else{
- echo '<fieldset><legend>'.$lang['srv_podvprasanja'].'</legend>';
- }
-
- if ( in_array($row['tip'], array(24)) ) {
- $this->edit_multiple_subtitle();
- }
-
- if ( in_array($row['tip'], array(6, 16, 19, 18, 20, 24)) ) {
- $this->edit_grid_width();
-
- if ( in_array($row['tip'], array(6, 16, 19, 20, 24)) ) {
- $this->edit_grid_align();
- }
- }
-
- // kategorije vprasanja - hitro dodajanje
- $this->edit_vrednost();
-
- // razvrscanje
- if(!in_array($row['orientation'], [9,11])) {
- $this->edit_random();
- }
-
- if ( in_array($row['tip'], array(1, 2, 3, 6, 16)) ) {
- $this->edit_selectbox_size();
- }
+ if ($row['tip'] == 1 || $row['tip'] == 3 || $row['tip'] == 6){
+ $this->edit_skala_new();
+ }
- // Slikice namesto radio gumbov (smiley, thumbs up...) - $row['orientation'] == 9
- if(in_array($row['tip'], array(1, 2))){
- $this->edit_custom_picture_radio();
- }
+ // opomba na vprasanje
+ $this->edit_opomba();
- if(in_array($row['tip'], array(1, 6))){
- $this->edit_visual_analog_scale();
- }
+ // Crta pod nagovorom
+ if ($row['tip'] == 5) {
+ $this->edit_nagovor_line();
+ }
-
- // razvrscanje - moznosti
- if ( in_array($row['tip'], array(17)) ) {
- $this->edit_ranking_moznosti();
- }
-
- echo '</fieldset>';
- }
-
- // Merska lestvica (ordinalna ali nominalna)
- if ($row['tip'] == 1 || $row['tip'] == 3){
- $this->edit_skala_new();
- }
- // manjkajoce vrednosti
- if ($row['tip'] <= 3) {
- echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
- $this->edit_missing();
- echo '</fieldset>';
- }
-
- // editiranje vrednosti pri datumu
- if ( in_array($row['tip'], array(8)) ) {
+ echo '</fieldset>';
- echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
-
- $this->edit_vrednost_datum();
-
- // naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
- $this->edit_alert_show_missing();
-
- echo '</fieldset>';
- }
-
-
-
- if ( in_array($row['tip'], array(7, 19, 20, 21)) ) {
+
+ if (($row['tip'] == 7 || $row['tip'] == 20) && $row['ranking_k'] == 1) {
+
+ echo '<fieldset><legend>'.$lang['slider_properties_note'].'</legend>';
+ $this->edit_sliders_settings();
+ echo '</fieldset>';
+ }
+
+ // Hotspot
+ if( in_array($row['tip'], array(1, 2, 6, 17)) ){
+ $this->edit_hot_spot_settings();
+ }
- $captcha = ($spremenljivkaParams->get('captcha') ? $spremenljivkaParams->get('captcha') : 0);
+ // Heatmap
+ if ($row['tip'] == 27) {
+ $this->edit_heatmap_settings();
+ }
+
+ if ( in_array($row['tip'], array(6, 16, 19, 20)) ) {
- //ce ni elektronski podpis, upload ali captcha
- if($row['signature'] != 1 && $row['upload'] < 1 && $captcha != 1){
- $displayFieldset = 'display: block';
- }
- else{
- $displayFieldset = 'display: none';
- }
+ if ($row['ranking_k'] != 1){
+ echo '<fieldset><legend>'.$lang['srv_kategorije_odgovorov'].'</legend>';
+ }
+ if ( in_array($row['tip'], array(6, 16)) ) {
+ $this->edit_grid_subtitle();
+ }
+
+ $this->edit_grid();
+
+ // Uporaba label
+ $this->edit_column_labels();
+
+ // Ponovi glavo v gridu vsakih x vrstic
+ if ( in_array($row['tip'], array(6, 16)) )
+ $this->edit_grid_repeat_header();
+
+ $this->edit_drag_and_drop_new_look();
+
+ if ($row['ranking_k'] != 1){
+ echo '</fieldset>';
+ }
+ }
- echo '<fieldset style="'.$displayFieldset.'" class="kategorije_odgovorov" id="kategorijeOdgovorov_'.$this->spremenljivka.'"><legend>'.$lang['srv_kategorije_odgovorov'].'</legend>';
+ // kategorije vprasanj
+ if ( in_array($row['tip'], array(1, 2, 3, 6, 16, 17, 18, 19, 20, 24)) ) {
+
+ if ( in_array($row['tip'], array(1, 2, 3, 17, 18)) ){
+ echo '<fieldset class="kategorije_odgovorov" id="kategorije_odgovorov_'.$row['id'].'"><legend>'.$lang['srv_kategorije_odgovorov'].'</legend>';
+ }
+ else{
+ echo '<fieldset><legend>'.$lang['srv_podvprasanja'].'</legend>';
+ }
- if ( in_array($row['tip'], array(21)) ) {
- $this->edit_textboxes();
- }
+ if ( in_array($row['tip'], array(24)) ) {
+ $this->edit_multiple_subtitle();
+ }
+
+ if ( in_array($row['tip'], array(6, 16, 19, 18, 20, 24)) ) {
+ $this->edit_grid_width();
- if ( in_array($row['tip'], array(7)) ) {
- if ($row['ranking_k'] == 0){ //ce je izbrano stevilo in ne drsnik
- $this->edit_num_size();
- $this->edit_num_enota();
- }
+ if ( in_array($row['tip'], array(6, 16, 19, 20, 24)) ) {
+ $this->edit_grid_align();
}
-
+ }
+
+ // kategorije vprasanja - hitro dodajanje
+ $this->edit_vrednost();
+
+ // razvrscanje -- za tip 1 se mora prikazati v drugem vrstnem redu
+ if(!in_array($row['orientation'], [9,11]) && $row['tip'] !== '1') {
+ $this->edit_random();
+ }
+
+ if ( in_array($row['tip'], array(1, 2, 3, 6, 16)) ) {
+ $this->edit_selectbox_size();
+ }
+
+ // Slikice namesto radio gumbov (smiley, thumbs up...) - $row['orientation'] == 9
+ if(in_array($row['tip'], array(1, 2))){
+ $this->edit_custom_picture_radio();
+ }
+
+ // visualne barvne ni za grid
+ if(in_array($row['tip'], array(1/* , 6 */))){
+ $this->edit_visual_analog_scale();
+ $this->edit_visual_analog_type();
+ }
+
+
+ // razvrscanje - moznosti
+ if ( in_array($row['tip'], array(17)) ) {
+ $this->edit_ranking_moznosti();
+ }
+
+ echo '</fieldset>';
+ }
+
+
+ if ( in_array($row['tip'], array(7, 19, 20, 21)) ) {
+
+ $captcha = ($spremenljivkaParams->get('captcha') ? $spremenljivkaParams->get('captcha') : 0);
+
+ //ce ni elektronski podpis, upload ali captcha
+ if($row['signature'] != 1 && $row['upload'] < 1 && $captcha != 1){
+ $displayFieldset = 'display: block';
+ }
+ else{
+ $displayFieldset = 'display: none';
+ }
+
+ if ($row['ranking_k'] == 0)
+ echo '<fieldset style="'.$displayFieldset.'" class="kategorije_odgovorov" id="kategorijeOdgovorov_'.$this->spremenljivka.'"><legend>'.$lang['srv_kategorije_odgovorov'].'</legend>';
+
+ if ( in_array($row['tip'], array(21)) ) {
+ $this->edit_textboxes();
+ }
+
+ if ( in_array($row['tip'], array(7)) ) {
if ($row['ranking_k'] == 0){ //ce je izbrano stevilo in ne drsnik
- $this->edit_width();
+ $this->edit_num_size();
+ $this->edit_num_enota();
}
-
- echo '</fieldset>';
+ }
+
+ if ($row['ranking_k'] == 0){ //ce je izbrano stevilo in ne drsnik
+ $this->edit_width();
+ }
+
+ if ($row['ranking_k'] == 0)
+ echo '</fieldset>';
- // Poseben segment za upload datoteke
- if($row['upload'] == 1){
- $displayFieldset = 'display: block';
- }
- else{
- $displayFieldset = 'display: none';
- }
+ // Poseben segment za upload datoteke
+ if($row['upload'] == 1){
+ $displayFieldset = 'display: block';
+ }
+ else{
+ $displayFieldset = 'display: none';
+ }
+
+ echo '<fieldset style="'.$displayFieldset.'" class="upload_info"><legend>'.$lang['srv_vprasanje_upload_limit_title'].' '.Help::display('srv_upload_limit').'</legend>';
+ echo '<p>'.$lang['srv_vprasanje_upload_limit'].'</p>';
+ echo '<p>'.$lang['srv_vprasanje_upload_limit_type'].'</p>';
+ echo '</fieldset>';
+ }
+
+ // manjkajoce vrednosti - besedilo
+ if ( in_array($row['tip'], array(21)) ) {
+
+ echo '<input type="hidden" name="edit_vrednost_besedilo" value="1" />';
+
+ //missingi so sli v branching na bottom box
+ //echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
+ //$this->edit_vrednost_missing();
+ //echo '</fieldset>';
+ }
+
+ // Sirina polja "drugo" (ce je v vprasanju)
+ if (in_array($row['tip'], array(1,2,3,6,16,19,20,24)))
+ $this->edit_other_field();
+
+ if ( in_array($row['tip'], array(7, 18, 20, 21)) ) {
+
+ // ce je izbrano stevilo in ne drsnik - omejitve vnosa
+ if ($row['ranking_k'] == 0){
+
+ echo '<fieldset>';
+ //echo ' <legend class="pointer" onClick="fieldsetToggle(this);"><span class="faicon arrow2_d"></span>'.$lang['srv_num_limits'].'</legend>';
+ echo ' <legend>'.$lang['srv_num_limits'].'</legend>';
+
+ //echo ' <div class="fieldset_holder" style="display:none;">';
+ echo ' <div class="fieldset_holder">';
+
+ if ($row['tip'] != 21)
+ $this->edit_number();
+
+ $this->edit_limit();
+
+ echo ' </div>';
- echo '<fieldset style="'.$displayFieldset.'" class="upload_info"><legend>'.$lang['srv_vprasanje_upload_limit_title'].' '.Help::display('srv_upload_limit').'</legend>';
- echo '<p>'.$lang['srv_vprasanje_upload_limit'].'</p>';
- echo '<p>'.$lang['srv_vprasanje_upload_limit_type'].'</p>';
echo '</fieldset>';
}
-
- // manjkajoce vrednosti - besedilo
- if ( in_array($row['tip'], array(21)) ) {
- echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
- $this->edit_vrednost_besedilo();
-
- // naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
- $this->edit_alert_show_missing();
- echo '</fieldset>';
- }
-
- // Sirina polja "drugo" (ce je v vprasanju)
- if (in_array($row['tip'], array(1,2,3,6,16,19,20,24)))
- $this->edit_other_field();
-
- if ( in_array($row['tip'], array(7, 18, 20)) ) {
-
- if ($row['ranking_k'] == 0){ //ce je izbrano stevilo in ne drsnik
- $this->edit_number();
- }
-
- if ($row['tip'] == 7) {
- echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
- $this->edit_vrednost_number();
-
- // naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
- $this->edit_alert_show_missing();
+ }
- echo '</fieldset>';
- }
- }
-
- if ( in_array($row['tip'], array(22)) ) {
- $this->edit_compute();
- }
-
- if ( in_array($row['tip'], array(9)) ) {
- $this->edit_name_generator();
- }
-
- if ( in_array($row['tip'], array(7,18,20, 21)) ) {
- if ($row['ranking_k'] == 0){ //ce je izbrano stevilo in ne drsnik
- $this->edit_limit();
- }
- }
-
- // Crta pod nagovorom
- if ($row['tip'] == 5) {
- $this->edit_nagovor_line();
- }
- }
- }
+ if ($row['tip'] == 7) {
+
+ echo '<input type="hidden" name="edit_vrednost_number" value="1" />';
+
+ //missingi so sli v branching na bottom box
+ //echo '<fieldset>';
+ //echo ' <legend class="pointer" onClick="fieldsetToggle(this);"><span class="faicon arrow2_d"></span>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
+ //echo ' <legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
+
+ //echo ' <div class="fieldset_holder" style="display:none;">';
+ //echo ' <div class="fieldset_holder">';
+ //$this->edit_vrednost_missing();
+ //echo ' </div>';
+
+ //echo '</fieldset>';
+ }
+
+ if ( in_array($row['tip'], array(22)) ) {
+ $this->edit_compute();
+ }
+
+ if ( in_array($row['tip'], array(9)) ) {
+ $this->edit_name_generator();
+ }
+
+
+ }
}
function edit_sliders_settings(){
@@ -537,185 +592,225 @@ class Vprasanje {
$slider_VmesneCrtice_opacity = 1;
$disable_slider_VmesneCrtice = '';
}
-
- //echo '<input type="hidden" name="MinMaxLabelsDefaultFlag" value="1" />';
-
+
+
// Polje size moramo imeti - drugace se pobrise vse iz srv_vrednost in se ne shranjuje vec
echo '<input type="hidden" value="1" name="size" id="num_size">';
- //Drsna rocica
- echo '<label for="slider_handle_'.$this->spremenljivka.'"><div class="dropsliderhandle" >'; //drsna rocica
- echo '<p><span class="title" >'.$lang['slider_handle_note'].':</span>';
- //echo $slider_handle;
- echo '<span class="content">';
- echo '<input type="checkbox" value="0" name="slider_handle" '.( $slider_handle == 0 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_handle_'.$this->spremenljivka.'">';
-
- //echo '<input type="hidden" value="1" name="slider_handle" id="slider_handle_hidden_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_handle_hidden.' type="hidden" value="1" name="slider_handle" id="slider_handle_hidden_'.$this->spremenljivka.'">';
- //echo '<input type="checkbox" value="1" name="slider_handle" '.( $slider_handle == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_handle_'.$this->spremenljivka.'">';
+ // Drsna rocica
+ echo '<div class="vprasanje_setting_holder dropsliderhandle">';
- //echo '<input type="hidden" value="0" name="slider_handle" id="slider_handle_hidden_'.$this->spremenljivka.'">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="0" name="slider_handle" '.( $slider_handle == 0 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_handle_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_handle_'.$this->spremenljivka.'">'.$lang['slider_handle_note'].'</label>';
+ echo ' <input '.$disable_slider_handle_hidden.' type="hidden" value="1" name="slider_handle" id="slider_handle_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
- echo '</span></p>';
- echo '</div></label>';
-
- //Stevilka nad izbrano tocko
- echo '<label for="slider_window_number_'.$this->spremenljivka.'"><div class="dropsliderwindownumber" >';
- echo '<p><span class="title" >'.$lang['slider_window_number_title'].':</span>';
- echo '<span class="content">';
- echo '<input type="checkbox" value="0" name="slider_window_number" '.( $slider_window_number == 0 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_window_number_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_window_number_hidden.' type="hidden" value="1" name="slider_window_number" id="slider_window_number_hidden_'.$this->spremenljivka.'">';
- //echo '<input '.$disable_slider_window_number_hidden.' value="1" name="slider_window_number" id="slider_window_number_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div></label>';
+ echo '</div>';
+
+ // Stevilka nad izbrano tocko
+ echo '<div class="vprasanje_setting_holder dropsliderwindownumber">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="0" name="slider_window_number" '.( $slider_window_number == 0 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_window_number_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_window_number_'.$this->spremenljivka.'">'.$lang['slider_window_number_title'].'</label>';
+ echo ' <input '.$disable_slider_window_number_hidden.' type="hidden" value="1" name="slider_window_number" id="slider_window_number_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ // Nakazi mozne odgovore
if ($admin_type == 0){
- //Nakazi mozne odgovore
- echo '<label for="slider_nakazi_odgovore_'.$this->spremenljivka.'"><div class="dropslidernakaziodgovore" >';
- echo '<p><span class="title" >'.$lang['srv_slider_nakazi_odgovore'].':</span>';
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="slider_nakazi_odgovore" '.( $slider_nakazi_odgovore == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_nakazi_odgovore_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_nakazi_odgovore_hidden.' type="hidden" value="0" name="slider_nakazi_odgovore" id="slider_nakazi_odgovore_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div></label>';
+
+ echo '<div class="vprasanje_setting_holder dropslidernakaziodgovore">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="1" name="slider_nakazi_odgovore" '.( $slider_nakazi_odgovore == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_nakazi_odgovore_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_nakazi_odgovore_'.$this->spremenljivka.'">'.$lang['srv_slider_nakazi_odgovore'].'</label>';
+ echo ' <input '.$disable_slider_nakazi_odgovore_hidden.' type="hidden" value="0" name="slider_nakazi_odgovore" id="slider_nakazi_odgovore_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
+ echo '</div>';
}
-
-
- //Korak drsnika
+ // Korak drsnika
$viewMinMaxNumLabels = ($slider_VmesneDescrLabel == 1) ? '; display:none;' : '';
- echo '<div class="dropsliderhandle_step_'.$this->spremenljivka.'" style="opacity: '.$slider_handle_step_opacity.''.$viewMinMaxNumLabels.'">'; //korak drsnika
- echo '<p><span class="title" >'.$lang['slider_handle_step_note'].':</span>';
- echo '<span class="content"><select name="slider_handle_step" id="slider_handle_step_'.$this->spremenljivka.'" '.$disable_slider_handle_step.'>';
+
+ echo '<div class="vprasanje_setting_holder dropsliderhandle_step_'.$this->spremenljivka.'" style="opacity: '.$slider_handle_step_opacity.''.$viewMinMaxNumLabels.'">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['slider_handle_step_note'].':</label>';
+ echo ' <span class="content"><select name="slider_handle_step" id="slider_handle_step_'.$this->spremenljivka.'" '.$disable_slider_handle_step.'>';
for($i=1; $i<=10; $i++){
echo '<option value="'.$i.'"'.($slider_handle_step == $i ? ' selected="true"' : '') . '>'.$i.'</option>';
}
- echo '</select></span>';
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
- //Min in max vrednosti
+
+ // Min in max vrednosti
$viewMinMaxNumLabels = ($slider_VmesneDescrLabel == 1) ? ' style="display:none;"' : '';
- echo '<div class="MinMaxNumLabels_'.$this->spremenljivka.'" '.$viewMinMaxNumLabels.'>'; //ureditev min in max stevilk
- echo '<p>';
- echo $lang['srv_num_min'] . '<input type="text" name="slider_MinNumLabel" id="slider_MinNumLabel_'.$this->spremenljivka.'" value="' . $slider_MinNumLabel . '" size="8" onkeyup="checkNumber(this, 6, 2); sliderCopytoMinNumLabelTemp('.$this->spremenljivka.');"></input> ';
- echo $lang['srv_num_limit'] . '<input type="text" name="slider_MaxNumLabel" id="slider_MaxNumLabel_'.$this->spremenljivka.'" value="' . $slider_MaxNumLabel . '" size="8" onkeyup="checkNumber(this, 6, 2); sliderCopytoMaxNumLabelTemp('.$this->spremenljivka.');"></input> ';
- echo '</p>';
+
+ echo '<div class="vprasanje_setting_holder MinMaxNumLabels_'.$this->spremenljivka.'" '.$viewMinMaxNumLabels.'">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_min'].':</label>';
+ echo ' <span class="content"><input type="text" name="slider_MinNumLabel" id="slider_MinNumLabel_'.$this->spremenljivka.'" value="' . $slider_MinNumLabel . '" size="8" onkeyup="checkNumber(this, 6, 2); sliderCopytoMinNumLabelTemp('.$this->spremenljivka.');"></input></span>';
+ echo ' </div>';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_limit'].':</label>';
+ echo ' <span class="content"><input type="text" name="slider_MaxNumLabel" id="slider_MaxNumLabel_'.$this->spremenljivka.'" value="' . $slider_MaxNumLabel . '" size="8" onkeyup="checkNumber(this, 6, 2); sliderCopytoMaxNumLabelTemp('.$this->spremenljivka.');"></input></span>';
+ echo ' </div>';
+
echo '</div>';
- //temp Min in Max style="display: none"
- echo '<div class="MinMaxNumLabelsTemp" style="display: none" >'; //ureditev temp min in max stevilk, za vrnitev stevilskih label, ki so bile prej izbrane
- echo '<p>';
- echo $lang['srv_num_min'] . '<input type="text" name="slider_MinNumLabelTemp" id="slider_MinNumLabelTemp_'.$this->spremenljivka.'" value="' . $slider_MinNumLabelTemp . '" size="8" onkeyup="checkNumber(this, 6, 2);"></input> ';
- echo $lang['srv_num_limit'] . '<input type="text" name="slider_MaxNumLabelTemp" id="slider_MaxNumLabelTemp_'.$this->spremenljivka.'" value="' . $slider_MaxNumLabelTemp . '" size="8" onkeyup="checkNumber(this, 6, 2);"></input> ';
- echo '</p>';
+
+ // temp Min in Max style="display: none"
+ echo '<div class="vprasanje_setting_holder MinMaxNumLabelsTemp" style="display:none;">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_min'].':</label>';
+ echo ' <span class="content"><input type="text" name="slider_MinNumLabelTemp" id="slider_MinNumLabelTemp_'.$this->spremenljivka.'" value="' . $slider_MinNumLabelTemp . '" size="8" onkeyup="checkNumber(this, 6, 2);"></input></span>';
+ echo ' </div>';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_limit'].':</label>';
+ echo ' span class="content"><input type="text" name="slider_MaxNumLabelTemp" id="slider_MaxNumLabelTemp_'.$this->spremenljivka.'" value="' . $slider_MaxNumLabelTemp . '" size="8" onkeyup="checkNumber(this, 6, 2);"></input></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ // Vmesne crtice
+ echo '<div class="vprasanje_setting_holder slider_VmesneCrtice_'.$this->spremenljivka.' dropVmesneCrtice" style="opacity: '.$slider_VmesneCrtice_opacity.'">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input '.$disable_slider_VmesneCrtice.' type="checkbox" value="1" name="slider_VmesneCrtice" '.( $slider_VmesneCrtice == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_VmesneCrtice_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_VmesneCrtice_'.$this->spremenljivka.'">'.$lang['slider_VmesneCrtice_note'].'</label>';
+ echo ' <input '.$disable_slider_VmesneCrtice_hidden.' type="hidden" value="0" name="slider_VmesneCrtice" id="slider_VmesneCrtice_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
echo '</div>';
- //temp Min in Max - konec
-
- //Vmesne crtice
- echo '<label class="slider_VmesneCrtice_'.$this->spremenljivka.'" for="slider_VmesneCrtice_'.$this->spremenljivka.'"><div class="dropVmesneCrtice" style="opacity: '.$slider_VmesneCrtice_opacity.'">'; //ureditev prikazovanja in skrivanja vmesnih crtic
- echo '<p><span class="title" >'.$lang['slider_VmesneCrtice_note'].':</span>';
- echo '<span class="content">';
- echo '<input '.$disable_slider_VmesneCrtice.' type="checkbox" value="1" name="slider_VmesneCrtice" '.( $slider_VmesneCrtice == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_VmesneCrtice_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_VmesneCrtice_hidden.' type="hidden" value="0" name="slider_VmesneCrtice" id="slider_VmesneCrtice_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div></label>';
-
- //Stevilske labele
- //echo '<p><span class="title" >'.$lang['slider_NumLabel_note'].':</span></p>';
-
- echo '<div class="dropNumLabelNew">';
-
- echo '<label for="slider_VmesneNumLabel_'.$this->spremenljivka.'"><p><span class="title" >'.$lang['slider_NumLabel_note'].':</span>'; //ureditev prikazovanja in skrivanja stevilskih vmesnih label
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="slider_VmesneNumLabel" '.( $slider_VmesneNumLabel == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_VmesneNumLabel_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_VmesneNumLabel_hidden.' type="hidden" value="0" name="slider_VmesneNumLabel" id="slider_VmesneNumLabel_hidden_'.$this->spremenljivka.'">';
- echo '</span></p></label>';
-
- echo '<label for="slider_MinMaxNumLabelNew_'.$this->spremenljivka.'"><p><span class="title" >'.$lang['slider_MinMaxNumLabel_note'].':</span>';
- echo '<span class="content">'; //ureditev prikazovanja in skrivanja stevilskih label za min in max na sliderju s pips-i
- echo '<input type="checkbox" value="0" name="slider_MinMaxNumLabelNew" '.( $slider_MinMaxNumLabelNew == 0 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_MinMaxNumLabelNew_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_MinMaxNumLabelNew_hidden.' type="hidden" value="1" name="slider_MinMaxNumLabelNew" id="slider_MinMaxNumLabelNew_hidden_'.$this->spremenljivka.'">';
- echo '</span></p></label>';
+
+
+ // Stevilske labele
+ echo '<div class="vprasanje_setting_holder dropNumLabelNew">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="1" name="slider_VmesneNumLabel" '.( $slider_VmesneNumLabel == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_VmesneNumLabel_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_VmesneNumLabel_'.$this->spremenljivka.'">'.$lang['slider_NumLabel_note'].'</label>';
+ echo ' <input '.$disable_slider_VmesneNumLabel_hidden.' type="hidden" value="0" name="slider_VmesneNumLabel" id="slider_VmesneNumLabel_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '<div class="vprasanje_setting_holder dropNumLabelNew">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="0" name="slider_MinMaxNumLabelNew" '.( $slider_MinMaxNumLabelNew == 0 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_MinMaxNumLabelNew_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_MinMaxNumLabelNew_'.$this->spremenljivka.'">'.$lang['slider_MinMaxNumLabel_note'].'</label>';
+ echo ' <input '.$disable_slider_MinMaxNumLabelNew_hidden.' type="hidden" value="1" name="slider_MinMaxNumLabelNew" id="slider_MinMaxNumLabelNew_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
echo '</div>';
- //Opisne labele
- echo '<div class="dropDescriptiveLabel" >';
- echo '<label for="slider_MinMaxLabel_'.$this->spremenljivka.'"><p><span class="title">'.$lang['slider_MinMaxLabel_note'].'</span></label>';
- echo '<span class="content">'; //ureditev prikazovanja in skrivanja opisnih label za min in max
- echo '<input type="checkbox" value="1" name="slider_MinMaxLabel" '.( $slider_MinMaxLabel == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_MinMaxLabel_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_MinMaxLabel_hidden.' type="hidden" value="0" name="slider_MinMaxLabel" id="slider_MinMaxLabel_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
+ // Opisne labele
+ echo '<div class="vprasanje_setting_holder dropDescriptiveLabel">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="1" name="slider_MinMaxLabel" '.( $slider_MinMaxLabel == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_MinMaxLabel_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_MinMaxLabel_'.$this->spremenljivka.'">'.$lang['slider_MinMaxLabel_note'].'</label>';
+ echo ' <input '.$disable_slider_MinMaxLabel_hidden.' type="hidden" value="0" name="slider_MinMaxLabel" id="slider_MinMaxLabel_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '<div class="vprasanje_setting_holder dropDescriptiveLabel">';
- echo '<label for="slider_VmesneDescrLabel_'.$this->spremenljivka.'"><p><span class="title">'.$lang['slider_VmesneLabel_note'].'</span></label>'; //ureditev prikazovanja in skrivanja opisnih vmesnih label
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="slider_VmesneDescrLabel" '.( $slider_VmesneDescrLabel == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_VmesneDescrLabel_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_VmesneDescrLabel_hidden.' type="hidden" value="0" name="slider_VmesneDescrLabel" id="slider_VmesneDescrLabel_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="1" name="slider_VmesneDescrLabel" '.( $slider_VmesneDescrLabel == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_VmesneDescrLabel_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_VmesneDescrLabel_'.$this->spremenljivka.'">'.$lang['slider_VmesneLabel_note'].'</label>';
+ echo ' <input '.$disable_slider_VmesneDescrLabel_hidden.' type="hidden" value="0" name="slider_VmesneDescrLabel" id="slider_VmesneDescrLabel_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
+ echo '</div>';
- echo '</div>';
+
+ // prikaz dropdowna za default vrednosti opisnih vmesnih label
+ echo '<div class="vprasanje_setting_holder slider_DescriptiveLabel_defaults" '.$displayDescriptiveLabels.'>';
- // prikaz dropdowna za default vrednosti opisnih vmesnih label
- echo '<p class="slider_DescriptiveLabel_defaults" '.$displayDescriptiveLabels.'>'; //echo '<p class="grid_defaults" '.$display.'>';
- echo '<span class="title">'.$lang['srv_defaultDescrLabel'].':</span>';
- echo '<span class="content"><select name="slider_DescriptiveLabel_defaults" id="slider_DescriptiveLabel_defaults_'.$this->spremenljivka.'" style="width:100px" onChange="slider_defaultDescrLabels_value('.$this->spremenljivka.', this.value); switchSliderOpisneLabeleEditMode('.$this->spremenljivka.', \'\');">';
- //echo '<span class="content"><select name="slider_DescriptiveLabel_defaults" id="slider_DescriptiveLabel_defaults_'.$this->spremenljivka.'" style="width:100px" onChange="slider_defaultDescrLabels_value('.$this->spremenljivka.', this.value);">';
- echo '<option value="0">'.$lang['s_without'].'</option>';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_defaultDescrLabel'].':</label>';
+ echo ' <span class="content"><select name="slider_DescriptiveLabel_defaults" id="slider_DescriptiveLabel_defaults_'.$this->spremenljivka.'" style="width:100px" onChange="slider_defaultDescrLabels_value('.$this->spremenljivka.', this.value); switchSliderOpisneLabeleEditMode('.$this->spremenljivka.', \'\');">';
+ echo ' <option value="0">'.$lang['s_without'].'</option>';
foreach($default_grid_values AS $key => $value){
- //echo '<option value="'.$key.'">'.$value['name'].'</option>';
- echo '<option value="'.$key.'"'.($slider_DescriptiveLabel_defaults == $key ?' selected':'').'>'.$value['name'].'</option>';
+ echo ' <option value="'.$key.'"'.($slider_DescriptiveLabel_defaults == $key ?' selected':'').'>'.$value['name'].'</option>';
}
- echo '</select></span>';
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
- echo '<div class="dropNumofDescrLabels" '.$displayDescriptiveLabels.'>';
- echo '<p><span class="title" >'.$lang['srv_NumDescrLabels_note'].':</span>';
- echo '<span class="content"><select name="slider_NumofDescrLabels" id="slider_NumofDescrLabels_'.$this->spremenljivka.'" onChange="slider_checkbox_prop('.$this->spremenljivka.');">';
- echo '<option value="2"'.($slider_NumofDescrLabels =='2'?' selected':'').'>2</option>';
- echo '<option value="3"'.($slider_NumofDescrLabels =='3'?' selected':'').'>3</option>';
- echo '<option value="4"'.($slider_NumofDescrLabels =='4'?' selected':'').'>4</option>';
- echo '<option value="5"'.($slider_NumofDescrLabels =='5'?' selected':'').'>5</option>';
- echo '<option value="6"'.($slider_NumofDescrLabels =='6'?' selected':'').'>6</option>';
- echo '<option value="7"'.($slider_NumofDescrLabels =='7'?' selected':'').'>7</option>';
- echo '<option value="8"'.($slider_NumofDescrLabels =='8'?' selected':'').'>8</option>';
- echo '<option value="9"'.($slider_NumofDescrLabels =='9'?' selected':'').'>9</option>';
- echo '<option value="10"'.($slider_NumofDescrLabels =='10'?' selected':'').'>10</option>';
- echo '<option value="11"'.($slider_NumofDescrLabels =='11'?' selected':'').'>11</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder dropNumofDescrLabels" '.$displayDescriptiveLabels.'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_NumDescrLabels_note'].':</label>';
+ echo ' <span class="content"><select name="slider_NumofDescrLabels" id="slider_NumofDescrLabels_'.$this->spremenljivka.'" onChange="slider_checkbox_prop('.$this->spremenljivka.');">';
+ echo ' <option value="2"'.($slider_NumofDescrLabels =='2'?' selected':'').'>2</option>';
+ echo ' <option value="3"'.($slider_NumofDescrLabels =='3'?' selected':'').'>3</option>';
+ echo ' <option value="4"'.($slider_NumofDescrLabels =='4'?' selected':'').'>4</option>';
+ echo ' <option value="5"'.($slider_NumofDescrLabels =='5'?' selected':'').'>5</option>';
+ echo ' <option value="6"'.($slider_NumofDescrLabels =='6'?' selected':'').'>6</option>';
+ echo ' <option value="7"'.($slider_NumofDescrLabels =='7'?' selected':'').'>7</option>';
+ echo ' <option value="8"'.($slider_NumofDescrLabels =='8'?' selected':'').'>8</option>';
+ echo ' <option value="9"'.($slider_NumofDescrLabels =='9'?' selected':'').'>9</option>';
+ echo ' <option value="10"'.($slider_NumofDescrLabels =='10'?' selected':'').'>10</option>';
+ echo ' <option value="11"'.($slider_NumofDescrLabels =='11'?' selected':'').'>11</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
- //Labele podrocij
- echo '<label for="slider_labele_podrocij_'.$this->spremenljivka.'"><div class="check_slider_labele_podrocij" >';
- echo '<p><span class="title" >'.$lang['srv_slider_labele_podrocij'].':</span>';
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="slider_labele_podrocij" '.( $slider_labele_podrocij == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_labele_podrocij_'.$this->spremenljivka.'">';
- echo '<input '.$disable_slider_labele_podrocij_hidden.' type="hidden" value="0" name="slider_labele_podrocij" id="slider_labele_podrocij_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div></label>';
-
- //Labele podrocij - prikaz dropdowna z moznimi stevilkami podrocij
- echo '<div class="drop_slider_stevilo_label_podrocij" '.$displayStevLabelPodrocij.'>';
- echo '<p><span class="title" >'.$lang['srv_slider_stevilo_label_podrocij'].':</span>';
- echo '<span class="content"><select name="slider_StevLabelPodrocij" id="slider_StevLabelPodrocij_'.$this->spremenljivka.'" onChange="slider_checkbox_prop('.$this->spremenljivka.');">';
- echo '<option value="1"'.($slider_StevLabelPodrocij =='1'?' selected':'').'>1</option>';
- echo '<option value="2"'.($slider_StevLabelPodrocij =='2'?' selected':'').'>2</option>';
- echo '<option value="3"'.($slider_StevLabelPodrocij =='3'?' selected':'').'>3</option>';
- echo '<option value="4"'.($slider_StevLabelPodrocij =='4'?' selected':'').'>4</option>';
- echo '<option value="5"'.($slider_StevLabelPodrocij =='5'?' selected':'').'>5</option>';
- echo '<option value="6"'.($slider_StevLabelPodrocij =='6'?' selected':'').'>6</option>';
- echo '<option value="7"'.($slider_StevLabelPodrocij =='7'?' selected':'').'>7</option>';
- echo '<option value="8"'.($slider_StevLabelPodrocij =='8'?' selected':'').'>8</option>';
- echo '<option value="9"'.($slider_StevLabelPodrocij =='9'?' selected':'').'>9</option>';
- echo '<option value="10"'.($slider_StevLabelPodrocij =='10'?' selected':'').'>10</option>';
- echo '</select></span>';
- echo '</p>';
+
+ // Labele podrocij
+ echo '<div class="vprasanje_setting_holder check_slider_labele_podrocij">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" value="1" name="slider_labele_podrocij" '.( $slider_labele_podrocij == 1 ? ' checked="checked"' : '') .' onChange="slider_checkbox_prop('.$this->spremenljivka.');" id="slider_labele_podrocij_'.$this->spremenljivka.'">';
+ echo ' <label for="slider_labele_podrocij_'.$this->spremenljivka.'">'.$lang['srv_slider_labele_podrocij'].'</label>';
+ echo ' <input '.$disable_slider_labele_podrocij_hidden.' type="hidden" value="0" name="slider_labele_podrocij" id="slider_labele_podrocij_hidden_'.$this->spremenljivka.'">';
+ echo ' </div>';
+
echo '</div>';
+
+ // Labele podrocij - prikaz dropdowna z moznimi stevilkami podrocij
+ echo '<div class="vprasanje_setting_holder drop_slider_stevilo_label_podrocij" '.$displayStevLabelPodrocij.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_slider_stevilo_label_podrocij'].':</label>';
+ echo ' <span class="content"><select name="slider_StevLabelPodrocij" id="slider_StevLabelPodrocij_'.$this->spremenljivka.'" onChange="slider_checkbox_prop('.$this->spremenljivka.');">';
+ echo ' <option value="1"'.($slider_StevLabelPodrocij =='1'?' selected':'').'>1</option>';
+ echo ' <option value="2"'.($slider_StevLabelPodrocij =='2'?' selected':'').'>2</option>';
+ echo ' <option value="3"'.($slider_StevLabelPodrocij =='3'?' selected':'').'>3</option>';
+ echo ' <option value="4"'.($slider_StevLabelPodrocij =='4'?' selected':'').'>4</option>';
+ echo ' <option value="5"'.($slider_StevLabelPodrocij =='5'?' selected':'').'>5</option>';
+ echo ' <option value="6"'.($slider_StevLabelPodrocij =='6'?' selected':'').'>6</option>';
+ echo ' <option value="7"'.($slider_StevLabelPodrocij =='7'?' selected':'').'>7</option>';
+ echo ' <option value="8"'.($slider_StevLabelPodrocij =='8'?' selected':'').'>8</option>';
+ echo ' <option value="9"'.($slider_StevLabelPodrocij =='9'?' selected':'').'>9</option>';
+ echo ' <option value="10"'.($slider_StevLabelPodrocij =='10'?' selected':'').'>10</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
function edit_hot_spot_settings(){
@@ -806,7 +901,7 @@ class Vprasanje {
}
echo '<span class="title" id="color-region-'.$row['id'].'" '.($hotspot_region_color==''?'style="display:none;"':'').'>'.$lang['srv_hotspot_region_color_text'].': <span id="help_hotspot_region_color" class="spaceLeft">'.Help::display('srv_hotspot_region_color').' </span>';
- echo '<input type="text" id="color-region'.$row['id'].'" class="colorwell auto-save" name="hotspot_region_color" value="'.$value.'" data-id="'.$row['id'].'" data-type="'.$type.'" >';
+ echo ' <input type="text" id="color-region'.$row['id'].'" class="colorwell auto-save" name="hotspot_region_color" value="'.$value.'" data-id="'.$row['id'].'">';
echo '</span>';
//echo '<div id="picker"></div>';
@@ -843,7 +938,7 @@ class Vprasanje {
}
echo '<br /><span class="title" id="color-visibility-'.$row['id'].'" '.($hotspot_visibility_color==''?'style="display:none;"':'').'>'.$lang['srv_hotspot_visibility_color_text'].': <span id="help_hotspot_visibility_color" class="spaceLeft">'.Help::display('srv_hotspot_visibility_color').' </span>';
- echo '<input type="text" id="color-visibility'.$row['id'].'" class="colorwell auto-save" name="hotspot_visibility_color" value="'.$value.'" data-id="'.$row['id'].'" data-type="'.$type.'" >';
+ echo '<input type="text" id="color-visibility'.$row['id'].'" class="colorwell auto-save" name="hotspot_visibility_color" value="'.$value.'" data-id="'.$row['id'].'">';
echo '</span>';
echo '<div id="picker"></div>';
@@ -884,27 +979,22 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
- if($row['signature'] != 1){ //ce ni elektronski podpis
- $displayOrientation = 'display: block';
- }else{
- $displayOrientation = 'display: none';
- }
- //echo '<p>';
- echo '<p id="orientation_'.$this->spremenljivka.'" style="'.$displayOrientation.' ">';
- echo '<span class="title" >'.$lang['srv_orientacija'].': </span>';
-
- //echo (int)$row['orientation'];
- echo '<span class="content"><select name="orientation" id="spremenljivka_orientation_' . $row['id'] . '" spr_id="'.$row['id'].'">';
-
- echo '<option value="1"' . (($row['orientation'] == 1 || $row['orientation'] == 2) ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna_2'].'</option>';
- //echo '<option value="1"' . ($row['orientation'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
- echo '<option value="0"' . ($row['orientation'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna'].'</option>';
- if($row['tip'] == 21)
- echo '<option value="3"' . (($row['orientation'] == 3 || $row['orientation'] == 3) ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
-
- echo '</select></span>';
-
- echo '</p>';
+ // ce ni elektronski podpis
+ $displayOrientation = ($row['signature'] != 1) ? '' : 'style="display: none"';
+
+ echo '<div id="orientation_'.$this->spremenljivka.'" class="vprasanje_setting_holder" '.$displayOrientation.'>';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+ echo ' <label>'.$lang['srv_orientacija'].': </label>';
+ echo ' <span class="content"><select name="orientation" id="spremenljivka_orientation_' . $row['id'] . '" spr_id="'.$row['id'].'">';
+ echo ' <option value="1"' . (($row['orientation'] == 1 || $row['orientation'] == 2) ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna_2'].'</option>';
+ echo ' <option value="0"' . ($row['orientation'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna'].'</option>';
+ if($row['tip'] == 21)
+ echo ' <option value="3"' . (($row['orientation'] == 3 || $row['orientation'] == 3) ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
@@ -917,19 +1007,28 @@ class Vprasanje {
$min = $newParams->get('date_range_min');
$max = $newParams->get('date_range_max');
- echo '<p>';
- echo '<span class="title" >'.$lang['srv_vprasanje_date_range_min'].': </span>'.Help::display('edit_date_range');
- echo '<span class="content">';
- echo '<input type="number" value="'.$min.'" name="date_range_min" id="date_range_min_' . $row['id'] . '" spr_id="'.$row['id'].'" size="4" style="margin-top:-12px;" />';
- echo '</span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_date_range_min'].': '.Help::display('edit_date_range').'</label>';
+ echo ' <span class="content">';
+ echo ' <input type="number" value="'.$min.'" name="date_range_min" id="date_range_min_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' </span>';
+ echo ' </div>';
- echo '<p>';
- echo '<span class="title" >'.$lang['srv_vprasanje_date_range_max'].': </span>'.Help::display('edit_date_range');
- echo '<span class="content">';
- echo '<input type="number" min="0" value="'.$max.'" name="date_range_max" id="date_range_max_' . $row['id'] . '" spr_id="'.$row['id'].'" size="4" style="margin-top:-12px;" />';
- echo '</span>';
- echo '</p>';
+ echo '</div>';
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_date_range_max'].': '.Help::display('edit_date_range').'</label>';
+ echo ' <span class="content">';
+ echo ' <input type="number" min="0" value="'.$max.'" name="date_range_max" id="date_range_max_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
}
function edit_date_withTime() {
@@ -940,12 +1039,15 @@ class Vprasanje {
$newParams = new enkaParameters($row['params']);
$withTime = $newParams->get('date_withTime');
- echo '<p>';
- echo '<span class="title"><label for="date_withTime_' . $row['id'] . '">'.$lang['srv_vprasanje_date_withTime'].'</label>: </span>';
- echo '<span class="content"><input type="hidden" name="date_withTime" value="0">';
- echo '<input type="checkbox" value="1" '.(($withTime == 1) ? 'checked' : '').' name="date_withTime" id="date_withTime_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
- echo '</span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="date_withTime" value="0">';
+ echo ' <input type="checkbox" value="1" '.(($withTime == 1) ? 'checked' : '').' name="date_withTime" id="date_withTime_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' <label for="date_withTime_'.$row['id'].'">'.$lang['srv_vprasanje_date_withTime'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
@@ -961,29 +1063,29 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$newParams = new enkaParameters($row['params']);
- //$min = $newParams->get('date_range_min');
$max = $newParams->get('max_markers') ? $newParams->get('max_markers') : 1;
$input = $newParams->get('multi_input_type') ? $newParams->get('multi_input_type') : 'marker';
- echo '<p id="max_markers_map" '. (($row['enota'] == 2 && $input =='marker') ? '' : 'style="display: none;"').'>';
- echo '<span class="title">'.$lang['srv_vprasanje_max_marker_map'].': '.Help::display('srv_vprasanje_max_marker_map').'</span>';
- echo '<span class="content">';
-
- //roleta
- echo '<select name="max_markers" id="max_markers_' . $row['id'] . '" spr_id="'.$row['id'].'">';
- echo '<option value="1" '.(($max == 1) ? ' selected="true" ' : '').'>1</option>';
- echo '<option value="2" '.(($max == 2) ? ' selected="true" ' : '').'>2</option>';
- echo '<option value="3" '.(($max == 3) ? ' selected="true" ' : '').'>3</option>';
- echo '<option value="4" '.(($max == 4) ? ' selected="true" ' : '').'>4</option>';
- echo '<option value="5" '.(($max == 5) ? ' selected="true" ' : '').'>5</option>';
- echo '<option value="6" '.(($max == 6) ? ' selected="true" ' : '').'>6</option>';
- echo '<option value="7" '.(($max == 7) ? ' selected="true" ' : '').'>7</option>';
- echo '<option value="8" '.(($max == 8) ? ' selected="true" ' : '').'>8</option>';
- echo '<option value="9" '.(($max == 9) ? ' selected="true" ' : '').'>9</option>';
- echo '<option value="10" '.(($max == 10) ? ' selected="true" ' : '').'>10</option>';
-
- echo '</select></span>';
- echo '</p>';
+
+ echo '<div id="max_markers_map" class="vprasanje_setting_holder" '.(($row['enota'] == 2 && $input =='marker') ? '' : 'style="display: none;"').'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_max_marker_map'].': '.Help::display('srv_vprasanje_max_marker_map').'</label>';
+ echo ' <span class="content"><select name="max_markers" id="max_markers_' . $row['id'] . '" spr_id="'.$row['id'].'">';
+ echo ' <option value="1" '.(($max == 1) ? ' selected="true" ' : '').'>1</option>';
+ echo ' <option value="2" '.(($max == 2) ? ' selected="true" ' : '').'>2</option>';
+ echo ' <option value="3" '.(($max == 3) ? ' selected="true" ' : '').'>3</option>';
+ echo ' <option value="4" '.(($max == 4) ? ' selected="true" ' : '').'>4</option>';
+ echo ' <option value="5" '.(($max == 5) ? ' selected="true" ' : '').'>5</option>';
+ echo ' <option value="6" '.(($max == 6) ? ' selected="true" ' : '').'>6</option>';
+ echo ' <option value="7" '.(($max == 7) ? ' selected="true" ' : '').'>7</option>';
+ echo ' <option value="8" '.(($max == 8) ? ' selected="true" ' : '').'>8</option>';
+ echo ' <option value="9" '.(($max == 9) ? ' selected="true" ' : '').'>9</option>';
+ echo ' <option value="10" '.(($max == 10) ? ' selected="true" ' : '').'>10</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -995,13 +1097,17 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$newParams = new enkaParameters($row['params']);
$fokus = $newParams->get('fokus_mape'); //dobi fokus mape
-
- echo '<p id="fokus_mape" '.($row['enota'] == 3 ? 'style="display: none;"' : '').'>';
- echo '<span class="title" >'.$lang['srv_vprasanje_fokus_map'].': </span>';
- echo '<span class="content">';
- echo '<input type="text" value="'.$fokus.'" name="fokus_mape" id="fokus_mape_' . $row['id'] . '" spr_id="'.$row['id'].'" size="20" />';
- echo '</span>';
- echo '</p>';
+
+ echo '<div id="fokus_mape" class="vprasanje_setting_holder" '.($row['enota'] == 3 ? 'style="display: none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_fokus_map'].': </label>';
+ echo ' <span class="content">';
+ echo ' <input type="text" value="'.$fokus.'" name="fokus_mape" id="fokus_mape_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -1016,12 +1122,16 @@ class Vprasanje {
$naslov = $newParams->get('naslov_podvprasanja_map'); //dobi naslov podvprasanja mape
$marpod = $newParams->get('marker_podvprasanje'); //ali dodam podvprasanje v infowindow
- echo '<p id="naslov_podvprasanja_map" '.(($marpod == 1 || $row['enota'] == 3) ? '' : 'style="display: none;"').'>';
- echo '<span class="title" >'.$lang['srv_vprasanje_naslov_podvprasanja_map'].': '.Help::display('naslov_podvprasanja_map').'</span>';
- echo '<span class="content">';
- echo '<input type="text" value="'.$naslov.'" name="naslov_podvprasanja_map" id="naslov_podvprasanja_map_' . $row['id'] . '" spr_id="'.$row['id'].'" size="25" />';
- echo '</span>';
- echo '</p>';
+ echo '<div id="naslov_podvprasanja_map" class="vprasanje_setting_holder half-half" '.(($marpod == 1 || $row['enota'] == 3) ? '' : 'style="display: none;"').'>';
+
+ echo '<div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_naslov_podvprasanja_map'].': '.Help::display('naslov_podvprasanja_map').'</label>';
+ echo ' <span class="content">';
+ echo ' <input type="text" value="'.$naslov.'" name="naslov_podvprasanja_map" id="naslov_podvprasanja_map_' . $row['id'] . '" spr_id="'.$row['id'].'" size="25" />';
+ echo ' </span>';
+ echo '</div>';
+
+ echo '</div>';
}
/**
@@ -1035,12 +1145,15 @@ class Vprasanje {
$usrloc = $newParams->get('user_location'); //ali se poizve trenutna lokacija
$input = $newParams->get('multi_input_type') ? $newParams->get('multi_input_type') : 'marker';
- echo '<p id="user_location_map" '. ((($row['enota'] == 2 && $input !== 'marker') || $row['enota'] == 3) ? 'style="display: none;"' : '').'>';
- echo '<label for="user_location_' . $row['id'] . '" class="title">'.$lang['srv_vprasanje_user_location_map'].': '.Help::display('user_location_map').'</label>';
- echo '<span class="content"><input type="hidden" name="user_location" value="0">';
- echo '<input type="checkbox" value="1" '.(($usrloc == 1) ? 'checked' : '').' name="user_location" id="user_location_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
- echo '</span>';
- echo '</p>';
+ echo '<div id="user_location_map" class="vprasanje_setting_holder" '. ((($row['enota'] == 2 && $input !== 'marker') || $row['enota'] == 3) ? 'style="display: none;"' : '').'>';
+
+ echo '<div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="user_location" value="0">';
+ echo ' <input type="checkbox" value="1" '.(($usrloc == 1) ? 'checked' : '').' name="user_location" id="user_location_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' <label for="user_location_' . $row['id'] . '" class="title">'.$lang['srv_vprasanje_user_location_map'].' '.Help::display('user_location_map').'</label>';
+ echo '</div>';
+
+ echo '</div>';
}
/**
@@ -1054,14 +1167,15 @@ class Vprasanje {
$marpod = $newParams->get('marker_podvprasanje'); //ali dodam podvprasanje v infowindow
$input = $newParams->get('multi_input_type') ? $newParams->get('multi_input_type') : 'marker';
- echo '<p id="marker_podvprasanje" '. ((($row['enota'] == 3) || $input !== 'marker') ? 'style="display: none;"' : '').' >';
- echo '<label for="marker_podvprasanje_' . $row['id'] . '" class="title">'.$lang['srv_vprasanje_marker_podvpr_map'].': '.Help::display('marker_podvprasanje').'</label>';
-
- echo '<span class="content"><input type="hidden" name="marker_podvprasanje" value="0">';
- echo '<input type="checkbox" value="1" '.(($marpod == 1) ? 'checked' : '' ). ' onChange="show_infowindow_map();"'.
- ' name="marker_podvprasanje" id="marker_podvprasanje_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
- echo '</span>';
- echo '</p>';
+ echo '<div id="marker_podvprasanje" class="vprasanje_setting_holder" '.((($row['enota'] == 3) || $input !== 'marker') ? 'style="display: none;"' : '').' >';
+
+ echo '<div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="marker_podvprasanje" value="0">';
+ echo ' <input type="checkbox" value="1" '.(($marpod == 1) ? 'checked' : '' ).' onChange="show_infowindow_map();" name="marker_podvprasanje" id="marker_podvprasanje_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' <label for="marker_podvprasanje_' . $row['id'] . '" class="title">'.$lang['srv_vprasanje_marker_podvpr_map'].' '.Help::display('marker_podvprasanje').'</label>';
+ echo '</div>';
+
+ echo '</div>';
}
/**
@@ -1075,14 +1189,15 @@ class Vprasanje {
$marpod = $newParams->get('dodaj_searchbox'); //ali dodam podvprasanje v infowindow
$input = $newParams->get('multi_input_type') ? $newParams->get('multi_input_type') : 'marker';
- echo '<p id="dodaj_searchbox" '.($row['enota'] == 3 || $input != 'marker' ? 'style="display: none;"' : '').'>';
- echo '<label for="dodaj_searchbox_' . $row['id'] . '" class="title">'.$lang['srv_vprasanje_show_searchbox_map'].': '
- .Help::display('dodaj_searchbox').'</label>';
- echo '<span class="content"><input type="hidden" name="dodaj_searchbox" value="0">';
- echo '<input type="checkbox" value="1" '.(($marpod == 1) ? 'checked' : '').
- ' name="dodaj_searchbox" id="dodaj_searchbox_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
- echo '</span>';
- echo '</p>';
+ echo '<div id="dodaj_searchbox" class="vprasanje_setting_holder" '.($row['enota'] == 3 || $input != 'marker' ? 'style="display: none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="dodaj_searchbox" value="0">';
+ echo ' <input type="checkbox" value="1" '.(($marpod == 1) ? 'checked' : '').' name="dodaj_searchbox" id="dodaj_searchbox_' . $row['id'] . '" spr_id="'.$row['id'].'" />';
+ echo ' <label for="dodaj_searchbox_' . $row['id'] . '" class="title">'.$lang['srv_vprasanje_show_searchbox_map'].' '.Help::display('dodaj_searchbox').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
@@ -1096,83 +1211,88 @@ class Vprasanje {
global $admin_type;
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
- //echo '<h2>'.$row['variable'].' - '.$lang['srv_napredno_urejanje'].'</h2>';
- $this->variable();
-
-
- // Spremenljivka
- echo '<fieldset><legend>'.$lang['srv_spremenljivka'].'</legend>';
- $this->edit_variable();
- $this->edit_label();
- echo '</fieldset>';
-
-
- // Lastnosti
- echo '<fieldset><legend>'.$lang['srv_lastnosti'].'</legend>';
- $this->edit_sistem();
-
- //echo '<p class="heading">'.$lang['srv_prikaz_vprasanja'].'</p>';
- $this->edit_visible();
-
- // Disabled vprasanje - vprasanje je onemogoceno za respondente (zaenkrat samo osnovni radio, dropdown in text)
- if(in_array($row['tip'], array(1,3,4,21)))
- $this->edit_disabled();
- // Vprasanje lahko zaklene samo admin, manager ali avtor (drugace ga lahko zaklene sam sebi in potem ne more vec urejat)
- $author = SurveyInfo::getInstance()->getSurveyColumn("insert_uid");
- if($admin_type == 0 || $admin_type == 1 || $global_user_id == $author)
- $this->edit_locked();
-
+ $this->variable();
+
+ // Spremenljivka
+ echo '<fieldset class="first">';
+
+ $this->edit_variable();
+
+ $this->edit_label();
+
+ $this->edit_sistem();
+
+ // Dodaj vprasanje v knjiznico
+ $this->add_into_library();
+
+ echo '</fieldset>';
+
+
+ // Lastnosti
+ echo '<fieldset><legend>'.$lang['srv_lastnosti'].'</legend>';
+
+ if ($row['tip'] <= 2 )
+ $this->edit_stolpci();
+
+ if($row['tip'] == 1 || $row['tip'] == 2 || $row['tip'] == 6)
+ $this->edit_presetValue();
+
+ if($row['tip'] == 2) {
+ $this->edit_checkbox_max_limit();
+ $this->edit_checkbox_min_limit();
+ }
+
+ if ($row['tip'] == 6 || $row['tip'] == 16 || $row['tip'] == 19 || $row['tip'] == 20)
+ $this->edit_grid_dynamic();
+
+ //echo '<p class="heading">'.$lang['srv_prikaz_vprasanja'].'</p>';
+ $this->edit_visible();
+
+ // Disabled vprasanje - vprasanje je onemogoceno za respondente (zaenkrat samo osnovni radio, dropdown in text)
+ if(in_array($row['tip'], array(1,3,4,21)))
+ $this->edit_disabled();
+
$this->edit_timer();
-
- if ($row['tip'] <= 2 )
- $this->edit_stolpci();
-
- if($row['tip'] == 2) {
- $this->edit_checkbox_max_limit();
- $this->edit_checkbox_min_limit();
- }
-
+
if($row['tip'] <= 3)
- $this->edit_stat();
-
- if ($row['tip'] == 6)
- $this->edit_grid_dynamic();
-
- if ($row['tip'] == 1 || $row['tip'] == 6) {
- $this->edit_onchange_submit();
- }
-
- if ($row['tip'] == 1 || $row['tip'] == 3)
- $this->edit_inline_edit();
-
- if ($row['tip'] != 5)
- $this->edit_showOnAllPages();
-
+ $this->edit_stat();
+
+ // Vprasanje lahko zaklene samo admin, manager ali avtor (drugace ga lahko zaklene sam sebi in potem ne more vec urejat)
+ $author = SurveyInfo::getInstance()->getSurveyColumn("insert_uid");
+ if($admin_type == 0 || $admin_type == 1 || $global_user_id == $author)
+ $this->edit_locked();
+
if ($row['tip'] == 1 || $row['tip'] == 2 && (in_array($row['orientation'], array(0,1,2))))
- $this->edit_hideRadio();
-
- if($row['tip'] == 1 || $row['tip'] == 2 || $row['tip'] == 6)
- $this->edit_presetValue();
-
- // Nastavitev za prikaz prejsnjih odgovorov pod text vprasanjem
- if ($row['tip'] == 21)
- $this->edit_show_prevAnswers();
-
- echo '</fieldset>';
-
- // Posebni tipi text vprasanja (signature, captcha, upload, email)
- if ($row['tip'] == 21){
- echo '<fieldset><legend>'.$lang['srv_advanced_subtype'].'</legend>';
-
+ $this->edit_hideRadio();
+
+ if ($row['tip'] == 1 || $row['tip'] == 6) {
+ $this->edit_onchange_submit();
+ }
+
+ if ($row['tip'] == 1 || $row['tip'] == 3)
+ $this->edit_inline_edit();
+
+ if ($row['tip'] != 5)
+ $this->edit_showOnAllPages();
+
+ // Nastavitev za prikaz prejsnjih odgovorov pod text vprasanjem
+ if ($row['tip'] == 21)
+ $this->edit_show_prevAnswers();
+
+ echo '</fieldset>';
+
+ // Posebni tipi text vprasanja (signature, captcha, upload, email)
+ if ($row['tip'] == 21){
+ echo '<fieldset><legend>'.$lang['srv_advanced_subtype'].'</legend>';
+
$this->edit_upload();
$this->edit_signature();
- $this->edit_captcha();
- $this->edit_email_verify();
-
- echo '</fieldset>';
- }
+ $this->edit_captcha();
+ $this->edit_email_verify();
+
+ echo '</fieldset>';
+ }
}
/**
@@ -1213,48 +1333,82 @@ class Vprasanje {
$r['spr'] = $this->spremenljivka;
$r['if'] = 0;
$r['endif'] = 1;
-
- echo '<p id="if_preview">'.$lang['srv_question_no_if'].'</p>';
-
- echo '<p id="if_preview_link"><a href="#" onclick="if_new(\''.$r['spr'].'\', \''.$r['if'].'\', \''.$r['endif'].'\', \'0\'); return false;"><span class="bold">'.$lang['srv_add_condition_question'].'</span></a></p>';
-
+
+ echo '<div id="if_preview" class="vprasanje_setting_holder space_bottom">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo $lang['srv_question_no_if'];
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="vprasanje_setting_holder space_bottom">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <button id="if_preview_link" class="small white-blue" onclick="if_new(\''.$r['spr'].'\', \''.$r['if'].'\', \''.$r['endif'].'\', \'0\'); return false;">'.$lang['srv_add_condition_question'].'</button>';
+ echo ' </div>';
+ echo '</div>';
+
if ($count > 1) {
+
$parents = $b->get_parents($this->spremenljivka);
+
if ($parents != '') {
- echo '<p><b>'.$lang['srv_question_no_if_in_nested_if'].':</b> ';
+
+ echo '<div class="vprasanje_setting_holder space_bottom">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo $lang['srv_question_no_if_in_nested_if'].':';
+ echo ' </div>';
+
$parents = explode(' ', $parents);
+
foreach ($parents AS $p) {
- $p = str_replace('p_', '', $p);
- echo '<br />';
+ $p = str_replace('p_', '', $p);
+ echo ' <div class="vprasanje_setting_line">';
$b->conditions_display($p);
+ echo ' </div>';
}
- echo '</p>';
+
+ echo '</div>';
}
}
-
- } else {
-
- //echo '<h2>'.$rows['variable'].' - '.$lang['srv_edit_condition_question'].'</h2>';
-
- echo '<p id="if_preview">';
-
+ }
+ else {
+
+ echo '<div id="if_preview" class="vprasanje_setting_holder space_bottom">';
+ echo ' <div class="vprasanje_setting_line">';
$b->conditions_display($row['parent']);
- echo '</p>';
-
- echo '<p><a href="#" onclick="condition_editing(\''.$row['parent'].'\'); return false;">'.$lang['srv_if_edit'].'</a></p>';
+ echo ' </div>';
+ echo '</div>';
+ echo '<div id="if_preview" class="vprasanje_setting_holder space_bottom">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <button class="small white-blue" onclick="condition_editing(\''.$row['parent'].'\'); return false;">'.$lang['srv_if_edit'].'</button>';
+ echo ' </div>';
+ echo '</div>';
+
if ($row['parent'] != 0) {
$parents = $b->get_parents(0, $row['parent']);
+
if ($parents != '') {
- echo '<p><b>'.$lang['srv_question_in_if_in_nested_if'].':</b> ';
+
+ echo '<fieldset>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo $lang['srv_question_in_if_in_nested_if'].':';
+ echo ' </div>';
+
$parents = explode(' ', $parents);
+
foreach ($parents AS $p) {
$p = str_replace('p_', '', $p);
- echo '<br />';
+ echo ' <div class="vprasanje_setting_line"><div>';
$b->conditions_display($p);
+ echo ' </div></div>';
}
- echo '</p>';
+
+ echo '</div>';
+ echo '</fieldset>';
}
}
@@ -1273,212 +1427,84 @@ class Vprasanje {
$this->variable();
+
$sql = sisplet_query("SELECT if_id, reminder, reminder_text FROM srv_validation v WHERE v.spr_id='$this->spremenljivka'");
if (mysqli_num_rows($sql) > 0) {
echo '<input type="hidden" value="1" name="validationedit">';
$b = new Branching($this->anketa);
-
+
while ($row = mysqli_fetch_array($sql)) {
+
+ echo '<fieldset>';
- echo '<fieldset>';
- echo '<p><a href="#" onclick="validation_edit(\''.$this->spremenljivka.'\', \''.$row['if_id'].'\'); return false;" title="'.$lang['srv_if_edit'].'">';
+ echo '<div class="vprasanje_setting_holder">';
+
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <a href="#" onclick="validation_edit(\''.$this->spremenljivka.'\', \''.$row['if_id'].'\'); return false;" title="'.$lang['srv_if_edit'].'">';
$b->conditions_display($row['if_id']);
- echo '</a></p>';
-
- echo '<p>';
- echo '<span class="title">'.$lang['srv_alert_type'].':</span>';
-
- echo '<span class="content">';
- echo '<select name="validation-'.$row['if_id'].'-reminder">';
- echo '<option value="0" '.($row['reminder']==0?'selected':'').'>'.$lang['srv_reminder_off2'].'</option>';
- echo '<option value="1" '.($row['reminder']==1?'selected':'').'>'.$lang['srv_reminder_soft2'].'</option>';
- echo '<option value="2" '.($row['reminder']==2?'selected':'').'>'.$lang['srv_reminder_hard2'].'</option>';
- echo '</select>';
- echo '</span>';
-
- echo '</p>';
- echo '<p><span class="title">'.$lang['srv_alert_text'].':</span>';
-
- echo '<span class="content"><input type="text" name="validation-'.$row['if_id'].'-reminder_text" value="'.$row['reminder_text'].'"></span>';
+ echo ' </a>';
+ echo ' </div>';
- echo '</p>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_alert_type'].':</label>';
- echo '<p class="floatLeft spaceRight bold"><a href="#" onclick="validation_if_remove(\''.$this->spremenljivka.'\', \''.$row['if_id'].'\'); return false;">'.$lang['srv_validation_remove'].'</a></p>';
+ echo ' <span class="content">';
+ echo ' <select name="validation-'.$row['if_id'].'-reminder">';
+ echo ' <option value="0" '.($row['reminder']==0?'selected':'').'>'.$lang['srv_reminder_off2'].'</option>';
+ echo ' <option value="1" '.($row['reminder']==1?'selected':'').'>'.$lang['srv_reminder_soft2'].'</option>';
+ echo ' <option value="2" '.($row['reminder']==2?'selected':'').'>'.$lang['srv_reminder_hard2'].'</option>';
+ echo ' </select>';
+ echo ' </span>';
+ echo ' </div>';
+
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_alert_text'].'</label>';
+ echo ' <span class="content"><input type="text" name="validation-'.$row['if_id'].'-reminder_text" value="'.htmlentities($row['reminder_text']).'"></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div class="vprasanje_setting_holder">';
- echo '</fieldset>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <button class="small black-white" onclick="validation_if_remove(\''.$this->spremenljivka.'\', \''.$row['if_id'].'\'); return false;">'.$lang['srv_validation_remove'].'</button>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
}
-
- } else {
- echo '<p>'.$lang['srv_validation_no'].'</p>';
- }
+ }
+ else {
+ echo '<div class="vprasanje_setting_holder space_bottom">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <p>'.$lang['srv_validation_no'].'</p>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
- // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik - drugace skrijemo gumb za dodajanje validacije
- $userAccess = UserAccess::getInstance($global_user_id);
+ // Gumb za dodajanje validacije
+ echo '<div class="vprasanje_setting_holder space_bottom">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ $userAccess = UserAccess::getInstance($global_user_id); // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik - drugace skrijemo gumb za dodajanje validacije
if(!$userAccess->checkUserAccess($what='validation')){
$userAccess->displayNoAccess($what='validation');
}
- else{
- echo '<p><a href="#" onclick="validation_new(\''.$this->spremenljivka.'\'); return false;"><span class="bold">'.$lang['srv_validation_new'].'</span></a></p>';
+ else{
+ echo '<button class="small white-blue" onclick="validation_new(\''.$this->spremenljivka.'\'); return false;">'.$lang['srv_validation_new'].'</button>';
}
- }
-
- /**
- * prikaze komentarje na vprasanje
- *
- */
- function vprasanje_komentarji () {
- global $lang;
- global $admin_type;
- global $global_user_id;
-
- SurveySetting::getInstance()->Init($this->anketa);
- SurveyInfo::getInstance()->SurveyInit($this->anketa);
-
- if ($this->spremenljivka > 0) {
- $rows = Cache::srv_spremenljivka($this->spremenljivka);
- $this->variable();
- }
- else {
- $row = SurveyInfo::getInstance()->getSurveyRow();
-
- if ($this->spremenljivka == -1) {
- $rows['variable'] = $lang['srv_intro_label'];
- $rows['note'] = $row['intro_note'];
- $rows['thread'] = $row['thread_intro'];
-
- echo '<h2>'.$rows['variable'].'</h2>';
- }
- elseif ($this->spremenljivka == -2) {
- $rows['variable'] = $lang['srv_end_label'];
- $rows['note'] = $row['concl_note'];
- $rows['thread'] = $row['thread_concl'];
-
- echo '<h2>'.$rows['variable'].'</h2>';
- }
- }
-
-
- $question_note_view = SurveySetting::getInstance()->getSurveyMiscSetting('question_note_view');
- $question_note_write = SurveySetting::getInstance()->getSurveyMiscSetting('question_note_write');
-
- if ($question_note_view == '' || $question_note_view >= $admin_type) {
-
- if ($question_note_write == '' || $question_note_write >= $admin_type) {
- echo '<p>'.$lang['srv_note'];
- //echo '<span class="red pointer" onclick="this.style.display=\'none\'; create_editor(\'note\');"> - '.$lang['srv_editor'].'</span>';
- echo '<a href="#" title="'.$lang['srv_editor_title'].'" onmouseover="this.style.display=\'none\'; create_editor(\'note\');"><span class="faicon edit spaceLeft"></span></a>';
- echo '<textarea name="note" id="note" style="width:99%; height:150px">'.$rows['note'].'</textarea></p>';
- } else {
- echo '<p>'.$lang['srv_note'].'';
- echo '<textarea name="note" id="note" style="width:99%; height:150px" disabled>'.$rows['note'].'</textarea></p>';
- }
- }
-
- // tukaj prikazujemo samo se opombo
- return;
-
- $question_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment');
- //$question_comment = 4; // vedno prikazemo
- $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');
- $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder');
- $addfieldposition = SurveySetting::getInstance()->getSurveyMiscSetting('addfieldposition');
-
- if (($admin_type <= $question_comment && $question_comment != '') || $question_resp_comment==1) {
-
- $f = new Forum;
-
- $spremenljivka = $this->spremenljivka;
- $type = 1;
- $view = 3;
-
- echo '<div id="survey_comment_'.$spremenljivka.'_'.$view.'">';
- echo '<div style="width:45%; float:left">';
- echo '<h3 class="red"><b>'.$lang['comments'].'</b>';
- echo '<span class="sprites '.($sortpostorder==1?'up':'down').'" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'"></span>';
- echo '</h3>';
-
- if ($addfieldposition == 1) {
- $b = new BranchingAjax($this->anketa);
- $b->add_comment_field($spremenljivka, $type, $view, false);
- echo '<br /><br />';
- }
-
- // komentarji na vprašanje
- if ($rows['thread'] > 0) {
-
- $tid = $rows['thread'];
-
- $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ;
-
- if ($admin_type <= $question_comment_viewadminonly) { // vidi vse komentarje
- $sql = sisplet_query("SELECT * FROM post WHERE tid='$tid' ORDER BY time $orderby, id $orderby");
- } elseif ($question_comment_viewauthor == 1) { // vidi samo svoje komentarje
- $sql = sisplet_query("SELECT * FROM post WHERE tid='$tid' AND uid='$global_user_id' ORDER BY time $orderby, id $orderby");
- } else { // ne vidi nobenih komentarjev
- $sql = sisplet_query("SELECT * FROM post WHERE 1=0");
- }
-
- if (mysqli_num_rows($sql) > 0) {
- $i = 0;
- while ($row = mysqli_fetch_array($sql)) {
- if (($i != 0 && $sortpostorder==0) || ($i < $rowss-1 && $sortpostorder==1)) {
- if ($row['ocena'] == 0) echo '<span style="color:black">';
- elseif ($row['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($row['ocena'] == 2) echo '<span style="color:lightgray">';
- elseif ($row['ocena'] == 3) echo '<span style="color:lightgray">';
- else echo '<span>';
-
- echo '<b>'.$f->user($row['uid']).'</b> ('.$f->datetime1($row['time']).'):';
- echo '<br/>'.$row['vsebina'].'<hr>';
-
- echo '</span>';
- }
- $i++;
- }
- }
-
- }
-
- if ($addfieldposition == '' || $addfieldposition == 0) {
- $b = new BranchingAjax($this->anketa);
- $b->add_comment_field($spremenljivka, $type, $view, false);
- }
-
- echo '</div>';
- echo '</div>';
-
- if ($admin_type <= $question_resp_comment_viewadminonly) {
- $sql = sisplet_query("SELECT d.*, u.time_edit FROM srv_data_text".$this->db_table." d, srv_user u WHERE d.spr_id='0' AND d.vre_id='$this->spremenljivka' AND u.id=d.usr_id ORDER BY d.id ASC");
-
- // komentarji respondentov
- $sql = sisplet_query("SELECT d.*, u.time_edit FROM srv_data_text".$this->db_table." d, srv_user u WHERE d.spr_id='0' AND d.vre_id='$this->spremenljivka' AND u.id=d.usr_id ORDER BY d.id ASC");
- if (mysqli_num_rows($sql) > 0) {
-
- echo '<div style="width:45%; float:right">';
- echo '<h3 class="red"><b>'.$lang['srv_repondent_comment'].'</b></h3>';
-
- while ($row = mysqli_fetch_array($sql)) {
- if ($row['text2'] == 0) echo '<span style="color:black">';
- elseif ($row['text2'] == 1) echo '<span style="color:darkgreen">';
- elseif ($row['text2'] == 2) echo '<span style="color:lightgray">';
- elseif ($row['text2'] == 3) echo '<span style="color:lightgray">';
- else echo '<span>';
-
- echo $f->datetime1($row['time_edit']).':<br />'.$row['text'].'<hr>';
-
- echo '</span>';
- }
-
- echo '</div>';
-
- }
- }
- }
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -1499,134 +1525,6 @@ class Vprasanje {
echo '</span>';
}
-
-
- /**
- * urejanje label za grafe
- *
- */
- /*function vprasanje_grafi () {
- global $lang;
-
- $row = Cache::srv_spremenljivka($this->spremenljivka);
-
- //echo '<h2>'.$row['variable'].' - '.$lang['srv_grafi_urejanje'].'</h2>';
- $this->variable();
-
- // Enable/disable editiranje label posebej za grafe
- $this->edit_graf();
-
- // Gumb za kopiranje besedila iz osnovnega urejanja
- echo '<div class="chart_copy" '.($row['edit_graf'] == 0 ? ' style="display: none;"' : '').'><p>';
- echo $lang['srv_edit_chart_copy'].': ';
- echo '<input type="button" name="copy_graf" value="'.$lang['srv_edit_chart_copyB'].'" onClick="copy_chart();" />';
-
- //echo '<a class="ovalbutton ovalbutton_gray" onclick="copy_chart();" href="#">
- // <span>'.$lang['srv_edit_chart_copyB'].'</span>
- // </a>';
-
- echo '</p></div>';
-
- $show = ($row['edit_graf'] == 0) ? ' style="display:none;"' : '';
-
- echo '<div class="chart_editing" '.$show.'>';
-
- // Urejanje naslova spremenljivke
- $text = $row['naslov_graf'] == '<p></p>' ? $row['naslov'] : $row['naslov_graf'];
- if (strtolower(substr($text, 0, 3)) == '<p>' && strtolower(substr($text, -4)) == '</p>' && strrpos($text, '<p>') == 0) {
- $text = substr($text, 3);
- $text = substr($text, 0, -4);
- }
- echo '<p>';
- echo '<textarea style="width:99%; height:60px;" name="naslov_graf" id="naslov_graf" class="chart_label">'.$text.'</textarea>';
- echo '</p>';
-
- // Urejanje naslovov variabel
- $sql1 = sisplet_query("SELECT id, naslov, naslov_graf, variable, other FROM srv_vrednost WHERE spr_id = '$this->spremenljivka' ORDER BY vrstni_red ASC");
- if (!$sql1) echo mysqli_error($GLOBALS['connect_db']);
-
- echo '<input type="hidden" name="edit_vrednost_graf" value="1" />';
-
- echo '<div id="vrednosti_holder"><ul class="vrednost_sort">';
- while ($row1 = mysqli_fetch_array($sql1)) {
-
- $text = $row1['naslov_graf'] == '' ? $row1['naslov'] : $row1['naslov_graf'];
-
- echo '<li id="vrednost_'.$vrednost.'" '.($row1['other'] == 1 ? 'class="li_other"' : '').'>';
-
- $gridWidth = 42;
-
- echo '<textarea name="vrednost_graf_'.$row1['id'].'" id="'.$row1['variable'].'_graf" class="vrednost_textarea chart_label" style="width:'.$gridWidth.'%;">'.$text.'</textarea> ';
- echo '['.$row1['variable'].']</span>';
- if ($row1['other'] == 1) echo ' <input type="text" disabled style="width:40px" />';
-
- echo '</li>';
- }
-
- echo '</ul>';
-
- echo '</div>';
-
-
- // Urejanje label za gride
- //if($row['tip'] == 6 || $row['tip'] == 16 || $row['tip'] == 19 || $row['tip'] == 20){
- if($row['tip'] == 6 || $row['tip'] == 16 || $row['tip'] == 19 || $row['tip'] == 20 || $row['tip'] == 2){
-
- echo '<div class="grid_settings">';
- echo '<input type="hidden" name="edit_grid_graf" value="1" />';
-
- echo '<table id="grids" style="width:100%">';
-
- echo '<tr>';
- for ($i=1; $i<=$row['grids']; $i++) {
- echo '<td>'.$i.'</td>';
- }
-
- //dodatne vrednosti (ne vem, zavrnil...)
- if (count($already_set_mv) > 0 ) {
- echo '<td></td>';
- if (count($missing_values) > 0) {
- foreach ($missing_values AS $mv_key => $mv_text) {
- if (isset($already_set_mv[$mv_key])) {
- echo '<td>'.$mv_key.'</td>';
- }
- }
- }
- }
- echo '</tr>';
-
- echo '<tr>';
- for ($i=1; $i<=$row['grids']; $i++) {
- $sql1 = sisplet_query("SELECT naslov, naslov_graf FROM srv_grid WHERE id='$i' AND spr_id='$this->spremenljivka'");
- $row1 = mysqli_fetch_array($sql1);
- $text = $row1['naslov_graf'] == '' ? $row1['naslov'] : $row1['naslov_graf'];
- echo '<td><input type="text" name="grid_graf_'.$i.'" id="grid_naslov_'.$i.'_graf" class="chart_label" value="'.$text.'" /></td>';
- }
-
- //dodatne vrednosti (ne vem, zavrnil...)
- if (count($already_set_mv) > 0 ) {
- echo '<td></td>';
- if (count($missing_values) > 0) {
- foreach ($missing_values AS $mv_key => $mv_text) {
- if (isset($already_set_mv[$mv_key])) {
- echo '<td><input type="text" name="grid_'.$mv_key.'_graf" class="chart_label" value="'.$already_set_mv[$mv_key].'" /></td>';
- }
- }
- }
- }
- echo '</tr>';
-
- echo '</table>';
- echo '</div>';
- }
-
- echo '</div>';
-
-
- // sirina labele grafa (navadna ali 50%)
- //$this->wide_graf();
- }*/
-
/**
* prikaz trackinga sprememb spremenljivke
*
@@ -1695,22 +1593,35 @@ class Vprasanje {
}
// obicna roleta za tip
else {
-
- echo '<span class="content"><select name="tip" id="spremenljivka_tip_' . $row['id'] . '" size="1" spr_id="' . $row['id'] . '" onChange="change_tip(\'' . $row['id'] . '\', $(this).val());">';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo '<div class="vprasanje_setting_line right-190">';
+
+ echo '<label>'.$lang['srv_question_type'].':</label>';
+
+ echo '<span class="content"><select name="tip" id="spremenljivka_tip_' . $row['id'] . '" size="1" spr_id="' . $row['id'] . '" onChange="change_tip(\'' . $row['id'] . '\', $(this).val(), \'0\');">';
echo '<option value="1"' . ($row['tip'] == 1 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_radio'] . '</option>';
echo '<option value="2"' . ($row['tip'] == 2 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_checkbox'] . '</option>';
if($this->survey_type != 0){
- if ($row['tip'] == 3) // star tip, ostane samo za kompatibilnost, ce je kje ostal se star tip
- //echo '<option value="3"' . ($row['tip'] == 3 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_dropdown'] . '</option>';
+ // star tip, ostane samo za kompatibilnost, ce je kje ostal se star tip
+ if ($row['tip'] == 3){
if ($row['info']){
echo '<option value="3"' . ($row['tip'] == 3 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_checkbox'] .'</option>';
}
else{
echo '<option value="3"' . ($row['tip'] == 3 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_radio'] .'</option>';
}
+ }
+ echo '<option value="21"' . ($row['tip'] == 21 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_text'] . '</option>';
+ if ($row['tip'] == 4) // star tip, ostane samo za kompatibilnost, ce je kje ostal se star tip
+ echo '<option value="4"' . ($row['tip'] == 4 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_text'] . '</option>';
+
+ echo '<option value="7"' . ($row['tip'] == 7 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_number'] . '</option>';
+
echo '<option value="6"' . ($row['tip'] == 6 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_multigrid'] . '</option>';
echo '<option value="16"' . ($row['tip'] == 16 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_multicheckbox'] . '</option>';
echo '<option value="19"' . ($row['tip'] == 19 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_multitext'] . '</option>';
@@ -1718,15 +1629,9 @@ class Vprasanje {
if($userAccess->checkUserAccess($what='question_type_multitable'))
echo '<option value="24"' . ($row['tip'] == 24 ? ' selected="true"' : '') . '>' . $lang['srv_survey_table_multiple'] . '</option>';
-
- echo '<option value="21"' . ($row['tip'] == 21 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_text'] . '</option>';
-
- if ($row['tip'] == 4) // star tip, ostane samo za kompatibilnost, ce je kje ostal se star tip
- echo '<option value="4"' . ($row['tip'] == 4 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_text'] . '</option>';
-
- echo '<option value="7"' . ($row['tip'] == 7 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_number'] . '</option>';
+
echo '<option value="5"' . ($row['tip'] == 5 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_label'] . '</option>';
-
+
if($userAccess->checkUserAccess($what='question_type_location'))
echo '<option value="26"' . ($row['tip'] == 26 ? ' selected="true"' : '') . '>' . $lang['srv_vprasanje_location'] . '</option>';
@@ -1752,9 +1657,11 @@ class Vprasanje {
}
echo '</select></span>';
- //echo '</p>';
-
-
+
+ echo '</div>';
+
+ echo '</div>';
+
echo '<script type="text/javascript">';
echo '$(document).ready(function() { ';
echo '$("#spremenljivka_tip_' . $row['id'] . '").selectbox();'; // kreira custom dropdown z možnostjo predogleda vprašanja
@@ -1814,57 +1721,44 @@ class Vprasanje {
$this->edit_subtype_map();
}
- //podtip heatmap
- if ($row['tip'] == 27) {
- $this->edit_heatmap_settings();
- }
-
echo '<script type="text/javascript">';
echo ' $(document).ready(function() {';
echo ' $("#spremenljivka_podtip_' . $row['id'] . '").selectbox();'; // kreira custom dropdown z možnostjo predogleda vprašanja
echo ' });';
echo '</script>';
}
-
- /**
- * urejanje naslova
- *
- */
- function edit_naslov($editor = true) {
- global $lang;
-
- $row = Cache::srv_spremenljivka($this->spremenljivka);
-
- // ce je ena vrstica pobrisemo <p> in </p>
- if (strtolower(substr($row['naslov'], 0, 3)) == '<p>' && strtolower(substr($row['naslov'], -4)) == '</p>' && strrpos($row['naslov'], '<p>') == 0) {
- $row['naslov'] = substr($row['naslov'], 3);
- $row['naslov'] = substr($row['naslov'], 0, -4);
- }
- echo '<p>';
- if ($editor)
- echo '<span class="red pointer" onmouseover="this.style.display=\'none\'; create_editor(\'naslov\');">'.$lang['srv_editor'].'</span><br />';
- echo '<textarea name="naslov" id="naslov">'.$row['naslov'].'</textarea>';
- echo '</p>';
- }
-
/**
* urejanje variable
*
*/
function edit_variable () {
global $lang;
-
+ global $site_domain;
+
$row = Cache::srv_spremenljivka($this->spremenljivka);
- #'email','ime','priimek','telefon','naziv','drugo'
- if ( in_array($row['variable'], array('email','telefon','ime','priimek','naziv','drugo')) && $row['sistem']==1 )
- $disabled = true; else $disabled = false;
- echo '<p><span class="title">'.$lang['srv_variable'].': '.Help::display('edit_variable').'</span><span class="content"><input type="text" name="variable" value="'.$row['variable'].'" onkeyup="vprasanje_check_variable(this);" '.($disabled?'disabled':'').' maxlength="10" /></span></p>';
+ #'email','ime','priimek','telefon','naziv','drugo'
+ if (in_array($row['variable'], array('email','telefon','ime','priimek','naziv','drugo')) && $row['sistem']==1)
+ $disabled = true;
+ else
+ $disabled = false;
- //echo '<p><span class="title">'.$lang['srv_datapiping'].': '.Help::display('DataPiping').'</span> '.$lang['srv_datapiping_txt'].'</p>';
-
- }
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+ if($site_domain == 'anketa.nijz.si'){
+ echo ' <label>'.$lang['srv_variable'].': '.Help::display('edit_variable').'</label>';
+ echo ' <span class="content"><input type="text" name="variable" value="'.$row['variable'].'" '.($disabled?'disabled':'').' /></span>';
+ }
+ else{
+ echo ' <label>'.$lang['srv_variable'].': '.Help::display('edit_variable').'</label>';
+ echo ' <span class="content"><input type="text" name="variable" value="'.$row['variable'].'" onkeyup="vprasanje_check_variable(this);" '.($disabled?'disabled':'').' maxlength="10" /></span>';
+ }
+ echo ' </div>';
+
+ echo '</div>';
+ }
/**
* urejanje variable
@@ -1876,7 +1770,14 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
#'email','ime','priimek','telefon','naziv','drugo'
- echo '<p><span class="title">'.$lang['srv_label'].':</span><span class="content"><input type="text" name="label" value="'.$row['label'].'" maxlength="80" /></span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+ echo ' <label>'.$lang['srv_label'].':</label>';
+ echo ' <span class="content"><input type="text" name="label" value="'.$row['label'].'" maxlength="80" /></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -1885,13 +1786,8 @@ class Vprasanje {
*/
function variable ($edit_tip = 0) {
- $row = Cache::srv_spremenljivka($this->spremenljivka);
-
- //echo '<h2><div contenteditable="true" onkeyup="vprasanje_check_variable(this); $(\'#spremenljivka_content_'.$row['id'].' .variable_name\').html( $(this).html() );" onblur="inline_variable(\''.$row['id'].'\', this);" class="editable" style="display:inline-block; width:115px; overflow:hidden; cursor:text">'.$row['variable'].'</div>';
- echo '<h2>'.$row['variable'].'';
- if ($edit_tip == 1) $this->edit_tip();
- echo '</h2>';
-
+ if ($edit_tip == 1)
+ $this->edit_tip();
}
//edit opombe
@@ -1900,17 +1796,34 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p style="margin-bottom: 32px"><label for="_info" class="title">'.$lang['srv_note2'].':</label>';
- //echo '<span class="content"><textarea name="info" style="width:200px">'.$row['info'].'</textarea></span>';
- //echo '<span class="content"><input type="radio" name="info" value="" '.($row['info']==''?' checked':'').'>'.$lang['no'].'';
- //echo '<input type="radio" name="info" value="'.($row['info']!=''?$row['info']:$lang['note']).'" id="radiothis" '.($row['info']!=''?' checked':'').'>'.$lang['yes'].'</span>';
- echo '<span class="content"><input type="hidden" name="info" value="">';
- echo '<input type="checkbox" id="_info" name="info" value="'.($row['info']!=''?$row['info']:$lang['note']).'" '.($row['info']!=''?' checked':'').'></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="info" value="">';
+ echo ' <input type="checkbox" id="_info" name="info" value="'.($row['info']!=''?$row['info']:$lang['note']).'" '.($row['info']!=''?' checked':'').'>';
+ echo ' <label for="_info" class="title">'.$lang['srv_note2'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
// ob spremembi opombe, damo drug value tudi na radio Da, da se ob shranjevanju desnega menija shrani nova opomba, ce je bila spremenenjena
?><script> $('div.spremenljivka_info.info_inline[spr_id=<?=$this->spremenljivka?>]').live('blur', function() { $('#_info').val( $(this).html() ); }) </script><?
}
+
+ // dodajanje elementa v knjiznico
+ private function add_into_library(){
+ global $lang;
+
+ $row = Cache::srv_spremenljivka($this->spremenljivka);
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line with-icon">';
+ echo ' <span onClick="displayAddIntoLibraryPopup(\''.$this->spremenljivka.'\', \'1\');"><span class="faicon library"></span>'.$lang['srv_library_add_to_lib_title_q2'].'</span>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
//editiranje naslova uvoda
function edit_uvod() {
@@ -1918,8 +1831,6 @@ class Vprasanje {
global $admin_type;
$row = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<h2>'.$lang['srv_intro_label'].'</h2>';
if ($row['introduction'] == '') {
$lang_admin = SurveyInfo::getInstance()->getSurveyColumn('lang_admin');
@@ -1945,52 +1856,83 @@ class Vprasanje {
$text = substr($text, 0, -4);
}
+
+ echo '<fieldset><legend>'.$lang['srv_common_settings'].'</legend>';
+
// Opomba
- $opomba = $row['intro_opomba'];
- echo '<p>'.$lang['note'].' ('.$lang['srv_internal'].'): ';
- echo '<textarea name="intro_opomba" class="texteditor info" >'.$opomba.'</textarea>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['note'].' ('.$lang['srv_internal'].'): </label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <textarea name="intro_opomba" class="texteditor info" >'.$row['intro_opomba'].'</textarea>';
+ echo ' </div>';
+
+ echo '</div>';
- /*if ($row['user_base'] == 1 && (int)$row['individual_invitation'] > 0) {
- $disabled = 'disabled';
- } else*/ $disabled = '';
+
+ $disabled = '';
// Prikaz uvoda
- echo '<p>';
- echo '<span class="title">'.$lang['srv_show_intro'].': </span>';
- echo '<input type="radio" name="show_intro" value="0" id="show_intro_0" '.(($row['show_intro'] == 0) ? ' checked="checked" ' : '').' '.$disabled.' onClick="$(\'.intro_static_setting\').hide();" /><label for="show_intro_0">'.$lang['no1'].'</label>';
- echo '<input type="radio" name="show_intro" value="1" id="show_intro_1" '.(($row['show_intro'] == 1) ? ' checked="checked" ' : '').' '.$disabled.' onClick="$(\'.intro_static_setting\').show();" /><label for="show_intro_1">'.$lang['yes'].'</label>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label class="title">'.$lang['srv_show_intro'].': </label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" name="show_intro" value="0" id="show_intro_0" '.(($row['show_intro'] == 0) ? ' checked="checked" ' : '').' '.$disabled.' onClick="$(\'.intro_static_setting\').hide();" /><label for="show_intro_0">'.$lang['no1'].'</label>';
+ echo ' <input type="radio" name="show_intro" value="1" id="show_intro_1" '.(($row['show_intro'] == 1) ? ' checked="checked" ' : '').' '.$disabled.' onClick="$(\'.intro_static_setting\').show();" /><label for="show_intro_1">'.$lang['yes'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
// Staticen uvod, ki ne ustvari userja (user se ustvari sele na naslednji strani) - za recimo embeddane ankete...
- //if($admin_type == 0){
- echo '<p class="intro_static_setting" '.($row['show_intro'] == 0 ? ' style="display:none;"' : '').'>';
- echo '<span class="title">'.$lang['srv_show_intro_static'].': </span>';
- echo '<input type="radio" name="intro_static" id="intro_static_0" value="0" '.(($row['intro_static'] == 0) ? ' checked="checked" ' : '').' '.$disabled.' /><label for="intro_static_0">'.$lang['srv_show_intro_static_0'].'</label>';
- echo '<input type="radio" name="intro_static" id="intro_static_1" value="1" '.(($row['intro_static'] == 1) ? ' checked="checked" ' : '').' '.$disabled.' /><label for="intro_static_1">'.$lang['srv_show_intro_static_1'].'</label>';
- echo '<input type="radio" name="intro_static" id="intro_static_2" value="2" '.(($row['intro_static'] == 2) ? ' checked="checked" ' : '').' '.$disabled.' /><label for="intro_static_2">'.$lang['srv_show_intro_static_2'].'</label>';
- echo '</p>';
- //}
-
- //dodaten naslov gumba za naprej
+ echo '<div class="vprasanje_setting_holder intro_static_setting" '.($row['show_intro'] == 0 ? ' style="display:none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_show_intro_static'].': </label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" name="intro_static" id="intro_static_0" value="0" '.(($row['intro_static'] == 0) ? ' checked="checked" ' : '').' '.$disabled.' /><label for="intro_static_0">'.$lang['srv_show_intro_static_0'].'</label>';
+ echo ' <input type="radio" name="intro_static" id="intro_static_1" value="1" '.(($row['intro_static'] == 1) ? ' checked="checked" ' : '').' '.$disabled.' /><label for="intro_static_1">'.$lang['srv_show_intro_static_1'].'</label>';
+ echo ' <input type="radio" name="intro_static" id="intro_static_2" value="2" '.(($row['intro_static'] == 2) ? ' checked="checked" ' : '').' '.$disabled.' /><label for="intro_static_2">'.$lang['srv_show_intro_static_2'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ // Dodaten naslov gumba za naprej
SurveySetting::getInstance()->Init($this->anketa);
$srv_nextpage_uvod = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_nextpage_uvod');
if ($srv_nextpage_uvod != '')
$text = $srv_nextpage_uvod;
else
$text = $lang_srv_nextpage_uvod;
- echo '<p><label for="srv_nextpage_uvod">'.$lang['srv_nextpage_uvod'].':</label> <input type="text" name="srv_nextpage_uvod" id="srv_nextpage_uvod" value="'.$text.'" style="width:200px"></span></p>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label for="srv_nextpage_uvod">'.$lang['srv_nextpage_uvod'].':</label>';
+ echo ' <span class="content"><input type="text" name="srv_nextpage_uvod" id="srv_nextpage_uvod" value="'.$text.'"></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
}
- //editiranje naslova zakljucka in osnovnih nastavitev (skok na url...)
+ // editiranje naslova zakljucka in osnovnih nastavitev (skok na url...)
function edit_zakljucek() {
global $lang;
global $site_url;
$row = SurveyInfo::getInstance()->getSurveyRow();
SurveySetting::getInstance()->Init($this->anketa);
-
- echo '<h2>'.$lang['srv_end_label'].'</h2>';
if ($row['conclusion'] == '') {
$lang_admin = SurveyInfo::getInstance()->getSurveyColumn('lang_admin');
@@ -2017,21 +1959,112 @@ class Vprasanje {
$text = substr($text, 0, -4);
}
+
+ echo '<fieldset><legend>'.$lang['srv_common_settings'].'</legend>';
+
// opomba
- $opomba = $row['concl_opomba'];
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['note'].' ('.$lang['srv_internal'].'): </label>';
+ echo ' </div>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <textarea name="concl_opomba" class="texteditor info" >'.$row['concl_opomba'].'</textarea>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_show_concl'].': </label>';
+ echo ' </div>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" id="show_concl_0" name="show_concl" value="0" '.(($row['show_concl'] == 0) ? ' checked="checked" ' : '').' /><label for="show_concl_0">'.$lang['no1'].'</label>';
+ echo ' <input type="radio" id="show_concl_1" name="show_concl" value="1" '.(($row['show_concl'] == 1) ? ' checked="checked" ' : '').' /><label for="show_concl_1">'.$lang['yes'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
+
- echo '<p>'.$lang['note'].' ('.$lang['srv_internal'].'): ';
- echo '<textarea name="concl_opomba" class="texteditor info" >'.$opomba.'</textarea>';
- echo '</p>';
+ // Dodatne nastavitve
+ echo '<fieldset><legend>'.$lang['srv_extra_settings'].'</legend>';
+
+ // Povezava za naknadno urejanje
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" id="concl_return_edit" name="concl_return_edit" value="1" '.($row['concl_return_edit'] == 1 ? ' checked' : '').'/>';
+ echo ' <label for="concl_return_edit">'.$lang['srv_concl_return_edit'].'</label>';
+ echo ' </div>';
+ echo '</div>';
- echo '<p>';
- echo '<span class="title">'.$lang['srv_show_concl'].': </span>';
- echo '<input type="radio" id="show_concl_0" name="show_concl" value="0" '.(($row['show_concl'] == 0) ? ' checked="checked" ' : '').' /><label for="show_concl_0">'.$lang['no1'].'</label>';
- echo '<input type="radio" id="show_concl_1" name="show_concl" value="1" '.(($row['show_concl'] == 1) ? ' checked="checked" ' : '').' /><label for="show_concl_1">'.$lang['yes'].'</label>';
- echo '</p>';
+
+ // Povezava na pdf
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" id="concl_PDF_link" name="concl_PDF_link" value="1" '.($row['concl_PDF_link'] == 1 ? ' checked' : '').'/>';
+ echo ' <label for="concl_PDF_link">'.$lang['srv_concl_PDF_link'].' '.Help :: display('srv_concl_PDF_link').'</label>';
+ echo ' </div>';
+ echo '</div>';
+
+ // link na urejanje texta ce je anketa ze zakljucena
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_concl_deactivation_text'].' '.Help::display('srv_concl_deactivation_text').'</label>';
+ echo ' </div>';
+
+ $value = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active');
+ if ($value == '') $value = $lang['srv_survey_non_active'];
+ echo ' <div class="vprasanje_setting_line concl_deactivation">';
+ echo ' <textarea name="srvlang_srv_survey_non_active" id="srvlang_srv_survey_non_active" style="width:100%; height:32px;">'.$value.'</textarea>';
+ echo ' <span class="faicon edit" onclick="vprasanje_jezik_edit_zakljucek(\'srvlang_srv_survey_non_active\');"></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '</fieldset>';
+ }
+
+ // Editiranje naprednih nastavitev zakljucka
+ function edit_zakljucek_napredno() {
+ global $lang;
+ global $site_url;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+ SurveySetting::getInstance()->Init($this->anketa);
+ if ($row['conclusion'] == '') {
+ $lang_admin = SurveyInfo::getInstance()->getSurveyColumn('lang_admin');
+ $lang_resp = SurveyInfo::getInstance()->getSurveyColumn('lang_resp');
+
+ // nastavimo na jezik za respondentov vmesnik
+ $file = '../../lang/'.$lang_resp.'.php';
+ include($file);
+
+ $text = $lang['srv_end'];
+ $lang_srv_prevpage = $lang['srv_prevpage'];
+ $lang_srv_konec = $lang['srv_konec'];
+
+ // nastavimo nazaj na admin jezik
+ $file = '../../lang/'.$lang_admin.'.php';
+ include($file);
+ }
+ else {
+ $text = $row['conclusion'];
+ }
+
+ if (strtolower(substr($text, 0, 3)) == '<p>' && strtolower(substr($text, -4)) == '</p>' && strrpos($text, '<p>') == 0) {
+ $text = substr($text, 3);
+ $text = substr($text, 0, -4);
+ }
+
- //dodatne nastaitve (skok na url ...)
+ // Dodatne nastaitve (skok na url ...)
echo '<fieldset><legend>'.$lang['srv_concl_link'].'</legend>';
if ($row['url'] != '')
@@ -2039,41 +2072,74 @@ class Vprasanje {
else
$url = $site_url;
- echo '<p>';
- echo '<input type="radio" id="concl_link_1" name="concl_link" value="1" '.($row['concl_link'] == 0 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').hide()"><label for="concl_link_1">'.$lang['srv_concl_link_close'].'</label> ';
- // Rekurzivno - samo pri navadni anketi
- if($row['survey_type'] > 1)
- echo '<br /><input type="radio" id="concl_link_2" name="concl_link" value="2" '.($row['concl_link'] == 2 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').hide()"><label for="concl_link_2">'.$lang['srv_concl_link_rec'].'</label> ';
- echo '<br /><input type="radio" id="concl_link_0" name="concl_link" value="0" '.($row['concl_link'] == 1 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').show()"><label for="concl_link_0">'.$lang['srv_concl_link_go'].'</label> ';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" id="concl_link_1" name="concl_link" value="1" '.($row['concl_link'] == 0 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').hide()"><label for="concl_link_1">'.$lang['srv_concl_link_close'].'</label> ';
+ echo ' </div>';
+
+ // Rekurzivno - samo pri navadni anketi
+ if($row['survey_type'] > 1){
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" id="concl_link_2" name="concl_link" value="2" '.($row['concl_link'] == 2 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').hide()"><label for="concl_link_2">'.$lang['srv_concl_link_rec'].'</label> ';
+ echo ' </div>';
+ }
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" id="concl_link_0" name="concl_link" value="0" '.($row['concl_link'] == 1 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').show()"><label for="concl_link_0">'.$lang['srv_concl_link_go'].'</label> ';
+ echo ' </div>';
+
+ echo '</div>';
+
// Ce skocimo na custom url prikazemo urejanje url-ja in dodatne nastavitve za parametre v url (usr_id, status...)
- echo '<div id="srv_concl_link_go" '.($row['concl_link'] == 0 || $row['concl_link'] == 2 ?' style="display:none"':'').'">';
-
+ echo '<div id="srv_concl_link_go" '.($row['concl_link'] == 0 || $row['concl_link'] == 2 ?' style="display:none"':'').'">';
+
// URL
- echo '<p><label for="url">'.$lang['srv_url'].':</label> <input type="text" name="url" id="url_concl_sett" value="'.$url.'" style="width:200px"></p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line inline">';
+ echo ' <label for="url">'.$lang['srv_url'].':</label>';
+ echo ' <span class="content"><input type="text" name="url" id="url_concl_sett" value="'.$url.'"></span>';
+ echo ' </div>';
+ echo '</div>';
+
// Parametri
- echo '<p>';
- echo $lang['srv_concl_link_params'].':<br />';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_concl_link_params'].':</label>';
+ echo ' </div>';
+
$concl_url_usr_id = SurveySetting::getInstance()->getSurveyMiscSetting('concl_url_usr_id');
- echo '<input type="hidden" name="concl_url_usr_id" value="0">';
- echo '<span class="spaceLeft spaceright"><input type="checkbox" name="concl_url_usr_id" id="concl_url_usr_id" value="1" '.($concl_url_usr_id==1 ? ' checked="checked"' : '').'> <label for="concl_url_usr_id">'.$lang['srv_concl_link_usr_id'].'</label></span>';
- echo '<br />';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="concl_url_usr_id" value="0">';
+ echo ' <input type="checkbox" name="concl_url_usr_id" id="concl_url_usr_id" value="1" '.($concl_url_usr_id==1 ? ' checked="checked"' : '').'> <label for="concl_url_usr_id">'.$lang['srv_concl_link_usr_id'].'</label>';
+ echo ' </div>';
+
$concl_url_status = SurveySetting::getInstance()->getSurveyMiscSetting('concl_url_status');
- echo '<input type="hidden" name="concl_url_status" value="0">';
- echo '<span class="spaceLeft"><input type="checkbox" name="concl_url_status" id="concl_url_status" value="1" '.($concl_url_status==1 ? ' checked="checked"' : '').'> <label for="concl_url_status">'.$lang['srv_concl_link_status'].'</label></span>';
- echo '<br />';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="concl_url_status" value="0">';
+ echo ' <input type="checkbox" name="concl_url_status" id="concl_url_status" value="1" '.($concl_url_status==1 ? ' checked="checked"' : '').'> <label for="concl_url_status">'.$lang['srv_concl_link_status'].'</label>';
+ echo ' </div>';
+
$concl_url_recnum = SurveySetting::getInstance()->getSurveyMiscSetting('concl_url_recnum');
- echo '<input type="hidden" name="concl_url_recnum" value="0">';
- echo '<span class="spaceLeft"><input type="checkbox" name="concl_url_recnum" id="concl_url_recnum" value="1" '.($concl_url_recnum==1 ? ' checked="checked"' : '').'> <label for="concl_url_recnum">'.$lang['srv_concl_link_recnum'].'</label></span>';
- echo '</p>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="concl_url_recnum" value="0">';
+ echo ' <input type="checkbox" name="concl_url_recnum" id="concl_url_recnum" value="1" '.($concl_url_recnum==1 ? ' checked="checked"' : '').'> <label for="concl_url_recnum">'.$lang['srv_concl_link_recnum'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
-
// Text za datapiping v url-ju
- echo '<p>'.$lang['srv_concl_link_datapiping'].'</p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <p>'.$lang['srv_concl_link_datapiping'].'</p>';
+ echo ' </div>';
+ echo '</div>';
+
+
echo '</div>';
echo '</fieldset>';
@@ -2081,46 +2147,49 @@ class Vprasanje {
echo '<fieldset><legend>'.$lang['srv_extra_settings'].'</legend>';
- echo '<p><label for="concl_back_button">'.$lang['srv_concl_back_button_show'].'</label><span class="content"><input type="checkbox" id="concl_back_button" name="concl_back_button" value="1" '.($row['concl_back_button'] == 1 ? ' checked' : '').' onclick=" if (this.checked) { $(\'#srv_prevpage_span\').show(); } else { $(\'#srv_prevpage_span\').hide(); }" /></span>';
-
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" id="concl_back_button" name="concl_back_button" value="1" '.($row['concl_back_button'] == 1 ? ' checked' : '').' onclick=" if (this.checked) { $(\'#srv_prevpage_span\').show(); } else { $(\'#srv_prevpage_span\').hide(); }" />';
+ echo ' <label for="concl_back_button">'.$lang['srv_concl_back_button_show'].'</label>';
+ echo ' </div>';
+ echo '</div>';
+
// dodaten naslov gumba zakljucek
- $srv_prevpage = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_prevpage');
+ /*$srv_prevpage = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_prevpage');
if ($srv_prevpage != '')
$text = $srv_prevpage;
else
$text = $lang_srv_prevpage;
- echo '<br /><span id="srv_prevpage_span"'.($row['concl_back_button']==0?' style="display:none"':'').'> <label for="srv_prevpage">'.$lang['srv_prevpage'].':</label> <span class="content"><input type="text" name="srv_prevpage" id="srv_prevpage" value="'.$text.'" style="width:190px"></span></span></p>';
-
-
- echo '<p><label for="concl_end_button">'.$lang['srv_concl_end_button_show'].'</label><span class="content"><input type="checkbox" id="concl_end_button" name="concl_end_button" value="1" '.($row['concl_end_button'] == 1 ? ' checked' : '').' onclick=" if (this.checked) { $(\'#srv_konec_span\').show(); } else { $(\'#srv_konec_span\').hide(); }" /></span>';
-
+
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div id="srv_prevpage_span" class="vprasanje_setting_line half-half" '.($row['concl_back_button']==0?' style="display:none"':'').'>';
+ echo ' <label for="srv_prevpage">'.$lang['srv_prevpage'].':</label>';
+ echo ' <span class="content"><input type="text" name="srv_prevpage" id="srv_prevpage" value="'.$text.'"></span>';
+ echo ' </div>';
+ echo '</div>';*/
+
+
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" id="concl_end_button" name="concl_end_button" value="1" '.($row['concl_end_button'] == 1 ? ' checked' : '').' onclick=" if (this.checked) { $(\'#srv_konec_span\').show(); } else { $(\'#srv_konec_span\').hide(); }" />';
+ echo ' <label for="concl_end_button">'.$lang['srv_concl_end_button_show'].'</label>';
+ echo ' </div>';
+ echo '</div>';
+
// dodaten naslov gumba zakljucek
$srv_konec = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_konec');
if ($srv_konec != '')
$text = $srv_konec;
else
$text = $lang_srv_konec;
- echo '<br /><span id="srv_konec_span"'.($row['concl_end_button']==0?' style="display:none"':'').'> <label for="srv_konec">'.$lang['srv_konec'].':</label> <span class="content"><input type="text" name="srv_konec" id="srv_konec" value="'.$text.'" style="width:190px"></span></span></p>';
-
- // Povezava za naknadno urejanje
- echo '<p><label for="concl_return_edit">'.$lang['srv_concl_return_edit'].'</label><span class="content"><input type="checkbox" id="concl_return_edit" name="concl_return_edit" value="1" '.($row['concl_return_edit'] == 1 ? ' checked' : '').'/></span></p>';
-
- // Povezava na pdf
- echo '<p><label for="concl_PDF_link">'.$lang['srv_concl_PDF_link'].'</label><span class="content"><input type="checkbox" id="concl_PDF_link" name="concl_PDF_link" value="1" '.($row['concl_PDF_link'] == 1 ? ' checked' : '').'/></span>'.Help :: display('srv_concl_PDF_link').'</p>';
-
- // link na urejanje texta ce je anketa ze zakljucena
- echo '<p>';
- echo $lang['srv_concl_deactivation_text'].' '.Help::display('srv_concl_deactivation_text').'<br />';
-
- $value = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active');
- if ($value == '') $value = $lang['srv_survey_non_active'];
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div id="srv_konec_span" class="vprasanje_setting_line half-half" '.($row['concl_end_button']==0?' style="display:none"':'').'>';
+ echo ' <label for="srv_konec">'.$lang['srv_button_text'].':</label>';
+ echo ' <span class="content"><input type="text" name="srv_konec" id="srv_konec" value="'.$text.'"></span>';
+ echo ' </div>';
+ echo '</div>';
- echo '<textarea name="srvlang_srv_survey_non_active" id="srvlang_srv_survey_non_active" style="width:260px; height:30px;">'.$value.'</textarea>';
- echo '<span class="faicon edit icon-as_link small" onclick="vprasanje_jezik_edit_zakljucek(\'srvlang_srv_survey_non_active\');" style="float: right; margin-top: 1px;"></span>';
- echo '</p>';
-
-
echo '</fieldset>';
}
@@ -2129,8 +2198,6 @@ class Vprasanje {
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<h2>'.$lang['srv_statistic_label'].'</h2>';
$text = $row['statistics'];
@@ -2139,10 +2206,25 @@ class Vprasanje {
$text = substr($text, 0, -4);
}
- // text
- echo '<p><span class="title">Besedilo statistike:</span>';
- echo '<textarea name="statistics">'.$text.'</textarea>';
- echo '</p>';
+
+ echo '<fieldset><legend>'.$lang['srv_common_settings'].'</legend>';
+
+
+ // Text
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>Besedilo statistike:</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <textarea name="statistics">'.$text.'</textarea>';
+ echo ' </div>';
+
+ echo ' </div>';
+
+
+ echo '</fieldset>';
}
// navadna/sistemska spr
@@ -2154,11 +2236,15 @@ class Vprasanje {
if ( in_array($row['variable'], array('email','telefon','ime','priimek','naziv','drugo')) && $row['sistem']==1 )
$disabled = true; else $disabled = false;
- echo '<p>';
- echo '<label for="sistem" class="title">'.$lang['srv_sistemska'].': '.Help::display('srv_sistemska_edit').'</label>';
- echo '<span class="content"><input type="hidden" name="sistem" value="0" />';
- echo '<input type="checkbox" id="sistem" name="sistem" value="1" '.(($row['sistem'] == 1) ? ' checked="checked" ' : '').' '.($disabled?'disabled':'').' />';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="sistem" value="0" />';
+ echo ' <input type="checkbox" id="sistem" name="sistem" value="1" '.(($row['sistem'] == 1) ? ' checked="checked" ' : '').' '.($disabled?'disabled':'').' />';
+ echo ' <label for="sistem" class="title">'.$lang['srv_sistemska'].' '.Help::display('srv_sistemska_edit').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// skrito/vidno vprasanje
@@ -2167,24 +2253,36 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<label for="visible" class="title">'.$lang['srv_visible'].': </label>';
- //echo '<span class="content"><input type="radio" name="visible" value="0" '.(($row['visible'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'];
- //echo '<input type="radio" name="visible" value="1" '.(($row['visible'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'];
- echo '<span class="content"><input type="hidden" name="visible" value="0" />';
- echo '<input type="checkbox" id="visible" name="visible" value="1" '.(($row['visible'] == 1) ? ' checked="checked" ' : '').' onClick="show_dostop(this.checked);" />';
- echo '</span></p>';
-
- echo '<div id="dostop" '.($row['visible'] == 1 ? '' : ' style="display:none;"').'><p>';
- echo '<span class="title">'.$lang['srv_visible_dostop'].': </span>';
- echo '<span class="content"><select name="dostop">';
- echo '<option value="4"'.($row['dostop']==4?' selected':'').'>'.$lang['see_everybody'].'</option>';
- echo '<option value="3"'.($row['dostop']==3?' selected':'').'>'.$lang['see_registered'].'</option>';
- echo '<option value="2"'.($row['dostop']==2?' selected':'').'>'.$lang['see_member'].'</option>';
- echo '<option value="1"'.($row['dostop']==1?' selected':'').'>'.$lang['see_manager'].'</option>';
- echo '<option value="0"'.($row['dostop']==0?' selected':'').'>'.$lang['see_admin'].'</option>';
- echo '</select></span>';
- echo '</p></div>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="visible" value="1" />';
+ echo ' <input type="checkbox" id="visible" name="visible" value="0" '.(($row['visible'] != 1) ? ' checked="checked" ' : '').' onClick="show_dostop(this.checked);" />';
+ echo ' <label for="visible" class="title">'.$lang['srv_visible'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div id="dostop" class="vprasanje_setting_holder" '.($row['visible'] == 0 ? '' : ' style="display:none;"').'>';
+
+ /* echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_visible_dostop'].': </label>';
+ echo ' <span class="content"><select name="dostop">';
+ echo ' <option value="4"'.($row['dostop']==4?' selected':'').'>'.$lang['see_everybody'].'</option>';
+ echo ' <option value="3"'.($row['dostop']==2 || $row['dostop']==3?' selected':'').'>'.$lang['see_registered'].'</option>';
+ echo ' <option value="1"'.($row['dostop']==1?' selected':'').'>'.$lang['see_manager'].'</option>';
+ echo ' <option value="0"'.($row['dostop']==0?' selected':'').'>'.$lang['see_admin'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>'; */
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="dostop" value="4" />';
+ echo ' <input type="checkbox" id="_dostop" name="dostop" value="0" '.(($row['dostop'] == '0') ? ' checked="checked" ' : '').'/>';
+ echo ' <label for="_dostop" class="title">'.$lang['srv_visible_dostop_admin'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// odklenjeno/zaklenjeno vprasanje
@@ -2193,11 +2291,15 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<label for="locked" class="title">'.$lang['srv_locked'].': '.Help::display('srv_spremenljivka_lock').'</label>';
- echo '<span class="content"><input type="hidden" name="locked" value="0" />';
- echo '<input type="checkbox" id="locked" name="locked" value="1" '.(($row['locked'] == 1) ? ' checked="checked" ' : '').' />';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="locked" value="0" />';
+ echo ' <input type="checkbox" id="locked" name="locked" value="1" '.(($row['locked'] == 1) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="locked">'.$lang['srv_locked'].' '.Help::display('srv_spremenljivka_lock').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// omogoceno/onemogoceno vprasanje pri resevanju
@@ -2209,11 +2311,19 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$disabled_vprasanje = ($spremenljivkaParams->get('disabled_vprasanje') ? $spremenljivkaParams->get('disabled_vprasanje') : 0);
- echo '<p>';
- echo '<label for="disabled_vprasanje" class="title">'.$lang['srv_disabled'].': '.Help::display('srv_disabled_question').'</label>';
- echo '<span class="content"><input type="hidden" name="disabled_vprasanje" value="0" />';
- echo '<input type="checkbox" id="disabled_vprasanje" name="disabled_vprasanje" value="1" '.(($disabled_vprasanje == 1) ? ' checked="checked" ' : '').' />';
- echo '</span></p>';
+ // ODSTRANJENO - ostane samo tam, kjer je vklopljeno zaradi kompatibilnosti za nazaj
+ if($disabled_vprasanje == '1'){
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="disabled_vprasanje" value="0" />';
+ echo ' <input type="checkbox" id="disabled_vprasanje" name="disabled_vprasanje" value="1" '.(($disabled_vprasanje == 1) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="disabled_vprasanje">'.$lang['srv_disabled'].' '.Help::display('srv_disabled_question').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
}
/**
@@ -2233,9 +2343,33 @@ class Vprasanje {
$display = ( ($row['tip'] == 6 && ($row['enota'] == 4 || $row['enota'] == 5 || ($row['enota'] == 1 && $diferencial_trak == 1) || ($row['enota'] == 0 && $diferencial_trak == 1)) ) || ($row['tip'] == 6 && $row['enota'] == 8) || ($row['tip'] == 20 && $row['ranking_k'] == 1)) ? ' style="display:none;"' : '';
- echo '<div class="drop_grids_num" '.$display_1.'>';
- echo '<p><span class="title" >'.$lang['srv_odgovorov'].':</span>';
- echo '<span class="content"><select name="grids_count" id="grids_count" onChange="change_selectbox_size(\'' . $row['id'] . '\', $(this).val(), \'' . $lang['srv_select_box_vse'] . '\'); change_trak_num_of_titles(\'' . $row['id'] . '\', $(this).val());">';
+ if ($row['ranking_k'] != 1){
+ $spremenljivkaParams = new enkaParameters($row['params']);
+ $grid_var = ($spremenljivkaParams->get('grid_var') ? $spremenljivkaParams->get('grid_var') : 0);
+
+ echo '<div class="vprasanje_setting_holder grid_var_class" '.$display.'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="grid_var" value="0">';
+ echo ' <input type="checkbox" id="grid_var" name="grid_var" value="1" '.($grid_var == 1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="grid_var" class="title">'.$lang['srv_edit_values'].' '.Help::display('srv_grid_var').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
+
+
+ // Vrednosti na traku tip
+ if($row['tip'] == 6){
+ $this->edit_trak_tabela();
+ }
+
+
+ echo '<div class="vprasanje_setting_holder drop_grids_num" '.$display_1.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_odgovorov'].':</label>';
+ echo ' <span class="content"><select name="grids_count" id="grids_count" onChange="change_selectbox_size(\'' . $row['id'] . '\', $(this).val(), \'' . $lang['srv_select_box_vse'] . '\'); change_trak_num_of_titles(\'' . $row['id'] . '\', $(this).val());">';
// Vedno imamo najmanj 2 grida (drugace so stvari cudne v analizah) - namesto 1 se uporabi navaden radio tip vprasanja
// Pri number sliderju se rabi 1 (mogoče še kje - npr checkbox itd.... ) analize morajo delati tudi v tem primeru :P
@@ -2254,43 +2388,35 @@ class Vprasanje {
echo '<option value="11"' . ($row['grids'] == '11' ? ' selected' : '') . '>11</option>';
echo '<option value="12"' . ($row['grids'] == '12' ? ' selected' : '') . '>12</option>';
}
- echo '</select></span>';
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
+
// Slikovni tip
if($row['tip'] == 6){
- //if($row['enota'] == 12) {
- $this->edit_custom_picture_radio();
- //}
-
- $this->edit_trak_tabela();
+ $this->edit_custom_picture_radio();
}
+
// prikaz dropdowna za default vrednosti gridov
- if ($row['tip'] == 6 /*&& $row['grids'] == 5*/){
- //echo '<p class="grid_defaults">';
- echo '<p class="grid_defaults_class" '.$display.'>';
- echo '<span class="title">'.$lang['srv_defaultGrid'].':</span>';
- echo '<span class="content"><select name="grid_defaults" id="grid_defaults" style="width:100px">';
- //echo '<span class="content"><select name="grid_defaults" id="grid_defaults" style="width:100px" onChange="vprasanje_save(true)">';
- echo '<option value="0">'.$lang['s_without'].'</option>';
+ if ($row['tip'] == 6){
+
+ echo '<div class="vprasanje_setting_holder grid_defaults_class" '.$display.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_defaultGrid'].':</label>';
+ echo ' <span class="content"><select name="grid_defaults" id="grid_defaults">';
+
+ echo '<option value="0">'.$lang['s_without'].'</option>';
foreach($default_grid_values AS $key => $value){
echo '<option value="'.$key.'">'.$value['name'].'</option>';
}
- echo '</select></span>';
- echo '</p>';
- }
-
- if ($row['ranking_k'] != 1){
- $spremenljivkaParams = new enkaParameters($row['params']);
- $grid_var = ($spremenljivkaParams->get('grid_var') ? $spremenljivkaParams->get('grid_var') : 0);
-
- echo '<p class="grid_var_class" '.$display.'><label for="grid_var" class="title">'.$lang['srv_edit_values'].':</label>';
- echo ' '.Help::display('srv_grid_var');
- echo '<span class="content">';
- echo '<input type="hidden" name="grid_var" value="0">';
- echo '<input type="checkbox" id="grid_var" name="grid_var" value="1" '.($grid_var == 1 ? ' checked="checked"' : '').'></span></p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
}
@@ -2312,14 +2438,22 @@ class Vprasanje {
while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
$already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov'];
}
- echo '<p>';
- if (count($missing_values) > 0) {
+
+ if (count($missing_values) > 0) {
+
+ echo '<div id="missing_settings_holder">';
+ echo ' <div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line inline">';
foreach ($missing_values AS $mv_key => $mv_text) {
- echo '<input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked' : '').' name="missing_value_checkbox[]" id="missing_value_'.$mv_key.'" value="'.$mv_key.'" title="'.$mv_text.'""></input> '; // ,\''.$mv_key.'\',\''.$mv_text.'\'
- echo '<label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
- }
+ echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked' : '').' name="missing_value_checkbox[]" id="missing_value_'.$mv_key.'" value="'.$mv_key.'" title="'.$mv_text.'""></input> ';
+ echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
+ }
+ echo ' </div>';
+
+ echo ' </div>';
+ echo '</div>';
}
- echo '</p>';
}
/**
@@ -2331,14 +2465,21 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$rowA = SurveyInfo::getInstance()->getSurveyRow();
- $display = ($row['enota'] == 3 ? '' : 'display: none;');
-
-
- echo '<div class="grid_subtitle" style="'.$display.'">';
-
- echo '<p><span class="title">'.$lang['srv_grid_subtitle1'].':</span><span class="content"><input type="text" size="23" name="grid_subtitle1" value="'.$row['grid_subtitle1'].'" /></span></p>';
- echo '<p><span class="title">'.$lang['srv_grid_subtitle2'].':</span><span class="content"><input type="text" size="23" name="grid_subtitle2" value="'.$row['grid_subtitle2'].'" /></span></p>';
-
+ $display = ($row['enota'] == 3 ? '' : ' style="display: none;"');
+
+
+ echo '<div class="vprasanje_setting_holder grid_subtitle" '.$display.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_grid_subtitle1'].':</label>';
+ echo ' <span class="content"><input type="text" size="23" name="grid_subtitle1" value="'.$row['grid_subtitle1'].'" /></span>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_grid_subtitle2'].':</label>';
+ echo ' <span class="content"><input type="text" size="23" name="grid_subtitle2" value="'.$row['grid_subtitle2'].'" /></span>';
+ echo ' </div>';
+
echo '</div>';
}
@@ -2354,85 +2495,107 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- //Če gre za vizualno skalo ali slikovni tip potem opcij ne prikazujemo. Še vedno pa izpišemo, da delujejo če nekdo zamenja tip vprašanaj
- $displayNone = '';
- if(in_array($row['orientation'], [9,11]))
- $displayNone = 'style="display:none";';
+ // Hitro dodajanje kategorij
+ echo '<div class="vprasanje_setting_holder">';
- // Prednastavljene vrednosti odgovorov (dropdown)
- if ($row['tip'] == 1) {
+ echo ' <div class="vprasanje_setting_line with-icon">';
+
- echo '<p class="radio_defaults_class">';
- echo '<span class="title">'.$lang['srv_defaultGrid'].':</span>';
- echo '<span class="content"><select name="radio_defaults" id="radio_defaults" style="width:100px">';
- echo '<option value="0">'.$lang['s_without'].'</option>';
- foreach($default_grid_values AS $key => $value){
- echo '<option value="'.$key.'">'.$value['name'].'</option>';
- }
- echo '</select></span>';
- echo '</p>';
- }
+ if ( in_array($row['tip'], array(6, 16, 19, 20)) ){
+ echo '<span onclick="vrednost_fastadd(\''.$this->spremenljivka.'\'); return false;" class="pointer"><span class="faicon file-import"></span> ';
+ echo $lang['srv_question_fastadd'].'&nbsp;';
+ echo '</span>';
+
+ echo Help::display('srv_question_fastadd');
+ }
+ else{
+ echo '<span onclick="vrednost_fastadd(\''.$this->spremenljivka.'\'); return false;" class="pointer"><span class="faicon file-import"></span> ';
+ echo $lang['srv_vrednost_fastadd'].'&nbsp;';
+ echo '</span>';
+
+ echo Help::display('srv_vrednost_fastadd');
+ }
+
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ // inline hitro dodajanje slik - zaenkrat samo radio in checkbox - v testiranju, zato samo za admine
+ if (in_array($row['tip'], array(1,2)) && $row['orientation'] == 1) {
+
+ $spremenljivkaParams = new enkaParameters($row['params']);
+ $quickImage = ($spremenljivkaParams->get('quickImage') ? $spremenljivkaParams->get('quickImage') : 0);
+
+ echo '<div class="vprasanje_setting_holder">';
- // inline urejanje variabel vrednosti
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" value="0" name="quickImage" />';
+ echo ' <input type="checkbox" id="quickImage" name="quickImage" value="1" '.($quickImage == 1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="quickImage" class="title">'.$lang['srv_edit_quick_image'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
+
+
+ // inline urejanje variabel vrednosti
if ( in_array($row['tip'], array(1,2,3))) {
$spremenljivkaParams = new enkaParameters($row['params']);
$grid_var = ($spremenljivkaParams->get('grid_var') ? $spremenljivkaParams->get('grid_var') : 0);
- echo '<p '.$displayNone.'><label for="grid_var" class="title">'.$lang['srv_edit_values'].':</label>';
- echo ' '.Help::display('srv_grid_var');
- echo '<span class="content">';
- echo '<span class="content"><input type="hidden" name="grid_var" value="0" />';
- echo '<input type="checkbox" id="grid_var" name="grid_var" value="1" '.($grid_var == 1 ? 'checked="checked"' : '').'></span></p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="grid_var" value="0" />';
+ echo ' <input type="checkbox" id="grid_var" name="grid_var" value="1" '.($grid_var == 1 ? 'checked="checked"' : '').'>';
+ echo ' <label for="grid_var" class="title">'.$lang['srv_edit_values'].' '.Help::display('srv_grid_var').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
// Obratni vrstni red vrednosti
if($row['tip'] == 1 || $row['tip'] == 3){
$reverse_var = ($spremenljivkaParams->get('reverse_var') ? $spremenljivkaParams->get('reverse_var') : 0);
-
- echo '<p '.$displayNone.'><label for="reverse_var" class="title">'.$lang['srv_reverse_values'].':</label>';
- echo '<span class="content">';
- echo '<span class="content"><input type="hidden" name="reverse_var" value="0" />';
- echo '<input type="checkbox" '.($reverse_var == '1' ? ' checked="checked" ': '').' value="1" id="reverse_var" name="reverse_var"></span></p>';
+
+ // ODSTRANJENO - ostane samo tam, kjer je vklopljeno zaradi kompatibilnosti za nazaj
+ if($reverse_var == '1'){
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="reverse_var" value="0" />';
+ echo ' <input type="checkbox" '.($reverse_var == '1' ? ' checked="checked" ': '').' value="1" id="reverse_var" name="reverse_var">';
+ echo ' <label for="reverse_var" class="title">'.$lang['srv_reverse_values'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
}
- }
-
- // besedilo za vsoto
- if ($row['tip'] == 18) {
- //echo '<div style="width:60%; height: 1px; border-top: 1px black solid;"></div>';
+ }
- if($row['vsota'] == '')
- $vsotaText = $lang['srv_vsota_text'];
- else
- $vsotaText = $row['vsota'];
-
- // echo '<p id="vrednost_'.$row['id'].'" class="vrednost_vsota">';
- // echo '<textarea name="vsota">'.$vsotaText.'</textarea>';
- // echo '</p>';
- }
+ // Prednastavljene vrednosti odgovorov (dropdown)
+ if ($row['tip'] == 1) {
- echo '<p '.$displayNone.'><span onclick="vrednost_fastadd(\''.$this->spremenljivka.'\'); return false;" class="pointer"><span class="sprites paste_word"></span> ';
+ $this->edit_random();
- if ( in_array($row['tip'], array(6, 16, 19, 20)) )
- echo $lang['srv_question_fastadd'].' '.Help::display('srv_question_fastadd');
- else
- echo $lang['srv_vrednost_fastadd'].' '.Help::display('srv_vrednost_fastadd');
+ echo '<div class="vprasanje_setting_holder">';
- echo '</span></p>';
+ echo ' <div class="vprasanje_setting_line half-half radio_defaults_class">';
+ echo ' <label>'.$lang['srv_defaultGrid'].':</label>';
+ echo ' <span class="content"><select name="radio_defaults" id="radio_defaults">';
+ echo ' <option value="0">'.$lang['s_without'].'</option>';
+ foreach($default_grid_values AS $key => $value){
+ echo ' <option value="'.$key.'">'.$value['name'].'</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
-
- // inline hitro dodajanje slik - zaenkrat samo radio in checkbox - v testiranju, zato samo za admine
- if (in_array($row['tip'], array(1,2)) && $row['orientation'] == 1) {
-
- $spremenljivkaParams = new enkaParameters($row['params']);
- $quickImage = ($spremenljivkaParams->get('quickImage') ? $spremenljivkaParams->get('quickImage') : 0);
-
- echo '<p><label for="quickImage" class="title">'.$lang['srv_edit_quick_image'].':</label>';
- echo '<span class="content">';
- echo '<span class="content"><input type="hidden" value="0" name="quickImage" />';
- echo '<input type="checkbox" id="quickImage" name="quickImage" value="1" '.($quickImage == 1 ? ' checked="checked"' : '').'></span></p>';
- }
+ echo '</div>';
+ }
}
/**
@@ -2445,9 +2608,6 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
if ($row['tip'] <= 3) {
-
- //echo '<p class="vrednost_new">';
- echo '<p>';
//dodatne missing vrednosti (ne vem, zavrnil...)
# preberemo iz class.SurveyMissingValues
@@ -2461,27 +2621,29 @@ class Vprasanje {
while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
$already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov'];
}
- //echo '<span class="floatRight">';
+
+
if (count($missing_values) > 0) {
-
+
+ echo '<div id="missing_settings_holder">';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line inline">';
foreach ($missing_values AS $mv_key => $mv_text) {
- echo '<span class="floatLeft">';
- echo '<input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
- echo '<label for="missing_value_'.$mv_key.'" class="pointer">'. $mv_text . '</label> ';
- //echo '<br/>';
- echo '</span>';
+ echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked);" id="missing_value_'.$mv_key.'">';
+ echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'. $mv_text . '</label> ';
}
+ echo ' </div>';
+
+ echo '</div>';
+
+ // naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
+ if ($row['tip'] <= 2)
+ $this->edit_alert_show_missing();
+
+ echo '</div>';
}
- //echo '</span>';
-
- echo '<span class="clr"></span>';
-
- //echo '</p></div>';
- echo '</p>';
-
- // naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
- if ($row['tip'] <= 2)
- $this->edit_alert_show_missing();
}
}
@@ -2540,15 +2702,14 @@ class Vprasanje {
}
switch ($row['random']) {
- //case 0 : echo $lang['srv_random_off'];
- //break;
case 1 : echo ' '.$lang['srv_random_on'];
break;
+
case 2 : echo ' '.$lang['srv_sort_asc'];
break;
+
case 3 : echo ' '.$lang['srv_sort_desc'];
break;
-
}
}
@@ -2598,24 +2759,30 @@ class Vprasanje {
echo '<div class="popup_close"><a href="#" onClick="vrednost_cancel(); return false;">✕</a></div>';
echo '<h2>'.$lang['srv_kategorije_odgovorov_title'].'</h2>';
-
- echo '<div class="left-float"><span class="title">'.(in_array($rows['tip'], array(2,6,16,19,20))?$lang['srv_spremenljivka']:$lang['srv_vrednost']).':</span> <input type="text" name="vrednost_variable" value="'.$row['variable'].'" '.(in_array($rows['tip'], array(2,6,16,19,20)) ? ' onkeyup="vprasanje_check_variable(this);"' : '').'></div>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.(in_array($rows['tip'], array(2,6,16,19,20))?$lang['srv_spremenljivka']:$lang['srv_vrednost']).':</span>';
+ echo '<input type="text" class="text large w200" name="vrednost_variable" value="'.$row['variable'].'" '.(in_array($rows['tip'], array(2,6,16,19,20)) ? ' onkeyup="vprasanje_check_variable(this);"' : '').'>';
+ echo '</div>';
// RAZVRSTI odgovore
- echo '<div class="left-float"><span class="title">'.$lang['sort'].':</span> ';
- echo '<select name="vrednost_random">';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['sort'].':</span>';
+
+ echo '<select class="dropdown large w200" name="vrednost_random">';
echo '<option value="0"'.($row['random']==0?' selected':'').'>'.$lang['srv_random_off2'].'</option>';
echo '<option value="1"'.($row['random']==1?' selected':'').'>'.$lang['srv_random_on2'].'</option>';
echo '<option value="2"'.($row['random']==2?' selected':'').'>'.$lang['srv_sort_asc2'].'</option>';
echo '<option value="3"'.($row['random']==3?' selected':'').'>'.$lang['srv_sort_desc2'].'</option>';
echo '</select>';
- echo '</div>';
+
+ echo '</div>';
- echo '<div style="clear:both;"></div>';
-
- echo '<div>'.$lang['srv_vprasanje_text'].' <span onmouseover="$(this).hide(); create_editor(\'vrednost_naslov\');" class="red pointer"> - '.$lang['srv_editor'].'</span>: <textarea id="vrednost_naslov" name="vrednost_naslov" style="width:99%">'.$row['naslov'].'</textarea></div>';
+ echo '<div><p class="bottom4">'.$lang['srv_vprasanje_text'].'<span onmouseover="$(this).hide(); create_editor(\'vrednost_naslov\');" class="pointer"> - '.$lang['srv_editor'].'</span>:</p>';
+
+ echo '<textarea class="top0" id="vrednost_naslov" name="vrednost_naslov" style="width:99%">'.$row['naslov'].'</textarea></div>';
- echo '<p>';
+ echo '<p class="top16">';
if ($row['if_id'] > 0) {
echo $lang['srv_podif_edit'].': ';
echo '<a href="#" onclick="vrednost_condition_editing(\''.$vrednost.'\'); return false;">';
@@ -2624,17 +2791,14 @@ class Vprasanje {
echo '</a>';
} else {
echo $lang['srv_podif_new'].': ';
- echo '<span class="faicon odg_if_not inline inline_if_not" onclick="vrednost_condition_editing(\''.$vrednost.'\'); return false;" title="'.$lang['srv_podif_edit'].'" style="cursor: pointer;"></span>';
+ echo '<span class="faicon odg_if_not inline inline_if_not blue pointer" onclick="vrednost_condition_editing(\''.$vrednost.'\'); return false;" title="'.$lang['srv_podif_edit'].'"></span>';
}
echo '</p>';
-
- echo '<span class="buttonwrapper spaceLeft floatRight">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="vrednost_save(\''.$vrednost.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
-
- echo '<span class="buttonwrapper spaceLeft floatRight">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></a>'."\n\r";
- echo '</span>';
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" onClick="vrednost_cancel(); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo ' <button class="medium blue" onclick="vrednost_save(\''.$vrednost.'\'); return false;">'.$lang['srv_potrdi'].'</button>';
+ echo '</div>';
}
echo '</form>';
@@ -2687,19 +2851,19 @@ class Vprasanje {
$lang_id = $_POST['lang_id'];
$spr_id = $_POST['spr_id'];
- //$sql = sisplet_query("SELECT * FROM srv_vrednost WHERE id = '$vrednost'");
$sql = sisplet_query("SELECT id, tip, enota, params, orientation, design FROM srv_spremenljivka WHERE id = '$spr_id'");
$row = mysqli_fetch_array($sql);
$spremenljivkaParams = new enkaParameters($row['params']);
$hotspot_image = ($spremenljivkaParams->get('hotspot_image') ? $spremenljivkaParams->get('hotspot_image') : "");
- //$rows = Cache::srv_spremenljivka($row['spr_id']);
if($row['tip'] == 1 || $row['tip'] == 2){
$enota_orientation = $row['orientation'];
- }else if($row['tip'] == 6){
+ }
+ else if($row['tip'] == 6){
$enota_orientation = $row['enota'];
- }else if($row['tip'] == 17){
+ }
+ else if($row['tip'] == 17){
$enota_orientation = $row['design'];
}
@@ -2712,24 +2876,22 @@ class Vprasanje {
//izris editorja s sliko
echo '<div><textarea id="hotspot_image" name="hotspot_image" style="width:99%">'.$hotspot_image.'</textarea></div>';
- //izris editorja s sliko - konec
echo '<br />';
-
- //gumb Potrdi
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="hotspot_image_save(\''.$row['id'].'\'); hotspot_image_resize(\''.$row['id'].'\'); show_hot_spot_settings_from_editor (\''.$row['id'].'\', \''.$enota_orientation.'\', \''.$row['tip'].'\'); hotspot_image_button_update(\''.$row['id'].'\', \''.$lang['srv_hot_spot_load_image'].'\', \''.$lang['srv_hot_spot_edit_image'].'\'); return false; "><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
- //gumb Potrdi - konec
+ //Gumba Potrdi in Zapri
+ echo '<div class="button_holder">';
+
+ //gumb Potrdi
+ echo '<button class="small white-blue" href="#" onclick="hotspot_image_save(\''.$row['id'].'\'); hotspot_image_resize(\''.$row['id'].'\'); show_hot_spot_settings_from_editor (\''.$row['id'].'\', \''.$enota_orientation.'\', \''.$row['tip'].'\'); hotspot_image_button_update(\''.$row['id'].'\', \''.$lang['srv_hot_spot_load_image'].'\', \''.$lang['srv_hot_spot_edit_image'].'\'); return false; "><span>'.$lang['srv_potrdi'].'</span></button>';
+
//gumb Zapri
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></a>'."\n\r";
- echo '</span>';
- //gumb Zapri - konec
+ echo '<button class="small blue" href="#" onclick="vrednost_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></button>'."\n\r";
+
+ echo '</div>';
+ //Gumba Potrdi in Zapri - konec
echo '</form>';
-
}
function hotspot_edit_regions () {
@@ -2749,23 +2911,20 @@ class Vprasanje {
$hotspot_image_height = $_POST['hotspot_image_height'];
$hotspot_image_width = $_POST['hotspot_image_width'];
$spr_id = $rows['id'];
- //$region_name = $_POST['region_name'];
- //echo $vrednost;
//poberi iz baze, kateri je zadnji vneseni indeks obmocja $last_hotspot_region_index
- //$sqlR = sisplet_query("SELECT * FROM srv_hotspot_regions WHERE spr_id = $spr_id order by region_index DESC LIMIT 1");
$sqlR = sisplet_query("SELECT region_index FROM srv_hotspot_regions WHERE spr_id = $spr_id order by region_index DESC LIMIT 1");
- //$sqlR2 = sisplet_query("SELECT * FROM srv_hotspot_regions WHERE spr_id = $spr_id AND vre_id = $vrednost");
$sqlR2 = sisplet_query("SELECT region_coords, region_name, region_index FROM srv_hotspot_regions WHERE spr_id = $spr_id AND vre_id = $vrednost");
- //$sqlR3 = sisplet_query("SELECT * FROM srv_hotspot_regions WHERE spr_id= $spr_id ");
$sqlR3 = sisplet_query("SELECT region_coords, vre_id FROM srv_hotspot_regions WHERE spr_id= $spr_id ");
$rowR = mysqli_fetch_array($sqlR);
$rowR2 = mysqli_fetch_array($sqlR2);
+ $hotspot_image_coords = '';
if(mysqli_num_rows($sqlR) == 0){
$last_hotspot_region_index = -1;
- }else{
+ }
+ else{
$last_hotspot_region_index = $rowR['region_index'];
}
@@ -2773,105 +2932,94 @@ class Vprasanje {
$hotspot_image_coords = $rowR2['region_coords'];
$region_name = $rowR2['region_name'];
$hotspot_region_index = $rowR2['region_index'];
- }else{
+ }
+ else{
$region_name = "";
$hotspot_region_index = -2;
}
echo '<form name="hotspot_region_edit" onsubmit="hotspot_save_regions(); return false;">';
- //echo '$last_hotspot_region_index: '.$last_hotspot_region_index;
- //echo '$hotspot_region_index: '.$hotspot_region_index;
-
- echo '<input type="hidden" name="anketa" value="'.$this->anketa.'">';
- echo '<input type="hidden" name="spremenljivka" value="'.$row['spr_id'].'">';
- echo '<input type="hidden" name="vrednost" value="'.$vrednost.'">';
- echo '<input type="hidden" name="lang_id" value="'.$lang_id.'">';
- echo '<div><p id="slika_'.$row['spr_id'].'" style="width:99%; display: none;">'.$row['naslov'].'</p></div>';
-
- echo '<div id="slika_'.$row['spr_id'].'_container" >';
+ echo '<input type="hidden" name="anketa" value="'.$this->anketa.'">';
+ echo '<input type="hidden" name="spremenljivka" value="'.$row['spr_id'].'">';
+ echo '<input type="hidden" name="vrednost" value="'.$vrednost.'">';
+ echo '<input type="hidden" name="lang_id" value="'.$lang_id.'">';
- //********* za prikazovanje obstojecih obmocij @ urejanju/dodajanju novega obmocja ********
+ echo '<div><p id="slika_'.$row['spr_id'].'" style="width:99%; display: none;">'.$row['naslov'].'</p></div>';
+
+ echo '<div id="slika_'.$row['spr_id'].'_container" >';
- $findme = 'img';
- $pos = strpos($hotspot_image, $findme);
- if($pos === false) { //string NOT present
-
- }
- else { //string present
- $usemap = 'id="hotspot_'.$row['id'].'_image" usemap="#hotspot_'.$row['id'].'_usemap" style="z-index: 1; height:'.$hotspot_image_height.'px; width: '.$hotspot_image_width.'px; position: relative; top: 15px;"'; //z-index: 1, da bo slika pod canvas in prave dimenzije in na pravi poziciji
- //v $hotspot_image je potrebno dodati usemap="#hotspot_image_'.$row['id'].'" za identificiranje mape
- $hotspot_image = substr_replace($hotspot_image, $usemap, 5, 0); //dodaj zeleni string v $hotspot_image
- }
-
- //prikaz slike
- echo $hotspot_image;
-
- //ureditev map
- if(mysqli_num_rows($sqlR3) != 0){ //ce je kaksno obmocje v bazi
- echo '<map id="hotspot_'.$row['id'].'_map" name="hotspot_'.$row['id'].'_usemap">';
- while ($rowR3 = mysqli_fetch_array($sqlR3)) {
- echo '<area coords="'.$rowR3['region_coords'].'" name="'.$rowR3['vre_id'].'" shape="poly" href="#">';
- }
- echo '</map>';
- }
-
- ?>
- <script>
- $(document).ready(function () {
- mapinit_editor(<?=$row['id']?>); //uredi delovanje imagemapster in prikazovanja obmocij ter tooltip-ov
- });
- </script>
- <?
-
- //********* za prikazovanje obstojecih obmocij @ urejanju/dodajanju novega obmocja - konec *********
-
- echo '<div style="clear:both;"></div>';
-
- echo '
- <script language="javascript" type="text/javascript" src="./script/jquery/jquery.canvasAreaDraw.js"></script>
- <textarea id="hotspot_region_coords_'.$row['spr_id'].'" style="display: none;" rows=3 name="hotspot_region_coords_'.$row['spr_id'].'" class="canvas-area" disabled
- placeholder="Shape Coordinates"
- data-image-url="'.$src_image.'" data-canvas-id="canvas_'.$row['spr_id'].'" data-spr-id="'.$row['spr_id'].'" image-height="'.$hotspot_image_height.'" image-width="'.$hotspot_image_width.'" image-coords="'.$hotspot_image_coords.'" clear_button="'.$lang['srv_hotspot_clear_region_points'].'"></textarea>
- ';
-
- echo '</div>';
+ //********* za prikazovanje obstojecih obmocij @ urejanju/dodajanju novega obmocja ********
- echo '<br />';
-
+ $findme = 'img';
+ $pos = strpos($hotspot_image, $findme);
+ if($pos === false) { //string NOT present
+
+ }
+ else { //string present
+ $usemap = 'id="hotspot_'.$row['id'].'_image" usemap="#hotspot_'.$row['id'].'_usemap" style="z-index: 1; height:'.$hotspot_image_height.'px; width: '.
+ $hotspot_image_width.'px; position: relative; top: 0px;"'; //z-index: 1, da bo slika pod canvas in prave dimenzije in na pravi poziciji
+ //$hotspot_image_width.'px; position: relative; top: 15px;"'; //z-index: 1, da bo slika pod canvas in prave dimenzije in na pravi poziciji
+ //v $hotspot_image je potrebno dodati usemap="#hotspot_image_'.$row['id'].'" za identificiranje mape
+ $hotspot_image = substr_replace($hotspot_image, $usemap, 5, 0); //dodaj zeleni string v $hotspot_image
+ }
+
+ // prikaz slike
+ echo $hotspot_image;
+
+ // ureditev map
+ if(mysqli_num_rows($sqlR3) != 0){ //ce je kaksno obmocje v bazi
+ echo '<map id="hotspot_'.$row['id'].'_map" name="hotspot_'.$row['id'].'_usemap">';
+ while ($rowR3 = mysqli_fetch_array($sqlR3)) {
+ echo '<area coords="'.$rowR3['region_coords'].'" name="'.$rowR3['vre_id'].'" shape="poly" href="#">';
+ }
+ echo '</map>';
+ }
+
+ ?>
+ <script>
+ $(document).ready(function () {
+ mapinit_editor(<?=$row['id']?>); //uredi delovanje imagemapster in prikazovanja obmocij ter tooltip-ov
+ });
+ </script>
+ <?
+
+ //********* za prikazovanje obstojecih obmocij @ urejanju/dodajanju novega obmocja - konec *********
- //polje za vnos imena obmocja
- echo '<span class="buttonwrapper spaceRight">';
- echo $lang['srv_hot_spot_region_name'].': ';
- echo '<input name="hotspot_region_name" value="'.$region_name.'">';
- echo '</span>';
- //polje za vnos imena obmocja - konec
-
- echo '<br />';
- echo '<br />';
-
+ echo '<div style="clear:both;"></div>';
+
+ echo '
+ <script language="javascript" type="text/javascript" src="./script/jquery/jquery.canvasAreaDraw.js"></script>
+ <textarea id="hotspot_region_coords_'.$row['spr_id'].'" style="display: none;" rows=3 name="hotspot_region_coords_'.$row['spr_id'].'" class="canvas-area" disabled
+ placeholder="Shape Coordinates"
+ data-image-url="'.$src_image.'" data-canvas-id="canvas_'.$row['spr_id'].'" data-spr-id="'.$row['spr_id'].'" image-height="'.$hotspot_image_height.'" image-width="'.$hotspot_image_width.'" image-coords="'.$hotspot_image_coords.'" clear_button="'.$lang['srv_hotspot_clear_region_points'].'"></textarea>
+ ';
+
+ echo '</div>';
- //gumb Potrdi
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="hotspot_save_regions('.$row['spr_id'].', '.$last_hotspot_region_index.', '.$vrednost.', '.$hotspot_region_index.'); return false; "><span>'.$lang['srv_potrdi'].'</span></a>';
- echo '</span>';
- //gumb Potrdi - konec
+ echo '<br />';
+
+ //polje za vnos imena obmocja
+ echo $lang['srv_hot_spot_region_name'].': ';
+ echo '<input name="hotspot_region_name" value="'.$region_name.'">';
+
+ //Gumba Potrdi in Zapri
+ echo '<div class="button_holder">';
+ // gumb Potrdi
+ echo '<button class="small white-blue" href="#" onclick="hotspot_save_regions('.$row['spr_id'].', '.$last_hotspot_region_index.', '.$vrednost.', '.$hotspot_region_index.'); return false; "><span>'.$lang['srv_potrdi'].'</span></button>';
- //gumb Zapri - konec
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="hotspot_region_cancel('.$row['spr_id'].', '.$vrednost.'); vrednost_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></a>'."\n\r";
- echo '</span>';
- //gumb Zapri - konec
+ // gumb Zapri - konec
+ echo '<button class="small blue" href="#" onclick="hotspot_region_cancel('.$row['spr_id'].', '.$vrednost.'); vrednost_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></button>'."\n\r";
+
+ echo '</div>';
+ //Gumba Potrdi in Zapri - konec
+
+ // tekst z navodili
+ echo '<br />'.$lang['srv_hotspot_edit_region_msg'];
+ echo '<div id="hotspot_tips_'.$row['spr_id'].'" style="display:none">'.$lang['srv_hotspot_edit_region_tip_delete'].' <br />'.$lang['srv_hotspot_edit_region_tip_move'].'</div>';
+ // tekst z navodili - konec
- //tekst z navodili
- echo '<br />';
- echo '<br />'.$lang['srv_hotspot_edit_region_msg'];
- echo '<div id="hotspot_tips_'.$row['spr_id'].'" style="display:none">'.$lang['srv_hotspot_edit_region_tip_delete'].' <br />
- '.$lang['srv_hotspot_edit_region_tip_move'].'</div>';
- //tekst z navodili - konec
-
-
echo '</form>';
}
@@ -2882,10 +3030,11 @@ class Vprasanje {
function vrednost_fastadd() {
global $lang;
- echo '<h2>'.$lang['srv_vrednost_fastadd'].'</h2>';
+ echo '<h2><span class="faicon blue flipX file-import"></span>'.$lang['srv_vrednost_fastadd'].'</h2>';
echo '<div class="popup_close"><a href="#" onClick="vrednost_cancel(); return false;">✕</a></div>';
+
echo '<form name="vrednost_fastadd_form" onsubmit="vrednost_fastadd_save(); return false;">';
echo '<input type="hidden" name="anketa" value="'.$this->anketa.'" />';
@@ -2894,77 +3043,73 @@ class Vprasanje {
echo '<p><textarea name="fastadd" style="width:99%; height:100px"></textarea></p>';
echo '<p>'.$lang['srv_vrednost_fastadd_txt'].'</p>';
-
- echo '<span class="buttonwrapper floatRight">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="vrednost_fastadd_save(\''.$this->spremenljivka.'\'); 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_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></a>'."\n\r";
- echo '</span>';
-
+
echo '</form>';
+
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" onclick="vrednost_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></a>'."\n\r";
+ echo ' <button class="medium blue" onclick="vrednost_fastadd_save(\''.$this->spremenljivka.'\'); return false;"><span>'.$lang['srv_potrdi'].'</span></a>';
+ echo '</div>';
+
?><script> $('textarea[name=fastadd]').focus(); </script><?php
}
- //editiranje vrednosti pri besedilu
- function edit_vrednost_besedilo(){
+ // editiranje missing vrednosti pri besedilu, stevilu in datumu
+ function edit_vrednost_missing(){
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
-
- $taSize = ($spremenljivkaParams->get('taSize') ? $spremenljivkaParams->get('taSize') : 1);
- $taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
-
- //default sirina
- if($taWidth == -1)
- $taWidth = 30;
-
- echo '<input type="hidden" name="edit_vrednost_besedilo" value="1" />';
-
- # manjkajoče vrednosti
- //dodatne missing vrednosti (ne vem, zavrnil...)
- # preberemo iz class.SurveyMissingValues
+
+ # preberemo missing vrednosti iz class.SurveyMissingValues - kateri so na voljo v anketi
$smv = new SurveyMissingValues($this->anketa);
- # katere missinge imamo na voljo
$missing_values = $smv->GetUnsetValuesForSurvey();
- #kateri missingi so nastavljeni
+ # kateri missingi so nastavljeni
$already_set_mv = array();
$sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_vrednost WHERE spr_id='".$this->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'];
}
-
+
- echo '<p>';
+ if($row['tip'] == '7')
+ echo '<input type="hidden" name="edit_vrednost_number" value="1" />';
+ elseif($row['tip'] == '21')
+ echo '<input type="hidden" name="edit_vrednost_besedilo" value="1" />';
- if (count($missing_values) > 0) {
+
+ if (count($missing_values) > 0) {
+
+ echo '<div id="missing_settings_holder">';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line inline">';
foreach ($missing_values AS $mv_key => $mv_text) {
- echo '<input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
- echo '<label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
+ echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked);" id="missing_value_'.$mv_key.'">';
+ echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
}
+ echo ' </div>';
+
+ echo '</div>';
+
+ // naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
+ $this->edit_alert_show_missing();
+
+ echo '</div>';
}
- echo '</p>';
}
- //editiranje vrednosti pri number
+ // editiranje missing vrednosti pri number
function edit_vrednost_number(){
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
-
- $taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
- //default sirina
- if($taWidth == -1)
- $taWidth = 10;
-
- echo '<input type="hidden" name="edit_vrednost_number" value="1" />';
-
-
+
//dodatne missing vrednosti (ne vem, zavrnil...)
# preberemo iz class.SurveyMissingValues
$smv = new SurveyMissingValues($this->anketa);
@@ -2979,26 +3124,31 @@ class Vprasanje {
}
- echo '<p>';
+ echo '<input type="hidden" name="edit_vrednost_number" value="1" />';
if (count($missing_values) > 0) {
+
foreach ($missing_values AS $mv_key => $mv_text) {
- echo '<input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
- echo '<label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked);" id="missing_value_'.$mv_key.'">';
+ echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
}
- echo '</p>';
}
- //editiranje vrednosti pri datumu
+ // editiranje missing vrednosti pri datumu
function edit_vrednost_datum(){
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
-
- # manjkajoče vrednosti
-
+
//dodatne missing vrednosti (ne vem, zavrnil...)
# preberemo iz class.SurveyMissingValues
$smv = new SurveyMissingValues($this->anketa);
@@ -3013,16 +3163,19 @@ class Vprasanje {
}
- echo '<p>';
-
if (count($missing_values) > 0) {
foreach ($missing_values AS $mv_key => $mv_text) {
- echo '<input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
- echo '<label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked);" id="missing_value_'.$mv_key.'">';
+ echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
}
- echo '</p>';
-
}
function edit_grid_subtype(){
@@ -3031,69 +3184,100 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
$prikazi_vas_ali_slikovni_tip = 'show_custom_picture_radio(\''.$row['id'].'\', this.value);';
- echo '<p><span class="title">'.$lang['srv_orientacija'].':</span>';
- //echo '<span class="content"><select id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" name="enota" onChange="change_diferencial(\'' . $row['id'] . '\', this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_nastavitve_tabela_da_ne(\'' . $row['id'] . '\', this.value); max_diff_labels(\'' . $row['id'] . '\', this.value, \'' . $lang['srv_maxdiff_label1'] . '\',\'' . $lang['srv_maxdiff_label2'] . '\',\'' . $lang['srv_new_grid'] . '\'); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_drag_and_drop_new_look_option(\'' . $row['id'] . '\', this.value);">';
- echo '<span class="content"><select id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" name="enota" onChange="change_diferencial(\'' . $row['id'] . '\', this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_nastavitve_tabela_da_ne(\'' . $row['id'] . '\', this.value); max_diff_labels(\'' . $row['id'] . '\', this.value, \'' . $lang['srv_maxdiff_label1'] . '\',\'' . $lang['srv_maxdiff_label2'] . '\',\'' . $lang['srv_new_grid'] . '\'); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_drag_and_drop_new_look_option(\'' . $row['id'] . '\', this.value); '.$prikazi_vas_ali_slikovni_tip.'">';
-
- echo '<option value="0" '.(($row['enota'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_classic'].'</option>';
- //te izbire niso mozne pri multicheckboxu
- if($row['tip'] == 6){
- echo '<option value="1" '.(($row['enota'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_diferencial2'].'</option>';
- echo '<option value="2" '.(($row['enota'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_dropdown'].'</option>';
- echo '<option value="4" '.(($row['enota'] == 4) ? ' selected="true" ' : '').'>'.$lang['srv_one_against_another'].'</option>';
- echo '<option value="5" '.(($row['enota'] == 5) ? ' selected="true" ' : '').'>'.$lang['srv_max_diff'].'</option>';
- echo '<option value="8"' . ($row['enota'] == 8 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_tabela_da_ne'].'</option>';
- //echo '<option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_radio'].'</option>';
- //echo '<option value="9"' . ($row['enota'] == 9 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
- echo '<option value="10"' . ($row['enota'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>';
- echo '<option value="11"' . ($row['enota'] == 11 ? ' selected="true"' : '') . '>'.$lang['srv_visual_analog_scale'].'</option>';
- echo '<option value="12"' . ($row['enota'] == 12 ? ' selected="true"' : '') . '>'.$lang['srv_custom-picture_radio'].'</option>';
- }
-
- # dvonji grid je na voljo samo za mgrid, dokler se ne uredi še za checkbox - CHECKBOX DELA VREDU?
- //if($row['tip'] == 6){
- echo '<option value="3" '.(($row['enota'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_double_grid'].'</option>';
- echo '<option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_radio'].'</option>';
- echo '<option value="9"' . ($row['enota'] == 9 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
- //}
- if ($admin_type == 0){
- //echo '<option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_radio'].'</option>';
- //echo '<option value="9"' . ($row['enota'] == 9 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
- if($row['tip'] == 6){
- //echo '<option value="10"' . ($row['enota'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>';
- }
- }
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+ echo ' <label>'.$lang['srv_orientacija'].':</label>';
+
+ echo ' <span class="content"><select id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" name="enota"
+ onChange="changeGridAlign(\'' . $row['id'] . '\', this.value);
+ change_diferencial(\'' . $row['id'] . '\', this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');
+ show_nastavitve_tabela_da_ne(\'' . $row['id'] . '\', this.value);
+ max_diff_labels(\'' . $row['id'] . '\', this.value, \'' . $lang['srv_maxdiff_label1'] . '\',\'' . $lang['srv_maxdiff_label2'] . '\',\'' . $lang['srv_new_grid'] . '\');
+ show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');
+ show_drag_and_drop_new_look_option(\'' . $row['id'] . '\', this.value);'.$prikazi_vas_ali_slikovni_tip.'">';
+ echo ' <option value="0" '.(($row['enota'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_classic'].'</option>';
+
+ //te izbire niso mozne pri multicheckboxu
+ if($row['tip'] == 6){
+ echo ' <option value="1" '.(($row['enota'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_diferencial2'].'</option>';
+ echo ' <option value="2" '.(($row['enota'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_dropdown'].'</option>';
+ echo ' <option value="4" '.(($row['enota'] == 4) ? ' selected="true" ' : '').'>'.$lang['srv_one_against_another'].'</option>';
+ echo ' <option value="5" '.(($row['enota'] == 5) ? ' selected="true" ' : '').'>'.$lang['srv_max_diff'].'</option>';
+ echo ' <option value="8"' . ($row['enota'] == 8 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_tabela_da_ne'].'</option>';
+ echo ' <option value="10"' . ($row['enota'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>';
+ echo ' <option value="11"' . ($row['enota'] == 11 ? ' selected="true"' : '') . '>'.$lang['srv_visual_analog_scale'].'</option>';
+ echo ' <option value="12"' . ($row['enota'] == 12 ? ' selected="true"' : '') . '>'.$lang['srv_custom-picture_radio'].'</option>';
+ }
+
+ # dvonji grid je na voljo samo za mgrid, dokler se ne uredi še za checkbox - CHECKBOX DELA VREDU?
+ echo ' <option value="3" '.(($row['enota'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_double_grid'].'</option>';
+ echo ' <option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_radio'].'</option>';
+ echo ' <option value="9"' . ($row['enota'] == 9 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
- echo '</select>';
- echo '</span></p>';
+ echo ' </select>';
+ echo ' </div>';
+
+ echo '</div>';
}
+ // Prilagojen multigrid
function edit_grid_dynamic () {
global $lang;
+ global $site_url;
$row = Cache::srv_spremenljivka($this->spremenljivka);
+ $spremenljivkaParams = new enkaParameters($row['params']);
- // dinamicen multigrid
- if($row['tip'] == 6){
- echo '<p><label class="title">'.$lang['srv_dynamic_multigrid'].':</label>';
- echo '<span class="content"><input type="hidden" name="dynamic_mg" value="0" />';
+ echo '<div class="vprasanje_setting_holder">';
- echo '<select id="dynamic_mg" name="dynamic_mg" onChange="onchange_submit_show(this.value);">';
- echo '<option value="0" '.(($row['dynamic_mg'] == 0) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
- echo '<option value="1" '.(($row['dynamic_mg'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_orientacija_horizontalna_3'].'</option>';
- echo '<option value="3" '.(($row['dynamic_mg'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_orientacija_horizontalna_3'].'_2</option>';
- echo '<option value="5" '.(($row['dynamic_mg'] == 5) ? ' selected="true" ' : '').'>'.$lang['srv_orientacija_horizontalna_3'].'_3</option>';
- echo '<option value="2" '.(($row['dynamic_mg'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_orientacija_vertikalna'].'</option>';
- echo '<option value="4" '.(($row['dynamic_mg'] == 4) ? ' selected="true" ' : '').'>'.$lang['srv_orientacija_vertikalna'].'_2</option>';
- echo '<option value="6" '.(($row['dynamic_mg'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_orientacija_vertikalna'].'_3</option>';
- echo '</select>';
-
- //echo '<input type="checkbox" id="dynamic_mg" name="dynamic_mg" value="1" '.($row['dynamic_mg'] == '1' ?' checked' : '').'></span>';
- echo '</span></p>';
- }
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+
+ echo ' <label>'.$lang['srv_table_settings_pc_table'].':</label>';
+
+ $pc_tables = $spremenljivkaParams->get('pc_tables','-1');
+
+ echo ' <span class="content">';
+ echo ' <select id="pc_tables" name="pc_tables" onChange="onchange_submit_show(this.value);">';
+ echo ' <option value="-1" '.(($pc_tables == -1) ? ' selected="true" ' : '').'>'.$lang['default'].'</option>';
+ echo ' <option value="0" '.(($pc_tables == 0) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_0'].'</option>';
+ echo ' <option value="1" '.(($pc_tables == 1) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_1'].'</option>';
+ echo ' <option value="2" '.(($pc_tables == 2) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_2'].'</option>';
+ echo ' <option value="3" '.(($pc_tables == 3) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_3'].'</option>';
+ echo ' </select>';
+ echo ' </span>';
+
+ echo ' </div>';
+
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+
+ echo ' <label>'.$lang['srv_table_settings_mobile_table'].':</label>';
+
+ $mobile_tables = $spremenljivkaParams->get('mobile_tables','-1');
+
+ echo ' <span class="content">';
+ echo ' <select id="mobile_tables" name="mobile_tables" onChange="onchange_submit_show(this.value);">';
+ echo ' <option value="-1" '.(($mobile_tables == -1) ? ' selected="true" ' : '').'>'.$lang['default'].'</option>';
+ echo ' <option value="0" '.(($mobile_tables == 0) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_0'].'</option>';
+ echo ' <option value="1" '.(($mobile_tables == 1) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_1'].'</option>';
+ echo ' <option value="2" '.(($mobile_tables == 2) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_2'].'</option>';
+ echo ' <option value="3" '.(($mobile_tables == 3) ? ' selected="true" ' : '').'>'.$lang['srv_settings_mobile_tables_3'].'</option>';
+ echo ' </select>';
+ echo ' </span>';
+
+ echo ' </div>';
+
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <a href="'.$site_url.'admin/survey/index.php?anketa='.$this->anketa.'&a=table_settings">'.$lang['srv_table_settings_global'].'</a>';
+ echo ' </div>';
+
+
+ echo '</div>';
}
// nastavitev reminderja
@@ -3102,14 +3286,33 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_reminder'].':</span>';
- echo '<span class="content"><select name="reminder" id="reminder" onChange="show_alert_missing();">';
- echo '<option value="0" '.(($row['reminder'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_off'].'</option>';
- echo '<option value="1" '.(($row['reminder'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_soft'].'</option>';
- echo '<option value="2" '.(($row['reminder'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_hard'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ /* echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_reminder'].':</label>';
+ echo ' <span class="content"><select name="reminder" id="reminder" onChange="show_alert_missing();">';
+ echo ' <option value="0" '.(($row['reminder'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_off'].'</option>';
+ echo ' <option value="1" '.(($row['reminder'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_soft'].'</option>';
+ echo ' <option value="2" '.(($row['reminder'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_hard'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>'; */
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="reminder" value="0" />';
+ echo ' <input type="checkbox" id="reminder" name="reminder" value="1" '.(($row['reminder'] != 0) ? ' checked="checked" ' : '').' onClick="show_reminders(this.checked);" onChange="show_alert_missing(\''.$this->spremenljivka.'\');"/>';
+ echo ' <label for="reminder" class="title">'.$lang['srv_reminder'].Help::display('spremenljivka_reminder').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ echo '<div id="reminders" class="vprasanje_setting_holder half-half" '.($row['reminder'] > 0 ? '' : ' style="display:none;"').'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" name="reminder" id="reminder_1" value="1" '.(($row['reminder'] == 1) ? ' checked="checked" ' : '').'" /><label for="reminder_1">'.$lang['srv_reminder_soft'].'</label>';
+ echo ' <input type="radio" name="reminder" id="reminder_2" value="2" '.(($row['reminder'] == 2) ? ' checked="checked" ' : '').'" /><label for="reminder_2" style="margin-right:0px">'.$lang['srv_reminder_hard'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// Nastavitev za naknaden prikaz odgovora ne vem
@@ -3160,23 +3363,29 @@ class Vprasanje {
$show['99'] = false;
}
- echo '<div id="alert_show_missing">';
-
- // Prikaz -97 (neustrezno) ob opozorilu
- echo '<p><label for="alert_show_97" class="title"><span id="alert_show_97_text" class="'.($show['97']?'':' gray').'">'.$lang['srv_alert_show_missing_97'].':</span></label> '.Help::display('srv_alert_show_97');
- echo '<span class="content"><input type="hidden" name="alert_show_97" value="0" />';
- echo '<input type="checkbox" id="alert_show_97" name="alert_show_97" value="1" '.($row['alert_show_97']=='1'?' checked':'').' '.($show['97'] ? '' : ' disabled="disabled"').'></span>';
- echo '</p>';
+
+ echo '<div id="alert_show_missing" class="vprasanje_setting_holder">';
+
+ // Prikaz -97 (neustrezno) ob opozorilu
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="alert_show_97" value="0" />';
+ echo ' <input type="checkbox" id="alert_show_97" name="alert_show_97" value="1" '.($row['alert_show_97']=='1'?' checked':'').' '.($show['97'] ? '' : ' disabled="disabled"').'>';
+ echo ' <label for="alert_show_97" class="title"><span id="alert_show_97_text" class="'.($show['97']?'':' gray').'">'.$lang['srv_alert_show_missing_97'].'</span> '.Help::display('srv_alert_show_97').'</label>';
+ echo ' </div>';
+
// Prikaz -98 (Zavrnil) ob opozorilu
- echo '<p><label for="alert_show_98" class="title"><span id="alert_show_98_text" class="'.($show['98']?'':' gray').'">'.$lang['srv_alert_show_missing_98'].':</span></label> '.Help::display('srv_alert_show_98');
- echo '<span class="content"><input type="hidden" name="alert_show_98" value="0" />';
- echo '<input type="checkbox" id="alert_show_98" name="alert_show_98" value="1" '.($row['alert_show_98']=='1'?' checked':'').' '.($show['98'] ? '' : ' disabled="disabled"').'></span>';
- echo '</p>';
- // Prikaz -99 (ne vem) ob opozorilu
- echo '<p><label for="alert_show_99" class="title"><span id="alert_show_99_text" class="'.($show['99']?'':' gray').'">'.$lang['srv_alert_show_missing'].':</span></label> '.Help::display('srv_alert_show_99');
- echo '<span class="content"><input type="hidden" name="alert_show_99" value="0" />';
- echo '<input type="checkbox" id="alert_show_99" name="alert_show_99" value="1" '.($row['alert_show_99']=='1'?' checked':'').' '.($show['99'] ? '' : ' disabled="disabled"').'></span>';
- echo '</p>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content"><input type="hidden" name="alert_show_98" value="0" />';
+ echo ' <input type="checkbox" id="alert_show_98" name="alert_show_98" value="1" '.($row['alert_show_98']=='1'?' checked':'').' '.($show['98'] ? '' : ' disabled="disabled"').'>';
+ echo ' <label for="alert_show_98" class="title"><span id="alert_show_98_text" class="'.($show['98']?'':' gray').'">'.$lang['srv_alert_show_missing_98'].'</span> '.Help::display('srv_alert_show_98').'</label>';
+ echo ' </div>';
+
+ // Prikaz -99 (ne vem) ob opozorilu
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content"><input type="hidden" name="alert_show_99" value="0" />';
+ echo ' <input type="checkbox" id="alert_show_99" name="alert_show_99" value="1" '.($row['alert_show_99']=='1'?' checked':'').' '.($show['99'] ? '' : ' disabled="disabled"').'>';
+ echo ' <label for="alert_show_99" class="title"><span id="alert_show_99_text" class="'.($show['99']?'':' gray').'">'.$lang['srv_alert_show_missing_99'].'</span> '.Help::display('srv_alert_show_99').'</label>';
+ echo ' </div>';
echo '</div>';
}
@@ -3193,20 +3402,19 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
-
- if ( in_array($row['tip'], array(6, 16, 19, 20)) )
- echo '<span class="title">'.$lang['srv_sort_grid'].': </span>';
- else
- echo '<span class="title">'.$lang['srv_sort'].': </span>';
-
- echo '<span class="content"><select name="random">';
- echo '<option value="0" '.(($row['random'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_random_off2'].'</option>';
- echo '<option value="1" '.(($row['random'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_random_on2'].'</option>';
- echo '<option value="2" '.(($row['random'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_sort_asc2'].'</option>';
- echo '<option value="3" '.(($row['random'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_sort_desc2'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.(in_array($row['tip'], array(6, 16, 19, 20)) ? $lang['srv_sort_grid'] : $lang['srv_sort_answers']).': </label>';
+ echo ' <span class="content"><select name="random">';
+ echo ' <option value="0" '.(($row['random'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_random_off2'].'</option>';
+ echo ' <option value="1" '.(($row['random'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_random_on2'].'</option>';
+ echo ' <option value="2" '.(($row['random'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_sort_asc2'].'</option>';
+ echo ' <option value="3" '.(($row['random'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_sort_desc2'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev stevila stolpcev v prikazu
@@ -3221,16 +3429,20 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$stolpci = ($spremenljivkaParams->get('stolpci') ? $spremenljivkaParams->get('stolpci') : 1);
- echo '<p><span class="title">'.$lang['srv_stolpci'].': </span>';
- echo '<span class="content"><select name="stolpci">';
- echo '<option value="1" '.(($stolpci == 1) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
- echo '<option value="2" '.(($stolpci == 2) ? ' selected="true" ' : '').'>2</option>';
- echo '<option value="3" '.(($stolpci == 3) ? ' selected="true" ' : '').'>3</option>';
- echo '<option value="4" '.(($stolpci == 4) ? ' selected="true" ' : '').'>4</option>';
- echo '<option value="5" '.(($stolpci == 5) ? ' selected="true" ' : '').'>5</option>';
- echo '</select></span>';
- echo '</p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_stolpci'].': </label>';
+ echo ' <span class="content"><select name="stolpci">';
+ echo ' <option value="1" '.(($stolpci == 1) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
+ echo ' <option value="2" '.(($stolpci == 2) ? ' selected="true" ' : '').'>2</option>';
+ echo ' <option value="3" '.(($stolpci == 3) ? ' selected="true" ' : '').'>3</option>';
+ echo ' <option value="4" '.(($stolpci == 4) ? ' selected="true" ' : '').'>4</option>';
+ echo ' <option value="5" '.(($stolpci == 5) ? ' selected="true" ' : '').'>5</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev skale
@@ -3239,23 +3451,14 @@ class Vprasanje {
$value = Common::getSpremenljivkaSkala($this->spremenljivka);
$row = Cache::srv_spremenljivka($this->spremenljivka);
- # v bazi je privzeto -1
- # skala - 1 Nominalna
- # skala - 0 Ordinalna - računamo povprečja
- //$display = (($row['tip'] == 6 && $row['enota'] == 8)) ? ' style="display:none;"' : '';
-
- //echo '<fieldset '.$display.'><legend>'.$lang['srv_measurment_scale'].' '.Help::display('srv_skala_edit').'</legend>';
- echo '<fieldset><legend>'.$lang['srv_measurment_scale'].' '.Help::display('srv_skala_edit').'</legend>';
-
- echo '<p>';
- echo '<input type="radio" name="skala" id="skala_0" value="0" '.(($value == 0 || $value == -1) ? ' checked="checked" ' : '').' onClick="show_scale_text(0)" /><label for="skala_0" class="spaceRight">'.$lang['srv_skala_0'].'</label>';
- echo '<input type="radio" name="skala" id="skala_1" value="1" '.(($value == 1) ? ' checked="checked" ' : '').' onClick="show_scale_text(1)" /><label for="skala_1">'.$lang['srv_skala_1'].'</label>';
- echo '</p>';
- echo '<span id="skala_text_ord" class="spaceLeft" '.($value==0 || $value == -1 ? '' : ' style="display:none;"').'>'.$lang['srv_measurment_scale_ord'].' '.Help::display('srv_skala_text_ord').'</span>';
- echo '<span id="skala_text_nom" class="spaceLeft" '.($value==1 ? '' : ' style="display:none;"').'>'.$lang['srv_measurment_scale_nom'].' '.Help::display('srv_skala_text_nom').'</span>';
-
- echo '</fieldset>';
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="skala" value="1">';
+ echo ' <input type="checkbox" id="_skala" name="skala" value="0" '.(($value == '1') ? '' : ' checked="checked" ').'>';
+ echo ' <label for="_skala" class="title">'.$lang['srv_measurment_scale_ord2'].' '.Help::display('srv_skala_edit').'</label>';
+ echo ' </div>';
+ echo '</div>';
}
// prikaz checkboxa
@@ -3264,16 +3467,18 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<label for="checkboxhide" class="title">'.$lang['srv_checkboxhide_enabled'].':</label>';
- //echo '<input type="radio" name="checkboxhide" value="1" '.(($row['checkboxhide'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'];
- //echo '<input type="radio" name="checkboxhide" value="0" '.(($row['checkboxhide'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'];
- echo '<span class="content"><input type="hidden" name="checkboxhide" value="1" />';
- echo '<input type="checkbox" id="checkboxhide" name="checkboxhide" value="0" '.(($row['checkboxhide'] == 0) ? ' checked="checked" ' : '').' />';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="checkboxhide" value="1" />';
+ echo ' <input type="checkbox" id="checkboxhide" name="checkboxhide" value="0" '.(($row['checkboxhide'] == 0) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="checkboxhide">'.$lang['srv_checkboxhide_enabled'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
- //bivsa edit_checkbox_limit()
+ // bivsa edit_checkbox_limit()
function edit_checkbox_max_limit() {
global $lang;
@@ -3285,15 +3490,19 @@ class Vprasanje {
$sqlc = sisplet_query("SELECT COUNT(*) AS count FROM srv_vrednost WHERE spr_id='$this->spremenljivka'");
$rowc = mysqli_fetch_array($sqlc);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_checkbox_max_limit'].':</span>';
- echo '<span class="content"><select name="checkbox_limit" id="checkbox_limit_'.$this->spremenljivka.'" onChange="checkCheckboxLimits(\'' . $row['id'] . '\', $(this).val(), \'checkbox_limit\');">';
- echo '<option value="0" '.(($checkbox_limit == 0) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_checkbox_max_limit'].':</label>';
+ echo ' <span class="content"><select name="checkbox_limit" id="checkbox_limit_'.$this->spremenljivka.'" onChange="checkCheckboxLimits(\'' . $row['id'] . '\', $(this).val(), \'checkbox_limit\');">';
+ echo ' <option value="0" '.(($checkbox_limit == 0) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
for ($i=1; $i<=$rowc['count']; $i++) {
- echo '<option value="'.$i.'" '.(($checkbox_limit == $i) ? ' selected="true" ' : '').'>'.$i.'</option>';
+ echo ' <option value="'.$i.'" '.(($checkbox_limit == $i) ? ' selected="true" ' : '').'>'.$i.'</option>';
}
- echo '</select></span>';
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
@@ -3307,18 +3516,21 @@ class Vprasanje {
$sqlc = sisplet_query("SELECT COUNT(*) AS count FROM srv_vrednost WHERE spr_id='$this->spremenljivka'");
$rowc = mysqli_fetch_array($sqlc);
- //$maxNumberOfAnswers = $rowc['count'] - 1;
$maxNumberOfAnswers = $rowc['count'];
- echo '<p>';
- echo '<span class="title">'.$lang['srv_checkbox_min_limit'].':</span>';
- echo '<span class="content"><select name="checkbox_min_limit" id="checkbox_min_limit_'.$this->spremenljivka.'" onChange="checkCheckboxLimits(\'' . $row['id'] . '\', $(this).val(), \'checkbox_min_limit\'); toggleCheckboxMinLimitReminder(\'' . $row['id'] . '\', $(this).val());">';
- echo '<option value="0" '.(($checkbox_min_limit == 0) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_checkbox_min_limit'].':</label>';
+ echo ' <span class="content"><select name="checkbox_min_limit" id="checkbox_min_limit_'.$this->spremenljivka.'" onChange="checkCheckboxLimits(\'' . $row['id'] . '\', $(this).val(), \'checkbox_min_limit\'); toggleCheckboxMinLimitReminder(\'' . $row['id'] . '\', $(this).val());">';
+ echo ' <option value="0" '.(($checkbox_min_limit == 0) ? ' selected="true" ' : '').'>'.$lang['no'].'</option>';
for ($i=1; $i<=$maxNumberOfAnswers; $i++) {
- echo '<option value="'.$i.'" '.(($checkbox_min_limit == $i) ? ' selected="true" ' : '').'>'.$i.'</option>';
+ echo ' <option value="'.$i.'" '.(($checkbox_min_limit == $i) ? ' selected="true" ' : '').'>'.$i.'</option>';
}
- echo '</select></span>';
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
$this->edit_reminder_min_checkbox($checkbox_min_limit);
}
@@ -3331,21 +3543,20 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$checkbox_min_limit_reminder = ($spremenljivkaParams->get('checkbox_min_limit_reminder') ? $spremenljivkaParams->get('checkbox_min_limit_reminder') : 0);
- if($checkbox_min_limit){
- $displayReminder = " ";
- }else{
- $displayReminder = "none";
- }
+ $displayReminder = ($checkbox_min_limit) ? '' : 'style="display:none"';
- echo '<p id="checkboxLimitReminder_'.$row['id'].'" style="display:'.$displayReminder.'">';
- echo '<span class="title">'.$lang['srv_checkbox_min_limit_reminder'].':</span>';
- //echo '<span class="content"><select name="reminder" id="reminder" onChange="show_alert_missing();">';
- echo '<span class="content"><select name="checkbox_min_limit_reminder" id="checkbox_min_limit_reminder">';
- echo '<option value="0" '.(($checkbox_min_limit_reminder == 0) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_off2'].'</option>';
- echo '<option value="1" '.(($checkbox_min_limit_reminder == 1) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_soft2'].'</option>';
- echo '<option value="2" '.(($checkbox_min_limit_reminder == 2) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_hard2'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div id="checkboxLimitReminder_'.$row['id'].'" class="vprasanje_setting_holder" '.$displayReminder.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_checkbox_min_limit_reminder'].':</label>';
+ echo ' <span class="content"><select name="checkbox_min_limit_reminder" id="checkbox_min_limit_reminder">';
+ echo ' <option value="0" '.(($checkbox_min_limit_reminder == 0) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_off2'].'</option>';
+ echo ' <option value="1" '.(($checkbox_min_limit_reminder == 1) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_soft2'].'</option>';
+ echo ' <option value="2" '.(($checkbox_min_limit_reminder == 2) ? ' selected="true" ' : '').'>'.$lang['srv_reminder_hard2'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// editiranje radio tipa (1) - navaden, horizontalen, dropdown, semanticni diferencial
@@ -3355,22 +3566,29 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title" >'.$lang['srv_orientacija'].': </span>';
- echo '<span class="content"><select name="orientation" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="getOrientation(this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_custom_picture_radio(\''.$row['id'].'\', this.value); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
- echo '<option value="1"' . ($row['orientation'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
- echo '<option value="7"' . ($row['orientation'] == 7 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna_2'].'</option>';
- echo '<option value="0"' . ($row['orientation'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna'].'</option>';
- echo '<option value="2"' . ($row['orientation'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna_2'].'</option>';
- echo '<option value="4"' . ($row['tip'] == 3 ? ' selected="true"' : '') . '>'.$lang['srv_dropdown'].'</option>';
- echo '<option value="6"' . ($row['orientation'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_select-box_radio'].'</option>';
- echo '<option value="8"' . ($row['orientation'] == 8 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
- echo '<option value="9"' . ($row['orientation'] == 9 ? ' selected="true"' : '') . '>'.$lang['srv_custom-picture_radio'].'</option>'; // Custom picture za radio tip
- echo '<option value="10"' . ($row['orientation'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>'; //image hotspot
- echo '<option value="11"' . ($row['orientation'] == 11 ? ' selected="true"' : '') . '>'.$lang['srv_visual_analog_scale'].'</option>'; //vizualna analaogna skala - smeški
- echo '<option value="5"' . ($row['hidden_default'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_potrditev'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+
+ echo ' <label>'.$lang['srv_orientacija'].': </label>';
+
+ echo ' <span class="content"><select name="orientation" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="getOrientation(this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_custom_picture_radio(\''.$row['id'].'\', this.value); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
+ echo ' <option value="1"' . ($row['orientation'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
+ echo ' <option value="7"' . ($row['orientation'] == 7 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna_2'].'</option>';
+ echo ' <option value="0"' . ($row['orientation'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna'].'</option>';
+ echo ' <option value="2"' . ($row['orientation'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna_2'].'</option>';
+ echo ' <option value="4"' . ($row['tip'] == 3 ? ' selected="true"' : '') . '>'.$lang['srv_dropdown'].'</option>';
+ echo ' <option value="6"' . ($row['orientation'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_select-box_radio'].'</option>';
+ echo ' <option value="8"' . ($row['orientation'] == 8 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
+ echo ' <option value="9"' . ($row['orientation'] == 9 ? ' selected="true"' : '') . '>'.$lang['srv_custom-picture_radio'].'</option>'; // Custom picture za radio tip
+ echo ' <option value="10"' . ($row['orientation'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>'; //image hotspot
+ echo ' <option value="11"' . ($row['orientation'] == 11 ? ' selected="true"' : '') . '>'.$lang['srv_visual_analog_scale'].'</option>'; //vizualna analaogna skala - smeški
+ echo ' <option value="5"' . ($row['hidden_default'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_potrditev'].'</option>';
+ echo ' </select></span>';
+
+ echo ' </div>';
+
+ echo '</div>';
}
// editiranje orientacije chackboxa
@@ -3380,24 +3598,26 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_orientacija'].':</span>';
- //echo '<span class="content"><select name="orientation" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="getOrientation(this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value);">';
- echo '<span class="content"><select name="orientation" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="getOrientation(this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
- echo '<option value="1"' . ($row['orientation'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
- echo '<option value="7"' . ($row['orientation'] == 7 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna_2'].'</option>';
- echo '<option value="0"' . ($row['orientation'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna'].'</option>';
- echo '<option value="2"' . ($row['orientation'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna_2'].'</option>';
- echo '<option value="6"' . ($row['orientation'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_select-box_check'].'</option>';
- echo '<option value="8"' . ($row['orientation'] == 8 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
- echo '<option value="10"' . ($row['orientation'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>'; //image hotspot
- if ($admin_type == 0){
- //echo '<option value="6"' . ($row['orientation'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_select-box_check'].'</option>';
+ echo '<div class="vprasanje_setting_holder">';
- }
- //echo '<option value="6"' . ($row['orientation'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_mutliselect-box'].'</option>';
- echo '</select>';
- echo '</span></p>';
+ echo ' <div class="vprasanje_setting_line right-190">';
+
+ echo ' <label>'.$lang['srv_orientacija'].':</label>';
+
+ echo ' <span class="content"><select name="orientation" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="getOrientation(this.value); show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_preset_value(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\'); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
+ echo ' <option value="1"' . ($row['orientation'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna'].'</option>';
+ echo ' <option value="7"' . ($row['orientation'] == 7 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_vertikalna_2'].'</option>';
+ echo ' <option value="0"' . ($row['orientation'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna'].'</option>';
+ echo ' <option value="2"' . ($row['orientation'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_orientacija_horizontalna_2'].'</option>';
+ echo ' <option value="6"' . ($row['orientation'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_select-box_check'].'</option>';
+ echo ' <option value="8"' . ($row['orientation'] == 8 ? ' selected="true"' : '') . '>'.$lang['srv_drag_drop'].'</option>';
+ echo ' <option value="10"' . ($row['orientation'] == 10 ? ' selected="true"' : '') . '>'.$lang['srv_hot_spot'].'</option>'; //image hotspot
+ echo ' </select>';
+ echo ' </span>';
+
+ echo ' </div>';
+
+ echo '</div>';
}
// navaden number ali slider
@@ -3406,20 +3626,18 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_number_insert'].':</span>';
- // //echo '<span class="content"><select name="ranking_k" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" class="no_submit" onchange="change_subtype_number(\''.$row['id'].'\');">';
- // echo '<span class="content"><select name="ranking_k" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" class="no_submit" onchange="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)">';
- // echo '<option value="0"' . ($row['ranking_k'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_0'].'</option>';
- // echo '<option value="1"' . ($row['ranking_k'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_1'].'</option>';
- // echo '</select>';
- //echo '<p>';
- echo '<span class="content">';
- echo '<input type="radio" name="ranking_k" id="select_num_0" value="0" '.(($row['ranking_k'] == 0) ? ' checked="checked" ' : '').' onClick="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)" /><label for="select_num_0">'.$lang['srv_number_insert_0_new'].'</label>';
- echo '<input type="radio" name="ranking_k" id="select_num_1" value="1" '.(($row['ranking_k'] == 1) ? ' checked="checked" ' : '').' onClick="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)"/><label for="select_num_1">'.$lang['srv_number_insert_1'].'</label>';
+ echo '<div class="vprasanje_setting_holder">';
- //echo '</p>';
- echo '</span></p>';
+ echo ' <div class="vprasanje_setting_line inline">';
+ echo ' <label>'.$lang['srv_number_insert'].':</label>';
+
+ echo ' <span class="content">';
+ echo ' <input type="radio" name="ranking_k" id="select_num_0" value="0" '.(($row['ranking_k'] == 0) ? ' checked="checked" ' : '').' onClick="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)" /><label for="select_num_0">'.$lang['srv_number_insert_0_new'].'</label>';
+ echo ' <input type="radio" name="ranking_k" id="select_num_1" value="1" '.(($row['ranking_k'] == 1) ? ' checked="checked" ' : '').' onClick="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)"/><label for="select_num_1">'.$lang['srv_number_insert_1'].'</label>';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// navaden number ali slider
@@ -3428,23 +3646,18 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_number_insert'].':</span>';
- // echo '<span class="content"><select name="ranking_k" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" class="no_submit" onchange="change_subtype_number(\''.$row['id'].'\');">';
- // echo '<option value="0"' . ($row['ranking_k'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_0'].'</option>';
- // echo '<option value="1"' . ($row['ranking_k'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_1'].'</option>';
- // echo '<option value="2"' . ($row['ranking_k'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_2'].'</option>';
- // echo '<option value="3"' . ($row['ranking_k'] == 3 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_3'].'</option>';
- // echo '<option value="4"' . ($row['ranking_k'] == 4 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_4'].'</option>';
- // echo '<option value="5"' . ($row['ranking_k'] == 5 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_5'].'</option>';
- // echo '<option value="6"' . ($row['ranking_k'] == 6 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_6'].'</option>';
- //echo '<option value="7"' . ($row['ranking_k'] == 7 ? ' selected="true"' : '') . '>'.$lang['srv_number_insert_7'].'</option>';
- //echo '</select>';
- //echo '</span></p>';
- echo '<input type="radio" name="ranking_k" value="0" '.(($row['ranking_k'] == 0) ? ' checked="checked" ' : '').' onChange="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)" /><label for="skala_0" class="spaceRight">'.$lang['srv_number_insert_0_new'].'</label>';
- echo '<input type="radio" name="ranking_k" value="1" '.(($row['ranking_k'] == 1) ? ' checked="checked" ' : '').' onChange="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)"/><label for="skala_1">'.$lang['srv_number_insert_1'].'</label>';
- echo '</p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_number_insert'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" name="ranking_k" id="select_num_0" value="0" '.(($row['ranking_k'] == 0) ? ' checked="checked" ' : '').' onChange="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)" /><label for="select_num_0" class="spaceRight">'.$lang['srv_number_insert_0_new'].'</label>';
+ echo ' <input type="radio" name="ranking_k" id="select_num_1" value="1" '.(($row['ranking_k'] == 1) ? ' checked="checked" ' : '').' onChange="change_subtype_number(\''.$row['id'].'\'); show_slider_prop(\''.$row['id'].'\',this.value)"/><label for="select_num_1">'.$lang['srv_number_insert_1'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// prikaz statistike
@@ -3453,13 +3666,15 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<label for="stat" class="title">'.$lang['srv_stat_on'].': '.Help::display('srv_statistika').'</label>';
- //echo '<span class="content"><input type="radio" name="stat" value="0" '.(($row['stat'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'];
- //echo '<input type="radio" name="stat" value="1" '.(($row['stat'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'];
- echo '<span class="content"><input type="hidden" name="stat" value="0" />';
- echo '<input type="checkbox" id="stat" name="stat" value="1" '.(($row['stat'] == 1) ? ' checked="checked" ' : '').' />';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="stat" value="0" />';
+ echo ' <input type="checkbox" id="stat" name="stat" value="1" '.(($row['stat'] == 1) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="stat">'.$lang['srv_stat_show'].' '.Help::display('srv_statistika').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// upload pri tekstovnem polju
@@ -3474,15 +3689,18 @@ class Vprasanje {
$disabled = ($row['signature']==1 || $captcha==1 || $emailVerify==1) ? ' disabled="disabled"' : '';
- echo '<p>';
- echo '<span class="title">'.$lang['srv_vprasanje_upload_type'].':</span>';
-
- //novo, dropdown s fotografijami onChange="change_upload(\'' . $row['id'] . '\', this.value);"
- echo '<span class="content"><select name="upload" id="spremenljivka_upload_' . $row['id'] . '" spr_id="'.$row['id'].'" '.$disabled.' onChange="textSubtypeToggle(\'upload\', this.value);">';
- echo ' <option value="0" '.(($row['upload'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_upload_no'].'</option>';
- echo ' <option value="1" '.(($row['upload'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_upload_yes'].'</option>';
- echo ' <option value="2" '.(($row['upload'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_upload_fotografija'].'</option></select>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_upload_type'].':</label>';
+ echo ' <span class="content"><select name="upload" id="spremenljivka_upload_' . $row['id'] . '" spr_id="'.$row['id'].'" '.$disabled.' onChange="textSubtypeToggle(\'upload\', this.value);">';
+ echo ' <option value="0" '.(($row['upload'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_upload_no'].'</option>';
+ echo ' <option value="1" '.(($row['upload'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_upload_yes'].'</option>';
+ echo ' <option value="2" '.(($row['upload'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_upload_fotografija'].'</option></select>';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// podpis pri tekstovnem polju
@@ -3502,16 +3720,20 @@ class Vprasanje {
$emailVerify = ($spremenljivkaParams->get('emailVerify') ? $spremenljivkaParams->get('emailVerify') : 0);
$disabled = ($row['upload']>0 || $captcha==1 || $emailVerify==1) ? ' disabled="disabled"' : '';
-
- echo '<p>';
- echo '<span class="title">'.$lang['srv_tip_standard_996'].':</span>';
-
- echo '<span class="content">';
- echo '<input type="radio" id="signature_'.$this->spremenljivka.'_0" name="signature" '.$disabled.' onclick="signatureProp('.$this->spremenljivka.'); textSubtypeToggle(\'signature\', this.value);" value="0" '.(($row['signature'] == 0) ? ' checked="checked" ' : '').' /><label for="signature_'.$this->spremenljivka.'_0">'.$lang['no1'].'</label>';
- echo '<input type="radio" id="signature_'.$this->spremenljivka.'" name="signature" '.$disabled.' onclick="signatureProp('.$this->spremenljivka.'); textSubtypeToggle(\'signature\', this.value);" value="1" '.(($row['signature'] == 1) ? ' checked="checked" ' : '').' /><label for="signature_'.$this->spremenljivka.'">'.$lang['yes'].'</label>';
- echo '</span>';
-
- echo '</p>';
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_tip_standard_996'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" id="signature_'.$this->spremenljivka.'_0" name="signature" '.$disabled.' onclick="signatureProp('.$this->spremenljivka.'); textSubtypeToggle(\'signature\', this.value);" value="0" '.(($row['signature'] == 0) ? ' checked="checked" ' : '').' /><label for="signature_'.$this->spremenljivka.'_0">'.$lang['no1'].'</label>';
+ echo ' <input type="radio" id="signature_'.$this->spremenljivka.'" name="signature" '.$disabled.' onclick="signatureProp('.$this->spremenljivka.'); textSubtypeToggle(\'signature\', this.value);" value="1" '.(($row['signature'] == 1) ? ' checked="checked" ' : '').' /><label for="signature_'.$this->spremenljivka.'">'.$lang['yes'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev timerja
@@ -3520,15 +3742,24 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<label for="_timer" class="title">Timer:</label>';
- echo '<span class="content"><input type="hidden" name="timer" value="0" />';
- echo '<input type="checkbox" id="_timer" name="timer" value="1" '.(($row['timer'] > 0) ? ' checked="checked" ' : '').' onchange="show_timer(this.value);" />';
- echo '</span></p>';
- echo '<p id="timer" '.(($row['timer'] == 0) ? 'style="display: none;"' : '').'>';
- echo '<span class="title">&nbsp;</span><span class="content">';
- echo '<select name="timer2">';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content"><input type="hidden" name="timer" value="0" />';
+ echo ' <input type="checkbox" id="_timer" name="timer" value="1" '.(($row['timer'] > 0) ? ' checked="checked" ' : '').' onchange="show_timer(this.value);" />';
+ echo ' <label for="_timer" class="title">'.$lang['srv_timer'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div id="timer" class="vprasanje_setting_holder" '.(($row['timer'] == 0) ? 'style="display: none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label></label>';
+
+ echo ' <span class="content"><select name="timer2">';
# od 1-15 mamo za vsako sekundo
for ($t = 1; $t <= 15; $t += 1){
@@ -3557,9 +3788,11 @@ class Vprasanje {
echo (bcmod($t, 60)) . $lang['srv_seconds'] . '';
echo '</option>';
}
+ echo ' </select></span>';
- echo '</select></span>';
- echo '</p>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev celih in decimalnih mest (number, multinumber, vsota)
@@ -3568,24 +3801,33 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<fieldset><legend>'.$lang['srv_num_limits'].'</legend>';
- echo '<p><span class="title">';
-
- echo $lang['srv_cela'].':</span><span class="content">';
- echo '<select name="cela">';
- for ($i = 1; $i <= 10; $i++)
- echo '<option value="' . $i . '"' . ($row['cela'] == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
- echo '</select></span>';
- echo '</p><p>';
- echo '<span class="title">'.$lang['srv_decimalna'].':</span><span class="content">';
- echo '<select name="decimalna">';
- for ($i = 0; $i <= 10; $i++)
- echo '<option value="' . $i . '"' . ($row['decimalna'] == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
- echo '</select></span>';
-
- echo '</p>';
- echo '</fieldset>';
-
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_cela'].':</label>';
+ echo ' <span class="content"><select name="cela">';
+ for ($i = 1; $i <= 10; $i++){
+ echo ' <option value="' . $i . '"' . ($row['cela'] == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_decimalna'].':</label>';
+ echo ' <span class="content"><select name="decimalna">';
+ for ($i = 0; $i <= 10; $i++){
+ echo ' <option value="' . $i . '"' . ($row['decimalna'] == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev za obliko generatorja imen
@@ -3595,15 +3837,21 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
// Design generatorja
- echo '<p><label class="title">'.$lang['srv_design'].':</label>';
- echo '<span class="content"><input type="hidden" name="sn_design" value="0" />';
- echo '<select id="spremenljivka_podtip_' . $row['id'] . '" name="sn_design" spr_id="'.$row['id'].'" onChange="show_SN_count(this.value)">';
- echo '<option value="0" '.(($row['design'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_1'].'</option>';
- echo '<option value="1" '.(($row['design'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_2'].'</option>';
- echo '<option value="2" '.(($row['design'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_3'].'</option>';
- echo '<option value="3" '.(($row['design'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_4'].'</option>';
- echo '</select>';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+ echo ' <label>'.$lang['srv_design'].':</label>';
+ echo ' <span class="content"><input type="hidden" name="sn_design" value="0" />';
+ echo ' <select id="spremenljivka_podtip_' . $row['id'] . '" name="sn_design" spr_id="'.$row['id'].'" onChange="show_SN_count(this.value)">';
+ echo ' <option value="0" '.(($row['design'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_1'].'</option>';
+ echo ' <option value="1" '.(($row['design'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_2'].'</option>';
+ echo ' <option value="2" '.(($row['design'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_3'].'</option>';
+ echo ' <option value="3" '.(($row['design'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_sn_design_4'].'</option>';
+ echo ' </select>';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitve za generator imen
@@ -3612,33 +3860,37 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
-
+
// Max odgovorov - samo pri 2. designu
- echo '<div id="SN_count" class="SN_hidable_settings" '.($row['design'] != 1 ? ' style="display:none;"' : '').'>';
-
- echo '<p><label class="title">'.$lang['srv_design_count'].':</label>';
- echo '<span class="content"><input type="hidden" name="size" value="0" />';
- echo '<select id="size" name="size">';
- for($i=1; $i<=20; $i++){
- echo '<option value="'.$i.'" '.(($row['size'] == $i) ? ' selected="true" ' : '').'>'.$i.'</option>';
- }
- echo '</select>';
- echo '</span></p>';
-
- echo '</div>';
+ echo '<div id="SN_count" class="vprasanje_setting_holder SN_hidable_settings" '.($row['design'] != 1 ? ' style="display:none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_design_count'].':</label>';
+ echo ' <span class="content"><input type="hidden" name="size" value="0" /><select id="size" name="size">';
+ for($i=1; $i<=20; $i++){
+ echo '<option value="'.$i.'" '.(($row['size'] == $i) ? ' selected="true" ' : '').'>'.$i.'</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
// Antonuccijev krog
- echo '<p><label class="title">'.$lang['srv_antonucci'].':</label>';
- echo '<span class="content"><input type="hidden" name="antonucci" value="0" />';
- echo '<select id="antonucci" name="antonucci">';
- echo '<option value="0" '.(($row['antonucci'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_none'].'</option>';
- echo '<option value="1" '.(($row['antonucci'] == 1) ? ' selected="true" ' : '').'>1.</option>';
- echo '<option value="2" '.(($row['antonucci'] == 2) ? ' selected="true" ' : '').'>2.</option>';
- echo '<option value="3" '.(($row['antonucci'] == 3) ? ' selected="true" ' : '').'>3.</option>';
- echo '</select>';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_antonucci'].':</label>';
+ echo ' <span class="content"><input type="hidden" name="antonucci" value="0" /><select id="antonucci" name="antonucci">';
+ echo ' <option value="0" '.(($row['antonucci'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_none'].'</option>';
+ echo ' <option value="1" '.(($row['antonucci'] == 1) ? ' selected="true" ' : '').'>1.</option>';
+ echo ' <option value="2" '.(($row['antonucci'] == 2) ? ' selected="true" ' : '').'>2.</option>';
+ echo ' <option value="3" '.(($row['antonucci'] == 3) ? ' selected="true" ' : '').'>3.</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
if($spremenljivkaParams->get('NG_cancelButton') == '1'){
@@ -3653,36 +3905,48 @@ class Vprasanje {
}
// Text za dodajanje nove osebe
- $addText = ($spremenljivkaParams->get('NG_addText') ? $spremenljivkaParams->get('NG_addText') : $lang['srv_NG_addText']);
- echo '<div id="SN_add_text" class="SN_hidable_settings" '.($row['design'] != 0 ? ' style="display:none;"' : '').'>';
-
- echo '<p>';
- echo $lang['srv_NG_addText_setting'] . ': <input type="text" name="NG_addText" value="' . $addText . '" size="30" />';
- echo '</p>';
+ $addText = ($spremenljivkaParams->get('NG_addText') ? $spremenljivkaParams->get('NG_addText') : $lang['srv_NG_addText']);
+
+ echo '<div id="SN_add_text" class="vprasanje_setting_holder SN_hidable_settings" '.($row['design'] != 0 ? ' style="display:none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_NG_addText_setting'].':</label>';
+ echo ' <span class="content"><input type="text" name="NG_addText" value="' . $addText . '" size="30" /></span>';
+ echo ' </div>';
echo '</div>';
// Pri vnosu stevila polj imamo opcijo za urejanje texta "Število polj za vnos"
$countText = ($spremenljivkaParams->get('NG_countText') ? $spremenljivkaParams->get('NG_countText') : $lang['srv_design_count']);
- echo '<div id="SN_count_text" class="SN_hidable_settings" '.($row['design'] != 3 ? ' style="display:none;"' : '').'>';
+
+ echo '<div id="SN_count_text" class="vprasanje_setting_holder SN_hidable_settings" '.($row['design'] != 3 ? ' style="display:none;"' : '').'>';
- echo '<p>';
- echo $lang['srv_NG_countText_setting'] . ': <input type="text" name="NG_countText" value="' . $countText . '" size="30" />';
- echo '</p>';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_NG_countText_setting'] . ':</label>';
+ echo ' <span class="content"><input type="text" name="NG_countText" value="' . $countText . '" size="30" /></span>';
+ echo ' </div>';
echo '</div>';
// Gumb za preskok generatorja imen
- echo '<p>';
-
- echo $lang['srv_NG_cancelText_setting'] . ': ';
- echo '<input type="radio" '.($cancelButton == 0 ? ' checked' : '').' name="NG_cancelButton" value="0" onClick="change_NG_cancelButton(this.value);">'.$lang['no'].'</input> ';
- echo '<input type="radio" '.($cancelButton == 1 ? ' checked' : '').' name="NG_cancelButton" value="1" onClick="change_NG_cancelButton(this.value);">'.$lang['yes'].'</input> ';
+ echo '<div class="vprasanje_setting_holder">';
- echo '&nbsp;&nbsp;&nbsp;<input type="text" '.$hidden.' name="NG_cancelText" id="NG_cancelText" value="' . $cancelText . '" size="30" />';
- echo '</p>';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_NG_cancelText_setting'] . ':</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="radio" '.($cancelButton == 0 ? ' checked' : '').' name="NG_cancelButton" value="0" onClick="change_NG_cancelButton(this.value);">'.$lang['no'].'</input> ';
+ echo ' <input type="radio" '.($cancelButton == 1 ? ' checked' : '').' name="NG_cancelButton" value="1" onClick="change_NG_cancelButton(this.value);">'.$lang['yes'].'</input> ';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="text" '.$hidden.' name="NG_cancelText" id="NG_cancelText" value="' . $cancelText . '" size="30" />';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev omejitve vnessenega stevila (number, vsota)
@@ -3692,156 +3956,256 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- //omejitev za number
+ // Omejitev za number
if($row['tip'] == 7 || $row['tip'] == 21){
- $onkeyup = $row['tip'] == 21 ? ' onkeyup="checkNumber(this, 4, 0, true);"' : '';
-
- echo '<fieldset><legend>'.$lang['srv_num_reminder'].'</legend>';
+
+ $onkeyup = $row['tip'] == 21 ? ' onkeyup="checkNumber(this, 4, 0, true);"' : '';
+
echo '<input type="hidden" name="edit_number_limit" value="1" />';
- echo '<p>';
- echo '<span class="clr" id="num_limit_label" '.($row['size']==2 ? '' : ' style="display:none;"').'>'.$lang['srv_num_field1'].':</span>';
- //spodnji limit
- echo '<input type="checkbox" value="1" id="num_useMin" name="num_useMin" '.($row['num_useMin']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'vsota_min\',this.checked)">';
- echo $lang['srv_num_min'] . '<input type="text" name="vsota_min" id="vsota_min"'.$onkeyup.' value="' . $row['vsota_min'] . '" size="8" '.($row['num_useMin'] == 0 ? ' disabled' : '').'></input> ';
- //zgornji limit
- echo '&nbsp;&nbsp;<input type="checkbox" value="1" id="num_useMax" name="num_useMax" '.($row['num_useMax']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'vsota_limit\',this.checked)">';
- echo $lang['srv_num_limit'] . '<input type="text" name="vsota_limit" id="vsota_limit"'.$onkeyup.' value="' . $row['vsota_limit'] . '" size="8" '.($row['num_useMax'] == 0 ? ' disabled' : '').'></input> ';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div id="num_limit_label" class="vprasanje_setting_line" '.($row['size']==2 ? '' : ' style="display:none;"').'>';
+ echo ' <span>'.$lang['srv_num_field1'].':</span>';
+ echo ' </div>';
+
+ // spodnji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <span class="content" onClick="num_limit(\'vsota_min\', \'num_useMin\')">';
+ echo ' <input type="checkbox" value="1" id="num_useMin" name="num_useMin" '.($row['num_useMin']==1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="num_useMin">'.$lang['srv_num_min'].'</label>';
+ echo ' </span>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="vsota_min" id="vsota_min"'.$onkeyup.' value="' . $row['vsota_min'] . '" size="8" '.($row['num_useMin'] == 0 ? ' disabled' : '').'></input>';
+ echo ' </span>';
+ echo ' </div>';
+
+ // zgornji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <span class="content" onClick="num_limit(\'vsota_limit\', \'num_useMax\')">';
+ echo ' <input type="checkbox" value="1" id="num_useMax" name="num_useMax" '.($row['num_useMax']==1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="num_useMax">'.$lang['srv_num_limit'].'</label>';
+ echo ' </span>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="vsota_limit" id="vsota_limit"'.$onkeyup.' value="' . $row['vsota_limit'] . '" size="8" '.($row['num_useMax'] == 0 ? ' disabled' : '').'></input> ';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
+
// Omejitve za 2. polje (ce ga imamo)
- echo '<div id="num_limit2" '.($row['size'] == 2 ? '' : ' style="display:none;"').'>';
- echo '<p>';
- echo '<span class="clr">'.$lang['srv_num_field2'].':</span>';
- //spodnji limit
- echo '<input type="checkbox" value="1" id="num_useMin2" name="num_useMin2" '.($row['num_useMin2']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'num_min2\',this.checked)">';
- echo $lang['srv_num_min'] . '<input type="text" name="num_min2" id="num_min2" value="' . $row['num_min2'] . '" size="8" '.($row['num_useMin2'] == 0 ? ' disabled' : '').'></input> ';
- //zgornji limit
- echo '&nbsp;&nbsp;<input type="checkbox" value="1" id="num_useMax2" name="num_useMax2" '.($row['num_useMax2']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'num_max2\',this.checked)">';
- echo $lang['srv_num_limit'] . '<input type="text" name="num_max2" id="num_max2" value="' . $row['num_max2'] . '" size="8" '.($row['num_useMax2'] == 0 ? ' disabled' : '').'></input> ';
- echo '</p>';
- echo '</div>';
+ echo '<div id="num_limit2" class="vprasanje_setting_holder"'.($row['size'] == 2 ? '' : ' style="display:none;"').'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span>'.$lang['srv_num_field2'].':</span>';
+ echo ' </div>';
+
+ // spodnji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <span class="content" onClick="num_limit(\'num_min2\', \'num_useMin2\')">';
+ echo ' <input type="checkbox" value="1" id="num_useMin2" name="num_useMin2" '.($row['num_useMin2']==1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="num_useMin2">'.$lang['srv_num_min'].'</label>';
+ echo ' </span>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="num_min2" id="num_min2" value="' . $row['num_min2'] . '" size="8" '.($row['num_useMin2'] == 0 ? ' disabled' : '').'></input> ';
+ echo ' </span>';
+ echo ' </div>';
+
+ // zgornji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <span class="content" onClick="num_limit(\'num_max2\', \'num_useMax2\')">';
+ echo ' <input type="checkbox" value="1" id="num_useMax2" name="num_useMax2" '.($row['num_useMax2']==1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="num_useMax2">'.$lang['srv_num_limit'].'</label>';
+ echo ' </span>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="num_max2" id="num_max2" value="' . $row['num_max2'] . '" size="8" '.($row['num_useMax2'] == 0 ? ' disabled' : '').'></input> ';
+ echo ' </span>';
+ echo ' </div>';
+
+ echo '</div>';
+
// prikaz omejitve
- echo '<p><span class="title"><label for="vsota_show">'.$lang['srv_num_limit_show'] . '</label></span><span class="content"><input type="checkbox" name="vsota_show" id="vsota_show" value="1" '.($row['vsota_show']==1?'checked':'').' /></span></p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" name="vsota_show" id="vsota_show" value="1" '.($row['vsota_show']==1?'checked':'').' />';
+ echo ' <label for="vsota_show">'.$lang['srv_num_limit_show'].'</label>';
+ echo ' </div>';
+
// opozorilo za preseg limita (mehko, trdo)
- echo '<p><span class="title">'.$lang['srv_num_limit_reminder'].': </span>';
- echo '<span class="content"><select name="vsota_reminder">';
- echo '<option value="0"' . ($row['vsota_reminder'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_off2'].'</option>';
- echo '<option value="1"' . ($row['vsota_reminder'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_soft2'].'</option>';
- echo '<option value="2"' . ($row['vsota_reminder'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_hard2'].'</option>';
- echo '</select></span></p>';
- echo '</fieldset>';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_limit_reminder'].': </label>';
+ echo ' <span class="content"><select name="vsota_reminder">';
+ echo ' <option value="0"' . ($row['vsota_reminder'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_off2'].'</option>';
+ echo ' <option value="1"' . ($row['vsota_reminder'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_soft2'].'</option>';
+ echo ' <option value="2"' . ($row['vsota_reminder'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_hard2'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// grid number
if ($row['tip'] == 20 && $row['ranking_k'] != 1) {
- // zaenkrat sam za slider
- //if ($row['ranking_k'] != 1) return;
-
- echo '<fieldset><legend>'.$lang['srv_num_reminder'].'</legend>';
+ // zaenkrat sam za slider
echo '<input type="hidden" name="edit_number_limit" value="1" />';
- echo '<p>';
- echo '<span class="clr" id="num_limit_label" '.($row['size']==2 ? '' : ' style="display:none;"').'>'.$lang['srv_num_field1'].':</span>';
- //spodnji limit
- echo '<input type="checkbox" value="1" id="num_useMin" name="num_useMin" '.($row['num_useMin']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'vsota_min\',this.checked)">';
- echo $lang['srv_num_min'] . '<input type="text" name="vsota_min" id="vsota_min" value="' . $row['vsota_min'] . '" size="8" '.($row['num_useMin'] == 0 ? ' disabled' : '').'></input> ';
- //zgornji limit
- echo '&nbsp;&nbsp;<input type="checkbox" value="1" id="num_useMax" name="num_useMax" '.($row['num_useMax']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'vsota_limit\',this.checked)">';
- echo $lang['srv_num_limit'] . '<input type="text" name="vsota_limit" id="vsota_limit" value="' . $row['vsota_limit'] . '" size="8" '.($row['num_useMax'] == 0 ? ' disabled' : '').'></input> ';
- echo '</p>';
-
- // Omejitve za 2. polje (ce ga imamo)
- echo '<div id="num_limit2" '.($row['size'] == 2 ? '' : ' style="display:none;"').'>';
- echo '<p>';
- echo '<span class="clr">'.$lang['srv_num_field2'].':</span>';
- //spodnji limit
- echo '<input type="checkbox" value="1" id="num_useMin2" name="num_useMin2" '.($row['num_useMin2']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'num_min2\',this.checked)">';
- echo $lang['srv_num_min'] . '<input type="text" name="num_min2" id="num_min2" value="' . $row['num_min2'] . '" size="8" '.($row['num_useMin2'] == 0 ? ' disabled' : '').'></input> ';
- //zgornji limit
- echo '&nbsp;&nbsp;<input type="checkbox" value="1" id="num_useMax2" name="num_useMax2" '.($row['num_useMax2']==1 ? ' checked="checked"' : '').' onClick="num_limit(\'num_max2\',this.checked)">';
- echo $lang['srv_num_limit'] . '<input type="text" name="num_max2" id="num_max2" value="' . $row['num_max2'] . '" size="8" '.($row['num_useMax2'] == 0 ? ' disabled' : '').'></input> ';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div id="num_limit_label" class="vprasanje_setting_line" '.($row['size']==2 ? '' : ' style="display:none;"').'>';
+ echo ' <span>'.$lang['srv_num_field1'].':</span>';
+ echo ' </div>';
+
+ // spodnji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <span class="content" onClick="num_limit(\'vsota_min\', \'num_useMin\')">';
+ echo ' <input type="checkbox" value="1" id="num_useMin" name="num_useMin" '.($row['num_useMin']==1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="num_useMin">'.$lang['srv_num_min'].'</label>';
+ echo ' </span>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="vsota_min" id="vsota_min" value="' . $row['vsota_min'] . '" size="8" '.($row['num_useMin'] == 0 ? ' disabled' : '').'></input>';
+ echo ' </span>';
+ echo ' </div>';
+
+ // zgornji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <span class="content" onClick="num_limit(\'vsota_limit\', \'num_useMax\')">';
+ echo ' <input type="checkbox" value="1" id="num_useMax" name="num_useMax" '.($row['num_useMax']==1 ? ' checked="checked"' : '').'>';
+ echo ' <label for="num_useMax">'.$lang['srv_num_limit'].'</label>';
+ echo ' </span>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="vsota_limit" id="vsota_limit" value="' . $row['vsota_limit'] . '" size="8" '.($row['num_useMax'] == 0 ? ' disabled' : '').'></input>';
+ echo ' </span>';
+ echo ' </div>';
+
echo '</div>';
+
// prikaz omejitve
- echo '<p><span class="title"><label for="vsota_show">'.$lang['srv_num_limit_show'] . '</label></span><span class="content"><input type="checkbox" name="vsota_show" id="vsota_show" value="1" '.($row['vsota_show']==1?'checked':'').' /></span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" name="vsota_show" id="vsota_show" value="1" '.($row['vsota_show']==1?'checked':'').' />';
+ echo ' <label for="vsota_show">'.$lang['srv_num_limit_show'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
// opozorilo za preseg limita (mehko, trdo)
- echo '<p><span class="title">'.$lang['srv_num_limit_reminder'].': </span>';
- echo '<span class="content"><select name="vsota_reminder">';
- echo '<option value="0"' . ($row['vsota_reminder'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_off2'].'</option>';
- echo '<option value="1"' . ($row['vsota_reminder'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_soft2'].'</option>';
- echo '<option value="2"' . ($row['vsota_reminder'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_hard2'].'</option>';
- echo '</select></span></p>';
- echo '</fieldset>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_limit_reminder'].': </label>';
+ echo ' <span class="content"><select name="vsota_reminder">';
+ echo ' <option value="0"' . ($row['vsota_reminder'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_off2'].'</option>';
+ echo ' <option value="1"' . ($row['vsota_reminder'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_soft2'].'</option>';
+ echo ' <option value="2"' . ($row['vsota_reminder'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_hard2'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// grid slider
if ($row['tip'] == 20 && $row['ranking_k'] == 1) {
- echo '<fieldset><legend>'.$lang['srv_num_reminder'].'</legend>';
echo '<input type="hidden" name="edit_number_limit" value="1" />';
- echo '<p>';
- //spodnji limit
- echo $lang['srv_num_min'] . '<input type="text" name="vsota_min" id="vsota_min" value="' . $row['vsota_min'] . '" size="8"></input> ';
- //zgornji limit
- echo '&nbsp;&nbsp;';
- echo $lang['srv_num_limit'] . '<input type="text" name="vsota_limit" id="vsota_limit" value="' . $row['vsota_limit'] . '" size="8"></input> ';
- echo '</p>';
-
-
- echo '</fieldset>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ // spodnji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_min'].'</label>';
+ echo ' <span class="content"><input type="text" name="vsota_min" id="vsota_min" value="' . $row['vsota_min'] . '" size="8"></input></span>';
+ echo ' </div>';
+ // zgornji limit
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_num_limit'].'</label>';
+ echo ' <span class="content"><input type="text" name="vsota_limit" id="vsota_limit" value="' . $row['vsota_limit'] . '" size="8"></input></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
//omejitev za vsoto
if($row['tip'] == 18){
- echo '<fieldset><legend>'.$lang['srv_vsota_reminder'].'</legend>';
+
echo '<input type="hidden" name="edit_vsota_limit" value="1" />';
- echo '<p>';
+
//nastavitev tocne vsote
if($row['vsota_min'] == $row['vsota_limit'])
$val = $row['vsota_min'];
- echo $lang['srv_vsota_exact'] . '<input type="text" '.($row['vsota_limittype'] == 1 ? ' disabled' : '').' name="vsota_exact" id="vsota_exact" value="' . $val . '" size="8"></input> ';
- echo '</p>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vsota_exact'].'</label>';
+ echo ' <span class="content"><input type="text" '.($row['vsota_limittype'] == 1 ? ' disabled' : '').' name="vsota_exact" id="vsota_exact" value="' . $val . '" size="8"></input></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
- echo '<p>';
- echo $lang['srv_vsota_both'] . '<input type="checkbox" '.($row['vsota_limittype'] == 1 ? ' checked' : '').' name="vsota_limittype" value="1" onClick="change_limittype(this.checked)"></input> ';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" '.($row['vsota_limittype'] == 1 ? ' checked' : '').' name="vsota_limittype" id="vsota_limittype" value="1" onClick="change_limittype(this.checked)"></input> ';
+ echo ' <label for="vsota_limittype">'.$lang['srv_vsota_both'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
- echo '<p>';
- //spodnji limit vsote
- echo $lang['srv_vsota_min'] . '<input type="text" '.($row['vsota_limittype'] == 0 ? ' disabled' : '').' name="vsota_min" id="vsota_min" value="' . $row['vsota_min'] . '" size="8"></input> ';
- //zgornji limit vsote
- echo $lang['srv_vsota_limit'] . '<input type="text" '.($row['vsota_limittype'] == 0 ? ' disabled' : '').' name="vsota_limit" id="vsota_limit" value="' . $row['vsota_limit'] . '" size="8"></input> ';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ // spodnji limit vsote
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vsota_min'].'</label>';
+ echo ' <span class="content"><input type="text" '.($row['vsota_limittype'] == 0 ? ' disabled' : '').' name="vsota_min" id="vsota_min" value="' . $row['vsota_min'] . '" size="8"></input></span>';
+ echo ' </div>';
- // prikaz omejitve
- echo '<p>'.$lang['srv_vsota_show'] . '<input type="checkbox" name="vsota_show" id="vsota_show" value="1" '.($row['vsota_show']==1?'checked':'').' /></p>';
+ // zgornji limit vsote
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vsota_limit'].'</label>';
+ echo ' <span class="content"><input type="text" '.($row['vsota_limittype'] == 0 ? ' disabled' : '').' name="vsota_limit" id="vsota_limit" value="' . $row['vsota_limit'] . '" size="8"></input></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+ // prikaz omejitve
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="checkbox" name="vsota_show" id="vsota_show" value="1" '.($row['vsota_show']==1?'checked':'').' />';
+ echo ' <label>'.$lang['srv_vsota_show'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
// opozorilo za preseg limita (mehko, trdo)
- echo '<p>';
- echo $lang['srv_vsota_reminder'].': ';
- echo '<select name="vsota_reminder">';
- echo '<option value="0"' . ($row['vsota_reminder'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_off'].'</option>';
- echo '<option value="1"' . ($row['vsota_reminder'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_soft'].'</option>';
- echo '<option value="2"' . ($row['vsota_reminder'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_hard'].'</option>';
- echo '</select>';
-
- echo '</p>';
- echo '</fieldset>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vsota_reminder'].':</label>';
+ echo ' <span class="content"><select name="vsota_reminder">';
+ echo ' <option value="0"' . ($row['vsota_reminder'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_off'].'</option>';
+ echo ' <option value="1"' . ($row['vsota_reminder'] == 1 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_soft'].'</option>';
+ echo ' <option value="2"' . ($row['vsota_reminder'] == 2 ? ' selected="true"' : '') . '>'.$lang['srv_reminder_hard'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
-
-
}
// nastavitev poravnave celic v gridih
@@ -3854,17 +4218,19 @@ class Vprasanje {
echo '<p '.$display.'>';
$gridAlign = ($spremenljivkaParams->get('gridAlign') ? $spremenljivkaParams->get('gridAlign') : -1);
- echo '<span class="title">'.$lang['srv_gridAlign'].'</span>';
- echo '<span class="content"><select name="gridAlign" id="gridAlign">';
-
- echo '<option value="0"' . ($gridAlign == 0 ? ' selected="true"' : '') . '>'.$lang['srv_gridAlign_center'].'</option>';
- echo '<option value="1"' . ($gridAlign == 1 ? ' selected="true"' : '') . '>'.$lang['srv_gridAlign_left'].'</option>';
- echo '<option value="2"' . ($gridAlign == 2 ? ' selected="true"' : '') . '>'.$lang['srv_gridAlign_right'].'</option>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_gridAlign'].'</label>';
+ echo ' <span class="content"><select name="gridAlign" id="gridAlign">';
+ echo ' <option value="0"' . ($gridAlign == 0 ? ' selected="true"' : '') . '>'.$lang['srv_gridAlign_center'].'</option>';
+ echo ' <option value="1"' . ($gridAlign == 1 ? ' selected="true"' : '') . '>'.$lang['srv_gridAlign_left'].'</option>';
+ echo ' <option value="2"' . ($gridAlign == 2 ? ' selected="true"' : '') . '>'.$lang['srv_gridAlign_right'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
- echo '</select></span>';
-
- echo '</p>';
+ echo '</div>';
}
// nastavitev sirine text polja (besedilo*, multitext, multinumber, number)
@@ -3874,83 +4240,97 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
- echo '<p>';
-
$taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
$taHeight = ($spremenljivkaParams->get('taHeight') ? $spremenljivkaParams->get('taHeight') : 1);
- echo $lang['srv_textAreaWidth'].': ';
- //sirina za multitext in multinumber
+ // sirina za multitext in multinumber
if($row['tip'] == 19 || $row['tip'] == 20){
- $size = $row['grids'];
+
+ $size = $row['grids'];
$missing_count = 0;
- # če imamo missinge size povečamo za 1 + številomissingov
+
+ # če imamo missinge size povečamo za 1 + številomissingov
$sql_grid_mv = sisplet_query("SELECT * FROM srv_grid WHERE spr_id='".$this->spremenljivka."' AND other != 0");
$missing_count = mysqli_num_rows($sql_grid_mv);
- if ($missing_count > 0) {
+
+ if ($missing_count > 0)
$size += $missing_count + 1;
- }
- echo '<select name="taWidth" id="width">';
- $maxWidth = round(50 / $size);
-
- echo '<option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].'</option>';
+ $maxWidth = round(50 / $size);
+ $maxHeight = 10;
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaWidth'].':</label>';
+ echo ' <span class="content"><select name="taWidth" id="width">';
+ echo ' <option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].'</option>';
for($i=1; $i<$maxWidth; $i++){
- echo '<option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
- echo '</select>';
+ echo ' </select></span>';
+ echo ' </div>';
// multitext ima tudi nastavitev visine
if ($row['tip'] == 19) {
-
- echo '<span class="content">'.$lang['srv_textAreaHeight'].': ';
- echo '<select name="taHeight" class="no-margin" id="taHeight">';
- $maxHeight = 10;
-
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaHeight'].':</label>';
+ echo ' <span class="content"><select name="taHeight" class="no-margin" id="taHeight">';
for($i=1; $i<=$maxHeight; $i++){
- echo '<option value="'.$i.'"' . ($taHeight == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taHeight == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
- echo '</select></span>';
+ echo ' </select></span>';
+ echo ' </div>';
}
+
+ echo '</div>';
}
//sirina za number
elseif($row['tip'] == 7){
- $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$this->spremenljivka' ORDER BY vrstni_red ASC");
- $row1 = mysqli_fetch_array($sql1);
- $id1 = $row1['id'];
- $row1 = mysqli_fetch_array($sql1);
- $id2 = $row1['id'];
-
- echo '<select name="taWidth" id="width" onchange="change_number(\'1\', \'2\');">';
- echo '<option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].' (10)</option>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaWidth'].':</label>';
+ echo ' <span class="content"><select name="taWidth" id="width" onchange="change_number(\'1\', \'2\');">';
+ echo ' <option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].' (10)</option>';
for($i=5; $i<50; $i+=5){
- echo '<option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
for($i=50; $i<=100; $i+=10){
- echo '<option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
- echo '</select>';
+ echo '</select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
//sirina za besedilo*
elseif($row['tip'] == 21){
- echo '<select name="taWidth" id="width">';
-
- echo '<option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].' (30)</option>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaWidth'].':</label>';
+ echo ' <span class="content"><select name="taWidth" id="width">';
+ echo ' <option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].' (30)</option>';
for($i=5; $i<50; $i+=5){
- echo '<option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
for($i=50; $i<=100; $i+=10){
- echo '<option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
- echo '</select>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
$this->edit_height();
}
-
- echo '</p>';
}
// nastavitev visine text polja (besedilo*)
@@ -3959,23 +4339,26 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
-
- //echo '<p>';
-
+
$taSize = ($spremenljivkaParams->get('taSize') ? $spremenljivkaParams->get('taSize') : 1);
- echo '<span class="content">'.$lang['srv_textAreaSize'].'';
- echo '<select name="taSize" class="no-margin" id="height">';
- echo '<option value="1"' . ($taSize == 1 ? ' selected="true"' : '') . '>' . $lang['srv_textArea1line'] . '</option>';
- echo '<option value="2"' . ($taSize == 2 ? ' selected="true"' : '') . '>' . $lang['srv_textArea2line'] . '</option>';
- echo '<option value="3"' . ($taSize == 3 ? ' selected="true"' : '') . '>' . $lang['srv_textArea3line'] . '</option>';
- echo '<option value="5"' . ($taSize == 5 ? ' selected="true"' : '') . '>' . $lang['srv_textArea5line'] . '</option>';
- echo '<option value="7"' . ($taSize == 7 ? ' selected="true"' : '') . '>' . $lang['srv_textArea7line'] . '</option>';
- echo '<option value="10"' . ($taSize == 10 ? ' selected="true"' : '') . '>' . $lang['srv_textArea10line'] . '</option>';
- echo '<option value="20"' . ($taSize == 20 ? ' selected="true"' : '') . '>' . $lang['srv_textArea20line'] . '</option>';
- echo '<option value="30"' . ($taSize == 30 ? ' selected="true"' : '') . '>' . $lang['srv_textArea30line'] . '</option>';
- echo '</select></span>';
-
- //echo '</p>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaSize'].':</label>';
+ echo ' <span class="content"><select name="taSize" class="no-margin" id="height">';
+ echo ' <option value="1"' . ($taSize == 1 ? ' selected="true"' : '') . '>' . $lang['srv_textArea1line'] . '</option>';
+ echo ' <option value="2"' . ($taSize == 2 ? ' selected="true"' : '') . '>' . $lang['srv_textArea2line'] . '</option>';
+ echo ' <option value="3"' . ($taSize == 3 ? ' selected="true"' : '') . '>' . $lang['srv_textArea3line'] . '</option>';
+ echo ' <option value="5"' . ($taSize == 5 ? ' selected="true"' : '') . '>' . $lang['srv_textArea5line'] . '</option>';
+ echo ' <option value="7"' . ($taSize == 7 ? ' selected="true"' : '') . '>' . $lang['srv_textArea7line'] . '</option>';
+ echo ' <option value="10"' . ($taSize == 10 ? ' selected="true"' : '') . '>' . $lang['srv_textArea10line'] . '</option>';
+ echo ' <option value="20"' . ($taSize == 20 ? ' selected="true"' : '') . '>' . $lang['srv_textArea20line'] . '</option>';
+ echo ' <option value="30"' . ($taSize == 30 ? ' selected="true"' : '') . '>' . $lang['srv_textArea30line'] . '</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -3986,12 +4369,15 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<input type="hidden" value="" name="multiple_subtitle">';
- echo '<p><label class="title" for="multiple_subtitle">';
- echo $lang['srv_multiple_subtitle'].':</label><span class="content">';
- echo '<input id="multiple_subtitle" type="checkbox" name="multiple_subtitle" value="1" '.($row['grid_subtitle1']==1?'checked':'').'></span>';
-
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" value="" name="multiple_subtitle">';
+ echo ' <input id="multiple_subtitle" type="checkbox" name="multiple_subtitle" value="1" '.($row['grid_subtitle1']==1?'checked':'').'>';
+ echo ' <label for="multiple_subtitle">'.$lang['srv_multiple_subtitle'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
@@ -4001,21 +4387,26 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
- $display = ( ($row['tip'] == 2)) ? ' style="display:none;"' : '';
- echo '<p '.$display.'><span class="title">';
- $gridWidth = ($spremenljivkaParams->get('gridWidth') ? $spremenljivkaParams->get('gridWidth') : 1);
- echo $lang['srv_gridAreaSize'].':</span><span class="content">';
- echo '<select name="gridWidth" id="gridWidth" onChange="change_grid_width(this.value);">';
- echo '<option value="-1"' . ($gridWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].' (30%)</option>';
- // 0 bo podrla zdruzljivost za nazaj (0 = -1, default!!!!!!)
- echo '<option value="-2"' . ($gridWidth == -2 ? ' selected="true"' : '') . '>'.$lang['srv_gridAreaHidden'].' (0%)</option>';
- for($i=1; $i<=16; $i++){
- echo '<option value="'.$i * 5 .'"' . ($gridWidth == $i * 5 ? ' selected="true"' : '') . '>' . $i * 5 . '%</option>';
- }
- echo '</select></span>';
+ $display = ( ($row['tip'] == 2)) ? ' style="display:none;"' : '';
- echo '</p>';
+ $gridWidth = ($spremenljivkaParams->get('gridWidth') ? $spremenljivkaParams->get('gridWidth') : 1);
+
+ echo '<div class="vprasanje_setting_holder" '.$display.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_gridAreaSize'].' '.Help::display('srv_grid_width').':</label>';
+ echo ' <span class="content"><select name="gridWidth" id="gridWidth" onChange="change_grid_width(this.value);">';
+ echo ' <option value="-1"' . ($gridWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].' (30%)</option>';
+ // 0 bo podrla zdruzljivost za nazaj (0 = -1, default!!!!!!)
+ echo ' <option value="-2"' . ($gridWidth == -2 ? ' selected="true"' : '') . '>'.$lang['srv_gridAreaHidden'].' (0%)</option>';
+ for($i=1; $i<=16; $i++){
+ echo ' <option value="'.$i * 5 .'"' . ($gridWidth == $i * 5 ? ' selected="true"' : '') . '>' . $i * 5 . '%</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitve za besedilo* (st. kosov in polozaj besedila)
@@ -4024,28 +4415,36 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- //stevilo kosov
- echo '<span class="title">'.$lang['srv_kosov'].': ';
- echo '<select name="text_kosov" id="kosov">';
- echo '<option value="1"' . ($row['text_kosov'] == 1 ? ' selected="true"' : '') . '>1</option>';
- echo '<option value="2"' . ($row['text_kosov'] == 2 ? ' selected="true"' : '') . '>2</option>';
- echo '<option value="3"' . ($row['text_kosov'] == 3 ? ' selected="true"' : '') . '>3</option>';
- echo '<option value="4"' . ($row['text_kosov'] == 4 ? ' selected="true"' : '') . '>4</option>';
- echo '</select></span>';
-
- //polozaj besedila
- echo '<span class="content">'.$lang['srv_polozaj'].': ';
- echo '<select name="text_orientation" class="no-margin" id="position">';
- echo '<option value="0"' . ($row['text_orientation'] == 0 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_off'] . '</option>';
- echo '<option value="1"' . ($row['text_orientation'] == 1 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_side'] . '</option>';
- echo '<option value="3"' . ($row['text_orientation'] == 3 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_above'] . '</option>';
- echo '<option value="2"' . ($row['text_orientation'] == 2 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_bottom'] . '</option>';
- echo '</select></span>';
-
- echo '</p>';
-
-
+ // stevilo kosov
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_kosov'].':</label>';
+ echo ' <span class="content"><select name="text_kosov" id="kosov">';
+ echo ' <option value="1"' . ($row['text_kosov'] == 1 ? ' selected="true"' : '') . '>1</option>';
+ echo ' <option value="2"' . ($row['text_kosov'] == 2 ? ' selected="true"' : '') . '>2</option>';
+ echo ' <option value="3"' . ($row['text_kosov'] == 3 ? ' selected="true"' : '') . '>3</option>';
+ echo ' <option value="4"' . ($row['text_kosov'] == 4 ? ' selected="true"' : '') . '>4</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ // polozaj besedila
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_polozaj'].':</label>';
+ echo ' <span class="content"><select name="text_orientation" class="no-margin" id="position">';
+ echo ' <option value="0"' . ($row['text_orientation'] == 0 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_off'] . '</option>';
+ echo ' <option value="1"' . ($row['text_orientation'] == 1 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_side'] . '</option>';
+ echo ' <option value="3"' . ($row['text_orientation'] == 3 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_above'] . '</option>';
+ echo ' <option value="2"' . ($row['text_orientation'] == 2 ? ' selected="true"' : '') . '>' . $lang['srv_polozaj_bottom'] . '</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitve za number (st. polj)
@@ -4053,20 +4452,18 @@ class Vprasanje {
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
- $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$this->spremenljivka' ORDER BY vrstni_red ASC");
- $row1 = mysqli_fetch_array($sql1);
- $id1 = $row1['id'];
- $row1 = mysqli_fetch_array($sql1);
- $id2 = $row1['id'];
-
- echo '<p><span class="title">';
-
- echo $lang['srv_kategorij'].': ';
- echo '<select id="num_size" name="size" onchange="change_number(\'1\', \'2\'); toggle_num_limits(this.value);">';
- echo '<option value="1"' . ($row['size'] == 1 ? ' selected="true"' : '') . '>1</option>';
- echo '<option value="2"' . ($row['size'] == 2 ? ' selected="true"' : '') . '>2</option>';
- echo '</select></span>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_kategorij'].':</label>';
+ echo ' <span class="content"><select id="num_size" name="size" onchange="change_number(\'1\', \'2\'); toggle_num_limits(this.value);">';
+ echo ' <option value="1"' . ($row['size'] == 1 ? ' selected="true"' : '') . '>1</option>';
+ echo ' <option value="2"' . ($row['size'] == 2 ? ' selected="true"' : '') . '>2</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitve za number (enota/brez enote)
@@ -4074,24 +4471,20 @@ class Vprasanje {
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
- $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$this->spremenljivka' ORDER BY vrstni_red ASC");
- $row1 = mysqli_fetch_array($sql1);
- $id1 = $row1['id'];
- $row1 = mysqli_fetch_array($sql1);
- $id2 = $row1['id'];
-
-
-
- //polje za enoto
- echo '<span class="content">'.$lang['srv_enota'].': ';
- echo '<select id="num_enota" name="enota" class="no-margin" onchange="change_number(\'1\', \'2\');">';
- echo '<option value="0"' . ($row['enota'] == 0 ? ' selected="true"' : '') . '>' . $lang['no1'] . '</option>';
- echo '<option value="1"' . ($row['enota'] == 1 ? ' selected="true"' : '') . '>' . $lang['left'] . '</option>';
- echo '<option value="2"' . ($row['enota'] == 2 ? ' selected="true"' : '') . '>' . $lang['right'] . '</option>';
- echo '</select></span>';
-
- echo '</p>';
+
+ // polje za enoto
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_enota'].':</label>';
+ echo ' <span class="content"><select id="num_enota" name="enota" class="no-margin" onchange="change_number(\'1\', \'2\');">';
+ echo ' <option value="0"' . ($row['enota'] == 0 ? ' selected="true"' : '') . '>' . $lang['no1'] . '</option>';
+ echo ' <option value="1"' . ($row['enota'] == 1 ? ' selected="true"' : '') . '>' . $lang['left'] . '</option>';
+ echo ' <option value="2"' . ($row['enota'] == 2 ? ' selected="true"' : '') . '>' . $lang['right'] . '</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev za ranking (moznosti)
@@ -4100,15 +4493,19 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_ranking_type'].':</span>';
- echo '<span class="content"><select name="design" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" class="ranking_k" onchange="show_ranking_k(this.value); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
- echo '<option value="0" '.(($row['design'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_prestavljanje'].'</option>';
- echo '<option value="1" '.(($row['design'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_ostevilcevanje'].'</option>';
- echo '<option value="2" '.(($row['design'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_premikanje'].'</option>';
- echo '<option value="3" '.(($row['design'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_hotspot'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line right-190">';
+ echo ' <label>'.$lang['srv_ranking_type'].':</label>';
+ echo ' <span class="content"><select name="design" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" class="ranking_k" onchange="show_ranking_k(this.value); show_hot_spot_settings(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
+ echo ' <option value="0" '.(($row['design'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_prestavljanje'].'</option>';
+ echo ' <option value="1" '.(($row['design'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_ostevilcevanje'].'</option>';
+ echo ' <option value="2" '.(($row['design'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_premikanje'].'</option>';
+ echo ' <option value="3" '.(($row['design'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_ranking_hotspot'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev za ranking (moznosti)
@@ -4120,15 +4517,19 @@ class Vprasanje {
$sqls = sisplet_query("SELECT * FROM srv_vrednost WHERE spr_id='$this->spremenljivka'");
$count = mysqli_num_rows($sqls);
- echo '<div id="ranking_k" '.(($row['design'] == 2) ? 'style="display: none;"' : '').'>';
- echo '<p><span class="title">'.$lang['srv_ranking_k'].':</span>';
- echo '<span class="content"><select name="ranking_k" class="ranking_k">';
- echo '<option value="0"' . ($row['ranking_k'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_vsi'].'</option>';
- for ($i=1; $i<$count; $i++) {
- echo '<option value="' . $i . '"' . ($row['ranking_k'] == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
- }
- echo '</select></span>';
- echo '</p></div>';
+ echo '<div id="ranking_k" class="vprasanje_setting_holder" '.(($row['design'] == 2) ? 'style="display: none;"' : '').'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_ranking_k'].':</label>';
+ echo ' <span class="content"><select name="ranking_k" class="ranking_k">';
+ echo ' <option value="0"' . ($row['ranking_k'] == 0 ? ' selected="true"' : '') . '>'.$lang['srv_vsi'].'</option>';
+ for ($i=1; $i<$count; $i++) {
+ echo ' <option value="' . $i . '"' . ($row['ranking_k'] == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// nastavitev za nagovor - crta za vprasanjem
@@ -4139,37 +4540,30 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$nagovorLine = ($spremenljivkaParams->get('nagovorLine') ? $spremenljivkaParams->get('nagovorLine') : 0);
- echo '<p><span class="title">'.$lang['srv_nagovorLine'].':</span>';
- echo '<span class="content"><select name="nagovorLine" id="nagovorLine">';
- echo '<option value="0"' . ($nagovorLine == 0 ? ' selected="true"' : '') . '>' . $lang['srv_default'] . '</option>';
- echo '<option value="1"' . ($nagovorLine == 1 ? ' selected="true"' : '') . '>' . $lang['no1'] . '</option>';
- echo '<option value="2"' . ($nagovorLine == 2 ? ' selected="true"' : '') . '>' . $lang['yes'] . '</option>';
- echo '</select></span></p>';
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_nagovorLine'].':</label>';
+ echo ' <span class="content"><select name="nagovorLine" id="nagovorLine">';
+ echo ' <option value="0"' . ($nagovorLine == 0 ? ' selected="true"' : '') . '>' . $lang['srv_default'] . '</option>';
+ echo ' <option value="1"' . ($nagovorLine == 1 ? ' selected="true"' : '') . '>' . $lang['no1'] . '</option>';
+ echo ' <option value="2"' . ($nagovorLine == 2 ? ' selected="true"' : '') . '>' . $lang['yes'] . '</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
* prikaze gumbe
*/
- function edit_buttons () {
+ private function edit_buttons () {
global $lang;
- echo '<div id="vprasanje_buttons">';
-
- echo '<span class="buttonwrapper spaceLeft floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="vprasanje_save(); return false;"><span>'.$lang['srv_zapri'].'</span></a>';
- echo '</span>';
-
- /*echo '<span class="buttonwrapper spaceLeft floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vprasanje_cancel(); return false;"><span>'.$lang['srv_close_profile'].'</span></a>'."\n\r";
- echo '</span>';*/
-
- echo '<span class="buttonwrapper spaceLeft floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="brisi_spremenljivko(\''.$this->spremenljivka.'\', undefined, \'0\'); return false;"><span>'.$lang['srv_brisispremenljivko'].'</span></a>'."\n\r";
- echo '</span>';
-
- //echo '<div id="arrows_more_vprasanje" onclick=" $(\'#vprasanje_edit\').animate({ scrollTop: $(\'#vprasanje_edit\').attr(\'scrollHeight\') }, 2000); "><img src="img_0/bullet_arrow_down.png" /> '.$lang['srv_more'].'</div>';
-
- echo '</div>';
+ echo '<button class="small blue" onclick="vprasanje_save(); return false;">';
+ echo $lang['srv_zapri'];
+ echo '</button>';
}
/**
@@ -4195,10 +4589,15 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p><label for="inline_edit" class="title">'.$lang['srv_inline_edit'].':</label> '.Help::display('srv_dropdown_quickedit');
- echo '<span class="content"><input type="hidden" value="0" name="inline_edit" />';
- echo '<input type="checkbox" value="1" id="inline_edit" name="inline_edit" '.($row['inline_edit']==1?' checked="checked"':'').' /></span></p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" value="0" name="inline_edit" />';
+ echo ' <input type="checkbox" value="1" id="inline_edit" name="inline_edit" '.($row['inline_edit']==1?' checked="checked"':'').' />';
+ echo ' <label for="inline_edit">'.$lang['srv_inline_edit'].' '.Help::display('srv_dropdown_quickedit').'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
function edit_onchange_submit() {
@@ -4206,16 +4605,20 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- // pri multigridu ga prikazemo samo ce imamo vklopljeno postopno resevanje
- echo '<div id="onchange_submit_div" '.($row['dynamic_mg']==0 && $row['tip']!=1 && $row['orientation']>2 ? ' style="display:none;"':'').'>';
-
- echo '<p><label for="onchange_submit" class="title">'.$lang['srv_onchange_submit'].':</label>';
- //echo '<span class="content"><input type="radio" value="0" name="onchange_submit" '.($row['onchange_submit']==0?' checked="checked"':'').' />'.$lang['no'];
- //echo '<input type="radio" value="1" name="onchange_submit" '.($row['onchange_submit']==1?' checked="checked"':'').' />'.$lang['yes'].'</span></p>';
- echo '<span class="content"><input type="hidden" value="0" name="onchange_submit" />';
- echo '<input type="checkbox" value="1" id="onchange_submit" name="onchange_submit" '.($row['onchange_submit']==1?' checked="checked"':'').' /></span></p>';
-
- echo '</div>';
+ // ODSTRANJENO - ostane samo tam, kjer je vklopljeno zaradi kompatibilnosti za nazaj
+ if($row['onchange_submit'] == '1'){
+
+ // pri multigridu ga prikazemo samo ce imamo vklopljeno postopno resevanje
+ echo '<div id="onchange_submit_div" class="vprasanje_setting_holder" '.($row['dynamic_mg']==0 && $row['tip']!=1 && $row['orientation']>2 ? ' style="display:none;"':'').'>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" value="0" name="onchange_submit" />';
+ echo ' <input type="checkbox" value="1" id="onchange_submit" name="onchange_submit" '.($row['onchange_submit']==1?' checked="checked"':'').' />';
+ echo ' <label for="onchange_submit" class="title">'.$lang['srv_onchange_submit'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
}
function edit_hidden_default() {
@@ -4223,8 +4626,18 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p><span class="title">'.$lang['srv_hidden_default'].':</span><input type="radio" value="0" name="hidden_default" '.($row['hidden_default']==0?' checked="checked"':'').' />'.$lang['no'].'<input type="radio" value="1" name="hidden_default" '.($row['hidden_default']==1?' checked="checked"':'').' />'.$lang['yes'].'</p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_hidden_default'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo' <span class="content"><input type="radio" value="0" name="hidden_default" '.($row['hidden_default']==0?' checked="checked"':'').' />'.$lang['no'].'</span>';
+ echo ' <span class="content"><input type="radio" value="1" name="hidden_default" '.($row['hidden_default']==1?' checked="checked"':'').' />'.$lang['yes'].'</span>';
+ echo ' </div>';
+
+ echo '</div>';
}
function edit_captcha () {
@@ -4238,11 +4651,22 @@ class Vprasanje {
$disabled = ($row['upload']>0 || $row['signature']==1 || $emailVerify==1) ? ' disabled="disabled"' : '';
- echo '<p><span class="title">'.$lang['srv_captcha_edit'].':</span><span class="content">';
- echo '<input type="radio" value="0" name="captcha" id="captcha_0" '.($captcha==0?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'captcha\', this.value);" /><label for="captcha_0">'.$lang['no'].'</label>';
- echo '<input type="radio" value="1" name="captcha" id="captcha_1" '.($captcha==1?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'captcha\', this.value);" /><label for="captcha_1">'.$lang['yes'].'</label>';
- echo '</span><br>'.$lang['srv_captcha_edit_note'].'</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_captcha_edit'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content"><input type="radio" value="0" name="captcha" id="captcha_0" '.($captcha==0?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'captcha\', this.value);" /><label for="captcha_0">'.$lang['no'].'</label></span>';
+ echo ' <span class="content"><input type="radio" value="1" name="captcha" id="captcha_1" '.($captcha==1?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'captcha\', this.value);" /><label for="captcha_1">'.$lang['yes'].'</label></span>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content">'.$lang['srv_captcha_edit_note'].'</span>';
+ echo ' </div>';
+ echo '</div>';
}
function edit_email_verify () {
@@ -4256,20 +4680,42 @@ class Vprasanje {
$disabled = ($row['upload']>0 || $row['signature']==1 || $captcha==1) ? ' disabled="disabled"' : '';
- echo '<p><span class="title">'.$lang['srv_email_edit'].':</span><span class="content">';
- echo '<input type="radio" value="0" name="emailVerify" id="emailVerify_0" '.($emailVerify==0?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'emailVerify\', this.value);" /><label for="emailVerify_0">'.$lang['no'].'</label>';
- echo '<input type="radio" value="1" name="emailVerify" id="emailVerify_1" '.($emailVerify==1?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'emailVerify\', this.value);" /><label for="emailVerify_1">'.$lang['yes'].'</label>';
- echo '</span><br>'.$lang['srv_email_edit_note'].'</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <label>'.$lang['srv_email_edit'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content"><input type="radio" value="0" name="emailVerify" id="emailVerify_0" '.($emailVerify==0?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'emailVerify\', this.value);" /><label for="emailVerify_0">'.$lang['no'].'</label></span>';
+ echo ' <span class="content"><input type="radio" value="1" name="emailVerify" id="emailVerify_1" '.($emailVerify==1?' checked="checked"':'').' '.$disabled.' onClick="textSubtypeToggle(\'emailVerify\', this.value);" /><label for="emailVerify_1">'.$lang['yes'].'</label></span>';
+ echo ' </div>';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content">'.$lang['srv_email_edit_note'].'</span>';
+ echo ' </div>';
+
+ echo '</div>';
}
function edit_showOnAllPages () {
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p><label for="showOnAllPages" class="title">'.$lang['srv_showOnAllPages_edit'].':</label>';
- echo '<span class="content"><input type="hidden" value="0" name="showOnAllPages" />';
- echo '<input type="checkbox" value="1" id="showOnAllPages" name="showOnAllPages" '.($row['showOnAllPages']==1?' checked="checked"':'').' /></span></p>';
-
+
+ // ODSTRANJENO - ostane samo tam, kjer je vklopljeno zaradi kompatibilnosti za nazaj
+ if($row['showOnAllPages'] == '1'){
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" value="0" name="showOnAllPages" />';
+ echo ' <input type="checkbox" value="1" id="showOnAllPages" name="showOnAllPages" '.($row['showOnAllPages']==1?' checked="checked"':'').' />';
+ echo ' <label for="showOnAllPages">'.$lang['srv_showOnAllPages_edit'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
}
function edit_hideRadio () {
@@ -4280,10 +4726,15 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$hideRadio = ($spremenljivkaParams->get('hideRadio') ? $spremenljivkaParams->get('hideRadio') : 0);
- echo '<p><label for="hideRadio" class="title">'.$lang['srv_hideRadio_edit_'.$row['tip']].':</label>';
- echo '<span class="content"><input type="hidden" value="0" name="hideRadio" />';
- echo '<input type="checkbox" value="1" id="hideRadio" name="hideRadio" '.($hideRadio==1?' checked="checked"':'').' /></span></p>';
-
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content"><input type="hidden" value="0" name="hideRadio" />';
+ echo ' <input type="checkbox" value="1" id="hideRadio" name="hideRadio" '.($hideRadio==1?' checked="checked"':'').' />';
+ echo ' <label for="hideRadio">'.$lang['srv_hideRadio_edit_'.$row['tip']].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
// Prednastavljena vrednost (pri radio ali tabela - radio)
@@ -4309,22 +4760,26 @@ class Vprasanje {
|| ($row['tip'] == 2 && in_array($row['orientation'], array(0,1,2,7)))
|| ($row['tip'] == 6 && in_array($row['enota'], array(0,1,8))))
$show = '';
- echo '<p class="presetValue" '.$show.'><label class="title">'.$lang['srv_vrednost_default'].':</label>';
-
- echo '<span class="content"><select id="presetValue" name="presetValue" style="width:120px; text-overflow:ellipsis;">';
- echo ' <option value="0">'.$lang['no'].'</option>';
+
+
+ echo '<div class="vprasanje_setting_holder presetValue" '.$show.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vrednost_default'].':</label>';
+ echo ' <span class="content"><select id="presetValue" name="presetValue" text-overflow:ellipsis;">';
+ echo ' <option value="0">'.$lang['no'].'</option>';
while($rowV = mysqli_fetch_array($sqlV)){
$naslov = (strlen($rowV['naslov']) > 20) ? substr($rowV['naslov'], 0, 20).'...' : $rowV['naslov'];
$naslov = strip_tags($naslov);
$naslov = ($naslov == '') ? '' : '('.$naslov.')';
-
- echo ' <option value="'.$rowV['id'].'" '.($presetValue == $rowV['id'] ? ' selected="selected"' : '').'>'.$rowV['variable'].' '.$naslov.'</option>';
+ echo ' <option value="'.$rowV['id'].'" '.($presetValue == $rowV['id'] ? ' selected="selected"' : '').'>'.$rowV['variable'].' '.$naslov.'</option>';
}
- echo '</select></span>';
-
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
// Urejanje velikosti polja drugo
@@ -4335,49 +4790,57 @@ class Vprasanje {
// Ce imamo kaken odgovor drugo
$sql = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id='$row[id]' AND other='1'");
- //if(mysqli_num_rows($sql) > 0){
-
- $spremenljivkaParams = new enkaParameters($row['params']);
-
- $otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1);
- $otherHeight = ($spremenljivkaParams->get('otherHeight') ? $spremenljivkaParams->get('otherHeight') : 1);
-
- //echo '<fieldset><legend>'.$lang['srv_other_size'].'</legend>';
- //echo '<fieldset id = '.$row['id'].'><legend>'.$lang['srv_other_size'].'</legend>';
- //echo '<fieldset id = fieldset'.$row['id'].' ><legend onclick="$(\'#fieldset'.$row['id'].'\').hide()">'.$lang['srv_other_size'].'</legend>';
- if(mysqli_num_rows($sql) > 0){ //ce je prisotna moznost Drugo,
- echo '<fieldset id = fieldset'.$row['id'].'><legend>'.$lang['srv_other_size'].'</legend>'; //pokazi fieldset
- }
- else{ //drugace
- echo '<fieldset id = fieldset'.$row['id'].' hidden><legend>'.$lang['srv_other_size'].'</legend>'; //skrij fieldset
- }
- //echo '<fieldset id = fieldset'.$row['id'].' ><legend onclick="console.log(\'Tralala\');">'.$lang['srv_other_size'].'</legend>';
-
- echo '<p>';
-
- echo $lang['srv_textAreaWidth'].': ';
- echo '<select name="otherWidth" id="width">';
- echo '<option value="-1"' . ($otherWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].'</option>';
- for($i=5; $i<61; $i+=5){
- echo '<option value="'.$i.'"' . ($otherWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
- }
- echo '</select>';
-
- echo '<span class="content">'.$lang['srv_textAreaSize'].'';
- echo '<select name="otherHeight" class="no-margin" id="height">';
- echo '<option value="1"' . ($otherHeight == 1 ? ' selected="true"' : '') . '>' . $lang['srv_textArea1line'] . '</option>';
- echo '<option value="3"' . ($otherHeight == 3 ? ' selected="true"' : '') . '>' . $lang['srv_textArea3line'] . '</option>';
- echo '<option value="5"' . ($otherHeight == 5 ? ' selected="true"' : '') . '>' . $lang['srv_textArea5line'] . '</option>';
- echo '<option value="7"' . ($otherHeight == 7 ? ' selected="true"' : '') . '>' . $lang['srv_textArea7line'] . '</option>';
- echo '<option value="10"' . ($otherHeight == 10 ? ' selected="true"' : '') . '>' . $lang['srv_textArea10line'] . '</option>';
- echo '<option value="20"' . ($otherHeight == 20 ? ' selected="true"' : '') . '>' . $lang['srv_textArea20line'] . '</option>';
- echo '<option value="30"' . ($otherHeight == 30 ? ' selected="true"' : '') . '>' . $lang['srv_textArea30line'] . '</option>';
- echo '</select></span>';
-
- echo '</p>';
-
- echo '</fieldset>';
- //}
+
+ $spremenljivkaParams = new enkaParameters($row['params']);
+
+ $otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1);
+ $otherHeight = ($spremenljivkaParams->get('otherHeight') ? $spremenljivkaParams->get('otherHeight') : 1);
+
+
+ // ce je prisotna moznost Drugo,
+ if(mysqli_num_rows($sql) > 0){
+ echo '<fieldset id="fieldset'.$row['id'].'"><legend>'.$lang['srv_other_size'].'</legend>';
+ }
+ // drugace je to skrito
+ else{
+ echo '<fieldset id="fieldset'.$row['id'].'" style="display:none;"><legend>'.$lang['srv_other_size'].'</legend>';
+ }
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaWidth'].':</label>';
+ echo ' <span class="content"><select name="otherWidth" id="width">';
+ echo ' <option value="-1"' . ($otherWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].'</option>';
+ for($i=5; $i<61; $i+=5){
+ echo ' <option value="'.$i.'"' . ($otherWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ }
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_textAreaSize'].':</label>';
+ echo ' <span class="content"><select name="otherHeight" class="no-margin" id="height">';
+ echo ' <option value="1"' . ($otherHeight == 1 ? ' selected="true"' : '') . '>' . $lang['srv_textArea1line'] . '</option>';
+ echo ' <option value="3"' . ($otherHeight == 3 ? ' selected="true"' : '') . '>' . $lang['srv_textArea3line'] . '</option>';
+ echo ' <option value="5"' . ($otherHeight == 5 ? ' selected="true"' : '') . '>' . $lang['srv_textArea5line'] . '</option>';
+ echo ' <option value="7"' . ($otherHeight == 7 ? ' selected="true"' : '') . '>' . $lang['srv_textArea7line'] . '</option>';
+ echo ' <option value="10"' . ($otherHeight == 10 ? ' selected="true"' : '') . '>' . $lang['srv_textArea10line'] . '</option>';
+ echo ' <option value="20"' . ($otherHeight == 20 ? ' selected="true"' : '') . '>' . $lang['srv_textArea20line'] . '</option>';
+ echo ' <option value="30"' . ($otherHeight == 30 ? ' selected="true"' : '') . '>' . $lang['srv_textArea30line'] . '</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '</fieldset>';
}
/**
@@ -4394,10 +4857,19 @@ class Vprasanje {
$prvaVrstica_roleta = ($spremenljivkaParams->get('prvaVrstica_roleta') ? $spremenljivkaParams->get('prvaVrstica_roleta') : 1);
$sbSizeVse = mysqli_num_rows($sql1); //stevilo vnesenih moznih odgovorov
- echo '<span class="content"><select name="sbSizeVse" id="selectboxSizeVse'.$this->spremenljivka.'" style="display:none;">';
- echo '<option>'.$sbSizeVse.'</option>';
- echo '</select>';
-
+
+ echo '<div class="vprasanje_setting_holder" style="display:none;">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label></label>';
+ echo ' <span class="content"><select name="sbSizeVse" id="selectboxSizeVse'.$this->spremenljivka.'">';
+ echo ' <option>'.$sbSizeVse.'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
// Nastavimo prikaz nastavitve za stevilo vidnih moznosti v select box - ce imamo selectbox je ta moznost vidna, drugace ni
if (($row['tip'] == 6 || $row['tip'] == 16) && $row['enota'] != 2){
$display = (($row['tip'] == 6 || $row['tip'] == 16) && $row['enota'] != 6 && $row['enota'] != 8) ? ' style="display:none;"' : '';
@@ -4415,42 +4887,47 @@ class Vprasanje {
$sbSize = ($spremenljivkaParams->get('sbSize') ? $spremenljivkaParams->get('sbSize') : $sbSizeVse);
- echo '<div class="dropselectboxsize" '.$display.'>';
- echo '<p><span class="title" >'.$lang['srv_stevilo_odgovorov_selectbox'].':</span>';
- echo '<span class="content"><select name="sbSize" id="selectboxSize'.$this->spremenljivka.'">';
-
+
+ echo '<div class="vprasanje_setting_holder dropselectboxsize" '.$display.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_stevilo_odgovorov_selectbox'].':</label>';
+ echo ' <span class="content"><select name="sbSize" id="selectboxSize'.$this->spremenljivka.'">';
for($i=2; $i<$sbSizeVse; $i++){
- echo '<option value="'.$i.'"'.($sbSize == $i ? ' selected="true"' : '') . '>'.$i.'</option>';
+ echo ' <option value="'.$i.'"'.($sbSize == $i ? ' selected="true"' : '') . '>'.$i.'</option>';
}
- echo '<option value="'.$sbSizeVse.'"'.($sbSize == $sbSizeVse ? ' selected="true"' : '') . '>'.$lang['srv_select_box_vse'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo ' <option value="'.$sbSizeVse.'"'.($sbSize == $sbSizeVse ? ' selected="true"' : '') . '>'.$lang['srv_select_box_vse'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
- echo '<div class="dropselectboxsizeprvavrstica" '.$display.'>';
- echo '<p><span class="title" >'.$lang['srv_select_box_prva_vrstica'].':</span>';
- echo '<span class="content"><select name="prvaVrstica" id="prvaVrstica'.$this->spremenljivka.'">'; //echo '<span class="content"><select name="prvaVrstica" id="prvaVrstica">';
-
- echo '<option value="1"'.($prvaVrstica == 1 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_1'].'</option>';
- echo '<option value="2"'.($prvaVrstica == 2 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_2'].'</option>';
- echo '<option value="3"'.($prvaVrstica == 3 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_3'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder dropselectboxsizeprvavrstica" '.$display.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_select_box_prva_vrstica'].':</label>';
+ echo ' <span class="content"><select name="prvaVrstica" id="prvaVrstica'.$this->spremenljivka.'">';
+ echo ' <option value="1"'.($prvaVrstica == 1 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_1'].'</option>';
+ echo ' <option value="2"'.($prvaVrstica == 2 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_2'].'</option>';
+ echo ' <option value="3"'.($prvaVrstica == 3 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_3'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
- echo '<div class="dropselectboxsizeprvavrstica_roleta" '.$displayprvavrstica_roleta.'>';
- echo '<p><span class="title" >'.$lang['srv_select_box_prva_vrstica'].':</span>';
- echo '<span class="content"><select name="prvaVrstica_roleta" id="prvaVrstica_roleta'.$this->spremenljivka.'">'; //echo '<span class="content"><select name="prvaVrstica" id="prvaVrstica">';
-
- echo '<option value="1"'.($prvaVrstica_roleta == 1 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_2'].'</option>';
-
- echo '<option value="3"'.($prvaVrstica_roleta == 3 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_3'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder dropselectboxsizeprvavrstica_roleta" '.$displayprvavrstica_roleta.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_select_box_prva_vrstica'].':</label>';
+ echo ' <span class="content"><select name="prvaVrstica_roleta" id="prvaVrstica_roleta'.$this->spremenljivka.'">';
+ echo ' <option value="1"'.($prvaVrstica_roleta == 1 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_2'].'</option>';
+ echo ' <option value="3"'.($prvaVrstica_roleta == 3 ? ' selected="true"' : '') . '>'.$lang['srv_select_box_prva_vrstica_3'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
-
}
// Nastavitev text vprasanja, da se pod njim prikazejo odgovori prejsnjih respondentov
@@ -4462,11 +4939,15 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$prevAnswers = ($spremenljivkaParams->get('prevAnswers') ? $spremenljivkaParams->get('prevAnswers') : 0);
- echo '<p>';
- echo '<label for="prevAnswers" class="title">'.$lang['srv_setting_prevAnswers'].': </label>';
- echo '<span class="content"><input type="hidden" name="prevAnswers" value="0" />';
- echo '<input type="checkbox" id="prevAnswers" name="prevAnswers" value="1" '.(($prevAnswers == 1) ? ' checked="checked" ' : '').' />';
- echo '</span></p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <input type="hidden" name="prevAnswers" value="0" />';
+ echo ' <input type="checkbox" id="prevAnswers" name="prevAnswers" value="1" '.(($prevAnswers == 1) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="prevAnswers">'.$lang['srv_setting_prevAnswers'].' </label>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -4484,33 +4965,39 @@ class Vprasanje {
$customRadioNumber = ($spremenljivkaParams->get('customRadioNumber') ? $spremenljivkaParams->get('customRadioNumber') : '5');
$customRadio = $spremenljivkaParams->get('customRadio');
- echo '<div class="custom-picture-radio" '.$displayCustomRadio.'>';
- echo '<p><span class="title" >'.$lang['srv_custom-picture_radio_label'].':</span>';
- echo '<span class="content"><select name="customRadio" id="customRadioSelect'.$this->spremenljivka.'">';
- echo '<option value="star" '.($customRadio == "star" ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_star'].'</option>';
- echo '<option value="smiley" '.($customRadio == "smiley" ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_smiley'].'</option>';
- echo '<option value="thumb" '.($customRadio == 'thumb' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_thumb'].'</option>';
- echo '<option value="heart" '.($customRadio == 'heart' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_heart'].'</option>';
- echo '<option value="flag" '.($customRadio == 'flag' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_flag'].'</option>';
- echo '<option value="user" '.($customRadio == 'user' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_user'].'</option>';
- echo '</select></span>';
- echo '</p>';
-
- $preveriOdgovore = sisplet_query("SELECT spr_id FROM srv_data_vrednost" . $this->db_table. " WHERE spr_id='".$this->spremenljivka."'");
- $stOdgovorov=1;
- if(mysqli_num_rows($preveriOdgovore)){
- $stOdgovorov = $customRadioNumber;
- }
- if($row['tip'] != 6) {
- echo '<p><span class="title" >' . $lang['srv_custom-picture_number_label'] . ':</span>';
- echo '<span class="content"><select name="customRadioNumber" id="customRadioNumberSelect' . $this->spremenljivka . '">';
- for ($n = $stOdgovorov ; $n < 13; $n++) {
- echo '<option value="' . $n . '" ' . (($customRadioNumber == $n) ? 'selected="selected"' : '') . '>' . $n . '</option>';
- }
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder custom-picture-radio" '.$displayCustomRadio.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_custom-picture_radio_label'].':</label>';
+ echo ' <span class="content"><select name="customRadio" id="customRadioSelect'.$this->spremenljivka.'">';
+ echo ' <option value="star" '.($customRadio == "star" ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_star'].'</option>';
+ echo ' <option value="smiley" '.($customRadio == "smiley" ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_smiley'].'</option>';
+ echo ' <option value="thumb" '.($customRadio == 'thumb' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_thumb'].'</option>';
+ echo ' <option value="heart" '.($customRadio == 'heart' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_heart'].'</option>';
+ echo ' <option value="flag" '.($customRadio == 'flag' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_flag'].'</option>';
+ echo ' <option value="user" '.($customRadio == 'user' ? 'selected="selected"' : '').'>'.$lang['srv_custom-picture_radio_user'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ $preveriOdgovore = sisplet_query("SELECT spr_id FROM srv_data_vrednost".$this->db_table." LEFT JOIN srv_user ON srv_user.id = srv_data_vrednost".$this->db_table.".usr_id WHERE spr_id='".$this->spremenljivka."' AND deleted = '0' AND preview = '0'");
+ $stOdgovorov=1;
+ if(mysqli_num_rows($preveriOdgovore)){
+ $stOdgovorov = $customRadioNumber;
+ }
+
+ if($row['tip'] != 6) {
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_custom-picture_number_label'].':</label>';
+ echo ' <span class="content"><select '.(mysqli_num_rows($preveriOdgovore) > 0 ? "disabled" : "").' name="customRadioNumber" id="customRadioNumberSelect' . $this->spremenljivka . '">';
+ for ($n = $stOdgovorov ; $n < 13; $n++) {
+ echo '<option value="' . $n . '" ' . (($customRadioNumber == $n) ? 'selected="selected"' : '') . '>' . $n . '</option>';
}
+ echo ' </select></span>';
+ echo ' </div>';
+ }
+
echo '</div>';
}
@@ -4527,32 +5014,74 @@ class Vprasanje {
$vizualnaSkalaNumber = ($spremenljivkaParams->get('vizualnaSkalaNumber') ? $spremenljivkaParams->get('vizualnaSkalaNumber') : '5');
- echo '<div class="vizualna-analogna-skala" '.$displayAnalognoSkalo.'><p><span class="title" >'.$lang['srv_custom-picture_number_label'].':</span>';
- echo '<span class="content"><select name="vizualnaSkalaNumber" id="vizualnaSkalaNumberSelect'.$this->spremenljivka.'">';
- for($n=2; $n<8; $n++){
+ $preveriOdgovore = sisplet_query("SELECT spr_id FROM srv_data_vrednost".$this->db_table." LEFT JOIN srv_user ON srv_user.id = srv_data_vrednost".$this->db_table.".usr_id WHERE spr_id='".$this->spremenljivka."' AND deleted = '0' AND preview = '0'");
+
+ echo '<div class="vprasanje_setting_holder vizualna-analogna-skala" '.$displayAnalognoSkalo.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_custom-picture_number_label'].':</label>';
+ echo ' <span class="content"><select '.(mysqli_num_rows($preveriOdgovore) > 0 ? "disabled" : "").' name="vizualnaSkalaNumber" id="vizualnaSkalaNumberSelect'.$this->spremenljivka.'">';
+
+ $stOdgovorov=2;
+ if(mysqli_num_rows($preveriOdgovore)){
+ $stOdgovorov = $vizualnaSkalaNumber;
+ }
+
+ for($n = $stOdgovorov; $n<8; $n++){
echo '<option value="'.$n.'" '.(($vizualnaSkalaNumber == $n) ? 'selected="selected"' : '').'>'.$n.'</option>';
}
- echo '</select></span>';
- echo '</p>';
+ echo ' </select></span>';
+ echo ' </div>';
+
echo '</div>';
}
+
+ // nastavitev izgleda vizualne analogne skale
+ /**
+ * 0 = vse sivo
+ * 1 = barvno
+ */
+ function edit_visual_analog_type() {
+ global $lang;
+
+ $row = Cache::srv_spremenljivka($this->spremenljivka);
+ $spremenljivkaParams = new enkaParameters($row['params']);
+
+ $displayAnalognoSkalo = ($row['orientation'] == 11) ? '' :' style="display:none;"';
+
+ $visual_type = ($spremenljivkaParams->get('visual_type') ? $spremenljivkaParams->get('visual_type') : '0');
+
+ echo '<div class="vprasanje_setting_holder vizualna-analogna-skala" '.$displayAnalognoSkalo.'>';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_custom-picture_visual_type'].': </label>';
+ echo ' <span class="content"><select name="visual_type">';
+ echo ' <option value="0" '.(($visual_type == 0) ? ' selected="true" ' : '').'>'.$lang['srv_custom-picture_visual_type_gray'].'</option>';
+ echo ' <option value="1" '.(($visual_type == 1) ? ' selected="true" ' : '').'>'.$lang['srv_custom-picture_visual_type_colored'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
+ }
- // nastavitev za lokacijo podtip
+ // nastavitev za lokacijo podtip
function edit_subtype_map() {
global $lang;
$row = Cache::srv_spremenljivka($this->spremenljivka);
- echo '<p>';
- echo '<span class="title">'.$lang['srv_vprasanje_podtip_map'].':</span>';
- echo '<span class="content">';
- echo '<select name="podtip_lokacija" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="change_map(this.value, '.$this->spremenljivka.');">';
- echo '<option value="1" '.(($row['enota'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_mylocation'].'</option>';
- echo '<option value="2" '.(($row['enota'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_multilocation'].'</option>';
- echo '<option value="3" '.(($row['enota'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_chooselocation'].'</option>';
-
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo '<div class="vprasanje_setting_line right-190">';
+ echo ' <label>'.$lang['srv_vprasanje_podtip_map'].':</label>';
+ echo ' <span class="content"><select name="podtip_lokacija" id="spremenljivka_podtip_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="change_map(this.value, '.$this->spremenljivka.');">';
+ echo ' <option value="1" '.(($row['enota'] == 1) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_mylocation'].'</option>';
+ echo ' <option value="2" '.(($row['enota'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_multilocation'].'</option>';
+ echo ' <option value="3" '.(($row['enota'] == 3) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_chooselocation'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+
+ echo '</div>';
}
/**
@@ -4567,18 +5096,18 @@ class Vprasanje {
$newParams = new enkaParameters($row['params']);
$input = $newParams->get('multi_input_type') ? $newParams->get('multi_input_type') : 'marker';
- echo '<p id="multi_input_type_map" '. ($row['enota'] == 2 ? '' : 'style="display: none;"').'>';
- echo '<span class="title" >'.$lang['srv_vprasanje_input_type_map'].': </span>';
- echo '<span class="content">';
+ echo '<div id="multi_input_type_map" class="vprasanje_setting_holder" '.($row['enota'] == 2 ? '' : 'style="display: none;"').'>';
- //roleta
- echo '<select name="multi_input_type" id="multi_input_type_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="change_input_map(this.value, '.$this->spremenljivka.');">';
- echo '<option value="marker" '.(($input == 'marker') ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_marker'].'</option>';
- echo '<option value="polyline" '.(($input == 'polyline') ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_line'].'</option>';
- echo '<option value="polygon" '.(($input == 'polygon') ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_polygon'].'</option>';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_input_type_map'].': </label>';
+ echo ' <span class="content"><select name="multi_input_type" id="multi_input_type_' . $row['id'] . '" spr_id="'.$row['id'].'" onChange="change_input_map(this.value, '.$this->spremenljivka.');">';
+ echo ' <option value="marker" '.(($input == 'marker') ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_marker'].'</option>';
+ echo ' <option value="polyline" '.(($input == 'polyline') ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_line'].'</option>';
+ echo ' <option value="polygon" '.(($input == 'polygon') ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_polygon'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
- echo '</select></span>';
- echo '</p>';
+ echo '</div>';
}
/**
@@ -4587,7 +5116,7 @@ class Vprasanje {
*/
public static function change_tip ($spremenljivka, $tip, $podtip = null) {
global $lang;
-
+ $anketa = null;
if ($spremenljivka <= 0) return;
sisplet_query("UPDATE srv_spremenljivka SET tip = '$tip' WHERE id='$spremenljivka'");
@@ -4618,17 +5147,17 @@ class Vprasanje {
// checkbox ima zraven default opombo
if ($tip == 2 && $row['orientation'] != 6) {
$s = sisplet_query("UPDATE srv_spremenljivka SET info='$lang[srv_info_checkbox]' WHERE id = '$spremenljivka'");
- }
- // checkbox s selectbox ima zraven default opombo
- elseif($tip == 2 && $row['orientation'] == 6){
+ }
+ // checkbox s selectbox ima zraven default opombo
+ elseif($tip == 2 && $row['orientation'] == 6){
$s = sisplet_query("UPDATE srv_spremenljivka SET info='$lang[srv_info_selectbox]' WHERE id = '$spremenljivka'");
}
// grid s checkboxi ima zraven default opombo
elseif ($tip == 16 && $row['enota'] != 6) {
$s = sisplet_query("UPDATE srv_spremenljivka SET info='$lang[srv_info_checkbox]' WHERE id = '$spremenljivka'");
- }
- //grid s selectboxi ima zraven default opombo
- elseif($tip == 16 && $row['enota'] == 6){
+ }
+ //grid s selectboxi ima zraven default opombo
+ elseif($tip == 16 && $row['enota'] == 6){
$s = sisplet_query("UPDATE srv_spremenljivka SET info='$lang[srv_info_selectbox]' WHERE id = '$spremenljivka'");
}
else {
@@ -4641,29 +5170,36 @@ class Vprasanje {
// nastavimo nazaj na admin jezik
$file = '../../lang/'.$lang_admin.'.php';
include($file);
-
+
+
+ // checkbox je vedno nominalna - ob preklopu damo kar na default
+ if ($tip == 2) {
+ $s = sisplet_query("UPDATE srv_spremenljivka SET skala='-1' WHERE id = '$spremenljivka'");
+ }
//besedilo* - pobrisemo odvecne vrednosti
if ($tip == 21){
- sisplet_query("UPDATE srv_spremenljivka SET size=text_kosov WHERE id='$spremenljivka'");
- $row['size'] = $row['text_kosov']; // ker se spodaj bere se size
- sisplet_query("DELETE FROM srv_vrednost WHERE vrstni_red > '$row[text_kosov]' AND spr_id='$spremenljivka' AND other = 0");
- sisplet_query("UPDATE srv_vrednost SET naslov='$lang[srv_new_text]', naslov_graf='$lang[srv_new_text]' WHERE spr_id='$spremenljivka' AND other = 0");
-
- //fotografiranje ima svojo variablo
- if($podtip != null && $podtip == 7){
- $sql1 = sisplet_query("SELECT s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$anketa' AND s.tip='21' AND s.upload=2 AND s.id!='$spremenljivka'");
- if (!$sql1) echo 'err453'.mysqli_error($GLOBALS['connect_db']);
- $c = 0;
- while ($row1 = mysqli_fetch_array($sql1)) {
- $row1['variable'] = (int)str_replace('FOTO', '', $row1['variable']);
- if ($row1['variable'] > $c)
- $c = $row1['variable'];
- }
- $c++;
- $variable = 'FOTO'.$c;
- sisplet_query("UPDATE srv_spremenljivka SET variable='$variable', variable_custom='1' WHERE id = '$spremenljivka'");
- }
+
+ sisplet_query("UPDATE srv_spremenljivka SET size=text_kosov WHERE id='$spremenljivka'");
+ $row['size'] = $row['text_kosov']; // ker se spodaj bere se size
+
+ sisplet_query("DELETE FROM srv_vrednost WHERE vrstni_red > '$row[text_kosov]' AND spr_id='$spremenljivka' AND other = 0");
+ sisplet_query("UPDATE srv_vrednost SET naslov='$lang[srv_new_text]', naslov_graf='$lang[srv_new_text]' WHERE spr_id='$spremenljivka' AND other = 0");
+
+ //fotografiranje ima svojo variablo
+ if($podtip != null && $podtip == 7){
+ $sql1 = sisplet_query("SELECT s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$anketa' AND s.tip='21' AND s.upload=2 AND s.id!='$spremenljivka'");
+ if (!$sql1) echo 'err453'.mysqli_error($GLOBALS['connect_db']);
+ $c = 0;
+ while ($row1 = mysqli_fetch_array($sql1)) {
+ $row1['variable'] = (int)str_replace('FOTO', '', $row1['variable']);
+ if ($row1['variable'] > $c)
+ $c = $row1['variable'];
+ }
+ $c++;
+ $variable = 'FOTO'.$c;
+ sisplet_query("UPDATE srv_spremenljivka SET variable='$variable', variable_custom='1' WHERE id = '$spremenljivka'");
+ }
}
// number ima na zacetku size 1 in enoto 0
@@ -4745,11 +5281,14 @@ class Vprasanje {
$values = "";
for ($i = $rowc['count']; $i <= $row['size']; $i++) {
if ($values != "") $values .= ",";
- if ($row['tip']==21 || $row['tip']==7 || $row['tip']==22) $def_naslov = $lang['srv_new_text']; else $def_naslov = $lang['srv_new_vrednost'].' '.$i;
+ if ($row['tip']==21 || $row['tip']==7 || $row['tip']==22) $def_naslov = $lang['srv_new_text'];
+ elseif ($row['tip']==6 || $row['tip']==16 || $row['tip']==19 || $row['tip']==24 || $row['tip']==20) $def_naslov = $lang['srv_new_vrednost_grid'].' '.$i;
+ else $def_naslov = $lang['srv_new_vrednost'].' '.$i;
$values .= " ('$spremenljivka', '$i', '$def_naslov', '$i', '$def_naslov') ";
}
$sql1 = sisplet_query("INSERT INTO srv_vrednost (spr_id, variable, naslov, vrstni_red, naslov2) VALUES $values");
- } else {
+ }
+ else {
sisplet_query("DELETE FROM srv_vrednost WHERE spr_id='$spremenljivka'");
}
@@ -4764,14 +5303,16 @@ class Vprasanje {
}
$sql1 = sisplet_query("INSERT INTO srv_grid (id, spr_id, naslov, vrstni_red, variable) VALUES $values");
- } else {
+ }
+ else {
sisplet_query("DELETE FROM srv_grid WHERE spr_id = '$spremenljivka'");
}
// multiple tabela
if ($row['tip'] == 24) {
// zaenkrat nic
- } else {
+ }
+ else {
// pri brisanju multiple grid vprasanja, moramo pobrisate tudi vse child spremenljivke (ker kljuci niso nastavljeni)
$sqld = sisplet_query("SELECT spr_id FROM srv_grid_multiple WHERE parent='$spremenljivka'");
while ($rowd = mysqli_fetch_array($sqld)) {
@@ -4781,7 +5322,6 @@ class Vprasanje {
}
Cache::clear_cache();
-
}
/**
@@ -4790,7 +5330,7 @@ class Vprasanje {
*/
function set_captcha () {
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
+ $update = '';
$newParams = new enkaParameters($row['params']);
$newParams->set('captcha', 1);
@@ -4807,7 +5347,7 @@ class Vprasanje {
*/
function set_datum () {
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
+ $update = '';
$newParams = new enkaParameters($row['params']);
$newParams->set('multigrid-datum', 1);
@@ -4824,7 +5364,7 @@ class Vprasanje {
*/
function set_email ($reminder=2) {
global $lang;
-
+ $update = '';
$row = Cache::srv_spremenljivka($this->spremenljivka);
$newParams = new enkaParameters($row['params']);
$newParams->set('emailVerify', 1);
@@ -4920,7 +5460,7 @@ class Vprasanje {
*/
function set_box () {
$row = Cache::srv_spremenljivka($this->spremenljivka);
-
+ $update = '';
$newParams = new enkaParameters($row['params']);
$newParams->set('taSize', 5);
@@ -4939,7 +5479,7 @@ class Vprasanje {
function set_map ($podtip) {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$newParams = new enkaParameters($row['params']);
-
+ $update = '';
//multi lokacija
if($podtip == 2){
$newParams->set('user_location', 0);
@@ -5018,8 +5558,8 @@ class Vprasanje {
if ($this->spremenljivka < -3) return; // -1, -2, -3 so uvod, zakljucek in statistika
- $lang_id = $_POST['lang_id'];
-
+ $lang_id = isset($_POST['lang_id']) ? $_POST['lang_id'] : 0;
+
Common::getInstance()->Init($this->anketa);
Common::getInstance()->updateEditStamp();
@@ -5029,6 +5569,8 @@ class Vprasanje {
$spremenljivkaParams = new enkaParameters($row['params']);
$diferencial_trak = ($spremenljivkaParams->get('diferencial_trak') ? $spremenljivkaParams->get('diferencial_trak') : 0); //za checkbox
+ $other = '0';
+
// urejanje grida
if (isset($_POST['edit_grid'])) {
@@ -5050,9 +5592,9 @@ class Vprasanje {
$other = '0';
# manjkoajoče vrednosti (ne vem, zavrnil ...
- if (isset($_POST['missing_value_checkbox']) && is_array($_POST['missing_value_checkbox'])) {
+ if (isset($_POST['missing_value_checkbox_'.$row['id']]) && is_array($_POST['missing_value_checkbox_'.$row['id']])) {
- if (in_array($grid, $_POST['missing_value_checkbox'])) {
+ if (in_array($grid, $_POST['missing_value_checkbox_'.$row['id']])) {
# grid je manjkajoča vrednost
$other = $grid.'';
$id = $grid;
@@ -5186,7 +5728,7 @@ class Vprasanje {
$count = $_POST['grids_count'];
}
- $countAll = (isset($_POST['missing_value_checkbox']) && is_array($_POST['missing_value_checkbox'])) ? $count + count($_POST['missing_value_checkbox']) : $count;
+ $countAll = (isset($_POST['missing_value_checkbox_'.$row['id']]) && is_array($_POST['missing_value_checkbox_'.$row['id']])) ? $count + count($_POST['missing_value_checkbox_'.$row['id']]) : $count;
//pobrisemo gride ki so prevec
sisplet_query("DELETE FROM srv_grid WHERE spr_id='$this->spremenljivka' AND vrstni_red > '$count' AND other = '0' AND part = '1'");
@@ -5208,7 +5750,7 @@ class Vprasanje {
}
//dodamo podvojen grid pri dvojni tabeli
- if($_POST['enota'] == 3){
+ if(isset($_POST['enota']) && $_POST['enota'] == 3){
$sqlN = sisplet_query("SELECT naslov FROM srv_grid WHERE spr_id='$this->spremenljivka' AND id = '$id'");
$rowN = mysqli_fetch_array($sqlN);
@@ -5222,11 +5764,11 @@ class Vprasanje {
}
# napolnimo/pobrisemo manjkajoče vrednosti (ne vem, zavrnil ...
- if (isset($_POST['missing_value_checkbox']) && is_array($_POST['missing_value_checkbox'])) {
+ if (isset($_POST['missing_value_checkbox_'.$row['id']]) && is_array($_POST['missing_value_checkbox_'.$row['id']])) {
$vrstni_red = $count;
- foreach($_POST['missing_value_checkbox'] as $key => $missing){
+ foreach($_POST['missing_value_checkbox_'.$row['id']] as $key => $missing){
# popravimi za missing vrednosi
# katere missinge imamo na voljo
@@ -5396,20 +5938,22 @@ class Vprasanje {
$j = 0;
for ($j = 1; $j <= $kosov; $j++) {
$vrstni_red = $j;
- //$naslov = $_POST['vrednost_naslov_'.$vrstni_red];
- $naslov = $lang['srv_new_text'];
- $size = $_POST['vrednost_size_'.$vrstni_red];
-
- //$s = sisplet_query("UPDATE srv_vrednost SET naslov='".$_POST['vrednost_naslov_'.$j]."', size='".$_POST['vrednost_size_'.$j]."' WHERE vrstni_red='$j' AND other = '0' AND spr_id='$this->spremenljivka'");
- $s = sisplet_query("UPDATE srv_vrednost SET size='".$_POST['vrednost_size_'.$j]."' WHERE vrstni_red='$j' AND other = '0' AND spr_id='$this->spremenljivka'");
- $s = sisplet_query("SELECT id FROM srv_vrednost WHERE vrstni_red='$vrstni_red' AND spr_id='$this->spremenljivka' AND other = 0");
- if(mysqli_num_rows($s) == 0){
- $i = sisplet_query("INSERT INTO srv_vrednost (id, spr_id, naslov, size, vrstni_red) VALUES ('', '$this->spremenljivka', '$naslov', '$size', '$vrstni_red')");
- }
+ if(isset($_POST['vrednost_size_'.$j])){
- unset($_POST['vrednost_naslov_'.$j]);
- unset($_POST['vrednost_size_'.$j]);
+ $naslov = $lang['srv_new_text'];
+ $size = $_POST['vrednost_size_'.$j];
+
+ $s = sisplet_query("UPDATE srv_vrednost SET size='".$_POST['vrednost_size_'.$j]."' WHERE vrstni_red='$vrstni_red' AND other = '0' AND spr_id='$this->spremenljivka'");
+
+ $s = sisplet_query("SELECT id FROM srv_vrednost WHERE vrstni_red='$vrstni_red' AND spr_id='$this->spremenljivka' AND other = 0");
+ if(mysqli_num_rows($s) == 0){
+ $i = sisplet_query("INSERT INTO srv_vrednost (id, spr_id, naslov, size, vrstni_red) VALUES ('', '$this->spremenljivka', '$naslov', '$size', '$vrstni_red')");
+ }
+
+ unset($_POST['vrednost_naslov_'.$j]);
+ unset($_POST['vrednost_size_'.$j]);
+ }
}
# popravimo polja drugo, nevem...
@@ -5434,7 +5978,6 @@ class Vprasanje {
for ($j = 1; $j <= $kosov; $j++) {
$vrstni_red = $j;
- //$naslov = $_POST['vrednost_naslov_'.$vrstni_red];
$naslov = $lang['srv_new_text'];
$size = $_POST['vrednost_size_'.$vrstni_red];
@@ -5542,8 +6085,12 @@ class Vprasanje {
}
if (isset($_POST['label'])) {
- if ($_POST['label'] != $row['label'])
- $update .= ", label='$_POST[label]' ";
+ if ($_POST['label'] != $row['label']){
+
+ $label_text = strip_tags($_POST['label']);
+
+ $update .= ", label='$label_text' ";
+ }
}
// // shrani opombo
@@ -5576,11 +6123,13 @@ class Vprasanje {
// nastavitve uvoda
if ( isset($_POST['intro_opomba'])) {
+
if (isset($_POST['intro_opomba'])) {
- $intro_opomba = $_POST['intro_opomba'];
- $intro_note = $_POST['note'];
+ $intro_opomba = strip_tags($_POST['intro_opomba']);
+ $intro_note = strip_tags($_POST['note']);
$intro = " intro_opomba='".$intro_opomba."', intro_note='$intro_note'";
- } else $intro = '';
+ }
+ else $intro = '';
unset($_POST['note']); // da ne gre shranjevat v srv_spremenljivka
@@ -5645,11 +6194,11 @@ class Vprasanje {
SurveySetting::getInstance()->setSurveyMiscSetting('concl_url_status', $_POST['concl_url_status']);
SurveySetting::getInstance()->setSurveyMiscSetting('concl_url_recnum', $_POST['concl_url_recnum']);
- $concl_opomba = $_POST['concl_opomba'];
- $concl_note = $_POST['note'];
+ $concl_opomba = strip_tags($_POST['concl_opomba']);
+ $concl_note = strip_tags($_POST['note']);
- $concl_back_button = $_POST['concl_back_button'];
- $concl_end_button = $_POST['concl_end_button'];
+ $concl_back_button = strip_tags($_POST['concl_back_button']);
+ $concl_end_button = strip_tags($_POST['concl_end_button']);
// shrani prikaz povezave na zacetek ankete za naknadno urejanje
$concl_return_edit = $_POST['concl_return_edit'];
@@ -5759,8 +6308,8 @@ class Vprasanje {
$other = '0';
# manjkoajoče vrednosti (ne vem, zavrnil ...
- if (isset($_POST['missing_value_checkbox']) && is_array($_POST['missing_value_checkbox'])) {
- if (in_array($grid, $_POST['missing_value_checkbox'])) {
+ if (isset($_POST['missing_value_checkbox_'.$row['id']]) && is_array($_POST['missing_value_checkbox_'.$row['id']])) {
+ if (in_array($grid, $_POST['missing_value_checkbox_'.$row['id']])) {
# grid je manjkajoča vrednost
$other = $grid.'';
$id = $grid;
@@ -5828,17 +6377,21 @@ class Vprasanje {
$update .= ", reminder = '$_POST[reminder]' ";
}
+ // shrani nastavitev za prikaz "ostalo" ob opozorilu
+ if (isset($_POST['alert_show_96_'.$this->spremenljivka])) {
+ $update .= ", alert_show_96 = '".$_POST['alert_show_96_'.$this->spremenljivka]."' ";
+ }
// shrani nastavitev za prikaz "neustrezno" ob opozorilu
- if (isset($_POST['alert_show_97'])) {
- $update .= ", alert_show_97 = '$_POST[alert_show_97]' ";
+ if (isset($_POST['alert_show_97_'.$this->spremenljivka])) {
+ $update .= ", alert_show_97 = '".$_POST['alert_show_97_'.$this->spremenljivka]."' ";
}
// shrani nastavitev za prikaz "zavrnil" ob opozorilu
- if (isset($_POST['alert_show_98'])) {
- $update .= ", alert_show_98 = '$_POST[alert_show_98]' ";
+ if (isset($_POST['alert_show_98_'.$this->spremenljivka])) {
+ $update .= ", alert_show_98 = '".$_POST['alert_show_98_'.$this->spremenljivka]."' ";
}
// shrani nastavitev za prikaz "ne vem" ob opozorilu
- if (isset($_POST['alert_show_99'])) {
- $update .= ", alert_show_99 = '$_POST[alert_show_99]' ";
+ if (isset($_POST['alert_show_99_'.$this->spremenljivka])) {
+ $update .= ", alert_show_99 = '".$_POST['alert_show_99_'.$this->spremenljivka]."' ";
}
// shrani nastavitev za razvrstitev vrednosti spr
@@ -5877,21 +6430,32 @@ class Vprasanje {
if($_POST['vsota_limittype'] == 1){
$vsota_limittype = 1;
- $vsota_min = $_POST['vsota_min'];
- $vsota_limit = $_POST['vsota_limit'];
+ $vsota_min = isset($_POST['vsota_min']) ? $_POST['vsota_min'] : '';
+ $vsota_limit = isset($_POST['vsota_limit']) ? $_POST['vsota_limit'] : '';
}
else{
$vsota_limittype = 0;
- $vsota_min = $_POST['vsota_exact'];
- $vsota_limit = $_POST['vsota_exact'];
+ $vsota_min = isset($_POST['vsota_exact']) ? $_POST['vsota_exact'] : '';
+ $vsota_limit = isset($_POST['vsota_exact']) ? $_POST['vsota_exact'] : '';
}
$update .= ", vsota_reminder = '$_POST[vsota_reminder]', vsota_min = '$vsota_min', vsota_limit = '$vsota_limit', vsota_limittype = '$vsota_limittype', vsota_show='$_POST[vsota_show]' ";
}
// shrani nastavitve za omejitve stevila
- if (isset($_POST['edit_number_limit'])) {
- $update .= ", vsota_reminder = '$_POST[vsota_reminder]', num_useMin = '$_POST[num_useMin]', num_useMax = '$_POST[num_useMax]', vsota_min = '$_POST[vsota_min]', vsota_limit = '$_POST[vsota_limit]', vsota_show='$_POST[vsota_show]', num_useMin2 = '$_POST[num_useMin2]', num_useMax2 = '$_POST[num_useMax2]', num_min2 = '$_POST[num_min2]', num_max2 = '$_POST[num_max2]'";
+ if (isset($_POST['edit_number_limit'])) {
+ $vsota_reminder = isset($_POST['vsota_reminder']) ? $_POST['vsota_reminder'] : '';
+ $num_useMin = isset($_POST['num_useMin']) ? $_POST['num_useMin'] : '';
+ $num_useMax = isset($_POST['num_useMax']) ? $_POST['num_useMax'] : '';
+ $vsota_min = isset($_POST['vsota_min']) ? $_POST['vsota_min'] : '';
+ $vsota_limit = isset($_POST['vsota_limit']) ? $_POST['vsota_limit'] : '';
+ $vsota_show = isset($_POST['vsota_show']) ? $_POST['vsota_show'] : '';
+ $num_useMin2 = isset($_POST['num_useMin2']) ? $_POST['num_useMin2'] : '';
+ $num_useMax2 = isset($_POST['num_useMax2']) ? $_POST['num_useMax2'] : '';
+ $num_min2 = isset($_POST['num_min2']) ? $_POST['num_min2'] : '';
+ $num_max2 = isset($_POST['num_max2']) ? $_POST['num_max2'] : '';
+
+ $update .= ", vsota_reminder = '$vsota_reminder', num_useMin = '$num_useMin', num_useMax = '$num_useMax', vsota_min = '$vsota_min', vsota_limit = '$vsota_limit', vsota_show='$vsota_show', num_useMin2 = '$num_useMin2', num_useMax2 = '$num_useMax2', num_min2 = '$num_min2', num_max2 = '$num_max2'";
}
// shrani nastavitev za razvrscanje - tip
@@ -6018,6 +6582,8 @@ class Vprasanje {
|| isset($_POST['sbSizeVse'])
|| isset($_POST['prevAnswers'])
|| isset($_POST['disabled_vprasanje'])
+ || isset($_POST['mobile_tables'])
+ || isset($_POST['pc_tables'])
|| isset($_POST['slider_handle'])
|| isset($_POST['slider_MinMaxNumLabel'])
|| isset($_POST['slider_MinMaxLabel'])
@@ -6122,24 +6688,27 @@ class Vprasanje {
$newParams->set('presetValue', $_POST['presetValue']);
if (isset($_POST['sbSize']))
$newParams->set('sbSize', $_POST['sbSize']);
- if (isset($_POST['customRadio']))
- $newParams->set('customRadio', ((in_array($row['tip'], [1,6]) && ($row['enota'] == 12 || $row['orientation'] == 9)) ? $_POST['customRadio'] : ''));
+ if (isset($_POST['customRadio'])){
+ $newParams->set('customRadio', ((in_array($row['tip'], [1,6]) && ($row['enota'] == 12 || (isset($_POST['orientation']) && $_POST['orientation'] == 9) )) ? $_POST['customRadio'] : ''));
+ }
if (isset($_POST['customRadioNumber']) && $_POST['customRadioNumber'] > 0) {
- if ($_POST['tip'] == 6 && $row['enota'] == 12) {
+ if ($_POST['tip'] == 6 && $row['enota'] == 12)
$customRadioNumber = $_POST['grids_count'];
- }else{
+ else
$customRadioNumber = $_POST['customRadioNumber'];
- }
+
$newParams->set('customRadioNumber', $customRadioNumber);
}
if (isset($_POST['vizualnaSkalaNumber']) && $_POST['vizualnaSkalaNumber'] > 0) {
- if ($_POST['tip'] == 6 && $row['enota'] == 11) {
+ if ($_POST['tip'] == 6 && $row['enota'] == 11)
$vizualnaSkalaNumber = ($_POST['grids_count'] > 7 ? 7 : $_POST['grids_count']);
- }else{
+ else
$vizualnaSkalaNumber = $_POST['vizualnaSkalaNumber'];
- }
+
$newParams->set('vizualnaSkalaNumber', $vizualnaSkalaNumber);
}
+ if (isset($_POST['visual_type']))
+ $newParams->set('visual_type', $_POST['visual_type']);
if (isset($_POST['prvaVrstica']))
$newParams->set('prvaVrstica', $_POST['prvaVrstica']);
if (isset($_POST['prvaVrstica_roleta']))
@@ -6150,6 +6719,10 @@ class Vprasanje {
$newParams->set('prevAnswers', $_POST['prevAnswers']);
if (isset($_POST['disabled_vprasanje']))
$newParams->set('disabled_vprasanje', $_POST['disabled_vprasanje']);
+ if (isset($_POST['mobile_tables']))
+ $newParams->set('mobile_tables', $_POST['mobile_tables']);
+ if (isset($_POST['pc_tables']))
+ $newParams->set('pc_tables', $_POST['pc_tables']);
if ( isset($_POST['slider_handle']) )
$newParams->set('slider_handle', $_POST['slider_handle']);
if (isset($_POST['slider_MinMaxNumLabel']))
@@ -6342,12 +6915,11 @@ class Vprasanje {
}
//*******************
- if ($_POST['enota'] == 9){ //ce je postavitev drag and drop
+ if (isset($_POST['enota']) && $_POST['enota'] == 9){ //ce je postavitev drag and drop
$newParams->set('izris_droppable_grid', 0);
}
//**************************
-
-
+
$params = $newParams->getString();
$update .= ", params = '$params' ";
}
@@ -6379,12 +6951,20 @@ class Vprasanje {
$update .= ", orientation = '$_POST[orientation]', tip = '1', hidden_default = '0' "; //ce smo preklopli, ko je bilo vprasanje radio button, naj se vrne kot radio button
//v kolikor gre za slikovni tip radio buttons potem v tabelo srv_vrednost vstaviti ustrezno št. vrstic
- if($_POST['orientation'] == 9)
- $this->slikovni_tip($_POST['customRadioNumber']);
+ if($_POST['orientation'] == 9){
+ $customRadioNumber = '5';
+ if(isset($_POST['customRadioNumber'])) $customRadioNumber = $_POST['customRadioNumber'];
+ elseif($spremenljivkaParams->get('customRadioNumber') != '') $customRadioNumber = $spremenljivkaParams->get('customRadioNumber');
+ $this->slikovni_tip($customRadioNumber);
+ }
// vizualno analogno skalo buttons potem v tabelo srv_vrednost vstaviti ustrezno št. vrstic
- if($_POST['orientation'] == 11)
- $this->slikovni_tip($_POST['vizualnaSkalaNumber']);
+ if($_POST['orientation'] == 11){
+ $vizualnaSkalaNumber = '5';
+ if(isset($_POST['vizualnaSkalaNumber'])) $vizualnaSkalaNumber = $_POST['vizualnaSkalaNumber'];
+ elseif($spremenljivkaParams->get('vizualnaSkalaNumber') != '') $vizualnaSkalaNumber = $spremenljivkaParams->get('vizualnaSkalaNumber');
+ $this->slikovni_tip($vizualnaSkalaNumber);
+ }
}
}
}
@@ -6481,7 +7061,6 @@ class Vprasanje {
}
function slikovni_tip($number){
-
//pobrišemo dosedanje vrednosti
$dosedanjiVnosi = sisplet_query("SELECT id, naslov, variable, vrstni_red FROM srv_vrednost WHERE spr_id='".$this->spremenljivka."' ORDER BY vrstni_red");
$st = mysqli_num_rows($dosedanjiVnosi);
@@ -6501,11 +7080,11 @@ class Vprasanje {
}
}
elseif($st > $number) {
- $preveriOdgovore = sisplet_query("SELECT spr_id FROM srv_data_vrednost" . $this->db_table. " WHERE spr_id='".$this->spremenljivka."'");
+ //$preveriOdgovore = sisplet_query("SELECT spr_id FROM srv_data_vrednost" . $this->db_table. " WHERE spr_id='".$this->spremenljivka."'");
- if(mysqli_num_rows($preveriOdgovore) == 0){
+ //if(mysqli_num_rows($preveriOdgovore) == 0){
sisplet_query("DELETE FROM srv_vrednost WHERE spr_id='".$this->spremenljivka."' AND vrstni_red>'".$number."'");
- }
+ //}
}
@@ -6567,6 +7146,8 @@ class Vprasanje {
Common::getInstance()->updateEditStamp();
$spremenljivka = $this->spremenljivka;
+
+ $rows = Cache::srv_spremenljivka($spremenljivka);
if($vrednost == null)
$vrednost = (int)$_POST['vrednost'];
@@ -6594,11 +7175,13 @@ class Vprasanje {
$return['output'] .= '<div class="popup_close"><a href="#" onClick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">✕</a></div>';
$return['output'] .= '<p>'.$lang['spremenljivka_delete_data_vre'].'</p>';
- $return['output'] .= '<p>'.$lang['srv_brisivrednostconfirm_data'].'</p><br />';
+ $return['output'] .= '<p class="top16">'.$lang['srv_brisivrednostconfirm_data'].'</p>';
//ce se spremeni onclick, se prosim spremeni v datoteki vprasanjeInline.js v funkciji inline_vrednost_delete v else if (data.error == 2)
- $return['output'] .= '<span class="buttonwrapper floatRight"><a class="ovalbutton ovalbutton_orange" href="#" onclick="inline_vrednost_delete(\''.$spremenljivka.'\', \''.$vrednost.'\', \'1\'); $(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;"><span>'.$lang['srv_brisivrednost'].'</span></a></span>';
- $return['output'] .= '<span class="buttonwrapper floatRight spaceRight"><a class="ovalbutton ovalbutton_gray" href="#" onclick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;"><span>'.$lang['srv_analiza_arhiviraj_cancle'].'</span></a></span>';
+ $return['output'] .= '<div class="button_holder">';
+ $return['output'] .= '<button class="medium white-blue" onclick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</button>';
+ $return['output'] .= '<button class="medium blue" onclick="inline_vrednost_delete(\''.$spremenljivka.'\', \''.$vrednost.'\', \'1\'); $(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_brisivrednost'].'</button>';
+ $return['output'] .= '</div>';
//$return['output'] .= '<p><a href="#" id="brisivrednostchecked" onclick="inline_vrednost_delete(\''.$spremenljivka.'\', \''.$vrednost.'\', \'1\'); $(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_brisivrednost'].'</a> <a href="#" onclick="$(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</a></p>';
echo json_encode($return);
@@ -6606,8 +7189,10 @@ class Vprasanje {
return;
}
}
-
- if(!$API_call && !$can_delete_last){
+
+ // ker datum (8) sam po sebi nima vrednosti (text in st imata lahko vec vrednosti/polj, se lahko pri datumu pobrise tudi zadnja vrednosti (missingi))
+ if(!$API_call && !$can_delete_last && !$rows['tip'] == 8){
+ //TODO pri datumu noce pobrisati zadnje other vrednosti (missing), tukaj vrne count 0, pri ostalimi (number, text) vrne 1
$sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_vrednost WHERE spr_id='$spremenljivka' AND id != '$vrednost'");
$row = mysqli_fetch_array($sql);
if ($row['count'] == 0) return;
@@ -6617,7 +7202,7 @@ class Vprasanje {
$sql = sisplet_query("SELECT spr_id, if_id FROM srv_vrednost WHERE id = '$vrednost'");
$row = mysqli_fetch_array($sql);
-
+
$sql = sisplet_query("DELETE FROM srv_vrednost WHERE id = '$vrednost'");
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
@@ -6636,7 +7221,6 @@ class Vprasanje {
sisplet_query("DELETE FROM srv_if WHERE id = '$if'");
}
- $rows = Cache::srv_spremenljivka($spremenljivka);
if ($rows['tip'] == 24) {
$this->repare_grid_multiple($spremenljivka);
}
@@ -6670,6 +7254,82 @@ class Vprasanje {
Common::repareVrednost($spremenljivka);
Common::prestevilci($spremenljivka);
}
+
+ /**
+ * pri gridih preverimo, ce lahko brisemo stolpec (oz. ce opozorimo, da se lahko izgubijo podatki)
+ */
+ function ajax_grid_delete_check () {
+ global $lang;
+
+ Common::getInstance()->Init($this->anketa);
+ Common::getInstance()->updateEditStamp();
+
+ $return = array();
+
+ // preverimo, ce obstajajo ze podatki za spremenljivko - v tem primeru damo dodaten error
+ $sql = sisplet_query("SELECT count(*) AS count FROM srv_user WHERE ank_id='$this->anketa' AND deleted='0' AND preview='0'");
+ $row = mysqli_fetch_array($sql);
+
+ if ($row['count'] > 0) {
+
+ $return['error'] = 2;
+
+ $return['output'] = '<h2>'.$lang['srv_warning'].'</h2>';
+ $return['output'] .= '<div class="popup_close"><a href="#" onClick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">✕</a></div>';
+
+ $return['output'] .= '<p>'.$lang['spremenljivka_delete_data_grid'].'</p>';
+ $return['output'] .= '<p class="top16">'.$lang['srv_brisivrednostconfirm_data2'].'</p>';
+
+ //ce se spremeni onclick, se prosim spremeni v datoteki vprasanjeInline.js v funkciji inline_vrednost_delete v else if (data.error == 2)
+ $return['output'] .= '<div class="button_holder">';
+ $return['output'] .= '<button class="medium white-blue" onclick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</button>';
+ $return['output'] .= '<button class="medium blue" onclick="grid_plus_minus (\'0\', \'1\'); $(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_brisivrednost2'].'</button>';
+ $return['output'] .= '</div>';
+
+ echo json_encode($return);
+ }
+
+ return;
+ }
+
+ /**
+ * pri gridih preverimo, ce lahko brisemo stolpec (oz. ce opozorimo, da se lahko izgubijo podatki)
+ */
+ function ajax_grid_delete_missing_check () {
+ global $lang;
+
+ Common::getInstance()->Init($this->anketa);
+ Common::getInstance()->updateEditStamp();
+
+ $spremenljivka = $this->spremenljivka;
+
+ $return = array();
+
+ // preverimo, ce obstajajo ze podatki za spremenljivko - v tem primeru damo dodaten error
+ $sql = sisplet_query("SELECT count(*) AS count FROM srv_user WHERE ank_id='$this->anketa' AND deleted='0' AND preview='0'");
+ $row = mysqli_fetch_array($sql);
+
+ if ($row['count'] > 0) {
+
+ $return['error'] = 2;
+
+ $return['output'] = '<h2>'.$lang['srv_warning'].'</h2>';
+ $return['output'] .= '<div class="popup_close"><a href="#" onClick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">✕</a></div>';
+
+ $return['output'] .= '<p>'.$lang['spremenljivka_delete_data_grid'].'</p>';
+ $return['output'] .= '<p class="top16">'.$lang['srv_brisivrednostconfirm_data2'].'</p>';
+
+ //ce se spremeni onclick, se prosim spremeni v datoteki vprasanjeInline.js v funkciji inline_vrednost_delete v else if (data.error == 2)
+ $return['output'] .= '<div class="button_holder">';
+ $return['output'] .= '<button class="medium white-blue" onclick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</button>';
+ $return['output'] .= '<button class="medium blue" onclick="vprasanje_save(true, \''.$spremenljivka.'\'); close_missing_menu(\''.$spremenljivka.'\'); $(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_brisivrednost2'].'</button>';
+ $return['output'] .= '</div>';
+
+ echo json_encode($return);
+ }
+
+ return;
+ }
/**
* funkcija, ki doda novo vrednost
@@ -6729,11 +7389,11 @@ class Vprasanje {
//$sql = sisplet_query("SELECT * FROM srv_vrednost WHERE spr_id = '$spremenljivka'");
$sql1 = sisplet_query("SELECT id FROM srv_user WHERE ank_id='$anketa'");
$values = '';
- while ($row1 = mysqli_fetch_assoc($sql1)) {
+ while ($row2 = mysqli_fetch_assoc($sql1)) {
//$s = sisplet_query("INSERT INTO srv_data_grid".$this->db_table." (spr_id, vre_id, usr_id, grd_id) VALUES ('$spremenljivka', '$vrednost', '$row1[id]', '-4')");
if ($values != '') $values .= ', ';
- $values .= "('$spremenljivka', '$vrednost', '$row1[id]', '-4')";
+ $values .= "('$spremenljivka', '$vrednost', '$row2[id]', '-4')";
}
$s = sisplet_query("INSERT INTO srv_data_grid".$this->db_table." (spr_id, vre_id, usr_id, grd_id) VALUES $values");
@@ -6781,10 +7441,43 @@ class Vprasanje {
}
function ajax_change_tip () {
+ global $lang;
+
Common::getInstance()->Init($this->anketa);
Common::getInstance()->updateEditStamp();
$tip = $_POST['tip'];
+ $confirmed = (int)$_POST['confirmed'];
+
+ // preverimo, ce obstajajo ze podatki za spremenljivko - v tem primeru damo dodaten error
+ if($confirmed != '1'){
+
+ $return = array();
+
+ $sql = sisplet_query("SELECT count(*) AS count FROM srv_user WHERE ank_id='$this->anketa' AND deleted='0' AND preview='0'");
+ $row = mysqli_fetch_array($sql);
+
+ if ($row['count'] > 0) {
+
+ $return['error'] = 1;
+
+ $return['output'] = '<h2>'.$lang['srv_warning'].'</h2>';
+ $return['output'] .= '<div class="popup_close"><a href="#" onClick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">✕</a></div>';
+
+ $return['output'] .= '<p>'.$lang['spremenljivka_change_type_data'].'</p>';
+ $return['output'] .= '<p class="top16">'.$lang['srv_change_question_confirm_data'].'</p>';
+
+ //ce se spremeni onclick, se prosim spremeni v datoteki vprasanjeInline.js v funkciji inline_vrednost_delete v else if (data.error == 2)
+ $return['output'] .= '<div class="button_holder">';
+ $return['output'] .= '<button class="medium white-blue" onclick="$(\'#dropped_alert\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</button>';
+ $return['output'] .= '<button class="medium blue" onClick="change_tip(\''.$this->spremenljivka.'\', \''.$tip.'\', \'1\'); $(\'#dropped_alert\').html(\'\').hide(); $(\'#fade\').fadeOut(); return false;">'.$lang['srv_spremeni_tip_vprasanja'].'</button>';
+ $return['output'] .= '</div>';
+
+ echo json_encode($return);
+
+ return;
+ }
+ }
self::change_tip($this->spremenljivka, $tip);
@@ -6901,20 +7594,22 @@ class Vprasanje {
function ajax_hotspot_edit() {
-
- $vrednost = $_POST['vrednost'];
+ if(array_key_exists('vrednost', $_POST)){
+ $vrednost = $_POST['vrednost'];
+ }else{
+ $vrednost = null;
+ }
$this->hotspot_edit($vrednost);
}
function ajax_hotspot_edit_regions() {
- $vrednost = $_POST['vrednost'];
- //$src_image = $_POST['src_image'];
- //$hotspot_image_height = $_POST['hotspot_image_height'];
- //$hotspot_image_width = $_POST['hotspot_image_width'];
- //$spr_id = $_POST['spr_id'];
-
+ if(array_key_exists('vrednost', $_POST)){
+ $vrednost = $_POST['vrednost'];
+ }else{
+ $vrednost = null;
+ }
$this->hotspot_edit_regions($vrednost);
}
@@ -7051,7 +7746,7 @@ class Vprasanje {
foreach ($fastadd AS $naslov) {
if ($naslov != '') {
- $this->vrednost_new(trim($naslov), $other);
+ $this->vrednost_new(trim($naslov));
}
}
@@ -7061,7 +7756,7 @@ class Vprasanje {
function ajax_vprasanje_refresh () {
global $lang;
- if ($_GET['silentsave'] == 'true')
+ if (isset($_GET['silentsave']) && $_GET['silentsave'] == 'true')
$silentsave = true;
else
$silentsave = false;
@@ -7230,15 +7925,50 @@ class Vprasanje {
function ajax_grid_multiple_add () {
global $lang;
- echo '<p><b>'.$lang['srv_gridmultiple_choose'].'</b></p>';
-
- echo '<p><label onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'6\');"><span class="sprites radio3"></span> '.$lang['srv_vprasanje_tip_1'].'</label></p>';
- echo '<p><label onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'16\');"><span class="sprites checkbox3"></span> '.$lang['srv_vprasanje_tip_2'].'</label></p>';
- echo '<p><label onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'19\');"><span class="sprites text"></span> '.$lang['srv_vprasanje_tip_21'].'</label></p>';
- echo '<p><label onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'20\');"><span class="sprites text"></span> '.$lang['srv_vprasanje_tip_7'].'</label></p>';
- echo '<p><label onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'19\', \'1\');"><span class="sprites text"></span> '.$lang['srv_vprasanje_datum'].'</label></p>';
+ echo '<div class="popup_close"><a href="#" onClick="vrednost_cancel(); return false;">✕</a></div>';
+
+ echo '<h2>'.$lang['srv_gridmultiple_choose'].'</h2>';
- echo '<a onclick="$(\'#vrednost_edit\').html(\'\').hide(); return false;" href="#" style="position:absolute; right:10px; bottom:10px">'.$lang['srv_zapri'].'</a>';
+
+ echo '<div class="setting_holder multitable_answer_type">';
+ echo ' <div class="item" onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'6\');">';
+ echo ' <span class="faicon radio_32"></span>';
+ echo ' <span class="item_text">'.$lang['srv_vprasanje_tip_1'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder multitable_answer_type">';
+ echo ' <div class="item" onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'16\');">';
+ echo ' <span class="faicon check_32"></span>';
+ echo ' <span class="item_text">'.$lang['srv_vprasanje_tip_2'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder multitable_answer_type">';
+ echo ' <div class="item" onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'19\');">';
+ echo ' <span class="faicon abc_32"></span>';
+ echo ' <span class="item_text">'.$lang['srv_vprasanje_tip_21'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder multitable_answer_type">';
+ echo ' <div class="item" onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'20\');">';
+ echo ' <span class="faicon number_32"></span>';
+ echo ' <span class="item_text">'.$lang['srv_vprasanje_tip_7'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder multitable_answer_type">';
+ echo ' <div class="item" onclick="grid_multiple_addnew(\''.$this->spremenljivka.'\', \'19\', \'1\');">';
+ echo ' <span class="faicon calendar_icon"></span>';
+ echo ' <span class="item_text">'.$lang['srv_vprasanje_datum'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium blue" onclick="vrednost_cancel(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '</div>';
}
function ajax_grid_multiple_addnew () {
@@ -7247,8 +7977,8 @@ class Vprasanje {
Common::getInstance()->Init($this->anketa);
Common::getInstance()->updateEditStamp();
- $tip = $_POST['tip'];
- $podtip = $_POST['podtip'];
+ $tip = isset($_POST['tip']) ? $_POST['tip'] : '';
+ $podtip = isset($_POST['podtip']) ? $_POST['podtip'] : 0;
$b = new Branching($this->anketa);
$spr_id = $b->nova_spremenljivka(-2, 0, 0);
@@ -7294,59 +8024,71 @@ class Vprasanje {
$row = Cache::srv_spremenljivka($this->spremenljivka);
$spremenljivkaParams = new enkaParameters($row['params']);
- echo '<p><b>'.$lang['srv_analiza_opisne_subquestion'].'</b></p>';
+
+ echo '<div class="popup_close"><a href="#" onClick="vrednost_cancel(); return false;">✕</a></div>';
+
+ echo '<h2>'.$lang['srv_analiza_opisne_subquestion'].'</h2>';
- echo '<p><span class="title">'.$lang['srv_odgovorov'].':</span> ';
- echo '<span class="content"><select name="multi_grids_count" id="multi_grids_count" onChange="change_selectbox_size(\'' . $row['id'] . '\', $(this).val(), \'' . $lang['srv_select_box_vse'] . '\');">';
- //echo '<span class="content"><select name="multi_grids_count" id="multi_grids_count" onchange="">';
- // Vedno imamo najmanj 2 grida (drugace so stvari cudne v analizah) - namesto 1 se uporabi navaden radio tip vprasanja
+
+ echo '<div class="setting_holder multitable_setting">';
+
+ echo ' <span class="setting_title">'.$lang['srv_odgovorov'].':</span>';
+
+ // Vedno imamo najmanj 2 grida (drugace so stvari cudne v analizah) - namesto 1 se uporabi navaden radio tip vprasanja
// Pri number sliderju se rabi 1 (mogoče še kje - npr checkbox itd.... ) analize morajo delati tudi v tem primeru :P
+ echo ' <select name="multi_grids_count" id="multi_grids_count" class="dropdown medium w200" onChange="change_selectbox_size(\'' . $row['id'] . '\', $(this).val(), \'' . $lang['srv_select_box_vse'] . '\');">';
for ($i=1; $i<=20; $i++)
echo '<option value="'.$i.'"'.($row['grids']==$i?' selected':'').'>'.$i.'</option>';
-
- echo '</select></span>';
- echo '</p>';
-
+ echo ' </select>';
+
+ echo '</div>';
+
+
if ($row['tip'] == 6) {
- echo '<p><span class="title">'.$lang['srv_orientacija'].': </span>';
- //echo '<span class="content"><select id="spremenljivka_podtip" name="enota" onChange="show_selectbox_size(\'' . $row['id'] . '\', this.value);">';
- echo '<span class="content"><select id="spremenljivka_podtip" name="enota" onChange="show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
- //echo '<span class="content"><select id="spremenljivka_podtip" name="enota">';
- echo '<option value="0" '.(($row['enota'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_classic'].'</option>';
- echo '<option value="2" '.(($row['enota'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_dropdown'].'</option>';
- echo '<option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_radio'].'</option>';
- echo '</select>';
- echo '</span></p>';
+ echo '<div class="setting_holder multitable_setting">';
+
+ echo ' <span class="setting_title">'.$lang['srv_orientacija'].':</span>';
+
+ echo ' <select id="spremenljivka_podtip" class="dropdown medium w200" name="enota" onChange="show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
+ echo ' <option value="0" '.(($row['enota'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_classic'].'</option>';
+ echo ' <option value="2" '.(($row['enota'] == 2) ? ' selected="true" ' : '').'>'.$lang['srv_dropdown'].'</option>';
+ echo ' <option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_radio'].'</option>';
+ echo ' </select>';
+
+ echo '</div>';
$this->edit_selectbox_size ();
}
+
if ($row['tip'] == 16) {
+
+ echo '<div class="setting_holder multitable_setting">';
+
+ echo ' <span class="setting_title">'.$lang['srv_orientacija'].':</span>';
- echo '<p><span class="title">'.$lang['srv_orientacija'].': </span>';
- //echo '<span class="content"><select id="spremenljivka_podtip" name="enota">';
- //echo '<span class="content"><select id="spremenljivka_podtip" name="enota" onChange="show_selectbox_size(\'' . $row['id'] . '\', this.value);">';
- echo '<span class="content"><select id="spremenljivka_podtip" name="enota" onChange="show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
- echo '<option value="0" '.(($row['enota'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_classic'].'</option>';
- echo '<option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_check'].'</option>';
- echo '</select>';
- echo '</span></p>';
+ echo ' <select id="spremenljivka_podtip" class="dropdown medium w200" name="enota" onChange="show_selectbox_size(\'' . $row['id'] . '\', this.value, \'' . $row['tip'] . '\');">';
+ echo ' <option value="0" '.(($row['enota'] == 0) ? ' selected="true" ' : '').'>'.$lang['srv_classic'].'</option>';
+ echo ' <option value="6" '.(($row['enota'] == 6) ? ' selected="true" ' : '').'>'.$lang['srv_select-box_check'].'</option>';
+ echo ' </select>';
+ echo '</div>';
+
$this->edit_selectbox_size ();
}
+
if ($row['tip'] == 19) {
- echo '<p>';
+ // Sirina polja
+ echo '<div class="setting_holder multitable_setting">';
+
+ echo ' <span class="setting_title">'.$lang['srv_textAreaWidth'].':</span>';
$taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
$taHeight = ($spremenljivkaParams->get('taHeight') ? $spremenljivkaParams->get('taHeight') : 1);
-
- // Sirina polja
- echo $lang['srv_textAreaWidth'].': ';
-
$size = $row['grids'];
$missing_count = 0;
# če imamo missinge size povečamo za 1 + številomissingov
@@ -7356,91 +8098,93 @@ class Vprasanje {
$size += $missing_count + 1;
}
- echo '<select name="taWidth" id="multi_taWidth">';
- $maxWidth = round(50 / $size);
+ $maxWidth = round(50 / $size);
$maxWidth = 10;
-
- echo '<option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].'</option>';
+
+ echo ' <select name="taWidth" id="multi_taWidth" class="dropdown medium w200">';
+ echo ' <option value="-1"' . ($taWidth == -1 ? ' selected="true"' : '') . '>'.$lang['default'].'</option>';
for($i=1; $i<$maxWidth; $i++){
- echo '<option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taWidth == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
- echo '</select>';
+ echo ' </select>';
+
+ echo '</div>';
// Visina polja
- echo '<span class="spaceLeft">'.$lang['srv_textAreaHeight'].': <select name="taHeight" id="multi_taHeight">';
- $maxHeight = 10;
-
+ echo '<div class="setting_holder multitable_setting">';
+
+ echo ' <span class="setting_title">'.$lang['srv_textAreaHeight'].':</span>';
+
+ $maxHeight = 10;
+ echo ' <select name="taHeight" id="multi_taHeight" class="dropdown medium w200">';
for($i=1; $i<=$maxHeight; $i++){
- echo '<option value="'.$i.'"' . ($taHeight == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
+ echo ' <option value="'.$i.'"' . ($taHeight == $i ? ' selected="true"' : '') . '>' . $i . '</option>';
}
- echo '</select></span>';
+ echo ' </select>';
- echo '</p>';
+ echo '</div>';
}
- if ($row['tip'] == 20) {
+ if ($row['tip'] == 20) {
+ echo '<div class="setting_holder multitable_setting">';
$this->edit_number();
+ echo '</div>';
}
+
// Prikaz podtabele glede na tip respondenta (admin, manager...)
- echo '<p>';
- echo '<span class="title">'.$lang['srv_visible_dostop'].': </span>';
- echo '<span class="content"><select name="dostop" id="spremenljivka_dostop">';
- echo '<option value="4"'.($row['dostop']==4?' selected':'').'>'.$lang['see_everybody'].'</option>';
- echo '<option value="3"'.($row['dostop']==3?' selected':'').'>'.$lang['see_registered'].'</option>';
- echo '<option value="2"'.($row['dostop']==2?' selected':'').'>'.$lang['see_member'].'</option>';
- echo '<option value="1"'.($row['dostop']==1?' selected':'').'>'.$lang['see_manager'].'</option>';
- echo '<option value="0"'.($row['dostop']==0?' selected':'').'>'.$lang['see_admin'].'</option>';
- echo '</select></span>';
- echo '</p>';
+ echo '<div class="setting_holder multitable_setting">';
+
+ echo ' <span class="setting_title">'.$lang['srv_visible_dostop'].':</span>';
+
+ echo ' <select name="dostop" id="spremenljivka_dostop" class="dropdown medium w200">';
+ echo ' <option value="4"'.($row['dostop']==4?' selected':'').'>'.$lang['see_everybody'].'</option>';
+ echo ' <option value="3"'.($row['dostop']==2 || $row['dostop']==3?' selected':'').'>'.$lang['see_registered'].'</option>';
+ echo ' <option value="1"'.($row['dostop']==1?' selected':'').'>'.$lang['see_manager'].'</option>';
+ echo ' <option value="0"'.($row['dostop']==0?' selected':'').'>'.$lang['see_admin'].'</option>';
+ echo ' </select>';
+
+ echo '</div>';
+
// Ce imamo datum
if ($row['tip'] == 19){
$is_datum = $spremenljivkaParams->get('multigrid-datum');
- if ($is_datum == 1)
+ if ($is_datum == 1){
+ echo '<div class="setting_holder multitable_setting">';
$this->edit_date_range();
+ echo '</div>';
+ }
}
+
// Sirina stolpca
- $grid_width = $spremenljivkaParams->get('gridmultiple_width');
- echo '<p>';
- echo '<span class="title">'.$lang['srv_gridmultiple_width'].': </span>';
- echo '<span class="content"><select name="gridmultiple_width" id="gridmultiple_width">';
- echo '<option value="0"'.($grid_width==0?' selected':'').'>'.$lang['default'].'</option>';
- echo '<option value="10"'.($grid_width==10?' selected':'').'>10%</option>';
- echo '<option value="20"'.($grid_width==20?' selected':'').'>20%</option>';
- echo '<option value="30"'.($grid_width==30?' selected':'').'>30%</option>';
- echo '<option value="40"'.($grid_width==40?' selected':'').'>40%</option>';
- echo '<option value="50"'.($grid_width==50?' selected':'').'>50%</option>';
- echo '<option value="60"'.($grid_width==60?' selected':'').'>60%</option>';
- echo '</select></span>';
- echo '</p>';
-
-
- echo '<br />';
+ echo '<div class="setting_holder multitable_setting">';
+ echo ' <span class="setting_title">'.$lang['srv_gridmultiple_width'].':</span>';
- echo '<span class="buttonwrapper spaceLeft floatRight">
- <a class="ovalbutton ovalbutton_orange" onclick="grid_multiple_save(\''.$this->spremenljivka.'\'); $(\'#vrednost_edit\').html(\'\').hide(); return false;" href="#">
- <span>'.$lang['srv_potrdi'].'</span>
- </a>
- </span>';
-
- echo '<span class="buttonwrapper spaceLeft floatRight">
- <a class="ovalbutton ovalbutton_gray" onclick="$(\'#fade\').fadeOut(\'slow\'); $(\'#vrednost_edit\').html(\'\').hide(); return false;" href="#">
- <span>'.$lang['srv_zapri'].'</span>
- </a>
- </span>';
-
- echo '<span class="buttonwrapper spaceLeft floatRight">
- <a class="ovalbutton ovalbutton_gray" onclick="brisi_spremenljivko(\''.$this->spremenljivka.'\', undefined, \'0\'); $(\'#fade\').fadeOut(\'slow\'); $(\'#vrednost_edit\').html(\'\').hide(); return false;" href="#">
- <span>'.$lang['srv_brisispremenljivko'].'</span>
- </a>
- </span>';
+ $grid_width = $spremenljivkaParams->get('gridmultiple_width');
+ echo ' <select name="gridmultiple_width" id="gridmultiple_width" class="dropdown medium w200">';
+ echo ' <option value="0"'.($grid_width==0?' selected':'').'>'.$lang['default'].'</option>';
+ echo ' <option value="10"'.($grid_width==10?' selected':'').'>10%</option>';
+ echo ' <option value="20"'.($grid_width==20?' selected':'').'>20%</option>';
+ echo ' <option value="30"'.($grid_width==30?' selected':'').'>30%</option>';
+ echo ' <option value="40"'.($grid_width==40?' selected':'').'>40%</option>';
+ echo ' <option value="50"'.($grid_width==50?' selected':'').'>50%</option>';
+ echo ' <option value="60"'.($grid_width==60?' selected':'').'>60%</option>';
+ echo ' </select>';
+ echo '</div>';
+
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" onclick="vrednost_cancel(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo ' <button class="medium white-blue" onclick="brisi_spremenljivko(\''.$this->spremenljivka.'\', undefined, \'0\'); vrednost_cancel(); return false;">'.$lang['srv_brisispremenljivko'].'</button>';
+ echo ' <button class="medium blue" onclick="grid_multiple_save(\''.$this->spremenljivka.'\'); vrednost_cancel(); return false;">'.$lang['srv_potrdi'].'</button>';
+ echo '</div>';
}
/**
@@ -7452,32 +8196,35 @@ class Vprasanje {
Common::getInstance()->Init($this->anketa);
Common::getInstance()->updateEditStamp();
- $sql_parent = sisplet_query("SELECT naslov, naslov2, variable, variable_custom, other FROM srv_vrednost WHERE spr_id='$parent' ORDER BY vrstni_red");
+ $sql_parent = sisplet_query("SELECT naslov, naslov2, variable, variable_custom, other FROM srv_vrednost WHERE spr_id='".$parent."' ORDER BY vrstni_red");
- $sql = sisplet_query("SELECT spr_id FROM srv_grid_multiple WHERE ank_id='$this->anketa' AND parent='$parent' ORDER BY vrstni_red");
+ $sql = sisplet_query("SELECT spr_id FROM srv_grid_multiple WHERE ank_id='".$this->anketa."' AND parent='".$parent."' ORDER BY vrstni_red");
while ($row = mysqli_fetch_array($sql)) {
- $sql_grid = sisplet_query("SELECT id, naslov, naslov2, variable, variable_custom FROM srv_vrednost WHERE spr_id = '$row[spr_id]' ORDER BY vrstni_red");
+ $sql_grid = sisplet_query("SELECT id, naslov, naslov2, variable, variable_custom FROM srv_vrednost WHERE spr_id='".$row['spr_id']."' ORDER BY vrstni_red");
+
+ $sql_grid_cnt = mysqli_num_rows($sql_grid);
+ $sql_parent_cnt = mysqli_num_rows($sql_parent);
// dodamo manjkajoce vrstice
- if (mysqli_num_rows($sql_grid) < mysqli_num_rows($sql_parent)) {
+ if ($sql_grid_cnt < $sql_parent_cnt) {
- for ($i=mysqli_num_rows($sql_grid); $i<mysqli_num_rows($sql_parent); $i++) {
+ for ($i=$sql_grid_cnt; $i<$sql_parent_cnt; $i++) {
$this->vrednost_new('', 0, null, $row['spr_id']);
}
-
+ }
// pobrisemo odvecne vrstice
- } elseif (mysqli_num_rows($sql_grid) > mysqli_num_rows($sql_parent)) {
+ elseif ($sql_grid_cnt > $sql_parent_cnt) {
- $limit = mysqli_num_rows($sql_grid) - mysqli_num_rows($sql_parent);
- $s = sisplet_query("DELETE FROM srv_vrednost WHERE spr_id='$row[spr_id]' ORDER BY vrstni_red DESC LIMIT $limit");
+ $limit = $sql_grid_cnt - $sql_parent_cnt;
+ $s = sisplet_query("DELETE FROM srv_vrednost WHERE spr_id='".$row['spr_id']."' ORDER BY vrstni_red DESC LIMIT $limit");
if (!$s) echo mysqli_error($GLOBALS['connect_db']);
-
}
// popravimo napise
mysqli_data_seek($sql_parent, 0);
- mysqli_data_seek($sql_grid, 0);
+ //mysqli_data_seek($sql_grid, 0);
+ $sql_grid = sisplet_query("SELECT id, naslov, naslov2, variable, variable_custom FROM srv_vrednost WHERE spr_id='".$row['spr_id']."' ORDER BY vrstni_red");
while ($row_grid = mysqli_fetch_array($sql_grid) ) {
@@ -7674,7 +8421,7 @@ class Vprasanje {
if($row['enota'] == 1 || $row['enota'] == 0){
$display_trak = 'block';
if($diferencial_trak == 1){
- $display_trak_starting_num = 'block';
+ $display_trak_starting_num = 'flex';
}
else{
$display_trak_starting_num = 'none';
@@ -7685,22 +8432,37 @@ class Vprasanje {
$display_trak_starting_num = 'none';
}
- //koda za izris moznosti za vklop/izklop traku
- echo '<div class="diferencial_trak_class" style="display: '.$display_trak.'">';
- echo '<p><span class="title" ><label for="diferencial_trak_'.$this->spremenljivka.'">'.$lang['srv_diferencial_trak'].':</label></span>';
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="diferencial_trak" '.( $diferencial_trak == 1 ? ' checked="checked"' : '') .' onChange="diferencial_trak_checkbox_prop('.$this->spremenljivka.', '.$row['grids'].');" id="diferencial_trak_'.$this->spremenljivka.'">';
- echo '<input '.$disable_diferencial_trak_hidden.' type="hidden" value="0" name="diferencial_trak" id="diferencial_trak_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div>';
+
+ // koda za izris moznosti za vklop/izklop traku
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <span class="content">';
+
+ echo ' <input type="checkbox" value="1" name="diferencial_trak" '.( $diferencial_trak == 1 ? ' checked="checked"' : '') .' onChange="diferencial_trak_checkbox_prop('.$this->spremenljivka.', '.$row['grids'].');" id="diferencial_trak_'.$this->spremenljivka.'">';
+ echo ' <label for="diferencial_trak_'.$this->spremenljivka.'">'.$lang['srv_diferencial_trak'].Help::display('srv_vprasanje_trak').'</label>';
+ echo ' <input '.$disable_diferencial_trak_hidden.' type="hidden" value="0" name="diferencial_trak" id="diferencial_trak_hidden_'.$this->spremenljivka.'">';
+
+ echo ' </span>';
+ echo ' </div>';
//koda za izris moznosti za vklop/izklop traku - konec
+
//koda za izris polja za vnos zacetne stevilke traku
- echo '<div class="diferencial_trak_starting_num_class_'.$this->spremenljivka.'" style="display: '.$display_trak_starting_num.'"><p><span class="title">' . $lang['srv_diferencial_trak_starting_num'] . ':</span> <span class="content"><input type="text" name="diferencial_trak_starting_num" id="diferencial_trak_starting_num_'.$this->spremenljivka.'" value="' . $diferencial_trak_starting_num . '" size="8" onChange="diferencial_trak_change_values('.$this->spremenljivka.', '.$row['grids'].');"></input></span></p></div>';
+ echo ' <div class="vprasanje_setting_line half-half diferencial_trak_starting_num_class_'.$this->spremenljivka.'" style="display:'.$display_trak_starting_num.'">';
+
+ echo ' <label>'.$lang['srv_diferencial_trak_starting_num'].':</label>';
+ echo ' <span class="content">';
+ echo ' <input type="text" name="diferencial_trak_starting_num" id="diferencial_trak_starting_num_'.$this->spremenljivka.'" value="' . $diferencial_trak_starting_num . '" size="8" onChange="diferencial_trak_change_values('.$this->spremenljivka.', '.$row['grids'].');">';
+ echo ' </span>';
- echo '<div class="trak_num_of_titles_class" style="display: '.$display_trak_starting_num.'">';
- echo '<p><span class="title" >'.$lang['srv_trak_num_of_titles'].':</span>';
- echo '<span class="content"><select name="trak_num_of_titles" id="trak_num_of_titles">';
+ echo ' </div>';
+
+
+ echo ' <div class="vprasanje_setting_line half-half trak_num_of_titles_class" style="display: '.$display_trak_starting_num.'">';
+
+ echo ' <label>'.$lang['srv_trak_num_of_titles'].':</label>';
+ echo ' <span class="content"><select name="trak_num_of_titles" id="trak_num_of_titles">';
$deljivaStevila = [];
$indeksDeljivihStevil = 0;
@@ -7724,12 +8486,15 @@ class Vprasanje {
echo '<option value="'.$deljivaStevila[$i].'"'.($trak_num_of_titles == $deljivaStevila[$i] ? ' selected="true"' : '') . '>'.$deljivaStevila[$i].'</option>';
}
echo '</select></span>';
- echo '</p>';
- echo '</div>';
+
+ echo ' </div>';
+
+
+ echo '</div>';
}
//posodobi skrite vrednosti odgovorov za diferencial trak
- function ajax_diferencial_trak_skrite_vrednosti($spr_id, $num_grids, $diferencial_trak_starting_num){
+ function ajax_diferencial_trak_skrite_vrednosti($spr_id=null, $num_grids=null, $diferencial_trak_starting_num=null ){
if(isset ($_POST['spr_id'])){
$spr_id = $_POST['spr_id'];
}
@@ -7780,12 +8545,14 @@ class Vprasanje {
}
// koda za dropdown za izbiro oblike okvirjev ali skatel
- echo '<div class="drag_and_drop_new_look_class" style="display: '.$display_new_look_option.'">';
- echo '<p><span class="title" >'.$lang['srv_drag_and_drop_new_look_option'].':</span>';
+ echo '<div class="vprasanje_setting_holder drag_and_drop_new_look_class" style="display: '.$display_new_look_option.'">';
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo '<label>'.$lang['srv_drag_and_drop_new_look_option'].':</label>';
echo '<span class="content"><select name="display_drag_and_drop_new_look" id="drag_and_drop_new_look_'.$this->spremenljivka.'" onChange="drag_and_drop_new_look_checkbox_prop('.$this->spremenljivka.');">';
echo '<option value="0"'.($display_drag_and_drop_new_look=='0'?' selected':'').'>'.$lang['srv_drag_and_drop_new_look_option1'].'</option>';
echo '<option value="1"'.($display_drag_and_drop_new_look=='1'?' selected':'').'>'.$lang['srv_drag_and_drop_new_look_option2'].'</option>';
- echo '</select></span></p>';
+ echo '</select></span>';
+ echo '</div>';
echo '</div>';
}
@@ -7806,17 +8573,19 @@ class Vprasanje {
$display = ( ( $row['tip'] == 6 && ($row['enota'] == 0 || $row['enota'] == 1) ) || ( $row['tip'] == 16 && ($row['enota'] == 0 || $row['enota'] == 1) ) ) && ($diferencial_trak == 0) ? '' : 'style="display:none;"';
- echo '<div class="drop_custom_column_labels" '.$display.'>';
+ echo '<div class="vprasanje_setting_holder drop_custom_column_labels" '.$display.'>';
- echo '<p><span class="title" >'.$lang['srv_custom_column_labels_presentation'].':</span>';
+ echo ' <div class="vprasanje_setting_line half-half">';
- echo '<span class="content"><select name="custom_column_label_option" id="custom_column_label_option_'.$row['id'].'" >';
- echo '<option value="1"'.($custom_column_label_option=='1'?' selected':'').'>'.$lang['srv_custom_column_labels_o1'].'</option>';
- echo '<option value="2"'.($custom_column_label_option=='2'?' selected':'').'>'.$lang['srv_custom_column_labels_o2'].'</option>';
- echo '<option value="3"'.($custom_column_label_option=='3'?' selected':'').'>'.$lang['srv_custom_column_labels_o3'].'</option>';
- echo '</select></span>';
+ echo ' <label>'.$lang['srv_custom_column_labels_presentation'].':</label>';
- echo '</p>';
+ echo ' <span class="content"><select name="custom_column_label_option" id="custom_column_label_option_'.$row['id'].'" >';
+ echo ' <option value="1"'.($custom_column_label_option=='1'?' selected':'').'>'.$lang['srv_custom_column_labels_o1'].'</option>';
+ echo ' <option value="2"'.($custom_column_label_option=='2'?' selected':'').'>'.$lang['srv_custom_column_labels_o2'].'</option>';
+ echo ' <option value="3"'.($custom_column_label_option=='3'?' selected':'').'>'.$lang['srv_custom_column_labels_o3'].'</option>';
+ echo ' </select></span>';
+
+ echo ' </div>';
echo '</div>';
}
@@ -7830,19 +8599,22 @@ class Vprasanje {
$grid_repeat_header = ($spremenljivkaParams->get('grid_repeat_header') ? $spremenljivkaParams->get('grid_repeat_header') : 0);
- echo '<div class="grid_repeat_header">';
+
+ echo '<div class="vprasanje_setting_holder grid_repeat_header">';
+
+ echo ' <div class="vprasanje_setting_line half-half">';
- echo '<p><span class="title" >'.$lang['srv_grid_repeat_header'].':</span>';
+ echo ' <label>'.$lang['srv_grid_repeat_header'].':</label>';
- echo '<span class="content"><select name="grid_repeat_header" id="grid_repeat_header_'.$row['id'].'" >';
- echo '<option value="0"'.($grid_repeat_header=='0'?' selected':'').'>'.$lang['srv_grid_repeat_header_0'].'</option>';
- echo '<option value="5"'.($grid_repeat_header=='5'?' selected':'').'>'.$lang['srv_grid_repeat_header_5'].'</option>';
- echo '<option value="10"'.($grid_repeat_header=='10'?' selected':'').'>'.$lang['srv_grid_repeat_header_10'].'</option>';
- echo '<option value="15"'.($grid_repeat_header=='15'?' selected':'').'>'.$lang['srv_grid_repeat_header_15'].'</option>';
- echo '<option value="20"'.($grid_repeat_header=='20'?' selected':'').'>'.$lang['srv_grid_repeat_header_20'].'</option>';
- echo '</select></span>';
+ echo ' <span class="content"><select name="grid_repeat_header" id="grid_repeat_header_'.$row['id'].'" >';
+ echo ' <option value="0"'.($grid_repeat_header=='0'?' selected':'').'>'.$lang['srv_grid_repeat_header_0'].'</option>';
+ echo ' <option value="5"'.($grid_repeat_header=='5'?' selected':'').'>'.$lang['srv_grid_repeat_header_5'].'</option>';
+ echo ' <option value="10"'.($grid_repeat_header=='10'?' selected':'').'>'.$lang['srv_grid_repeat_header_10'].'</option>';
+ echo ' <option value="15"'.($grid_repeat_header=='15'?' selected':'').'>'.$lang['srv_grid_repeat_header_15'].'</option>';
+ echo ' <option value="20"'.($grid_repeat_header=='20'?' selected':'').'>'.$lang['srv_grid_repeat_header_20'].'</option>';
+ echo ' </select></span>';
- echo '</p>';
+ echo ' </div>';
echo '</div>';
}
@@ -7890,16 +8662,17 @@ class Vprasanje {
$spr_id = $row['id'];
+
//preveri, ce je kaksno obmocje shranjeno v bazi
- //$sqlR = sisplet_query("SELECT * FROM srv_hotspot_regions WHERE spr_id = $spr_id");
$sqlR = sisplet_query("SELECT region_index, vre_id, region_name FROM srv_hotspot_regions WHERE spr_id = $spr_id");
- //$rowR = mysqli_fetch_array($sql);
if($row['tip'] == 1 || $row['tip'] == 2){
$enota_orientation = $row['orientation'];
- }else if($row['tip'] == 6){
+ }
+ else if($row['tip'] == 6){
$enota_orientation = $row['enota'];
}
+
?>
<script>
$(document).ready(function(){
@@ -7908,153 +8681,195 @@ class Vprasanje {
init_colorPicker(<?=$row['id']?>);
});
</script>
-
<?
- //roleta za izbiro najvecjega stevila klikov na sliko
- echo '<p><span class="title">'.$lang['srv_vprasanje_heatmap_num_clicks'].':<span id="help_hotspot_visibility" class="spaceLeft">'.Help::display('srv_hotspot_visibility').' </span></span>';
- echo '<span class="content"><select id="heatmap_num_clicks_' . $row['id'] . '" spr_id="'.$row['id'].'" name="heatmap_num_clicks" onChange="showHeatMapClickCounter($(this).val(), '.$row['id'].')">';
- echo '<option value="1" '.(($heatmap_num_clicks == 1) ? ' selected="true" ' : '').'>1</option>';
- echo '<option value="2" '.(($heatmap_num_clicks == 2) ? ' selected="true" ' : '').'>2</option>';
- echo '<option value="3" '.(($heatmap_num_clicks == 3) ? ' selected="true" ' : '').'>3</option>';
- echo '<option value="4" '.(($heatmap_num_clicks == 4) ? ' selected="true" ' : '').'>4</option>';
- echo '<option value="5" '.(($heatmap_num_clicks == 5) ? ' selected="true" ' : '').'>5</option>';
- echo '<option value="6" '.(($heatmap_num_clicks == 6) ? ' selected="true" ' : '').'>6</option>';
- echo '<option value="7" '.(($heatmap_num_clicks == 7) ? ' selected="true" ' : '').'>7</option>';
- echo '<option value="8" '.(($heatmap_num_clicks == 8) ? ' selected="true" ' : '').'>8</option>';
- echo '<option value="9" '.(($heatmap_num_clicks == 9) ? ' selected="true" ' : '').'>9</option>';
- echo '<option value="10" '.(($heatmap_num_clicks == 10) ? ' selected="true" ' : '').'>10</option>';
- echo '</select>';
- echo '</span></p>';
- //roleta za izbiro najvecjega stevila klikov na sliko - konec
-
- //checkbox za "Pokazi stevec klikov"
- echo '<label for="heatmap_show_counter_clicks_'.$this->spremenljivka.'"><div style="'.$enableHeatMapClickCounter.'" class="heatmap_show_counter_clicks_class">';
- echo '<p><span class="title" >'.$lang['srv_vprasanje_heatmap_show_counter_clicks'].':</span>';
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="heatmap_show_counter_clicks" '.( $heatmap_show_counter_clicks == 1 ? ' checked="checked"' : '') .' onChange="heatmap_show_counter_clicks_checkbox_prop('.$this->spremenljivka.');" id="heatmap_show_counter_clicks_'.$this->spremenljivka.'">';
- echo '<input '.$disable_heatmap_show_counter_clicks_hidden.' type="hidden" value="0" name="heatmap_show_counter_clicks" id="heatmap_show_counter_clicks_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div></label>';
- //checkbox za "Pokazi stevec klikov" - konec
+
+ echo '<fieldset><legend>'.$lang['srv_hot_spot_settings'].'</legend>';
+
+ // roleta za izbiro najvecjega stevila klikov na sliko
+ echo '<div class="vprasanje_setting_holder">';
- //checkbox za "Pokazi klike"
- echo '<label for="heatmap_show_clicks_'.$this->spremenljivka.'"><div class="heatmap_show_clicks_class">';
- echo '<p><span class="title" >'.$lang['srv_vprasanje_heatmap_show_clicks'].':</span>';
- echo '<span class="content">';
- echo '<input type="checkbox" value="1" name="heatmap_show_clicks" '.( $heatmap_show_clicks == 1 ? ' checked="checked"' : '') .' onChange="heatmap_show_clicks_checkbox_prop('.$this->spremenljivka.');" id="heatmap_show_clicks_'.$this->spremenljivka.'">';
- echo '<input '.$disable_heatmap_show_clicks_hidden.' type="hidden" value="0" name="heatmap_show_clicks" id="heatmap_show_clicks_hidden_'.$this->spremenljivka.'">';
- echo '</span></p>';
- echo '</div></label>';
- //checkbox za "Pokazi klike" - konec
-
- //dodatne nastavitve, ce morajo biti kliki vidni
-
- echo '<div id="heatmap_clicks_settings_'.$row['id'].'" '.$heatmap_clicks_settings_display.'>';
-
- //Izbira barve klika
- if ($heatmap_click_color == '') {
- $value = '#000000';
- echo '<div><p><span class="title">'.$lang['srv_vprasanje_heatmap_clicks_color'].': <a href="#" onclick="$(\'#color-click-'.$row['id'].'\').show(); $(this).parent().hide(); return false;" title="'.$lang['edit4'].'">'.$lang['srv_te_default'].' <span class="faicon edit"></span></a></span></p></div>';
- }else{
- $value = $heatmap_click_color;
- }
- echo '<div><p><span class="title" id="color-click-'.$row['id'].'" '.($heatmap_click_color==''?'style="display:none;"':'').'>'.$lang['srv_vprasanje_heatmap_clicks_color'].': ';
- echo '<input type="text" id="color-click'.$row['id'].'" class="colorwell auto-save" name="heatmap_click_color" value="'.$value.'" data-id="'.$row['id'].'" data-type="'.$type.'" >';
- echo '</span></p></div>';
-
- echo '<div id="picker"></div>';
- //Izbira barve klika - konec
-
- //Izbira radija/velikosti klika
- echo '<div><p><span>'.$lang['srv_vprasanje_heatmap_clicks_size'].': <input id="heatmapClickSize_'.$row['id'].'" name="heatmap_click_size" type="range" min="2" max="50" step="1" value="'.$heatmap_click_size.'" oninput="UpdateClickSizeSlider(value, '.$row['id'].')"/><output for="heatmapClickSize_'.$row['id'].'" id="heatmapClickSizeValue_'.$row['id'].'">'.$heatmap_click_size.'</output></span></p></div>';
- //Izbira radija/velikosti klika - konec
+ echo ' <div id="help_hotspot_visibility" class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_heatmap_num_clicks'].' '.Help::display('srv_hotspot_visibility').':</label>';
+
+ echo ' <span class="content"><select id="heatmap_num_clicks_' . $row['id'] . '" spr_id="'.$row['id'].'" name="heatmap_num_clicks" onChange="showHeatMapClickCounter($(this).val(), '.$row['id'].')">';
+ echo ' <option value="1" '.(($heatmap_num_clicks == 1) ? ' selected="true" ' : '').'>1</option>';
+ echo ' <option value="2" '.(($heatmap_num_clicks == 2) ? ' selected="true" ' : '').'>2</option>';
+ echo ' <option value="3" '.(($heatmap_num_clicks == 3) ? ' selected="true" ' : '').'>3</option>';
+ echo ' <option value="4" '.(($heatmap_num_clicks == 4) ? ' selected="true" ' : '').'>4</option>';
+ echo ' <option value="5" '.(($heatmap_num_clicks == 5) ? ' selected="true" ' : '').'>5</option>';
+ echo ' <option value="6" '.(($heatmap_num_clicks == 6) ? ' selected="true" ' : '').'>6</option>';
+ echo ' <option value="7" '.(($heatmap_num_clicks == 7) ? ' selected="true" ' : '').'>7</option>';
+ echo ' <option value="8" '.(($heatmap_num_clicks == 8) ? ' selected="true" ' : '').'>8</option>';
+ echo ' <option value="9" '.(($heatmap_num_clicks == 9) ? ' selected="true" ' : '').'>9</option>';
+ echo ' <option value="10" '.(($heatmap_num_clicks == 10) ? ' selected="true" ' : '').'>10</option>';
+ echo ' </select></span>';
- //Izbira oblike klika $heatmap_click_shape
- echo '<div><p><span class="title">'.$lang['srv_vprasanje_heatmap_clicks_shape'].': </span>';
- echo '<span class="content"><select id="heatmapClickShape_' . $row['id'] . '" spr_id="'.$row['id'].'" name="heatmap_click_shape" onChange="">';
- echo '<option value="1" '.(($heatmap_click_shape == 1) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_heatmap_clicks_shape_1'].'</option>';
- echo '<option value="2" '.(($heatmap_click_shape == 2) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_heatmap_clicks_shape_2'].'</option>';
- echo '</select>';
- echo '</span></p></div>';
- //Izbira oblike klika - konec
+ echo ' </div>';
+
+ // checkbox za "Pokazi stevec klikov"
+ echo ' <div id="help_hotspot_visibility" class="vprasanje_setting_line heatmap_show_counter_clicks_class" style="'.$enableHeatMapClickCounter.'">';
+ echo ' <span class="content">';
+ echo ' <input type="checkbox" value="1" name="heatmap_show_counter_clicks" '.( $heatmap_show_counter_clicks == 1 ? ' checked="checked"' : '') .' onChange="heatmap_show_counter_clicks_checkbox_prop('.$this->spremenljivka.');" id="heatmap_show_counter_clicks_'.$this->spremenljivka.'">';
+ echo ' <label for="heatmap_show_counter_clicks_'.$this->spremenljivka.'">'.$lang['srv_vprasanje_heatmap_show_counter_clicks'].'</label>';
+ echo ' <input '.$disable_heatmap_show_counter_clicks_hidden.' type="hidden" value="0" name="heatmap_show_counter_clicks" id="heatmap_show_counter_clicks_hidden_'.$this->spremenljivka.'">';
+ echo ' </span>';
+
+ echo ' </div>';
+
+ echo '</div>';
+ // roleta za izbiro najvecjega stevila klikov na sliko - konec
+
+ //checkbox za "Pokazi klike"
+ echo '<div class="vprasanje_setting_holder">';
+
+ echo ' <div id="help_hotspot_visibility" class="vprasanje_setting_line heatmap_show_clicks_class">';
+
+ echo ' <span class="content">';
+ echo ' <input type="checkbox" value="1" name="heatmap_show_clicks" '.( $heatmap_show_clicks == 1 ? ' checked="checked"' : '') .' onChange="heatmap_show_clicks_checkbox_prop('.$this->spremenljivka.');" id="heatmap_show_clicks_'.$this->spremenljivka.'">';
+ echo ' <label for="heatmap_show_clicks_'.$this->spremenljivka.'">'.$lang['srv_vprasanje_heatmap_show_clicks'].'</label>';
+ echo ' <input '.$disable_heatmap_show_clicks_hidden.' type="hidden" value="0" name="heatmap_show_clicks" id="heatmap_show_clicks_hidden_'.$this->spremenljivka.'">';
+ echo ' </span>';
+
+ echo ' </div>';
+
echo '</div>';
- //dodatne nastavitve, ce morajo biti kliki vidni - konec
+ //checkbox za "Pokazi klike" - konec
+
+
+ // dodatne nastavitve, ce morajo biti kliki vidni
+ echo '<div id="heatmap_clicks_settings_'.$row['id'].'" class="vprasanje_setting_holder heatmap_show_clicks_class" '.$heatmap_clicks_settings_display.'>';
+
+ //Izbira barve klika
+ if ($heatmap_click_color == '') {
+ $value = '#000000';
+ echo '<div><p><span class="title">'.$lang['srv_vprasanje_heatmap_clicks_color'].': <a href="#" onclick="$(\'#color-click-'.$row['id'].'\').show(); $(this).parent().hide(); return false;" title="'.$lang['edit4'].'">'.$lang['srv_te_default'].' <span class="faicon edit"></span></a></span></p></div>';
+ }
+ else{
+ $value = $heatmap_click_color;
+ }
+ echo '<div><p><span class="title" id="color-click-'.$row['id'].'" '.($heatmap_click_color==''?'style="display:none;"':'').'>'.$lang['srv_vprasanje_heatmap_clicks_color'].': ';
+ echo '<input type="text" id="color-click'.$row['id'].'" class="colorwell auto-save" name="heatmap_click_color" value="'.$value.'" data-id="'.$row['id'].'">';
+ echo '</span></p></div>';
+
+ echo '<div id="picker"></div>';
+ //Izbira barve klika - konec
+
+ //Izbira radija/velikosti klika
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_heatmap_clicks_size'].':</label>';
+ echo ' <input id="heatmapClickSize_'.$row['id'].'" name="heatmap_click_size" type="range" min="2" max="50" step="1" value="'.$heatmap_click_size.'" oninput="UpdateClickSizeSlider(value, '.$row['id'].')"/><output for="heatmapClickSize_'.$row['id'].'" id="heatmapClickSizeValue_'.$row['id'].'">'.$heatmap_click_size.'</output>';
+ echo ' </div>';
+ //Izbira radija/velikosti klika - konec
+
+ //Izbira oblike klika $heatmap_click_shape
+ echo ' <div class="vprasanje_setting_line half-half">';
+ echo ' <label>'.$lang['srv_vprasanje_heatmap_clicks_shape'].':</label>';
+ echo ' <span class="content"><select id="heatmapClickShape_' . $row['id'] . '" spr_id="'.$row['id'].'" name="heatmap_click_shape" onChange="">';
+ echo ' <option value="1" '.(($heatmap_click_shape == 1) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_heatmap_clicks_shape_1'].'</option>';
+ echo ' <option value="2" '.(($heatmap_click_shape == 2) ? ' selected="true" ' : '').'>'.$lang['srv_vprasanje_heatmap_clicks_shape_2'].'</option>';
+ echo ' </select></span>';
+ echo ' </div>';
+ //Izbira oblike klika - konec
+
+ echo '</div>';
+ //dodatne nastavitve, ce morajo biti kliki vidni - konec
+
+
+ echo '</fieldset>';
+
//fieldset Obmocja - zacasno skrivanje
echo '<fieldset id="hot_spot_fieldset_'.$row['id'].'"><legend>'.$lang['srv_hot_spot_regions_menu'].'</legend>';
- if (mysqli_num_rows($sqlR) != 0){
- //pokazi shranjena obmocja
- while ($rowR = mysqli_fetch_array($sqlR)) {
- echo '<div id="hotspot_region_'.$rowR['region_index'].'" class="hotspot_region"><div id="hotspot_region_name_'.$rowR['region_index'].'" vre_id="'.$rowR['vre_id'].'" region_index = "'.$rowR['region_index'].'" class="hotspot_vrednost_inline" contenteditable="true">'.$rowR['region_name'].'</div><span class="faicon edit2 inline_hotspot_edit_region"></span><span class="faicon delete_circle icon-orange_link inline_hotspot_delete_region"></span><br /></div>';
- }
- }
- //Sporocilo ob odsotnosti slike
- echo '<p id="hotspot_message"><span class="title" >'.$lang['srv_hotspot_message'].'</span></p>';
- //Sporocilo ob odsotnosti slike - konec
-
- //Dodajanje območja - gumb
- echo '<p><span class="title" ><button id="hot_spot_regions_add_button" type="button" onclick=" hotspot_edit_regions('.$row['id'].', 0)">'.$lang['srv_hot_spot_regions'].'</button></span></p>';
-
- //*************************** SKRIVANJE NASTAVITEV OBMOCJA
- $display_regions_menu = 'style="display:none;"'; //skrivanje nastavitev obmocja + v js datotekah
- //***************************
- //div za nastavitve obmocja
- echo '<div id="heatmap_region_settings_'.$row['id'].'" '.$display_regions_menu.'>';
- //Izbira barve obmocja
- if ($hotspot_region_color == '') {
- $value = '#000000';
- echo '<span class="title">'.$lang['srv_hotspot_region_color_text'].': <a href="#" onclick="$(\'#color-'.$row['id'].'\').show(); $(this).parent().hide(); return false;" title="'.$lang['edit4'].'">'.$lang['srv_te_default'].' <span class="faicon edit"></span></a></span>';
- }else{
- $value = $hotspot_region_color;
- }
-
- echo '<span class="title" id="color-'.$row['id'].'" '.($hotspot_region_color==''?'style="display:none;"':'').'>'.$lang['srv_hotspot_region_color_text'].': ';
- echo '<input type="text" id="color'.$row['id'].'" class="colorwell auto-save" name="hotspot_region_color" value="'.$value.'" data-id="'.$row['id'].'" data-type="'.$type.'" >';
- echo '</span>';
-
- echo '<div id="picker"></div>';
- //Izbira barve obmocja - konec
-
- //Regions visibility options
- echo '<p><span class="title">'.$lang['srv_hotspot_visibility_options_title'].':<span id="help_hotspot_visibility" class="spaceLeft">'.Help::display('srv_hotspot_visibility').' </span></span>';
- echo '<span class="title"><select id="hotspot_region_visibility_options_' . $row['id'] . '" spr_id="'.$row['id'].'" name="hotspot_region_visibility_option" onChange="">';
- echo '<option value="0" '.(($hotspot_region_visibility_option == 0) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_0'].'</option>';
- echo '<option value="1" '.(($hotspot_region_visibility_option == 1) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_1'].'</option>';
- echo '<option value="2" '.(($hotspot_region_visibility_option == 2) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_2'].'</option>';
- //echo '<option value="3" '.(($hotspot_region_visibility_option == 3) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_3'].'</option>';
- echo '</select>';
- echo '</span></p>';
- //Regions visibility options - konec
-
- //Tooltips options
- if($row['tip'] == 1 || $row['tip'] == 2){ //ce je radio ali checkbox
- $srv_hotspot_tooltip = 'srv_hotspot_tooltip';
- }else if($row['tip'] == 6){
- $srv_hotspot_tooltip = 'srv_hotspot_tooltip_grid';
- }
- echo '<p><span class="title">'.$lang['srv_hotspot_tooltips_options_title'].':<span id="help_hotspot_namig" class="spaceLeft">'.Help::display($srv_hotspot_tooltip).' </span></span>';
- echo '<span class="title"><select id="hotspot_tooltips_options_' . $row['id'] . '" spr_id="'.$row['id'].'" name="hotspot_tooltips_option" onChange="">';
- echo '<option value="0" '.(($hotspot_tooltips_option == 0) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_tooltips_options_0'].'</option>';
- if($row['tip'] == 1 || $row['tip'] == 2){ //ce je radio ali checkbox
- echo '<option value="1" '.(($hotspot_tooltips_option == 1) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_tooltips_options_1'].'</option>';
- }
- if($row['tip'] == 6){ //ce je radio grid
- echo '<option value="2" '.(($hotspot_tooltips_option == 2) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_tooltips_options_2'].'</option>';
- }
+ if (mysqli_num_rows($sqlR) != 0){
- echo '</select>';
- echo '</span></p>';
- //Tooltips options - konec
- echo '</div>';
- //div za nastavitve obmocja - konec
+ echo '<div class="vprasanje_setting_holder">';
+
+ //pokazi shranjena obmocja
+ while ($rowR = mysqli_fetch_array($sqlR)) {
+ echo ' <div class="vprasanje_setting_line">';
+ echo ' <div id="hotspot_region_'.$rowR['region_index'].'" class="hotspot_region"><div id="hotspot_region_name_'.$rowR['region_index'].'" vre_id="'.$rowR['vre_id'].'" region_index = "'.$rowR['region_index'].'" class="hotspot_vrednost_inline" contenteditable="true">'.$rowR['region_name'].'</div><span class="faicon edit2 inline_hotspot_edit_region"></span><span class="faicon delete_circle icon-orange_link inline_hotspot_delete_region"></span><br /></div>';
+ echo ' </div>';
+ }
+
+ echo ' </div>';
+ }
+
+ //Sporocilo ob odsotnosti slike
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div id="hotspot_message" class="vprasanje_setting_line">';
+ echo ' <span class="content">'.$lang['srv_hotspot_message'].'</span>';
+ echo ' </div>';
+ echo '</div>';
+ //Sporocilo ob odsotnosti slike - konec
+
+
+ //Dodajanje območja - gumb
+ echo '<div class="vprasanje_setting_holder">';
+ echo ' <div id="hot_spot_regions_add_button" class="vprasanje_setting_line">';
+ echo ' <span class="content"><button type="button" onclick=" hotspot_edit_regions('.$row['id'].', 0)">'.$lang['srv_hot_spot_regions'].'</button></span>';
+ echo ' </div>';
+ echo '</div>';
+
+ //*************************** SKRIVANJE NASTAVITEV OBMOCJA
+ $display_regions_menu = 'style="display:none;"'; //skrivanje nastavitev obmocja + v js datotekah
+ //***************************
+ //div za nastavitve obmocja
+ echo '<div id="heatmap_region_settings_'.$row['id'].'" '.$display_regions_menu.'>';
+ //Izbira barve obmocja
+ if ($hotspot_region_color == '') {
+ $value = '#000000';
+ echo '<span class="title">'.$lang['srv_hotspot_region_color_text'].': <a href="#" onclick="$(\'#color-'.$row['id'].'\').show(); $(this).parent().hide(); return false;" title="'.$lang['edit4'].'">'.$lang['srv_te_default'].' <span class="faicon edit"></span></a></span>';
+ }else{
+ $value = $hotspot_region_color;
+ }
+
+ echo '<span class="title" id="color-'.$row['id'].'" '.($hotspot_region_color==''?'style="display:none;"':'').'>'.$lang['srv_hotspot_region_color_text'].': ';
+ echo '<input type="text" id="color'.$row['id'].'" class="colorwell auto-save" name="hotspot_region_color" value="'.$value.'" data-id="'.$row['id'].'">';
+ echo '</span>';
+
+ echo '<div id="picker"></div>';
+ //Izbira barve obmocja - konec
+
+ //Regions visibility options
+ echo '<p><span class="title">'.$lang['srv_hotspot_visibility_options_title'].':<span id="help_hotspot_visibility" class="spaceLeft">'.Help::display('srv_hotspot_visibility').' </span></span>';
+ echo '<span class="title"><select id="hotspot_region_visibility_options_' . $row['id'] . '" spr_id="'.$row['id'].'" name="hotspot_region_visibility_option" onChange="">';
+ echo '<option value="0" '.(($hotspot_region_visibility_option == 0) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_0'].'</option>';
+ echo '<option value="1" '.(($hotspot_region_visibility_option == 1) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_1'].'</option>';
+ echo '<option value="2" '.(($hotspot_region_visibility_option == 2) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_2'].'</option>';
+ //echo '<option value="3" '.(($hotspot_region_visibility_option == 3) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_visibility_options_3'].'</option>';
+ echo '</select>';
+ echo '</span></p>';
+ //Regions visibility options - konec
+
+ //Tooltips options
+ if($row['tip'] == 1 || $row['tip'] == 2){ //ce je radio ali checkbox
+ $srv_hotspot_tooltip = 'srv_hotspot_tooltip';
+ }else if($row['tip'] == 6){
+ $srv_hotspot_tooltip = 'srv_hotspot_tooltip_grid';
+ }
+
+ echo '<p><span class="title">'.$lang['srv_hotspot_tooltips_options_title'].':<span id="help_hotspot_namig" class="spaceLeft">'.Help::display($srv_hotspot_tooltip).' </span></span>';
+ echo '<span class="title"><select id="hotspot_tooltips_options_' . $row['id'] . '" spr_id="'.$row['id'].'" name="hotspot_tooltips_option" onChange="">';
+ echo '<option value="0" '.(($hotspot_tooltips_option == 0) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_tooltips_options_0'].'</option>';
+ if($row['tip'] == 1 || $row['tip'] == 2){ //ce je radio ali checkbox
+ echo '<option value="1" '.(($hotspot_tooltips_option == 1) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_tooltips_options_1'].'</option>';
+ }
+ if($row['tip'] == 6){ //ce je radio grid
+ echo '<option value="2" '.(($hotspot_tooltips_option == 2) ? ' selected="true" ' : '').'>'.$lang['srv_hotspot_tooltips_options_2'].'</option>';
+ }
+
+ echo '</select>';
+ echo '</span></p>';
+ //Tooltips options - konec
+ echo '</div>';
+ //div za nastavitve obmocja - konec
echo '</fieldset>';
//fieldset Obmocja - konec
-
}
}