Changed (un)favourite icons to real icons

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely POLONKAI (W00d5t0ck) 2012-08-25 17:32:14 +02:00
parent 6747a48332
commit 41c85703b3
7 changed files with 13 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

View File

@ -24,7 +24,8 @@ function favouriteOn()
type: 'GET',
url: url
}).done(function() {
elem.html('[Kedvenc ikon]');
elem.find('img').attr('alt', '[Kedvenc]');
elem.find('img').attr('src', webRoot + '/bundles/kekrozsakfront/images/penta-yellow-24.png');
elem.removeClass('favourite-topic-button');
elem.addClass('unfavourite-topic-button');
elem.attr('id', 'unfavourite-topic-button-' + topicSlug);
@ -58,7 +59,8 @@ function favouriteOff()
type: 'GET',
url: url
}).done(function() {
elem.html('[Nem kedvenc ikon]');
elem.find('img').attr('alt', '[Nem kedvenc]');
elem.find('img').attr('src', webRoot + '/bundles/kekrozsakfront/images/penta-blue-24.png');
elem.removeClass('unfavourite-topic-button');
elem.addClass('favourite-topic-button');
elem.attr('id', 'favourite-topic-button-' + topicSlug);

View File

@ -20,6 +20,9 @@
{% javascripts 'bundles/kekrozsakfront/js/*' output='js/kekrozsak.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
<script type="text/javascript">
var webRoot = '{{ asset('') }}';
</script>
{% block additional_js %}{% endblock %}
</head>
<body>

View File

@ -5,9 +5,9 @@
{% block content %}
<h3>
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %}
<span class="gomb unfavourite-topic-button topicgroup-{{ topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}">[Kedvenc ikon]</span>
<span class="unfavourite-topic-button topicgroup-{{ topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-yellow-24.png') }}" alt="[Kedvenc]" /></span>
{% else %}
<span class="gomb favourite-topic-button topicgroup-{{ topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}">[Nem kedvenc ikon]</span>
<span class="favourite-topic-button topicgroup-{{ topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-blue-24.png') }}" alt="[Nem kedvenc]" /></span>
{% endif %}
<a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a> -
<a href="{{ path('KekRozsakFrontBundle_forumTopicList', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a> -

View File

@ -39,9 +39,9 @@
<td>
[ikon]
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %}
<span class="gomb unfavourite-topic-button topicgroup-{{ topic.topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}">[Kedvenc ikon]</span>
<span class="unfavourite-topic-button topicgroup-{{ topic.topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-yellow-24.png') }}" alt="[Kedvenc]" /></span>
{% else %}
<span class="gomb favourite-topic-button topicgroup-{{ topic.topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}">[Nem kedvenc ikon]</span>
<span class="favourite-topic-button topicgroup-{{ topic.topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-blue-24.png') }}" alt="[Nem kedvenc]" /></span>
{% endif %}
</td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>

View File

@ -29,9 +29,9 @@
<td>
[ikon]
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %}
<span class="gomb unfavourite-topic-button topicgroup-{{ topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}">[Kedvenc ikon]</span>
<span class="unfavourite-topic-button topicgroup-{{ topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-yellow-24.png') }}" alt="[Kedvenc]" /></span>
{% else %}
<span class="gomb favourite-topic-button topicgroup-{{ topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}">[Nem kedvenc ikon]</span>
<span class="favourite-topic-button topicgroup-{{ topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-blue-24.png') }}" alt="[Nem kedvenc]" /></span>
{% endif %}
</td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td>