j-Message
- Szingapúr
konfiguráció:
button {String}egy gombjelző (default:OK)style {Number}Megváltoztathat egy stílust (default:1a stílus2Hasonló aj-Approveösszetevő- A
closeoutside {Boolean}lehetővé teszi az üzenetdoboz bezárását a fő gombon kívül kattintva
Használat:
SETTER('message/warning', 'Some warning');
SETTER('message/success', 'Some success message');
SETTER('message/info', 'Some info message');Az aszterrel dolgozik:
- A hibák automatikusan kezelhetők
// Without callback
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', 'Profile has been saved successfully'));
// Or with a callback
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', 'Profile has been saved successfully', function(response) {
console.log(response);
}));
// Or with a callback and without message
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', function(response) {
console.log(response);
}));
// With auto-binding
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', '?.response'));
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', 'Your message', '?.response'));Használja a <ui-component name="message">Amennyiben a készülék még nem tölthető le, jComponent letöltés az első felhasználásra a címről DEF.fallback (Azt a Componentator A szerző: Peter Širka. forrás: a Componentator Az összetevők raktár, MIT licenc.
<ui-component name="message"></ui-component>
<script>
setTimeout(function() {
SETTER('message/success', 'Success message');
// SETTER('message/warning', 'Warning message');
}, 2000);
</script>