]> BookStack Code Mirror - bookstack/blobdiff - resources/views/settings/index.blade.php
Merge pull request #3 from OsmosysSoftware/revert-1-issue-181
[bookstack] / resources / views / settings / index.blade.php
index 1645fdfd0e063f8cc29533bc00cba4a9b975fc32..c736bc24eb9520fce4089c51f2c5610d5c6c761f 100644 (file)
@@ -56,7 +56,8 @@
                         'defaultImage' => baseUrl('/logo.png'),
                         'currentImage' => setting('app-logo'),
                         'name' => 'setting-app-logo',
-                        'imageClass' => 'logo-image'
+                        'imageClass' => 'logo-image',
+                        'currentId' => false
                     ])
 
                 </div>
 
 </div>
 
-@include('partials/image-manager', ['imageType' => 'system'])
+@include('components.image-manager', ['imageType' => 'system'])
 
 @stop
 
                 var isEmpty = $.trim($elm.val()).length === 0;
                 if (!isEmpty) $elm.val(hexVal);
                 $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
-                // Set page elements to provide preview
-                $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;');
-                $('.faded-small').css('background-color', rgbLightVal);
-                $('.setting-nav a.selected').css('border-bottom-color', hexVal  + '!important');
+
+                var customStyles = document.getElementById('custom-styles');
+                var oldColor = customStyles.getAttribute('data-color');
+                var oldColorLight = customStyles.getAttribute('data-color-light');
+
+                customStyles.innerHTML = customStyles.innerHTML.split(oldColor).join(hexVal);
+                customStyles.innerHTML = customStyles.innerHTML.split(oldColorLight).join(rgbLightVal);
+
+                customStyles.setAttribute('data-color', hexVal);
+                customStyles.setAttribute('data-color-light', rgbLightVal);
             }
         });
     </script>