Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Example success type message from CLAPI (notification non-modal):
akioma.swat.Message.message({
   title: "Success",
   type: "success",
   text: "Information was saved",
   expire: 5000
});
Example modal default OK button
akioma.swat.Message.message({ type: "success", text:"Information was saved", modal: true});
Example (modal custom buttons from array)
akioma.swat.Message.message({ type: "success", text:"Are you sure?", modal: true, buttons: ['Yes','No']});
Shorthand for modal messages
akioma.message({ type: 'info', text: 'Some modal text content here' });
Shorthand for Non-Modal (Notification) messages
akioma.notification({ type: 'info', text: 'Some modal text content here' });
Other samples
// non-modal, notifications
akioma.notification({ type: "success", text:"success message!" });

akioma.notification({ type: "error", text:"success message!" });

akioma.notification({ type: "info", text:"success message!" });

akioma.notification({ type: "warn", text:"success message!" });

// modal messages different types

akioma.message({ type: "success", text:"You did it!" });

akioma.message({ type: "info", text:"You did it!" });

akioma.message({ type: "warning", text:"You did it!" });

akioma.message({ type: "error", text:"You did it!" });

akioma.message({ type: "question", text:"You did it!" });
Example with custom buttons and callback support:
akioma.swat.Message.message({ 
    type: "success", 
    text:"One of 10 excel files was uploaded successfully.", 
    modal: true, 
    buttons: ["Continue", "Stop"],
    callback: (val) => { 
        console.log(val); 
    }
});
  • No labels