Переглянути джерело

change the way theme is set to fix loading ms issue

CauseFX 4 роки тому
батько
коміт
8ca69d1243
2 змінених файлів з 8 додано та 1 видалено
  1. 7 0
      api/classes/organizr.class.php
  2. 1 1
      index.php

+ 7 - 0
api/classes/organizr.class.php

@@ -492,6 +492,12 @@ class Organizr
 		return ($encode) ? json_encode($files) : $files;
 	}
 	
+	public function setTheme($theme = null)
+	{
+		$theme = $theme ?? $this->config['theme'];
+		return '<link id="theme" href="css/themes/' . $theme . '.css?v=' . $this->fileHash . '" rel="stylesheet">';
+	}
+	
 	public function pluginFiles($type, $settings = false)
 	{
 		$files = '';
@@ -3652,6 +3658,7 @@ class Organizr
 	
 	public function organizrSpecialSettings()
 	{
+		// js activeInfo
 		return array(
 			'homepage' => array(
 				'refresh' => $this->refreshList(),

+ 1 - 1
index.php

@@ -44,7 +44,7 @@ $Organizr = new Organizr();
     <link id="style" href="css/dark.min.css?v=<?php echo $Organizr->fileHash; ?>" rel="stylesheet">
     <link href="css/organizr.min.css?v=<?php echo $Organizr->fileHash; ?>" rel="stylesheet">
 	<?php echo $Organizr->pluginFiles('css'); ?>
-    <link id="theme" href="css/themes/Organizr.css?v=<?php echo $Organizr->fileHash; ?>" rel="stylesheet">
+	<?php echo $Organizr->setTheme(); ?>
     <style id="user-appearance"></style>
     <style id="custom-theme-css"></style>
     <style id="custom-css"></style>