+
+@section('scripts')
+ <script src="{{ baseUrl("/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0") }}"></script>
+ <script type="text/javascript">
+ $('#setting-app-color').colorPicker({
+ opacity: false,
+ renderCallback: function($elm, toggled) {
+ var hexVal = '#' + this.color.colors.HEX;
+ var rgb = this.color.colors.RND.rgb;
+ var rgbLightVal = 'rgba('+ [rgb.r, rgb.g, rgb.b, '0.15'].join(',') +')';
+ // Set textbox color to hex color code.
+ 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');
+ }
+ });
+ </script>
+@stop
\ No newline at end of file