public/js/lib/alertify.js
function (fromQueue) {
				var item = queue[0],
				    self = this,
				    transitionDone;

				// dialog is open
				isopen = true;
				// Set button focus after transition
				transitionDone = function (event) {
					event.stopPropagation();
					self.setFocus();
					// unbind event so function only gets called once
					self.unbind(elDialog, self.transition.type, transitionDone);
				};
				// whether CSS transition exists
				if (this.transition.supported && !fromQueue) {
					this.bind(elDialog, this.transition.type, transitionDone);
				}
				// build the proper dialog HTML
				elDialog.innerHTML = this.build(item);
				// assign all the common elements
				btnReset  = $("alertify-resetFocus");
				btnOK     = $("alertify-ok")     || undefined;
				btnCancel = $("alertify-cancel") || undefined;
				btnFocus  = (_alertify.buttonFocus === "cancel") ? btnCancel : ((_alertify.buttonFocus === "none") ? $("alertify-noneFocus") : btnOK),
				input     = $("alertify-text")   || undefined;
				form      = $("alertify-form")   || undefined;
				// add placeholder value to the input field
				if (typeof item.placeholder === "string" && item.placeholder !== "") input.value = item.placeholder;
				if (fromQueue) this.setFocus();
				this.addListeners(item.callback);
			}
function (fromQueue) {
				var item = queue[0],
				    self = this,
				    transitionDone;

				// dialog is open
				isopen = true;
				// Set button focus after transition
				transitionDone = function (event) {
					event.stopPropagation();
					self.setFocus();
					// unbind event so function only gets called once
					self.unbind(elDialog, self.transition.type, transitionDone);
				};
				// whether CSS transition exists
				if (this.transition.supported && !fromQueue) {
					this.bind(elDialog, this.transition.type, transitionDone);
				}
				// build the proper dialog HTML
				elDialog.innerHTML = this.build(item);
				// assign all the common elements
				btnReset  = $("alertify-resetFocus");
				btnOK     = $("alertify-ok")     || undefined;
				btnCancel = $("alertify-cancel") || undefined;
				btnFocus  = (_alertify.buttonFocus === "cancel") ? btnCancel : ((_alertify.buttonFocus === "none") ? $("alertify-noneFocus") : btnOK),
				input     = $("alertify-text")   || undefined;
				form      = $("alertify-form")   || undefined;
				// add placeholder value to the input field
				if (typeof item.placeholder === "string" && item.placeholder !== "") input.value = item.placeholder;
				if (fromQueue) this.setFocus();
				this.addListeners(item.callback);
			}
function ( fromQueue ) { var item = queue [ 0 ] , self = this , transitionDone ; // dialog is open isopen = true ; // Set button focus after transition transitionDone = function ( event ) { event . stopPropagation ( ) ; self . setFocus ( ) ; // unbind event so function only gets called once self . unbind ( elDialog , self . transition . type , transitionDone ) ; } ; // whether CSS transition exists if ( this . transition . supported && ! fromQueue ) { this . bind ( elDialog , this . transition . type , transitionDone ) ; } // build the proper dialog HTML elDialog . innerHTML = this . build ( item ) ; // assign all the common elements btnReset = $ ( "alertify-resetFocus" ) ; btnOK = $ ( "alertify-ok" ) || undefined ; btnCancel = $ ( "alertify-cancel" ) || undefined ; btnFocus = ( _alertify . buttonFocus === "cancel" ) ? btnCancel : ( ( _alertify . buttonFocus === "none" ) ? $ ( "alertify-noneFocus" ) : btnOK ) , input = $ ( "alertify-text" ) || undefined ; form = $ ( "alertify-form" ) || undefined ; // add placeholder value to the input field if ( typeof item . placeholder === "string" && item . placeholder !== "" ) input . value = item . placeholder ; if ( fromQueue ) this . setFocus ( ) ; this . addListeners ( item . callback ) ; }
Initiate all the required pieces for the dialog box

@return {undefined}
Initiate all the required pieces for the dialog box