mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Make the whole event panel clickable in all events
Make the whole event panel clickable in all events in the public schedule. It didn't work properly when having links inside the panel. It also works with ctrl + click openning the event page in a new tab.
This commit is contained in:
parent
424b1302cb
commit
96337ed081
2 changed files with 47 additions and 39 deletions
|
|
@ -63,12 +63,6 @@ background-image: -webkit-gradient(
|
|||
color: rgb(185, 74, 72);
|
||||
}
|
||||
|
||||
a.unstyled-link {
|
||||
text-decoration: none;
|
||||
color: #333333;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.program-dropdown, .schedule-dropdown{
|
||||
margin-left: 20%;
|
||||
margin-right: 20%;
|
||||
|
|
@ -175,6 +169,10 @@ td.no-padding{
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.event-panel{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.program-dropdown{
|
||||
margin-left: 20%;
|
||||
margin-right: 20%;
|
||||
|
|
|
|||
|
|
@ -1,33 +1,43 @@
|
|||
%a.unstyled-link{href: url_for(conference_program_proposal_path(@conference.short_title, event.id))}
|
||||
.panel.panel-default
|
||||
.panel-body
|
||||
- if speaker = event.speakers.first
|
||||
= image_tag speaker.gravatar_url, :class => "img-circle pull-right all-speaker-pic", |
|
||||
:alt => speaker.name, |
|
||||
:title => speaker.name |
|
||||
%span.h3
|
||||
= event.title
|
||||
%br
|
||||
%small
|
||||
= event.subtitle
|
||||
%h4
|
||||
presented by #{event.speaker_names}
|
||||
%p
|
||||
= truncate(event.abstract, :length => 400)
|
||||
= link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400
|
||||
- if event.scheduled?
|
||||
%span.track
|
||||
%span.fa.fa-clock-o
|
||||
%span.label{ style: "background-color: grey" }
|
||||
= event.start_time.strftime('%H:%M')
|
||||
\-
|
||||
= event.end_time.strftime('%H:%M')
|
||||
%span.track
|
||||
%span.fa.fa-map-marker
|
||||
%span.label{ style: "background-color: grey" }
|
||||
= event.room.name
|
||||
- if event.track
|
||||
%span.track
|
||||
%span.fa.fa-road
|
||||
%span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" }
|
||||
= event.track.name
|
||||
.panel.panel-default.event-panel{ id: "link-#{event.id}" }
|
||||
.panel-body
|
||||
- if speaker = event.speakers.first
|
||||
= image_tag speaker.gravatar_url, :class => "img-circle pull-right all-speaker-pic", |
|
||||
:alt => speaker.name, |
|
||||
:title => speaker.name |
|
||||
%span.h3
|
||||
= event.title
|
||||
%br
|
||||
%small
|
||||
= event.subtitle
|
||||
%h4
|
||||
presented by #{event.speaker_names}
|
||||
%p
|
||||
= truncate(event.abstract, :length => 400)
|
||||
= link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400
|
||||
- if event.scheduled?
|
||||
%span.track
|
||||
%span.fa.fa-clock-o
|
||||
%span.label{ style: "background-color: grey" }
|
||||
= event.start_time.strftime('%H:%M')
|
||||
\-
|
||||
= event.end_time.strftime('%H:%M')
|
||||
%span.track
|
||||
%span.fa.fa-map-marker
|
||||
%span.label{ style: "background-color: grey" }
|
||||
= event.room.name
|
||||
- if event.track
|
||||
%span.track
|
||||
%span.fa.fa-road
|
||||
%span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" }
|
||||
= event.track.name
|
||||
|
||||
:javascript
|
||||
|
||||
$("#link-#{event.id}").click(function(e) {
|
||||
var url = "#{url_for(conference_program_proposal_path(@conference.short_title, event.id))}";
|
||||
|
||||
if(e.ctrlKey)
|
||||
window.open(url,'_blank');
|
||||
else
|
||||
window.location = url;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue