diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /admin/survey/classes/class.SurveyMissingProfiles.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to 'admin/survey/classes/class.SurveyMissingProfiles.php')
-rw-r--r-- | admin/survey/classes/class.SurveyMissingProfiles.php | 231 |
1 files changed, 148 insertions, 83 deletions
diff --git a/admin/survey/classes/class.SurveyMissingProfiles.php b/admin/survey/classes/class.SurveyMissingProfiles.php index d957a29..bb9e251 100644 --- a/admin/survey/classes/class.SurveyMissingProfiles.php +++ b/admin/survey/classes/class.SurveyMissingProfiles.php @@ -95,66 +95,96 @@ class SurveyMissingProfiles }
if ( self::$currentProfileId != SMP_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 id="missing_profile_holder">';
+ echo '<div class="popup_main with_menu">';
+
+ echo ' <div id="missing_profile_holder" class="popup_left">';
self :: DisplayProfileOptions($pid);
+ echo '<button class="small white-black" onclick="missingProfileAction(\'newName\'); return false;"><span class="faicon plus_32"></span>'.$lang['srv_create_new_profile'].'</button>';
echo ' </div>';
-
- echo ' <div id="missing_profile_data_holder">';
+ echo ' <div id="missing_profile_data_holder" class="popup_right">';
self :: DisplayProfileData($pid);
echo ' </div>';
+ echo '</div>';
+
// GUMBI
- echo '<div style="margin: 15px 0 0 0; float:right;">';
- # shrani kot seja
+ echo '<div class="button_holder">';
+
+ # preklici - zapri
+ echo '<button class="medium white-blue" onclick="missingProfileAction(\'cancle\'); return false;">'.$lang['srv_close_profile'].'</button>';
+
+ # shrani kot seja
if (self::$profiles[$pid]['system'] == 1 || $pid == -1) {
$run_lbl = $lang['srv_run_as_session_profile'];
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="missingProfileAction(\'runSession\'); return false;"><span>'.$run_lbl.'</span></a></span></span>';
- } else {
+ echo '<button class="medium blue" onclick="missingProfileAction(\'runSession\'); return false;">'.$run_lbl.'</</button>';
+ }
+ else {
# shrani - pozeni
$run_lbl = $lang['srv_run_profile'];
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="missingProfileAction(\'run\'); return false;"><span>'.$run_lbl.'</span></a></span></span>';
+ echo '<button class="medium blue" onclick="missingProfileAction(\'run\'); return false;">'.$run_lbl.'</</button>';
}
- # shrani kot nov profil
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="missingProfileAction(\'newName\'); return false;"><span>'.$lang['srv_create_new_profile'].'</span></a></span></span>';
- # preklici - zapri
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="missingProfileAction(\'cancle\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>';
- echo '</div>';
+
+ echo '</div>';
// cover Div
- echo '<div id="missingProfileCoverDiv"></div>'."\n";
+ echo '<div id="missingProfileCoverDiv"></div>';
// div za shranjevanje novega profila
- echo '<div id="newProfile">'.$lang['srv_missing_profile_name'].': '."\n";
- echo '<input id="newProfileName" name="newProfileName" type="text" size="45" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="missingProfileAction(\'newSave\'); return false;"><span>'.$lang['srv_save_profile'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="missingProfileAction(\'newCancle\');; return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="newProfile">';
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<label>'.$lang['srv_missing_profile_name'].':</label>';
+ echo '<input id="newProfileName" name="newProfileName" type="text" class="text large" />';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="missingProfileAction(\'newCancle\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo '<button class="medium blue" onclick="missingProfileAction(\'newSave\'); return false;">'.$lang['srv_save_profile'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
// div za preimenovanje
- echo '<div id="renameProfileDiv">'.$lang['srv_missing_profile_name'].': '."\n";
- echo '<input id="renameProfileName" name="renameProfileName" type="text" value="' . self::$profiles[$pid]['name'] . '" size="45" />'."\n";
- echo '<input id="renameProfileId" type="hidden" value="' . $pid . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="missingProfileAction(\'rename\'); return false;"><span>'.$lang['srv_rename_profile_yes'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="missingProfileAction(\'renameCancle\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="renameProfileDiv">';
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<label>'.$lang['srv_missing_profile_name'].':</label>';
+ echo '<input id="renameProfileName" class="text large" name="renameProfileName" type="text" value="' . self::$profiles[$pid]['name'] . '" />';
+ echo '<input id="renameProfileId" type="hidden" value="' . $pid . '" />';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="missingProfileAction(\'renameCancle\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo '<button class="medium blue" onclick="missingProfileAction(\'rename\'); return false;">'.$lang['srv_rename_profile_yes'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
// div za brisanje
- echo '<div id="deleteProfileDiv">'.$lang['srv_missing_profile_delete_confirm'].': <b>' . self::$profiles[$pid]['name'] . '</b>?'."\n";
- echo '<input id="deleteProfileId" type="hidden" value="' . $pid . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="missingProfileAction(\'deleteCancle\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="missingProfileAction(\'deleteConfirm\'); return false;"><span>'.$lang['srv_delete_profile_yes'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="deleteProfileDiv">'.$lang['srv_missing_profile_delete_confirm'].': <span class="semi-bold">' . self::$profiles[$pid]['name'] . '</span>?';
+ echo '<input id="deleteProfileId" type="hidden" value="' . $pid . '" />';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="missingProfileAction(\'deleteCancle\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo '<button class="medium blue" onclick="missingProfileAction(\'deleteConfirm\'); return false;">'.$lang['srv_delete_profile_yes'].'</button>';
+ echo '</div>';
+ echo '</div>';
}
static function DisplayProfileData($pid) {
@@ -164,103 +194,142 @@ class SurveyMissingProfiles $_tpes_array = array(MISSING_TYPE_DESCRIPTOR=>$lang['srv_analiza_arhiviraj_type_'.MISSING_TYPE_DESCRIPTOR],MISSING_TYPE_FREQUENCY=>$lang['srv_analiza_arhiviraj_type_'.MISSING_TYPE_FREQUENCY],MISSING_TYPE_CROSSTAB=>$lang['srv_analiza_arhiviraj_type_'.MISSING_TYPE_CROSSTAB]);
$_sys_missings = self::$smv->GetMissingValuesForSurvey();
$_sys_unset = self::$smv->GetUnsetValuesForSurvey();
- echo '<div id="infoMissingProfile">' . $lang['srv_missing_profile_title1'] . '</div >';
- echo '<div id="missingProfileFieldsetHolder1">'.NEW_LINE;
+
+ echo '<div id="infoMissingProfile" class="profile_right_note">' . $lang['srv_missing_profile_title1'] . '</div>';
+
+ echo '<div id="missingProfileFieldsetHolder1">';
- echo '<fieldset id="missingProfileFieldset">'.NEW_LINE;
- echo '<legend>' . $lang['srv_missing_profile_title2'] . '</legend>'.NEW_LINE;
+ echo '<fieldset id="missingProfileFieldset">';
+ echo '<legend>' . $lang['srv_missing_profile_title2'] . '</legend>';
+
+ echo '<form name="" id="" autocomplete="off">';
+
+ echo '<table id="missing_table_1">';
+ echo '<tr>';
foreach ($_tpes_array AS $tkey => $tlabel) {
- echo '<div style="float:left; width:100px; text-align:center;">'. $tlabel .'</div>'.NEW_LINE;
+ echo '<th class="center">'. $tlabel .'</th>';
}
- echo '<div class="clr"></div>'.NEW_LINE;
- echo '<form name="" id="" autocomplete="off">'.NEW_LINE;
+ echo '<th></th>';
+ echo '</tr>';
+
# loop sozi sistemske missinge
foreach ($_sys_unset as $mkey => $mvalue) {
+ echo '<tr>';
+
# loop skozi tipe
foreach ($_tpes_array AS $tkey => $tlabel) {
- echo '<div style="float:left; width:100px; text-align:center;">'.NEW_LINE;
+ echo '<td class="center">';
echo '<input name="profile_value[]" type="checkbox" id="mv_'.$tkey.'_'.$mkey . '"' .
(isset($curentProfileData[$tkey][$mkey]) ? ' checked' : '').
- '/>'.NEW_LINE;
- echo '</div>'.NEW_LINE;
+ '/>';
+ echo '<label class="empty"></label>';
+ echo '</td>';
}
- echo '<div style="float:left; width:150px;">'.NEW_LINE;
+ echo '<td>';
echo '(' . $mkey . ") " . $mvalue;
- echo '</div>'.NEW_LINE;
- echo '<div class="clr"></div>'.NEW_LINE;
+ echo '</td>';
+
+ echo '</tr>';
}
- echo '</form>'.NEW_LINE;
- echo '</fieldset>'.NEW_LINE;
+
+
+ echo '</table>';
+
+ echo '</form>';
+ echo '</fieldset>';
- echo '<fieldset id="missingProfileFieldset">'.NEW_LINE;
- echo '<legend>' . $lang['srv_missing_profile_title3'] . '</legend>'.NEW_LINE;
+ echo '<fieldset id="missingProfileFieldset">';
+ echo '<legend>' . $lang['srv_missing_profile_title3'] . '</legend>';
+
+ echo '<table id="missing_table_2">';
+ echo '<tr>';
foreach ($_tpes_array AS $tkey => $tlabel) {
- echo '<div style="float:left; width:100px; text-align:center;">'. $tlabel .'</div>'.NEW_LINE;
+ echo '<th class="center">'. $tlabel .'</th>';
}
- echo '<div class="clr"></div>'.NEW_LINE;
- echo '<form name="" id="" autocomplete="off">'.NEW_LINE;
+ echo '<th></th>';
+ echo '</tr>';
+
+ echo '<form name="" id="" autocomplete="off">';
+
# loop sozi sistemske missinge
- foreach ($_sys_missings as $mkey => $mvalue) {
+ foreach ($_sys_unset as $mkey => $mvalue) {
+ echo '<tr>';
+
# loop skozi tipe
foreach ($_tpes_array AS $tkey => $tlabel) {
- echo '<div style="float:left; width:100px; text-align:center;">'.NEW_LINE;
+ echo '<td class="center">';
echo '<input name="profile_value[]" type="checkbox" id="mv_'.$tkey.'_'.$mkey . '"' .
(isset($curentProfileData[$tkey][$mkey]) ? ' checked' : '').
- '/>'.NEW_LINE;
- echo '</div>'.NEW_LINE;
+ '/>';
+ echo '<label class="empty"></label>';
+ echo '</td>';
}
- echo '<div style="float:left; width:150px;">'.NEW_LINE;
+ echo '<td>';
echo '(' . $mkey . ") " . $mvalue;
- echo '</div>'.NEW_LINE;
- echo '<div class="clr"></div>'.NEW_LINE;
+ echo '</td>';
+
+ echo '</tr>';
}
- echo '</form>'.NEW_LINE;
- echo '</fieldset>'.NEW_LINE;
- echo '</div>'.NEW_LINE;
- echo '<div id="missingProfileFieldsetHolder1">'.NEW_LINE;
+
+ echo '</table>';
+
+ echo '</form>';
+ echo '</fieldset>';
+
+ echo '</div>';
+
+ echo '<div id="missingProfileFieldsetHolder1">';
echo '<fieldset id="missingProfileFieldset">';
echo '<legend>'.$lang['srv_missing_profile_title5'].'</legend>';
# prikažemo še radio gumbe za način prikaza MV
$radio_selected = self::$profiles[$pid]['display_mv_type'];
- echo '<div style="margin-bottom:8px;">';
+
+ echo '<div class="mv_settings_other">';
echo '<input name="display_mv_type" id="display_mv_type_0" type="radio" value="0"'.($radio_selected == 0 ? ' checked' : '').'><label for="display_mv_type_0">'.$lang['srv_missing_profile_display_radio0'].'</label>';
echo ' <input name="display_mv_type" id="display_mv_type_1" type="radio" value="1"'.($radio_selected == 1 ? ' checked' : '').'><label for="display_mv_type_1">'.$lang['srv_missing_profile_display_radio1'].'</label>';
echo ' <input name="display_mv_type" id="display_mv_type_2" type="radio" value="2"'.($radio_selected == 2 ? ' checked' : '').'><label for="display_mv_type_2">'.$lang['srv_missing_profile_display_radio2'].'</label>';
echo '</div>';
- echo '<div style=" width:auto; text-align:left;">'.NEW_LINE;
+
+ echo '<div class="setting_holder">';
echo '<input name="show_zerro" id="show_zerro" type="checkbox" ' .
(self::$profiles[$pid]['show_zerro'] == 1 ? ' checked="checked"' : '') . ' autocomplete="off"/>'.NEW_LINE;
- echo $lang['srv_missing_profile_other_show_zerro'];
- echo '</div>'.NEW_LINE;
- echo '<div style=" width:auto; text-align:left;">'.NEW_LINE;
+ echo '<label>'.$lang['srv_missing_profile_other_show_zerro'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
echo '<input name="merge_missing" id="merge_missing" type="checkbox" ' .
- (self::$profiles[$pid]['merge_missing'] == 1 ? ' checked="checked"' : '') . ' autocomplete="off"/>'.NEW_LINE;
- echo $lang['srv_missing_profile_other_merge_missing'];
+ (self::$profiles[$pid]['merge_missing'] == 1 ? ' checked="checked"' : '') . ' autocomplete="off"/>';
+ echo '<label>'.$lang['srv_missing_profile_other_merge_missing'].'</label>';
echo '</div>';
- echo ' <div class="clr"></div>';
+
echo '</fieldset>';
- echo '</div>'.NEW_LINE;
+ echo '</div>';
}
static function DisplayProfileOptions($pid) {
global $lang;
- echo '<div id="missing_profile" class="select">';
+ echo '<div id="missing_profile" class="list select">';
+
foreach ( self::$profiles as $key => $profile ) {
- echo '<div id="missing_profile_'.$profile['id'].'" class="option' . ($profile['id'] == $pid ? ' active' : '') . '" value="' . $profile['id'] . '">';
+ echo '<div id="missing_profile_'.$profile['id'].'" class="list-item option' . ($profile['id'] == $pid ? ' active' : '') . '" value="' . $profile['id'] . '">';
echo $profile['name'];
if($profile['id'] == $pid){
+ echo '<div class="profile_icons">';
+
if (self::$profiles[$pid]['system'] != 1 ) {
- echo '<a href="#" title="'.$lang['srv_delete_profile'].'" onclick="missingProfileAction(\'deleteAsk\'); return false;"><span class="faicon delete_circle icon-orange_link floatRight" style="margin-top:1px;"></span></a>'."\n";
+ echo '<a href="#" title="'.$lang['srv_delete_profile'].'" onclick="missingProfileAction(\'deleteAsk\'); return false;"><span class="faicon delete_circle icon-orange_link floatRight" style="margin-top:1px;"></span></a>'."\n";
}
if (self::$profiles[$pid]['system'] != 1 && $pid != -1) {
- echo '<a href="#" title="'.$lang['srv_rename_profile'].'" onclick="missingProfileAction(\'renameAsk\'); return false;"><span class="faicon edit floatRight spaceRight"></span></a>'."\n";
+ echo '<a href="#" title="'.$lang['srv_rename_profile'].'" onclick="missingProfileAction(\'renameAsk\'); return false;"><span class="faicon edit floatRight spaceRight"></span></a>'."\n";
}
+
+ echo '</div>';
}
echo '</div>';
@@ -268,11 +337,8 @@ class SurveyMissingProfiles echo '</div>';
echo '<script>';
- echo '$(function() {';
- echo 'scrollToProfile("#missing_profile_'.$pid.'");';
- echo '});';
+ echo ' $( function(){scrollToProfile("#missing_profile_'.$pid.'");} );';
echo '</script>';
-
}
/** klici ajax funkcij
@@ -532,17 +598,16 @@ class SurveyMissingProfiles static function DisplayLink($hideAdvanced = true) {
global $lang;
+
// profili missingov
$missingProfiles = self :: getProfiles();
$izbranMissingProfile = self :: getCurentProfileId();
$css = ($izbranMissingProfile == SMP_DEFAULT_PROFILE ? ' gray' : '');
if ($hideAdvanced == false || $izbranMissingProfile != SMP_DEFAULT_PROFILE ) {
- echo '<li class="space"> </li>';
echo '<li>';
- echo '<span class="as_link'.$css.'" id="link_missing_profile" title="' . $lang['srv_analiza_setup_profile'] . '" onClick="show_missing_profiles();">' . $lang['srv_analiza_setup_profile'] . '</span>'."\n";
+ echo ' <span class="'.$css.'" id="link_missing_profile" title="' . $lang['srv_analiza_setup_profile'] . '" onClick="show_missing_profiles();">' . $lang['srv_analiza_setup_profile'] . '</span>'."\n";
echo '</li>';
-
}
}
|