Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable EventCard content #11

Closed
sebasira opened this issue Mar 29, 2024 · 3 comments
Closed

Configurable EventCard content #11

sebasira opened this issue Mar 29, 2024 · 3 comments

Comments

@sebasira
Copy link
Owner

Right now is a static definition of what and how it's arrange. I would like to be able to define a custom content, to be applied to all cards

sebasira added a commit that referenced this issue Mar 29, 2024
…d better how content is defined and populated
@sebasira
Copy link
Owner Author

The class defined in the settings of the schedule_data is applied two times in the code:

var $bar = jQuery('<div class="sc_Bar ' + data['class'] + ' ' + fullOpacityClass +'"></div>').append($deleteBtn).append($content);

and

if (data["class"]) {
$bar.addClass(data["class"]);
}

I will keep the first one

@sebasira
Copy link
Owner Author

For better readability, as now the content of the card displays a full DateTime for start and end, I will rename the class that's used to find those elements from startTime and endTime to start and end

@sebasira
Copy link
Owner Author

I've added two additional settings:

  • applyCustomContent
  • contentDefinition

applyCustomContent Allows me to set any value to the elements of the card, and must respect this signature:

function applyCustomContentToCard(element, cardElement, eventData)

contentDefinition is used to define the DOM structure of the card. By default it takes the current hard-coded content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant