History of the ZnetDK 4 Mobile versions
z4m
global variable which is a shorten alias of the znetdkMobile
global variable.beforehide
and afterhide
JS events triggered before and after closing a modal dialog.onAdd
and onEdit
callback functions specified when calling the znetdkMobile.list.setModal()
method, can return false
to prevent the modal dialog from being opened. So, the modal dialog is opened by the callback function at the appropriate time.\Convert::toUTF8()
method accepts now an optional second parameter named $fromEncoding
to specify the character encoding of the string passed as first parameter. The default value for $fromEncoding
is 'ISO-8859-1'
.
LC_LOCALE_ALL
constant for the English, French and Spanish languages in order to increase the chance to target a locale installed on the webserver.znetdkMobile.form.getInputValue()
method now returns an array
containing the multiple selected values of the checkboxes having the same name in a form (i.e the HTML attribute name
is defined with the same string value for several checkbox elements).znetdkMobile.action.removeCustomButton()
method to remove a custom action button and unregister it from the views.afterpageloaded
events triggered by the Data List <ul>
element each time a new page of rows is loaded.\ProfileManager::getProfiles()
method now returns the profile's description through the 'description' array key.\UserSession::hasFullMenuAccess()
method to know if logged in user has a full menu access without requesting the database.\UserSession::getUserEmail()
method to get logged in user email without requesting the database.\UserSession::getUserName()
method to get logged in user name without requesting the database.\UserSession::getUserProfiles()
and \UserSession::hasUserProfile()
methods to get access to the authenticated user's profiles without requesting the database.\Convert::toDecimalForDB()
method accepts mixed type (float
, int
, string
) for the $number
parameter. In previous version, an empty string was returned if the specified number was not a string.\General::getFilledMessage()
with a null
value as argument.\ProfileManager::storeProfile()
method did not return the user profile's internal database identifier once stored.\Convert::toLocaleDate()
method returned a long date instead of a short date with the intl
extension loaded and the LC_LOCALE_DATE_FORMAT
constant set to NULL
.LC_LOCALE_CURRENCY_SYMBOL
set to NULL
, the \api\Locale::getCurrencySymbol()
method returned an incorrect character when the currency symbol was not encoded in UTF-8. Now, if the currency symbol is not encoded in UTF-8, it is decoded from the Windows-1252 character set.LC_LOCALE_THOUSANDS_SEPARATOR
set to NULL
, the \api\Locale::getThousandsSeparator()
method returned a space character which does not match the ASCII space character (value 20 in Hexadecimal).\Request::getAcceptLanguage()
could return a NULL
value while the HTTP_ACCEPT_LANGUAGE
server variable was properly defined.\Convert::valuesToAnsi()
method uses now the Windows-1252 encoding instead of the ISO-8859-1 encoding, in particular to correctly convert the euro character.\Convert::valuesToAnsi()
and \Convert::toUTF8()
methods are no longer based on the utf8_decode()
and utf8_encode()
PHP functions for they are deprecated in PHP 8.2.iconv
function or mbstring
and intl
extensions), then an exception is thrown..\Validator::__construct()
method when the VAL-003
exception was thrown because string variable interpolation is deprecated in this version.\Convert::toDecimalForDB()
method while the language of the application was configured with the comma character as thousands separator.ui-widget
, ui-widget-content
and ui-corner-all
CSS classes were removed from the mobile
page layout as they were not used.znetdkMobile.modal.open()
method when the aftershow
event was triggered.\General::encrypt()
or \General::decrypt()
, an exception is now thrown if the openssl
extension is not installed.\SimpleDAO::getSuggestions()
method.CTL-001
ZnetDK error.
\DAO::setAmountColumns()
, \DAO::setMoneyColumns()
and \DAO::setDateColumns()
to set up the SQL table columns to format according to locale settings when retrieving data rows via \SimpleDAO::getRows()
.\Response::setCustomContent()
method to return custom content (HTML, XML, text, ...) from a controller action in response of an http request.CFG_ACTIONS_ALLOWED_FOR_WEBSERVICE_USERS
parameter. In previous version, only controller's actions named 'download' could be called with the http GET method. This possibility can be particularly useful when a controller action is to be executed from a webcron service.\UserSession::setCustomValue()
and \UserSession::getCustomValue()
methods. When this parameter is set to TRUE (FALSE by default), the custom value is sanitized before being stored in user session or returned from user session.\General::isPictureTooBig()
private method is converted to a public method to check if a photo is too big to be reduced in regards of the available memory in the PHP process. Initially only called by the \General::reducePictureSize()
method to avoid memory allocation error, \General::isPictureTooBig()
, now can be called with a custom $tweakFactor value (set by defaut to 1.65 in previous version of ZnetDK, this value has been increased to 2) before reducing a photo.\General::reducePictureSize()
method no longer returns FALSE on error. Instead, a ZDKException
is thrown ('GEN-003' to 'GEN-006').\General::reducePictureSize()
method.CFG_IS_IN_MAINTENANCE
parameter to close access to the application. A message is then displayed to inform users that the application is temporarily in maintenance. The LC_MSG_ERR_MAINTENANCE
constant can be overloaded in the 'locale.php' script of the application to customize the message.LC_LOCALE_DATE_FORMAT
must now conform to that used by the DateTime::format() PHP method. The previous supported format was the one used by the strftime()
PHP function which is deprecated in PHP version 8.1.CFG_REQUEST_VARIABLE_FILTERING_LEVEL
parameter. In addition, the \Request::setVariableFilteringLevel()
method accepts the value 'NONE' as parameter to disable value filtering for a specific Http request only.\Request::setTrimedCharacters()
method now returns a boolean value. If the '$trimedCharacters' parameter is not NULL or is not a string then a FALSE value is returned.controller\Users::notify()
method removed as it was not useful.znetdkMobile.list.loadedCallback
property to define a custom function to call after list's rows are fully loaded. This function has two parameters which contain the number of rows loaded and the data page number loaded.znetdkMobile.list.afterInsertRowCallback
property to define a custom function to call after a row has been inserted in a list. This function has one parameter which contains the new inserted list item as a jQuery element. This callback function can be useful for example to set draggable the list item once added to the list.topspacechange
event triggered when the space between the top of the view container and the top of the page change, for example when the secondary menu is shown on multiple lines, when a message is displayed through the znetdkMobile.messages.add()
method, or when the "Install the App?" message is cleared.MainController::getControllerName()
method now is able to find a specific controller method amoung multiple modules overloading the same controller.PDO::ATTR_STRINGIFY_FETCHES
option is now forced to true.\General::reducePictureSize()
method.znetdkMobile.form.getInputValue()
method returned false and the error message "The input type='undefined' is not supported!" was displayed in the browser's console when an input field was declared in a form without specifying the type attribute. Now, if the type attribute is not specified for an input field, it is considered to be of type "text".beforeshow
) and after (aftershow
) displaying a modal dialog. If the beforeshow
event handler returns false
, the modal dialog is not displayed.setCustomValidity
method) when an input field value is incorrect.znetdkMobile.install.showInstallView()
and znetdkMobile.install.showUninstallView()
.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.znetdkMobile.install.isAppInstallable()
and znetdkMobile.install.isAppInstalled()
methods respectively to know if the application is installable and if it is already installed.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.znetdkMobile.serviceWorker.isRegistered
property that is set to true once the service worker registration has succeeded.znetdkMobile.browser.doPhoneCall()
method to dial the specified phone number on cell phone.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.CFG_CHECK_PWD_VALIDITY
and LC_MSG_ERR_PASSWORD_BADLENGTH
PHP constants for customization purpose).$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.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.znetdkMobile.autocomplete
input field when the previously entered keyword does not match any suggestions.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).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.znetdkMobile.messages.add()
method were not hidden after the user logged out.$loginName
is renamed to $userId
for the \UserManager::getUserProfiles()
method because the expected parameter value was the user internal identifier.znetdkMobile.autocomplete.make()
method did not returned a string value.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).cache=true
GET parameter is added to the download url.\General::reducePictureSize()
method that resizes a JPEG or PNG picture by specifying a maximum width and height.CFG_APPLICATION_VERSION
parameter to specify the current application's version (integer value, 1 by default). When this version is set into the config.php
of the application, the client-side application is automatically reloaded on user's session expiration if the application version on the server-side is higher than the one currently loaded in the user's web browser.\Convert::binaryToBase64Url()
ZnetDK method to convert a binary file content to base64 URL.\Convert::base64UrlToBinary()
ZnetDK method to convert a base64 URL to binary file content.\Request::setTrimedCharacters()
to specify the characters to trim when retrieving the sanitized value of a request parameter. By default, the trimed characters are " \n\r\t\v\x00". This method can be useful to preserve the newline characters of the beginning and the end of a text.CFG_REQUEST_VARIABLE_FILTERING_LEVEL
parameter to specify the filtering level applied by default when reading HTTP request variables by calling the\Request()
getter method (i.e $request->my_var
). Value 'HIGH'
is set by default (PHP filter_var()
function is applied with FILTER_SANITIZE_STRING
filter and FILTER_FLAG_NO_ENCODE_QUOTES
option). Other allowed value is 'LOW'
(PHP strip_tags()
function is applied and the string '<=' is preserved if exists in the text to filter).\Request::setVariableFilteringLevel()
to change the default value set through the CFG_REQUEST_VARIABLE_FILTERING_LEVEL
parameter. Allowed parameters are 'LOW'
and 'HIGH'
.CFG_MOBILE_JQUERY_JS PHP
constant).znetdkMobile.setInputValue()
method now allows to check multiple checkboxes having the same name (generally ended with double brackets, for example "mycheckboxes[]"
). The values of the checkboxes to check are passed in parameter of the method as an array.znetdkMobile.getInputValue()
method now allows to retrieve as a JS array, the selected values for a SELECT
HTML element set with the multiple
property.znetdkMobile.getInputValue()
method when the input name passed in parameter contains "bracket" symbols.'z4musers.php'
) was not properly paginated (same users were displayed several times).\General::callRemoteAction()
method usefull to invoke a controller action exposed as web service by a remote ZnetDK application.CFG_SQL_TRACE_ENABLED
parameter which traces in the system log all SQL statements executed through the ZnetDK \DAO
class.\UserSession::getUserId()
method that returns the user ID of the connected user. zdk_user_pwd_resets
SQL table for tracing reset password requests. The database schema can be upgraded for applications deployed in a previous version of ZnetDK by executing the following DDL statement:
CREATE TABLE `zdk_user_pwd_resets` (
`email` VARCHAR(100) NOT NULL COMMENT 'Email address',
`request_date_time` DATETIME NOT NULL COMMENT 'Request date time',
`reset_key` VARCHAR(100) NOT NULL COMMENT 'Reset key',
UNIQUE `email` (`email`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci
COMMENT = 'Password reset';
CFG_FORGOT_PASSWORD_ENABLED
parameter to display a link labeled 'Forgot password?' on the login form. When clicked, the ZnetDK modal dialog corresponding to the view forgotpassword.php
is shown to request a new password from a user email address. This view can be customized by copying it to the view/
folder of the application or a module.controller\ForgotPassword
class in charge of displaying the forgotpassword.php
view when the 'Forgot password?' link is clicked. In addition, the controller processes the requests for getting a new password and for resetting the user's password.CFG_FORGOT_PASSWORD_REQUEST_TRACE_ENABLED
parameter to trace the\Response::setFileToDownload()
method was not properly displayed by the web browser when it contained accents.znetdkMobile.setInputValue()
method was called for a checkbox element with a non-empty value different than the one set for the checkbox element, it was not unchecked. profile.php
) was displayed in PHP 7.4.znetdkMobile.messages.ask()
method could be executed twice wrongly.z4musers.php
view were not displayed in bold.znetdkMobile.header.events.handleHideHeaderOnScroll()
method, no extra space#zdk-anchor-adjust
CSS style (bug finally not fixed in version 2.4).\DAO::remove()
method now returns the number of rows removed.
ALTER TABLE zdk_users
ADD user_phone VARCHAR(50) NULL COMMENT 'Phone number' AFTER user_email,
ADD notes VARCHAR(100) NULL COMMENT 'Notes' AFTER user_phone;
znetdkMobile.navigation.clearRowCountFromHorizontalMenuItem()
method to clear the counter displayed on the right of the menu item (see znetdkMobile.navigation.addRowCountToHorizontalMenuItem()
method).\DAO::doesTableExist()
method to check if the table specified as property of the DAO exists or not.znetdkMobile.header.events.handleHideHeaderOnScroll()
method, no extra space is longer added to the page's anchors through the inline #zdk-anchor-adjust
CSS style.\DAO::remove()
with a row ID passed as a parameter while the 'zdk_profile_rows' ZnetDK security SQL table is missing.znetdkMobile.form.setReadOnly()
method.znetdkMobile.form.setInputValue()
when the value specified for a radio button contained a space character.znetdkMobile.form.getInputValue()
called for a checkbox input wrongly returned the element's value while the checkbox was not checked. Now, an empty string is returned if the checkbox is not checked.mobile.php
page layout, the title attribute is added to the #zdk-side-nav-button
anchor for a better accessibility.CFG_CHECK_PWD_VALIDITY
parameter in order to check the strength of a new password is changed to impose the user to input a minimum of 8 characters with at least 1 uppercase letter, 1 lowercase letter and 1 number.znetdkMobile.action.addCustomButton()
method.znetdkMobile.header.events.handleHideHeaderOnScroll()
method.znetdkMobile.modal.getInnerForm()
method to select a specific form in case more than one form exists in the modal dialog.znetdkMobile.messages.showSnackbar()
method to force display of a snackbar message into a specific container (for example a modal dialog).znetdkMobile.autocomplete.make()
method to customize the display of the suggestions.znetdkMobile.form.setDataModifiedState()
method to indicate whether form data are modified or not by a user input. This method is called by the znetdkMobile.form.reset() and znetdkMobile.form.events.handleAllInput()
methods.znetdkMobile.form.isModified()
method to know if form data have been modified or not by a user input.znetdkMobile.modal.close()
method to check whether the inner form data have been modified or not by a user input. If so, a confirmation is aked to user before closing the modal dialog.znetdkMobile.messages.ask()
method, then the LC_MSG_ASK_CANCEL_CHANGES
php constant message is displayed as default question.znetdkMobile.list.setCustomSortCriteria()
method with a property named '_default' as sort definition for the sortCriteria parameter, then no sort is applied when this sort field is choosen from the search modal dialog, including if reverse sort has been selected.znetdkMobile.list
) is now suffixed with the view ID. So the sort criteria are no longer applied when a data list, with the same element ID, exists in different "reloaded on display" views (with the 'zdk-viewreload' CSS class).znetdkMobile.list.setModal()
now accepts to be set to false in order to hide the 'Add' action button.CFG_PAGE_LAYOUT
set to 'custom' or 'mobile'), the HTML title attribute is added to the menu item anchor of the navigation menu and is set to menu item label.znetdkMobile.modal.getInnerForm()
method, if more than one form exist in the modal, the first one is now returned instead of a boolean false value.znetdkMobile.list.searchedKeywordAsJson
property. When set to true, extra 'keyword_json' POST parameter is sent to the PHP controller's action on search by keyword, for loading a ZnetDK Mobile Data List (see 'data-zdk-load' HTML5 property). This 'keyword_json' parameter contains each searched keywords in JSON format including the extra properties of the selected keyword suggestions (see 'data-zdk-autocomplete' HTML5 property).znetdkMobile.autocomplete
input field.znetdkMobile.form.getInputValue()
method passing as parameter an input name matching a <textarea> HTML element.znetdkMobile.list.refresh()
method could be called multiple times on view display when the view was set to be reloaded on each of its displays ('zdk-viewreload' CSS class applied to a HTML element of the view).znetdkMobile.navigation.addRowCountToHorizontalMenuItem()
method call, the horizontal menu items could be displayed on an extra line and so they could hide the view content.znetdkMobile.list
element, the space was not totally released at the top of the list.\Response::setFileToDownload()
method, the response header Content-Type was not set properly for downloaded pictures when its file extension was in upper case and when the '$downloadedFilename' parameter was not specified.znetdkMobile.form.setFocus()
method.CFG_AUTOEXEC_LOG_ENABLED
parameter is set to TRUE. Now, the command line executed as background process, the console output and the result code are also traced.znetdkMobile.form
setFocus()
and setFocusOnFirstInput()
methods now set focus to html textarea and select elements in addition to input elements.\Request::getUploadedFileInfos()
. The error message were as below: count(): Parameter must be an array or an object that implements Countable - ..\engine\core\request.php(351).CFG_AUTO_MINIFICATION_METHOD
parameter was set into the 'config.php' of the application, the error message Access to undeclared static property... in ..\dependencies.php on line 164 was displayed on main page loading.\ErrorHandler::restart()
method.znetdkMobile.form.setReadOnly()
method.\UserSession::setCustomValue()
method, was missing next when retrieving the float number value calling the \UserSession::getCustomValue()
method.znetdkMobile.form.load()
method.znetdkMobile.form.getInputValue()
method with a radio button input name as parameter while no radio button was selected. Now, the null value is returned instead and no error message is longer triggered.\MenuManager::addMenuItem()
method.CFG_PAGE_LAYOUT
paramater is set to 'mobile' into the 'config.php' script of the application. For full documentation, go to the mobile.znetdf.fr website.\Profile
controller class to get detailed informations of a user profile through an AJAX call.\Users
controller class to get detailed informations of a user through an AJAX call.\SimpleDAO
ZnetDK class for selecting and updating a table content in database without the need of declaring a custom DAO class. This new DAO object is perfect for executing simple operations on one SQL table.CFG_APPLICATION_CSS
and CFG_APP_JS
parameters set into the 'config.php' application script. These libraries can be CDN libraries hosted out of the machine hosting the ZnetDK application. To set multiple libraries, declare them using a PHP serialized array.\Security
controller class to check through an AJAX call if the user's session has not expired. This controller action can be called for example, before downloading a document for which authentication is required.\DAO::store
method with boolean type values set to false for storage in a MySQL table column with an integer datatype.\MenuManager::addMenuItem()
method (case of the CFG_VIEW_PAGE_RELOAD
parameter set to TRUE into the 'config.php' of the application).