summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/class.SurveyInpect.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/class.SurveyInpect.php')
-rw-r--r--admin/survey/classes/class.SurveyInpect.php175
1 files changed, 109 insertions, 66 deletions
diff --git a/admin/survey/classes/class.SurveyInpect.php b/admin/survey/classes/class.SurveyInpect.php
index 6bfac12..3f7ce92 100644
--- a/admin/survey/classes/class.SurveyInpect.php
+++ b/admin/survey/classes/class.SurveyInpect.php
@@ -516,9 +516,8 @@ class SurveyInspect {
$css = ($this->enableInspect == SI_DEFAULT_PROFILE ? ' gray' : '');
if ($hideAdvanced == false || $this->enableInspect != SI_DEFAULT_PROFILE) {
- echo '<li class="space">&nbsp;</li>';
echo '<li>';
- echo '<span class="as_link'.$css.'" id="link_inspect" title="' . $lang['srv_inspect_setting'] . '" onClick="show_inspect_settings();">' . $lang['srv_inspect_setting'] . '</span>'."\n";
+ echo ' <span class="'.$css.'" id="link_inspect" title="' . $lang['srv_inspect_setting'] . '" onClick="show_inspect_settings();">' . $lang['srv_inspect_setting'] . '</span>'."\n";
echo '</li>';
}
@@ -543,50 +542,78 @@ class SurveyInspect {
echo '<h2>'.$lang['srv_inspect_setting'].'</h2>';
if ( $this->enableInspect != SI_DEFAULT_PROFILE ) {
- echo '<div id="not_default_setting">';
+ echo '<div id="not_default_setting" class="popup_note">';
echo $lang['srv_not_default_setting'];
- echo '</div><br class="clr displayNone">';
+ echo '</div>';
}
+
+ echo '<div class="popup_main">';
+
+
# Nastavitve za Inspect
- echo '<p>'.$lang['srv_inspect_setting_link'].'</p>';
- echo '<p>';
- echo '<label>'.$lang['srv_inspect_setting_enabled'].'</label>';
- echo '&nbsp;<input id="enableInspect0" name="enableInspect" type="radio" value="0"' .
- (($this->enableInspect == false) ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
- echo '<label for="enableInspect0">'.$lang['no'].'</label>';
-
- echo '&nbsp;<input id="enableInspect1" name="enableInspect" type="radio" value="1"' .
- (($this->enableInspect == true) ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
- echo '<label for="enableInspect1">'.$lang['yes'].'</label>';
- echo Help :: display('srv_crosstab_inspect');
- echo '</p>';
- echo '<p>';
- echo '<div>';
- echo '<span class="floatLeft">'.$lang['srv_inspect_goto_note'].'</span>&nbsp;';
- echo '<span class="floatLeft">';
- echo '<label><input type="radio" name="inspectGoto" id="inspectGoto_'.SI_GOTO_ANALIZE.'" value="'.SI_GOTO_ANALIZE.'"'.($this->inspect_goto == SI_GOTO_ANALIZE ? ' checked="checked"' : '').' onchange="inspectRadioChange();return false;" autocomplete="off"/>'.$lang['srv_inspect_goto_'.SI_GOTO_ANALIZE].'</label><br/>';
- echo '<label><input type="radio" name="inspectGoto" id="inspectGoto_'.SI_GOTO_VPOGLED.'" value="'.SI_GOTO_VPOGLED.'"'.($this->inspect_goto == SI_GOTO_VPOGLED ? ' checked="checked"' : '').' onchange="inspectRadioChange();return false;" autocomplete="off"/>'.$lang['srv_inspect_goto_'.SI_GOTO_VPOGLED].'</label> <br/>';
- echo '<label><input type="radio" name="inspectGoto" id="inspectGoto_'.SI_GOTO_PODATKI.'" value="'.SI_GOTO_PODATKI.'"'.($this->inspect_goto == SI_GOTO_PODATKI ? ' checked="checked"' : '').' onchange="inspectRadioChange();return false;" autocomplete="off"/>'.$lang['srv_inspect_goto_'.SI_GOTO_PODATKI].'</label>';
- echo '</span>';
+ echo '<p class="bottom16">';
+ echo $lang['srv_inspect_setting_link'];
+ echo '</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<p class="setting_title">'.$lang['srv_inspect_setting_enabled'].'</p>';
+
+ echo '<div class="horizontal">';
+
+ echo '<div class="setting_item">';
+ echo ' <input id="enableInspect0" name="enableInspect" type="radio" value="0" '.(($this->enableInspect == false) ? ' checked="checked" ' : '').' autocomplete="off">';
+ echo ' <label for="enableInspect0">'.$lang['no'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input id="enableInspect1" name="enableInspect" type="radio" value="1" '.(($this->enableInspect == true) ? ' checked="checked" ' : '') . ' autocomplete="off">';
+ echo ' <label for="enableInspect1">'.$lang['yes'].' '.Help :: display('srv_crosstab_inspect').'</label>';
echo '</div>';
- echo'</p>';
- echo'<br class="clr">';
- echo '<p>';
- echo '<div id="inspectListDiv" '.($this->inspect_goto != SI_GOTO_PODATKI ? ' class="displayNone"' : '').'>';
- echo '<span>'.$lang['srv_inspect_setting_show_variables'].'</span>';
- echo '<span id="inspectListSpr" class="as_link">';
+
+ echo '</div>';
+ echo '</div>';
+
+
+ echo '<div class="setting_holder">';
+ echo '<p class="setting_title">'.$lang['srv_inspect_goto_note'].'</p>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="inspectGoto" id="inspectGoto_'.SI_GOTO_ANALIZE.'" value="'.SI_GOTO_ANALIZE.'"'.($this->inspect_goto == SI_GOTO_ANALIZE ? ' checked="checked"' : '').' onchange="inspectRadioChange();return false;" autocomplete="off">';
+ echo ' <label>'.$lang['srv_inspect_goto_'.SI_GOTO_ANALIZE].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="inspectGoto" id="inspectGoto_'.SI_GOTO_VPOGLED.'" value="'.SI_GOTO_VPOGLED.'"'.($this->inspect_goto == SI_GOTO_VPOGLED ? ' checked="checked"' : '').' onchange="inspectRadioChange();return false;" autocomplete="off">';
+ echo ' <label>'.$lang['srv_inspect_goto_'.SI_GOTO_VPOGLED].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="inspectGoto" id="inspectGoto_'.SI_GOTO_PODATKI.'" value="'.SI_GOTO_PODATKI.'"'.($this->inspect_goto == SI_GOTO_PODATKI ? ' checked="checked"' : '').' onchange="inspectRadioChange();return false;" autocomplete="off">';
+ echo ' <label>'.$lang['srv_inspect_goto_'.SI_GOTO_PODATKI].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div id="inspectListDiv" class="settings_block" '.($this->inspect_goto != SI_GOTO_PODATKI ? ' class="displayNone"' : '').'>';
+ echo ' <div class="setting_line">';
+ echo $lang['srv_inspect_setting_show_variables'];
+ echo ' <span id="inspectListSpr" class="as_link">';
$this->displayInspectVars();
- echo '</span>';
+ echo ' </span>';
+ echo ' </div>';
echo '</div>';
- echo '</p>';
- echo '<span class="floatRight" title="'.$lang['srv_save_profile'].'"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="inspectSaveSettings(); return false;"><span>'.$lang['srv_save_profile'] . '</span></a></div></span>';
- echo '<span class="floatRight spaceRight" title="'.$lang['srv_close_profile'].'"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="inspectCloseSettings(); return false;"><span>'.$lang['srv_close_profile'] . '</span></a></div></span>';
// cover Div
echo '<div id="inspect_cover_div"></div>'."\n";
+
+
+ echo '</div>';
+
+ // Gumbi
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" title="'.$lang['srv_close_profile'].'" onclick="inspectCloseSettings(); return false;">'.$lang['srv_close_profile'] . '</button>';
+ echo ' <button class="medium blue" title="'.$lang['srv_save_profile'].'" onclick="inspectSaveSettings(); return false;">'.$lang['srv_save_profile'] . '</button>';
+ echo '</div>';
}
function displayInspectVars() {
@@ -608,31 +635,42 @@ class SurveyInspect {
}
function showInspectListSpr() {
-
global $lang, $site_url;
+
$all_spr = Cache::cache_all_srv_spremenljivka($this->sid);
$vars = $_SESSION['dataSetting_profile'][$this->sid]['InspectListVars'];
+
echo '<div id="dsp_inspect_cover">';
- echo '<div id="dsp_inspect_spr_select">';
- echo '<span>'.$lang['srv_inspect_choose'].'</span>';
+
+ echo '<h2>'.$lang['srv_questions'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onClick="$(\'#inspect_cover_div\').hide(); $(\'#fullscreen\').removeClass(\'z-index200\').fadeOut();">✕</a></div>';
+
+
+ echo '<div id="dsp_inspect_spr_select" class="popup_main">';
+
+ echo '<div class="setting_line">'.$lang['srv_inspect_choose'].'</div>';
+
+ echo '<div class="settings_block">';
foreach ($all_spr AS $id => $spremenljivka) {
- echo '<div class="dsp_inspect_var">';
- echo '<input name="dsp_inspect_vars" id="dsp_inspect_var_'.$spremenljivka['id'].'" value="'.$spremenljivka['id'].'" type="checkbox"'
- .(is_array($vars) && in_array($spremenljivka['id'],$vars) ? ' checked' : '').'>';
- echo '<label for="dsp_inspect_var_'.$spremenljivka['id'].'">'.$spremenljivka['variable'].' - '.strip_tags($spremenljivka['naslov']).'</label>';
+ echo '<div class="setting_line dsp_inspect_var">';
+
+ echo ' <input name="dsp_inspect_vars" id="dsp_inspect_var_'.$spremenljivka['id'].'" value="'.$spremenljivka['id'].'" type="checkbox"'.(is_array($vars) && in_array($spremenljivka['id'],$vars) ? ' checked' : '').'>';
+ echo ' <label for="dsp_inspect_var_'.$spremenljivka['id'].'">'.$spremenljivka['variable'].' - '.strip_tags($spremenljivka['naslov']).'</label>';
+
echo '</div>';
}
+ echo '</div>';
echo '</div>';
- echo '<div class="inv_FS_btm">';
- echo '<div id="navigationBottom" class="printHide">';
- echo '<span id="dsp_inspect_cancel" class="floatLeft spaceLeft buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#"><span>'.$lang['srv_cancel'].'</span></a></span>';
- echo '<span id="dsp_inspect_save" class="floatRight spaceRight buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#"><span>'.$lang['srv_zapri'].'</span></a></span>';
- echo '<div class="clr" />';
+
+
+ echo '<div class="button_holder">';
+ echo ' <button id="dsp_inspect_cancel" class="medium white-blue">'.$lang['srv_cancel'].'</button>';
+ echo ' <button id="dsp_inspect_save" class="medium blue">'.$lang['srv_zapri'].'</button>';
echo '</div>';
- #echo '</div>';
+
echo '</div>';
}
@@ -660,8 +698,11 @@ class SurveyInspect {
function getConditionString() {
global $lang;
+ global $site_url;
+
#preverimi ali imamo nastavljen pogoj za inspect
$if_id = (int)SurveyUserSetting :: getInstance()->getSettings('inspect_if_id');
+
if ($if_id > 0) {
ob_start();
$b = new Branching($this->sid);
@@ -673,34 +714,36 @@ class SurveyInspect {
if ( $if_id > 0 && $condition_label != '') {
- echo '<div id="conditionProfileNote">';
- echo '<span class="floatLeft">'.$lang['srv_profile_data_is_filtred_zoom'].'</span>';
- echo '<span class="floatLeft spaceLeft">'.$condition_label.'</span>';
- // ali imamo napake v ifu
- #TODO
- # if ((int)self::$profiles[self :: $currentProfileId]['condition_error'] != 0) {
- # echo '<br>';
- # echo '<span style="border:1px solid #009D91; background-color: #34D0B6; padding:5px; width:auto;"><img src="img_0/error.png" /> ';
- # echo '<span class="red strong">'.$lang['srv_profile_condition_has_error'].'</span>';
- # echo '</span>';
- # }
- #
+ echo '<div id="conditionProfileNote" class="filter_box inspect">';
+
+ echo ' <div class="header">';
+ echo ' <span class="semi-bold">'.$lang['srv_profile_data_is_filtred_zoom'].'</span>';
+
+ echo ' <span class="condition">'.$condition_label.'</span>';
+
session_start();
- global $site_url;
+
if (isset($_SESSION['inspectFromPodstran'][$this->sid])) {
$inspect_comeFrom = '\''.$site_url.'admin/survey/index.php?anketa='.$this->sid.'&a=analysis&m='.$_SESSION['inspectFromPodstran'][$this->sid].'\'';
unset($_SESSION['inspectFromPodstran'][$this->sid]);
- } else {
+ }
+ else {
$pageURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
$inspect_comeFrom = '\''.$pageURL.'\'';
}
- echo '<span class="as_link spaceLeft" id="link_condition_edit">'.$lang['srv_profile_edit'].'</span>';
- echo '<span class="as_link spaceLeft" onclick="window.location=\'index.php?anketa='.$this->sid.'&a=data&m=quick_edit&quick_view=1\'">'.$lang['srv_zoom_link_whoisthis'].'</span>';
- echo '<span class="as_link spaceLeft" onclick="doZoomFromInspect();return false">Segmentiraj'.$lang[''].'</span>';
- echo '<span class="as_link spaceLeft" onclick="inspectRemoveCondition('.$inspect_comeFrom.');">'.$lang['srv_profile_remove'].'</span>';
+
+ echo ' <div class="icons">';
+ echo ' <span class="faicon edit" id="link_condition_edit"></span>';
+ echo ' <span class="faicon help2" onclick="window.location=\'index.php?anketa='.$this->sid.'&a=data&m=quick_edit&quick_view=1\'" title="'.$lang['srv_zoom_link_whoisthis'].'"></span>';
+ echo ' <span class="faicon" onclick="doZoomFromInspect();return false">Segmentiraj</span>';
+ echo ' <span class="faicon delete" onclick="inspectRemoveCondition('.$inspect_comeFrom.');"></span>';
+ echo ' </div>';
+
+ echo ' </div>';
+
echo '</div>';
- echo '<br class="clr" />';
+
return true;
}
}