Minimal Coming Soon & Maintenance Mode - Version 1.1.1

Version Description

Download this release

Release Info

Developer akshitsethi
Plugin Icon 128x128 Minimal Coming Soon & Maintenance Mode
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1.1

framework/admin/css/admin.css CHANGED
@@ -165,7 +165,7 @@
165
  background: #fff;
166
  border-top: 1px solid #eee;
167
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.05);
168
- z-index: 999999;
169
  }
170
  .signals-share a {
171
  display: inline-block;
@@ -174,6 +174,18 @@
174
  .signals-share a:last-child {
175
  margin-right: 0;
176
  }
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
  /* Forms */
179
 
@@ -311,6 +323,10 @@ textarea.signals-form-control {
311
  .signals-double-group:last-child {
312
  border: none;
313
  }
 
 
 
 
314
  .signals-double-group .signals-form-group {
315
  border-bottom: none;
316
  float: left;
165
  background: #fff;
166
  border-top: 1px solid #eee;
167
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.05);
168
+ z-index: 9999;
169
  }
170
  .signals-share a {
171
  display: inline-block;
174
  .signals-share a:last-child {
175
  margin-right: 0;
176
  }
177
+ .signals-elements {
178
+ border: 1px solid #f1f1f1;
179
+ padding: 10px 20px;
180
+ margin-bottom: 30px;
181
+ }
182
+ #arrange-items li {
183
+ background: #f3f3f3;
184
+ padding: 5px 15px;
185
+ font-weight: bold;
186
+ cursor: move;
187
+ cursor: -webkit-grabbing;
188
+ }
189
 
190
  /* Forms */
191
 
323
  .signals-double-group:last-child {
324
  border: none;
325
  }
326
+ .signals-double-group.no-border {
327
+ border-bottom: 0;
328
+ margin-bottom: 14px;
329
+ }
330
  .signals-double-group .signals-form-group {
331
  border-bottom: none;
332
  float: left;
framework/admin/include/classes/class-mailchimp.php CHANGED
@@ -10,14 +10,13 @@
10
  * @version 1.0
11
  */
12
 
13
- class MailChimp {
14
 
15
  private $api_key;
16
  private $api_endpoint = 'https://<dc>.api.mailchimp.com/2.0/';
17
  private $verify_ssl = false;
18
 
19
 
20
-
21
  /**
22
  * Create a new instance
23
  * @param string $api_key Your MailChimp API key
@@ -35,8 +34,6 @@ class MailChimp {
35
  }
36
 
37
 
38
-
39
-
40
  /**
41
  * Call an API method. Every request needs the API key, so that is added automatically -- you don't need to pass it in.
42
  * @param string $method The API method to call, e.g. 'lists/list'
@@ -51,8 +48,6 @@ class MailChimp {
51
  }
52
 
53
 
54
-
55
-
56
  /**
57
  * Performs the underlying HTTP request. Not very exciting
58
  * @param string $method The API method to be called
10
  * @version 1.0
11
  */
12
 
13
+ class Signals_MailChimp {
14
 
15
  private $api_key;
16
  private $api_endpoint = 'https://<dc>.api.mailchimp.com/2.0/';
17
  private $verify_ssl = false;
18
 
19
 
 
20
  /**
21
  * Create a new instance
22
  * @param string $api_key Your MailChimp API key
34
  }
35
 
36
 
 
 
37
  /**
38
  * Call an API method. Every request needs the API key, so that is added automatically -- you don't need to pass it in.
39
  * @param string $method The API method to call, e.g. 'lists/list'
48
  }
49
 
50
 
 
 
51
  /**
52
  * Performs the underlying HTTP request. Not very exciting
53
  * @param string $method The API method to be called
framework/admin/js/admin.js CHANGED
@@ -1,171 +1,97 @@
1
  /**
2
- * jQuery Cookie Plugin v1.3.1
 
3
  * https://github.com/carhartl/jquery-cookie
4
- *
5
- * Copyright 2013 Klaus Hartl
6
- * Released under the MIT license
7
  */
8
 
9
- (function (factory) {
10
- if (typeof define === 'function' && define.amd) {
11
- // AMD. Register as anonymous module.
12
- define(['jquery'], factory);
13
- } else {
14
- // Browser globals.
15
- factory(jQuery);
16
- }
17
- }(function ($) {
18
-
19
- var pluses = /\+/g;
20
-
21
- function raw(s) {
22
- return s;
23
- }
24
-
25
- function decoded(s) {
26
- return decodeURIComponent(s.replace(pluses, ' '));
27
- }
28
-
29
- function converted(s) {
30
- if (s.indexOf('"') === 0) {
31
- // This is a quoted cookie as according to RFC2068, unescape
32
- s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
33
- }
34
- try {
35
- return config.json ? JSON.parse(s) : s;
36
- } catch(er) {}
37
- }
38
-
39
- var config = $.cookie = function (key, value, options) {
40
-
41
- // write
42
- if (value !== undefined) {
43
- options = $.extend({}, config.defaults, options);
44
 
45
- if (typeof options.expires === 'number') {
46
- var days = options.expires, t = options.expires = new Date();
47
- t.setDate(t.getDate() + days);
48
- }
49
-
50
- value = config.json ? JSON.stringify(value) : String(value);
51
-
52
- return (document.cookie = [
53
- config.raw ? key : encodeURIComponent(key),
54
- '=',
55
- config.raw ? value : encodeURIComponent(value),
56
- options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
57
- options.path ? '; path=' + options.path : '',
58
- options.domain ? '; domain=' + options.domain : '',
59
- options.secure ? '; secure' : ''
60
- ].join(''));
61
- }
62
 
63
- // read
64
- var decode = config.raw ? raw : decoded;
65
- var cookies = document.cookie.split('; ');
66
- var result = key ? undefined : {};
67
- for (var i = 0, l = cookies.length; i < l; i++) {
68
- var parts = cookies[i].split('=');
69
- var name = decode(parts.shift());
70
- var cookie = decode(parts.join('='));
71
-
72
- if (key && key === name) {
73
- result = converted(cookie);
74
- break;
75
- }
76
 
77
- if (!key) {
78
- result[name] = converted(cookie);
79
- }
80
- }
81
 
82
- return result;
83
- };
84
 
85
- config.defaults = {};
 
 
 
 
86
 
87
- $.removeCookie = function (key, options) {
88
- if ($.cookie(key) !== undefined) {
89
- // Must not alter options, thus extending a fresh object...
90
- $.cookie(key, '', $.extend({}, options, { expires: -1 }));
91
- return true;
92
- }
93
- return false;
94
- };
95
 
96
- }));
97
 
98
  /**
99
- * jQuery blockUI plugin
100
- * Version 2.66.0-2013.10.09
101
- * Requires jQuery v1.7 or later
102
- *
103
- * Examples at: http://malsup.com/jquery/block/
104
- * Copyright (c) 2007-2013 M. Alsup
105
- * Dual licensed under the MIT and GPL licenses:
106
- * http://www.opensource.org/licenses/mit-license.php
107
- * http://www.gnu.org/licenses/gpl.html
108
- *
109
- * Thanks to Amir-Hossein Sobhi for some excellent contributions!
110
  */
111
 
112
- (function(){"use strict";function e(e){function a(i,a){var l,h;var m=i==window;var g=a&&a.message!==undefined?a.message:undefined;a=e.extend({},e.blockUI.defaults,a||{});if(a.ignoreIfBlocked&&e(i).data("blockUI.isBlocked"))return;a.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,a.overlayCSS||{});l=e.extend({},e.blockUI.defaults.css,a.css||{});if(a.onOverlayClick)a.overlayCSS.cursor="pointer";h=e.extend({},e.blockUI.defaults.themedCSS,a.themedCSS||{});g=g===undefined?a.message:g;if(m&&o)f(window,{fadeOut:0});if(g&&typeof g!="string"&&(g.parentNode||g.jquery)){var y=g.jquery?g[0]:g;var b={};e(i).data("blockUI.history",b);b.el=y;b.parent=y.parentNode;b.display=y.style.display;b.position=y.style.position;if(b.parent)b.parent.removeChild(y)}e(i).data("blockUI.onUnblock",a.onUnblock);var w=a.baseZ;var E,S,x,T;if(n||a.forceIframe)E=e('<iframe class="blockUI" style="z-index:'+w++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+a.iframeSrc+'"></iframe>');else E=e('<div class="blockUI" style="display:none"></div>');if(a.theme)S=e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+w++ +';display:none"></div>');else S=e('<div class="blockUI blockOverlay" style="z-index:'+w++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');if(a.theme&&m){T='<div class="blockUI '+a.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(w+10)+';display:none;position:fixed">';if(a.title){T+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(a.title||"&nbsp;")+"</div>"}T+='<div class="ui-widget-content ui-dialog-content"></div>';T+="</div>"}else if(a.theme){T='<div class="blockUI '+a.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(w+10)+';display:none;position:absolute">';if(a.title){T+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(a.title||"&nbsp;")+"</div>"}T+='<div class="ui-widget-content ui-dialog-content"></div>';T+="</div>"}else if(m){T='<div class="blockUI '+a.blockMsgClass+' blockPage" style="z-index:'+(w+10)+';display:none;position:fixed"></div>'}else{T='<div class="blockUI '+a.blockMsgClass+' blockElement" style="z-index:'+(w+10)+';display:none;position:absolute"></div>'}x=e(T);if(g){if(a.theme){x.css(h);x.addClass("ui-widget-content")}else x.css(l)}if(!a.theme)S.css(a.overlayCSS);S.css("position",m?"fixed":"absolute");if(n||a.forceIframe)E.css("opacity",0);var N=[E,S,x],C=m?e("body"):e(i);e.each(N,function(){this.appendTo(C)});if(a.theme&&a.draggable&&e.fn.draggable){x.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var k=s&&(!e.support.boxModel||e("object,embed",m?null:i).length>0);if(r||k){if(m&&a.allowBodyStretch&&e.support.boxModel)e("html,body").css("height","100%");if((r||!e.support.boxModel)&&!m){var L=v(i,"borderTopWidth"),A=v(i,"borderLeftWidth");var O=L?"(0 - "+L+")":0;var M=A?"(0 - "+A+")":0}e.each(N,function(e,t){var n=t[0].style;n.position="absolute";if(e<2){if(m)n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"');else n.setExpression("height",'this.parentNode.offsetHeight + "px"');if(m)n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');else n.setExpression("width",'this.parentNode.offsetWidth + "px"');if(M)n.setExpression("left",M);if(O)n.setExpression("top",O)}else if(a.centerY){if(m)n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');n.marginTop=0}else if(!a.centerY&&m){var r=a.css&&a.css.top?parseInt(a.css.top,10):0;var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}if(g){if(a.theme)x.find(".ui-widget-content").append(g);else x.append(g);if(g.jquery||g.nodeType)e(g).show()}if((n||a.forceIframe)&&a.showOverlay)E.show();if(a.fadeIn){var _=a.onBlock?a.onBlock:t;var D=a.showOverlay&&!g?_:t;var P=g?_:t;if(a.showOverlay)S._fadeIn(a.fadeIn,D);if(g)x._fadeIn(a.fadeIn,P)}else{if(a.showOverlay)S.show();if(g)x.show();if(a.onBlock)a.onBlock()}c(1,i,a);if(m){o=x[0];u=e(a.focusableElements,o);if(a.focusInput)setTimeout(p,20)}else d(x[0],a.centerX,a.centerY);if(a.timeout){var H=setTimeout(function(){if(m)e.unblockUI(a);else e(i).unblock(a)},a.timeout);e(i).data("blockUI.timeout",H)}}function f(t,n){var r;var i=t==window;var s=e(t);var a=s.data("blockUI.history");var f=s.data("blockUI.timeout");if(f){clearTimeout(f);s.removeData("blockUI.timeout")}n=e.extend({},e.blockUI.defaults,n||{});c(0,t,n);if(n.onUnblock===null){n.onUnblock=s.data("blockUI.onUnblock");s.removeData("blockUI.onUnblock")}var h;if(i)h=e("body").children().filter(".blockUI").add("body > .blockUI");else h=s.find(">.blockUI");if(n.cursorReset){if(h.length>1)h[1].style.cursor=n.cursorReset;if(h.length>2)h[2].style.cursor=n.cursorReset}if(i)o=u=null;if(n.fadeOut){r=h.length;h.stop().fadeOut(n.fadeOut,function(){if(--r===0)l(h,a,n,t)})}else l(h,a,n,t)}function l(t,n,r,i){var s=e(i);if(s.data("blockUI.isBlocked"))return;t.each(function(e,t){if(this.parentNode)this.parentNode.removeChild(this)});if(n&&n.el){n.el.style.display=n.display;n.el.style.position=n.position;if(n.parent)n.parent.appendChild(n.el);s.removeData("blockUI.history")}if(s.data("blockUI.static")){s.css("position","static")}if(typeof r.onUnblock=="function")r.onUnblock(i,r);var o=e(document.body),u=o.width(),a=o[0].style.width;o.width(u-1).width(u);o[0].style.width=a}function c(t,n,r){var i=n==window,s=e(n);if(!t&&(i&&!o||!i&&!s.data("blockUI.isBlocked")))return;s.data("blockUI.isBlocked",t);if(!i||!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";if(t)e(document).bind(u,r,h);else e(document).unbind(u,h)}function h(t){if(t.type==="keydown"&&t.keyCode&&t.keyCode==9){if(o&&t.data.constrainTabKey){var n=u;var r=!t.shiftKey&&t.target===n[n.length-1];var i=t.shiftKey&&t.target===n[0];if(r||i){setTimeout(function(){p(i)},10);return false}}}var s=t.data;var a=e(t.target);if(a.hasClass("blockOverlay")&&s.onOverlayClick)s.onOverlayClick(t);if(a.parents("div."+s.blockMsgClass).length>0)return true;return a.parents().children().filter("div.blockUI").length===0}function p(e){if(!u)return;var t=u[e===true?u.length-1:0];if(t)t.focus()}function d(e,t,n){var r=e.parentNode,i=e.style;var s=(r.offsetWidth-e.offsetWidth)/2-v(r,"borderLeftWidth");var o=(r.offsetHeight-e.offsetHeight)/2-v(r,"borderTopWidth");if(t)i.left=s>0?s+"px":"0";if(n)i.top=o>0?o+"px":"0"}function v(t,n){return parseInt(e.css(t,n),10)||0}e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){};var n=/MSIE/.test(navigator.userAgent);var r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent);var i=document.documentMode||0;var s=e.isFunction(document.createElement("div").style.setExpression);e.blockUI=function(e){a(window,e)};e.unblockUI=function(e){f(window,e)};e.growlUI=function(t,n,r,i){var s=e('<div class="growlUI"></div>');if(t)s.append("<h1>"+t+"</h1>");if(n)s.append("<h2>"+n+"</h2>");if(r===undefined)r=3e3;var o=function(t){t=t||{};e.blockUI({message:s,fadeIn:typeof t.fadeIn!=="undefined"?t.fadeIn:700,fadeOut:typeof t.fadeOut!=="undefined"?t.fadeOut:1e3,timeout:typeof t.timeout!=="undefined"?t.timeout:r,centerY:false,showOverlay:false,onUnblock:i,css:e.blockUI.defaults.growlCSS})};o();var u=s.css("opacity");s.mouseover(function(){o({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop();t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})};e.fn.block=function(t){if(this[0]===window){e.blockUI(t);return this}var n=e.extend({},e.blockUI.defaults,t||{});this.each(function(){var t=e(this);if(n.ignoreIfBlocked&&t.data("blockUI.isBlocked"))return;t.unblock({fadeOut:0})});return this.each(function(){if(e.css(this,"position")=="static"){this.style.position="relative";e(this).data("blockUI.static",true)}this.style.zoom=1;a(this,t)})};e.fn.unblock=function(t){if(this[0]===window){e.unblockUI(t);return this}return this.each(function(){f(this,t)})};e.blockUI.version=2.66;e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#fff",border:"1px solid #ff0000",backgroundColor:"#ff0000",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#fff",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1e3,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:false};var o=null;var u=[]}if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],e)}else{e(jQuery)}})();
 
113
 
114
  /**
115
- * switch.js
116
- * ios style switch boxes
 
117
  */
118
 
119
- (function(){function require(path,parent,orig){var resolved=require.resolve(path);if(null==resolved){orig=orig||path;parent=parent||"root";var err=new Error('Failed to require "'+orig+'" from "'+parent+'"');err.path=orig;err.parent=parent;err.require=true;throw err}var module=require.modules[resolved];if(!module._resolving&&!module.exports){var mod={};mod.exports={};mod.client=mod.component=true;module._resolving=true;module.call(this,mod.exports,require.relative(resolved),mod);delete module._resolving;module.exports=mod.exports}return module.exports}require.modules={};require.aliases={};require.resolve=function(path){if(path.charAt(0)==="/")path=path.slice(1);var paths=[path,path+".js",path+".json",path+"/index.js",path+"/index.json"];for(var i=0;i<paths.length;i++){var path=paths[i];if(require.modules.hasOwnProperty(path))return path;if(require.aliases.hasOwnProperty(path))return require.aliases[path]}};require.normalize=function(curr,path){var segs=[];if("."!=path.charAt(0))return path;curr=curr.split("/");path=path.split("/");for(var i=0;i<path.length;++i){if(".."==path[i]){curr.pop()}else if("."!=path[i]&&""!=path[i]){segs.push(path[i])}}return curr.concat(segs).join("/")};require.register=function(path,definition){require.modules[path]=definition};require.alias=function(from,to){if(!require.modules.hasOwnProperty(from)){throw new Error('Failed to alias "'+from+'", it does not exist')}require.aliases[to]=from};require.relative=function(parent){var p=require.normalize(parent,"..");function lastIndexOf(arr,obj){var i=arr.length;while(i--){if(arr[i]===obj)return i}return-1}function localRequire(path){var resolved=localRequire.resolve(path);return require(resolved,parent,path)}localRequire.resolve=function(path){var c=path.charAt(0);if("/"==c)return path.slice(1);if("."==c)return require.normalize(p,path);var segs=parent.split("/");var i=lastIndexOf(segs,"deps")+1;if(!i)i=0;path=segs.slice(0,i+1).join("/")+"/deps/"+path;return path};localRequire.exists=function(path){return require.modules.hasOwnProperty(localRequire.resolve(path))};return localRequire};require.register("abpetkov-transitionize/transitionize.js",function(exports,require,module){module.exports=Transitionize;function Transitionize(element,props){if(!(this instanceof Transitionize))return new Transitionize(element,props);this.element=element;this.props=props||{};this.init()}Transitionize.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)};Transitionize.prototype.init=function(){var transitions=[];for(var key in this.props){transitions.push(key+" "+this.props[key])}this.element.style.transition=transitions.join(", ");if(this.isSafari())this.element.style.webkitTransition=transitions.join(", ")}});require.register("ftlabs-fastclick/lib/fastclick.js",function(exports,require,module){function FastClick(layer){"use strict";var oldOnClick,self=this;this.trackingClick=false;this.trackingClickStart=0;this.targetElement=null;this.touchStartX=0;this.touchStartY=0;this.lastTouchIdentifier=0;this.touchBoundary=10;this.layer=layer;if(!layer||!layer.nodeType){throw new TypeError("Layer must be a document node")}this.onClick=function(){return FastClick.prototype.onClick.apply(self,arguments)};this.onMouse=function(){return FastClick.prototype.onMouse.apply(self,arguments)};this.onTouchStart=function(){return FastClick.prototype.onTouchStart.apply(self,arguments)};this.onTouchMove=function(){return FastClick.prototype.onTouchMove.apply(self,arguments)};this.onTouchEnd=function(){return FastClick.prototype.onTouchEnd.apply(self,arguments)};this.onTouchCancel=function(){return FastClick.prototype.onTouchCancel.apply(self,arguments)};if(FastClick.notNeeded(layer)){return}if(this.deviceIsAndroid){layer.addEventListener("mouseover",this.onMouse,true);layer.addEventListener("mousedown",this.onMouse,true);layer.addEventListener("mouseup",this.onMouse,true)}layer.addEventListener("click",this.onClick,true);layer.addEventListener("touchstart",this.onTouchStart,false);layer.addEventListener("touchmove",this.onTouchMove,false);layer.addEventListener("touchend",this.onTouchEnd,false);layer.addEventListener("touchcancel",this.onTouchCancel,false);if(!Event.prototype.stopImmediatePropagation){layer.removeEventListener=function(type,callback,capture){var rmv=Node.prototype.removeEventListener;if(type==="click"){rmv.call(layer,type,callback.hijacked||callback,capture)}else{rmv.call(layer,type,callback,capture)}};layer.addEventListener=function(type,callback,capture){var adv=Node.prototype.addEventListener;if(type==="click"){adv.call(layer,type,callback.hijacked||(callback.hijacked=function(event){if(!event.propagationStopped){callback(event)}}),capture)}else{adv.call(layer,type,callback,capture)}}}if(typeof layer.onclick==="function"){oldOnClick=layer.onclick;layer.addEventListener("click",function(event){oldOnClick(event)},false);layer.onclick=null}}FastClick.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0;FastClick.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent);FastClick.prototype.deviceIsIOS4=FastClick.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent);FastClick.prototype.deviceIsIOSWithBadTarget=FastClick.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(target){"use strict";switch(target.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(target.disabled){return true}break;case"input":if(this.deviceIsIOS&&target.type==="file"||target.disabled){return true}break;case"label":case"video":return true}return/\bneedsclick\b/.test(target.className)};FastClick.prototype.needsFocus=function(target){"use strict";switch(target.nodeName.toLowerCase()){case"textarea":return true;case"select":return!this.deviceIsAndroid;case"input":switch(target.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return false}return!target.disabled&&!target.readOnly;default:return/\bneedsfocus\b/.test(target.className)}};FastClick.prototype.sendClick=function(targetElement,event){"use strict";var clickEvent,touch;if(document.activeElement&&document.activeElement!==targetElement){document.activeElement.blur()}touch=event.changedTouches[0];clickEvent=document.createEvent("MouseEvents");clickEvent.initMouseEvent(this.determineEventType(targetElement),true,true,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,false,false,false,false,0,null);clickEvent.forwardedTouchEvent=true;targetElement.dispatchEvent(clickEvent)};FastClick.prototype.determineEventType=function(targetElement){"use strict";if(this.deviceIsAndroid&&targetElement.tagName.toLowerCase()==="select"){return"mousedown"}return"click"};FastClick.prototype.focus=function(targetElement){"use strict";var length;if(this.deviceIsIOS&&targetElement.setSelectionRange&&targetElement.type.indexOf("date")!==0&&targetElement.type!=="time"){length=targetElement.value.length;targetElement.setSelectionRange(length,length)}else{targetElement.focus()}};FastClick.prototype.updateScrollParent=function(targetElement){"use strict";var scrollParent,parentElement;scrollParent=targetElement.fastClickScrollParent;if(!scrollParent||!scrollParent.contains(targetElement)){parentElement=targetElement;do{if(parentElement.scrollHeight>parentElement.offsetHeight){scrollParent=parentElement;targetElement.fastClickScrollParent=parentElement;break}parentElement=parentElement.parentElement}while(parentElement)}if(scrollParent){scrollParent.fastClickLastScrollTop=scrollParent.scrollTop}};FastClick.prototype.getTargetElementFromEventTarget=function(eventTarget){"use strict";if(eventTarget.nodeType===Node.TEXT_NODE){return eventTarget.parentNode}return eventTarget};FastClick.prototype.onTouchStart=function(event){"use strict";var targetElement,touch,selection;if(event.targetTouches.length>1){return true}targetElement=this.getTargetElementFromEventTarget(event.target);touch=event.targetTouches[0];if(this.deviceIsIOS){selection=window.getSelection();if(selection.rangeCount&&!selection.isCollapsed){return true}if(!this.deviceIsIOS4){if(touch.identifier===this.lastTouchIdentifier){event.preventDefault();return false}this.lastTouchIdentifier=touch.identifier;this.updateScrollParent(targetElement)}}this.trackingClick=true;this.trackingClickStart=event.timeStamp;this.targetElement=targetElement;this.touchStartX=touch.pageX;this.touchStartY=touch.pageY;if(event.timeStamp-this.lastClickTime<200){event.preventDefault()}return true};FastClick.prototype.touchHasMoved=function(event){"use strict";var touch=event.changedTouches[0],boundary=this.touchBoundary;if(Math.abs(touch.pageX-this.touchStartX)>boundary||Math.abs(touch.pageY-this.touchStartY)>boundary){return true}return false};FastClick.prototype.onTouchMove=function(event){"use strict";if(!this.trackingClick){return true}if(this.targetElement!==this.getTargetElementFromEventTarget(event.target)||this.touchHasMoved(event)){this.trackingClick=false;this.targetElement=null}return true};FastClick.prototype.findControl=function(labelElement){"use strict";if(labelElement.control!==undefined){return labelElement.control}if(labelElement.htmlFor){return document.getElementById(labelElement.htmlFor)}return labelElement.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};FastClick.prototype.onTouchEnd=function(event){"use strict";var forElement,trackingClickStart,targetTagName,scrollParent,touch,targetElement=this.targetElement;if(!this.trackingClick){return true}if(event.timeStamp-this.lastClickTime<200){this.cancelNextClick=true;return true}this.cancelNextClick=false;this.lastClickTime=event.timeStamp;trackingClickStart=this.trackingClickStart;this.trackingClick=false;this.trackingClickStart=0;if(this.deviceIsIOSWithBadTarget){touch=event.changedTouches[0];targetElement=document.elementFromPoint(touch.pageX-window.pageXOffset,touch.pageY-window.pageYOffset)||targetElement;targetElement.fastClickScrollParent=this.targetElement.fastClickScrollParent}targetTagName=targetElement.tagName.toLowerCase();if(targetTagName==="label"){forElement=this.findControl(targetElement);if(forElement){this.focus(targetElement);if(this.deviceIsAndroid){return false}targetElement=forElement}}else if(this.needsFocus(targetElement)){if(event.timeStamp-trackingClickStart>100||this.deviceIsIOS&&window.top!==window&&targetTagName==="input"){this.targetElement=null;return false}this.focus(targetElement);if(!this.deviceIsIOS4||targetTagName!=="select"){this.targetElement=null;event.preventDefault()}return false}if(this.deviceIsIOS&&!this.deviceIsIOS4){scrollParent=targetElement.fastClickScrollParent;if(scrollParent&&scrollParent.fastClickLastScrollTop!==scrollParent.scrollTop){return true}}if(!this.needsClick(targetElement)){event.preventDefault();this.sendClick(targetElement,event)}return false};FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=false;this.targetElement=null};FastClick.prototype.onMouse=function(event){"use strict";if(!this.targetElement){return true}if(event.forwardedTouchEvent){return true}if(!event.cancelable){return true}if(!this.needsClick(this.targetElement)||this.cancelNextClick){if(event.stopImmediatePropagation){event.stopImmediatePropagation()}else{event.propagationStopped=true}event.stopPropagation();event.preventDefault();return false}return true};FastClick.prototype.onClick=function(event){"use strict";var permitted;if(this.trackingClick){this.targetElement=null;this.trackingClick=false;return true}if(event.target.type==="submit"&&event.detail===0){return true}permitted=this.onMouse(event);if(!permitted){this.targetElement=null}return permitted};FastClick.prototype.destroy=function(){"use strict";var layer=this.layer;if(this.deviceIsAndroid){layer.removeEventListener("mouseover",this.onMouse,true);layer.removeEventListener("mousedown",this.onMouse,true);layer.removeEventListener("mouseup",this.onMouse,true)}layer.removeEventListener("click",this.onClick,true);layer.removeEventListener("touchstart",this.onTouchStart,false);layer.removeEventListener("touchmove",this.onTouchMove,false);layer.removeEventListener("touchend",this.onTouchEnd,false);layer.removeEventListener("touchcancel",this.onTouchCancel,false)};FastClick.notNeeded=function(layer){"use strict";var metaViewport;var chromeVersion;if(typeof window.ontouchstart==="undefined"){return true}chromeVersion=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1];if(chromeVersion){if(FastClick.prototype.deviceIsAndroid){metaViewport=document.querySelector("meta[name=viewport]");if(metaViewport){if(metaViewport.content.indexOf("user-scalable=no")!==-1){return true}if(chromeVersion>31&&window.innerWidth<=window.screen.width){return true}}}else{return true}}if(layer.style.msTouchAction==="none"){return true}return false};FastClick.attach=function(layer){"use strict";return new FastClick(layer)};if(typeof define!=="undefined"&&define.amd){define(function(){"use strict";return FastClick})}else if(typeof module!=="undefined"&&module.exports){module.exports=FastClick.attach;module.exports.FastClick=FastClick}else{window.FastClick=FastClick}});require.register("switchery/switchery.js",function(exports,require,module){var transitionize=require("transitionize"),fastclick=require("fastclick");module.exports=Switchery;var defaults={color:"#64bd63",secondaryColor:"#dfdfdf",className:"switchery",disabled:false,disabledOpacity:.5,speed:"0.4s"};function Switchery(element,options){if(!(this instanceof Switchery))return new Switchery(element,options);this.element=element;this.options=options||{};for(var i in defaults){if(this.options[i]==null){this.options[i]=defaults[i]}}if(this.element!=null&&this.element.type=="checkbox")this.init()}Switchery.prototype.hide=function(){this.element.style.display="none"};Switchery.prototype.show=function(){var switcher=this.create();this.insertAfter(this.element,switcher)};Switchery.prototype.create=function(){this.switcher=document.createElement("span");this.jack=document.createElement("small");this.switcher.appendChild(this.jack);this.switcher.className=this.options.className;return this.switcher};Switchery.prototype.insertAfter=function(reference,target){reference.parentNode.insertBefore(target,reference.nextSibling)};Switchery.prototype.isChecked=function(){return this.element.checked};Switchery.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled};Switchery.prototype.setPosition=function(clicked){var checked=this.isChecked(),switcher=this.switcher,jack=this.jack;if(clicked&&checked)checked=false;else if(clicked&&!checked)checked=true;if(checked===true){this.element.checked=true;if(window.getComputedStyle)jack.style.left=parseInt(window.getComputedStyle(switcher).width)-parseInt(window.getComputedStyle(jack).width)+"px";else jack.style.left=parseInt(switcher.currentStyle["width"])-parseInt(jack.currentStyle["width"])+"px";if(this.options.color)this.colorize();this.setSpeed()}else{jack.style.left=0;this.element.checked=false;this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor;this.switcher.style.borderColor=this.options.secondaryColor;this.switcher.style.backgroundColor=this.options.secondaryColor!==defaults.secondaryColor?this.options.secondaryColor:"#fff";this.setSpeed()}};Switchery.prototype.setSpeed=function(){var switcherProp={},jackProp={left:this.options.speed.replace(/[a-z]/,"")/2+"s"};if(this.isChecked()){switcherProp={border:this.options.speed,"box-shadow":this.options.speed,"background-color":this.options.speed.replace(/[a-z]/,"")*3+"s"}}else{switcherProp={border:this.options.speed,"box-shadow":this.options.speed}}transitionize(this.switcher,switcherProp);transitionize(this.jack,jackProp)};Switchery.prototype.colorize=function(){this.switcher.style.backgroundColor=this.options.color;this.switcher.style.borderColor=this.options.color;this.switcher.style.boxShadow="inset 0 0 0 16px "+this.options.color};Switchery.prototype.handleOnchange=function(state){if(typeof Event==="function"||!document.fireEvent){var event=document.createEvent("HTMLEvents");event.initEvent("change",true,true);this.element.dispatchEvent(event)}else{this.element.fireEvent("onchange")}};Switchery.prototype.handleChange=function(){var self=this,el=this.element;if(el.addEventListener){el.addEventListener("change",function(){self.setPosition()})}else{el.attachEvent("onchange",function(){self.setPosition()})}};Switchery.prototype.handleClick=function(){var self=this,switcher=this.switcher,parent=self.element.parentNode.tagName.toLowerCase(),labelParent=parent==="label"?false:true;if(this.isDisabled()===false){fastclick(switcher);if(switcher.addEventListener){switcher.addEventListener("click",function(){self.setPosition(labelParent);self.handleOnchange(self.element.checked)})}else{switcher.attachEvent("onclick",function(){self.setPosition(labelParent);self.handleOnchange(self.element.checked)})}}else{this.element.disabled=true;this.switcher.style.opacity=this.options.disabledOpacity}};Switchery.prototype.markAsSwitched=function(){this.element.setAttribute("data-switchery",true)};Switchery.prototype.markedAsSwitched=function(){return this.element.getAttribute("data-switchery")};Switchery.prototype.init=function(){this.hide();this.show();this.setPosition();this.markAsSwitched();this.handleChange();this.handleClick()}});require.alias("abpetkov-transitionize/transitionize.js","switchery/deps/transitionize/transitionize.js");require.alias("abpetkov-transitionize/transitionize.js","switchery/deps/transitionize/index.js");require.alias("abpetkov-transitionize/transitionize.js","transitionize/index.js");require.alias("abpetkov-transitionize/transitionize.js","abpetkov-transitionize/index.js");require.alias("ftlabs-fastclick/lib/fastclick.js","switchery/deps/fastclick/lib/fastclick.js");require.alias("ftlabs-fastclick/lib/fastclick.js","switchery/deps/fastclick/index.js");require.alias("ftlabs-fastclick/lib/fastclick.js","fastclick/index.js");require.alias("ftlabs-fastclick/lib/fastclick.js","ftlabs-fastclick/index.js");require.alias("switchery/switchery.js","switchery/index.js");if(typeof exports=="object"){module.exports=require("switchery")}else if(typeof define=="function"&&define.amd){define(function(){return require("switchery")})}else{this["Switchery"]=require("switchery")}})();
120
 
121
- /* custom javascript */
 
 
 
 
122
 
123
- function reloadFont( $fontValue ) {
124
- WebFont.load( {
125
- google: {
126
- families: [$fontValue]
127
- }
128
- } );
129
  }
130
 
131
  function changeFont( $font ) {
132
- var $fontValue = $font.val();
133
 
134
- reloadFont( $fontValue );
135
- $font.parent().find( 'h3' ).css( 'font-family', $fontValue );
 
 
 
136
  }
137
 
138
  // upload function
139
  function getUploader( $text, $target ) {
140
- var custom_uploader;
141
 
142
- // If the uploader object has already been created, reopen the dialog
143
- if( custom_uploader ) {
144
- custom_uploader.open();
145
- return;
146
- }
147
 
148
- // Extend the wp.media object
149
- custom_uploader = wp.media.frames.file_frame = wp.media( {
150
- title: $text,
151
- button: {
152
- text: $text
153
- },
154
- multiple: false
155
- } );
156
 
157
- // When a file is selected, grab the URL and set it as the text field's value
158
- custom_uploader.on( 'select', function() {
159
- var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
 
 
 
 
 
160
 
161
- $target.parent().find( 'input' ).val( attachment.url );
162
- $target.parent().find( '.signals-preview-area' ).html( '<img src="' + attachment.url + '" />' );
163
- $target.parent().find( '.signals-upload-append' ).html( '&nbsp;<a href="javascript: void(0);" class="signals-remove-image">Remove</a>' );
164
 
165
- } );
 
 
 
 
 
 
 
166
 
167
- // Open the uploader dialog
168
- custom_uploader.open();
169
  }
170
 
171
  (function( $ ) {
@@ -174,6 +100,7 @@ function getUploader( $text, $target ) {
174
 
175
  // css and html editor
176
  function getEditor( $editorID, $textareaID, $mode ) {
 
177
  if( $( '#' + $editorID ).length > 0 ) {
178
  var editor = ace.edit( $editorID ),
179
  $textarea = $( '#' + $textareaID ).hide();
@@ -192,21 +119,26 @@ function getUploader( $text, $target ) {
192
 
193
  editor.session.setUseSoftTabs( null );
194
  }
 
195
  }
196
 
197
  // WP native uploader
198
  $( document ).on( 'click', '.signals-upload', function( e ) {
 
199
  e.preventDefault();
200
  getUploader( 'Select Image', $( this ) );
 
201
  } );
202
 
203
  // Removing photo from the canvas and emptying the text field
204
  $( document ).on( 'click', '.signals-remove-image', function( e ) {
 
205
  e.preventDefault();
206
 
207
  $( this ).parent().parent().find( 'input' ).val( '' );
208
  $( this ).parent().parent().find( '.signals-preview-area' ).html( 'Select or upload via WP native uploader' );
209
  $( this ).hide();
 
210
  } );
211
 
212
  // on dom ready
@@ -214,27 +146,49 @@ function getUploader( $text, $target ) {
214
 
215
  // google fonts
216
  $( '.signals-google-fonts' ).each( function() {
 
217
  var $font = $( this );
218
  changeFont( $font );
 
219
  } );
220
 
221
  $( document ).on( 'change', '.signals-google-fonts', function() {
 
222
  var $font = $( this );
223
  changeFont( $font );
 
224
  } );
225
 
226
  // ios switches
227
  var elements = Array.prototype.slice.call(document.querySelectorAll('.signals-form-ios'));
228
  elements.forEach(function(html) {
229
- var switchery = new Switchery(html);
230
  });
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  // css and html editor
233
  getEditor( 'signals_csmm_html_editor', 'signals_csmm_html', 'html' );
234
  getEditor( 'signals_csmm_css_editor', 'signals_csmm_css', 'css' );
235
 
236
  // support ticket
237
  $( document).on( 'click', '.signals-create-ticket', function(e) {
 
238
  e.preventDefault();
239
 
240
  var html = $( '.signals-ajax-response' );
@@ -283,6 +237,7 @@ function getUploader( $text, $target ) {
283
  }
284
 
285
  $( '.signals-main-menu li a' ).click( function(e) {
 
286
  e.preventDefault();
287
 
288
  $.removeCookie( 'signals_csmm_menu', { path: '/' } );
@@ -296,11 +251,13 @@ function getUploader( $text, $target ) {
296
  $( '.signals-tile' ).hide();
297
  $( $tab ).fadeIn();
298
  $.cookie( 'signals_csmm_menu', $tab, { path: '/' } );
 
299
  } );
300
 
301
  $( '.signals-mobile-menu a' ).click( function() {
302
  $( '.signals-main-menu' ).slideToggle();
303
  } );
 
304
  } );
305
 
306
- })( jQuery );
1
  /**
2
+ * Jquery Cookie v1.3.1
3
+ * -----------------------------------------------------
4
  * https://github.com/carhartl/jquery-cookie
 
 
 
5
  */
6
 
7
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function n(e){return e}function o(e){return decodeURIComponent(e.replace(t," "))}function i(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return r.json?JSON.parse(e):e}catch(n){}}var t=/\+/g,r=e.cookie=function(t,c,a){if(void 0!==c){if(a=e.extend({},r.defaults,a),"number"==typeof a.expires){var u=a.expires,f=a.expires=new Date;f.setDate(f.getDate()+u)}return c=r.json?JSON.stringify(c):String(c),document.cookie=[r.raw?t:encodeURIComponent(t),"=",r.raw?c:encodeURIComponent(c),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}for(var d=r.raw?n:o,p=document.cookie.split("; "),s=t?void 0:{},m=0,x=p.length;x>m;m++){var l=p[m].split("="),g=d(l.shift()),v=d(l.join("="));if(t&&t===g){s=i(v);break}t||(s[g]=i(v))}return s};r.defaults={},e.removeCookie=function(n,o){return void 0!==e.cookie(n)?(e.cookie(n,"",e.extend({},o,{expires:-1})),!0):!1}});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
+ /**
11
+ * Jquery blockUI v2.66
12
+ * -----------------------------------------------------
13
+ * http://malsup.com/jquery/block/
14
+ */
 
 
 
 
 
 
 
 
15
 
16
+ (function(){"use strict";function e(e){function a(i,a){var l,h;var m=i==window;var g=a&&a.message!==undefined?a.message:undefined;a=e.extend({},e.blockUI.defaults,a||{});if(a.ignoreIfBlocked&&e(i).data("blockUI.isBlocked"))return;a.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,a.overlayCSS||{});l=e.extend({},e.blockUI.defaults.css,a.css||{});if(a.onOverlayClick)a.overlayCSS.cursor="pointer";h=e.extend({},e.blockUI.defaults.themedCSS,a.themedCSS||{});g=g===undefined?a.message:g;if(m&&o)f(window,{fadeOut:0});if(g&&typeof g!="string"&&(g.parentNode||g.jquery)){var y=g.jquery?g[0]:g;var b={};e(i).data("blockUI.history",b);b.el=y;b.parent=y.parentNode;b.display=y.style.display;b.position=y.style.position;if(b.parent)b.parent.removeChild(y)}e(i).data("blockUI.onUnblock",a.onUnblock);var w=a.baseZ;var E,S,x,T;if(n||a.forceIframe)E=e('<iframe class="blockUI" style="z-index:'+w++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+a.iframeSrc+'"></iframe>');else E=e('<div class="blockUI" style="display:none"></div>');if(a.theme)S=e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+w++ +';display:none"></div>');else S=e('<div class="blockUI blockOverlay" style="z-index:'+w++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');if(a.theme&&m){T='<div class="blockUI '+a.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(w+10)+';display:none;position:fixed">';if(a.title){T+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(a.title||"&nbsp;")+"</div>"}T+='<div class="ui-widget-content ui-dialog-content"></div>';T+="</div>"}else if(a.theme){T='<div class="blockUI '+a.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(w+10)+';display:none;position:absolute">';if(a.title){T+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(a.title||"&nbsp;")+"</div>"}T+='<div class="ui-widget-content ui-dialog-content"></div>';T+="</div>"}else if(m){T='<div class="blockUI '+a.blockMsgClass+' blockPage" style="z-index:'+(w+10)+';display:none;position:fixed"></div>'}else{T='<div class="blockUI '+a.blockMsgClass+' blockElement" style="z-index:'+(w+10)+';display:none;position:absolute"></div>'}x=e(T);if(g){if(a.theme){x.css(h);x.addClass("ui-widget-content")}else x.css(l)}if(!a.theme)S.css(a.overlayCSS);S.css("position",m?"fixed":"absolute");if(n||a.forceIframe)E.css("opacity",0);var N=[E,S,x],C=m?e("body"):e(i);e.each(N,function(){this.appendTo(C)});if(a.theme&&a.draggable&&e.fn.draggable){x.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var k=s&&(!e.support.boxModel||e("object,embed",m?null:i).length>0);if(r||k){if(m&&a.allowBodyStretch&&e.support.boxModel)e("html,body").css("height","100%");if((r||!e.support.boxModel)&&!m){var L=v(i,"borderTopWidth"),A=v(i,"borderLeftWidth");var O=L?"(0 - "+L+")":0;var M=A?"(0 - "+A+")":0}e.each(N,function(e,t){var n=t[0].style;n.position="absolute";if(e<2){if(m)n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"');else n.setExpression("height",'this.parentNode.offsetHeight + "px"');if(m)n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');else n.setExpression("width",'this.parentNode.offsetWidth + "px"');if(M)n.setExpression("left",M);if(O)n.setExpression("top",O)}else if(a.centerY){if(m)n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');n.marginTop=0}else if(!a.centerY&&m){var r=a.css&&a.css.top?parseInt(a.css.top,10):0;var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}if(g){if(a.theme)x.find(".ui-widget-content").append(g);else x.append(g);if(g.jquery||g.nodeType)e(g).show()}if((n||a.forceIframe)&&a.showOverlay)E.show();if(a.fadeIn){var _=a.onBlock?a.onBlock:t;var D=a.showOverlay&&!g?_:t;var P=g?_:t;if(a.showOverlay)S._fadeIn(a.fadeIn,D);if(g)x._fadeIn(a.fadeIn,P)}else{if(a.showOverlay)S.show();if(g)x.show();if(a.onBlock)a.onBlock()}c(1,i,a);if(m){o=x[0];u=e(a.focusableElements,o);if(a.focusInput)setTimeout(p,20)}else d(x[0],a.centerX,a.centerY);if(a.timeout){var H=setTimeout(function(){if(m)e.unblockUI(a);else e(i).unblock(a)},a.timeout);e(i).data("blockUI.timeout",H)}}function f(t,n){var r;var i=t==window;var s=e(t);var a=s.data("blockUI.history");var f=s.data("blockUI.timeout");if(f){clearTimeout(f);s.removeData("blockUI.timeout")}n=e.extend({},e.blockUI.defaults,n||{});c(0,t,n);if(n.onUnblock===null){n.onUnblock=s.data("blockUI.onUnblock");s.removeData("blockUI.onUnblock")}var h;if(i)h=e("body").children().filter(".blockUI").add("body > .blockUI");else h=s.find(">.blockUI");if(n.cursorReset){if(h.length>1)h[1].style.cursor=n.cursorReset;if(h.length>2)h[2].style.cursor=n.cursorReset}if(i)o=u=null;if(n.fadeOut){r=h.length;h.stop().fadeOut(n.fadeOut,function(){if(--r===0)l(h,a,n,t)})}else l(h,a,n,t)}function l(t,n,r,i){var s=e(i);if(s.data("blockUI.isBlocked"))return;t.each(function(e,t){if(this.parentNode)this.parentNode.removeChild(this)});if(n&&n.el){n.el.style.display=n.display;n.el.style.position=n.position;if(n.parent)n.parent.appendChild(n.el);s.removeData("blockUI.history")}if(s.data("blockUI.static")){s.css("position","static")}if(typeof r.onUnblock=="function")r.onUnblock(i,r);var o=e(document.body),u=o.width(),a=o[0].style.width;o.width(u-1).width(u);o[0].style.width=a}function c(t,n,r){var i=n==window,s=e(n);if(!t&&(i&&!o||!i&&!s.data("blockUI.isBlocked")))return;s.data("blockUI.isBlocked",t);if(!i||!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";if(t)e(document).bind(u,r,h);else e(document).unbind(u,h)}function h(t){if(t.type==="keydown"&&t.keyCode&&t.keyCode==9){if(o&&t.data.constrainTabKey){var n=u;var r=!t.shiftKey&&t.target===n[n.length-1];var i=t.shiftKey&&t.target===n[0];if(r||i){setTimeout(function(){p(i)},10);return false}}}var s=t.data;var a=e(t.target);if(a.hasClass("blockOverlay")&&s.onOverlayClick)s.onOverlayClick(t);if(a.parents("div."+s.blockMsgClass).length>0)return true;return a.parents().children().filter("div.blockUI").length===0}function p(e){if(!u)return;var t=u[e===true?u.length-1:0];if(t)t.focus()}function d(e,t,n){var r=e.parentNode,i=e.style;var s=(r.offsetWidth-e.offsetWidth)/2-v(r,"borderLeftWidth");var o=(r.offsetHeight-e.offsetHeight)/2-v(r,"borderTopWidth");if(t)i.left=s>0?s+"px":"0";if(n)i.top=o>0?o+"px":"0"}function v(t,n){return parseInt(e.css(t,n),10)||0}e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){};var n=/MSIE/.test(navigator.userAgent);var r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent);var i=document.documentMode||0;var s=e.isFunction(document.createElement("div").style.setExpression);e.blockUI=function(e){a(window,e)};e.unblockUI=function(e){f(window,e)};e.growlUI=function(t,n,r,i){var s=e('<div class="growlUI"></div>');if(t)s.append("<h1>"+t+"</h1>");if(n)s.append("<h2>"+n+"</h2>");if(r===undefined)r=3e3;var o=function(t){t=t||{};e.blockUI({message:s,fadeIn:typeof t.fadeIn!=="undefined"?t.fadeIn:700,fadeOut:typeof t.fadeOut!=="undefined"?t.fadeOut:1e3,timeout:typeof t.timeout!=="undefined"?t.timeout:r,centerY:false,showOverlay:false,onUnblock:i,css:e.blockUI.defaults.growlCSS})};o();var u=s.css("opacity");s.mouseover(function(){o({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop();t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})};e.fn.block=function(t){if(this[0]===window){e.blockUI(t);return this}var n=e.extend({},e.blockUI.defaults,t||{});this.each(function(){var t=e(this);if(n.ignoreIfBlocked&&t.data("blockUI.isBlocked"))return;t.unblock({fadeOut:0})});return this.each(function(){if(e.css(this,"position")=="static"){this.style.position="relative";e(this).data("blockUI.static",true)}this.style.zoom=1;a(this,t)})};e.fn.unblock=function(t){if(this[0]===window){e.unblockUI(t);return this}return this.each(function(){f(this,t)})};e.blockUI.version=2.66;e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#fff",border:"1px solid #ff0000",backgroundColor:"#ff0000",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#fff",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1e3,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:false};var o=null;var u=[]}if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],e)}else{e(jQuery)}})();
 
 
 
17
 
 
 
18
 
19
+ /**
20
+ * Switchery
21
+ * -----------------------------------------------------
22
+ * https://github.com/abpetkov/switchery
23
+ */
24
 
25
+ (function(){function require(path,parent,orig){var resolved=require.resolve(path);if(null==resolved){orig=orig||path;parent=parent||"root";var err=new Error('Failed to require "'+orig+'" from "'+parent+'"');err.path=orig;err.parent=parent;err.require=true;throw err}var module=require.modules[resolved];if(!module._resolving&&!module.exports){var mod={};mod.exports={};mod.client=mod.component=true;module._resolving=true;module.call(this,mod.exports,require.relative(resolved),mod);delete module._resolving;module.exports=mod.exports}return module.exports}require.modules={};require.aliases={};require.resolve=function(path){if(path.charAt(0)==="/")path=path.slice(1);var paths=[path,path+".js",path+".json",path+"/index.js",path+"/index.json"];for(var i=0;i<paths.length;i++){var path=paths[i];if(require.modules.hasOwnProperty(path))return path;if(require.aliases.hasOwnProperty(path))return require.aliases[path]}};require.normalize=function(curr,path){var segs=[];if("."!=path.charAt(0))return path;curr=curr.split("/");path=path.split("/");for(var i=0;i<path.length;++i){if(".."==path[i]){curr.pop()}else if("."!=path[i]&&""!=path[i]){segs.push(path[i])}}return curr.concat(segs).join("/")};require.register=function(path,definition){require.modules[path]=definition};require.alias=function(from,to){if(!require.modules.hasOwnProperty(from)){throw new Error('Failed to alias "'+from+'", it does not exist')}require.aliases[to]=from};require.relative=function(parent){var p=require.normalize(parent,"..");function lastIndexOf(arr,obj){var i=arr.length;while(i--){if(arr[i]===obj)return i}return-1}function localRequire(path){var resolved=localRequire.resolve(path);return require(resolved,parent,path)}localRequire.resolve=function(path){var c=path.charAt(0);if("/"==c)return path.slice(1);if("."==c)return require.normalize(p,path);var segs=parent.split("/");var i=lastIndexOf(segs,"deps")+1;if(!i)i=0;path=segs.slice(0,i+1).join("/")+"/deps/"+path;return path};localRequire.exists=function(path){return require.modules.hasOwnProperty(localRequire.resolve(path))};return localRequire};require.register("abpetkov-transitionize/transitionize.js",function(exports,require,module){module.exports=Transitionize;function Transitionize(element,props){if(!(this instanceof Transitionize))return new Transitionize(element,props);this.element=element;this.props=props||{};this.init()}Transitionize.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)};Transitionize.prototype.init=function(){var transitions=[];for(var key in this.props){transitions.push(key+" "+this.props[key])}this.element.style.transition=transitions.join(", ");if(this.isSafari())this.element.style.webkitTransition=transitions.join(", ")}});require.register("ftlabs-fastclick/lib/fastclick.js",function(exports,require,module){function FastClick(layer){"use strict";var oldOnClick,self=this;this.trackingClick=false;this.trackingClickStart=0;this.targetElement=null;this.touchStartX=0;this.touchStartY=0;this.lastTouchIdentifier=0;this.touchBoundary=10;this.layer=layer;if(!layer||!layer.nodeType){throw new TypeError("Layer must be a document node")}this.onClick=function(){return FastClick.prototype.onClick.apply(self,arguments)};this.onMouse=function(){return FastClick.prototype.onMouse.apply(self,arguments)};this.onTouchStart=function(){return FastClick.prototype.onTouchStart.apply(self,arguments)};this.onTouchMove=function(){return FastClick.prototype.onTouchMove.apply(self,arguments)};this.onTouchEnd=function(){return FastClick.prototype.onTouchEnd.apply(self,arguments)};this.onTouchCancel=function(){return FastClick.prototype.onTouchCancel.apply(self,arguments)};if(FastClick.notNeeded(layer)){return}if(this.deviceIsAndroid){layer.addEventListener("mouseover",this.onMouse,true);layer.addEventListener("mousedown",this.onMouse,true);layer.addEventListener("mouseup",this.onMouse,true)}layer.addEventListener("click",this.onClick,true);layer.addEventListener("touchstart",this.onTouchStart,false);layer.addEventListener("touchmove",this.onTouchMove,false);layer.addEventListener("touchend",this.onTouchEnd,false);layer.addEventListener("touchcancel",this.onTouchCancel,false);if(!Event.prototype.stopImmediatePropagation){layer.removeEventListener=function(type,callback,capture){var rmv=Node.prototype.removeEventListener;if(type==="click"){rmv.call(layer,type,callback.hijacked||callback,capture)}else{rmv.call(layer,type,callback,capture)}};layer.addEventListener=function(type,callback,capture){var adv=Node.prototype.addEventListener;if(type==="click"){adv.call(layer,type,callback.hijacked||(callback.hijacked=function(event){if(!event.propagationStopped){callback(event)}}),capture)}else{adv.call(layer,type,callback,capture)}}}if(typeof layer.onclick==="function"){oldOnClick=layer.onclick;layer.addEventListener("click",function(event){oldOnClick(event)},false);layer.onclick=null}}FastClick.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0;FastClick.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent);FastClick.prototype.deviceIsIOS4=FastClick.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent);FastClick.prototype.deviceIsIOSWithBadTarget=FastClick.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(target){"use strict";switch(target.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(target.disabled){return true}break;case"input":if(this.deviceIsIOS&&target.type==="file"||target.disabled){return true}break;case"label":case"video":return true}return/\bneedsclick\b/.test(target.className)};FastClick.prototype.needsFocus=function(target){"use strict";switch(target.nodeName.toLowerCase()){case"textarea":return true;case"select":return!this.deviceIsAndroid;case"input":switch(target.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return false}return!target.disabled&&!target.readOnly;default:return/\bneedsfocus\b/.test(target.className)}};FastClick.prototype.sendClick=function(targetElement,event){"use strict";var clickEvent,touch;if(document.activeElement&&document.activeElement!==targetElement){document.activeElement.blur()}touch=event.changedTouches[0];clickEvent=document.createEvent("MouseEvents");clickEvent.initMouseEvent(this.determineEventType(targetElement),true,true,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,false,false,false,false,0,null);clickEvent.forwardedTouchEvent=true;targetElement.dispatchEvent(clickEvent)};FastClick.prototype.determineEventType=function(targetElement){"use strict";if(this.deviceIsAndroid&&targetElement.tagName.toLowerCase()==="select"){return"mousedown"}return"click"};FastClick.prototype.focus=function(targetElement){"use strict";var length;if(this.deviceIsIOS&&targetElement.setSelectionRange&&targetElement.type.indexOf("date")!==0&&targetElement.type!=="time"){length=targetElement.value.length;targetElement.setSelectionRange(length,length)}else{targetElement.focus()}};FastClick.prototype.updateScrollParent=function(targetElement){"use strict";var scrollParent,parentElement;scrollParent=targetElement.fastClickScrollParent;if(!scrollParent||!scrollParent.contains(targetElement)){parentElement=targetElement;do{if(parentElement.scrollHeight>parentElement.offsetHeight){scrollParent=parentElement;targetElement.fastClickScrollParent=parentElement;break}parentElement=parentElement.parentElement}while(parentElement)}if(scrollParent){scrollParent.fastClickLastScrollTop=scrollParent.scrollTop}};FastClick.prototype.getTargetElementFromEventTarget=function(eventTarget){"use strict";if(eventTarget.nodeType===Node.TEXT_NODE){return eventTarget.parentNode}return eventTarget};FastClick.prototype.onTouchStart=function(event){"use strict";var targetElement,touch,selection;if(event.targetTouches.length>1){return true}targetElement=this.getTargetElementFromEventTarget(event.target);touch=event.targetTouches[0];if(this.deviceIsIOS){selection=window.getSelection();if(selection.rangeCount&&!selection.isCollapsed){return true}if(!this.deviceIsIOS4){if(touch.identifier===this.lastTouchIdentifier){event.preventDefault();return false}this.lastTouchIdentifier=touch.identifier;this.updateScrollParent(targetElement)}}this.trackingClick=true;this.trackingClickStart=event.timeStamp;this.targetElement=targetElement;this.touchStartX=touch.pageX;this.touchStartY=touch.pageY;if(event.timeStamp-this.lastClickTime<200){event.preventDefault()}return true};FastClick.prototype.touchHasMoved=function(event){"use strict";var touch=event.changedTouches[0],boundary=this.touchBoundary;if(Math.abs(touch.pageX-this.touchStartX)>boundary||Math.abs(touch.pageY-this.touchStartY)>boundary){return true}return false};FastClick.prototype.onTouchMove=function(event){"use strict";if(!this.trackingClick){return true}if(this.targetElement!==this.getTargetElementFromEventTarget(event.target)||this.touchHasMoved(event)){this.trackingClick=false;this.targetElement=null}return true};FastClick.prototype.findControl=function(labelElement){"use strict";if(labelElement.control!==undefined){return labelElement.control}if(labelElement.htmlFor){return document.getElementById(labelElement.htmlFor)}return labelElement.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};FastClick.prototype.onTouchEnd=function(event){"use strict";var forElement,trackingClickStart,targetTagName,scrollParent,touch,targetElement=this.targetElement;if(!this.trackingClick){return true}if(event.timeStamp-this.lastClickTime<200){this.cancelNextClick=true;return true}this.cancelNextClick=false;this.lastClickTime=event.timeStamp;trackingClickStart=this.trackingClickStart;this.trackingClick=false;this.trackingClickStart=0;if(this.deviceIsIOSWithBadTarget){touch=event.changedTouches[0];targetElement=document.elementFromPoint(touch.pageX-window.pageXOffset,touch.pageY-window.pageYOffset)||targetElement;targetElement.fastClickScrollParent=this.targetElement.fastClickScrollParent}targetTagName=targetElement.tagName.toLowerCase();if(targetTagName==="label"){forElement=this.findControl(targetElement);if(forElement){this.focus(targetElement);if(this.deviceIsAndroid){return false}targetElement=forElement}}else if(this.needsFocus(targetElement)){if(event.timeStamp-trackingClickStart>100||this.deviceIsIOS&&window.top!==window&&targetTagName==="input"){this.targetElement=null;return false}this.focus(targetElement);if(!this.deviceIsIOS4||targetTagName!=="select"){this.targetElement=null;event.preventDefault()}return false}if(this.deviceIsIOS&&!this.deviceIsIOS4){scrollParent=targetElement.fastClickScrollParent;if(scrollParent&&scrollParent.fastClickLastScrollTop!==scrollParent.scrollTop){return true}}if(!this.needsClick(targetElement)){event.preventDefault();this.sendClick(targetElement,event)}return false};FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=false;this.targetElement=null};FastClick.prototype.onMouse=function(event){"use strict";if(!this.targetElement){return true}if(event.forwardedTouchEvent){return true}if(!event.cancelable){return true}if(!this.needsClick(this.targetElement)||this.cancelNextClick){if(event.stopImmediatePropagation){event.stopImmediatePropagation()}else{event.propagationStopped=true}event.stopPropagation();event.preventDefault();return false}return true};FastClick.prototype.onClick=function(event){"use strict";var permitted;if(this.trackingClick){this.targetElement=null;this.trackingClick=false;return true}if(event.target.type==="submit"&&event.detail===0){return true}permitted=this.onMouse(event);if(!permitted){this.targetElement=null}return permitted};FastClick.prototype.destroy=function(){"use strict";var layer=this.layer;if(this.deviceIsAndroid){layer.removeEventListener("mouseover",this.onMouse,true);layer.removeEventListener("mousedown",this.onMouse,true);layer.removeEventListener("mouseup",this.onMouse,true)}layer.removeEventListener("click",this.onClick,true);layer.removeEventListener("touchstart",this.onTouchStart,false);layer.removeEventListener("touchmove",this.onTouchMove,false);layer.removeEventListener("touchend",this.onTouchEnd,false);layer.removeEventListener("touchcancel",this.onTouchCancel,false)};FastClick.notNeeded=function(layer){"use strict";var metaViewport;var chromeVersion;if(typeof window.ontouchstart==="undefined"){return true}chromeVersion=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1];if(chromeVersion){if(FastClick.prototype.deviceIsAndroid){metaViewport=document.querySelector("meta[name=viewport]");if(metaViewport){if(metaViewport.content.indexOf("user-scalable=no")!==-1){return true}if(chromeVersion>31&&window.innerWidth<=window.screen.width){return true}}}else{return true}}if(layer.style.msTouchAction==="none"){return true}return false};FastClick.attach=function(layer){"use strict";return new FastClick(layer)};if(typeof define!=="undefined"&&define.amd){define(function(){"use strict";return FastClick})}else if(typeof module!=="undefined"&&module.exports){module.exports=FastClick.attach;module.exports.FastClick=FastClick}else{window.FastClick=FastClick}});require.register("switchery/switchery.js",function(exports,require,module){var transitionize=require("transitionize"),fastclick=require("fastclick");module.exports=Switchery;var defaults={color:"#64bd63",secondaryColor:"#dfdfdf",className:"switchery",disabled:false,disabledOpacity:.5,speed:"0.4s"};function Switchery(element,options){if(!(this instanceof Switchery))return new Switchery(element,options);this.element=element;this.options=options||{};for(var i in defaults){if(this.options[i]==null){this.options[i]=defaults[i]}}if(this.element!=null&&this.element.type=="checkbox")this.init()}Switchery.prototype.hide=function(){this.element.style.display="none"};Switchery.prototype.show=function(){var switcher=this.create();this.insertAfter(this.element,switcher)};Switchery.prototype.create=function(){this.switcher=document.createElement("span");this.jack=document.createElement("small");this.switcher.appendChild(this.jack);this.switcher.className=this.options.className;return this.switcher};Switchery.prototype.insertAfter=function(reference,target){reference.parentNode.insertBefore(target,reference.nextSibling)};Switchery.prototype.isChecked=function(){return this.element.checked};Switchery.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled};Switchery.prototype.setPosition=function(clicked){var checked=this.isChecked(),switcher=this.switcher,jack=this.jack;if(clicked&&checked)checked=false;else if(clicked&&!checked)checked=true;if(checked===true){this.element.checked=true;if(window.getComputedStyle)jack.style.left=parseInt(window.getComputedStyle(switcher).width)-parseInt(window.getComputedStyle(jack).width)+"px";else jack.style.left=parseInt(switcher.currentStyle["width"])-parseInt(jack.currentStyle["width"])+"px";if(this.options.color)this.colorize();this.setSpeed()}else{jack.style.left=0;this.element.checked=false;this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor;this.switcher.style.borderColor=this.options.secondaryColor;this.switcher.style.backgroundColor=this.options.secondaryColor!==defaults.secondaryColor?this.options.secondaryColor:"#fff";this.setSpeed()}};Switchery.prototype.setSpeed=function(){var switcherProp={},jackProp={left:this.options.speed.replace(/[a-z]/,"")/2+"s"};if(this.isChecked()){switcherProp={border:this.options.speed,"box-shadow":this.options.speed,"background-color":this.options.speed.replace(/[a-z]/,"")*3+"s"}}else{switcherProp={border:this.options.speed,"box-shadow":this.options.speed}}transitionize(this.switcher,switcherProp);transitionize(this.jack,jackProp)};Switchery.prototype.colorize=function(){this.switcher.style.backgroundColor=this.options.color;this.switcher.style.borderColor=this.options.color;this.switcher.style.boxShadow="inset 0 0 0 16px "+this.options.color};Switchery.prototype.handleOnchange=function(state){if(typeof Event==="function"||!document.fireEvent){var event=document.createEvent("HTMLEvents");event.initEvent("change",true,true);this.element.dispatchEvent(event)}else{this.element.fireEvent("onchange")}};Switchery.prototype.handleChange=function(){var self=this,el=this.element;if(el.addEventListener){el.addEventListener("change",function(){self.setPosition()})}else{el.attachEvent("onchange",function(){self.setPosition()})}};Switchery.prototype.handleClick=function(){var self=this,switcher=this.switcher,parent=self.element.parentNode.tagName.toLowerCase(),labelParent=parent==="label"?false:true;if(this.isDisabled()===false){fastclick(switcher);if(switcher.addEventListener){switcher.addEventListener("click",function(){self.setPosition(labelParent);self.handleOnchange(self.element.checked)})}else{switcher.attachEvent("onclick",function(){self.setPosition(labelParent);self.handleOnchange(self.element.checked)})}}else{this.element.disabled=true;this.switcher.style.opacity=this.options.disabledOpacity}};Switchery.prototype.markAsSwitched=function(){this.element.setAttribute("data-switchery",true)};Switchery.prototype.markedAsSwitched=function(){return this.element.getAttribute("data-switchery")};Switchery.prototype.init=function(){this.hide();this.show();this.setPosition();this.markAsSwitched();this.handleChange();this.handleClick()}});require.alias("abpetkov-transitionize/transitionize.js","switchery/deps/transitionize/transitionize.js");require.alias("abpetkov-transitionize/transitionize.js","switchery/deps/transitionize/index.js");require.alias("abpetkov-transitionize/transitionize.js","transitionize/index.js");require.alias("abpetkov-transitionize/transitionize.js","abpetkov-transitionize/index.js");require.alias("ftlabs-fastclick/lib/fastclick.js","switchery/deps/fastclick/lib/fastclick.js");require.alias("ftlabs-fastclick/lib/fastclick.js","switchery/deps/fastclick/index.js");require.alias("ftlabs-fastclick/lib/fastclick.js","fastclick/index.js");require.alias("ftlabs-fastclick/lib/fastclick.js","ftlabs-fastclick/index.js");require.alias("switchery/switchery.js","switchery/index.js");if(typeof exports=="object"){module.exports=require("switchery")}else if(typeof define=="function"&&define.amd){define(function(){return require("switchery")})}else{this["Switchery"]=require("switchery")}})();
 
 
 
 
 
 
 
26
 
 
27
 
28
  /**
29
+ * Sortable
30
+ * -----------------------------------------------------
31
+ * https://github.com/RubaXa/Sortable
 
 
 
 
 
 
 
 
32
  */
33
 
34
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){this.el=a,this.options=b=s({},b),a[J]=this;var d={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0};for(var e in d)!(e in b)&&(b[e]=d[e]);var g=b.group;g&&"object"==typeof g||(g=b.group={name:g}),["pull","put"].forEach(function(a){a in g||(g[a]=!0)}),b.groups=" "+g.name+(g.put.join?" "+g.put.join(" "):"")+" ";for(var h in this)"_"===h.charAt(0)&&(this[h]=c(this,this[h]));f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),f(a,"dragover",this),f(a,"dragenter",this),R.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(i(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,t),v.state=a)}function c(a,b){var c=Q.call(arguments,2);return b.bind?b.bind.apply(b,[a].concat(c)):function(){return b.apply(a,c.concat(Q.call(arguments)))}}function d(a,b,c){if(a){c=c||L,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function e(a){a.dataTransfer.dropEffect="move",a.preventDefault()}function f(a,b,c){a.addEventListener(b,c,!1)}function g(a,b,c){a.removeEventListener(b,c,!1)}function h(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(I," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(I," ")}}function i(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return L.defaultView&&L.defaultView.getComputedStyle?c=L.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function j(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function k(a,b,c,d,e,f,g){var h=L.createEvent("Event"),i=(a||b[J]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function l(a,b,c,d,e,f){var g,h,i=a[J],j=i.options.onMove;return j&&(g=L.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),h=j.call(i,g)),h}function m(a){a.draggable=!1}function n(){O=!1}function o(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return b.clientY-(d.top+d.height)>5&&c}function p(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function q(a){for(var b=0;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function r(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function s(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var t,u,v,w,x,y,z,A,B,C,D,E,F,G,H={},I=/\s+/g,J="Sortable"+(new Date).getTime(),K=window,L=K.document,M=K.parseInt,N=!!("draggable"in L.createElement("div")),O=!1,P=Math.abs,Q=[].slice,R=[],S=r(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth<y.scrollWidth||y.offsetHeight<y.scrollHeight)break;while(y=y.parentNode)}y&&(d=y,e=y.getBoundingClientRect(),f=(P(e.right-j)<=h)-(P(e.left-j)<=h),g=(P(e.bottom-k)<=h)-(P(e.top-k)<=h)),f||g||(f=(h>=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=K)),(H.vx!==f||H.vy!==g||H.el!==d)&&(H.el=d,H.vx=f,H.vy=g,clearInterval(H.pid),d&&(H.pid=setInterval(function(){d===K?K.scrollTo(K.pageXOffset+f*i,K.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30);return a.prototype={constructor:a,_onTapStart:function(a){var b=this,c=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,j=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=d(h,e.draggable,c))){if(C=q(h),"function"==typeof j){if(j.call(this,a,h,this))return k(b,i,"filter",h,c,C),void a.preventDefault()}else if(j&&(j=j.split(",").some(function(a){return a=d(i,a.trim(),c),a?(k(b,a,"filter",h,c,C),!0):void 0})))return void a.preventDefault();(!e.handle||d(i,e.handle,c))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,e=this,g=e.el,h=e.options,i=g.ownerDocument;c&&!t&&c.parentNode===g&&(F=a,w=g,t=c,x=t.nextSibling,E=h.group,d=function(){e._disableDelayedDrag(),t.draggable=!0,h.ignore.split(",").forEach(function(a){j(t,a.trim(),m)}),e._triggerDragStart(b)},f(i,"mouseup",e._onDrop),f(i,"touchend",e._onDrop),f(i,"touchcancel",e._onDrop),h.delay?(f(i,"mousemove",e._disableDelayedDrag),f(i,"touchmove",e._disableDelayedDrag),e._dragStartTimer=setTimeout(d,h.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),g(a,"mousemove",this._disableDelayedDrag),g(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(F={target:t,clientX:a.clientX,clientY:a.clientY},this._onDragStart(F,"touch")):N?(f(t,"dragend",this),f(w,"dragstart",this._onDragStart)):this._onDragStart(F,!0);try{L.selection?L.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&t&&(h(t,this.options.ghostClass,!0),a.active=this,k(this,w,"start",t,w,C))},_emulateDragOver:function(){if(G){i(u,"display","none");var a=L.elementFromPoint(G.clientX,G.clientY),b=a,c=" "+this.options.group.name,d=R.length;if(b)do{if(b[J]&&b[J].options.groups.indexOf(c)>-1){for(;d--;)R[d]({clientX:G.clientX,clientY:G.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);i(u,"display","")}},_onTouchMove:function(a){if(F){var b=a.touches?a.touches[0]:a,c=b.clientX-F.clientX,d=b.clientY-F.clientY,e=a.touches?"translate3d("+c+"px,"+d+"px,0)":"translate("+c+"px,"+d+"px)";G=b,i(u,"webkitTransform",e),i(u,"mozTransform",e),i(u,"msTransform",e),i(u,"transform",e),a.preventDefault()}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;if(this._offUpEvents(),"clone"==E.pull&&(v=t.cloneNode(!0),i(v,"display","none"),w.insertBefore(v,t)),b){var e,g=t.getBoundingClientRect(),h=i(t);u=t.cloneNode(!0),i(u,"top",g.top-M(h.marginTop,10)),i(u,"left",g.left-M(h.marginLeft,10)),i(u,"width",g.width),i(u,"height",g.height),i(u,"opacity","0.8"),i(u,"position","fixed"),i(u,"zIndex","100000"),w.appendChild(u),e=u.getBoundingClientRect(),i(u,"width",2*g.width-e.width),i(u,"height",2*g.height-e.height),"touch"===b?(f(L,"touchmove",this._onTouchMove),f(L,"touchend",this._onDrop),f(L,"touchcancel",this._onDrop)):(f(L,"mousemove",this._onTouchMove),f(L,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,t)),f(L,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(a){var c,e,f,g=this.el,h=this.options,j=h.group,k=j.put,m=E===j,p=h.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!h.dragoverBubble&&a.stopPropagation()),E&&!h.disabled&&(m?p||(f=!w.contains(t)):E.pull&&k&&(E.name===j.name||k.indexOf&&~k.indexOf(E.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(S(a,h,this.el),O)return;if(c=d(a.target,h.draggable,g),e=t.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(t,v||x):p||w.appendChild(t));if(0===g.children.length||g.children[0]===u||g===a.target&&(c=o(g,a))){if(c){if(c.animated)return;r=c.getBoundingClientRect()}b(m),l(w,g,t,e,c,r)!==!1&&(g.appendChild(t),this._animate(e,t),c&&this._animate(r,c))}else if(c&&!c.animated&&c!==t&&void 0!==c.parentNode[J]){A!==c&&(A=c,B=i(c));var q,r=c.getBoundingClientRect(),s=r.right-r.left,y=r.bottom-r.top,z=/left|right|inline/.test(B.cssFloat+B.display),C=c.offsetWidth>t.offsetWidth,D=c.offsetHeight>t.offsetHeight,F=(z?(a.clientX-r.left)/s:(a.clientY-r.top)/y)>.5,G=c.nextElementSibling,H=l(w,g,t,e,c,r);H!==!1&&(O=!0,setTimeout(n,30),b(m),q=1===H||-1===H?1===H:z?c.previousElementSibling===t&&!C||F&&C:G!==t&&!D||F&&D,q&&!G?g.appendChild(t):c.parentNode.insertBefore(t,q?G:c),this._animate(e,t),this._animate(r,c))}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();i(b,"transition","none"),i(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,i(b,"transition","all "+c+"ms"),i(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){i(b,"transition",""),i(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;g(L,"touchmove",this._onTouchMove),g(a,"mouseup",this._onDrop),g(a,"touchend",this._onDrop),g(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(H.pid),clearTimeout(this._dragStartTimer),g(L,"drop",this),g(L,"mousemove",this._onTouchMove),g(c,"dragstart",this._onDragStart),this._offUpEvents(),b&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation(),u&&u.parentNode.removeChild(u),t&&(g(t,"dragend",this),m(t),h(t,this.options.ghostClass,!1),w!==t.parentNode?(D=q(t),k(null,t.parentNode,"sort",t,w,C,D),k(this,w,"sort",t,w,C,D),k(null,t.parentNode,"add",t,w,C,D),k(this,w,"remove",t,w,C,D)):(v&&v.parentNode.removeChild(v),t.nextSibling!==x&&(D=q(t),k(this,w,"update",t,w,C,D),k(this,w,"sort",t,w,C,D))),a.active&&(k(this,w,"end",t,w,C,D),this.save())),w=t=u=x=v=y=z=F=G=A=B=E=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?t&&(this._onDragOver(a),e(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],c=this.el.children,e=0,f=c.length,g=this.options;f>e;e++)a=c[e],d(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||p(a));return b},sort:function(a){var b={},c=this.el;this.toArray().forEach(function(a,e){var f=c.children[e];d(f,this.options.draggable,c)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(c.removeChild(b[a]),c.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return d(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:void(c[a]=b)},destroy:function(){var a=this.el;a[J]=null,g(a,"mousedown",this._onTapStart),g(a,"touchstart",this._onTapStart),g(a,"dragover",this),g(a,"dragenter",this),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),R.splice(R.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:f,off:g,css:i,find:j,bind:c,is:function(a,b){return!!d(a,b,a)},extend:s,throttle:r,closest:d,toggleClass:h,index:q},a.version="1.2.1",a.create=function(b,c){return new a(b,c)},a});
35
+
36
 
37
  /**
38
+ * application.js
39
+ * -----------------------------------------------------
40
+ * all the js magic we need!
41
  */
42
 
43
+ function reloadFont( $fontValue ) {
44
 
45
+ WebFont.load( {
46
+ google: {
47
+ families: [$fontValue]
48
+ }
49
+ } );
50
 
 
 
 
 
 
 
51
  }
52
 
53
  function changeFont( $font ) {
 
54
 
55
+ var $fontValue = $font.val();
56
+
57
+ reloadFont( $fontValue );
58
+ $font.parent().find( 'h3' ).css( 'font-family', $fontValue );
59
+
60
  }
61
 
62
  // upload function
63
  function getUploader( $text, $target ) {
 
64
 
65
+ var custom_uploader;
 
 
 
 
66
 
67
+ // If the uploader object has already been created, reopen the dialog
68
+ if( custom_uploader ) {
69
+ custom_uploader.open();
70
+ return;
71
+ }
 
 
 
72
 
73
+ // Extend the wp.media object
74
+ custom_uploader = wp.media.frames.file_frame = wp.media( {
75
+ title: $text,
76
+ button: {
77
+ text: $text
78
+ },
79
+ multiple: false
80
+ } );
81
 
82
+ // When a file is selected, grab the URL and set it as the text field's value
83
+ custom_uploader.on( 'select', function() {
84
+ var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
85
 
86
+ $target.parent().find( 'input' ).val( attachment.url );
87
+ $target.parent().find( '.signals-preview-area' ).html( '<img src="' + attachment.url + '" />' );
88
+ $target.parent().find( '.signals-upload-append' ).html( '&nbsp;<a href="javascript: void(0);" class="signals-remove-image">Remove</a>' );
89
+
90
+ } );
91
+
92
+ // Open the uploader dialog
93
+ custom_uploader.open();
94
 
 
 
95
  }
96
 
97
  (function( $ ) {
100
 
101
  // css and html editor
102
  function getEditor( $editorID, $textareaID, $mode ) {
103
+
104
  if( $( '#' + $editorID ).length > 0 ) {
105
  var editor = ace.edit( $editorID ),
106
  $textarea = $( '#' + $textareaID ).hide();
119
 
120
  editor.session.setUseSoftTabs( null );
121
  }
122
+
123
  }
124
 
125
  // WP native uploader
126
  $( document ).on( 'click', '.signals-upload', function( e ) {
127
+
128
  e.preventDefault();
129
  getUploader( 'Select Image', $( this ) );
130
+
131
  } );
132
 
133
  // Removing photo from the canvas and emptying the text field
134
  $( document ).on( 'click', '.signals-remove-image', function( e ) {
135
+
136
  e.preventDefault();
137
 
138
  $( this ).parent().parent().find( 'input' ).val( '' );
139
  $( this ).parent().parent().find( '.signals-preview-area' ).html( 'Select or upload via WP native uploader' );
140
  $( this ).hide();
141
+
142
  } );
143
 
144
  // on dom ready
146
 
147
  // google fonts
148
  $( '.signals-google-fonts' ).each( function() {
149
+
150
  var $font = $( this );
151
  changeFont( $font );
152
+
153
  } );
154
 
155
  $( document ).on( 'change', '.signals-google-fonts', function() {
156
+
157
  var $font = $( this );
158
  changeFont( $font );
159
+
160
  } );
161
 
162
  // ios switches
163
  var elements = Array.prototype.slice.call(document.querySelectorAll('.signals-form-ios'));
164
  elements.forEach(function(html) {
165
+ var switchery = new Switchery(html);
166
  });
167
 
168
+ // sortable
169
+ var el = document.getElementById( 'arrange-items' );
170
+ var sortable = Sortable.create( el, {
171
+ animation: 150,
172
+ dataIdAttr: 'data-id',
173
+ store: {
174
+ get: function (sortable) {
175
+ var order = localStorage.getItem(sortable.options.group);
176
+ return order ? order.split('|') : [];
177
+ },
178
+ set: function( sortable ) {
179
+ var order = sortable.toArray();
180
+ $( '#signals_csmm_arrange' ).val( order );
181
+ }
182
+ }
183
+ } );
184
+
185
  // css and html editor
186
  getEditor( 'signals_csmm_html_editor', 'signals_csmm_html', 'html' );
187
  getEditor( 'signals_csmm_css_editor', 'signals_csmm_css', 'css' );
188
 
189
  // support ticket
190
  $( document).on( 'click', '.signals-create-ticket', function(e) {
191
+
192
  e.preventDefault();
193
 
194
  var html = $( '.signals-ajax-response' );
237
  }
238
 
239
  $( '.signals-main-menu li a' ).click( function(e) {
240
+
241
  e.preventDefault();
242
 
243
  $.removeCookie( 'signals_csmm_menu', { path: '/' } );
251
  $( '.signals-tile' ).hide();
252
  $( $tab ).fadeIn();
253
  $.cookie( 'signals_csmm_menu', $tab, { path: '/' } );
254
+
255
  } );
256
 
257
  $( '.signals-mobile-menu a' ).click( function() {
258
  $( '.signals-main-menu' ).slideToggle();
259
  } );
260
+
261
  } );
262
 
263
+ } )( jQuery );
framework/admin/preview.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Preview maintenance mode.
5
+ *
6
+ * @link http://www.69signals.com
7
+ * @since 0.1
8
+ * @package Signals_Maintenance_Mode
9
+ */
10
+
11
+ // Load WordPress
12
+ require_once( explode( "wp-content" , __FILE__ )[0] . "wp-load.php" );
13
+
14
+
15
+ // Include important files
16
+ require_once '../public/include/functions.php';
17
+
18
+
19
+ // Plugin options from the database
20
+ $signals_csmm_options = get_option( 'signals_csmm_options' );
21
+
22
+
23
+ // Localization
24
+ load_plugin_textdomain( 'signals', false, SIGNALS_CSMM_PATH . 'framework/langs' );
25
+
26
+
27
+ // Getting custom login URL for the admin
28
+ $signals_login_url = wp_login_url();
29
+
30
+
31
+ // Checking for the server protocol status
32
+ if ( isset( $_SERVER['HTTPS'] ) === true ) {
33
+ $signals_protocol = 'https';
34
+ } else {
35
+ $signals_protocol = 'http';
36
+ }
37
+
38
+
39
+ // This is the server address of the current page
40
+ $signals_server_url = $signals_protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
41
+
42
+
43
+ // Checking for the custom_login_url value
44
+ if ( empty( $signals_csmm_options['custom_login_url'] ) ) {
45
+ $signals_csmm_options['custom_login_url'] = NULL;
46
+ }
47
+
48
+
49
+ // Render the maintenance mode template
50
+ csmm_render_template( $signals_csmm_options );
framework/admin/settings.php CHANGED
@@ -82,52 +82,57 @@ function csmm_admin_settings() {
82
  'status' => $tmp_options['status'],
83
  'title' => strip_tags( $_POST['signals_csmm_title'] ),
84
  'header_text' => strip_tags( $_POST['signals_csmm_header'] ),
85
- 'secondary_text' => $_POST['signals_csmm_secondary'],
86
  'antispam_text' => strip_tags( $_POST['signals_csmm_antispam'] ),
87
  'custom_login_url' => strip_tags( $_POST['signals_csmm_custom_login'] ),
88
  'show_logged_in' => $tmp_options['logged'],
89
  'exclude_se' => $tmp_options['exclude_se'],
 
 
 
90
  'mailchimp_api' => strip_tags( $_POST['signals_csmm_api'] ),
91
  'mailchimp_list' => $tmp_options['list'],
 
 
 
 
 
92
  'logo' => strip_tags( $_POST['signals_csmm_logo'] ),
93
  'favicon' => strip_tags( $_POST['signals_csmm_favicon'] ),
94
-
95
  'bg_cover' => strip_tags( $_POST['signals_csmm_bg'] ),
96
  'content_overlay' => $tmp_options['overlay'],
97
  'content_width' => absint( $_POST['signals_csmm_width'] ),
98
  'bg_color' => strip_tags( $_POST['signals_csmm_color'] ),
99
  'content_position' => strip_tags( $_POST['signals_csmm_position'] ),
100
  'content_alignment' => strip_tags( $_POST['signals_csmm_alignment'] ),
101
-
102
  'header_font' => strip_tags( $_POST['signals_csmm_header_font'] ),
103
  'secondary_font' => strip_tags( $_POST['signals_csmm_secondary_font'] ),
104
  'header_font_size' => strip_tags( $_POST['signals_csmm_header_size'] ),
105
  'secondary_font_size' => strip_tags( $_POST['signals_csmm_secondary_size'] ),
106
  'header_font_color' => strip_tags( $_POST['signals_csmm_header_color'] ),
107
  'secondary_font_color' => strip_tags( $_POST['signals_csmm_secondary_color'] ),
108
-
109
  'antispam_font_size' => strip_tags( $_POST['signals_csmm_antispam_size'] ),
110
  'antispam_font_color' => strip_tags( $_POST['signals_csmm_antispam_color'] ),
111
 
112
  'input_text' => strip_tags( $_POST['signals_csmm_input_text'] ),
113
  'button_text' => strip_tags( $_POST['signals_csmm_button_text'] ),
114
-
115
  'ignore_form_styles' => $tmp_options['form_styles'],
116
-
117
  'input_font_size' => strip_tags( $_POST['signals_csmm_input_size'] ),
118
  'button_font_size' => strip_tags( $_POST['signals_csmm_button_size'] ),
119
  'input_font_color' => strip_tags( $_POST['signals_csmm_input_color'] ),
120
  'button_font_color' => strip_tags( $_POST['signals_csmm_button_color'] ),
121
-
122
  'input_bg' => strip_tags( $_POST['signals_csmm_input_bg'] ),
123
  'button_bg' => strip_tags( $_POST['signals_csmm_button_bg'] ),
124
  'input_bg_hover' => strip_tags( $_POST['signals_csmm_input_bg_hover'] ),
125
  'button_bg_hover' => strip_tags( $_POST['signals_csmm_button_bg_hover'] ),
126
-
127
  'input_border' => strip_tags( $_POST['signals_csmm_input_border'] ),
128
  'button_border' => strip_tags( $_POST['signals_csmm_button_border'] ),
129
  'input_border_hover' => strip_tags( $_POST['signals_csmm_input_border_hover'] ),
130
  'button_border_hover' => strip_tags( $_POST['signals_csmm_button_border_hover'] ),
 
 
 
 
131
 
132
  'disable_settings' => $tmp_options['disabled'],
133
  'custom_html' => $_POST['signals_csmm_html'], // Not sanitizing the HTML and CSS provided by the admin
82
  'status' => $tmp_options['status'],
83
  'title' => strip_tags( $_POST['signals_csmm_title'] ),
84
  'header_text' => strip_tags( $_POST['signals_csmm_header'] ),
85
+ 'secondary_text' => strip_tags( $_POST['signals_csmm_secondary'] ),
86
  'antispam_text' => strip_tags( $_POST['signals_csmm_antispam'] ),
87
  'custom_login_url' => strip_tags( $_POST['signals_csmm_custom_login'] ),
88
  'show_logged_in' => $tmp_options['logged'],
89
  'exclude_se' => $tmp_options['exclude_se'],
90
+ 'arrange' => strip_tags( $_POST['signals_csmm_arrange'] ),
91
+ 'analytics' => $_POST['signals_csmm_analytics'],
92
+
93
  'mailchimp_api' => strip_tags( $_POST['signals_csmm_api'] ),
94
  'mailchimp_list' => $tmp_options['list'],
95
+ 'message_noemail' => strip_tags( $_POST['signals_csmm_message_noemail'] ),
96
+ 'message_subscribed' => strip_tags( $_POST['signals_csmm_message_subscribed'] ),
97
+ 'message_wrong' => strip_tags( $_POST['signals_csmm_message_wrong'] ),
98
+ 'message_done' => strip_tags( $_POST['signals_csmm_message_done'] ),
99
+
100
  'logo' => strip_tags( $_POST['signals_csmm_logo'] ),
101
  'favicon' => strip_tags( $_POST['signals_csmm_favicon'] ),
 
102
  'bg_cover' => strip_tags( $_POST['signals_csmm_bg'] ),
103
  'content_overlay' => $tmp_options['overlay'],
104
  'content_width' => absint( $_POST['signals_csmm_width'] ),
105
  'bg_color' => strip_tags( $_POST['signals_csmm_color'] ),
106
  'content_position' => strip_tags( $_POST['signals_csmm_position'] ),
107
  'content_alignment' => strip_tags( $_POST['signals_csmm_alignment'] ),
 
108
  'header_font' => strip_tags( $_POST['signals_csmm_header_font'] ),
109
  'secondary_font' => strip_tags( $_POST['signals_csmm_secondary_font'] ),
110
  'header_font_size' => strip_tags( $_POST['signals_csmm_header_size'] ),
111
  'secondary_font_size' => strip_tags( $_POST['signals_csmm_secondary_size'] ),
112
  'header_font_color' => strip_tags( $_POST['signals_csmm_header_color'] ),
113
  'secondary_font_color' => strip_tags( $_POST['signals_csmm_secondary_color'] ),
 
114
  'antispam_font_size' => strip_tags( $_POST['signals_csmm_antispam_size'] ),
115
  'antispam_font_color' => strip_tags( $_POST['signals_csmm_antispam_color'] ),
116
 
117
  'input_text' => strip_tags( $_POST['signals_csmm_input_text'] ),
118
  'button_text' => strip_tags( $_POST['signals_csmm_button_text'] ),
 
119
  'ignore_form_styles' => $tmp_options['form_styles'],
 
120
  'input_font_size' => strip_tags( $_POST['signals_csmm_input_size'] ),
121
  'button_font_size' => strip_tags( $_POST['signals_csmm_button_size'] ),
122
  'input_font_color' => strip_tags( $_POST['signals_csmm_input_color'] ),
123
  'button_font_color' => strip_tags( $_POST['signals_csmm_button_color'] ),
 
124
  'input_bg' => strip_tags( $_POST['signals_csmm_input_bg'] ),
125
  'button_bg' => strip_tags( $_POST['signals_csmm_button_bg'] ),
126
  'input_bg_hover' => strip_tags( $_POST['signals_csmm_input_bg_hover'] ),
127
  'button_bg_hover' => strip_tags( $_POST['signals_csmm_button_bg_hover'] ),
 
128
  'input_border' => strip_tags( $_POST['signals_csmm_input_border'] ),
129
  'button_border' => strip_tags( $_POST['signals_csmm_button_border'] ),
130
  'input_border_hover' => strip_tags( $_POST['signals_csmm_input_border_hover'] ),
131
  'button_border_hover' => strip_tags( $_POST['signals_csmm_button_border_hover'] ),
132
+ 'success_background' => strip_tags( $_POST['signals_csmm_success_bg'] ),
133
+ 'success_color' => strip_tags( $_POST['signals_csmm_success_color'] ),
134
+ 'error_background' => strip_tags( $_POST['signals_csmm_error_bg'] ),
135
+ 'error_color' => strip_tags( $_POST['signals_csmm_error_color'] ),
136
 
137
  'disable_settings' => $tmp_options['disabled'],
138
  'custom_html' => $_POST['signals_csmm_html'], // Not sanitizing the HTML and CSS provided by the admin
framework/admin/views/settings-about.php CHANGED
@@ -12,7 +12,7 @@
12
 
13
  <div class="signals-tile" id="about">
14
  <div class="signals-tile-body">
15
- <p class="signals-strong"><?php _e( 'We are a creative digital agency.', 'signals' ); ?></p>
16
  <p><?php _e( 'We love to weave the web, simple but amazing. We create flawless web and mobile applications. Our perfectly crafted products will make you believe us.', 'signals' ); ?></p>
17
 
18
  <div class="signals-section-content">
@@ -36,7 +36,7 @@
36
  echo $signals_offers['body'] . '<br/>';
37
 
38
  // Setting the transient over here so that it does not ping the server again for a day atleast
39
- set_transient( 'signals_csmm_offer', $signals_offers['body'], 60*60*24 );
40
  } // $signals_offers
41
  } // $offers_transient
42
 
12
 
13
  <div class="signals-tile" id="about">
14
  <div class="signals-tile-body">
15
+ <p class="signals-strong"><?php _e( 'We are a Creative Digital Marketplace.', 'signals' ); ?></p>
16
  <p><?php _e( 'We love to weave the web, simple but amazing. We create flawless web and mobile applications. Our perfectly crafted products will make you believe us.', 'signals' ); ?></p>
17
 
18
  <div class="signals-section-content">
36
  echo $signals_offers['body'] . '<br/>';
37
 
38
  // Setting the transient over here so that it does not ping the server again for a day atleast
39
+ set_transient( 'signals_csmm_offer', $signals_offers['body'], 60 * 60 * 24 );
40
  } // $signals_offers
41
  } // $offers_transient
42
 
framework/admin/views/settings-advanced.php CHANGED
@@ -30,7 +30,7 @@
30
  <textarea name="signals_csmm_html" id="signals_csmm_html" rows="8" placeholder="<?php _e( 'Custom HTML for the plugin', 'signals' ); ?>"><?php echo stripslashes( $signals_csmm_options['custom_html'] ); ?></textarea>
31
 
32
  <p class="signals-form-help-block"><?php echo __( 'Custom HTML for the plugin goes over here. Please note that ', 'signals' ) . '<i style="color: #f96773">' . __( '[html], [head], [title], [meta], [body], and similar tags', 'signals' ) . '</i>' . __( ' are not required. Only provide content HTML for the page.', 'signals' ); ?></p>
33
- <p class="signals-form-help-block"><?php _e( 'To insert subscription form anywhere in the html, simply use the placeholder <strong>{{form}}</strong> and you are done.', 'signals' ); ?></p>
34
  </div>
35
 
36
  <div class="signals-form-group">
30
  <textarea name="signals_csmm_html" id="signals_csmm_html" rows="8" placeholder="<?php _e( 'Custom HTML for the plugin', 'signals' ); ?>"><?php echo stripslashes( $signals_csmm_options['custom_html'] ); ?></textarea>
31
 
32
  <p class="signals-form-help-block"><?php echo __( 'Custom HTML for the plugin goes over here. Please note that ', 'signals' ) . '<i style="color: #f96773">' . __( '[html], [head], [title], [meta], [body], and similar tags', 'signals' ) . '</i>' . __( ' are not required. Only provide content HTML for the page.', 'signals' ); ?></p>
33
+ <p class="signals-form-help-block"><?php _e( 'To insert subscription form anywhere in the html, simply use the placeholder <strong>{{form}}</strong> and you are done. This should only be used if you have enabled the above option to use custom HTML only.', 'signals' ); ?></p>
34
  </div>
35
 
36
  <div class="signals-form-group">
framework/admin/views/settings-basic.php CHANGED
@@ -79,6 +79,46 @@
79
  <p class="signals-form-help-block"><?php _e( 'Do you want to exclude search engines from viewing maintenance page? This will enable search engines to view your regular website and not the Maintenance Mode page even if the plugin is enabled.', 'signals' ); ?></p>
80
  </div>
81
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  </div>
83
  </div>
84
  </div><!-- #basic -->
79
  <p class="signals-form-help-block"><?php _e( 'Do you want to exclude search engines from viewing maintenance page? This will enable search engines to view your regular website and not the Maintenance Mode page even if the plugin is enabled.', 'signals' ); ?></p>
80
  </div>
81
  </div>
82
+
83
+ <label class="signals-strong"><?php _e( 'Arrange Elements', 'signals' ); ?></label>
84
+ <p class="signals-form-help-block"><?php _e( 'Select the order in which you would like to display the sections on the maintenance page. To change the order, simply drag the items and arrange as per your preference.', 'signals' ); ?></p>
85
+ <div class="signals-elements">
86
+ <ul id="arrange-items">
87
+ <?php
88
+
89
+ if ( isset( $signals_csmm_options['arrange'] ) && '' != ( $signals_csmm_options['arrange'] ) ) {
90
+ $signals_arrange = explode( ',', $signals_csmm_options['arrange'] );
91
+
92
+ // list items
93
+ foreach ( $signals_arrange as $signals_item ) {
94
+ if ( 'html' == $signals_item ) {
95
+ echo '<li data-id="' . $signals_item . '">' . __( 'Custom HTML', 'signals' ) . '</li>';
96
+ } else {
97
+ echo '<li data-id="' . $signals_item . '">' . ucfirst( $signals_item ) . '</li>';
98
+ }
99
+ }
100
+ } else {
101
+
102
+ ?>
103
+
104
+ <li data-id="logo"><?php _e( 'Logo', 'signals' ); ?></li>
105
+ <li data-id="header"><?php _e( 'Header Text', 'signals' ); ?></li>
106
+ <li data-id="secondary"><?php _e( 'Secondary Text', 'signals' ); ?></li>
107
+ <li data-id="form"><?php _e( 'Form', 'signals' ); ?></li>
108
+ <li data-id="html"><?php _e( 'Custom HTML', 'signals' ); ?></li>
109
+
110
+ <?php } // arrange ?>
111
+ </ul>
112
+
113
+ <input type="hidden" name="signals_csmm_arrange" id="signals_csmm_arrange" value="<?php echo esc_attr_e( $signals_csmm_options['arrange'] ); ?>">
114
+ </div>
115
+
116
+ <div class="signals-form-group">
117
+ <label for="signals_csmm_analytics" class="signals-strong"><?php _e( 'Analytics Code', 'signals' ); ?></label>
118
+ <textarea name="signals_csmm_analytics" id="signals_csmm_analytics" rows="5" placeholder="<?php esc_attr_e( 'Analytics code for the maintenance page', 'signals' ); ?>"><?php echo esc_textarea( stripslashes( $signals_csmm_options['analytics'] ) ); ?></textarea>
119
+
120
+ <p class="signals-form-help-block"><?php _e( 'Provide analytics code for the maintenance page. It\'s good to have tracking installed :)', 'signals' ); ?></p>
121
+ </div>
122
  </div>
123
  </div>
124
  </div><!-- #basic -->
framework/admin/views/settings-design.php CHANGED
@@ -133,13 +133,13 @@
133
  <label for="signals_csmm_header_font" class="signals-strong"><?php _e( 'Header Font', 'signals' ); ?></label>
134
 
135
  <select name="signals_csmm_header_font" id="signals_csmm_header_font" class="signals-google-fonts">
136
- <option value="Arial"<?php selected( 'Arial', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Arial', 'signals' ); ?></option>
137
- <option value="Helvetica"<?php selected( 'Helvetica', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Helvetica', 'signals' ); ?></option>
138
- <option value="Georgia"<?php selected( 'Georgia', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Georgia', 'signals' ); ?></option>
139
- <option value="Times New Roman"<?php selected( 'Times New Roman', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Times New Roman', 'signals' ); ?></option>
140
- <option value="Tahoma"<?php selected( 'Tahoma', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Tahoma', 'signals' ); ?></option>
141
- <option value="Verdana"<?php selected( 'Verdana', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Verdana', 'signals' ); ?></option>
142
- <option value="Geneva"<?php selected( 'Geneva', $signals_csmm_options['header_font'] ); ?>><?php _e( 'Geneva', 'signals' ); ?></option>
143
  <option disabled>-- via google --</option>
144
  <?php
145
 
@@ -159,13 +159,13 @@
159
  <label for="signals_csmm_secondary_font" class="signals-strong"><?php _e( 'Secondary Font', 'signals' ); ?></label>
160
 
161
  <select name="signals_csmm_secondary_font" id="signals_csmm_secondary_font" class="signals-google-fonts">
162
- <option value="Arial"<?php selected( 'Arial', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Arial', 'signals' ); ?></option>
163
- <option value="Helvetica"<?php selected( 'Helvetica', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Helvetica', 'signals' ); ?></option>
164
- <option value="Georgia"<?php selected( 'Georgia', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Georgia', 'signals' ); ?></option>
165
- <option value="Times New Roman"<?php selected( 'Times New Roman', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Times New Roman', 'signals' ); ?></option>
166
- <option value="Tahoma"<?php selected( 'Tahoma', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Tahoma', 'signals' ); ?></option>
167
- <option value="Verdana"<?php selected( 'Verdana', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Verdana', 'signals' ); ?></option>
168
- <option value="Geneva"<?php selected( 'Geneva', $signals_csmm_options['secondary_font'] ); ?>><?php _e( 'Geneva', 'signals' ); ?></option>
169
  <option disabled>-- via google --</option>
170
  <?php
171
 
133
  <label for="signals_csmm_header_font" class="signals-strong"><?php _e( 'Header Font', 'signals' ); ?></label>
134
 
135
  <select name="signals_csmm_header_font" id="signals_csmm_header_font" class="signals-google-fonts">
136
+ <option value="Arial"<?php selected( 'Arial', $signals_csmm_options['header_font'] ); ?>>Arial</option>
137
+ <option value="Helvetica"<?php selected( 'Helvetica', $signals_csmm_options['header_font'] ); ?>>Helvetica</option>
138
+ <option value="Georgia"<?php selected( 'Georgia', $signals_csmm_options['header_font'] ); ?>>Georgia</option>
139
+ <option value="Times New Roman"<?php selected( 'Times New Roman', $signals_csmm_options['header_font'] ); ?>>Times New Roman</option>
140
+ <option value="Tahoma"<?php selected( 'Tahoma', $signals_csmm_options['header_font'] ); ?>>Tahoma</option>
141
+ <option value="Verdana"<?php selected( 'Verdana', $signals_csmm_options['header_font'] ); ?>>Verdana</option>
142
+ <option value="Geneva"<?php selected( 'Geneva', $signals_csmm_options['header_font'] ); ?>>Geneva</option>
143
  <option disabled>-- via google --</option>
144
  <?php
145
 
159
  <label for="signals_csmm_secondary_font" class="signals-strong"><?php _e( 'Secondary Font', 'signals' ); ?></label>
160
 
161
  <select name="signals_csmm_secondary_font" id="signals_csmm_secondary_font" class="signals-google-fonts">
162
+ <option value="Arial"<?php selected( 'Arial', $signals_csmm_options['secondary_font'] ); ?>>Arial</option>
163
+ <option value="Helvetica"<?php selected( 'Helvetica', $signals_csmm_options['secondary_font'] ); ?>>Helvetica</option>
164
+ <option value="Georgia"<?php selected( 'Georgia', $signals_csmm_options['secondary_font'] ); ?>>Georgia</option>
165
+ <option value="Times New Roman"<?php selected( 'Times New Roman', $signals_csmm_options['secondary_font'] ); ?>>Times New Roman</option>
166
+ <option value="Tahoma"<?php selected( 'Tahoma', $signals_csmm_options['secondary_font'] ); ?>>Tahoma</option>
167
+ <option value="Verdana"<?php selected( 'Verdana', $signals_csmm_options['secondary_font'] ); ?>>Verdana</option>
168
+ <option value="Geneva"<?php selected( 'Geneva', $signals_csmm_options['secondary_font'] ); ?>>Geneva</option>
169
  <option disabled>-- via google --</option>
170
  <?php
171
 
framework/admin/views/settings-email.php CHANGED
@@ -31,7 +31,7 @@
31
  // Checking if the API key is present in the database
32
  if ( ! empty( $signals_csmm_options['mailchimp_api'] ) ) {
33
  // Grabbing lists using the MailChimp API
34
- $signals_api = new MailChimp( $signals_csmm_options['mailchimp_api'] );
35
  $signals_lists = $signals_api->call( 'lists/list',
36
  array (
37
  'apikey' => $signals_csmm_options['mailchimp_api']
@@ -58,6 +58,38 @@
58
 
59
  ?>
60
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  </div>
62
  </div>
63
  </div><!-- #email -->
31
  // Checking if the API key is present in the database
32
  if ( ! empty( $signals_csmm_options['mailchimp_api'] ) ) {
33
  // Grabbing lists using the MailChimp API
34
+ $signals_api = new Signals_MailChimp( $signals_csmm_options['mailchimp_api'] );
35
  $signals_lists = $signals_api->call( 'lists/list',
36
  array (
37
  'apikey' => $signals_csmm_options['mailchimp_api']
58
 
59
  ?>
60
  </div>
61
+
62
+ <div class="signals-double-group signals-clearfix">
63
+ <div class="signals-form-group">
64
+ <label for="signals_csmm_message_noemail" class="signals-strong"><?php _e( 'Message: No Email', 'signals' ); ?></label>
65
+ <input type="text" name="signals_csmm_message_noemail" id="signals_csmm_message_noemail" value="<?php echo esc_attr_e( $signals_csmm_options['message_noemail'] ); ?>" placeholder="<?php esc_attr_e( 'Message when email is not provided', 'signals' ); ?>" class="signals-form-control">
66
+
67
+ <p class="signals-form-help-block"><?php _e( 'Provide error message to show if the user forgets to provide email address.', 'signals' ); ?></p>
68
+ </div>
69
+
70
+ <div class="signals-form-group">
71
+ <label for="signals_csmm_message_subscribed" class="signals-strong"><?php _e( 'Message: Already Subscribed', 'signals' ); ?></label>
72
+ <input type="text" name="signals_csmm_message_subscribed" id="signals_csmm_message_subscribed" value="<?php echo esc_attr_e( $signals_csmm_options['message_subscribed'] ); ?>" placeholder="<?php esc_attr_e( 'Message when user is already subscribed', 'signals' ); ?>" class="signals-form-control">
73
+
74
+ <p class="signals-form-help-block"><?php _e( 'Provide message to show if the user is already subscribed to the mailing list.', 'signals' ); ?></p>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="signals-double-group signals-clearfix">
79
+ <div class="signals-form-group">
80
+ <label for="signals_csmm_message_wrong" class="signals-strong"><?php _e( 'Message: General Error', 'signals' ); ?></label>
81
+ <input type="text" name="signals_csmm_message_wrong" id="signals_csmm_message_wrong" value="<?php echo esc_attr_e( $signals_csmm_options['message_wrong'] ); ?>" placeholder="<?php esc_attr_e( 'Message when anything goes wrong while subscribing', 'signals' ); ?>" class="signals-form-control">
82
+
83
+ <p class="signals-form-help-block"><?php _e( 'Provide general error message to show if anything goes wrong while subscribing.', 'signals' ); ?></p>
84
+ </div>
85
+
86
+ <div class="signals-form-group">
87
+ <label for="signals_csmm_message_done" class="signals-strong"><?php _e( 'Message: Successfully Subscribed', 'signals' ); ?></label>
88
+ <input type="text" name="signals_csmm_message_done" id="signals_csmm_message_done" value="<?php echo esc_attr_e( $signals_csmm_options['message_done'] ); ?>" placeholder="<?php esc_attr_e( 'Success message when the user gets subscribed', 'signals' ); ?>" class="signals-form-control">
89
+
90
+ <p class="signals-form-help-block"><?php _e( 'Provide message to show when the user gets subscribed successfully.', 'signals' ); ?></p>
91
+ </div>
92
+ </div>
93
  </div>
94
  </div>
95
  </div><!-- #email -->
framework/admin/views/settings-form.php CHANGED
@@ -154,6 +154,38 @@
154
  <p class="signals-form-help-block"><?php _e( 'Select border color for the button on mouse hover.', 'signals' ); ?></p>
155
  </div>
156
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  </div>
158
  </div>
159
  </div><!-- #form -->
154
  <p class="signals-form-help-block"><?php _e( 'Select border color for the button on mouse hover.', 'signals' ); ?></p>
155
  </div>
156
  </div>
157
+
158
+ <div class="signals-double-group signals-clearfix">
159
+ <div class="signals-form-group">
160
+ <label for="signals_csmm_success_bg" class="signals-strong"><?php _e( 'Success Message Background Color', 'signals' ); ?></span></label>
161
+ <input type="text" name="signals_csmm_success_bg" id="signals_csmm_success_bg" value="<?php esc_attr_e( $signals_csmm_options['success_background'] ); ?>" placeholder="<?php _e( 'Background color for the success message', 'signals' ); ?>" class="signals-form-control color {required:false}">
162
+
163
+ <p class="signals-form-help-block"><?php _e( 'Select background color for the success message.', 'signals' ); ?></p>
164
+ </div>
165
+
166
+ <div class="signals-form-group">
167
+ <label for="signals_csmm_success_color" class="signals-strong"><?php _e( 'Success Message Text Color', 'signals' ); ?> <span class="signals-red-color"></span></label>
168
+ <input type="text" name="signals_csmm_success_color" id="signals_csmm_success_color" value="<?php esc_attr_e( $signals_csmm_options['success_color'] ); ?>" placeholder="<?php _e( 'Text color for the success message', 'signals' ); ?>" class="signals-form-control color {required:false}">
169
+
170
+ <p class="signals-form-help-block"><?php _e( 'Select text color for the success message.', 'signals' ); ?></p>
171
+ </div>
172
+ </div>
173
+
174
+ <div class="signals-double-group signals-clearfix">
175
+ <div class="signals-form-group">
176
+ <label for="signals_csmm_error_bg" class="signals-strong"><?php _e( 'Error Message Background Color', 'signals' ); ?></span></label>
177
+ <input type="text" name="signals_csmm_error_bg" id="signals_csmm_error_bg" value="<?php esc_attr_e( $signals_csmm_options['error_background'] ); ?>" placeholder="<?php _e( 'Background color for the error message', 'signals' ); ?>" class="signals-form-control color {required:false}">
178
+
179
+ <p class="signals-form-help-block"><?php _e( 'Select background color for the error message.', 'signals' ); ?></p>
180
+ </div>
181
+
182
+ <div class="signals-form-group">
183
+ <label for="signals_csmm_error_color" class="signals-strong"><?php _e( 'Error Message Text Color', 'signals' ); ?> <span class="signals-red-color"></span></label>
184
+ <input type="text" name="signals_csmm_error_color" id="signals_csmm_error_color" value="<?php esc_attr_e( $signals_csmm_options['error_color'] ); ?>" placeholder="<?php _e( 'Text color for the error message', 'signals' ); ?>" class="signals-form-control color {required:false}">
185
+
186
+ <p class="signals-form-help-block"><?php _e( 'Select text color for the error message.', 'signals' ); ?></p>
187
+ </div>
188
+ </div>
189
  </div>
190
  </div>
191
  </div><!-- #form -->
framework/admin/views/settings-preview.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Preview view for the plugin
5
+ *
6
+ * @link http://www.69signals.com
7
+ * @since 1.0
8
+ * @package Signals_Maintenance_Mode
9
+ */
10
+
11
+ ?>
12
+
13
+ <div class="signals-tile" id="preview">
14
+ <div class="signals-tile-body">
15
+ <div class="signals-tile-title"><?php _e( 'PREVIEW', 'signals' ); ?></div>
16
+ <p><?php _e( 'You can preview the maintenance page to see how it will look once the maintenance mode is turned on. Clicking the button below will open the preview in a new window.', 'signals' ); ?></p>
17
+
18
+ <div class="signals-section-content">
19
+ <a href="<?php echo SIGNALS_CSMM_URL; ?>/framework/admin/preview.php" class="signals-btn" target="_blank"><strong><?php _e( 'Preview Maintenance Page', 'signals' ); ?></strong></a>
20
+ </div>
21
+ </div>
22
+ </div><!-- #preview -->
framework/admin/views/settings.php CHANGED
@@ -36,6 +36,7 @@ require_once 'header.php';
36
  <li><a href="#design"><?php _e( 'Design', 'signals' ); ?></a></li>
37
  <li><a href="#form"><?php _e( 'Form', 'signals' ); ?></a></li>
38
  <li><a href="#advanced"><?php _e( 'Advanced', 'signals' ); ?></a></li>
 
39
  <li><a href="#support"><?php _e( 'Support', 'signals' ); ?></a></li>
40
  <li><a href="#about"><?php _e( 'About', 'signals' ); ?></a></li>
41
  </ul>
@@ -50,6 +51,7 @@ require_once 'header.php';
50
  require_once 'settings-design.php'; // design
51
  require_once 'settings-form.php'; // form
52
  require_once 'settings-advanced.php'; // advanced
 
53
  require_once 'settings-support.php'; // support
54
  require_once 'settings-about.php'; // about
55
 
36
  <li><a href="#design"><?php _e( 'Design', 'signals' ); ?></a></li>
37
  <li><a href="#form"><?php _e( 'Form', 'signals' ); ?></a></li>
38
  <li><a href="#advanced"><?php _e( 'Advanced', 'signals' ); ?></a></li>
39
+ <li><a href="#preview"><?php _e( 'Preview', 'signals' ); ?></a></li>
40
  <li><a href="#support"><?php _e( 'Support', 'signals' ); ?></a></li>
41
  <li><a href="#about"><?php _e( 'About', 'signals' ); ?></a></li>
42
  </ul>
51
  require_once 'settings-design.php'; // design
52
  require_once 'settings-form.php'; // form
53
  require_once 'settings-advanced.php'; // advanced
54
+ require_once 'settings-preview.php'; // preview
55
  require_once 'settings-support.php'; // support
56
  require_once 'settings-about.php'; // about
57
 
framework/langs/en_US.mo CHANGED
Binary file
framework/langs/en_US.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Minimal Coming Soon & Maintenance Mode\n"
4
- "POT-Creation-Date: 2015-01-20 23:57+0530\n"
5
- "PO-Revision-Date: 2015-01-20 23:57+0530\n"
6
  "Last-Translator: 69signals <ping@69signals.com>\n"
7
  "Language-Team: 69signals <ping@69signals.com>\n"
8
  "Language: en_US\n"
@@ -16,7 +16,7 @@ msgstr ""
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
- #: framework/admin/init.php:15 framework/admin/views/settings.php:39
20
  msgid "Support"
21
  msgstr ""
22
 
@@ -32,15 +32,15 @@ msgstr ""
32
  msgid "Maintenance Mode"
33
  msgstr ""
34
 
35
- #: framework/admin/settings.php:166
36
  msgid "Please fill in both the fields to create your support ticket."
37
  msgstr ""
38
 
39
- #: framework/admin/settings.php:185
40
  msgid "We have received your support ticket. We will get back to you shortly!"
41
  msgstr ""
42
 
43
- #: framework/admin/settings.php:191
44
  msgid ""
45
  "There was an error creating the support ticket. You can try again later or "
46
  "send us an email directly to <strong>support@69signals.com</strong>"
@@ -55,7 +55,7 @@ msgid "69signals"
55
  msgstr ""
56
 
57
  #: framework/admin/views/settings-about.php:15
58
- msgid "We are a creative digital agency."
59
  msgstr ""
60
 
61
  #: framework/admin/views/settings-about.php:16
@@ -103,6 +103,8 @@ msgid ""
103
  msgstr ""
104
 
105
  #: framework/admin/views/settings-advanced.php:28
 
 
106
  msgid "Custom HTML"
107
  msgstr ""
108
 
@@ -125,7 +127,8 @@ msgstr ""
125
  #: framework/admin/views/settings-advanced.php:33
126
  msgid ""
127
  "To insert subscription form anywhere in the html, simply use the placeholder "
128
- "<strong>{{form}}</strong> and you are done."
 
129
  msgstr ""
130
 
131
  #: framework/admin/views/settings-advanced.php:37
@@ -169,6 +172,7 @@ msgid "Provide title for the maintenance page."
169
  msgstr ""
170
 
171
  #: framework/admin/views/settings-basic.php:37
 
172
  msgid "Header Text"
173
  msgstr ""
174
 
@@ -179,6 +183,7 @@ msgid ""
179
  msgstr ""
180
 
181
  #: framework/admin/views/settings-basic.php:44
 
182
  msgid "Secondary Text"
183
  msgstr ""
184
 
@@ -229,6 +234,37 @@ msgid ""
229
  "Maintenance Mode page even if the plugin is enabled."
230
  msgstr ""
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  #: framework/admin/views/settings-design.php:15
233
  msgid "DESIGN"
234
  msgstr ""
@@ -239,10 +275,6 @@ msgid ""
239
  "of the maintenance page design as per your requirements."
240
  msgstr ""
241
 
242
- #: framework/admin/views/settings-design.php:22
243
- msgid "Logo"
244
- msgstr ""
245
-
246
  #: framework/admin/views/settings-design.php:27
247
  #: framework/admin/views/settings-design.php:48
248
  #: framework/admin/views/settings-design.php:69
@@ -347,41 +379,6 @@ msgstr ""
347
  msgid "Header Font"
348
  msgstr ""
349
 
350
- #: framework/admin/views/settings-design.php:136
351
- #: framework/admin/views/settings-design.php:162
352
- msgid "Arial"
353
- msgstr ""
354
-
355
- #: framework/admin/views/settings-design.php:137
356
- #: framework/admin/views/settings-design.php:163
357
- msgid "Helvetica"
358
- msgstr ""
359
-
360
- #: framework/admin/views/settings-design.php:138
361
- #: framework/admin/views/settings-design.php:164
362
- msgid "Georgia"
363
- msgstr ""
364
-
365
- #: framework/admin/views/settings-design.php:139
366
- #: framework/admin/views/settings-design.php:165
367
- msgid "Times New Roman"
368
- msgstr ""
369
-
370
- #: framework/admin/views/settings-design.php:140
371
- #: framework/admin/views/settings-design.php:166
372
- msgid "Tahoma"
373
- msgstr ""
374
-
375
- #: framework/admin/views/settings-design.php:141
376
- #: framework/admin/views/settings-design.php:167
377
- msgid "Verdana"
378
- msgstr ""
379
-
380
- #: framework/admin/views/settings-design.php:142
381
- #: framework/admin/views/settings-design.php:168
382
- msgid "Geneva"
383
- msgstr ""
384
-
385
  #: framework/admin/views/settings-design.php:154
386
  #: framework/admin/views/settings-design.php:180
387
  msgid "This is how this font is going to look!"
@@ -523,6 +520,43 @@ msgid ""
523
  "option. Your lists will appear over here."
524
  msgstr ""
525
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
  #: framework/admin/views/settings-form.php:15
527
  msgid "FORM"
528
  msgstr ""
@@ -706,6 +740,69 @@ msgstr ""
706
  msgid "Select border color for the button on mouse hover."
707
  msgstr ""
708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
709
  #: framework/admin/views/settings-support.php:15
710
  msgid "SUPPORT"
711
  msgstr ""
@@ -760,19 +857,19 @@ msgstr ""
760
  msgid "Design"
761
  msgstr ""
762
 
763
- #: framework/admin/views/settings.php:37
764
- msgid "Form"
765
- msgstr ""
766
-
767
  #: framework/admin/views/settings.php:38
768
  msgid "Advanced"
769
  msgstr ""
770
 
771
- #: framework/admin/views/settings.php:40
 
 
 
 
772
  msgid "About"
773
  msgstr ""
774
 
775
- #: framework/admin/views/settings.php:62
776
  msgid "Save Changes"
777
  msgstr ""
778
 
@@ -788,22 +885,19 @@ msgstr ""
788
  msgid "Subscribe"
789
  msgstr ""
790
 
791
- #: framework/public/views/blank.php:61 framework/public/views/html.php:72
792
- msgid "Please provide your email address."
793
- msgstr ""
794
-
795
- #: framework/public/views/blank.php:80 framework/public/views/html.php:91
796
  msgid "Oops! Something went wrong."
797
  msgstr ""
798
 
799
- #: framework/public/views/blank.php:83 framework/public/views/html.php:94
800
  msgid "You are already subscribed!"
801
  msgstr ""
802
 
803
- #: framework/public/views/blank.php:86 framework/public/views/html.php:97
804
  msgid "Thank you! We'll be in touch!"
805
  msgstr ""
806
 
807
- #: framework/public/views/blank.php:90 framework/public/views/html.php:101
808
- msgid "Please provide a valid email address."
809
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Minimal Coming Soon & Maintenance Mode\n"
4
+ "POT-Creation-Date: 2015-08-10 07:21+0530\n"
5
+ "PO-Revision-Date: 2015-08-10 07:21+0530\n"
6
  "Last-Translator: 69signals <ping@69signals.com>\n"
7
  "Language-Team: 69signals <ping@69signals.com>\n"
8
  "Language: en_US\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: framework/admin/init.php:15 framework/admin/views/settings.php:40
20
  msgid "Support"
21
  msgstr ""
22
 
32
  msgid "Maintenance Mode"
33
  msgstr ""
34
 
35
+ #: framework/admin/settings.php:171
36
  msgid "Please fill in both the fields to create your support ticket."
37
  msgstr ""
38
 
39
+ #: framework/admin/settings.php:190
40
  msgid "We have received your support ticket. We will get back to you shortly!"
41
  msgstr ""
42
 
43
+ #: framework/admin/settings.php:196
44
  msgid ""
45
  "There was an error creating the support ticket. You can try again later or "
46
  "send us an email directly to <strong>support@69signals.com</strong>"
55
  msgstr ""
56
 
57
  #: framework/admin/views/settings-about.php:15
58
+ msgid "We are a Creative Digital Marketplace."
59
  msgstr ""
60
 
61
  #: framework/admin/views/settings-about.php:16
103
  msgstr ""
104
 
105
  #: framework/admin/views/settings-advanced.php:28
106
+ #: framework/admin/views/settings-basic.php:95
107
+ #: framework/admin/views/settings-basic.php:108
108
  msgid "Custom HTML"
109
  msgstr ""
110
 
127
  #: framework/admin/views/settings-advanced.php:33
128
  msgid ""
129
  "To insert subscription form anywhere in the html, simply use the placeholder "
130
+ "<strong>{{form}}</strong> and you are done. This should only be used if you "
131
+ "have enabled the above option to use custom HTML only."
132
  msgstr ""
133
 
134
  #: framework/admin/views/settings-advanced.php:37
172
  msgstr ""
173
 
174
  #: framework/admin/views/settings-basic.php:37
175
+ #: framework/admin/views/settings-basic.php:105
176
  msgid "Header Text"
177
  msgstr ""
178
 
183
  msgstr ""
184
 
185
  #: framework/admin/views/settings-basic.php:44
186
+ #: framework/admin/views/settings-basic.php:106
187
  msgid "Secondary Text"
188
  msgstr ""
189
 
234
  "Maintenance Mode page even if the plugin is enabled."
235
  msgstr ""
236
 
237
+ #: framework/admin/views/settings-basic.php:83
238
+ msgid "Arrange Elements"
239
+ msgstr ""
240
+
241
+ #: framework/admin/views/settings-basic.php:84
242
+ msgid ""
243
+ "Select the order in which you would like to display the sections on the "
244
+ "maintenance page. To change the order, simply drag the items and arrange as "
245
+ "per your preference."
246
+ msgstr ""
247
+
248
+ #: framework/admin/views/settings-basic.php:104
249
+ #: framework/admin/views/settings-design.php:22
250
+ msgid "Logo"
251
+ msgstr ""
252
+
253
+ #: framework/admin/views/settings-basic.php:107
254
+ #: framework/admin/views/settings.php:37
255
+ msgid "Form"
256
+ msgstr ""
257
+
258
+ #: framework/admin/views/settings-basic.php:117
259
+ msgid "Analytics Code"
260
+ msgstr ""
261
+
262
+ #: framework/admin/views/settings-basic.php:120
263
+ msgid ""
264
+ "Provide analytics code for the maintenance page. It's good to have tracking "
265
+ "installed :)"
266
+ msgstr ""
267
+
268
  #: framework/admin/views/settings-design.php:15
269
  msgid "DESIGN"
270
  msgstr ""
275
  "of the maintenance page design as per your requirements."
276
  msgstr ""
277
 
 
 
 
 
278
  #: framework/admin/views/settings-design.php:27
279
  #: framework/admin/views/settings-design.php:48
280
  #: framework/admin/views/settings-design.php:69
379
  msgid "Header Font"
380
  msgstr ""
381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  #: framework/admin/views/settings-design.php:154
383
  #: framework/admin/views/settings-design.php:180
384
  msgid "This is how this font is going to look!"
520
  "option. Your lists will appear over here."
521
  msgstr ""
522
 
523
+ #: framework/admin/views/settings-email.php:64
524
+ msgid "Message: No Email"
525
+ msgstr ""
526
+
527
+ #: framework/admin/views/settings-email.php:67
528
+ msgid ""
529
+ "Provide error message to show if the user forgets to provide email address."
530
+ msgstr ""
531
+
532
+ #: framework/admin/views/settings-email.php:71
533
+ msgid "Message: Already Subscribed"
534
+ msgstr ""
535
+
536
+ #: framework/admin/views/settings-email.php:74
537
+ msgid ""
538
+ "Provide message to show if the user is already subscribed to the mailing "
539
+ "list."
540
+ msgstr ""
541
+
542
+ #: framework/admin/views/settings-email.php:80
543
+ msgid "Message: General Error"
544
+ msgstr ""
545
+
546
+ #: framework/admin/views/settings-email.php:83
547
+ msgid ""
548
+ "Provide general error message to show if anything goes wrong while "
549
+ "subscribing."
550
+ msgstr ""
551
+
552
+ #: framework/admin/views/settings-email.php:87
553
+ msgid "Message: Successfully Subscribed"
554
+ msgstr ""
555
+
556
+ #: framework/admin/views/settings-email.php:90
557
+ msgid "Provide message to show when the user gets subscribed successfully."
558
+ msgstr ""
559
+
560
  #: framework/admin/views/settings-form.php:15
561
  msgid "FORM"
562
  msgstr ""
740
  msgid "Select border color for the button on mouse hover."
741
  msgstr ""
742
 
743
+ #: framework/admin/views/settings-form.php:160
744
+ msgid "Success Message Background Color"
745
+ msgstr ""
746
+
747
+ #: framework/admin/views/settings-form.php:161
748
+ msgid "Background color for the success message"
749
+ msgstr ""
750
+
751
+ #: framework/admin/views/settings-form.php:163
752
+ msgid "Select background color for the success message."
753
+ msgstr ""
754
+
755
+ #: framework/admin/views/settings-form.php:167
756
+ msgid "Success Message Text Color"
757
+ msgstr ""
758
+
759
+ #: framework/admin/views/settings-form.php:168
760
+ msgid "Text color for the success message"
761
+ msgstr ""
762
+
763
+ #: framework/admin/views/settings-form.php:170
764
+ msgid "Select text color for the success message."
765
+ msgstr ""
766
+
767
+ #: framework/admin/views/settings-form.php:176
768
+ msgid "Error Message Background Color"
769
+ msgstr ""
770
+
771
+ #: framework/admin/views/settings-form.php:177
772
+ msgid "Background color for the error message"
773
+ msgstr ""
774
+
775
+ #: framework/admin/views/settings-form.php:179
776
+ msgid "Select background color for the error message."
777
+ msgstr ""
778
+
779
+ #: framework/admin/views/settings-form.php:183
780
+ msgid "Error Message Text Color"
781
+ msgstr ""
782
+
783
+ #: framework/admin/views/settings-form.php:184
784
+ msgid "Text color for the error message"
785
+ msgstr ""
786
+
787
+ #: framework/admin/views/settings-form.php:186
788
+ msgid "Select text color for the error message."
789
+ msgstr ""
790
+
791
+ #: framework/admin/views/settings-preview.php:15
792
+ msgid "PREVIEW"
793
+ msgstr ""
794
+
795
+ #: framework/admin/views/settings-preview.php:16
796
+ msgid ""
797
+ "You can preview the maintenance page to see how it will look once the "
798
+ "maintenance mode is turned on. Clicking the button below will open the "
799
+ "preview in a new window."
800
+ msgstr ""
801
+
802
+ #: framework/admin/views/settings-preview.php:19
803
+ msgid "Preview Maintenance Page"
804
+ msgstr ""
805
+
806
  #: framework/admin/views/settings-support.php:15
807
  msgid "SUPPORT"
808
  msgstr ""
857
  msgid "Design"
858
  msgstr ""
859
 
 
 
 
 
860
  #: framework/admin/views/settings.php:38
861
  msgid "Advanced"
862
  msgstr ""
863
 
864
+ #: framework/admin/views/settings.php:39
865
+ msgid "Preview"
866
+ msgstr ""
867
+
868
+ #: framework/admin/views/settings.php:41
869
  msgid "About"
870
  msgstr ""
871
 
872
+ #: framework/admin/views/settings.php:64
873
  msgid "Save Changes"
874
  msgstr ""
875
 
885
  msgid "Subscribe"
886
  msgstr ""
887
 
888
+ #: framework/public/include/functions.php:42
889
+ #: framework/public/include/functions.php:44
 
 
 
890
  msgid "Oops! Something went wrong."
891
  msgstr ""
892
 
893
+ #: framework/public/include/functions.php:43
894
  msgid "You are already subscribed!"
895
  msgstr ""
896
 
897
+ #: framework/public/include/functions.php:45
898
  msgid "Thank you! We'll be in touch!"
899
  msgstr ""
900
 
901
+ #: framework/public/views/blank.php:62 framework/public/views/html.php:68
902
+ msgid "Please provide your email address."
903
  msgstr ""
framework/public/css/public.css CHANGED
@@ -123,22 +123,23 @@ a:focus {
123
  }
124
  .logo {
125
  display: inline-block;
126
- margin-bottom: 30px;
127
  }
128
  .header-text {
129
  font-size: 28px;
130
  line-height: 1.4;
131
- margin-bottom: 20px;
132
  }
133
  .secondary-text {
134
  font-size: 14px;
 
135
  }
136
  .subscription {
137
- margin-top: 30px;
138
  }
139
  .anti-spam {
140
  font-size: 11px;
141
- margin-top: 15px;
142
  color: #bbbbbb;
143
  }
144
  @media (max-width: 767px) {
@@ -153,24 +154,14 @@ a:focus {
153
  */
154
 
155
  .signals-alert {
156
- color: #ce8f22;
157
- background-color: #fffcee;
158
- background-image: none;
159
- box-shadow: none;
160
- text-shadow: none;
161
  font-size: 14px;
162
  padding: 5px 19px 5px 10px;
163
  margin-bottom: 10px;
164
  }
165
  .signals-alert-success {
166
- color: #438a85;
167
- background-color: #f3faf8;
168
- }
169
- .signals-alert-info {
170
- color: #246a8e;
171
- background-color: #ebf6fb;
172
  }
173
  .signals-alert-danger {
174
- color: #e76e70;
175
- background-color: #fff6f4;
176
  }
123
  }
124
  .logo {
125
  display: inline-block;
126
+ margin: 15px 0;
127
  }
128
  .header-text {
129
  font-size: 28px;
130
  line-height: 1.4;
131
+ margin: 15px 0;
132
  }
133
  .secondary-text {
134
  font-size: 14px;
135
+ margin: 15px 0;
136
  }
137
  .subscription {
138
+ margin: 15px 0;
139
  }
140
  .anti-spam {
141
  font-size: 11px;
142
+ margin-top: 10px;
143
  color: #bbbbbb;
144
  }
145
  @media (max-width: 767px) {
154
  */
155
 
156
  .signals-alert {
157
+ color: #ffffff;
 
 
 
 
158
  font-size: 14px;
159
  padding: 5px 19px 5px 10px;
160
  margin-bottom: 10px;
161
  }
162
  .signals-alert-success {
163
+ background-color: #90c695;
 
 
 
 
 
164
  }
165
  .signals-alert-danger {
166
+ background-color: #e08283;
 
167
  }
framework/public/include/functions.php CHANGED
@@ -33,13 +33,19 @@ function csmm_render_template( $options ) {
33
  ob_start();
34
 
35
 
36
- // Checking for required options required for the plugin
37
- if ( empty( $options['title'] ) ) : $options['title'] = __( 'Maintainance Mode', 'signals' ); endif;
38
- if ( empty( $options['input_text'] ) ) : $options['input_text'] = __( 'Enter your email address..', 'signals' ); endif;
39
- if ( empty( $options['button_text'] ) ) : $options['button_text'] = __( 'Subscribe', 'signals' ); endif;
40
 
 
 
 
 
 
41
 
42
- // The template file for the plugin
 
43
  if ( '1' == $options['disable_settings'] ) {
44
  require_once SIGNALS_CSMM_PATH . 'framework/public/views/blank.php';
45
  } else {
@@ -53,7 +59,6 @@ function csmm_render_template( $options ) {
53
  }
54
 
55
 
56
-
57
  // To check the referrer
58
  function csmm_check_referrer() {
59
 
@@ -97,7 +102,6 @@ function csmm_check_referrer() {
97
  }
98
 
99
 
100
-
101
  // Function to match the user agent with the crawlers array
102
  function csmm_string_to_array( $str, $array ) {
103
 
33
  ob_start();
34
 
35
 
36
+ // Checking for options required for the plugin
37
+ if ( empty( $options['title'] ) ) : $options['title'] = __( 'Maintainance Mode', 'signals' ); endif;
38
+ if ( empty( $options['input_text'] ) ) : $options['input_text'] = __( 'Enter your email address..', 'signals' ); endif;
39
+ if ( empty( $options['button_text'] ) ) : $options['button_text'] = __( 'Subscribe', 'signals' ); endif;
40
 
41
+ // Response message
42
+ if ( empty( $options['message_noemail'] ) ) : $options['message_noemail'] =__( 'Oops! Something went wrong.', 'signals' ); endif;
43
+ if ( empty( $options['message_subscribed'] ) ) : $options['message_subscribed'] =__( 'You are already subscribed!', 'signals' ); endif;
44
+ if ( empty( $options['message_wrong'] ) ) : $options['message_wrong'] =__( 'Oops! Something went wrong.', 'signals' ); endif;
45
+ if ( empty( $options['message_done'] ) ) : $options['message_done'] =__( 'Thank you! We\'ll be in touch!', 'signals' ); endif;
46
 
47
+
48
+ // Template file
49
  if ( '1' == $options['disable_settings'] ) {
50
  require_once SIGNALS_CSMM_PATH . 'framework/public/views/blank.php';
51
  } else {
59
  }
60
 
61
 
 
62
  // To check the referrer
63
  function csmm_check_referrer() {
64
 
102
  }
103
 
104
 
 
105
  // Function to match the user agent with the crawlers array
106
  function csmm_string_to_array( $str, $array ) {
107
 
framework/public/include/styles.php CHANGED
@@ -241,6 +241,40 @@ if ( '1' == $options['ignore_form_styles'] ) {
241
 
242
  echo '}' . "\r\n";
243
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  }
245
 
246
 
241
 
242
  echo '}' . "\r\n";
243
  }
244
+
245
+ // Message: success
246
+ if ( ! empty( $options['success_background'] ) || ! empty( $options['success_color'] ) ) {
247
+ echo '.signals-alert-success{';
248
+
249
+ // success background
250
+ if ( ! empty( $options['success_background'] ) ) {
251
+ echo 'background:#' . $options['success_background'] . ';';
252
+ }
253
+
254
+ // success color
255
+ if ( ! empty( $options['success_color'] ) ) {
256
+ echo 'color:#' . $options['success_color'] . ';';
257
+ }
258
+
259
+ echo '}' . "\r\n";
260
+ }
261
+
262
+ // Message: error
263
+ if ( ! empty( $options['error_background'] ) || ! empty( $options['error_color'] ) ) {
264
+ echo '.signals-alert-danger{';
265
+
266
+ // error background
267
+ if ( ! empty( $options['error_background'] ) ) {
268
+ echo 'background:#' . $options['error_background'] . ';';
269
+ }
270
+
271
+ // error color
272
+ if ( ! empty( $options['error_color'] ) ) {
273
+ echo 'color:#' . $options['error_color'] . ';';
274
+ }
275
+
276
+ echo '}' . "\r\n";
277
+ }
278
  }
279
 
280
 
framework/public/views/blank.php CHANGED
@@ -35,9 +35,9 @@
35
 
36
  // user defined css for the blank mode
37
  if ( ! empty( $options['custom_css'] ) ) {
38
- echo '<style>' . "\r\n";
39
- echo stripslashes( $options['custom_css'] ) . "\r\n";
40
- echo '</style>' . "\r\n";
41
  }
42
 
43
  ?>
@@ -49,6 +49,7 @@
49
  // Nothing else will be included here since we are serving a blank template
50
  $custom_html = stripslashes( $options['custom_html'] );
51
 
 
52
  if ( ! empty( $custom_html ) && false !== strpos( $custom_html, '{{form}}' ) ) {
53
  if ( ! empty( $options['mailchimp_api'] ) && ! empty( $options['mailchimp_list'] ) ) {
54
  // Checking if the form is submitted or not
@@ -65,11 +66,10 @@
65
  if ( strpos( $signals_email, '@' ) ) {
66
  require_once SIGNALS_CSMM_PATH . '/framework/admin/include/classes/class-mailchimp.php';
67
 
68
- $signals_connect = new MailChimp( $options['mailchimp_api'] );
69
  $signals_response = $signals_connect->call( 'lists/subscribe', array(
70
  'id' => $options['mailchimp_list'],
71
  'email' => array( 'email' => $signals_email ),
72
- 'double_optin' => false,
73
  'send_welcome' => true
74
  ) );
75
 
@@ -77,17 +77,17 @@
77
  // Showing message as per the response from the mailchimp server
78
  if ( isset( $signals_response['code'] ) && 214 !== $signals_response['code'] ) {
79
  $code = 'danger';
80
- $response = __( 'Oops! Something went wrong.', 'signals' );
81
  } elseif ( isset( $signals_response['code'] ) && 214 === $signals_response['code'] ) {
82
  $code = 'success';
83
- $response = __( 'You are already subscribed!', 'signals' );
84
  } else {
85
  $code = 'success';
86
- $response = __( 'Thank you! We\'ll be in touch!', 'signals' );
87
  }
88
  } else {
89
  $code = 'danger';
90
- $response = __( 'Please provide a valid email address.', 'signals' );
91
  }
92
  }
93
  } // signals_email
@@ -116,8 +116,7 @@
116
 
117
  ?>
118
 
119
-
120
- <!-- Maintenance Mode Plugin by 69signals (http://www.69signals.com) -->
121
- <!-- We are a creative digital agency. We love to weave the web, simple but amazing. We create flawless web and mobile applications. -->
122
  </body>
123
  </html>
35
 
36
  // user defined css for the blank mode
37
  if ( ! empty( $options['custom_css'] ) ) {
38
+ echo '<style>';
39
+ echo stripslashes( $options['custom_css'] );
40
+ echo '</style>';
41
  }
42
 
43
  ?>
49
  // Nothing else will be included here since we are serving a blank template
50
  $custom_html = stripslashes( $options['custom_html'] );
51
 
52
+ // form
53
  if ( ! empty( $custom_html ) && false !== strpos( $custom_html, '{{form}}' ) ) {
54
  if ( ! empty( $options['mailchimp_api'] ) && ! empty( $options['mailchimp_list'] ) ) {
55
  // Checking if the form is submitted or not
66
  if ( strpos( $signals_email, '@' ) ) {
67
  require_once SIGNALS_CSMM_PATH . '/framework/admin/include/classes/class-mailchimp.php';
68
 
69
+ $signals_connect = new Signals_MailChimp( $options['mailchimp_api'] );
70
  $signals_response = $signals_connect->call( 'lists/subscribe', array(
71
  'id' => $options['mailchimp_list'],
72
  'email' => array( 'email' => $signals_email ),
 
73
  'send_welcome' => true
74
  ) );
75
 
77
  // Showing message as per the response from the mailchimp server
78
  if ( isset( $signals_response['code'] ) && 214 !== $signals_response['code'] ) {
79
  $code = 'danger';
80
+ $response = $options['message_wrong'];
81
  } elseif ( isset( $signals_response['code'] ) && 214 === $signals_response['code'] ) {
82
  $code = 'success';
83
+ $response = $options['message_subscribed'];
84
  } else {
85
  $code = 'success';
86
+ $response = $options['message_done'];
87
  }
88
  } else {
89
  $code = 'danger';
90
+ $response = $options['message_noemail'];
91
  }
92
  }
93
  } // signals_email
116
 
117
  ?>
118
 
119
+ <!-- Maintenance Mode Plugin by 69signals (http://www.69signals.com) -->
120
+ <!-- We are a creative digital marketplace. We love to weave the web, simple but amazing. We create flawless web and mobile applications. -->
 
121
  </body>
122
  </html>
framework/public/views/html.php CHANGED
@@ -37,30 +37,26 @@
37
  <div class="maintenance-mode">
38
  <div class="s-container">
39
  <div class="content">
40
-
41
  <?php
42
 
43
  // Logo
44
  if ( ! empty( $options['logo'] ) ) {
45
- echo '<div class="logo-container">' . "\r\n";
46
- echo '<img src="' . $options['logo'] . '" class="logo" />' . "\r\n";
47
- echo '</div>' . "\r\n";
48
  }
49
 
50
-
51
  // Header text
52
  if ( ! empty( $options['header_text'] ) ) {
53
- echo '<h1 class="header-text">' . stripslashes( $options['header_text'] ) . '</h1>' . "\r\n";
54
  }
55
 
56
-
57
  // Secondary text
58
  if ( ! empty( $options['secondary_text'] ) ) {
59
- echo '<p class="secondary-text">' . stripslashes( $options['secondary_text'] ) . '</p>' . "\r\n";
60
  }
61
 
62
-
63
- // Checking for the mailchimp api. If the api and the list id are present, show the form
64
  if ( ! empty( $options['mailchimp_api'] ) && ! empty( $options['mailchimp_list'] ) ) {
65
  // Checking if the form is submitted or not
66
  if ( isset( $_POST['signals_email'] ) ) {
@@ -68,80 +64,95 @@
68
  $signals_email = strip_tags( $_POST['signals_email'] );
69
 
70
  if ( '' === $signals_email ) {
71
- $signals_msg['code'] = 'danger';
72
- $signals_msg['response'] = __( 'Please provide your email address.', 'signals' );
73
  } else {
74
  $signals_email = filter_var( strtolower( trim( $signals_email ) ), FILTER_SANITIZE_EMAIL );
75
 
76
  if ( strpos( $signals_email, '@' ) ) {
77
  require_once SIGNALS_CSMM_PATH . '/framework/admin/include/classes/class-mailchimp.php';
78
 
79
- $signals_connect = new MailChimp( $options['mailchimp_api'] );
80
  $signals_response = $signals_connect->call( 'lists/subscribe', array(
81
  'id' => $options['mailchimp_list'],
82
  'email' => array( 'email' => $signals_email ),
83
- 'double_optin' => false,
84
  'send_welcome' => true
85
  ) );
86
 
87
 
88
  // Showing message as per the response from the mailchimp server
89
  if ( isset( $signals_response['code'] ) && 214 !== $signals_response['code'] ) {
90
- $signals_msg['code'] = 'danger';
91
- $signals_msg['response'] = __( 'Oops! Something went wrong.', 'signals' );
92
  } elseif ( isset( $signals_response['code'] ) && 214 === $signals_response['code'] ) {
93
- $signals_msg['code'] = 'success';
94
- $signals_msg['response'] = __( 'You are already subscribed!', 'signals' );
95
  } else {
96
- $signals_msg['code'] = 'success';
97
- $signals_msg['response'] = __( 'Thank you! We\'ll be in touch!', 'signals' );
98
  }
99
  } else {
100
- $signals_msg['code'] = 'danger';
101
- $signals_msg['response'] = __( 'Please provide a valid email address.', 'signals' );
102
  }
103
  }
104
  } // signals_email
105
 
106
- ?>
 
 
107
 
108
- <div class="subscription">
109
- <?php
 
110
 
111
- // If the error is set
112
- if ( isset( $signals_msg ) ) {
113
- echo '<div class="signals-alert signals-alert-' . $signals_msg['code'] . '">' . $signals_msg['response'] . '</div>';
114
- }
115
 
116
- ?>
 
 
 
 
117
 
118
- <form role="form" method="post">
119
- <input type="text" name="signals_email" placeholder="<?php esc_attr_e( stripslashes( $options['input_text'] ) ); ?>">
120
- <input type="submit" name="submit" value="<?php esc_attr_e( stripslashes( $options['button_text'] ) ); ?>">
121
- </form>
122
 
123
- <?php
124
 
125
- // If yes, show antispam text
126
- if ( ! empty( $options['antispam_text'] ) ) {
127
- // The best part, we don't do spam!
128
- echo '<p class="anti-spam">' . stripslashes( $options['antispam_text'] ) . '</p>';
129
- }
130
 
131
- ?>
132
- </div>
133
 
134
- <?php
 
 
 
 
 
135
 
136
- } // mailchimp_api || mailchimp_list
 
 
 
 
137
 
138
  ?>
139
  </div><!-- .content -->
140
  </div><!-- .s-container -->
141
  </div><!-- .maintenance-mode -->
142
 
 
 
 
 
 
 
 
 
143
 
144
- <!-- Maintenance Mode Plugin by 69signals (http://www.69signals.com) -->
145
- <!-- We are a creative digital agency. We love to weave the web, simple but amazing. We create flawless web and mobile applications. -->
146
  </body>
147
  </html>
37
  <div class="maintenance-mode">
38
  <div class="s-container">
39
  <div class="content">
 
40
  <?php
41
 
42
  // Logo
43
  if ( ! empty( $options['logo'] ) ) {
44
+ $signals_arrange['logo'] = '<div class="logo-container">' . "\r\n";
45
+ $signals_arrange['logo'] .= '<img src="' . $options['logo'] . '" class="logo" />' . "\r\n";
46
+ $signals_arrange['logo'] .= '</div>' . "\r\n";
47
  }
48
 
 
49
  // Header text
50
  if ( ! empty( $options['header_text'] ) ) {
51
+ $signals_arrange['header'] = '<h1 class="header-text">' . stripslashes( nl2br( $options['header_text'] ) ) . '</h1>' . "\r\n";
52
  }
53
 
 
54
  // Secondary text
55
  if ( ! empty( $options['secondary_text'] ) ) {
56
+ $signals_arrange['secondary'] = '<p class="secondary-text">' . stripslashes( nl2br( $options['secondary_text'] ) ) . '</p>' . "\r\n";
57
  }
58
 
59
+ // Form
 
60
  if ( ! empty( $options['mailchimp_api'] ) && ! empty( $options['mailchimp_list'] ) ) {
61
  // Checking if the form is submitted or not
62
  if ( isset( $_POST['signals_email'] ) ) {
64
  $signals_email = strip_tags( $_POST['signals_email'] );
65
 
66
  if ( '' === $signals_email ) {
67
+ $code = 'danger';
68
+ $response = __( 'Please provide your email address.', 'signals' );
69
  } else {
70
  $signals_email = filter_var( strtolower( trim( $signals_email ) ), FILTER_SANITIZE_EMAIL );
71
 
72
  if ( strpos( $signals_email, '@' ) ) {
73
  require_once SIGNALS_CSMM_PATH . '/framework/admin/include/classes/class-mailchimp.php';
74
 
75
+ $signals_connect = new Signals_MailChimp( $options['mailchimp_api'] );
76
  $signals_response = $signals_connect->call( 'lists/subscribe', array(
77
  'id' => $options['mailchimp_list'],
78
  'email' => array( 'email' => $signals_email ),
 
79
  'send_welcome' => true
80
  ) );
81
 
82
 
83
  // Showing message as per the response from the mailchimp server
84
  if ( isset( $signals_response['code'] ) && 214 !== $signals_response['code'] ) {
85
+ $code = 'danger';
86
+ $response = $options['message_wrong'];
87
  } elseif ( isset( $signals_response['code'] ) && 214 === $signals_response['code'] ) {
88
+ $code = 'success';
89
+ $response = $options['message_subscribed'];
90
  } else {
91
+ $code = 'success';
92
+ $response = $options['message_done'];
93
  }
94
  } else {
95
+ $code = 'danger';
96
+ $response = $options['message_noemail'];
97
  }
98
  }
99
  } // signals_email
100
 
101
+ // Subscription form
102
+ // Displaying errors as well if they are set
103
+ $signals_arrange['form'] = '<div class="subscription">';
104
 
105
+ if ( isset( $code ) && isset( $response ) ) {
106
+ $signals_arrange['form'] .= '<div class="signals-alert signals-alert-' . $code . '">' . $response . '</div>';
107
+ }
108
 
109
+ $signals_arrange['form'] .= '<form role="form" method="post">
110
+ <input type="text" name="signals_email" placeholder="' . esc_attr( $options['input_text'] ) . '">
111
+ <input type="submit" name="submit" value="' . esc_attr( $options['button_text'] ) . '">
112
+ </form>';
113
 
114
+ // antispam text
115
+ if ( ! empty( $options['antispam_text'] ) ) {
116
+ // The best part, we don't do spam!
117
+ $signals_arrange['form'] .= '<p class="anti-spam">' . stripslashes( $options['antispam_text'] ) . '</p>';
118
+ }
119
 
120
+ $signals_arrange['form'] .= '</div>';
 
 
 
121
 
 
122
 
123
+ } // mailchimp_api && mailchimp_list
 
 
 
 
124
 
125
+ // Custom HTML
126
+ $signals_arrange['html'] = stripslashes( $options['custom_html'] );
127
 
128
+ // Let's show the sections now!
129
+ if ( isset( $options['arrange'] ) && '' != $options['arrange'] ) {
130
+ $signals_sections = explode( ',', $options['arrange'] );
131
+ } else {
132
+ $signals_sections = array( 'logo', 'header', 'secondary', 'form', 'html' );
133
+ }
134
 
135
+ foreach ( $signals_sections as $signals_section ) {
136
+ if ( isset( $signals_arrange[$signals_section] ) ) {
137
+ echo $signals_arrange[$signals_section];
138
+ }
139
+ }
140
 
141
  ?>
142
  </div><!-- .content -->
143
  </div><!-- .s-container -->
144
  </div><!-- .maintenance-mode -->
145
 
146
+ <?php
147
+
148
+ // analytics
149
+ if ( isset( $options['analytics'] ) && '' != $options['analytics'] ) {
150
+ echo stripslashes( $options['analytics'] ) . "\r\n";
151
+ }
152
+
153
+ ?>
154
 
155
+ <!-- Maintenance Mode Plugin by 69signals (http://www.69signals.com) -->
156
+ <!-- We are a Creative Digital Marketplace. We love to weave the web, simple but amazing. We create flawless web and mobile applications. -->
157
  </body>
158
  </html>
minimal-coming-soon-maintenance-mode.php CHANGED
@@ -8,9 +8,9 @@
8
  *
9
  *
10
  * Plugin Name: Minimal Coming Soon & Maintenance Mode
11
- * Plugin URI: http://www.69signals.com/minimal-coming-soon-maintenance-mode-plugin.php
12
  * Description: Simply awesome coming soon & maintenance mode plugin for your WordPress blog. Try it to know why there is no other plugin like this one.
13
- * Version: 1.0
14
  * Author: akshitsethi
15
  * Author URI: http://www.69signals.com
16
  * License: GPLv3
@@ -44,17 +44,16 @@ if ( ! defined( 'WPINC' ) ) {
44
  }
45
 
46
 
47
-
48
  /* Constants we will be using throughout the plugin. */
49
  define( 'SIGNALS_CSMM_URL', plugins_url( '', __FILE__ ) );
50
  define( 'SIGNALS_CSMM_PATH', plugin_dir_path( __FILE__ ) );
51
 
52
 
53
-
54
  /**
55
  * For the plugin activation & de-activation.
56
  * We are doing nothing over here.
57
  */
 
58
  function csmm_plugin_activation() {
59
 
60
  // Checking if the options exist in the database
@@ -70,47 +69,52 @@ function csmm_plugin_activation() {
70
  'custom_login_url' => '',
71
  'show_logged_in' => '2',
72
  'exclude_se' => '1',
 
 
 
73
  'mailchimp_api' => '',
74
  'mailchimp_list' => '',
 
 
 
 
 
75
  'logo' => '',
76
  'favicon' => '',
77
-
78
  'bg_cover' => '',
79
  'content_overlay' => '2',
80
  'content_width' => '440',
81
  'bg_color' => 'ffffff',
82
  'content_position' => 'center',
83
  'content_alignment' => 'left',
84
-
85
  'header_font' => 'Karla',
86
  'secondary_font' => 'Karla',
87
  'header_font_size' => '28',
88
  'secondary_font_size' => '14',
89
- 'header_font_color' => '090909',
90
- 'secondary_font_color' => '090909',
91
-
92
  'antispam_font_size' => '13',
93
  'antispam_font_color' => 'bbbbbb',
94
 
95
  'input_text' => 'Enter your email address..',
96
  'button_text' => 'Subscribe',
97
-
98
  'ignore_form_styles' => '2',
99
-
100
  'input_font_size' => '13',
101
  'button_font_size' => '12',
102
- 'input_font_color' => '090909',
103
  'button_font_color' => 'ffffff',
104
-
105
  'input_bg' => '',
106
  'button_bg' => '0f0f0f',
107
  'input_bg_hover' => '',
108
  'button_bg_hover' => '0a0a0a',
109
-
110
  'input_border' => 'eeeeee',
111
  'button_border' => '0f0f0f',
112
  'input_border_hover' => 'bbbbbb',
113
  'button_border_hover' => '0a0a0a',
 
 
 
 
114
 
115
  'disable_settings' => '2',
116
  'custom_html' => '',
@@ -131,7 +135,6 @@ function csmm_plugin_activation() {
131
  register_activation_hook( __FILE__, 'csmm_plugin_activation' );
132
 
133
 
134
-
135
  /* Hook for the plugin deactivation. */
136
  function csmm_plugin_deactivation() {
137
 
@@ -142,19 +145,19 @@ function csmm_plugin_deactivation() {
142
  register_deactivation_hook( __FILE__, 'csmm_plugin_deactivation' );
143
 
144
 
145
-
146
  /**
147
  * Including files necessary for the management panel of the plugin.
148
  * Basically, support panel and option to insert custom .css is provided.
149
  */
 
150
  if ( is_admin() ) {
151
  require SIGNALS_CSMM_PATH . 'framework/admin/init.php';
152
  }
153
 
154
 
155
-
156
  /**
157
  * Let's start the plugin now.
158
  * All the widgets are included and registered using the right hook.
159
  */
 
160
  require SIGNALS_CSMM_PATH . 'framework/public/init.php';
8
  *
9
  *
10
  * Plugin Name: Minimal Coming Soon & Maintenance Mode
11
+ * Plugin URI: http://www.69signals.com/
12
  * Description: Simply awesome coming soon & maintenance mode plugin for your WordPress blog. Try it to know why there is no other plugin like this one.
13
+ * Version: 1.1
14
  * Author: akshitsethi
15
  * Author URI: http://www.69signals.com
16
  * License: GPLv3
44
  }
45
 
46
 
 
47
  /* Constants we will be using throughout the plugin. */
48
  define( 'SIGNALS_CSMM_URL', plugins_url( '', __FILE__ ) );
49
  define( 'SIGNALS_CSMM_PATH', plugin_dir_path( __FILE__ ) );
50
 
51
 
 
52
  /**
53
  * For the plugin activation & de-activation.
54
  * We are doing nothing over here.
55
  */
56
+
57
  function csmm_plugin_activation() {
58
 
59
  // Checking if the options exist in the database
69
  'custom_login_url' => '',
70
  'show_logged_in' => '2',
71
  'exclude_se' => '1',
72
+ 'arrange' => 'logo,header,secondary,form,html',
73
+ 'analytics' => '',
74
+
75
  'mailchimp_api' => '',
76
  'mailchimp_list' => '',
77
+ 'message_noemail' => 'Please provide a valid email address.',
78
+ 'message_subscribed' => 'You are already subscribed!',
79
+ 'message_wrong' => 'Oops! Something went wrong.',
80
+ 'message_done' => 'Thank you! We\'ll be in touch!',
81
+
82
  'logo' => '',
83
  'favicon' => '',
 
84
  'bg_cover' => '',
85
  'content_overlay' => '2',
86
  'content_width' => '440',
87
  'bg_color' => 'ffffff',
88
  'content_position' => 'center',
89
  'content_alignment' => 'left',
 
90
  'header_font' => 'Karla',
91
  'secondary_font' => 'Karla',
92
  'header_font_size' => '28',
93
  'secondary_font_size' => '14',
94
+ 'header_font_color' => '0e0f04',
95
+ 'secondary_font_color' => '0e0f04',
 
96
  'antispam_font_size' => '13',
97
  'antispam_font_color' => 'bbbbbb',
98
 
99
  'input_text' => 'Enter your email address..',
100
  'button_text' => 'Subscribe',
 
101
  'ignore_form_styles' => '2',
 
102
  'input_font_size' => '13',
103
  'button_font_size' => '12',
104
+ 'input_font_color' => '0e0f04',
105
  'button_font_color' => 'ffffff',
 
106
  'input_bg' => '',
107
  'button_bg' => '0f0f0f',
108
  'input_bg_hover' => '',
109
  'button_bg_hover' => '0a0a0a',
 
110
  'input_border' => 'eeeeee',
111
  'button_border' => '0f0f0f',
112
  'input_border_hover' => 'bbbbbb',
113
  'button_border_hover' => '0a0a0a',
114
+ 'success_background' => '90c695',
115
+ 'success_color' => 'ffffff',
116
+ 'error_background' => 'e08283',
117
+ 'error_color' => 'ffffff',
118
 
119
  'disable_settings' => '2',
120
  'custom_html' => '',
135
  register_activation_hook( __FILE__, 'csmm_plugin_activation' );
136
 
137
 
 
138
  /* Hook for the plugin deactivation. */
139
  function csmm_plugin_deactivation() {
140
 
145
  register_deactivation_hook( __FILE__, 'csmm_plugin_deactivation' );
146
 
147
 
 
148
  /**
149
  * Including files necessary for the management panel of the plugin.
150
  * Basically, support panel and option to insert custom .css is provided.
151
  */
152
+
153
  if ( is_admin() ) {
154
  require SIGNALS_CSMM_PATH . 'framework/admin/init.php';
155
  }
156
 
157
 
 
158
  /**
159
  * Let's start the plugin now.
160
  * All the widgets are included and registered using the right hook.
161
  */
162
+
163
  require SIGNALS_CSMM_PATH . 'framework/public/init.php';
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: akshitsethi
3
  Donate link: http://www.69signals.com/
4
  Tags: coming soon, coming soon page, construction, landing page, launch, launch page, maintenance, maintenance mode, newsletter, offline, unavailable, under construction, wordpress coming soon, wordpress maintenance mode, wordpress under construction
5
  Requires at least: 3.5.0
6
- Tested up to: 4.1
7
- Stable tag: 1.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -22,12 +22,15 @@ It's Simple + flexible and works with any WordPress theme you have installed on
22
  * Works with any WordPress Theme.
23
  * Completely customizable look and feel including Background Color, Cover Image, Fonts etc.
24
  * Each and every element of the maintenance page can be configured.
 
 
25
  * W3 Total Cache and WP Super Cache Support.
26
  * Easily add Custom CSS and HTML.
27
  * Collect Emails with MailChimp.
28
  * You can let search engines to view website normally while visitors see the "Coming Soon" page.
29
  * Visible to only non logged in users so you can build your site while visitors see the "Coming Soon" page. Configurable via options panel.
30
  * Supports Custom Login URL.
 
31
  * Integrated with Google Fonts.
32
  * Stretch Background Image to Cover the Entire Browser.
33
  * Uses HTML5 & CSS3.
@@ -36,10 +39,9 @@ It's Simple + flexible and works with any WordPress theme you have installed on
36
  * Get support within the options panel itself. It's something you going to love.
37
 
38
 
39
-
40
  About **69signals**
41
 
42
- We are a creative digital agency. We love to weave the web, simple but amazing. We create flawless web and mobile applications. Our perfectly crafted products will make you believe us.
43
 
44
  [Support](http://www.69signals.com/support/) | [Services](http://www.69signals.com/services.php) | [Hire Us](http://www.69signals.com/hire-us.php) | [Subscribe to our Newsletter](http://www.69signals.com/#subscribe)
45
 
@@ -72,6 +74,18 @@ Getting help is just a click away now. Report your issues using the support form
72
 
73
  == Changelog ==
74
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  = 1.0 =
76
  * **Completely re-written from the scratch.**
77
  * Re-designed mobile compatible admin panel.
@@ -105,4 +119,4 @@ Getting help is just a click away now. Report your issues using the support form
105
 
106
  == Upgrade Notice ==
107
 
108
- Completely re-written from the scratch. An important update to the plugin.
3
  Donate link: http://www.69signals.com/
4
  Tags: coming soon, coming soon page, construction, landing page, launch, launch page, maintenance, maintenance mode, newsletter, offline, unavailable, under construction, wordpress coming soon, wordpress maintenance mode, wordpress under construction
5
  Requires at least: 3.5.0
6
+ Tested up to: 4.3
7
+ Stable tag: 1.1.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
22
  * Works with any WordPress Theme.
23
  * Completely customizable look and feel including Background Color, Cover Image, Fonts etc.
24
  * Each and every element of the maintenance page can be configured.
25
+ * Option to preview the maintenance page for changes made before activating it.
26
+ * Arrange position of the page elements as per preference.
27
  * W3 Total Cache and WP Super Cache Support.
28
  * Easily add Custom CSS and HTML.
29
  * Collect Emails with MailChimp.
30
  * You can let search engines to view website normally while visitors see the "Coming Soon" page.
31
  * Visible to only non logged in users so you can build your site while visitors see the "Coming Soon" page. Configurable via options panel.
32
  * Supports Custom Login URL.
33
+ * Track visitors with support for Analytics.
34
  * Integrated with Google Fonts.
35
  * Stretch Background Image to Cover the Entire Browser.
36
  * Uses HTML5 & CSS3.
39
  * Get support within the options panel itself. It's something you going to love.
40
 
41
 
 
42
  About **69signals**
43
 
44
+ We are a Creative Digital Marketplace. We love to weave the web, simple but amazing. We create flawless web and mobile applications. Our perfectly crafted products will make you believe us.
45
 
46
  [Support](http://www.69signals.com/support/) | [Services](http://www.69signals.com/services.php) | [Hire Us](http://www.69signals.com/hire-us.php) | [Subscribe to our Newsletter](http://www.69signals.com/#subscribe)
47
 
74
 
75
  == Changelog ==
76
 
77
+ = 1.1 =
78
+
79
+ * ADDED: Preview maintenance page before activating it.
80
+ * ADDED: Arrange position of the page elements as per preference.
81
+ * ADDED: Option to add tracking (analytics) code to the page.
82
+ * ADDED: Custom HTML section to the maintenance page.
83
+ * ADDED: Option to style form messages.
84
+ * ADDED: Option to customize the messages shown for subscription.
85
+ * IMPROVED: Now adds line breaks to header and secondary text for each new line in the textarea.
86
+ * IMPROVED: Layout changes.
87
+ * FIXED: Issues with MailChimp for some users.
88
+
89
  = 1.0 =
90
  * **Completely re-written from the scratch.**
91
  * Re-designed mobile compatible admin panel.
119
 
120
  == Upgrade Notice ==
121
 
122
+ Various improvements made to the plugin. Adds option to preview maintenance page, analytics support, visual improvements, and more customization options. Recommended update.