Dokoncan desni meni z nastavitvami za mobile
This commit is contained in:
parent
48955b3460
commit
ac5369a16f
@ -41,21 +41,23 @@ class MobileSurveyAdmin{
|
||||
|
||||
// Naslov ankete + slider za nastavitve
|
||||
if($this->surveyAdminClass->anketa > 0){
|
||||
|
||||
// Naslov ankete na sredini
|
||||
$this->displaySurveyTitle();
|
||||
if ($_GET['a'] == 'branching') {
|
||||
$this->displaySurveySettingsIcon();
|
||||
$this->displayMenuSurveySettings();
|
||||
}
|
||||
|
||||
// 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>';
|
||||
// inicializira meni nastavitev v urejanju ankete
|
||||
echo '<script> mobile_settings_init(); </script>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
@ -120,9 +122,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{
|
||||
@ -133,57 +132,64 @@ class MobileSurveyAdmin{
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Izris menija za nastavitve v urejanju ankete
|
||||
private function displayMenuSurveySettings(){
|
||||
global $lang;
|
||||
|
||||
// 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">';
|
||||
echo '<div class="mobile_settings">';
|
||||
|
||||
// prikaz gumbov za vklop in odklepanje ankete - v delu
|
||||
$d = new Dostop();
|
||||
echo '<div class="mobile_settings_content">';
|
||||
|
||||
$row = SurveyInfo::getInstance()->getSurveyRow();
|
||||
|
||||
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
|
||||
|
||||
|
||||
// prikaz gumbov za vklop in odklepanje ankete
|
||||
$d = new Dostop();
|
||||
if ($d->checkDostopAktiven()) {
|
||||
|
||||
echo '<span class="borderLeft">';
|
||||
|
||||
# anketa je aktivna
|
||||
if (SurveyInfo::getSurveyColumn('active') == 1) {
|
||||
# anketa je aktivna
|
||||
|
||||
# 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->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
|
||||
} else{
|
||||
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->anketa . '\',\'' . $row['active'] . '\'); return false;" title="' . $lang['srv_anketa_active'] . '">';
|
||||
}
|
||||
else {
|
||||
echo '<a href="#" class="srv_ico" onclick="anketa_active(\'' . $this->surveyAdminClass->anketa . '\',\'' . $row['active'] . '\'); return false;" title="' . $lang['srv_anketa_active'] . '">';
|
||||
}
|
||||
|
||||
echo '<div id="srv_active" class="switch_anketa anketa_on"><span class="switch_anketa_content">ON</span></div>';
|
||||
echo ' <div class="setting_icon"><div id="srv_active" class="switch_anketa anketa_on"><span class="switch_anketa_content">ON</span></div></div>';
|
||||
echo ' <div class="setting_text">'.$lang['srv_anketa_active'].'</div>';
|
||||
|
||||
echo '</a>';
|
||||
} else {
|
||||
$anketa_active = "anketa_active('" . $this->anketa . "','" . $row['active'] . "'); ";
|
||||
}
|
||||
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
|
||||
// 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->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
|
||||
} else{
|
||||
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 {
|
||||
}
|
||||
else {
|
||||
echo '<a href="#" class="srv_ico" onclick="' . $anketa_active . ' return false;" title="' . $lang['srv_anketa_noactive'] . '">';
|
||||
}
|
||||
|
||||
if ((int)$_last_active > 0) {
|
||||
# anketa je zaključena
|
||||
echo '<div id="srv_inactive" class="switch_anketa anketa_off"><span class="switch_anketa_content">OFF</span></div>';
|
||||
} else {
|
||||
# anketa je neaktivna
|
||||
echo '<div id="srv_inactive" class="switch_anketa anketa_off"><span class="switch_anketa_content">OFF</span></div>';
|
||||
}
|
||||
|
||||
echo ' <div class="setting_icon"><div id="srv_inactive" class="switch_anketa anketa_off"><span class="switch_anketa_content">OFF</span></div></div>';
|
||||
echo ' <div class="setting_text">'.$lang['srv_anketa_noactive'].'</div>';
|
||||
|
||||
echo '</a>';
|
||||
}
|
||||
@ -191,29 +197,46 @@ private function displayMenuSurveySettings(){
|
||||
// Ce ima uporabnik prepreceno moznost odklepanja ankete, anketo ima vedno zaklenjeno če je vklopljena hierarhija
|
||||
$prevent_unlock = (SurveyInfo::getSurveyModules('hierarhija') == 2 || $d->checkDostopSub('lock') && $row['locked'] == 1 && ($admin_type != 0 && $admin_type != 1)) ? 1 : 0;
|
||||
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_close'] . '">';
|
||||
echo '<span class="faicon lock_close"></span>';
|
||||
echo ' <div class="setting_icon"><span class="faicon lock_close"></span></div>';
|
||||
echo ' <div class="setting_text">'.$lang['srv_anketa_locked_close'].'</div>';
|
||||
echo '</a>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
# zaklepanje
|
||||
//echo '<a class="anketa_img_nav" href="javascript:anketa_lock(\''.$this->anketa.'\', \''.($row['locked']==0?'1':'0').'\');" title="'.$lang['srv_anketa_locked_'.$row['locked']].'"><img style="margin-left: 5px;" src="img_0/lock'.($row['locked']==0?'_open':'').'.png" /></a>';
|
||||
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->anketa . '\', \'' . ($row['locked'] == 0 ? '1' : '0') . '\', \''.$row['mobile_created'].'\');" title="' . $lang['srv_anketa_locked_' . $row['locked']] . '">';
|
||||
}
|
||||
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 '<span class="faicon lock' . ($row['locked'] == 0 ? '_open' : '_close') . '"></span>';
|
||||
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>';
|
||||
}
|
||||
|
||||
echo '</span>';
|
||||
|
||||
// Izris akcij za anketo (kopiraj, brisi...) v dropdownu
|
||||
# kopiranje
|
||||
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></div>';
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Izris uporabniških podatkov v dropdownu
|
||||
private function displayMenuUser(){
|
||||
@ -935,26 +958,6 @@ private function displayMenuSurveySettings(){
|
||||
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, $active=""){
|
||||
global $lang;
|
||||
|
@ -8,55 +8,97 @@ function mobile_init(){
|
||||
closed: function () {
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// dynamically bind 'closing' event
|
||||
zeynep.on('closing', function () {
|
||||
// dynamically bind 'closing' event
|
||||
zeynep.on('closing', function () {
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
// handle zeynepjs overlay click
|
||||
$('.mobile_menu_close').on('click', function () {
|
||||
zeynep.close();
|
||||
$('#fade').fadeOut();
|
||||
// handle zeynepjs overlay click
|
||||
$('.mobile_menu_close').on('click', function () {
|
||||
|
||||
$('.mobile_menu_close').fadeOut('fast', function(){
|
||||
$('.mobile_menu_open').fadeIn('fast');
|
||||
});
|
||||
})
|
||||
$('#fade').fadeOut();
|
||||
|
||||
// open zeynepjs side menu
|
||||
$('.mobile_menu_open').on('click', function () {
|
||||
zeynep.open();
|
||||
mobile_menu_close(zeynep);
|
||||
})
|
||||
|
||||
// open zeynepjs side menu
|
||||
$('.mobile_menu_open').on('click', function () {
|
||||
|
||||
if($('#fade').is(':hidden')){
|
||||
$('#fade').fadeIn();
|
||||
}
|
||||
else{
|
||||
mobile_settings_close(zeynep);
|
||||
}
|
||||
|
||||
mobile_menu_open(zeynep);
|
||||
})
|
||||
|
||||
$('.mobile_menu_open').fadeOut('fast', function(){
|
||||
$('.mobile_menu_close').fadeIn('fast');
|
||||
});
|
||||
})
|
||||
// handle settings overlay click
|
||||
$('.mobile_settings_close').on('click', function () {
|
||||
|
||||
$('#fade').fadeOut();
|
||||
|
||||
mobile_settings_close(zeynep);
|
||||
})
|
||||
|
||||
// open settings side menu
|
||||
$('.mobile_settings_open').on('click', function () {
|
||||
|
||||
if($('#fade').is(':hidden')){
|
||||
$('#fade').fadeIn();
|
||||
}
|
||||
else{
|
||||
mobile_menu_close(zeynep);
|
||||
}
|
||||
|
||||
mobile_settings_open(zeynep);
|
||||
})
|
||||
}
|
||||
|
||||
function mobile_settings_init() {
|
||||
// Odpremo mobile meni na levi
|
||||
function mobile_menu_open(zeynep){
|
||||
|
||||
// handle settings overlay click
|
||||
$('.mobile_settings_close').on('click', function () {
|
||||
$('.mobile_settings').animate({"margin-right": '-=85vw'},200,'linear');
|
||||
$('#fade').fadeOut();
|
||||
zeynep.open();
|
||||
|
||||
$('.mobile_settings_close').fadeOut('fast', function(){
|
||||
$('.mobile_settings_open').fadeIn('fast');
|
||||
});
|
||||
})
|
||||
$('.mobile_menu_open').fadeOut('fast', function(){
|
||||
$('.mobile_menu_close').fadeIn('fast');
|
||||
});
|
||||
}
|
||||
|
||||
// open settings side menu
|
||||
$('.mobile_settings_open').on('click', function () {
|
||||
$('.mobile_settings').animate({"margin-right": '+=85vw'},200,'linear');
|
||||
$('#fade').fadeIn();
|
||||
// Zapremo mobile meni na levi
|
||||
function mobile_menu_close(zeynep){
|
||||
|
||||
$('.mobile_settings_open').fadeOut('fast', function(){
|
||||
$('.mobile_settings_close').fadeIn('fast');
|
||||
});
|
||||
})
|
||||
zeynep.close();
|
||||
|
||||
$('.mobile_menu_close').fadeOut('fast', function(){
|
||||
$('.mobile_menu_open').fadeIn('fast');
|
||||
});
|
||||
}
|
||||
|
||||
// Odpremo settings meni na desni
|
||||
function mobile_settings_open(){
|
||||
|
||||
$('.mobile_settings').animate({"margin-right": '+=85vw'},200,'linear');
|
||||
|
||||
$('.mobile_settings_open').fadeOut('fast', function(){
|
||||
$('.mobile_settings_close').fadeIn('fast');
|
||||
});
|
||||
}
|
||||
|
||||
// Zapremo settings meni na desni
|
||||
function mobile_settings_close(callback){
|
||||
|
||||
$('.mobile_settings').animate({"margin-right": '-85vw'},200,'linear');
|
||||
|
||||
$('.mobile_settings_close').fadeOut('fast', function(){
|
||||
$('.mobile_settings_open').fadeIn('fast');
|
||||
});
|
||||
|
||||
if (typeof callback == "function")
|
||||
callback();
|
||||
}
|
||||
|
||||
|
||||
|
@ -28708,6 +28708,9 @@ fieldset textarea {
|
||||
.mobile_header .mobile_settings_icon span {
|
||||
cursor: pointer;
|
||||
}
|
||||
.mobile_header .mobile_settings_icon span::before {
|
||||
font-size: 24px;
|
||||
}
|
||||
.mobile_header .mobile_survey_title {
|
||||
width: calc(100% - 120px);
|
||||
text-align: center;
|
||||
@ -28856,27 +28859,12 @@ fieldset textarea {
|
||||
padding-right: 10px;
|
||||
vertical-align: -1px;
|
||||
}
|
||||
.mobile_menu .mobile_menu_actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
.mobile_menu .mobile_menu_actions a {
|
||||
padding: 0 0 15px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.mobile_menu .mobile_menu_actions a .faicon::before {
|
||||
padding-right: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* Mobile meni - NASTAVITVE V UREJANJU ANKETE*/
|
||||
.mobile_settings {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
z-index: 9994;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
top: 71px;
|
||||
bottom: 0;
|
||||
width: 85vw;
|
||||
@ -28885,13 +28873,40 @@ fieldset textarea {
|
||||
overflow: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: auto;
|
||||
pointer-events: none;
|
||||
/*pointer-events: none;*/
|
||||
margin-right: -85vw;
|
||||
}
|
||||
|
||||
.mobile_settings_content {
|
||||
.mobile_settings .mobile_settings_content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
.mobile_settings .mobile_settings_content a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0 15px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.mobile_settings .mobile_settings_content a.anketa_img_nav {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px #c8e3f8 solid;
|
||||
}
|
||||
.mobile_settings .mobile_settings_content a .faicon::before {
|
||||
padding-right: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.mobile_settings .mobile_settings_content a .setting_icon {
|
||||
width: 60px;
|
||||
min-width: 60px;
|
||||
}
|
||||
.mobile_settings .mobile_settings_content a .setting_icon.bottom {
|
||||
width: 30px;
|
||||
min-width: 30px;
|
||||
}
|
||||
.mobile_settings .mobile_settings_content a .setting_text {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#srv_footer {
|
||||
display: flex;
|
||||
|
@ -62,6 +62,10 @@
|
||||
|
||||
span{
|
||||
cursor: pointer;
|
||||
|
||||
&::before{
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,24 +266,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mobile_menu_actions{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
padding: 20px;
|
||||
|
||||
a{
|
||||
padding: 0 0 15px 0;
|
||||
|
||||
font-size: 13px;
|
||||
|
||||
.faicon::before{
|
||||
padding-right: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile meni - NASTAVITVE V UREJANJU ANKETE*/
|
||||
@ -288,9 +274,6 @@
|
||||
right: 0;
|
||||
z-index: 9994;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
top: 71px;
|
||||
bottom: 0;
|
||||
width: 85vw;
|
||||
@ -302,10 +285,46 @@
|
||||
overflow: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: auto;
|
||||
pointer-events: none;
|
||||
/*pointer-events: none;*/
|
||||
margin-right: -85vw;
|
||||
}
|
||||
|
||||
.mobile_settings_content {
|
||||
padding: 20px;
|
||||
.mobile_settings_content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
padding: 20px;
|
||||
|
||||
a{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
padding: 0 0 15px 0;
|
||||
|
||||
font-size: 13px;
|
||||
|
||||
&.anketa_img_nav{
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px $soft_blue solid;
|
||||
}
|
||||
|
||||
.faicon::before{
|
||||
padding-right: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.setting_icon{
|
||||
width: 60px;
|
||||
min-width: 60px;
|
||||
|
||||
&.bottom{
|
||||
width: 30px;
|
||||
min-width: 30px;
|
||||
}
|
||||
}
|
||||
.setting_text{
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user