Skip to content
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

Feature/link-block #728

Merged
merged 6 commits into from
Jan 11, 2017
Merged

Feature/link-block #728

merged 6 commits into from
Jan 11, 2017

Conversation

noahmanger
Copy link

This adds a couple more capabilities to the CMS.

First, it adds a new button to the rich text controls that is used to make a link sans-serif:

demo

Which gets us this:
image

Second, it adds a new block to the section StreamField to insert links to other pages, which will be used to get this sort of component on the new Candidate and Committee Services page (ignore the copy...these are just random pages in a random place for illustration purposes):
image

@@ -12,13 +12,6 @@
populateToolbar: function(toolbar) {
var button, widget;

var getEnclosing = function(tag) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that this is removed because it wasn't actually being used.

@@ -5,29 +5,7 @@
@hooks.register('construct_whitelister_element_rules')
def whitelister_element_rules():
return {
# Commenting out disallowed tags so its easier to remember & revert
'a': attribute_rule({'href': check_url}),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I learned that these rules are the default ones, so we don't need to include them... just the ones that we want to add.

Copy link
Contributor

@xtine xtine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just had one minor question.

li.sequence-member .sequence-member-inner .sequence-type-list .sequence-container-inner {
width: 100%;
}

.t-sans {
font-family: sans-serif;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it not get this class from fec-style?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stylesheet is loaded by the admin interface, which doesn't load fec-style. I added this as a one-off style so that you can know that the button works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha!

@emileighoutlaw
Copy link
Contributor

Woohoo! Just popping into this PR to say how exciting this work is 💟

@xtine xtine merged commit 679109f into develop Jan 11, 2017
@xtine xtine deleted the feature/link-block branch January 11, 2017 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants