fix: remove hover

This commit is contained in:
Summayya
2021-08-18 23:53:02 +05:30
parent af9760f944
commit eb58b1c149
8 changed files with 69 additions and 41 deletions

View File

@@ -9,7 +9,7 @@
"event_name",
"start_date",
"end_date",
"event_details"
"event_description"
],
"fields": [
{
@@ -35,15 +35,15 @@
"reqd": 1
},
{
"fieldname": "event_details",
"fieldname": "event_description",
"fieldtype": "Markdown Editor",
"in_list_view": 1,
"label": "Event Details"
"label": "Event Description"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-18 09:46:06.455633",
"modified": "2021-08-18 23:51:30.432691",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Event Details",

View File

@@ -19,8 +19,7 @@
{
"fieldname": "company",
"fieldtype": "Data",
"label": "Company ",
"unique": 1
"label": "Company "
},
{
"fieldname": "logo",
@@ -30,7 +29,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-16 17:01:51.344097",
"modified": "2021-08-18 20:08:31.591935",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Exhibitor Registration",

View File

@@ -1,8 +1,18 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
# import frappe
import frappe
from frappe.model.document import Document
class Schedule(Document):
pass
def before_save(self):
exists = frappe.db.exists(
"Schedule",
{
"Event": self.event,
"slot": self.slot
},
)
if exists:
frappe.throw("Slot already Assigned")

View File

@@ -15,28 +15,36 @@
{
"fieldname": "event",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Event",
"options": "Event Details"
"options": "Event Details",
"reqd": 1
},
{
"fieldname": "date",
"fieldtype": "Date",
"label": "Date"
"in_list_view": 1,
"label": "Date",
"reqd": 1
},
{
"fieldname": "start_time",
"fieldtype": "Time",
"label": "Start Time"
"in_list_view": 1,
"label": "Start Time",
"reqd": 1
},
{
"fieldname": "end_time",
"fieldtype": "Time",
"label": "End Time"
"in_list_view": 1,
"label": "End Time",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-08-16 17:13:28.144260",
"modified": "2021-08-18 23:51:47.850435",
"modified_by": "Administrator",
"module": "Event Management",
"name": "Slot",

View File

@@ -1,8 +1,14 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
# import frappe
import frappe
from frappe.model.document import Document
from frappe.utils import getdate
class Slot(Document):
pass
def before_save(self):
event = frappe.get_doc("Event Details", self.event)
if getdate(self.date) < event.start_date or getdate(self.date) > event.end_date:
frappe.throw("Slot should be in Event's span")

View File

@@ -15,10 +15,11 @@
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "<div class=\"ql-editor read-mode\"><p><br></p></div>",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-08-18 14:54:32.498739",
"modified": "2021-08-18 20:00:46.756407",
"modified_by": "Administrator",
"module": "Event Management",
"name": "speaker-registration",

View File

@@ -2,20 +2,23 @@
'event': event
},) %}
{% set slot_data = {} %}
{% for schedule in schedule_docs %}
{% set speaker = frappe.get_doc("Speaker Registration", schedule.speaker) %}
{% set slot = frappe.get_doc("Slot", schedule.slot) %}
{% set slot_data = slot_data.setdefault(slot.date, []).append({
"slot": slot.name,
"start_time": slot.start_time,
"end_time": slot.end_time,
"speaker": speaker.name,
"picture": speaker.picture,
"about": speaker.about,
"title": speaker.title,
"full_name": speaker.full_name
}) %}
"slot": slot.name|string,
"start_time": slot.start_time,
"end_time": slot.end_time,
"speaker": speaker.name,
"picture": speaker.picture,
"about": speaker.about,
"title": speaker.title,
"full_name": speaker.full_name,
"email": speaker.email
}) %}
{% endfor %}
<div class="courses-header">{{title}}</div>
<div class="common-page-style">
<div class="container">
@@ -37,29 +40,30 @@
</div>
<div>
{% for day in slot_data %}
{% set outer_loop = loop %}
<div class="course-details-outline">
<div class="course-home-headings">{{day}}</div>
<div class="coure-outline">
{% for slot in slot_data[day] %}
<div class="schedule-container">
<div class="schedule-inner-container">
<div class="schedule-slot">
{{ frappe.format(slot.start_time, {'fieldtype': 'Time'})}} - {{
frappe.format(slot.end_time, {'fieldtype': 'Time'}) }}
</div>
<div class="schedule-title">{{slot.title}}</div>
<span class="avatar avatar-medium avatar-medium-schedule">
<img class="avatar-frame" src="{{slot.picture}}" /></span>
</div>
<div class="schedule-info">
<p>{{slot.about}}</p>
<span class="info-speaker-avatar">
<span class="info-avatar avatar avatar-small">
<img class="avatar-frame standard-image" src="{{slot.picture}}" />
</span>
<h6 class="info-speaker">{{slot.full_name}}</h6>
</span>
</div>
<div class="schedule-title">{{slot.title}}</div>
<div class="schedule-slot">
{{ frappe.format(slot.start_time, {'fieldtype': 'Time'})}} - {{
frappe.format(slot.end_time, {'fieldtype': 'Time'}) }}
</div>
<div class="chapter-title small-title" data-toggle="collapse" data-target="#slot-{{loop.index}}-{{outer_loop.index}}" aria-expanded="false" aria-controls="collapseExample">
<img class="chapter-icon" src="/assets/community/icons/chevron-right.svg">
</div>
</div>
<div class="collapse" id="slot-{{loop.index}}-{{outer_loop.index}}">
<p class="schedule-info">{{slot.about}}</p>
</div>
<div class="card-divider"></div>
{% endfor %}

View File

@@ -1329,7 +1329,7 @@ a.talk-link {
.schedule-inner-container {
display: grid;
grid-template-columns: 1.2fr 3fr 0.4fr;
grid-template-columns: 1.2fr 2fr 1fr 0.2fr;
padding: 0 20px 0;
}
@@ -1342,7 +1342,7 @@ a.talk-link {
}
.schedule-info{
display: none;
/* display: none; */
padding: 20px;
}
@@ -1374,10 +1374,10 @@ a.talk-link {
object-fit: contain;
}
.schedule-container:hover > .schedule-info {
/* .schedule-container:hover > .schedule-info {
display: block;
transition: all 0.3s ease-in-out;
}
} */
.info-speaker-avatar {
display: flex;