File manager - Edit - /home/justdoit/brinkshipping.co.uk/admin.tar
Back
alertify/js/alertify.min.js 0000644 00000016565 15216666456 0011774 0 ustar 00 /*! alertify - v0.3.11 - 2013-10-08 */ !function(a,b){"use strict";var c,d=a.document;c=function(){var c,e,f,g,h,i,j,k,l,m,n,o,p,q={},r={},s=!1,t={ENTER:13,ESC:27,SPACE:32},u=[];return r={buttons:{holder:'<nav class="alertify-buttons">{{buttons}}</nav>',submit:'<button type="submit" class="alertify-button alertify-button-ok" id="alertify-ok">{{ok}}</button>',ok:'<button class="alertify-button alertify-button-ok" id="alertify-ok">{{ok}}</button>',cancel:'<button class="alertify-button alertify-button-cancel" id="alertify-cancel">{{cancel}}</button>'},input:'<div class="alertify-text-wrapper"><input type="text" class="alertify-text" id="alertify-text"></div>',message:'<p class="alertify-message">{{message}}</p>',log:'<article class="alertify-log{{class}}">{{message}}</article>'},p=function(){var a,c,e=!1,f=d.createElement("fakeelement"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"};for(a in g)if(f.style[a]!==b){c=g[a],e=!0;break}return{type:c,supported:e}},c=function(a){return d.getElementById(a)},q={labels:{ok:"OK",cancel:"Cancel"},delay:5e3,buttonReverse:!1,buttonFocus:"ok",transition:b,addListeners:function(a){var b,c,i,j,k,l="undefined"!=typeof f,m="undefined"!=typeof e,n="undefined"!=typeof o,p="",q=this;b=function(b){return"undefined"!=typeof b.preventDefault&&b.preventDefault(),i(b),"undefined"!=typeof o&&(p=o.value),"function"==typeof a&&("undefined"!=typeof o?a(!0,p):a(!0)),!1},c=function(b){return"undefined"!=typeof b.preventDefault&&b.preventDefault(),i(b),"function"==typeof a&&a(!1),!1},i=function(){q.hide(),q.unbind(d.body,"keyup",j),q.unbind(g,"focus",k),l&&q.unbind(f,"click",b),m&&q.unbind(e,"click",c)},j=function(a){var d=a.keyCode;(d===t.SPACE&&!n||n&&d===t.ENTER)&&b(a),d===t.ESC&&m&&c(a)},k=function(){n?o.focus():!m||q.buttonReverse?f.focus():e.focus()},this.bind(g,"focus",k),this.bind(h,"focus",k),l&&this.bind(f,"click",b),m&&this.bind(e,"click",c),this.bind(d.body,"keyup",j),this.transition.supported||this.setFocus()},bind:function(a,b,c){"function"==typeof a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},handleErrors:function(){if("undefined"!=typeof a.onerror){var b=this;return a.onerror=function(a,c,d){b.error("["+a+" on line "+d+" of "+c+"]",0)},!0}return!1},appendButtons:function(a,b){return this.buttonReverse?b+a:a+b},build:function(a){var b="",c=a.type,d=a.message,e=a.cssClass||"";switch(b+='<div class="alertify-dialog">',b+='<a id="alertify-resetFocusBack" class="alertify-resetFocus" href="#">Reset Focus</a>',"none"===q.buttonFocus&&(b+='<a href="#" id="alertify-noneFocus" class="alertify-hidden"></a>'),"prompt"===c&&(b+='<div id="alertify-form">'),b+='<article class="alertify-inner">',b+=r.message.replace("{{message}}",d),"prompt"===c&&(b+=r.input),b+=r.buttons.holder,b+="</article>","prompt"===c&&(b+="</div>"),b+='<a id="alertify-resetFocus" class="alertify-resetFocus" href="#">Reset Focus</a>',b+="</div>",c){case"confirm":b=b.replace("{{buttons}}",this.appendButtons(r.buttons.cancel,r.buttons.ok)),b=b.replace("{{ok}}",this.labels.ok).replace("{{cancel}}",this.labels.cancel);break;case"prompt":b=b.replace("{{buttons}}",this.appendButtons(r.buttons.cancel,r.buttons.submit)),b=b.replace("{{ok}}",this.labels.ok).replace("{{cancel}}",this.labels.cancel);break;case"alert":b=b.replace("{{buttons}}",r.buttons.ok),b=b.replace("{{ok}}",this.labels.ok)}return l.className="alertify alertify-"+c+" "+e,k.className="alertify-cover",b},close:function(a,b){var c,d,e=b&&!isNaN(b)?+b:this.delay,f=this;this.bind(a,"click",function(){c(a)}),d=function(a){a.stopPropagation(),f.unbind(this,f.transition.type,d),m.removeChild(this),m.hasChildNodes()||(m.className+=" alertify-logs-hidden")},c=function(a){"undefined"!=typeof a&&a.parentNode===m&&(f.transition.supported?(f.bind(a,f.transition.type,d),a.className+=" alertify-log-hide"):(m.removeChild(a),m.hasChildNodes()||(m.className+=" alertify-logs-hidden")))},0!==b&&setTimeout(function(){c(a)},e)},dialog:function(a,b,c,e,f){j=d.activeElement;var g=function(){m&&null!==m.scrollTop&&k&&null!==k.scrollTop||g()};if("string"!=typeof a)throw new Error("message must be a string");if("string"!=typeof b)throw new Error("type must be a string");if("undefined"!=typeof c&&"function"!=typeof c)throw new Error("fn must be a function");return this.init(),g(),u.push({type:b,message:a,callback:c,placeholder:e,cssClass:f}),s||this.setup(),this},extend:function(a){if("string"!=typeof a)throw new Error("extend method must have exactly one paramter");return function(b,c){return this.log(b,a,c),this}},hide:function(){var a,b=this;u.splice(0,1),u.length>0?this.setup(!0):(s=!1,a=function(c){c.stopPropagation(),b.unbind(l,b.transition.type,a)},this.transition.supported?(this.bind(l,this.transition.type,a),l.className="alertify alertify-hide alertify-hidden"):l.className="alertify alertify-hide alertify-hidden alertify-isHidden",k.className="alertify-cover alertify-cover-hidden",j.focus())},init:function(){d.createElement("nav"),d.createElement("article"),d.createElement("section"),null==c("alertify-cover")&&(k=d.createElement("div"),k.setAttribute("id","alertify-cover"),k.className="alertify-cover alertify-cover-hidden",d.body.appendChild(k)),null==c("alertify")&&(s=!1,u=[],l=d.createElement("section"),l.setAttribute("id","alertify"),l.className="alertify alertify-hidden",d.body.appendChild(l)),null==c("alertify-logs")&&(m=d.createElement("section"),m.setAttribute("id","alertify-logs"),m.className="alertify-logs alertify-logs-hidden",d.body.appendChild(m)),d.body.setAttribute("tabindex","0"),this.transition=p()},log:function(a,b,c){var d=function(){m&&null!==m.scrollTop||d()};return this.init(),d(),m.className="alertify-logs",this.notify(a,b,c),this},notify:function(a,b,c){var e=d.createElement("article");e.className="alertify-log"+("string"==typeof b&&""!==b?" alertify-log-"+b:""),e.innerHTML=a,m.appendChild(e),setTimeout(function(){e.className=e.className+" alertify-log-show"},50),this.close(e,c)},set:function(a){var b;if("object"!=typeof a&&a instanceof Array)throw new Error("args must be an object");for(b in a)a.hasOwnProperty(b)&&(this[b]=a[b])},setFocus:function(){o?(o.focus(),o.select()):i.focus()},setup:function(a){var d,j=u[0],k=this;s=!0,d=function(a){a.stopPropagation(),k.setFocus(),k.unbind(l,k.transition.type,d)},this.transition.supported&&!a&&this.bind(l,this.transition.type,d),l.innerHTML=this.build(j),g=c("alertify-resetFocus"),h=c("alertify-resetFocusBack"),f=c("alertify-ok")||b,e=c("alertify-cancel")||b,i="cancel"===q.buttonFocus?e:"none"===q.buttonFocus?c("alertify-noneFocus"):f,o=c("alertify-text")||b,n=c("alertify-form")||b,"string"==typeof j.placeholder&&""!==j.placeholder&&(o.value=j.placeholder),a&&this.setFocus(),this.addListeners(j.callback)},unbind:function(a,b,c){"function"==typeof a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)}},{alert:function(a,b,c){return q.dialog(a,"alert",b,"",c),this},confirm:function(a,b,c){return q.dialog(a,"confirm",b,"",c),this},extend:q.extend,init:q.init,log:function(a,b,c){return q.log(a,b,c),this},prompt:function(a,b,c,d){return q.dialog(a,"prompt",b,c,d),this},success:function(a,b){return q.log(a,"success",b),this},error:function(a,b){return q.log(a,"error",b),this},set:function(a){q.set(a)},labels:q.labels,debug:q.handleErrors}},"function"==typeof define?define([],function(){return new c}):"undefined"==typeof a.alertify&&(a.alertify=new c)}(this); alertify/js/alertify.js 0000644 00000047057 15216666456 0011212 0 ustar 00 /** * alertify * An unobtrusive customizable JavaScript notification system * * @author Fabien Doiron <fabien.doiron@gmail.com> * @copyright Fabien Doiron 2013 * @license MIT <http://opensource.org/licenses/mit-license.php> * @link http://fabien-d.github.com/alertify.js/ * @module alertify * @version 0.3.11 */ (function (global, undefined) { "use strict"; var document = global.document, Alertify; Alertify = function () { var _alertify = {}, dialogs = {}, isopen = false, keys = { ENTER: 13, ESC: 27, SPACE: 32 }, queue = [], $, btnCancel, btnOK, btnReset, btnResetBack, btnFocus, elCallee, elCover, elDialog, elLog, form, input, getTransitionEvent; /** * Markup pieces * @type {Object} */ dialogs = { buttons : { holder : "<nav class=\"alertify-buttons\">{{buttons}}</nav>", submit : "<button type=\"submit\" class=\"alertify-button alertify-button-ok\" id=\"alertify-ok\">{{ok}}</button>", ok : "<button class=\"alertify-button alertify-button-ok\" id=\"alertify-ok\">{{ok}}</button>", cancel : "<button class=\"alertify-button alertify-button-cancel\" id=\"alertify-cancel\">{{cancel}}</button>" }, input : "<div class=\"alertify-text-wrapper\"><input type=\"text\" class=\"alertify-text\" id=\"alertify-text\"></div>", message : "<p class=\"alertify-message\">{{message}}</p>", log : "<article class=\"alertify-log{{class}}\">{{message}}</article>" }; /** * Return the proper transitionend event * @return {String} Transition type string */ getTransitionEvent = function () { var t, type, supported = false, el = document.createElement("fakeelement"), transitions = { "WebkitTransition" : "webkitTransitionEnd", "MozTransition" : "transitionend", "OTransition" : "otransitionend", "transition" : "transitionend" }; for (t in transitions) { if (el.style[t] !== undefined) { type = transitions[t]; supported = true; break; } } return { type : type, supported : supported }; }; /** * Shorthand for document.getElementById() * * @param {String} id A specific element ID * @return {Object} HTML element */ $ = function (id) { return document.getElementById(id); }; /** * Alertify private object * @type {Object} */ _alertify = { /** * Labels object * @type {Object} */ labels : { ok : "OK", cancel : "Cancel" }, /** * Delay number * @type {Number} */ delay : 5000, /** * Whether buttons are reversed (default is secondary/primary) * @type {Boolean} */ buttonReverse : false, /** * Which button should be focused by default * @type {String} "ok" (default), "cancel", or "none" */ buttonFocus : "ok", /** * Set the transition event on load * @type {[type]} */ transition : undefined, /** * Set the proper button click events * * @param {Function} fn [Optional] Callback function * * @return {undefined} */ addListeners : function (fn) { var hasOK = (typeof btnOK !== "undefined"), hasCancel = (typeof btnCancel !== "undefined"), hasInput = (typeof input !== "undefined"), val = "", self = this, ok, cancel, common, key, reset; // ok event handler ok = function (event) { if (typeof event.preventDefault !== "undefined") event.preventDefault(); common(event); if (typeof input !== "undefined") val = input.value; if (typeof fn === "function") { if (typeof input !== "undefined") { fn(true, val); } else fn(true); } return false; }; // cancel event handler cancel = function (event) { if (typeof event.preventDefault !== "undefined") event.preventDefault(); common(event); if (typeof fn === "function") fn(false); return false; }; // common event handler (keyup, ok and cancel) common = function (event) { self.hide(); self.unbind(document.body, "keyup", key); self.unbind(btnReset, "focus", reset); if (hasOK) self.unbind(btnOK, "click", ok); if (hasCancel) self.unbind(btnCancel, "click", cancel); }; // keyup handler key = function (event) { var keyCode = event.keyCode; if ((keyCode === keys.SPACE && !hasInput) || (hasInput && keyCode === keys.ENTER)) ok(event); if (keyCode === keys.ESC && hasCancel) cancel(event); }; // reset focus to first item in the dialog reset = function (event) { if (hasInput) input.focus(); else if (!hasCancel || self.buttonReverse) btnOK.focus(); else btnCancel.focus(); }; // handle reset focus link // this ensures that the keyboard focus does not // ever leave the dialog box until an action has // been taken this.bind(btnReset, "focus", reset); this.bind(btnResetBack, "focus", reset); // handle OK click if (hasOK) this.bind(btnOK, "click", ok); // handle Cancel click if (hasCancel) this.bind(btnCancel, "click", cancel); // listen for keys, Cancel => ESC this.bind(document.body, "keyup", key); if (!this.transition.supported) { this.setFocus(); } }, /** * Bind events to elements * * @param {Object} el HTML Object * @param {Event} event Event to attach to element * @param {Function} fn Callback function * * @return {undefined} */ bind : function (el, event, fn) { if (typeof el.addEventListener === "function") { el.addEventListener(event, fn, false); } else if (el.attachEvent) { el.attachEvent("on" + event, fn); } }, /** * Use alertify as the global error handler (using window.onerror) * * @return {boolean} success */ handleErrors : function () { if (typeof global.onerror !== "undefined") { var self = this; global.onerror = function (msg, url, line) { self.error("[" + msg + " on line " + line + " of " + url + "]", 0); }; return true; } else { return false; } }, /** * Append button HTML strings * * @param {String} secondary The secondary button HTML string * @param {String} primary The primary button HTML string * * @return {String} The appended button HTML strings */ appendButtons : function (secondary, primary) { return this.buttonReverse ? primary + secondary : secondary + primary; }, /** * Build the proper message box * * @param {Object} item Current object in the queue * * @return {String} An HTML string of the message box */ build : function (item) { var html = "", type = item.type, message = item.message, css = item.cssClass || ""; html += "<div class=\"alertify-dialog\">"; html += "<a id=\"alertify-resetFocusBack\" class=\"alertify-resetFocus\" href=\"#\">Reset Focus</a>"; if (_alertify.buttonFocus === "none") html += "<a href=\"#\" id=\"alertify-noneFocus\" class=\"alertify-hidden\"></a>"; // doens't require an actual form if (type === "prompt") html += "<div id=\"alertify-form\">"; html += "<article class=\"alertify-inner\">"; html += dialogs.message.replace("{{message}}", message); if (type === "prompt") html += dialogs.input; html += dialogs.buttons.holder; html += "</article>"; if (type === "prompt") html += "</div>"; html += "<a id=\"alertify-resetFocus\" class=\"alertify-resetFocus\" href=\"#\">Reset Focus</a>"; html += "</div>"; switch (type) { case "confirm": html = html.replace("{{buttons}}", this.appendButtons(dialogs.buttons.cancel, dialogs.buttons.ok)); html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel); break; case "prompt": html = html.replace("{{buttons}}", this.appendButtons(dialogs.buttons.cancel, dialogs.buttons.submit)); html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel); break; case "alert": html = html.replace("{{buttons}}", dialogs.buttons.ok); html = html.replace("{{ok}}", this.labels.ok); break; default: break; } elDialog.className = "alertify alertify-" + type + " " + css; elCover.className = "alertify-cover"; return html; }, /** * Close the log messages * * @param {Object} elem HTML Element of log message to close * @param {Number} wait [optional] Time (in ms) to wait before automatically hiding the message, if 0 never hide * * @return {undefined} */ close : function (elem, wait) { // Unary Plus: +"2" === 2 var timer = (wait && !isNaN(wait)) ? +wait : this.delay, self = this, hideElement, transitionDone; // set click event on log messages this.bind(elem, "click", function () { hideElement(elem); }); // Hide the dialog box after transition // This ensure it doens't block any element from being clicked transitionDone = function (event) { event.stopPropagation(); // unbind event so function only gets called once self.unbind(this, self.transition.type, transitionDone); // remove log message elLog.removeChild(this); if (!elLog.hasChildNodes()) elLog.className += " alertify-logs-hidden"; }; // this sets the hide class to transition out // or removes the child if css transitions aren't supported hideElement = function (el) { // ensure element exists if (typeof el !== "undefined" && el.parentNode === elLog) { // whether CSS transition exists if (self.transition.supported) { self.bind(el, self.transition.type, transitionDone); el.className += " alertify-log-hide"; } else { elLog.removeChild(el); if (!elLog.hasChildNodes()) elLog.className += " alertify-logs-hidden"; } } }; // never close (until click) if wait is set to 0 if (wait === 0) return; // set timeout to auto close the log message setTimeout(function () { hideElement(elem); }, timer); }, /** * 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} */ dialog : 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 this.init(); check(); queue.push({ type: type, message: message, callback: fn, placeholder: placeholder, cssClass: cssClass }); if (!isopen) this.setup(); return this; }, /** * Extend the log method to create custom methods * * @param {String} type Custom method name * * @return {Function} */ extend : function (type) { if (typeof type !== "string") throw new Error("extend method must have exactly one paramter"); return function (message, wait) { this.log(message, type, wait); return this; }; }, /** * Hide the dialog and rest to defaults * * @return {undefined} */ hide : function () { var transitionDone, self = this; // remove reference from queue queue.splice(0,1); // if items remaining in the queue if (queue.length > 0) this.setup(true); else { isopen = false; // Hide the dialog box after transition // This ensure it doens't block any element from being clicked transitionDone = function (event) { event.stopPropagation(); // unbind event so function only gets called once self.unbind(elDialog, self.transition.type, transitionDone); }; // whether CSS transition exists if (this.transition.supported) { this.bind(elDialog, this.transition.type, transitionDone); elDialog.className = "alertify alertify-hide alertify-hidden"; } else { elDialog.className = "alertify alertify-hide alertify-hidden alertify-isHidden"; } elCover.className = "alertify-cover alertify-cover-hidden"; // set focus to the last element or body // after the dialog is closed elCallee.focus(); } }, /** * Initialize Alertify * Create the 2 main elements * * @return {undefined} */ init : function () { // ensure legacy browsers support html5 tags document.createElement("nav"); document.createElement("article"); document.createElement("section"); // cover if ($("alertify-cover") == null) { elCover = document.createElement("div"); elCover.setAttribute("id", "alertify-cover"); elCover.className = "alertify-cover alertify-cover-hidden"; document.body.appendChild(elCover); } // main element if ($("alertify") == null) { isopen = false; queue = []; elDialog = document.createElement("section"); elDialog.setAttribute("id", "alertify"); elDialog.className = "alertify alertify-hidden"; document.body.appendChild(elDialog); } // log element if ($("alertify-logs") == null) { elLog = document.createElement("section"); elLog.setAttribute("id", "alertify-logs"); elLog.className = "alertify-logs alertify-logs-hidden"; document.body.appendChild(elLog); } // set tabindex attribute on body element // this allows script to give it focus // after the dialog is closed document.body.setAttribute("tabindex", "0"); // set transition type this.transition = getTransitionEvent(); }, /** * Show a new log message box * * @param {String} message The message passed from the callee * @param {String} type [Optional] Optional type of log message * @param {Number} wait [Optional] Time (in ms) to wait before auto-hiding the log * * @return {Object} */ log : function (message, type, wait) { // check to ensure the alertify dialog element // has been successfully created var check = function () { if (elLog && elLog.scrollTop !== null) return; else check(); }; // initialize alertify if it hasn't already been done this.init(); check(); elLog.className = "alertify-logs"; this.notify(message, type, wait); return this; }, /** * Add new log message * If a type is passed, a class name "alertify-log-{type}" will get added. * This allows for custom look and feel for various types of notifications. * * @param {String} message The message passed from the callee * @param {String} type [Optional] Type of log message * @param {Number} wait [Optional] Time (in ms) to wait before auto-hiding * * @return {undefined} */ notify : function (message, type, wait) { var log = document.createElement("article"); log.className = "alertify-log" + ((typeof type === "string" && type !== "") ? " alertify-log-" + type : ""); log.innerHTML = message; // append child elLog.appendChild(log); // triggers the CSS animation setTimeout(function() { log.className = log.className + " alertify-log-show"; }, 50); this.close(log, wait); }, /** * Set properties * * @param {Object} args Passing parameters * * @return {undefined} */ set : function (args) { var k; // error catching if (typeof args !== "object" && args instanceof Array) throw new Error("args must be an object"); // set parameters for (k in args) { if (args.hasOwnProperty(k)) { this[k] = args[k]; } } }, /** * Common place to set focus to proper element * * @return {undefined} */ setFocus : function () { if (input) { input.focus(); input.select(); } else btnFocus.focus(); }, /** * Initiate all the required pieces for the dialog box * * @return {undefined} */ setup : 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"); btnResetBack = $("alertify-resetFocusBack"); 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); }, /** * Unbind events to elements * * @param {Object} el HTML Object * @param {Event} event Event to detach to element * @param {Function} fn Callback function * * @return {undefined} */ unbind : function (el, event, fn) { if (typeof el.removeEventListener === "function") { el.removeEventListener(event, fn, false); } else if (el.detachEvent) { el.detachEvent("on" + event, fn); } } }; return { alert : function (message, fn, cssClass) { _alertify.dialog(message, "alert", fn, "", cssClass); return this; }, confirm : function (message, fn, cssClass) { _alertify.dialog(message, "confirm", fn, "", cssClass); return this; }, extend : _alertify.extend, init : _alertify.init, log : function (message, type, wait) { _alertify.log(message, type, wait); return this; }, prompt : function (message, fn, placeholder, cssClass) { _alertify.dialog(message, "prompt", fn, placeholder, cssClass); return this; }, success : function (message, wait) { _alertify.log(message, "success", wait); return this; }, error : function (message, wait) { _alertify.log(message, "error", wait); return this; }, set : function (args) { _alertify.set(args); }, labels : _alertify.labels, debug : _alertify.handleErrors }; }; // AMD and window support if (typeof define === "function") { define([], function () { return new Alertify(); }); } else if (typeof global.alertify === "undefined") { global.alertify = new Alertify(); } }(this)); alertify/css/alertify.bootstrap.css 0000644 00000007465 15216666456 0013555 0 ustar 00 /** * Twitter Bootstrap Look and Feel * Based on http://twitter.github.com/bootstrap/ */ .alertify, .alertify-log { font-family: sans-serif; } .alertify { background: #FFF; border: 1px solid #8E8E8E; /* browsers that don't support rgba */ border: 1px solid rgba(0,0,0,.3); border-radius: 6px; box-shadow: 0 3px 7px rgba(0,0,0,.3); -webkit-background-clip: padding; /* Safari 4? Chrome 6? */ -moz-background-clip: padding; /* Firefox 3.6 */ background-clip: padding-box; /* Firefox 4, Safari 5, Opera 10, IE 9 */ } .alertify-dialog { padding: 0; } .alertify-inner { text-align: left; } .alertify-message { padding: 15px; margin: 0; } .alertify-text-wrapper { padding: 0 15px; } .alertify-text { color: #555; border-radius: 4px; padding: 8px; background-color: #FFF; border: 1px solid #CCC; box-shadow: inset 0 1px 1px rgba(0,0,0,.075); } .alertify-text:focus { border-color: rgba(82,168,236,.8); outline: 0; box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); } .alertify-buttons { padding: 14px 15px 15px; background: #F5F5F5; border-top: 1px solid #DDD; border-radius: 0 0 6px 6px; box-shadow: inset 0 1px 0 #FFF; text-align: right; } .alertify-button, .alertify-button:hover, .alertify-button:focus, .alertify-button:active { margin-left: 10px; border-radius: 4px; font-weight: normal; padding: 4px 12px; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05); background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); } .alertify-button:focus { outline: none; box-shadow: 0 0 5px #2B72D5; } .alertify-button:active { position: relative; box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); } .alertify-button-cancel, .alertify-button-cancel:hover, .alertify-button-cancel:focus, .alertify-button-cancel:active { text-shadow: 0 -1px 0 rgba(255,255,255,.75); background-color: #E6E6E6; border: 1px solid #BBB; color: #333; background-image: -webkit-linear-gradient(top, #FFF, #E6E6E6); background-image: -moz-linear-gradient(top, #FFF, #E6E6E6); background-image: -ms-linear-gradient(top, #FFF, #E6E6E6); background-image: -o-linear-gradient(top, #FFF, #E6E6E6); background-image: linear-gradient(top, #FFF, #E6E6E6); } .alertify-button-cancel:hover, .alertify-button-cancel:focus, .alertify-button-cancel:active { background: #E6E6E6; } .alertify-button-ok, .alertify-button-ok:hover, .alertify-button-ok:focus, .alertify-button-ok:active { text-shadow: 0 -1px 0 rgba(0,0,0,.25); background-color: #04C; border: 1px solid #04C; border-color: #04C #04C #002A80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); color: #FFF; } .alertify-button-ok:hover, .alertify-button-ok:focus, .alertify-button-ok:active { background: #04C; } .alertify-log { background: #D9EDF7; padding: 8px 14px; border-radius: 4px; color: #3A8ABF; text-shadow: 0 1px 0 rgba(255,255,255,.5); border: 1px solid #BCE8F1; } .alertify-log-error { color: #B94A48; background: #F2DEDE; border: 1px solid #EED3D7; } .alertify-log-success { color: #468847; background: #DFF0D8; border: 1px solid #D6E9C6; } alertify/css/alertify.css 0000644 00000007173 15216666456 0011535 0 ustar 00 .alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto} alertify/css/main.css 0000644 00000051425 15216666456 0010641 0 ustar 00 article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:0 0 0.67em}h2{font-size:1.5em;margin:0 0 0.83em}h3{font-size:1.17em;margin:0 0 1em}h4{font-size:1em;margin:0 0 1.33em}h5{font-size:0.83em;margin:0 0 1.67em}h6{font-size:0.75em;margin:0 0 2.33em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:0 40px 1em}dfn{font-style:italic}mark{background:#ff0;color:#000}p,pre{margin:0 0 1em}code,kbd,pre,samp{font-family:monospace, serif;_font-family:'courier new', monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:75%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}dl,menu,ol,ul{margin:0 0 1em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{font:normal 16px/1.5 Arial,Helvetica,sans-serif;color:#333;background:#FFF}.media,.mediaBody{overflow:hidden;zoom:1}.mediaAside{float:left;display:inline;margin-right:1em}.clearfix,.row{zoom:1}.clearfix:before,.row:before,.clearfix:after,.row:after{content:"";display:table}.clearfix:after,.row:after{clear:both}/* * Font Awesome 3.0.2 * the iconic font designed for use with Twitter Bootstrap * ------------------------------------------------------- * The full suite of pictographic icons, examples, and documentation * can be found at: http://fortawesome.github.com/Font-Awesome/ * * License * ------------------------------------------------------- * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - * http://opensource.org/licenses/mit-license.html * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" * * Contact * ------------------------------------------------------- * Email: dave@davegandy.com * Twitter: http://twitter.com/fortaweso_me * Work: Lead Product Designer @ http://kyruus.com */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=3.0.1");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=3.0.1") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff?v=3.0.1") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=3.0.1") format("truetype");font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}a [class^="icon-"],a [class*=" icon-"]{display:inline-block}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}.btn [class^="icon-"],.btn [class*=" icon-"],.nav [class^="icon-"],.nav [class*=" icon-"]{display:inline}.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em}.btn [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block}.nav-tabs [class^="icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"],.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class^="icon-"],.nav-pills [class^="icon-"].icon-large,.nav-pills [class*=" icon-"],.nav-pills [class*=" icon-"].icon-large{line-height:.9em}li [class^="icon-"],li [class*=" icon-"],.nav li [class^="icon-"],.nav li [class*=" icon-"]{display:inline-block;width:1.25em;text-align:center}li [class^="icon-"].icon-large,li [class*=" icon-"].icon-large,.nav li [class^="icon-"].icon-large,.nav li [class*=" icon-"].icon-large{width:1.5625em}ul.icons{list-style-type:none;text-indent:-0.75em}ul.icons li [class^="icon-"],ul.icons li [class*=" icon-"]{width:.75em}.icon-muted{color:#eee}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.pull-right{float:right}.pull-left{float:left}[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}.btn [class^="icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-moz-document url-prefix(){.icon-spin{height:.9em}.btn .icon-spin{height:auto}.icon-spin.icon-large{height:1.25em}.btn .icon-spin.icon-large{height:.75em}}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up:before{content:"\f087"}.icon-thumbs-down:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope-alt:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}h1,h2,h3,h4,h5,h6{line-height:1.2;font-weight:normal}h1{font-size:64px;text-align:center;font-family:"lato",Arial,Helvetica,sans-serif;color:#FFF;margin:0 0 40px}h2{font-size:40px;font-family:"lato",Arial,Helvetica,sans-serif;font-weight:900;text-align:center;position:relative;z-index:1}h2 span{display:inline-block;padding:20px;background:#FFF}h2:before{position:absolute;z-index:-1;top:55%;left:0;right:0;border-top:1px dashed #AAA;border-bottom:1px dashed #F5F5F5;content:""}h3{font:bold 20px/1.2 Arial,Helvetica,sans-serif;margin:0 0 20px}h4{font:bold 16px/1.2 Arial,Helvetica,sans-serif}p{margin:0 0 20px}a{color:#0C7AB9}a:hover{color:#FFF;background:#0C7AB9;text-decoration:none}.container{width:900px;margin:0 auto}.masthead{padding:20px 0;background:url(../img/banner.jpg) no-repeat center 0;margin-bottom:60px}.masthead img{display:block;margin:0 auto}.cta{text-align:center}.cta .button-primary{padding:20px 40px;-webkit-box-sizing:border-bottom;-moz-box-sizing:border-bottom;box-sizing:border-bottom}.small{font-size:12px;font-weight:normal}.footer{background:#13181F;color:#666;text-align:center;padding:40px 0}.footer a{color:#FFF;text-decoration:none}.footer i{margin-right:4px}.featured-list{list-style:none;text-align:center;margin:80px 0 0;padding:0}.featured-list li{display:inline-block;margin:0 20px 20px}.featured-list li a{position:relative;display:block;color:#666}.featured-list li a:before{content:"";display:block;margin:0 auto 5px}.featured-list li a:hover{background:none;color:#FFF}.featured-list .treehouse:before{background:url(../img/treehouse.png) no-repeat center bottom;width:58px;height:42px}.featured-list .webdev:before{background:url(../img/webdev.png) no-repeat center bottom;width:103px;height:42px}.block{margin-bottom:60px}.mh-logo{font-family:"lato",Arial,Helvetica,sans-serif;font-weight:900;text-transform:uppercase;font-size:24px;text-align:center;color:#7A7C7C}.mh-logo .extension{text-transform:none}.feature{float:left;width:47%;margin-bottom:20px}.feature.alt{float:right}.feature .mediaAside{font-size:32px;line-height:1;margin:0;width:60px}.syntaxhighlighter .toolbar{display:none}.button-group{margin:0;font-size:0}.button-primary{font-size:16px;background:#0C7AB9;color:#FFF;display:inline-block;padding:5px 20px;text-decoration:none;font-weight:bold;border-radius:2px;margin:0 5px 5px 0}.button-primary:hover,.button-primary:focus{background:#0a6497;outline:none}.button-primary:focus{box-shadow:0 0 10px #0f9ae9}.button-primary:active{box-shadow:inset 0 3px 3px rgba(0,0,0,0.25)}.button-primary.is-disabled{opacity:.5}@media only screen and (max-width: 980px){.container{width:95%}.button{margin-bottom:20px}}@media only screen and (max-width: 830px){img{max-width:100%;height:auto}.feature,.alt{float:none;width:100%}}@media only screen and (max-width: 640px){.mh-logo{font-size:12.8px}h1{font-size:24px}h2{font-size:24px}} alertify/css/alertify.default.css 0000644 00000004770 15216666456 0013160 0 ustar 00 /** * Default Look and Feel */ .alertify, .alertify-log { font-family: sans-serif; } .alertify { background: #FFF; border: 10px solid #333; /* browsers that don't support rgba */ border: 10px solid rgba(0,0,0,.7); border-radius: 8px; box-shadow: 0 3px 3px rgba(0,0,0,.3); -webkit-background-clip: padding; /* Safari 4? Chrome 6? */ -moz-background-clip: padding; /* Firefox 3.6 */ background-clip: padding-box; /* Firefox 4, Safari 5, Opera 10, IE 9 */ } .alertify-text { border: 1px solid #CCC; padding: 10px; border-radius: 4px; } .alertify-button { border-radius: 4px; color: #FFF; font-weight: bold; padding: 6px 15px; text-decoration: none; text-shadow: 1px 1px 0 rgba(0,0,0,.5); box-shadow: inset 0 1px 0 0 rgba(255,255,255,.5); background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); } .alertify-button:hover, .alertify-button:focus { outline: none; background-image: -webkit-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0)); background-image: -moz-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0)); background-image: -ms-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0)); background-image: -o-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0)); background-image: linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0)); } .alertify-button:focus { box-shadow: 0 0 15px #2B72D5; } .alertify-button:active { position: relative; box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); } .alertify-button-cancel, .alertify-button-cancel:hover, .alertify-button-cancel:focus { background-color: #FE1A00; border: 1px solid #D83526; } .alertify-button-ok, .alertify-button-ok:hover, .alertify-button-ok:focus { background-color: #5CB811; border: 1px solid #3B7808; } .alertify-log { background: #1F1F1F; background: rgba(0,0,0,.9); padding: 15px; border-radius: 4px; color: #FFF; text-shadow: -1px -1px 0 rgba(0,0,0,.5); } .alertify-log-error { background: #FE1A00; background: rgba(254,26,0,.9); } .alertify-log-success { background: #5CB811; background: rgba(92,184,17,.9); } alertify/css/alertify.core.css 0000644 00000006761 15216666456 0012466 0 ustar 00 .alertify, .alertify-show, .alertify-log { -webkit-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275); -moz-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275); -ms-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275); -o-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275); transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275); /* easeOutBack */ } .alertify-hide { -webkit-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); -moz-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); -ms-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); -o-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); /* easeInBack */ } .alertify-log-hide { -webkit-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); -moz-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); -ms-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); -o-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); /* easeInBack */ } .alertify-cover { position: fixed; z-index: 99999; top: 0; right: 0; bottom: 0; left: 0; background-color:white; filter:alpha(opacity=0); opacity:0; } .alertify-cover-hidden { display: none; } .alertify { position: fixed; z-index: 99999; top: 50px; left: 50%; width: 550px; margin-left: -275px; opacity: 1; } .alertify-hidden { -webkit-transform: translate(0,-150px); -moz-transform: translate(0,-150px); -ms-transform: translate(0,-150px); -o-transform: translate(0,-150px); transform: translate(0,-150px); opacity: 0; display: none; } /* overwrite display: none; for everything except IE6-8 */ :root *> .alertify-hidden { display: block; visibility: hidden; } .alertify-logs { position: fixed; z-index: 5000; bottom: 10px; right: 10px; width: 300px; } .alertify-logs-hidden { display: none; } .alertify-log { display: block; margin-top: 10px; position: relative; right: -300px; opacity: 0; } .alertify-log-show { right: 0; opacity: 1; } .alertify-log-hide { -webkit-transform: translate(300px, 0); -moz-transform: translate(300px, 0); -ms-transform: translate(300px, 0); -o-transform: translate(300px, 0); transform: translate(300px, 0); opacity: 0; } .alertify-dialog { padding: 25px; } .alertify-resetFocus { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .alertify-inner { text-align: center; } .alertify-text { margin-bottom: 15px; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; font-size: 100%; } .alertify-buttons { } .alertify-button, .alertify-button:hover, .alertify-button:active, .alertify-button:visited { background: none; text-decoration: none; border: none; /* line-height and font-size for input button */ line-height: 1.5; font-size: 100%; display: inline-block; cursor: pointer; margin-left: 5px; } @media only screen and (max-width: 680px) { .alertify, .alertify-logs { width: 90%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .alertify { left: 5%; margin: 0; } } home.php 0000644 00000030106 15216666456 0006226 0 ustar 00 <?php session_start(); require_once 'db.php'; if($_SESSION['user_id']==null) { header("Location:index.php"); } ?> <!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Admin </title> <meta name="description" content="Tab Styles Inspiration: A small collection of styles for tabs" /> <meta name="keywords" content="tabs, inspiration, web design, css, modern, effects, svg" /> <meta name="author" content="Codrops" /> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" type="text/css" href="css/normalize.css" /> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="css/tabs.css" /> <link rel="stylesheet" type="text/css" href="css/tabstyles.css" /> <link rel="icon" href="https://globewidesecurityandshippings.com/my_uploads/2019/09/zerik-security-logo-1.png" sizes="32x32" /> <link rel="icon" href="https://globewidesecurityandshippings.com/my_uploads/2019/09/zerik-security-logo-1.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://globewidesecurityandshippings.com/my_uploads/2019/09/zerik-security-logo-1.png" /> <script src="js/modernizr.custom.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- Google fonts - witch you want to use - (rest you can just remove) --> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <script src="//code.jquery.com/jquery.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <!-- <link rel="stylesheet" type="text/css" href="alertify/css/main.css"> --> <!-- <link rel="stylesheet" type="text/css" href="alertify/css/alertify.bootstrap.css"> --> <link rel="stylesheet" type="text/css" href="alertify/css/alertify.core.css"> <link rel="stylesheet" type="text/css" href="alertify/css/alertify.default.css"> <!-- <link rel="stylesheet" type="text/css" href="alertify/css/alertify.css"> --> <link rel="stylesheet" type="text/css" href="css/custom.css"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> </head> <body> <br><br> <div class="container" > <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="alert alert-success" role="alert"> <h5> <a href="addPackage.php"> Send Package</a> | <a href="signout.php">Signout</a> </h5> </div> </div> </div> <div class="row"> <div id="list" class="col-md-8 col-md-offset-2"> <form method="POST" action="waypoint.php"> <div class="form-group row"> <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Current Location</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-sm" name="waypoint" id="colFormLabelSm" placeholder="Current Location" required> </div> </div> <div class="form-group row"> <label for="colFormLabel" class="col-sm-2 col-form-label">Departure Date</label> <div class="col-sm-10"> <input type="text" class="form-control" id="colFormLabel" name="depart" placeholder="Date/Time" required> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Arrival Date</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-lg" name="arrival" id="colFormLabelLg" placeholder="Arrival/Status" required> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Shippment Status</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-lg" name="arrival" id="colFormLabelLg" placeholder="Arrival/Status" required> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Package Process Steps</label> <div class="col-sm-10"> <select class="form-control form-control-lg" name="steps"> <option value="step2.jpg">Step 2</option> <option value="step3.jpg">Step 3</option> </select> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Select Package Code</label> <div class="col-sm-10"> <select class="form-control form-control-lg" name="package"> <?php $sql="select * from package;"; $result=mysqli_query($conn, $sql); while($row = mysqli_fetch_assoc($result)) { echo "<option value=".$row['Code'].">".$row["Code"]."</option>"; } mysqli_close($conn); ?> </select> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Select Color</label> <div class="col-sm-10"> <select class="form-control form-control-lg" name="color"> <option value="">Default</option> <option value="red">Red</option> <option value="green">Green</option> </select> </div> </div> <div class="form-group row"> <div class="col-sm-10"> <input type="submit" class="btn btn-primary"> <input type="reset" class="btn btn-danger"> </div> </div> </form> </div><!-- /input-group --> </div> </div> </div> <script src="alertify/js/alertify.min.js"></script> <script> function validateForm(){ var val=document.getElementById("txtNewItem").value; if (val.length<5) { alertify.error("Item description must contains at least 20 characters"); return false; }else{ InsertItemInDatabase(); } } function validateEdit(desc){ var desc=document.getElementById("txtNewItem").value; if (desc.length<5) { alertify.error("Item description must contains at least 20 characters"); return false; }else{ return true; } } </script> <script> function InsertItemInDatabase() { //for spinner var buttonString= "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate' id='spinner'></span> "+$('#addButton').html(); $('#addButton').html(buttonString); var new_desc=document.getElementById("txtNewItem").value; document.getElementById("txtNewItem").value=""; $.ajax({ url:'process.php?insert_description=' + new_desc, complete: function (response) { var status = JSON.parse(response.responseText); // console.log(response); if(status.status =="success"){ alertify.success("New item has been added successfully"); }else if(status.status =="error"){ alertify.error("Error while adding the item"); } $( "#list" ).load( "list.php");// to reload the todo list from database $( "#spinner" ).remove();//remove spinner as task is completed }, error: function () { }, }); } //delete function DeleteItem(id) { alertify.confirm("Are you sure to delete this item?", function (e) { if (e) { //for spinner var buttonString= "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate' id='spinner'></span> "+$('#delete_'+id).html(); $('#delete_'+id).html(buttonString); $.ajax({ url:'process.php?delete_id=' + id, complete: function (response) { var status = JSON.parse(response.responseText);//parsing status from response received from php if(status.delete_status =="success"){ alertify.success("Item Deleted"); $( "#list" ).load( "list.php" );// to reload the todo list from database }else if(status.delete_status =="error"){ alertify.error("Error while deleting the item"); } }, error: function () { $('#output').html('Bummer: there was an error!'); }, }); } }); } //edit function EditItem(id) { $.ajax({ url:'process.php?edit_id=' + id, complete: function (response) { var status = JSON.parse(response.responseText);//parsing status from response received from php if(status.edit_status =="success"){ alertify.success("Item Deleted"); $( "#list" ).load( "list.php" );// to reload the todo list from database }else if(status.edit_status =="error"){ alertify.error("Error while deleting the item"); } }, error: function () { $('#output').html('Bummer: there was an error!'); }, }); } function checks(id,desc){ //var id= $(this).attr('id'); alertify.prompt("Edit List Item, ID="+id, function (e, str) { if (e) { if (str.length>20) { /*change on database if edited text is valid*/ //for spinner var buttonString= "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate' id='spinner'></span> "+$('#edit_'+id).html(); $('#edit_'+id).html(buttonString); $.ajax({ url:'process.php', data : {edit_id:id, new_desc:str}, complete: function (response) { var status = JSON.parse(response.responseText);//parsing status from response received from php if(status.edit_status =="success"){ alertify.success("Information updated successfully"); $( "#list" ).load( "list.php" );// to reload the todo list from database $( "#spinner" ).remove(); //remove spinner as task is completed }else if(status.edit_status =="error"){ alertify.error("Error while editing the item"); } }, error: function () { $('#output').html('Bummer: there was an error!'); }, }); //alertify.success("Valid"); /*--if valid ends*/ }else{ alertify.error("Item description must contains at least 20 characters. No changes has been made"); } } else { //alertify.error("You pressed cancel"); } }, desc); } </script> <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> </body> </body> </html>