Git Product home page Git Product logo

Comments (12)

tfwww avatar tfwww commented on August 25, 2024 2

OK, I'll check it. Thanks for the tips.

from tui.calendar.

dongsik-yoo avatar dongsik-yoo commented on August 25, 2024

Those icons must be in example folder, not embedded.

from tui.calendar.

tfwww avatar tfwww commented on August 25, 2024

Does anyone can tell me how to find these icons?

from tui.calendar.

dongsik-yoo avatar dongsik-yoo commented on August 25, 2024

The font-awesome v4.7.0 is used in demo page. You can check it on example01-basic.html.

And those icons can be rendered by your template function. Exact sample source is default.js

var cal = new Calendar('#calendar', {
    template: {
        allday: function(schedule) {
            return getTimeTemplate(schedule, true);
        },
        time: function(schedule) {
            return getTimeTemplate(schedule, false);
        }
    }
});

/**
 * Get time template for time and all-day
 * @param {Schedule} schedule - schedule
 * @param {boolean} isAllDay - isAllDay or hasMultiDates
 * @returns {string}
 */
function getTimeTemplate(schedule, isAllDay) {
    var html = [];

    if (!isAllDay) {
        html.push('<strong>' + moment(schedule.start.getTime()).format('HH:mm') + '</strong> ');
    }
    if (schedule.isPrivate) {
        html.push('<i class="fa fa-lock"></i>');
        html.push(' Private');
    } else {
        if (schedule.isReadOnly) {
            html.push('<i class="fa fa-ban"></i>');
        } else if (schedule.recurrenceRule) {
            html.push('<i class="fa fa-repeat"></i>');
        } else if (schedule.attendees.length) {
            html.push('<i class="fa fa-group"></i>');
        } else if (schedule.location) {
            html.push('<i class="fa fa-map-marker"></i>');
        }
        html.push(' ' + schedule.title);
    }

    return html.join('');
}

from tui.calendar.

tfwww avatar tfwww commented on August 25, 2024

I have checked the place you told me. However, I can not find the own icons to replace the font-awesome icons. @dongsik-yoo

from tui.calendar.

dongsik-yoo avatar dongsik-yoo commented on August 25, 2024

The fontawesome v4.7.0 is here.
You can see demo and getting-started.

And our example codes are using it from CDN below.

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

from tui.calendar.

tfwww avatar tfwww commented on August 25, 2024

@dongsik-yoo
Sorry for troubling again. It seems that you did not get my point.

If we do not use the fontawesome icons, then maybe I need the icon image files to replace the fontawesome icons.

So where to find these image icon files?

from tui.calendar.

dongsik-yoo avatar dongsik-yoo commented on August 25, 2024

Oh, you're right. I made a mistake.
We don't add those icon images yet.
I guess the next version will contain new icons for that.
The next version will be release before 17th May.

from tui.calendar.

tfwww avatar tfwww commented on August 25, 2024

So for this issue, maybe I need to wait for the release of the next version.
After that, I can fix this issue (use the new icons), right?

from tui.calendar.

dongsik-yoo avatar dongsik-yoo commented on August 25, 2024

Yes, you can after that.
Actually, the new icons will be font not image.
Because those icons's color has to be change according to calendar color.

from tui.calendar.

tfwww avatar tfwww commented on August 25, 2024

OK. Thanks for your tips.

from tui.calendar.

dongsik-yoo avatar dongsik-yoo commented on August 25, 2024

@wmzhong The new version v1.2.0 is released. So you can find new font icons to replace the fontawesome icons at 'examples/fonts/icon.*' folder.

from tui.calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.