Browse Source

Try and fix clicking on tabs
Add chat support to settings
add splash auth

causefx 8 years ago
parent
commit
6c036aadbb
3 changed files with 43 additions and 7 deletions
  1. 1 0
      config/configDefaults.php
  2. 4 4
      index.php
  3. 38 3
      settings.php

+ 1 - 0
config/configDefaults.php

@@ -105,6 +105,7 @@ return array(
 	"downloadRefresh" => "30000",
 	"organizrAPI" => "",
 	"splash" => "false",
+	"splashAuth" => false,
 	"chat" => "false",
 	"chatAuth" => "false",
 	"installedTheme" => "",

+ 4 - 4
index.php

@@ -1045,7 +1045,7 @@ $group = (isset($group) ? $group : "guest");
 			</div>
 		</div>
 		<?php } ?>
-		<?php if (file_exists('config/config.php') && $configReady == "Yes" && $tabSetup == "No" && SPLASH == "true" && $splash && count($splash) > 1) {?>
+		<?php if (file_exists('config/config.php') && $configReady == "Yes" && $tabSetup == "No" && SPLASH == "true" && $splash && count($splash) > 1 && qualifyUser(SPLASHAUTH)) {?>
 		<div id="splashScreen" class="splash-modal modal fade">
 			<div style="background:<?=$sidebar;?>;" class="table-wrapper big-box">
 
@@ -1935,7 +1935,7 @@ $group = (isset($group) ? $group : "guest");
 		$("li[class^='tab-item']").dblclick(function(){
 			var thisidfull = $(this).attr("id");
 			var thisid = thisidfull.substr(0, thisidfull.length-1);
-			var thisframe = $("#content div[data-content-url^='"+thisid+"']").children('iframe');
+			var thisframe = $("#content div[data-content-url='"+thisid+"']").children('iframe');
 			$(thisframe).attr('src', $(thisframe).attr('src'));
 			var refreshBox = $('#content').find('.active');
 
@@ -2097,7 +2097,7 @@ $group = (isset($group) ? $group : "guest");
 
 			var thisid = thisidfull.substr(0, thisidfull.length-1);
 
-			var currentframe = $("#content div[data-content-url^='"+thisid+"']");
+			var currentframe = $("#content div[data-content-url='"+thisid+"']");
 
 			if (currentframe.attr("class") == "iframe active") {
 
@@ -2154,7 +2154,7 @@ $group = (isset($group) ? $group : "guest");
 
 			var thisid = thisidfull.substr(0, thisidfull.length-1);
 
-			var currentframe = $("#contentRight div[data-content-url^='"+thisid+"']");
+			var currentframe = $("#contentRight div[data-content-url='"+thisid+"']");
 
 			if (currentframe.attr("class") == "iframe active") {
 

+ 38 - 3
settings.php

@@ -497,6 +497,15 @@ $themeVersion = (!empty(INSTALLEDTHEME) ? explode("-", INSTALLEDTHEME)[1] : null
 							'color' => 'orange',
 							'color2' => 'palette-Light-Blue-A700 bg',
 							'padding' => '2',
+						),array(
+							'id' => 'open-help',
+							'box' => 'help-box',
+							'name' => 'Help & Chat',
+							'icon_1' => 'help-circle',
+							'icon_2' => 'question-circle',
+							'color' => 'orange',
+							'color2' => 'palette-Light-Blue-900 bg',
+							'padding' => '2',
 						),array(
 							'id' => 'open-donate',
 							'box' => 'donate-box',
@@ -1993,13 +2002,22 @@ echo buildSettings(
 							'Sliding' => 'other-thumbslider',
 						),
 					),
-					array(
-						array(
+                    array(
+                        array(
 							'type' => 'checkbox',
 							'labelTranslate' => 'ENABLE_SPLASH_SCREEN',
 							'name' => 'splash',
 							'value' => SPLASH,
 						),
+                        array(
+    						'type' => $userSelectType,
+    						'labelTranslate' => 'MINIMUM_SPLASH_ACCESS',
+    						'name' => 'splashAuth',
+    						'value' => SPLASHAUTH,
+    						'options' => $userTypes,
+    					),
+                    ),
+					array(
 						array(
 							'type' => 'checkbox',
 							'labelTranslate' => 'ENABLE_LOADING_SCREEN',
@@ -2293,6 +2311,23 @@ echo buildSettings(
                         </div>
                     </div>
                 </div>
+                <div class="email-content help-box white-bg">
+                    <div class="email-body">
+                        <div class="email-header gray-bg">
+                            <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
+                            <h1>Help & Chat</h1>
+                        </div>
+                        <div class="email-inner small-box">
+                            <div class="email-inner-section">
+                                <div class="small-box fade in">
+
+                                    <embed style="height:calc(100vh - 100px);width:calc(100%)" src='https://widgetbot.io/embed/374648602632388610/374648603127578628/0002/' />
+
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
                 <div class="email-content info-box white-bg">
                     <div class="email-body">
                         <div class="email-header gray-bg">
@@ -3823,7 +3858,7 @@ echo buildSettings(
                 }
             });
 
-            $("#open-info, #open-users, #open-logs, #open-advanced, #open-homepage, #open-colors, #open-tabs, #open-donate, #open-invites , #open-themes, #open-speedtest, #open-email").on("click",function (e) {
+            $("#open-info, #open-users, #open-logs, #open-advanced, #open-homepage, #open-colors, #open-tabs, #open-donate, #open-invites , #open-themes, #open-speedtest, #open-email, #open-help").on("click",function (e) {
                 $(".email-content").removeClass("email-active");
                 $('html').removeClass("overhid");
                 if($(window).width() < 768){