Customizable Designs in Oracle Application Express version 4.2

In my work supporting the organization, I am using APEX 4.2 to create a Training Calendar. While I am not a DBA or programming expert, I have been learning through trial and error.

The calendar is already set up, but I am looking for a way to customize how items are displayed based on a column in my table. Specifically, I have two project types: Project A and Project B. I would like these to be visually differentiated by having different border colors on the calendar display. Currently, I have implemented the following CSS code, but it applies to all events:

<style>
.Day a, .NonDay a, .Today a, .WeekendDay a {
    font: normal 10px/12px Arial,sans-serif !important;
    padding: 2px !important;
    border-radius: 4px;
    -moz-border-radius: 4px;
    background-color: #E5E5E5;
    border: 1px solid #FF1414;
}

.Day a:hover, .NonDay a:hover, .Today a:hover, .WeekendDay a:hover {
    background-color: #A3A3A3;
    border: 1px solid #FF1414;
    text-decoration: none !important;
}
</style>

I am seeking advice on how I can modify this so that when PROJECT = A, a specific style as described above is applied, and when PROJECT = B, a variation of the same styling is applied. Any suggestions or guidance would be greatly appreciated.

Thank you, Christina

Answer №1

I am not familiar with APEX, but the solution you are looking for involves extending HTML elements (such as <li/>, <td/>, or others) with project-specific CSS classes. Without seeing your HTML code, my assumption is that the calendar is constructed with a table. Here is an example of how it could be implemented:

<table>
    <tr>
        <td class="NonDay"><a href="#">27</a></td>
        <td class="NonDay"><a href="#">28</a></td>
        <td class="NonDay"><a href="#">29</a></td>
        <td class="NonDay"><a href="#">30</a></td>
        <td class="NonDay"><a href="#">31</a></td>
        <td class="Day WeekendDay"><a href="#">1</a></td>
        <td class="Day WeekendDay"><a href="#">2</a></td>
    </tr>
    <tr>
        <td class="Day"><a href="#">3</a></td>
        <td class="Day"><a href="#">4</a></td>
        <td class="Day ProjectA"><a href="#">5</a></td> <!-- see the class -->
        <td class="Day ProjectB"><a href="#">6</a></td> <!-- see the class -->
        <td class="Day"><a href="#">7</a></td>
        <td class="Day WeekendDay Today"><a href="#">8</a></td>
        <td class="Day WeekendDay"><a href="#">9</a></td>
    </tr>
</table>

By doing this, you can apply styling to these classes just like you did for the other classes:

.ProjectA a {
    border-color: blue;
}

.ProjectB a {
    border-color: red;
}

I cannot provide assistance on adding CSS classes in APEX, so I recommend seeking help on Oracle's support forums or perhaps on as this question is not directly related to programming.

Answer №2

In my system, there is a color mapping table for projects. When an event is retrieved from the calendar table, it is linked to the project table to fetch the corresponding color.

SELECT e.ID, ''||DESCRIPTION||'' DESCRIPTION, event_date FROM EVENTS e, project p WHERE e.project_id=p.project_id;

Answer №3

To customize the appearance of each calendar entry, you can assign a class within the SELECT statement as shown below:

select ..., 
       '<div class=task"' || task || '>' || details || '</div>'
             as details
from ...

This will generate HTML code for the entries like:

<div class="taskA">This is task A</div>

Answer №4

When writing SQL code, make sure to include a column for PROJECT_TYPE that returns the type of your project. In the calendar settings, switch the "Display Type" to "Custom". For the "Column Format", insert something similar to:

<span class="#PROJECT_TYPE#">#COLUMN_VALUE#</span>

Next, define the style for ProjectA.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What are the steps to implement a horizontal scroll feature on a website when the scroll width is set to 0?

My goal is to enable users to scroll in the web view similar to how they can drag to scroll on mobile devices Check out my sandbox here for reference I have created a sample sandbox with the following code: <!DOCTYPE html> <html lang="en&qu ...

Modifying Margin and Spacing for Selections in Radio Buttons

I have successfully implemented the code for a radio button, and everything is working as expected div > label { margin-right: 80px !important; box-shadow: .3rem .3rem .6rem #c8d0e7, -.2rem -.2rem .5rem #FFFFFF; position: relative; ...

Building a custom form layout using Bootstrap v4 with three input fields and a button all lined up on one

I am struggling to create a form with 3 input fields and a button on the same row using Bootstrap v4 for the design. Can anyone help me figure this out? Take a look at my current design: Click here My Code <div class="col-sm-7 mx-auto bg-faded"&g ...

Responsive cards using Bootstrap styling

Currently trying my hand at mastering flexbox for responsive design with Bootstrap. In the picture, there are 4 cards where 2 should be displayed at the bottom and the other 2 at the top, but on mobile phones, they should all stack at the bottom. I attempt ...

problem with the height of the side navigation bar

Currently, I am in the process of creating a back-end system that includes a side navigation bar positioned on the left-hand side. To accomplish this, I have opted to utilize the Bulma CSS framework and integrate it with Laravel. Although I have implemen ...

What is causing the Bootstrap 5 navbar to not collapse?

Struggling to compile Bootstrap 5 with sass, I have a feeling that I might be missing some important scss files. When I added the <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7 ...

What are the steps to applying strike-through text in Vue.js?

I am currently working on a to-do application using Vue.js and I want to implement a feature where the text rendered in HTML has a line through it when the user checks an item off the list. Here is the snippet of my code: <html> <head> & ...

Looking for assistance with manipulating GravityForms data in order to achieve desired results

After extensive searching online, I have been unable to find a solution to my query. If someone could direct me to where I might discover the answer, that would be greatly appreciated. I am currently in the process of developing a fantasy golf website and ...

Incorporate a smooth infinite scroll feature in a CSS carousel that seamlessly loops without

Looking for a solution to the carousel jerk issue when it reaches the end of the loop? Is there a way to seamlessly loop start without any noticeable interruptions? Here is the code in question. Avoiding the use of JavaScript, is there a method to achieve ...

Height of the image is being boosted while the width remains consistent

When working on a responsive page layout, I encountered an issue with increasing the height of an image while keeping the width constant. Modifying the width of the image reflects changes, but adjusting the height does not seem to make any difference. I t ...

CSS: text positioning issue observed in Mozilla browser

I am facing an issue with the text position inside the box/button element on my website. The text appears correctly in Chrome, but in Firefox, it is positioned above the box, making it difficult to read. Can someone assist me with fixing the CSS or identi ...

Set the container width to a fixed size, then center a div within it with a dynamic width. Ensure that the left and right div

Arrange three columns with a fixed combined width. The center column will have dynamic content, while the left and right columns should fill out the remaining space equally. For example, see this demonstration: http://jsfiddle.net/htKje/ <div class="c ...

What causes the variation in results when I input CSS directly into the head section versus linking it from a separate .css file?

As a beginner, I am facing an issue with my CSS. When I directly insert the CSS into the head of my .html file, everything looks perfect. However, when I link my .css file into the head, the very first word ("Holy") does not display properly. I have double ...

What is the best way for me to incorporate images retrieved from an API call into my

Hey everyone, this is my first time posting on here so if there's anything I'm missing, please let me know! I've run into an issue with the images on my categories page not aligning properly and being different sizes after I incorporated som ...

SQL - When CTEs are chained, zeros are removed

Using CTEs to perform calculations in multiple steps can sometimes lead to issues when dealing with rows that have a zero value for [Value]. Here is an example of the code being used: budget_values AS ( SELECT SUM([Value]) ...

Adjusting image size to accommodate responsive column cell using CSS

I've been working on optimizing my mobile website using a responsive column layout. The challenge I'm facing is getting the images within each column to stretch to 100% width while automatically adjusting their height. I experimented with settin ...

Changing the class of an element in Svelte: A step-by-step guide

I am working on a svelte application and I want to implement row highlighting when a user clicks on it. Here is an example code snippet that demonstrates this functionality: <div id="A" class="car-even">A</div> <div id=&q ...

If the element is checked and equal to a specific value, take action

I am trying to hide one of the 3 radio buttons on my page. Although they all have the same class, each button has a different value. I attempted to write code to achieve this, but unfortunately, it is hiding all radio buttons instead of just one. Could s ...

I'm having trouble keeping my navbar fixed

Having trouble keeping my navigation bar fixed I attempted using the <nav class="fixed-nav-bar> with no success. I also tried adjusting it in CSS, but it still wouldn't stay fixed. <nav role="navigation" class="navbar navbar-default"> ...

Interactive menu backdrop determined by div element

I am working on a website with a menu structured like the following: Home -- Work -- Pricing -- Contact Us -- About This website uses a one-page layout and has enabled Scrollspy on Bootstrap. I need to make the active menu background dynamic depending o ...