Skip to content

Add column settings editor#323

Open
siimha wants to merge 5 commits into
masterfrom
322_modular_content_areas
Open

Add column settings editor#323
siimha wants to merge 5 commits into
masterfrom
322_modular_content_areas

Conversation

@siimha

@siimha siimha commented Jun 11, 2020

Copy link
Copy Markdown
Contributor

Lisatud:
Modulaarsed sisualad, millega on võimalik lisada üksteise korvale sisualasid, määrata padding ja maksimaalne laius.

  • Vaja leida sobivad tõlked

Testimine:
Kuna lisatud on olemasolevale sisualale, siis kontrollida lisaks funktsionaalsusele ka seda, et olemasolev sisu ei muutuks.

Close #322

@siimha siimha self-assigned this Jun 11, 2020
@siimha siimha added the feature label Jun 11, 2020
@siimha
siimha requested review from tambeta and tanelj June 11, 2020 10:33

@tambeta tambeta left a comment

Copy link
Copy Markdown

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, {

Copy link
Copy Markdown

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",

Copy link
Copy Markdown

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');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Piisab

settingsBtn.removeAttribute('disabled');

Comment thread layouts/common_page.tpl

{% assign column_settings = page.data.column_settings %}

{% if column_settings.items_count != nil and column_settings.items_count != "" %}

Copy link
Copy Markdown

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?

Comment thread layouts/common_page.tpl
Comment on lines +29 to +30
{% if column_settings.padding %}
{% endif %}

Copy link
Copy Markdown

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.

Comment thread layouts/common_page.tpl
Comment on lines +70 to +72
{% if editmode %}
<button disabled class="js-settings-btn">columns editor</button>
{% endif %}

Copy link
Copy Markdown

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.

@siimha siimha changed the title Add row settings editor Add column settings editor Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add modular content areas

2 participants