Pascal MARTINEZ - 2022-08-18

Hello,

The new version 2.7 of ZnetDK is released and includes the following changes and bug fixes:

  • CHANGE: input fields are now surrounded by a red border in case of form validation error.
  • CHANGE: new jQuery events triggered before (beforeshow) and after (aftershow) displaying a modal dialog. If the beforeshow event handler returns false, the modal dialog is not displayed.
  • CHANGE: server-side errors are now displayed using the HTML5 JS Validation API (setCustomValidity method) when an input field value is incorrect.
  • CHANGE: the message displayed after the user changes their password is now a "snackbar" type message rather than a message in a blue panel.
  • CHANGE: the message displayed after editing a user's information or deleting a user is now a "snackbar" type message rather than a message in a blue panel.
  • CHANGE: new "My user rights" button added to the user panel to display the user profiles assigned to the connected user and to indicate whether she or he has a full menu access or not.
  • CHANGE: when 'Remember me' is checked on the login form, the user's login name is stored in the browser's local storage and is pre-populated on subsequent displays of the login form.
  • CHANGE: new "Installation" and "Uninstallation" buttons added to the user panel in order to help users to install the Application on their devices and to uninstall it. The modal dialogs shown when clicking these new buttons can also be displayed by calling the two following methods: znetdkMobile.install.showInstallView() and znetdkMobile.install.showUninstallView().
  • CHANGE: new CFG_MOBILE_INSTALL_MESSAGE_DISPLAY_AUTO parameter to enable or disable automatic display of a message to install the application (Add 2 Home Screen). Set to TRUE by default, this value can be changed to FALSE in the config.php script of the application. This message can also be displayed on demand by calling the znetdkMobile.install.showInstallableMessage() method.
  • CHANGE: new znetdkMobile.install.isAppInstallable() and znetdkMobile.install.isAppInstalled() methods respectively to know if the application is installable and if it is already installed.
  • CHANGE: new viewName and onViewLoaded optional parameters added to the znetdkMobile.modal.make() method in order to load in Ajax the modal dialog from the specified ZnetDK view before instantiating it. If the modal dialog already exists in the DOM, it is not loaded again when the method is called next times.
  • CHANGE: new znetdkMobile.serviceWorker.isRegistered property that is set to true once the service worker registration has succeeded.
  • CHANGE: new znetdkMobile.browser.doPhoneCall() method to dial the specified phone number on cell phone.
  • CHANGE: new znetdkMobile.browser.sendSMS() method to open the screen for sending an SMS and pre-fill phone number and message from the specified values passed in parameters.
  • CHANGE: special characters are now allowed by default when entering a new password for app authentication (see CFG_CHECK_PWD_VALIDITY and LC_MSG_ERR_PASSWORD_BADLENGTH PHP constants for customization purpose).
  • CHANGE: new $includeArchived parameter (set to TRUE by default) added to the \UserManager::getUsersHavingProfile() method. When set to FALSE, archived users are excluded from the returned users.
  • CHANGE: new znetdkMobile.list.beforeInsertRowCallback property to define a custom function to call each time a row is inserted in a list. This function has one parameter which contains the data to display for the row. This data can be modified within the function before displaying the row. This callback function can be useful to format data before row insertion.
  • CHANGE: for optimization purpose, AJAX requests are no longer sent by a znetdkMobile.autocomplete input field when the previously entered keyword does not match any suggestions.
  • CHANGE: for performance purpose, suggestions returned by AJAX requests when entering a keyword in a znetdkMobile.autocomplete input field can be cached in memory to reduce network traffic. To enable caching, set znetdkMobile.autocomplete.maxNumberOfCachedItems to a value greater than zero (set to zero by default). To clear the cache once a suggestion is selected, change the value znetdkMobile.autocomplete.cacheLifetime to 'selection' ('page' is set by default, meaning that cache is kept until user leaves the application).
  • BUG FIXING: when calling the DAO::store() method with an empty row id value (i.e. '') and the $emptyValuesToNull parameter is FALSE (default case), then the SQL statement generated is no longer an UPDATE but an INSERT instead.
  • BUG FIXING: for optimization purpose, the user profile list displayed for each user in the user list (menu Authorizations | Users) is no longer created by querying profiles in SQL for each user (now, only one SQL query is executed for all displayed users).
  • BUG FIXING: multiples clicks are prevented on anchor and button elements of the application (disabling during 500 ms).
  • BUG FIXING: messages displayed through the znetdkMobile.messages.add() method were not hidden after the user logged out.
  • BUG FIXING: the first parameter named $loginName is renamed to $userId for the \UserManager::getUserProfiles() method because the expected parameter value was the user internal identifier.
  • BUG FIXING: Javascript error displayed in web browser console on service worker registration when the App's URL is redirected: "The script resource is behind a redirect, which is disallowed.".
  • BUG FIXING: user profiles were displayed twice when the number of defined profiles exceeded 20 profiles.
  • BUG FIXING: when activating the "Users" tab from the "Profiles" tab, the user list was not reloaded when applying "Enabled", "Disabled" or "Archived" filter and the profile list was reloaded instead.
  • BUG FIXING: ajax requests could be executed twice after the user's session expired if a JS error occurred while executing them from the queue.
  • BUG FIXING: the login name was not displayed in the login field after reloading of the application once session was expired.
  • BUG FIXING: JS error message "TypeError: Cannot read properties of undefined (reading 'replace')" was displayed when the rendering callback function passed to the znetdkMobile.autocomplete.make() method did not returned a string value.
  • BUG FIXING: JS error message displayed in web browser console about znetdkMobile.log.e$() function that is not defined when a JS error is detected after a view loading through the znetdkMobile.ajax.loadView() method (issue in minification of mobile-min.js version 2.6).

Pascal,
ZnetDK developer