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', type: 'GET',
url: url url: url
}).done(function() { }).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.removeClass('favourite-topic-button');
elem.addClass('unfavourite-topic-button'); elem.addClass('unfavourite-topic-button');
elem.attr('id', 'unfavourite-topic-button-' + topicSlug); elem.attr('id', 'unfavourite-topic-button-' + topicSlug);
@ -58,7 +59,8 @@ function favouriteOff()
type: 'GET', type: 'GET',
url: url url: url
}).done(function() { }).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.removeClass('unfavourite-topic-button');
elem.addClass('favourite-topic-button'); elem.addClass('favourite-topic-button');
elem.attr('id', 'favourite-topic-button-' + topicSlug); elem.attr('id', 'favourite-topic-button-' + topicSlug);

View File

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

View File

@ -5,9 +5,9 @@
{% block content %} {% block content %}
<h3> <h3>
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %} {% 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 %} {% 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 %} {% endif %}
<a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a> - <a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a> -
<a href="{{ path('KekRozsakFrontBundle_forumTopicList', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a> - <a href="{{ path('KekRozsakFrontBundle_forumTopicList', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a> -

View File

@ -39,9 +39,9 @@
<td> <td>
[ikon] [ikon]
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %} {% 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 %} {% 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 %} {% endif %}
</td> </td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td> <td><a href="{{ path('KekRozsakFrontBundle_forumPostList', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>

View File

@ -29,9 +29,9 @@
<td> <td>
[ikon] [ikon]
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %} {% 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 %} {% 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 %} {% endif %}
</td> </td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td> <td><a href="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td>