Serwis
Polish |
---|
Serwis MessageService |
pozwala pozwala na wyświetlanie animowanych komunikatów dla użytkownika formularza. Posiada następujące funkcje: |
...
- show - pokazuje podstawową wiadomość w formie animowanego dymka u góry ekranu, treść i tło są szare.
Parametry funkcji:
Nazwa | Typ | Wartość domyślna | Opis |
---|
msg | String | 'Info' | Treść wiadomości | conf (od 3.1.18) | Object | {} | Konfiguracja okna wiadomości. - |
|
...
Czas (w milisekundach) po jakim ma pojawić się wiadomość (domyślnie: 100)
hideAfter (Typ Number) Czas (w milisekundach) po jakim ma zniknąć wiadomość (domyślnie: 3000). Czas ten musi być liczba dodatnią. Jeżeli podana zostanie wartość 0 to parametr przyjmie wartość domyślną. |
- Rezultat funkcji: brak
|
...
- showSuccess - pokazuje wiadomość w formie animowanego dymka u góry ekranu informującą o sukcesie, treść i tło są zielone.
Parametry funkcji:
Nazwa | Typ | Wartość domyślna | Opis |
---|
msg | String | 'Ok' | Treść wiadomości | conf (od 3.1.18) | Object | {} | Konfiguracja okna wiadomości. - |
|
...
Czas (w milisekundach) po jakim ma pojawić się wiadomość (domyślnie: 100)
hideAfter (Typ Number) Czas (w milisekundach) po jakim ma zniknąć wiadomość (domyślnie: 3000). Czas ten musi być liczba dodatnią. Jeżeli podana zostanie wartość 0 to parametr przyjmie wartość domyślną. |
- Rezultat funkcji: brak
|
...
- showFailure - pokazuje wiadomość w formie animowanego dymka u góry ekranu informującą o sukcesie, treść i tło są czerwone.
Parametry funkcji:
Nazwa | Typ | Wartość domyślna | Opis |
---|
|
...
title | String | 'Error' | Treść wiadomości | conf (od 3.1.18) | Object | {} | Konfiguracja okna wiadomości. - |
|
...
Czas (w milisekundach) po jakim ma pojawić się wiadomość (domyślnie: 100)
hideAfter (Typ Number) Czas (w milisekundach) po jakim ma zniknąć wiadomość (domyślnie: 3000). Czas ten musi być liczba dodatnią. Jeżeli podana zostanie wartość 0 to parametr przyjmie wartość domyślną. |
- Rezultat funkcji: brak
|
...
- showAlert - wyświetla okno z wiadomością (od 3.2.162). Na wersji mobilnej zaleca się używanie tej funkcji zamiast alert().
Parametry funkcji:
Nazwa | Typ | Wartość domyślna | Opis |
---|
title | String | '' | Tytuł okna | content | String | '' | Treść wiadomości |
- Rezultat funkcji: brak
|
English |
---|
MessageService allows to display animated messages for the form user. It has the following functions: - show- shows the basic message in the form of an animated speech bubble at the top of the screen, the content and background are gray.
Function parameters: Name | Type | Default value | Description |
---|
msg | String | 'Info' | Message content | conf(from 3.1.18) | Object | {} | Message window configuration. - hideAfter(Number Type) The time (in milliseconds) at which the message should disappear (default: 3000). This time must be a positive number. If the value 0 is given, the parameter will take the default value. |
- showSuccess- shows a message in the form of an animated speech bubble at the top of the screen informing about success, content and background are green.
Function parameters: Name | Type | Default value | Description |
---|
msg | String | 'Ok' | Message content | conf (from 3.1.18) | Object | {} | Message window configuration. - hideAfter (Number Type) The time (in milliseconds) at which the message should disappear (default: 3000). This time must be a positive number. If the value 0 is given, the parameter will take the default value. |
- showFailure- shows a message in the form of an animated speech bubble at the top of the screen informing about success, content and background are red.
Function parameters: Name | Type | Default value | Description |
---|
msg | String | 'Error' | Message content | conf (from 3.1.18) | Object | {} | Message window configuration. - hideAfter (Number Type) The time (in milliseconds) at which the message should disappear (default: 3000). This time must be a positive number. If the value 0 is given, the parameter will take the default value. |
- showConfirm - displays a message window that allows to select Yes or No.
Function parameters: Name | Type | Default value | Description |
---|
config | Object | { } | Configuration of the message window. The object has the following properties: - title(String Type) Window title (by default: '') - message(String Type) Message content (by default: '') - scope(Object Type) Scope for optional functions performed after clicking the button specified in the yes and no properties (by default: window) - yes(Function Type) Optional function performed after clicking the Yes button (by default: null) - yesScope(Object Type) Scope for the optional function performed after clicking the button specified in the yes property (by default: the value given in the property scope) - yesParams(Object Type[]) An array specifying the parameters passed to the function specified in the property yes (by default: []) - no(Function Type) Optional function performed after clicking No button (by default: null) - noScope(Object Type) Scope for the optional function performed after clicking the button specified in the no property (by default: the value given in the property scope) - noParams(Object Type[]) An array specifying the parameters passed to the function specified in the property no (by default: []) |
- showAlert - displays a message window (from 3.2.162). On the mobile version it is recommended to use this function instead of alert().
- Function parameters:
Name | Type | Default value | Description |
---|
title | String | '' | Window title | content | String | '' | Message content |
- Function result: null
|