Minor fixes on common components

This commit is contained in:
Bruno Alves de Faria 2018-03-01 11:35:19 -03:00
parent 6e3e44a1fe
commit d486ebd551
5 changed files with 18 additions and 5 deletions

View File

@ -15,7 +15,7 @@
{{#if isError}}
{{>pageError (extend this error=this.details)}}
{{else}}
{{#let message=(choose this.bodyText this.reason this.message 'An error has ocurred.')}}
{{#let message=(choose this.bodyText this.reason this.message (valueIf UI.contentBlock '' 'An error has ocurred.' ))}}
<div class="message">{{message}}</div>
{{/let}}
{{/if}}

View File

@ -24,9 +24,11 @@
<use xlink:href={{absoluteUrl item.iconSvgUse}}></use>
</svg>
{{/if}}
{{#if item.text}}
<span>{{item.text}}</span>
{{/if}}
{{#let text=(getText item)}}
{{#if text}}
<span>{{text}}</span>
{{/if}}
{{/let}}
{{/link}}
</li>
{{#if item.separatorAfter}}

View File

@ -10,5 +10,13 @@ Template.dropdownFormMenu.helpers({
}
return isVisible;
},
getText(item) {
if (typeof item.text === 'function') {
return item.text(item.params || {});
}
return item.text || '';
}
});

View File

@ -31,6 +31,9 @@ border-bottom-right-radius(r)
box-shadow(s)
vendorize(box-shadow, s)
text-shadow(s)
vendorize(text-shadow, s)
transform(t)
vendorize(transform, t)

View File

@ -100,7 +100,7 @@
line-height: 20px
outline: none
overflow: hidden
padding: 0 12px
padding: 0 12px 5px
resize: none
transition(height 0.3s ease)
width: 100%