diff options
Diffstat (limited to 'admin/survey/classes/mobile/class.MobileSurveyAdmin.php')
-rw-r--r-- | admin/survey/classes/mobile/class.MobileSurveyAdmin.php | 599 |
1 files changed, 473 insertions, 126 deletions
diff --git a/admin/survey/classes/mobile/class.MobileSurveyAdmin.php b/admin/survey/classes/mobile/class.MobileSurveyAdmin.php index 3193246..4c9a3cd 100644 --- a/admin/survey/classes/mobile/class.MobileSurveyAdmin.php +++ b/admin/survey/classes/mobile/class.MobileSurveyAdmin.php @@ -11,14 +11,21 @@ class MobileSurveyAdmin{ var $surveyAdminClass;
+ var $first_action;
+ var $second_action;
+ var $third_action;
function __construct($surveyAdminClass){
global $site_url;
$this->surveyAdminClass = $surveyAdminClass;
- }
+ $navigationArray = CrossRoad::MainNavigation($this->surveyAdminClass->anketa, true);
+ $this->first_action = $navigationArray['first_action'];
+ $this->second_action = $navigationArray['second_action'];
+ $this->third_action = $navigationArray['third_action'];
+ }
// Izris glave z menijem - znotraj ankete
public function displayHeaderMobile(){
@@ -31,16 +38,24 @@ class MobileSurveyAdmin{ // Meni
$this->displayMenu();
- // Naslov ankete
+ // Naslov ankete + slider za nastavitve
if($this->surveyAdminClass->anketa > 0){
+
+ // Naslov ankete na sredini
$this->displaySurveyTitle();
+
+ // Ikona za nastavitve
+ $this->displaySurveySettingsIcon();
+
+ // Div holder za nastavitve
+ $this->displayMenuSurveySettings();
}
// Logo - enak kot na desktopu
else{
$this->displayLogo();
}
- // Se inicializiramo zeynep jquery mobile menu
+ // Se inicializiramo zeynep jquery mobile menu in settings meni na desni
echo '<script> mobile_init(); </script>';
echo '</div>';
@@ -81,6 +96,17 @@ class MobileSurveyAdmin{ echo '</div>';
}
+ private function displaySurveySettingsIcon(){
+
+ echo '<div class="mobile_settings_icon mobile_settings_open">';
+ echo ' <span class="faicon wheel_32"></span>';
+ echo '</div>';
+
+ echo '<div class="mobile_settings_icon mobile_settings_close">';
+ echo ' <span>✕</span>';
+ echo '</div>';
+ }
+
// Izris menija
private function displayMenu(){
@@ -95,9 +121,6 @@ class MobileSurveyAdmin{ // Izris glavne navigacije v dropdownu
$this->displayMenuSurveyNavigation();
-
- // Izris akcij za anketo (kopiraj, brisi...) v dropdownu
- $this->displayMenuSurveyActions();
}
// Meni v mojih anketah
else{
@@ -108,6 +131,124 @@ class MobileSurveyAdmin{ }
+
+ // Izris menija za nastavitve v urejanju ankete
+ private function displayMenuSurveySettings(){
+ global $lang;
+ global $admin_type;
+
+ echo '<div class="mobile_settings">';
+
+ echo '<div class="mobile_settings_content">';
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->surveyAdminClass->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
+
+
+ // prikaz gumbov za vklop in odklepanje ankete
+ $d = new Dostop();
+ if ($d->checkDostopAktiven()) {
+
+ # anketa je aktivna
+ if (SurveyInfo::getSurveyColumn('active') == 1) {
+
+ # V kolikor gre za hierarhijo in uporabnik ni administrator hierarhije
+ if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){
+ if ($hierarhija_type == 1) {
+ echo '<a href="index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ }
+ else{
+ echo '<a href="#" class="srv_ico" title="' . $lang['srv_anketa_active'] . '" style="cursor:text !important;">';
+ }
+ }
+ else {
+ echo '<a href="#" class="srv_ico" onclick="anketa_active(\'' . $this->surveyAdminClass->anketa . '\',\'' . $row['active'] . '\'); return false;" title="' . $lang['srv_anketa_active'] . '">';
+ }
+
+ echo ' <div class="setting_icon"><div id="srv_active" class="switch_anketa anketa_on"></div></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketa_active'].'</div>';
+
+ echo '</a>';
+ }
+ else {
+ $anketa_active = " mobile_settings_close(function(){ anketa_active('" . $this->surveyAdminClass->anketa . "','" . $row['active'] . "'); }); ";
+
+ // Preden anketo aktiviramo preverimo, če gre tudi za izgradnjo hierarhije in če anketa še ni bila aktivirana
+ if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){
+ if ($hierarhija_type == 1) {
+ echo '<a href="index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ }
+ else{
+ echo '<a href="#" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ }
+ }
+ else {
+ echo '<a href="#" class="srv_ico" onclick="' . $anketa_active . ' return false;" title="' . $lang['srv_anketa_noactive'] . '">';
+ }
+
+ echo ' <div class="setting_icon"><div id="srv_inactive" class="switch_anketa anketa_off"></div></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketa_noactive'].'</div>';
+
+ echo '</a>';
+ }
+
+ // Ce ima uporabnik prepreceno moznost odklepanja ankete, anketo ima vedno zaklenjeno če je vklopljena hierarhija
+ $prevent_unlock = 0;
+ if(SurveyInfo::getSurveyModules('hierarhija') == 2 || (!$d->checkDostopSub('lock') && $row['locked'] == 1 && $admin_type != 0 && $admin_type != 1))
+ $prevent_unlock = 1;
+
+ if ($prevent_unlock == 1) {
+
+ echo '<input type="hidden" name="prevent_unlock" id="prevent_unlock" value="1">';
+
+ echo '<a class="anketa_img_nav" title="' . $lang['srv_anketa_locked'] . '">';
+ echo ' <div class="setting_icon"><span class="faicon lock_close"></span></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketa_locked'].'</div>';
+ echo '</a>';
+ }
+ else {
+ # zaklepanje
+ if ($hierarhija_type == 10) {
+ echo '<a href="#" class="anketa_img_nav" title="' . $lang['srv_anketa_locked_' . $row['locked']] . '" style="cursor:text !important;">';
+ }
+ else {
+ echo '<a class="anketa_img_nav" href="javascript:anketa_lock(\'' . $this->surveyAdminClass->anketa . '\', \'' . ($row['locked'] == 0 ? '1' : '0') . '\', \''.$row['mobile_created'].'\');" title="' . $lang['srv_anketa_locked_' . $row['locked']] . '">';
+ }
+ echo ' <div class="setting_icon"><span class="faicon lock' . ($row['locked'] == 0 ? '_open' : '_close') . '"></span></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketa_locked_' . $row['locked']].'</div>';
+ echo '</a>';
+ }
+
+
+ // Izris akcij za anketo (kopiraj, brisi...) v dropdownu
+ # kopiranje
+ global $global_user_id;
+ if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
+ /*echo ' <a href="#" onclick="anketa_copy_top(\'' . $this->surveyAdminClass->anketa . '\'); return false;" title="'.$lang['srv_anketacopy'].'" class="srv_ico">';
+ echo ' <div class="setting_icon bottom"><span class="faicon anketa_copy"></span></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketacopy'].'</div>';
+ echo ' </a>';*/
+ }
+ else{
+ echo ' <a href="#" onclick="anketa_copy_top(\'' . $this->surveyAdminClass->anketa . '\'); return false;" title="'.$lang['srv_anketacopy'].'" class="srv_ico">';
+ echo ' <div class="setting_icon bottom"><span class="faicon anketa_copy"></span></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketacopy'].'</div>';
+ echo ' </a>';
+ }
+
+ # brisanje
+ echo ' <a href="#" onclick="anketa_delete(\'' . $this->surveyAdminClass->anketa . '\', \'' . $lang['srv_anketadeleteconfirm'] . '\'); return false;" title="' . $lang['srv_anketadelete'] . '" class="srv_ico">';
+ echo ' <div class="setting_icon bottom"><span class="faicon anketa_delete" title="'.$lang['srv_anketadelete'].'"></span></div>';
+ echo ' <div class="setting_text">'.$lang['srv_anketadelete'].'</div>';
+ echo ' </a>';
+ }
+
+ echo '</div>';
+
+ echo '</div>';
+ }
+
// Izris uporabniških podatkov v dropdownu
private function displayMenuUser(){
global $lang, $global_user_id, $site_url;
@@ -148,7 +289,7 @@ class MobileSurveyAdmin{ // Odjava na nov nacin preko frontend/api
echo ' <div><form name="odjava" id="form_odjava" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
- echo ' <span class="as_link" onClick="$(\'#form_odjava\').submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</span>';
+ echo ' <span class="as_link noline" onClick="$(\'#form_odjava\').submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</span>';
echo ' </form></div>';
echo ' </div>';
@@ -163,7 +304,7 @@ class MobileSurveyAdmin{ // Izris glavne navigacije v mojih anketah
private function displayMenuMySurveysNavigation(){
- global $lang, $admin_type, $app_settings;
+ global $lang, $admin_type;
# naložimo razred z seznamom anket
@@ -171,6 +312,10 @@ class MobileSurveyAdmin{ $SLCount = $SL->countSurveys();
$SLCountPhone = $SL->countPhoneSurveys();
+ $a = isset($_GET['a']) ? $_GET['a'] : '';
+ $m = isset($_GET['m']) ? $_GET['m'] : '';
+ $t = isset($_GET['t']) ? $_GET['t'] : '';
+
echo '<div class="mobile_menu_navigation">';
@@ -178,12 +323,12 @@ class MobileSurveyAdmin{ // MOJE ANKETE
- $this->displayMenuItem($lang['srv_pregledovanje'], $url='index.php?a=pregledovanje');
+ $this->displayMenuItem($lang['srv_pregledovanje'], $url='index.php?a=pregledovanje', (!isset($_GET['a']) && !isset($_GET['anketa'])) || ($a == 'pregledovanje') ? 'active': '');
// TELEFONSKA ANKETA
if ($SLCountPhone > 0 && $admin_type != '0') {
- $this->displayMenuItem($lang['srv_telephone_surveys'], $url='index.php?a=phoneSurveys');
+ $this->displayMenuItem($lang['srv_telephone_surveys'], $url='index.php?a=phoneSurveys', ($a == 'phoneSurveys') ? 'active': '');
}
@@ -193,31 +338,37 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_ankete'],
- 'url' => 'index.php?a=diagnostics'
+ 'url' => 'index.php?a=diagnostics',
+ 'active' => ($a == 'diagnostics' && !isset ($_GET['t']) ? 'active' : '')
),
array(
'title' => $lang['srv_weekly_diagnostics'],
- 'url' => 'index.php?a=diagnostics&t=time_span_daily'
+ 'url' => 'index.php?a=diagnostics&t=time_span_daily',
+ 'active' => ($a == 'diagnostics' && $t == 'time_span_daily' ? 'active' : '')
),
array(
'title' => $lang['srv_monthly_diagnostics'],
- 'url' => 'index.php?a=diagnostics&t=time_span_monthly'
+ 'url' => 'index.php?a=diagnostics&t=time_span_monthly',
+ 'active' => ($a == 'diagnostics' && $t == 'time_span_monthly' ? 'active' : '')
),
array(
'title' => $lang['srv_yearly_diagnostics'],
- 'url' => 'index.php?a=diagnostics&t=time_span_yearly'
+ 'url' => 'index.php?a=diagnostics&t=time_span_yearly',
+ 'active' => ($a == 'diagnostics' && $t == 'time_span_yearly' ? 'active' : '')
),
array(
'title' => $lang['srv_all_diagnostics'],
- 'url' => 'index.php?a=diagnostics&t=time_span&uvoz=0&ustrezni=1&delnoustrezni=1&neustrezni=0'
+ 'url' => 'index.php?a=diagnostics&t=time_span&uvoz=0&ustrezni=1&delnoustrezni=1&neustrezni=0',
+ 'active' => ($a == 'diagnostics' && $t == 'time_span' ? 'active' : '')
),
array(
'title' => $lang['srv_metapodatki'],
- 'url' => 'index.php?a=diagnostics&t=paradata'
+ 'url' => 'index.php?a=diagnostics&t=paradata',
+ 'active' => ($a == 'diagnostics' && $t == 'paradata' ? 'active' : '')
)
);
- $this->displayMenuItemWithSubmenu($name='diagnostics', $lang['srv_diagnostics'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='diagnostics', $lang['srv_diagnostics'], $submenu, ($a == 'diagnostics' && $t != 'uporabniki') ? 'active' : '');
}
@@ -230,27 +381,43 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['n_users_list'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && !isset($_GET['m'])? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['n_users_list_add'],
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=add',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'add'? 'active' : '')
),
array(
'title' => $lang['n_users_list_all'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki&m=all'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=all',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'all' ? 'active' : '')
+
),
array(
'title' => $lang['n_deleted_users'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki&m=izbrisani'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=izbrisani',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'izbrisani' ? 'active' : '')
+
),
array(
'title' => $lang['n_unconfirmed_users'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki&m=nepotrjeni'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=nepotrjeni',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'nepotrjeni' ? 'active' : '')
+
),
array(
'title' => $lang['n_unsigned_users'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki&m=odjavljeni'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=odjavljeni',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'odjavljeni' ? 'active' : '')
+
),
array(
'title' => $lang['srv_hierarchy_users_access'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki&m=sa-modul'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=sa-modul',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'sa-modul' ? 'active' : '')
+
),
);
}
@@ -261,12 +428,19 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['n_users_list'],
- 'url' => 'index.php?a=diagnostics&t=uporabniki'
+ 'url' => 'index.php?a=diagnostics&t=uporabniki',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && !isset($_GET['m']) ? 'active' : '')
+
+ ),
+ array(
+ 'title' => $lang['n_users_list_add'],
+ 'url' => 'index.php?a=diagnostics&t=uporabniki&m=add',
+ 'active' => ($a == 'diagnostics' && $t == 'uporabniki' && $m == 'add'? 'active' : '')
)
);
}
- $this->displayMenuItemWithSubmenu($name='uporabniki', $lang['hour_users'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='uporabniki', $lang['hour_users'], $submenu, ($a == 'diagnostics' && $t == 'uporabniki' ? 'active' : ''));
}
@@ -274,15 +448,19 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_javna_knjiznica'],
- 'url' => 'index.php?a=knjiznica'
+ 'url' => 'index.php?a=knjiznica',
+ 'active' => ($a == 'knjiznica' && !isset($_GET['t']) ? 'active' : '')
+
),
array(
'title' => $lang['srv_moja_knjiznica'],
- 'url' => 'index.php?a=knjiznica&t=moje_ankete'
+ 'url' => 'index.php?a=knjiznica&t=moje_ankete',
+ 'active' => ($a == 'knjiznica' && $t == 'moje_ankete' ? 'active' : '')
+
)
);
- $this->displayMenuItemWithSubmenu($name='knjiznica', $lang['srv_library'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='knjiznica', $lang['srv_library'], $submenu, ($a == 'knjiznica' ? 'active' : ''));
// NASTAVITVE
@@ -290,39 +468,48 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_settingsSystem'],
- 'url' => 'index.php?a=nastavitve&m=system'
+ 'url' => 'index.php?a=nastavitve&m=system',
+ 'active' => ($a == 'nastavitve' && $m == 'system' ? 'active' : '')
),
array(
'title' => $lang['srv_testiranje_predvidenicas'],
- 'url' => 'index.php?a=nastavitve&m=predvidenicasi'
- ),
- array(
- 'title' => $lang['srv_collectData'],
- 'url' => 'index.php?a=nastavitve&m=collectData'
+ 'url' => 'index.php?a=nastavitve&m=predvidenicasi',
+ 'active' => ($a == 'nastavitve' && $m == 'predvidenicasi' ? 'active' : '')
),
array(
'title' => $lang['srv_nice_url'],
- 'url' => 'index.php?a=nastavitve&m=nice_links'
+ 'url' => 'index.php?a=nastavitve&m=nice_links',
+ 'active' => ($a == 'nastavitve' && $m == 'nice_links' ? 'active' : '')
),
array(
'title' => $lang['srv_anketa_admin'],
- 'url' => 'index.php?a=nastavitve&m=anketa_admin'
+ 'url' => 'index.php?a=nastavitve&m=anketa_admin',
+ 'active' => ($a == 'nastavitve' && $m == 'anketa_admin' ? 'active' : '')
),
array(
'title' => $lang['srv_anketa_deleted'],
- 'url' => 'index.php?a=nastavitve&m=anketa_deleted'
+ 'url' => 'index.php?a=nastavitve&m=anketa_deleted',
+ 'active' => ($a == 'nastavitve' && $m == 'anketa_deleted' ? 'active' : '')
),
array(
- 'title' => $lang['srv_data_deleted'],
- 'url' => 'index.php?a=nastavitve&m=data_deleted'
+ 'title' => $lang['help_settings'],
+ 'url' => 'index.php?a=nastavitve&m=help_settings',
+ 'active' => ($a == 'nastavitve' && $m == 'help_settings' ? 'active' : '')
),
array(
'title' => $lang['srv_user_settings'],
- 'url' => 'index.php?a=nastavitve&m=global_user_settings'
+ 'url' => 'index.php?a=nastavitve&m=global_user_settings',
+ 'active' => ($a == 'nastavitve' && $m == 'global_user_settings' ? 'active' : '')
),
array(
'title' => $lang['edit_data'],
- 'url' => 'index.php?a=nastavitve&m=global_user_myProfile'
+ 'url' => 'index.php?a=nastavitve&m=global_user_myProfile',
+ 'active' => ($a == 'nastavitve' && $m == 'global_user_myProfile' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_survey_archives_tracking_archive'],
+ 'url' => 'index.php?a=nastavitve&m=global_user_ChangeArchive',
+ 'active' => ($a == 'nastavitve' && $m == 'global_user_ChangeArchive' ? 'active' : '')
),
);
}
@@ -330,20 +517,23 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_user_settings'],
- 'url' => 'index.php?a=nastavitve&m=global_user_settings'
+ 'url' => 'index.php?a=nastavitve&m=global_user_settings',
+ 'active' => ($a == 'nastavitve' && $m == 'global_user_settings' ? 'active' : '')
+
),
array(
'title' => $lang['edit_data'],
- 'url' => 'index.php?a=nastavitve&m=global_user_myProfile'
+ 'url' => 'index.php?a=nastavitve&m=global_user_myProfile',
+ 'active' => ($a == 'nastavitve' && $m == 'global_user_myProfile' ? 'active' : '')
),
);
}
- $this->displayMenuItemWithSubmenu($name='nastavitve', $lang['settings'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='nastavitve', $lang['settings'], $submenu, ($a == 'nastavitve' ? 'active' : ''));
// NAROCILA
- if($app_settings['commercial_packages']){
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
// placila - samo admini
if ($admin_type == '0') {
@@ -351,19 +541,23 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_narocila_my'],
- 'url' => 'index.php?a=narocila'
+ 'url' => 'index.php?a=narocila',
+ 'active' => ($a == 'narocila' && !isset($_GET['m']) ? 'active' : '')
+
),
array(
'title' => $lang['srv_placila'],
- 'url' => 'index.php?a=narocila&m=placila'
+ 'url' => 'index.php?a=narocila&m=placila',
+ 'active' => ($a == 'narocila' && $m == 'placila' ? 'active' : '')
+
)
);
- $this->displayMenuItemWithSubmenu($name='nastavitve', $lang['settings'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='narocila', $lang['srv_narocila'], $submenu, $a == 'narocila' ? 'active' : '');
}
// moja narocila
else{
- $this->displayMenuItem($lang['srv_narocila'], $url='index.php?a=narocila');
+ $this->displayMenuItem($lang['srv_narocila'], $url='index.php?a=narocila', $a == 'narocila' && !isset($_GET['m']) ? 'active' : '');
}
}
@@ -374,19 +568,27 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_gdpr_user_settings'],
- 'url' => 'index.php?a=gdpr'
+ 'url' => 'index.php?a=gdpr',
+ 'active' => ($a == 'gdpr' && !isset($_GET['m']) ? 'active' : '')
+
),
array(
'title' => $lang['srv_gdpr_survey_list'],
- 'url' => 'index.php?a=gdpr&m=placila'
+ 'url' => 'index.php?a=gdpr&m=gdpr_survey_list',
+ 'active' => ($a == 'gdpr' && $m == 'gdpr_survey_list' ? 'active' : '')
+
),
array(
'title' => $lang['srv_gdpr_dpa'],
- 'url' => 'index.php?a=gdpr'
+ 'url' => 'index.php?a=gdpr&m=gdpr_dpa',
+ 'active' => ($a == 'gdpr' && $m == 'gdpr_dpa' ? 'active' : '')
+
),
array(
'title' => $lang['srv_gdpr_requests'].' ('.$request_counter.')',
- 'url' => 'index.php?a=gdpr&m=gdpr_requests'
+ 'url' => 'index.php?a=gdpr&m=gdpr_requests',
+ 'active' => ($a == 'gdpr' && $m == 'gdpr_requests' ? 'active' : '')
+
)
);
@@ -394,11 +596,13 @@ class MobileSurveyAdmin{ if($admin_type == '0'){
$submenu[] = array(
'title' => $lang['srv_gdpr_requests_all'],
- 'url' => 'index.php?a=gdpr&m=gdpr_requests_all'
+ 'url' => 'index.php?a=gdpr&m=gdpr_requests_all',
+ 'active' => ($a == 'gdpr' && $m == 'gdpr_requests_all' ? 'active' : '')
+
);
}
- $this->displayMenuItemWithSubmenu($name='gdpr', 'GDPR', $submenu);
+ $this->displayMenuItemWithSubmenu($name='gdpr', 'GDPR', $submenu, ($a == 'gdpr' ? 'active' : ''));
echo '</ul>';
@@ -419,6 +623,9 @@ class MobileSurveyAdmin{ $modules = SurveyInfo::getSurveyModules();
$d = new Dostop();
+ $a = isset($_GET['a']) ? $_GET['a'] : '';
+ $m = isset($_GET['m']) ? $_GET['m'] : '';
+
echo '<div class="mobile_menu_navigation first" data-menu-name="first">';
@@ -441,15 +648,25 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_status_summary'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_REPORTI
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_REPORTI,
+ 'active' => ($a == A_REPORTI ? 'active' : '')
),
array(
'title' => $lang['srv_metapodatki'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_PARA_GRAPH
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_PARA_GRAPH,
+ 'active' => ($a == A_PARA_GRAPH ? 'active' : '')
)
);
- $this->displayMenuItemWithSubmenu($name='dashboard', $lang['srv_navigation_status'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='dashboard', $lang['srv_navigation_status'], $submenu, ($this->first_action == NAVI_STATUS
+ || $this->first_action == 'para_graph'
+ || $this->first_action == 'nonresponse_graph'
+ || $this->first_action == 'AAPOR'
+ || $this->first_action == 'langStatistic'
+ || $this->first_action == 'usable_resp'
+ || $this->first_action == 'speeder_index'
+ || $this->first_action == 'reminder_tracking'
+ || $this->first_action == 'status_advanced') ? 'active' : '');
}
}
@@ -460,23 +677,59 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_editirajanketo2'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . ($this->surveyAdminClass->survey_type > 1 ? '&a=' . A_BRANCHING : '')
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . ($this->surveyAdminClass->survey_type > 1 ? '&a=' . A_BRANCHING : ''),
+ 'active' => ($this->second_action == NAVI_UREJANJE_BRANCHING ? 'active' : '')
),
array(
'title' => $lang['srv_nastavitve_ankete'] ,
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_SETTINGS
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_SETTINGS,
+ 'active' => ($this->second_action == NAVI_UREJANJE_ANKETA ? 'active' : '')
),
array(
'title' => $lang['srv_themes'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TEMA
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TEMA,
+ 'active' => ($this->second_action == NAVI_UREJANJE_TEMA ? 'active' : '')
),
array(
- 'title' => $lang['srv_analiza_arhiv'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_ARHIVI
- ),
+ 'title' => $lang['srv_archive'],
+ 'name' => 'edit_submenu',
+ 'submenu' => array(
+ array(
+ 'title' => $lang['srv_archive_survey'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ARHIVI,
+ 'active' => ($a == A_ARHIVI && $m == '' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_survey_archives_ie_title'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ARHIVI.'&m=survey',
+ 'active' => ($a == A_ARHIVI && $m == 'survey' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_survey_archives_ie_data_title'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ARHIVI.'&m=survey_data',
+ 'active' => ($a == A_ARHIVI && $m == 'survey_data' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_survey_archives_tracking_survey'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_TRACKING,
+ 'active' => ($a == A_TRACKING && $m == '' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_survey_archives_tracking_data'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_TRACKING.'&m=tracking_data',
+ 'active' => ($a == A_TRACKING && $m == 'tracking_data' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_survey_archives_tracking_append'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_TRACKING.'&appendMerge=1',
+ 'active' => ($a == A_TRACKING && isset($_GET['appendMerge']) && $_GET['appendMerge'] == '1' ? 'active' : '')
+ )
+ ),
+ 'active' => ((($a == A_ARHIVI || $a == A_TRACKING) && $m != 'data') ? 'active' : '')
+ )
);
- $this->displayMenuItemWithSubmenu($name='edit', $lang['srv_vprasalnik'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='edit', $lang['srv_vprasalnik'], $submenu, ($this->first_action == NAVI_UREJANJE && $m != 'data' ? 'active' : ''));
}
@@ -486,19 +739,22 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_testiranje_diagnostika'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_DIAGNOSTIKA
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_DIAGNOSTIKA,
+ 'active' => ($this->second_action == M_TESTIRANJE_DIAGNOSTIKA ? 'active' : '')
),
array(
'title' => $lang['srv_testiranje_komentarji'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_KOMENTARJI
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_KOMENTARJI,
+ 'active' => ($this->second_action == NAVI_TESTIRANJE_KOMENTARJI || $this->second_action == NAVI_TESTIRANJE_KOMENTARJI_ANKETA ? 'active' : '')
),
array(
'title' => $lang['srv_testiranje_vnosi'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_VNOSI
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_VNOSI,
+ 'active' => ($this->second_action == NAVI_TESTIRANJE_VNOSI ? 'active' : '')
),
);
- $this->displayMenuItemWithSubmenu($name='test', $lang['srv_testiranje'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='test', $lang['srv_testiranje'], $submenu, ($this->first_action == NAVI_TESTIRANJE ? 'active' : ''));
}
@@ -508,19 +764,27 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_publication_base'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_VABILA . '&m=settings'
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_VABILA . '&m=settings',
+ 'active' => ($a == A_VABILA && ($m == '' || $m == 'settings') ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['srv_inv_nav_invitations'],
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_INVITATIONS . '&m=settings',
+ 'active' => ($a == A_INVITATIONS && $m != 'view_archive' ? 'active' : '')
),
array(
- 'title' => $lang['srv_publication_url'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_VABILA . '&m=url'
+ 'title' => $lang['srv_inv_nav_other_inv'],
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_OTHER_INV . '&m=settings',
+ 'active' => ($a == A_OTHER_INV && $m != 'view_archive' ? 'active' : '')
),
array(
- 'title' => $lang['srv_inv_nav_invitations'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_INVITATIONS . '&m=settings'
+ 'title' => $lang['srv_archive'],
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_INVITATIONS . '&m=view_archive',
+ 'active' => ($a == A_INVITATIONS && $m == 'view_archive' ? 'active' : '')
),
);
- $this->displayMenuItemWithSubmenu($name='publish', $lang['srv_vabila'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='publish', $lang['srv_vabila'], $submenu, ($this->first_action == NAVI_OBJAVA ? 'active' : ''));
}
@@ -530,26 +794,101 @@ class MobileSurveyAdmin{ $submenu = array(
array(
'title' => $lang['srv_link_data_browse'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA,
+ 'active' => (($m == '' && $a == A_COLLECT_DATA) ? 'active' : '')
),
array(
'title' => $lang['srv_data_navigation_calculate'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA . '&m=calculation'
+ 'name' => 'calculation_submenu',
+ 'submenu' => array(
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_CALC_CALCULATION'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA.'&m='.M_COLLECT_DATA_CALCULATION,
+ 'active' => ($a == A_COLLECT_DATA && $m == M_COLLECT_DATA_CALCULATION ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_CALC_CODING'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA.'&m='.M_COLLECT_DATA_CODING,
+ 'active' => ($a == A_COLLECT_DATA && $m == M_COLLECT_DATA_CODING? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_CALC_CODING_AUTO'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA.'&m='.M_COLLECT_DATA_CODING_AUTO,
+ 'active' => ($a == A_COLLECT_DATA && $m == M_COLLECT_DATA_CODING_AUTO ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_CALC_RECODING'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA.'&m='.M_COLLECT_DATA_RECODING,
+ 'active' => ($a == A_COLLECT_DATA && $m == M_COLLECT_DATA_RECODING ? 'active' : '')
+ ),
+ ),
+ 'active' => ($m == M_COLLECT_DATA_CALCULATION || $m == M_COLLECT_DATA_CODING || $m == M_COLLECT_DATA_CODING_AUTO || $m == M_COLLECT_DATA_RECODING || $m == M_COLLECT_DATA_RECODING_DASHBOARD ? 'active' : '')
),
array(
'title' => $lang['srv_data_navigation_import'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA . '&m=append'
+ 'name' => 'import_submenu',
+ 'submenu' => array(
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_IMPORT_APPEND'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA.'&m=append',
+ 'active' => ($a == A_COLLECT_DATA && $m == 'append' ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_IMPORT_MERGE'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA.'&m=merge',
+ 'active' => ($a == A_COLLECT_DATA && $m == 'merge'? 'active' : '')
+ )
+ ),
+ 'active' => ($m == 'merge' || $m == 'append' ? 'active' : '')
)
);
if ($d->checkDostopSub('export')) {
+
$submenu[] = array(
'title' => $lang['srv_export_tab'],
- 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_COLLECT_DATA_EXPORT
+ 'name' => 'export_submenu',
+ 'submenu' => array(
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_EXPORT_EXCEL_XLS'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA_EXPORT.'&m='.M_EXPORT_EXCEL_XLS,
+ 'active' => ($a == A_COLLECT_DATA_EXPORT && $m == M_EXPORT_EXCEL_XLS ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_EXPORT_SPSS'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA_EXPORT.'&m='.M_EXPORT_SPSS,
+ 'active' => ($a == A_COLLECT_DATA_EXPORT && $m == M_EXPORT_SPSS ? 'active' : '')
+ ),
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_EXPORT_TXT'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA_EXPORT.'&m='.M_EXPORT_TXT,
+ 'active' => ($a == A_COLLECT_DATA_EXPORT && $m == M_EXPORT_TXT ? 'active' : '')
+ ),
+ /* array(
+ 'title' => $lang['navigation_NAVI_DATA_EXPORT_SAV'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA_EXPORT.'&m='.M_EXPORT_SAV,
+ 'active' => ($a == A_COLLECT_DATA_EXPORT && $m == M_EXPORT_SAV ? 'active' : '')
+ ),
+
+ array(
+ 'title' => $lang['navigation_NAVI_DATA_EXPORT_EXCEL'],
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_COLLECT_DATA_EXPORT.'&m='.M_EXPORT_EXCEL,
+ 'active' => ($a == A_COLLECT_DATA_EXPORT && $m == M_EXPORT_EXCEL ? 'active' : '')
+ ), */
+ ),
+ 'active' => ($a == A_COLLECT_DATA_EXPORT ? 'active' : '')
+ );
+ }
+
+ if ($d->checkDostopSub('edit')) {
+ $submenu[] = array(
+ 'title' => $lang['srv_archive'],
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_ARHIVI . '&m=data',
+ 'active' => ($a == A_ARHIVI && $m == 'data' ? 'active' : '')
);
}
- $this->displayMenuItemWithSubmenu($name='data', $lang['srv_results'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='data', $lang['srv_results'], $submenu, ($this->first_action == NAVI_RESULTS || ($this->first_action == NAVI_UREJANJE && $m == 'data') ? 'active' : ''));
}
@@ -569,49 +908,66 @@ class MobileSurveyAdmin{ 'submenu' => array(
array(
'title' => $lang['srv_analiza_arhiviraj_type_0'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_SUMMARY
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_SUMMARY,
+ 'active' => ($m == M_ANALYSIS_SUMMARY ? 'active' : '')
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_1'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_DESCRIPTOR
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_DESCRIPTOR,
+ 'active' => ($m == M_ANALYSIS_DESCRIPTOR ? 'active' : '')
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_2'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_FREQUENCY
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_FREQUENCY,
+ 'active' => ($m == M_ANALYSIS_FREQUENCY ? 'active' : '')
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_3'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_CROSSTAB
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_CROSSTAB,
+ 'active' => ($m == M_ANALYSIS_CROSSTAB ? 'active' : ''),
),
array(
'title' => $lang['srv_multicrosstabs'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MULTICROSSTABS
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MULTICROSSTABS,
+ 'active' => ($m == M_ANALYSIS_MULTICROSSTABS ? 'active' : '')
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_4'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MEANS
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_MEANS,
+ 'active' => ($m == M_ANALYSIS_MEANS ? 'active' : '')
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_5'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_TTEST
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_TTEST,
+ 'active' => ($m == M_ANALYSIS_TTEST ? 'active' : '')
),
array(
'title' => $lang['srv_analiza_arhiviraj_type_6'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_BREAK
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_BREAK,
+ 'active' => ($m == M_ANALYSIS_BREAK ? 'active' : '')
)
- )
+ ),
+ 'active' => (($a == 'analysis' && $m != 'charts' && $m != 'analysis_links' && $m != 'anal_arch') ? 'active' : '')
),
+
array(
'title' => $lang['srv_analiza_charts'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_CHARTS
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_CHARTS,
+ 'active' => ($m == M_ANALYSIS_CHARTS ? 'active' : '')
),
array(
'title' => $lang['srv_reporti'],
- 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_LINKS
+ 'url' => 'index.php?anketa='.$this->surveyAdminClass->anketa.'&a='.A_ANALYSIS.'&m='.M_ANALYSIS_LINKS,
+ 'active' => ($m == M_ANALYSIS_CREPORT || $this->second_action == NAVI_ANALYSIS_LINKS ? 'active' : '')
),
+ array(
+ 'title' => $lang['srv_archive'],
+ 'url' => 'index.php?anketa=' . $this->surveyAdminClass->anketa . '&a=' . A_ANALYSIS . '&m=anal_arch',
+ 'active' => ($a == A_ANALYSIS && $m == 'anal_arch' ? 'active' : '')
+ )
);
- $this->displayMenuItemWithSubmenu($name='analyse', $lang['srv_analiza'], $submenu);
+ $this->displayMenuItemWithSubmenu($name='analyse', $lang['srv_analiza'], $submenu, ($this->first_action == NAVI_ANALYSIS ? 'active' : ''));
}
}
@@ -621,32 +977,12 @@ class MobileSurveyAdmin{ echo '</div>';
}
- // Izris akcij za anketo (kopiraj, brisi...) v dropdownu
- private function displayMenuSurveyActions(){
- global $lang;
-
- echo '<div class="mobile_menu_actions">';
-
- # kopiranje
- echo ' <a href="#" onclick="anketa_copy_top(\'' . $this->surveyAdminClass->anketa . '\'); return false;" title="'.$lang['srv_anketacopy'].'" class="srv_ico">';
- echo ' <span class="faicon anketa_copy"></span> '.$lang['srv_anketacopy'];
- echo ' </a>';
-
- # brisanje
- echo ' <a href="#" onclick="anketa_delete(\'' . $this->surveyAdminClass->anketa . '\', \'' . $lang['srv_anketadeleteconfirm'] . '\'); return false;" title="' . $lang['srv_anketadelete'] . '" class="srv_ico">';
- echo ' <span class="faicon anketa_delete" title="'.$lang['srv_anketadelete'].'"></span> '.$lang['srv_anketadelete'];
- echo ' </a>';
-
- echo '</div>';
- }
-
-
- private function displayMenuItemWithSubmenu($name, $title, $submenu){
+ private function displayMenuItemWithSubmenu($name, $title, $submenu, $active=""){
global $lang;
echo '<li class="has-submenu">';
- echo ' <a href="#" data-submenu="submenu_'.$name.'" title="'.$title.'">'.$title.'<span class="faicon arrow_back"></span></a>';
+ echo ' <a href="#" class="'.$active.'" data-submenu="submenu_'.$name.'" title="'.$title.'">'.$title.'<span class="faicon arrow_back"></span></a>';
echo '</li>';
// Podmeni
@@ -672,10 +1008,10 @@ class MobileSurveyAdmin{ // Dodaten podmeni
if(isset($submenu_item['name'])){
//$this->displaySubmenuItem($submenu_item['name'], $submenu_item['title'], $submenu_item['submenu']);
- $this->displayMenuItemWithSubmenu($submenu_item['name'], $submenu_item['title'], $submenu_item['submenu']);
+ $this->displayMenuItemWithSubmenu($submenu_item['name'], $submenu_item['title'], $submenu_item['submenu'], $submenu_item['active']);
}
else{
- $this->displayMenuItem($submenu_item['title'], $submenu_item['url']);
+ $this->displayMenuItem($submenu_item['title'], $submenu_item['url'], $submenu_item['active']);
}
}
echo '</ul>';
@@ -683,10 +1019,10 @@ class MobileSurveyAdmin{ echo '</div>';
}
- private function displayMenuItem($title, $url){
+ private function displayMenuItem($title, $url, $active=""){
echo '<li>';
- echo '<a href="'.$url.'" title="'.$title.'">'.$title.'</a>';
+ echo '<a class="'.$active.'" href="'.$url.'" title="'.$title.'">'.$title.'</a>';
echo '</li>';
}
@@ -695,11 +1031,24 @@ class MobileSurveyAdmin{ public static function displayAddQuestion($ank_id){
global $lang;
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ // Anketa je zaklenjena
+ if($row['locked'] == 1){
+ echo '<div class="mobile_add_question bottom">';
+ echo ' <button class="medium blue" onclick="return false;">';
+ echo ' <span class="faicon lock_close"></span> ';
+ echo ' </button>';
+ echo '</div>';
+
+ return;
+ }
+
echo '<div class="mobile_add_question bottom">';
- echo ' <span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="mobile_add_question_popup(); return false;">';
+ echo ' <button class="medium blue" onclick="mobile_add_question_popup(); return false;">';
echo ' <span class="plus">+</span> ';
echo ' <span>'.$lang['srv_mobile_add_question'].'</span>';
- echo ' </a></span>';
+ echo ' </button>';
echo '</div>';
@@ -713,9 +1062,7 @@ class MobileSurveyAdmin{ echo ' <div class="mobile_add_question_item" onClick="mobile_add_question(\'5\');"><span class="faicon nagovor"></span> <span class="item_text">'.$lang['srv_vprasanje_tip_5'].'</span></div>';
echo ' <div class="mobile_add_question_item" onClick="mobile_add_question(\'6\');"><span class="faicon matrix_32"></span> <span class="item_text">'.$lang['srv_vprasanje_tip_6'].'</span></div>';
- echo ' <span class="buttonwrapper mobile_add_question_button">';
- echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="mobile_add_question_popup_close(); return false;"><span>Zapri</span></a>';
- echo ' </span>';
+ echo ' <button class="blue medium mobile_add_question_button" onclick="mobile_add_question_popup_close(); return false;">Zapri</button>';
echo '</div>';
}
@@ -728,10 +1075,10 @@ class MobileSurveyAdmin{ echo '<style>.mobile_add_question.bottom{display: none;}</style>';
echo '<div class="mobile_add_question center">';
- echo ' <span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="mobile_add_question_popup(); return false;">';
+ echo ' <button class="blue medium" onclick="mobile_add_question_popup(); return false;">';
echo ' <span class="plus">+</span> ';
echo ' <span>'.$lang['srv_mobile_add_question'].'</span>';
- echo ' </a></span>';
+ echo ' </button>';
echo '</div>';
}
@@ -740,7 +1087,7 @@ class MobileSurveyAdmin{ global $lang;
echo '<div class="add-variable-mobile">';
- echo ' <a href="#" onclick="vrednost_new_mobile(\''.$spr_id.'\', \''.$tip.'\'); return false;" title="'.$lang['srv_novavrednost'].'"><span class="faicon add small"></span> '.$lang['srv_novavrednost'].'</a>';
+ echo ' <a href="#" onclick="vrednost_new_mobile(\''.$spr_id.'\', \''.$tip.'\'); return false;" title="'.$lang['srv_novavrednost'].'"><span class="faicon add"></span> '.$lang['srv_novavrednost'].'</a>';
echo '</div>';
}
}
|