29 public function showSimpleMessage($content, $type, $title=null,$icon =
"info", $timeout = NULL, $staticName = null): HtmlMessage {
30 $semantic = $this->jquery->semantic ();
31 if (! isset ( $staticName ))
32 $staticName =
"msg-" . rand ( 0, 50 );
33 $message = $semantic->htmlMessage ( $staticName, $content, $type );
35 $message->addHeader($title);
37 $message->setIcon ( $icon );
38 $message->setDismissable ();
39 if (isset ( $timeout ))
40 $message->setTimeout ( 3000 );
48 public function showConfMessage($content, $type, $title,$url, $responseElement, $data, $attributes = NULL):HtmlMessage {
50 $btOkay =
new HtmlButton(
"bt-okay",
"Confirm",
"negative" );
51 $btOkay->addIcon (
"check circle" );
52 $btOkay->postOnClick ( $url,
"{data:'" . $data .
"'}", $responseElement, $attributes );
54 $btCancel->addIcon (
"remove circle outline" );
55 $btCancel->onClick ( $messageDlg->jsHide () );
56 $messageDlg->addContent ( [
new HtmlDivider(
"" ),
new HtmlSemDoubleElement(
"",
"div",
"", [ $btOkay->floatRight (),$btCancel->floatRight () ] ) ] );
showSimpleMessage($content, $type, $title=null, $icon="info", $timeout=NULL, $staticName=null)
_showSimpleMessage(CRUDMessage $message, $staticName=null)
static cleanAttribute($attr, $replacement="_")
_showConfMessage(CRUDMessage $message, $url, $responseElement, $data, $attributes=NULL)
showConfMessage($content, $type, $title, $url, $responseElement, $data, $attributes=NULL)