-
Notifications
You must be signed in to change notification settings - Fork 6
COR-526: Featured Image Button #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9bc9587
890f987
41b4683
3e4e7d4
d2c85b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,8 @@ window.setModals = function () { | |
window.onload = function(){ | ||
window.setModals() | ||
} | ||
|
||
$(".popup--open").on("click", function(ev){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm okay with the SASS living in Cortex, but this I feel should definitely live in the engine. Additionally, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also valid: you could just spit out the name of the field in a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of right now the actual modal code only allows for one popup to ever exist - I agree that we should be differentiating between potential popups, but it won't actually do anything There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are 3 modals hardcoded with 3 different IDs, with 3 convenience methods for invoking each - not sure I'm following. This story is meant to iron out the logic for triggering the correct popup, so I don't know what story this bit would live in if not this one |
||
ev.preventDefault(); | ||
window.MODALS.featured.open(); | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.dialog-div { | ||
position: fixed; | ||
background: #fff; | ||
background: $color-white; | ||
} | ||
|
||
.dialog-backdrop { | ||
|
@@ -37,9 +37,36 @@ | |
bottom: 0; | ||
right: 0; | ||
left: 0; | ||
background: white; | ||
background: $color-white; | ||
} | ||
|
||
.mdl-dialog__content { | ||
padding: 0; | ||
} | ||
|
||
.content_item_button { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this may be our first significant example of a plugin requiring styling. We can push this off for V2, but in V3, this styling must live in the plugin engine. |
||
border: 1px solid $color-grey; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
width: 100%; | ||
background-color: $color-white; | ||
color: $color-anchor-blue-light; | ||
text-align: center; | ||
|
||
&:active { | ||
background-color: $color-grey-lightest; | ||
} | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
.button_content { | ||
padding-top: 30px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd recommend doin' some maths on the padding/margin sizing variables to derive the padding here |
||
padding-bottom: 20px; | ||
} | ||
|
||
.content_item_button-text { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not required for this PR, but noteworthy for the future: BEM would suggest you name dependent elements as such: |
||
@extend .text-style-7; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ namespace :employer do | |
blog.fields.new(name: 'Categories', field_type: 'tree_field_type', metadata: {allowed_values: category_tree}, validations: {maximum: 2, minimum: 1}) | ||
blog.fields.new(name: 'Research', field_type: 'tree_field_type', metadata: {allowed_values: research_tree}, validations: {minimum: 1}) | ||
blog.fields.new(name: 'Persona', field_type: 'tree_field_type', metadata: {allowed_values: persona_tree}) | ||
blog.fields.new(name: 'Featured Image', field_type: 'content_item_field_type') | ||
|
||
puts "Saving Employer Blog..." | ||
blog.save | ||
|
@@ -137,9 +138,6 @@ namespace :employer do | |
{ | ||
"id": blog.fields.find_by_name('Tags').id | ||
}, | ||
# { | ||
# "id": blog.fields.find_by_name('Expiration Date').id | ||
# }, | ||
{ | ||
"id": blog.fields.find_by_name('Publish Date').id | ||
} | ||
|
@@ -196,6 +194,22 @@ namespace :employer do | |
} | ||
] | ||
}, | ||
{ | ||
"name": "Add Featured Image", | ||
"description": "Add an image to feature with this Blog Post.", | ||
"columns": [ | ||
{ | ||
"heading": "Image (Optional Heading)", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this say |
||
"grid_width": 12, | ||
"elements": [ | ||
{ | ||
"id": blog.fields.find_by_name('Featured Image').id, | ||
"render_method": "popup" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Search", | ||
"heading": "How can others find your post..", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ElliottAYoung this is still pointing to a branch