Merge pull request #117 from cachethq/mini-colors

Adds jquery-minicolors to the theme values
This commit is contained in:
James Brooks
2014-12-29 19:53:03 +00:00
14 changed files with 4606 additions and 2435 deletions

View File

@@ -1,7 +1,13 @@
$(function() {
$('#sidebar-toggle').click(function() {
$('.wrapper').toggleClass('active');
$('.color-code').minicolors({
control: 'hue',
defaultValue: $(this).val() || '',
inline: false,
letterCase: 'lowercase',
opacity: false,
position: 'bottom left',
theme: 'bootstrap'
});
$('[data-toggle="tooltip"]').tooltip();

View File

@@ -23,10 +23,6 @@ class DashSettingsController extends Controller
$settings = Input::all();
foreach ($settings as $settingName => $settingValue) {
if (strstr($settingName, 'style_')) {
$settingValue = str_replace('#', '', $settingValue);
}
$setting = Setting::firstOrCreate([
'name' => $settingName,
])->update([

View File

@@ -47,38 +47,23 @@
<fieldset>
<div class='form-group'>
<label>Background Color</label>
<div class='input-group'>
<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") }}' />
<input type='text' class='form-control color-code' name='style.background_color' value='{{ Setting::get("style_background_color") }}' />
</div>
</div>
<div class='form-group'>
<label>Text Color</label>
<div class='input-group'>
<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") }}' />
<input type='text' class='form-control color-code' name='style.text_color' value='{{ Setting::get("style_text_color") }}' />
</div>
</div>
<div class='form-group'>
<label>Success Warning Color</label>
<div class='input-group'>
<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>
<input type='text' class='form-control color-code' name='style.success_warning_color' value='{{ Setting::get("style_success_warning_color") }}' />
</div>
<div class='form-group'>
<label>Error Warning Color</label>
<div class='input-group'>
<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>
<input type='text' class='form-control color-code' name='style.error_warning_color' value='{{ Setting::get("style_error_warning_color") }}' />
</div>
<div class='form-group'>
<label>Info Warning Color</label>
<div class='input-group'>
<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>
<input type='text' class='form-control color-code' name='style.style_info_warning_color' value='{{ Setting::get("style_info_warning_color") }}' />
</div>
</fieldset>

View File

@@ -1,10 +1,10 @@
<style type='text/css'>
body.status-page {
@if($styleBackgroundColor = Setting::get('style_background_color'))
background-color: #{{ $styleBackgroundColor }};
background-color: {{ $styleBackgroundColor }};
@endif
@if($styleTextColor = Setting::get('style_text_color'))
color: #{{ $styleTextColor }};
color: {{ $styleTextColor }};
@endif
}
</style>

View File

@@ -6,6 +6,7 @@
"jquery": "~2.1.1",
"chartjs": "0.2.*",
"rivets": "0.7.*",
"ionicons": "~2.0.0"
"ionicons": "~2.0.0",
"jquery-minicolors": "2.1.10"
}
}

View File

@@ -5,16 +5,19 @@ elixir(function (mix) {
.styles([
'app/assets/bower_components/fontawesome/css/font-awesome.min.css',
'app/assets/bower_components/ionicons/css/ionicons.min.css',
'app/assets/bower_components/jquery-minicolors/jquery.minicolors.css',
'public/css/main.css',
], './')
.scripts([
'bower_components/jquery/dist/jquery.min.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/**/*.js',
], './app/assets/')
.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/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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{
"css/all.css": "css/all-d4306fe3.css",
"js/all.js": "js/all-c9a5e8b0.js"
"css/all.css": "css/all-b0cbc5c6.css",
"js/all.js": "js/all-fe283b26.js"
}

1
public/public Normal file

File diff suppressed because one or more lines are too long