Reworked projector activate buttons in agenda widget.

This commit is contained in:
Emanuel Schuetze 2013-01-18 21:44:47 +01:00
parent 586425354d
commit a4592ec849
3 changed files with 13 additions and 11 deletions

View File

@ -4,8 +4,8 @@
<ul style="line-height: 180%"> <ul style="line-height: 180%">
<li class="{% if agenda.active %}activeline{% endif %}"> <li class="{% if agenda.active %}activeline{% endif %}">
<a href="{% url 'projector_activate_slide' agenda.key %}" class="activate_link btn {% if agenda.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show agenda' %}"> <a href="{% url 'projector_activate_slide' agenda.key %}" class="activate_projector btn {% if agenda.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show agenda' %}">
<i class="icon icon-facetime-video {% if item.active %}icon-white{% endif %}"></i> <i class="icon icon-facetime-video {% if agenda.active %}icon-white{% endif %}"></i>
</a>&nbsp; </a>&nbsp;
<a href="{% url 'projctor_preview_slide' agenda.key %}" title="{% trans 'Preview' %}" class="icon preview right"> <a href="{% url 'projctor_preview_slide' agenda.key %}" title="{% trans 'Preview' %}" class="icon preview right">
<span></span> <span></span>
@ -17,7 +17,7 @@
<ul style="line-height: 180%"> <ul style="line-height: 180%">
{% for item in items %} {% for item in items %}
<li class="{% if item.active %}activeline{% endif %}"> <li class="{% if item.active %}activeline{% endif %}">
<a href="{% url 'projector_activate_slide' item.sid %}" class="activate_link btn {% if item.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show item' %}"> <a href="{% url 'projector_activate_slide' item.sid %}" class="activate_projector btn {% if item.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show item' %}">
<i class="icon icon-facetime-video {% if item.active %}icon-white{% endif %}"></i> <i class="icon icon-facetime-video {% if item.active %}icon-white{% endif %}"></i>
</a>&nbsp; </a>&nbsp;
<a href="{% model_url item 'delete' %}" title="{% trans 'Delete' %}" class="icon delete right"> <a href="{% model_url item 'delete' %}" title="{% trans 'Delete' %}" class="icon delete right">
@ -30,7 +30,7 @@
<span></span> <span></span>
</a> </a>
{% if not item.is_leaf_node %} {% if not item.is_leaf_node %}
<a class="activate_link right" href="{% url 'projector_activate_slide' item.sid 'summary' %}"> <a class="activate_projector right" href="{% url 'projector_activate_slide' item.sid 'summary' %}">
<img src="{% static 'images/icons/summary.png' %}" <img src="{% static 'images/icons/summary.png' %}"
title="{% trans 'Activate summary for this item' %}" title="{% trans 'Activate summary for this item' %}"
style="padding-right: 2px;"> style="padding-right: 2px;">

View File

@ -51,7 +51,7 @@ $(function() {
} }
// activate an element to show it on projector // activate an element to show it on projector
$('.activate_link').click(function(event) { $('.activate_projector').click(function(event) {
event.preventDefault(); event.preventDefault();
var link = $(this); var link = $(this);
$.ajax({ $.ajax({
@ -59,10 +59,12 @@ $(function() {
url: $(this).attr('href'), url: $(this).attr('href'),
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
$('.activate_link').removeClass('active'); $('.activate_projector').removeClass('btn-primary');
$('.activate_projector .icon').removeClass('icon-white');
$('li').removeClass('activeline'); $('li').removeClass('activeline');
$('div').removeClass('activeline'); //$('div').removeClass('activeline');
link.addClass('active'); link.addClass('btn-primary');
link.find('.icon').addClass('icon-white');
link.parent().addClass('activeline'); link.parent().addClass('activeline');
}, },
error: function () { error: function () {

View File

@ -79,12 +79,12 @@ a:hover {
/** Utils **/ /** Utils **/
tr.activeline td, li.activeline {
background-color: #bed4de !important;
}
tr.itemdoneline td, li.itemdoneline { tr.itemdoneline td, li.itemdoneline {
background-color: #EAEAEA !important; background-color: #EAEAEA !important;
} }
tr.activeline td, li.activeline {
background-color: #bed4de !important;
}
.nopadding { .nopadding {
padding: 0; padding: 0;
} }