-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:wearefine/fae into v1.7
- Loading branch information
Showing
27 changed files
with
216 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Fae Changelog | ||
|
||
## Unreleased | ||
|
||
- enhancements | ||
+ Style flash message errors appropriately | ||
|
||
## 1.6 | ||
|
||
- enhancements | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* global Fae, colorpicker, FCH */ | ||
|
||
/** | ||
* Fae form color | ||
* @namespace form.color | ||
* @memberof form | ||
*/ | ||
|
||
Fae.form.color = { | ||
init: function() { | ||
this.initColorpicker(); | ||
}, | ||
|
||
/** | ||
* Initialize colorpicker | ||
*/ | ||
initColorpicker: function(e) { | ||
var includeAlphaSlider = $('.alpha-slider').length > 0 | ||
|
||
var settings = { | ||
opacity: includeAlphaSlider, | ||
positionCallback: function($elm) { | ||
var inputOffset = $elm.offset().top; | ||
var distanceToBottom = $(document).height() - inputOffset; | ||
var top = distanceToBottom <= this.$UI._height ? 414 : inputOffset + $elm.innerHeight(); | ||
|
||
return { left: 30, top: top } | ||
}, | ||
renderCallback: function($elm, toggled) { | ||
var colors = this.color.colors; | ||
|
||
// default to HEX if Alpha is 1 | ||
if ($elm.val() && colors.alpha > 0.9) { | ||
$elm.val('#' + colors.HEX); | ||
} | ||
} | ||
} | ||
|
||
$('.js-color-picker').colorPicker(settings); | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ | |
} | ||
} | ||
|
||
.flash-message.error, | ||
.alert { | ||
border-color: $c-error-content; | ||
background: $c-error-bg; | ||
|
57 changes: 57 additions & 0 deletions
57
app/assets/stylesheets/fae/modules/forms/_colorpicker.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.input.string .color-picker { | ||
width: 180px; | ||
} | ||
|
||
div.cp-color-picker { | ||
border: 1px solid $c-darker-grey; | ||
padding: 10px 10px 0; | ||
background: $c-lightest-grey; | ||
overflow: visible; | ||
border-radius: 3px; | ||
|
||
.cp-alpha { | ||
margin: 10px 0; | ||
height: 6px; | ||
border-radius: 6px; | ||
overflow: visible; | ||
border: 1px solid $c-darker-grey; | ||
box-sizing: border-box; | ||
background: linear-gradient(to right, rgba($c-lightest-grey, 1) 0%, rgba($c-lightest-grey, 0) 100%); | ||
} | ||
|
||
.cp-xy-slider { | ||
border: 1px solid $c-darker-grey; | ||
margin-bottom: 10px; | ||
|
||
&:active { | ||
cursor: none; | ||
} | ||
} | ||
|
||
.cp-xy-cursor { | ||
width: 12px; | ||
height: 12px; | ||
margin: -6px | ||
} | ||
|
||
.cp-z-slider { | ||
margin-left: 10px; | ||
border: 1px solid $c-darker-grey; | ||
} | ||
|
||
.cp-z-cursor { | ||
border-width: 5px; | ||
margin-top: -5px; | ||
} | ||
|
||
.cp-alpha-cursor { | ||
background: $c-lightest-grey; | ||
border-radius: 100%; | ||
width: 14px; | ||
height: 14px; | ||
margin: -5px -7px; | ||
border: 1px solid $c-mid-dark-grey !important; // overrides default border | ||
box-shadow: inset -2px -4px 3px $c-mid-grey; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.