public/js/lib/alertify.js
function (message, type, fn, placeholder, cssClass) {
				// set the current active element
				// this allows the keyboard focus to be resetted
				// after the dialog box is closed
				elCallee = document.activeElement;
				// check to ensure the alertify dialog element
				// has been successfully created
				var check = function () {
					if ((elLog && elLog.scrollTop !== null) && (elCover && elCover.scrollTop !== null)) return;
					else check();
				};
				// error catching
				if (typeof message !== "string") throw new Error("message must be a string");
				if (typeof type !== "string") throw new Error("type must be a string");
				if (typeof fn !== "undefined" && typeof fn !== "function") throw new Error("fn must be a function");
				// initialize alertify if it hasn't already been done
				if (typeof this.init === "function") {
					this.init();
					check();
				}

				queue.push({ type: type, message: message, callback: fn, placeholder: placeholder, cssClass: cssClass });
				if (!isopen) this.setup();

				return this;
			}
function (message, type, fn, placeholder, cssClass) {
				// set the current active element
				// this allows the keyboard focus to be resetted
				// after the dialog box is closed
				elCallee = document.activeElement;
				// check to ensure the alertify dialog element
				// has been successfully created
				var check = function () {
					if ((elLog && elLog.scrollTop !== null) && (elCover && elCover.scrollTop !== null)) return;
					else check();
				};
				// error catching
				if (typeof message !== "string") throw new Error("message must be a string");
				if (typeof type !== "string") throw new Error("type must be a string");
				if (typeof fn !== "undefined" && typeof fn !== "function") throw new Error("fn must be a function");
				// initialize alertify if it hasn't already been done
				if (typeof this.init === "function") {
					this.init();
					check();
				}

				queue.push({ type: type, message: message, callback: fn, placeholder: placeholder, cssClass: cssClass });
				if (!isopen) this.setup();

				return this;
			}
function ( message , type , fn , placeholder , cssClass ) { // set the current active element // this allows the keyboard focus to be resetted // after the dialog box is closed elCallee = document . activeElement ; // check to ensure the alertify dialog element // has been successfully created var check = function ( ) { if ( ( elLog && elLog . scrollTop !== null ) && ( elCover && elCover . scrollTop !== null ) ) return ; else check ( ) ; } ; // error catching if ( typeof message !== "string" ) throw new Error ( "message must be a string" ) ; if ( typeof type !== "string" ) throw new Error ( "type must be a string" ) ; if ( typeof fn !== "undefined" && typeof fn !== "function" ) throw new Error ( "fn must be a function" ) ; // initialize alertify if it hasn't already been done if ( typeof this . init === "function" ) { this . init ( ) ; check ( ) ; } queue . push ( { type : type , message : message , callback : fn , placeholder : placeholder , cssClass : cssClass } ) ; if ( ! isopen ) this . setup ( ) ; return this ; }
Create a dialog box

@param  {String}   message        The message passed from the callee
@param  {String}   type           Type of dialog to create
@param  {Function} fn             [Optional] Callback function
@param  {String}   placeholder    [Optional] Default value for prompt input field
@param  {String}   cssClass       [Optional] Class(es) to append to dialog box

@return {Object}
Create a dialog box