Browse Source

Template CSS, Vertical Menu: Minor adjustments.

Nate 5 years ago
parent
commit
0e21458af4
2 changed files with 10 additions and 1 deletions
  1. 6 1
      resources/classes/menu.php
  2. 4 0
      themes/default/css.php

+ 6 - 1
resources/classes/menu.php

@@ -1156,11 +1156,16 @@ if (!class_exists('menu')) {
 					}
 					}
 				//logout icon
 				//logout icon
 					if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
 					if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
-						$html .= "<a id='header_logout_icon' href='".PROJECT_PATH."/logout.php' title=\"".$this->text['theme-label-logout']."\" onclick=\"return confirm('".$this->text['theme-confirm-logout']."')\"><span class='fas fa-log-out'></span></a>";
+						$html .= "<a id='header_logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
 					}
 					}
 				$html .= "</span>";
 				$html .= "</span>";
 			$html .= "	</div>\n";
 			$html .= "	</div>\n";
 
 
+			//modal for logout icon (above)
+				if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
+					$html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]);
+				}
+
 			return $html;
 			return $html;
 			unset($html);
 			unset($html);
 
 

+ 4 - 0
themes/default/css.php

@@ -2671,6 +2671,10 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
 		margin: <?php echo $_SESSION['theme']['modal_message_margin']['text'] != '' ? $_SESSION['theme']['modal_message_margin']['text'] : '0 0 20px 0'; ?>;
 		margin: <?php echo $_SESSION['theme']['modal_message_margin']['text'] != '' ? $_SESSION['theme']['modal_message_margin']['text'] : '0 0 20px 0'; ?>;
 		}
 		}
 
 
+	.modal-actions {
+		display: block;
+		text-align: left;
+		}
 
 
 <?php
 <?php