diff --git a/openslides/projector/static/javascript/dashboard.js b/openslides/projector/static/javascript/dashboard.js index 02eb44d4e..454accbff 100644 --- a/openslides/projector/static/javascript/dashboard.js +++ b/openslides/projector/static/javascript/dashboard.js @@ -15,11 +15,12 @@ function saveOrder() { $.cookie(cookieName, order, { path: "/", expiry: new Date(2012, 1, 1)}); }); } + // function that restores the widget list order from a cookie function restoreOrder() { $(".column").each(function(index, value) { var colid = value.id; - var cookieName = "cookie-" + colid + var cookieName = "cookie-" + colid; var cookie = $.cookie(cookieName); if ( cookie == null ) { return; } var IDs = cookie.split(","); @@ -38,38 +39,7 @@ $(function() { stop: function() { saveOrder(); } }); - restoreOrder(); - - if ($.browser.msie) { - if ($.browser.version >= 8.0 && $.browser.version < 9.0) - { - /* scaling bug in IE8.. iframe has to be 4 times bigger */ - $( "#iframe" ).css('width', 1024 * 4); - $( "#iframe" ).css('height', 768 * 4); - } - $( "#iframe" ).css('zoom', '0.25'); - } - - $('a.overlay').click(function(event) { - event.preventDefault(); - var link = $(this); - $.ajax({ - type: 'GET', - url: $(this).attr('href'), - dataType: 'json', - success: function(data) { - if (data['active']) { - $('#' + data['def_name'] + '_active').show(); - $('#' + data['def_name'] + '_inactive').hide(); - } else { - $('#' + data['def_name'] + '_active').hide(); - $('#' + data['def_name'] + '_inactive').show(); - } - }, - }); - }); - - // control the projector + // control the projector view $('.projector_edit').click(function(event) { event.preventDefault(); var link = $(this); @@ -87,7 +57,6 @@ $(function() { event.preventDefault(); var link = $(this); var requestData = {}; - if (link.attr('id') == "countdown_set") { requestData = { "countdown_time" : $( "#countdown_time" ).val() }; } @@ -109,7 +78,8 @@ $(function() { }); }); - $('.countdown_visible_link').click(function(event) { + // activate/deactivate overlay + $('.overlay_activate_link').click(function(event) { event.preventDefault(); var link = $(this); $.ajax({ @@ -117,13 +87,13 @@ $(function() { url: link.attr('href'), dataType: 'json', success: function(data) { - if (data.countdown_visible == "True") { - newclass = 'open'; + if (data['active']) { + $('#' + data['def_name'] + '_active').show(); + $('#' + data['def_name'] + '_inactive').hide(); } else { - newclass = 'closed'; + $('#' + data['def_name'] + '_active').hide(); + $('#' + data['def_name'] + '_inactive').show(); } - link.removeClass('closed open').addClass(newclass); - link.attr('href', data.link); } }); }); @@ -134,4 +104,21 @@ $(function() { $('#overlay_message_text').val(data['overlay_message']); } }); + +/* comment out this function because '$.browser' has been removed from jquery 1.9, see: + http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/ + TODO: use jquery migrate to have $.browser support for IE8; + + if ($.browser.msie) { + if ($.browser.version >= 8.0 && $.browser.version < 9.0) + { + // scaling bug in IE8.. iframe has to be 4 times bigger + $( "#iframe" ).css('width', 1024 * 4); + $( "#iframe" ).css('height', 768 * 4); + } + $( "#iframe" ).css('zoom', '0.25'); + } +*/ + + restoreOrder(); }); diff --git a/openslides/projector/static/styles/dashboard.css b/openslides/projector/static/styles/dashboard.css index 0266e64c2..fd5134bdb 100644 --- a/openslides/projector/static/styles/dashboard.css +++ b/openslides/projector/static/styles/dashboard.css @@ -54,9 +54,12 @@ -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; } -.widget-content li{ +.widget-content li { padding: 4px 0; } +.widget-content .overlay_list li { + padding-bottom: 10px; +} .widget-content ul { list-style: none inside none; margin: 0; @@ -74,15 +77,13 @@ visibility: hidden; } -/*.projector_countdown_spinval {*/ +.overlay_list .form-inline { + margin: 5px 0 0 31px; +} #countdown_time { width: 40px; } -#overlay_message_text { - width: 90%; - height: 12px; -} /* iframe */ #iframe { @@ -95,7 +96,6 @@ width: 1024px; height: 768px; } - #iframewrapper { width: 256px;/*100%;*/ height: 192px;/*230px;*/ @@ -103,7 +103,6 @@ overflow: hidden; border: 1px solid #D5D5D5; } - #iframeoverlay { width: 256px; height: 192px; @@ -113,35 +112,3 @@ display: block; z-index: 1; } - -/* activate link */ -a.activate_link div { - background-image: url(../images/icons/accept-grey.png); - background-repeat: no-repeat; - float: left; - width: 16px; - height: 16px; - padding-right: 12px; - position: relative; - top: 4px; - left: 4px; -} -a.activate_link.active div { - background-image: url(../images/icons/accept.png); -} - -a.overlay div { - background-image: url(../images/icons/accept-grey.png); - background-repeat: no-repeat; - float: left; - width: 16px; - height: 16px; - padding-right: 16px; - position: relative; - top: 4px; - left: 4px; -} - -a.overlay.active div { - background-image: url(../images/icons/accept.png); -} diff --git a/openslides/projector/templates/projector/control_countdown.html b/openslides/projector/templates/projector/control_countdown.html index a2c93248a..837666093 100644 --- a/openslides/projector/templates/projector/control_countdown.html +++ b/openslides/projector/templates/projector/control_countdown.html @@ -1,24 +1,21 @@ -{% load staticfiles %} {% load i18n %} {% load tags %} - -
-
- - {% trans "s" context "seconds" %} -
- - - - - - - - +
+
+ + {% trans "s" context "seconds" %}
- + + + + + + + + +
diff --git a/openslides/projector/templates/projector/control_overlay_message.html b/openslides/projector/templates/projector/control_overlay_message.html index 5c9c205ed..ee10ace99 100644 --- a/openslides/projector/templates/projector/control_overlay_message.html +++ b/openslides/projector/templates/projector/control_overlay_message.html @@ -1,15 +1,14 @@ -{% load staticfiles %} {% load i18n %} {% load tags %} -
{% csrf_token %} -
- - - +{% csrf_token %} +
+ + +
diff --git a/openslides/projector/templates/projector/custom_slide_widget.html b/openslides/projector/templates/projector/custom_slide_widget.html index 64445a72c..f4c805047 100644 --- a/openslides/projector/templates/projector/custom_slide_widget.html +++ b/openslides/projector/templates/projector/custom_slide_widget.html @@ -1,4 +1,3 @@ -{% load staticfiles %} {% load i18n %} {% load tags %} diff --git a/openslides/projector/templates/projector/dashboard.html b/openslides/projector/templates/projector/dashboard.html index 76e50a0c8..11d5f3a7b 100644 --- a/openslides/projector/templates/projector/dashboard.html +++ b/openslides/projector/templates/projector/dashboard.html @@ -9,9 +9,9 @@ {% endblock %} {% block javascript %} - + {% endblock %} {% block content %} diff --git a/openslides/projector/templates/projector/live_view_widget.html b/openslides/projector/templates/projector/live_view_widget.html index fbcb4cb95..cd49a453f 100644 --- a/openslides/projector/templates/projector/live_view_widget.html +++ b/openslides/projector/templates/projector/live_view_widget.html @@ -1,6 +1,5 @@ {% load i18n %} {% load tags %} -{% load staticfiles %} {% if perms.projector.can_manage_projector %} diff --git a/openslides/projector/templates/projector/overlay_widget.html b/openslides/projector/templates/projector/overlay_widget.html index 51d68f8da..415590221 100644 --- a/openslides/projector/templates/projector/overlay_widget.html +++ b/openslides/projector/templates/projector/overlay_widget.html @@ -1,24 +1,29 @@ {% load i18n %} {% load tags %} -
    +
      {% for overlay in overlays %}
    • - - + + + + + - {# TODO: Call the html via overlay.html #} {% if overlay.def_name == "Countdown" %} -

      {{ overlay }}:
      + {% trans "Countdown" %}:
      {% include 'projector/control_countdown.html' %} -

      {% endif %} {% if overlay.def_name == "Message" %} - {{ overlay }}:
      + {% trans "Message" %}:
      {% include 'projector/control_overlay_message.html' %} {% endif %}
    • diff --git a/openslides/static/img/glyphicons_256_delete.png b/openslides/static/img/glyphicons_256_delete.png new file mode 100644 index 000000000..81282f990 Binary files /dev/null and b/openslides/static/img/glyphicons_256_delete.png differ diff --git a/openslides/static/styles/base.css b/openslides/static/styles/base.css index 51e2458de..c0b3d3cc5 100644 --- a/openslides/static/styles/base.css +++ b/openslides/static/styles/base.css @@ -264,7 +264,7 @@ legend + .control-group { /** More glyphicons free icons **/ -.icon-on, .icon-checked-new { +.status_link .icon-on, .icon-checked-new { background-image: url("../img/glyphicons_152_check.png"); background-position: 0; } @@ -292,7 +292,10 @@ legend + .control-group { background-image: url("../img/glyphicons_358_file_import.png"); background-position: 0; } - +.icon-delete { + background-image: url("../img/glyphicons_256_delete.png"); + background-position: 0; +} /** Responsive **/ @media (max-width: 767px) {