-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add column settings editor #323
base: master
Are you sure you want to change the base?
Conversation
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.
- Kui lehe mall ei ole Common Page saab vea:
SettingsEditor's `el` parameter has to be either a plain DOM node or a jQuery object around a DOM node.
- Veergude arvu muutmisel võiks vaikimisi lehe salvestada - praegu saab hoiatuse.
Väga äge asi muidu 👍
|
||
var settingsBtn = document.querySelector('.js-settings-btn'); | ||
|
||
var SettingsEditor = new Edicy.SettingsEditor(settingsBtn, { |
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.
Siin peaks eelnema kontroll, kas settingsBtn
on väärtustatud.
var SettingsEditor = new Edicy.SettingsEditor(settingsBtn, { | ||
menuItems: [ | ||
{ | ||
"title": "Columns count", |
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.
Siin peaks nähtavasti ka tõlked olema, aga see teada.
}); | ||
} | ||
}); | ||
document.querySelector('.js-settings-btn').removeAttribute('disabled'); |
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.
Piisab
settingsBtn.removeAttribute('disabled');
|
||
{% assign column_settings = page.data.column_settings %} | ||
|
||
{% if column_settings.items_count != nil and column_settings.items_count != "" %} |
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.
Kas Liquidis mingit blank?
-stiilis kontrolli (a la Ruby) ei ole, või peabki alati nil
ja ""
vastu kontrollima?
{% if column_settings.padding %} | ||
{% endif %} |
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.
Siin on read vahetusse läinud.
{% if editmode %} | ||
<button disabled class="js-settings-btn">columns editor</button> | ||
{% endif %} |
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.
See võiks ka sisse trepitud olla ühtsuse ja ilusa koodi mõttes. Allpool samamoodi.
Lisatud:
Modulaarsed sisualad, millega on võimalik lisada üksteise korvale sisualasid, määrata padding ja maksimaalne laius.
Testimine:
Kuna lisatud on olemasolevale sisualale, siis kontrollida lisaks funktsionaalsusele ka seda, et olemasolev sisu ei muutuks.
Close #322