зеркало из https://github.com/mozilla/FlightDeck.git
Merge pull request #100 from pennyfx/ui2
Truncate long package descriptions on search results page
This commit is contained in:
Коммит
4008483195
|
@ -9,7 +9,9 @@
|
|||
<span class="example" title="Example">example</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p class="description">{{ package.description }}</p>
|
||||
<p data-text="{{package.description}}"
|
||||
class="description {{ 'truncate' if package.description|length > 270 else ''}}">
|
||||
{{ package.description|truncate(270) }}</p>
|
||||
<ul class="search_meta">
|
||||
<li title="Author" class="author"><span> </span>
|
||||
<a href="{{ url('person_public_profile', package.author.username) }}">{{ package.author.get_profile() }}</a></span></li>
|
||||
|
|
Двоичный файл не отображается.
|
@ -176,6 +176,11 @@ body {
|
|||
|
||||
#SearchResults .package .description {
|
||||
color:#555;
|
||||
|
||||
}
|
||||
|
||||
#SearchResults .package .truncate{
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
#SearchResults .package .UI_Actions {
|
||||
|
|
|
@ -210,6 +210,12 @@ window.addEvent('domready', function() {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('app-body').addEvent('click:relay(#SearchResults .truncate)', function(e){
|
||||
var tmp = this.get('data-text');
|
||||
this.set('data-text',this.get('text'));
|
||||
this.set('text', tmp);
|
||||
});
|
||||
|
||||
SearchResult.setupUI();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче