Main menu

Forum


× Help Forum English

local vs server time

  • doorknob
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 2 jours #6124 par doorknob
local vs server time a été créé par doorknob
I made some changes to the calendar module to suit my needs and, in the spirit of open source, I post it here so that you can use any of it if you want to. The changes, which were based on the 3.2.12 version, are:
The coding to determine the current date in the client is completely replaced. It no longer uses time zones and now works as follows:
The module is initially created with the server date set as the current date. If the browser doesn't allow JavaScript, it stays that way, otherwise a jQuery function determines whether the local current date is the same as that already set by the server. If not, the dom is manipulated to update the appropriate class names, avoiding the need for a page reload.
If the client's current date is not in the month displayed (first day of next month or last day of previous month) then the appropriate button is clicked to load the required month using ajax.
It has been coded to allow for multiple instances on the page.
jQuery loading has been updated so that for J3.x the api is used to load the Joomla copy in no-conflict mode and for J2.5 the logic is revised to help prevent multiple loading. J3.2 automatically loads jQuery v1.10. but J2.5 still loads v1.8 which works perfectly well for this module but might not suit other components.
The popup logic has been revised to prevent the it from overlapping the edge of the screen (in fact for mobile phone size screens it was completely off the edge of the window in most cases). The position of the popup is adjusted if it would overlap the edge of the screen on either side. The width of the popup is now parameterised so that it can can be specified by the user and percentages (which I found very unsuitable in my application) are no longfer used anywhere. Another additional parameter has been added to provide an option for a full screen popup on mobile phones (works best with the default template). This makes the popup full screen (i.e. full width and aligned to the top of the viewport). A further parameter allows fine tuning of the vertical positioning of the popup in other circumstances.
I had to make a change to the template_name_day files. While I was editing them, I removed use of the [day] row in the data array because, in my view, it violates the principle of templates
Also included is an update to the maps.js file, correcting a JS syntax error.
All this has been tested on J3.2.1 but not in J2.5
Only the English language file has been updated.
Pièces jointes :
Les utilisateur(s) suivant ont remercié: Lyr!C

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 2 jours #6129 par Lyr!C
Réponse de Lyr!C sur le sujet local vs server time
Hi!

I will test it!

Really, thank you for your contribution! I was already working on a new tooltip, but thinking of implementing it as a second option.

So, i really appreciated your help!

:cheer:

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • doorknob
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 1 jour #6141 par doorknob
Réponse de doorknob sur le sujet local vs server time
This version addresses a few outstanding issues
1 A fix for the language file
2 The 'rounded' template now has no margin in phone mode
3 The events popup now scrolls in phone mode when the page overflows
4 The min-width of the popup has been reduced to 320px in phone mode so that iPhones can be supported in portrait
5 The popup is position to the left of the left margin in phone mode if the screen is smaller than 320px so that the close button is accessible
6 In phone mode, the mouse option is forced into 'click touchend'. This does two things. First of all it avoids the need for two clicks (taps) on a phone screen (phones don't support hover and having a css hover state means that the first tap just gives the button focus and the second tap activates the link). Secondly, in responsive environments it allows the mouse option to be set to 'hover' for devices with a mouse but still respond to taps on mobile devices.
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 1 jour #6144 par Lyr!C
Réponse de Lyr!C sur le sujet local vs server time
Hi!

Do you have received my email ?

You have done a really great work, and i want to review some points with you, to be able to integrate your excellent work in the next release of iCagenda!

Please, check your email, or contact me if you didn't have received my email ! ;-)

And again, thank you to working on this enhancement! Really Helpfull !!!

Lyr!C

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.099 secondes

 

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new