public static JsonResult Show(MessageType type, MessageAlignment alignment = MessageAlignment.Center) { return(new JsonResult(new { message = DbRes.T(type.ToString() == "NotValid"?"Error":type.ToString(), "MessageBox"), type = type.ToString().ToLower(), alignment = alignment.ToString().ToLower() })); }
public static JavaScriptResult Show(string message, MessageType type = MessageType.Alert, bool modal = false, MessageAlignment layout = MessageAlignment.Center, bool dismissQueue = false) { string txt = "$.noty.closeAll(); noty({ text: \"" + message + "\", type: \"" + type.ToString().ToLower() + "\", layout: \"" + layout.ToString().ToLowerFirst() + "\", dismissQueue: " + dismissQueue.ToString().ToLower() + ", modal: " + modal.ToString().ToLower() + " });"; return(new JavaScriptResult() { Script = txt }); }
public static JsonResult Custom(string title, string message, MessageType type = MessageType.Success, MessageAlignment alignment = MessageAlignment.Center ) { return(new JsonResult(new { title = title, text = message, type = type.ToString().ToLower(), alignment = alignment.ToString().ToLower() })); }
public Noty Layout(MessageAlignment value) { Attributes["layout"] = string.Format("'{0}'", value.ToString().ToLowerFirst()); SetScript(); return(this); }