How to change calendar steps by 15 minutes?

Discussion in 'Standard Support' started by techpoint, Nov 24, 2010.

  1. techpoint New Member

    Level: Community
    Hi, how can I change calendar day and week steps view by 15 minutes instead of 1 hour?

    I'd like to have:
    00:00 -> 00:15 -> 00:30 -> 01:00 -> 01:15 -> etc...
    instead of:
    00:00 -> 01:00 -> 02:00 -> 03:00 -> 04:00 -> etc...

    :) Hope you can help me!
    Regards.
    Marco

    Attached Files:

    • day.png
      day.png
      File size:
      46.2 KB
      Views:
      51
    • week.png
      week.png
      File size:
      51.7 KB
      Views:
      50
  2. techpoint New Member

    Level: Community
    friendly bump!
  3. techpoint New Member

    Level: Community
    friendly bump
  4. techpoint New Member

    Level: Community
    Friendly bump!
  5. techpoint New Member

    Level: Community
    Hi guys,
    another bump!
    Please, I need support!
  6. rob Administrator

    Level: Community
    hi you can't without altering the code I'm afraid
    its compoennts/com_fabrik/plugins/element/fabrikdate/javascript.js

    MakeDropdown()

    LINE 162 onwards
  7. techpoint New Member

    Level: Community
    Hi rob, I speak about calendar day and week views, not fabrikdate.
    I really need to change steps from 1 hour to 15 minutes on calendar view!

    I'd like to have:
    00:00 -> 00:15 -> 00:30 -> 01:00 -> 01:15 -> etc...
    instead of:
    00:00 -> 01:00 -> 02:00 -> 03:00 -> 04:00 -> etc...
  8. techpoint New Member

    Level: Community
    friendly bump!
  9. techpoint New Member

    Level: Community
    little bump!
  10. techpoint New Member

    Level: Community
    friendly bump!
  11. techpoint New Member

    Level: Community
    little bump!
  12. techpoint New Member

    Level: Community
    other bump!
  13. techpoint New Member

    Level: Community
    ??? friendly bump! Please, help!
  14. cheesegrits Support Gopher

    Level: Community
    I've had a look at the code, in ./components/com_fabrik/plugins/visualization/calendar/calendar.js, and it won't be entirely trivial to do. First we'd need to add a new plugin setting, in the XML, and add it to the $opts handling in calendar.php, for specifying the time increments (probably as three choices - 1 hour, 30 mins and 15 mins).

    Then in two places in the JS we'd have to grab that new option and re-code assumptions about working in 24 one hour increments:

    First around line 859 in renderDayView() where we assume we're doing 24 one hour steps where we add the table rows and cells.

    Then in showDay, around line 587, where we add the timestamp for each row as a class.

    I *think* that's the only code in the JS that would need changing, but there may be some more.

    This is something we'd probably need to charge a few bucks to do, unless someone else wanted to have a hack at it - we're always happy to accept code contributions and merge them into SVN (after some testing!).

    My guess is it's probably a total of 2 hours work, to code, test and (inevitably!) debug.

    -- hugh
  15. techpoint New Member

    Level: Community
    Thanks hugh!
    I've started hacking it, can you help me to make the others code changes?
    I don't know what to do now!

    Please, see the attached file and test my little hack (it's only the beginning but I think that with your help I can improve it):

    Attached Files:

  16. cheesegrits Support Gopher

    Level: Community
    Can you just ZIP up your JS file and attach that? Easier for me to have the whole file, and run 'diff' on it in Eclipse against my copy.

    So what have you actually gotten working so far, and what are the "other code changes" you need to make?

    -- hugh
  17. techpoint New Member

    Level: Community
    Hi hugh, I've attached the zipped js file.

    My hack only shows the calendar view with 15 minutes steps but if you add a data it isn't showed on the right position in it!
    About this reason I've asked you which other code changes we need to make! ;)

    Please, test it!
    Marco

    Attached Files:

  18. cheesegrits Support Gopher

    Level: Community
    I don't have time right now, it's 1:30am Sunday night, I have to drive 12 hours to DC tomorrow. I'll be back online some time on Tuesday, if you bump then, i may have a few minutes.

    -- hugh
  19. techpoint New Member

    Level: Community
    Hi hugh! bump!
  20. techpoint New Member

    Level: Community
    friendly bump!

Share This Page