Skip to content

Commit

Permalink
Merge branch 'develop' into erpnext-default-formats
Browse files Browse the repository at this point in the history
  • Loading branch information
maharshivpatel authored Apr 16, 2024
2 parents 5af4a8e + 0302e8c commit 7102ae5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% macro getFontStyles(fonts) -%}{%for key, value in fonts.items()%}{{key ~ ':ital,wght@'}}{%for index, size in enumerate(value.weight)%}{%if index > 0%};{%endif%}0,{{size}}{%endfor%}{%for index, size in enumerate(value.italic)%}{%if index > 0%};{%endif%}1,{{size}}{%endfor%}{% if not loop.last %}{{'&display=swap&family='}}{%endif%}{%endfor%}{%- endmacro %}
{% macro getFontStyles(fonts) -%}{%for key, value in fonts.items()%}{{key ~ ':ital,wght@'}}{%for index, size in enumerate(value.weight)%}{%if index > 0%};{%endif%}0,{{size}}{%endfor%}{%for index, size in enumerate(value.italic)%}{%if index > 0 or value.weight|length != 0 %};{%endif%}1,{{size}}{%endfor%}{% if not loop.last %}{{'&display=swap&family='}}{%endif%}{%endfor%}{%- endmacro %}

{% macro render_google_fonts(settings) %}
<link rel="preconnect" href="https://fonts.gstatic.com" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<!-- third Arg is row which is not sent outside table -->
{% macro span_tag(field, element, row = {}, send_to_jinja = {}) -%}
{% set span_value = spanvalue(field, element, row, send_to_jinja) %}
{%- if span_value -%}
{%- if span_value or field.fieldname in ['page', 'topage', 'time', 'date'] -%}
<span class="{% if not field.is_static and field.is_labelled %}baseSpanTag{% endif %}">
{% if not field.is_static and field.is_labelled%}
<span class="{% if row %}printTable{% else %}dynamicText{% endif %} label-text labelSpanTag" style="user-select:auto; {%if element.labelStyle %}{{convert_css(element.labelStyle)}}{%endif%}{%if field.labelStyle %}{{convert_css(field.labelStyle)}}{%endif%} white-space:nowrap; ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<!-- third Arg is row which is not sent outside table -->
{% macro render_spantag(field, element, row = {}, send_to_jinja = {}) -%}
{% set span_value = render_spanvalue(field, element, row, send_to_jinja) %}
{%- if span_value -%}
{%- if span_value or field.fieldname in ['page', 'topage', 'time', 'date'] -%}
<span class="{% if not field.is_static and field.is_labelled %}baseSpanTag{% endif %}">
{% if not field.is_static and field.is_labelled %}
<span class="{% if row %}printTable{% else %}dynamicText{% endif %} label-text labelSpanTag" style="user-select:auto; {%if element.labelStyle %}{{convert_css(element.labelStyle)}}{%endif%}{%if field.labelStyle %}{{convert_css(field.labelStyle)}}{%endif%} white-space:nowrap; ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const handleBlur = (e) => {
width.value = targetRect.width + 2;
height.value = targetRect.height + 2;
}
content.value = DOMRef.value.firstElementChild.innerHTML;
content.value = DOMRef.value.firstElementChild.innerText; // This will break styled texts :(
MainStore.getCurrentElementsId.includes(id.value) &&
DOMRef.value.classList.add("active-elements");
contenteditable.value = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,20 @@ const handleDblClick = (table, column) => {
const handleMenuClick = (index, action) => {
switch (action) {
case "before":
columns.value.splice(index, 0, { id: index, label: "" });
columns.value.splice(index, 0, {
id: index,
label: "",
style: {},
applyStyleToHeader: false,
});
break;
case "after":
columns.value.splice(index + 1, 0, { id: index + 1, label: "" });
columns.value.splice(index + 1, 0, {
id: index + 1,
label: "",
style: {},
applyStyleToHeader: false,
});
break;
case "delete":
columns.value.splice(index, 1)[0].dynamicContent?.forEach((el) => {
Expand Down

0 comments on commit 7102ae5

Please sign in to comment.