#97: (Aftermath)

Quick cross-browser fix: remove the spin-buttons and use input type=number.
If your browser is HTML5 it should show a spin box, otherwise the fallback
(type=text) will work equally well.
This commit is contained in:
René Köcher 2012-04-27 07:59:23 +02:00
parent 7f54331d0c
commit 030ff09ec0
2 changed files with 1 additions and 21 deletions

View File

@ -60,20 +60,6 @@ $(function() {
});
});
$('.projector_countdown_spindown').click(function(event) {
event.preventDefault();
var count = parseInt($( "#countdown_time" ).val());
$( "#countdown_time" ).val( ((count - 1 >= 0) ? count - 1 : count));
});
$('.projector_countdown_spinup').click(function(event) {
event.preventDefault();
var count = parseInt($( "#countdown_time" ).val());
$( "#countdown_time" ).val(count + 1);
});
$('.countdown_visible_link').click(function(event) {
event.preventDefault();
var link = $(this);

View File

@ -144,13 +144,7 @@
{% if overlay.def_name == "Countdown" %}
|
<span class="projector_countdown_spinbox">
<input class="projector_countdown_spinval" id="countdown_time" name="countdown_time" type="text" value="{{countdown_time}}">
<a class="projector_countdown_spinup" href="#">
<img src="{% static 'images/icons/spin-up.png' %}" />
</a>
<a class="projector_countdown_spindown" href="#">
<img src="{% static 'images/icons/spin-down.png' %}" />
</a>
<input class="projector_countdown_spinval" id="countdown_time" name="countdown_time" type="number" min="0" value="{{countdown_time}}">
{% trans "sec" %}
&nbsp;
<a id="countdown_set" class="projector_countdown_btn" href="{% url countdown_set_default %}" title="{% trans 'Save as default' %}">