Skip to content

Commit

Permalink
IBX-1332: Updated ezimageasset fieldtype (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Dec 2, 2021
1 parent f2f684e commit 1fd9abe
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/bundle/Resources/public/scss/fieldType/edit/_ezimageasset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
}
}

.ibexa-data-source {
&__btn-add {
border: none;
font-weight: bold;
text-decoration: underline;
}

&__actions {
.ibexa-btn:not(:first-child) {
margin-left: calculateRem(16px);
}
}
}

.ibexa-field-edit-preview {
&__file-name-wrapper {
.ibexa-label {
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/translations/content_tree.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
<target state="new">This Location has no sub-items</target>
<note>key: no_subitems</note>
</trans-unit>
<trans-unit id="2be9699b658299055002412aa53431dc89281fcf" resname="show_more">
<source>Show more</source>
<target state="new">Show more</target>
<note>key: show_more</note>
<trans-unit id="005f697feb980b390fa35dcf088bdfbc76d2783a" resname="see_more">
<source>See more</source>
<target state="new">See more</target>
<note>key: see_more</note>
</trans-unit>
<trans-unit id="fa32f3cd5131d17d3c18b13089f0c93216a1e85c" resname="show_more.limit_reached">
<source>Loading limit reached</source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@
<target state="new">Upload image</target>
<note>key: fieldtype.ezimageasset.upload.label</note>
</trans-unit>
<trans-unit id="349f28b1b2e3f9c6ac1a0d2cb881f1647419e955" resname="fieldtype.imageasset.drag_drop">
<source><![CDATA[Drag and drop image here or <br /><button class="ibexa-data-source__btn-add">Browse</button> to choose a file]]></source>
<target state="new"><![CDATA[Drag and drop image here or <br /><button class="ibexa-data-source__btn-add">Browse</button> to choose a file]]></target>
<note>key: fieldtype.imageasset.drag_drop</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

{% block ezplatform_fieldtype_ezimageasset_widget %}
<div class="ibexa-data-source__message--main">
{{ 'fieldtype.binary_base.drag_drop'|trans|desc('Drag and drop file') }}
{{ 'fieldtype.imageasset.drag_drop'|trans|raw|desc('Drag and drop image here or <br /><button class="ibexa-data-source__btn-add">Browse</button> to choose a file') }}
</div>
<div class="ibexa-data-source__message--separator">{{ 'fieldtype.binary_base.drag_drop.or'|trans|desc('or') }}</div>
<div class="ibexa-data-source__actions">
Expand All @@ -61,9 +61,6 @@
{% endblock %}

{% block ezimageasset_source_buttons %}
<button class="btn ibexa-btn ibexa-btn--secondary ibexa-data-source__btn-add">
{{ 'fieldtype.ezimageasset.upload.label'|trans|desc('Upload image') }}
</button>
<button
class="btn ibexa-btn ibexa-btn--secondary ibexa-data-source__btn-select"
data-udw-config="{{ ibexa_udw_config('image_asset', {}) }}"
Expand Down

0 comments on commit 1fd9abe

Please sign in to comment.