Loading...
 
Features / Usability

Features / Usability


Re: Popups in Calendar_New

posts: 214

I do not find any settings to change the Calendar_new popups to display to the left instead of to the right.

One option to make it easier to see the popups that go too far to the right would be to make the popups sticky. Then, when the popup goes off the screen to the right, the user can scroll right to see it (they almost have to scroll to the right to be able to get rid of the sticky popup).

You set the popup to sticky in Admin Home, Calendar, "Sticky popup" check box. That makes more than just the Caledar_new module popups sticky though.

If you are willing to modify code to make the popup display on right, you can do it by adding some code to 2 files.

To /templates/modules/mod-calendar_new.tpl, add "left=true" into the Smarty popup code (it is near the end of the long line of code in the "After change").

Before change:
Copy to clipboard
or ($prefs.calendar_sticky_popup eq "y" and $cell[w][d].items[0].calitemId)}{popup sticky=true fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{else}{popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{/if}>

After change:
Copy to clipboard
or ($prefs.calendar_sticky_popup eq "y" and $cell[w][d].items[0].calitemId)}{popup sticky=true fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{else}{popup fullhtml="1" text=$over|escape:"javascript"|escape:"html" left=true}{/if}>


Note: that makes the non sticky popups display to the left of the mouse, if you want to make sticky popups go to the left, you need to add "left=true" to the smarty popup code before the "{else}" statement, or just put it both places.

I thought that by itself would do it because the documentation for Smarty popup options say "left, Boolean, The popup goes on the left of the mouse". But my version 12.2 Smarty popup ignored the parameter.

So, you have to add more code, this time to /lib/smarty_tiki/function.popup.php. Add 3 jquery cluetip parameters, and a break, to the "left" case statement:

Before change:
Copy to clipboard
case 'left':
After change:
Copy to clipboard
case 'left': $options['positionBy'] = 'fixed'; $options['topOffset'] = 25; $options['leftOffset'] = -220; break;


You might want to tweak those offsets.

With those 2 modifications, the Canledar_new popups will display to the left.

These changes will not work in Tiki 13, those files have been changed in Tiki 13.

Tom

There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting