diff --git a/openslides/projector/static/img/glyphicons_335_pushpin.png b/openslides/projector/static/img/glyphicons_335_pushpin.png new file mode 100644 index 000000000..a4ba1bb36 Binary files /dev/null and b/openslides/projector/static/img/glyphicons_335_pushpin.png differ diff --git a/openslides/projector/static/javascript/dashboard.js b/openslides/projector/static/javascript/dashboard.js index c1aed73be..eb6a9f40c 100644 --- a/openslides/projector/static/javascript/dashboard.js +++ b/openslides/projector/static/javascript/dashboard.js @@ -104,6 +104,16 @@ $(function() { $('#overlay_message_text').val(data['overlay_message']); } }); + $('.fixbutton button').click(function (event) { + event.preventDefault(); + if($(this).hasClass('active')) { + $(this).closest('.widget').removeClass('affix'); + $(this).closest('.widget').removeAttr('data-spy'); + } else { + $(this).closest('.widget').addClass('affix'); + $(this).closest('.widget').attr('data-spy', 'affix'); + } + }); /* 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/ diff --git a/openslides/projector/static/styles/dashboard.css b/openslides/projector/static/styles/dashboard.css index e6f5b4266..bb649c1eb 100644 --- a/openslides/projector/static/styles/dashboard.css +++ b/openslides/projector/static/styles/dashboard.css @@ -14,8 +14,15 @@ .widget { margin: 0 10px 10px 0; } +.widget.affix { + position: fixed; + z-index: 100; + right: 20px; + top: 42px; + max-width: 40%; +} .widget-header { - height: 30px; + min-height: 30px; background: #E9E9E9; background:-moz-linear-gradient(top, #FAFAFA 0%, #E9E9E9 100%); /* FF3.6+ */ background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#E9E9E9)); /* Chrome,Safari4+ */ @@ -27,27 +34,31 @@ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9')"; border: 1px solid #D5D5D5; border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - -webkit-border-radius: 5px 5px 0 0; - } .widget-header h3 { - padding-left: 7px; - margin: 7px 0; - display: inline-block; + margin: 7px 0 7px 14px; font-size: 14px; color: #555; line-height: 18px; } - .widget-header [class^="icon-"], .widget-header [class*=" icon-"] { - display: inline-block; - margin: -2px 0 0 13px; + margin: -2px 5px 0 0px; color: #555; vertical-align: middle; } +.widget-header .collapsebutton, .widget-header .fixbutton{ + margin: -2px 4px 0 0px; +} +.widget-header .fixbutton{ + margin-left: 6px; +} +.widget-header .icon-pushpin { + background-image: url("../img/glyphicons_335_pushpin.png"); + background-position: 0 center; + margin-left:4px !important; +} .widget-content { - padding: 20px 15px 15px 13px; + padding: 0px 15px 0px 13px; background: #FFF; border: 1px solid #D5D5D5; border-radius: 0 0 5px 5px; @@ -97,11 +108,12 @@ height: 768px; } #iframewrapper { - width: 256px;/*100%;*/ - height: 192px;/*230px;*/ + width: 256px; + height: 192px; position: relative; overflow: hidden; border: 1px solid #D5D5D5; + margin-bottom: 10px; } #iframeoverlay { width: 256px; diff --git a/openslides/projector/templates/projector/dashboard.html b/openslides/projector/templates/projector/dashboard.html index 4e0ffbccf..6e12bd2c9 100644 --- a/openslides/projector/templates/projector/dashboard.html +++ b/openslides/projector/templates/projector/dashboard.html @@ -27,11 +27,24 @@ {% if widget.default_column == 1 %}