j-Prompt
Το στοιχείο (singleton) εμφανίζει ένα γρήγορο παράθυρο με ενιαίο ή πολυετές εισαγωγές.
ΕΠΙΤΡΟΦΗ:
zindex {Number}προαιρετική (προεπιλεγμένη:12)width {Number}προαιρετική, μέγιστη πλάτος (προεπιλεγμένη:400)cancel {String}προαιρετική, ετικέτα για το κουμπί ακύρωσης (προεπιλεγμένο:Cancel)submit {String}προαιρετική, ετικέτα για το κουμπί υποβολής (προεπιλεγμένο:OK)
Παραδείγματα:
var opt = {};
opt.name = 'A title'; // optional
opt.summary = 'A small sumarization'; // optional
opt.value = ''; // a default value, optional
// opt.type = 'password'; // only for single-line mode
// opt.width = config.width; // max. width, optional
// opt.zindex = config.zindex; // a custom zindex, optional
// opt.centered = true; // centers the window to the middle of the screen
// opt.newbie = true; // allows to submit a default value
// opt.multiline = true; // NEW: enables textarea with 3 rows
// opt.monospace = true; // NEW: enables monospace text
opt.cancel = function(val) {
// @val {String}
// prompt is canceled
};
opt.callback = function(val) {
// @val {String}
// changed
};
opt.hide = function() {
// prompt is hidden/closed
};
SETTER('prompt/show', opt);Χρησιμοποιήστε το με <ui-component name="prompt">Όταν το στοιχείο δεν έχει φορτωθεί ακόμα, jComponent Κατεβάστε το για πρώτη φορά από τη διεύθυνση DEF.fallback (Η Componentator Συγγραφέας: Peter Širka. πηγή: το Componentator Ετικέτες Αξιολόγηση, MIT άδεια.
<ui-component name="prompt"></ui-component>
<script>
setTimeout(function() {
var opt = {};
opt.name = 'Folder name';
opt.summary = 'Enter a folder name for your documents:';
opt.value = '';
opt.callback = function(val) {
console.log('Returned', val);
};
opt.cancel = function(val) {
console.log('Canceled', val);
};
opt.hide = function() {
console.log('Hidden');
};
SETTER('prompt/show', opt);
}, 1000);
</script>