# j-Message

> j-Message: Εύκολο στη χρήση

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: el
Content-SHA256: 2b0e05f06f8134fe765bf1bfbc719ba1b4ce577b7333510a8770355929668d26
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- Σιγκλέτο
__ΕΠΙΤΡΟΦΗ__:

- `button {String}` μια ετικέτα κουμπιού (προεπιλεγμένη: `OK`)
- Το `style {Number}` μπορεί να αλλάξει ένα στυλ (προεπιλεγμένο: `1`), το στυλό `2` είναι παρόμοιο με το στοιχείο `j-Approve`.
- Το `closeoutside {Boolean}` επιτρέπει το κλείσιμο του κουτιού μηνυμάτων κάνοντας κλικ έξω από το κύριο κουμπί

__Χρήση__:

```js
SETTER('message/warning', 'Some warning');
SETTER('message/success', 'Some success message');
SETTER('message/info', 'Some info message');
```

__Δουλεύει με τον ΑΣΤΕΡ__:

- Τα λάθη αντιμετωπίζονται αυτόματα

```js
// 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'));
```

Χρησιμοποιήστε το με `<ui-component name="message">`Όταν το στοιχείο δεν έχει φορτωθεί ακόμα, jComponent Κατεβάστε το για πρώτη φορά από τη διεύθυνση `DEF.fallback` (Η Componentator Συγγραφέας: Peter Širka. πηγή: το Componentator Ετικέτες Αξιολόγηση, MIT άδεια.

```html example.html
<ui-component name="message"></ui-component>

<script>
	setTimeout(function() {
		SETTER('message/success', 'Success message');
		// SETTER('message/warning', 'Warning message');
	}, 2000);
</script>
```
