<%= @name %> <%if @type == 'm' :%> ( <%for p, index in @params:%> <%=p.name%><%=if index < @params.length-1 then "," %> <%end%> ) <%end%> <%= @label %>


Description: <%- @desc %>

<% if @defaultValue :%>

Default: <%= @defaultValue %>

<% else if @params : %> <% if @params.length > 0 :%>

Parameters:

<%for p in @params:%>

@<%=p.name%> {<%=p.type%>} <%-p.desc%>

<%end%>
<% else :%>

Parameters: none

<% end %> <%end%> <% if @return :%>

Returns:

<%=@return%>

<%end%>
<% if typeof @script == 'string' :%> <%- @script %> <% else :%> <%for line in @script:%><%-line+'\n'%> <%end%> <% end %>
<% if @exec != false :%>
<% if @toggle :%>
>
<% end %> <% if @list :%> <% end %> Run
<% end %>

<%if (@isDialog && @type == 'p') || @remark :%>

Remarks

<% end %> <% if @remark :%>

<%-@remark%>

<% end %> <%if @isDialog && @type == 'p' :%>

You can use the .setting() method to set multiple values at once, Also works as a getter. Or use .get() and .set() aliases.


//get the closable setting value.
var closable = alertify.alert().setting('closable');
//grab the dialog instance using its parameter-less constructor then set multiple settings at once.
alertify.alert()
  .setting({
    'label':'Agree',
    'message': 'This dialog is : ' + (closable ? ' ' : ' not ') + 'closable.' ,
    'onok': function(){ alertify.success('Great');}
  }).show();
 
<%end%>