Merge pull request #117 from cachethq/mini-colors
Adds jquery-minicolors to the theme values
This commit is contained in:
@@ -1,7 +1,13 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
$('#sidebar-toggle').click(function() {
|
$('.color-code').minicolors({
|
||||||
$('.wrapper').toggleClass('active');
|
control: 'hue',
|
||||||
|
defaultValue: $(this).val() || '',
|
||||||
|
inline: false,
|
||||||
|
letterCase: 'lowercase',
|
||||||
|
opacity: false,
|
||||||
|
position: 'bottom left',
|
||||||
|
theme: 'bootstrap'
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ class DashSettingsController extends Controller
|
|||||||
$settings = Input::all();
|
$settings = Input::all();
|
||||||
|
|
||||||
foreach ($settings as $settingName => $settingValue) {
|
foreach ($settings as $settingName => $settingValue) {
|
||||||
if (strstr($settingName, 'style_')) {
|
|
||||||
$settingValue = str_replace('#', '', $settingValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
$setting = Setting::firstOrCreate([
|
$setting = Setting::firstOrCreate([
|
||||||
'name' => $settingName,
|
'name' => $settingName,
|
||||||
])->update([
|
])->update([
|
||||||
|
|||||||
@@ -47,38 +47,23 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label>Background Color</label>
|
<label>Background Color</label>
|
||||||
<div class='input-group'>
|
<input type='text' class='form-control color-code' name='style.background_color' value='{{ Setting::get("style_background_color") }}' />
|
||||||
<div class='input-group-addon'>#</div>
|
|
||||||
<input type='text' pattern="^+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$" class='form-control' maxlength="6" name='style.background_color' value='{{ Setting::get("style_background_color") }}' />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label>Text Color</label>
|
<label>Text Color</label>
|
||||||
<div class='input-group'>
|
<input type='text' class='form-control color-code' name='style.text_color' value='{{ Setting::get("style_text_color") }}' />
|
||||||
<div class='input-group-addon'>#</div>
|
|
||||||
<input type='text' pattern="^+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$" class='form-control' maxlength="6" name='style.text_color' value='{{ Setting::get("style_text_color") }}' />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label>Success Warning Color</label>
|
<label>Success Warning Color</label>
|
||||||
<div class='input-group'>
|
<input type='text' class='form-control color-code' name='style.success_warning_color' value='{{ Setting::get("style_success_warning_color") }}' />
|
||||||
<div class='input-group-addon'>#</div>
|
|
||||||
<input type='text' pattern="^+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$" class='form-control' maxlength="6" name='style.success_warning_color' value='{{ Setting::get("style_success_warning_color") }}' />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label>Error Warning Color</label>
|
<label>Error Warning Color</label>
|
||||||
<div class='input-group'>
|
<input type='text' class='form-control color-code' name='style.error_warning_color' value='{{ Setting::get("style_error_warning_color") }}' />
|
||||||
<div class='input-group-addon'>#</div>
|
|
||||||
<input type='text' pattern="^+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$" class='form-control' maxlength="6" name='style.error_warning_color' value='{{ Setting::get("style_error_warning_color") }}' />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label>Info Warning Color</label>
|
<label>Info Warning Color</label>
|
||||||
<div class='input-group'>
|
<input type='text' class='form-control color-code' name='style.style_info_warning_color' value='{{ Setting::get("style_info_warning_color") }}' />
|
||||||
<div class='input-group-addon'>#</div>
|
|
||||||
<input type='text' class='form-control' name='style.info_warning_color' value='{{ Setting::get("style_info_warning_color") }}' />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
body.status-page {
|
body.status-page {
|
||||||
@if($styleBackgroundColor = Setting::get('style_background_color'))
|
@if($styleBackgroundColor = Setting::get('style_background_color'))
|
||||||
background-color: #{{ $styleBackgroundColor }};
|
background-color: {{ $styleBackgroundColor }};
|
||||||
@endif
|
@endif
|
||||||
@if($styleTextColor = Setting::get('style_text_color'))
|
@if($styleTextColor = Setting::get('style_text_color'))
|
||||||
color: #{{ $styleTextColor }};
|
color: {{ $styleTextColor }};
|
||||||
@endif
|
@endif
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+2
-1
@@ -6,6 +6,7 @@
|
|||||||
"jquery": "~2.1.1",
|
"jquery": "~2.1.1",
|
||||||
"chartjs": "0.2.*",
|
"chartjs": "0.2.*",
|
||||||
"rivets": "0.7.*",
|
"rivets": "0.7.*",
|
||||||
"ionicons": "~2.0.0"
|
"ionicons": "~2.0.0",
|
||||||
|
"jquery-minicolors": "2.1.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -5,16 +5,19 @@ elixir(function (mix) {
|
|||||||
.styles([
|
.styles([
|
||||||
'app/assets/bower_components/fontawesome/css/font-awesome.min.css',
|
'app/assets/bower_components/fontawesome/css/font-awesome.min.css',
|
||||||
'app/assets/bower_components/ionicons/css/ionicons.min.css',
|
'app/assets/bower_components/ionicons/css/ionicons.min.css',
|
||||||
|
'app/assets/bower_components/jquery-minicolors/jquery.minicolors.css',
|
||||||
'public/css/main.css',
|
'public/css/main.css',
|
||||||
], './')
|
], './')
|
||||||
.scripts([
|
.scripts([
|
||||||
'bower_components/jquery/dist/jquery.min.js',
|
'bower_components/jquery/dist/jquery.min.js',
|
||||||
'bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js',
|
'bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js',
|
||||||
'bower_components/chartjs/Chart.min.js',
|
// 'bower_components/chartjs/Chart.min.js',
|
||||||
|
'bower_components/jquery-minicolors/jquery.minicolors.js',
|
||||||
'js/app.js',
|
'js/app.js',
|
||||||
'js/**/*.js',
|
'js/**/*.js',
|
||||||
], './app/assets/')
|
], './app/assets/')
|
||||||
.version(['public/css/all.css', 'public/js/all.js'])
|
.version(['public/css/all.css', 'public/js/all.js'])
|
||||||
|
.copy('app/assets/bower_components/jquery/dist/jquery.min.map', 'public/build/js/jquery.min.map')
|
||||||
.copy('app/assets/bower_components/fontawesome/fonts/', 'public/build/fonts')
|
.copy('app/assets/bower_components/fontawesome/fonts/', 'public/build/fonts')
|
||||||
.copy('app/assets/bower_components/ionicons/fonts/', 'public/build/fonts');
|
.copy('app/assets/bower_components/ionicons/fonts/', 'public/build/fonts');
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+860
-45
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"css/all.css": "css/all-d4306fe3.css",
|
"css/all.css": "css/all-b0cbc5c6.css",
|
||||||
"js/all.js": "js/all-c9a5e8b0.js"
|
"js/all.js": "js/all-fe283b26.js"
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user