Plugin Directory

Changeset 1135910


Ignore:
Timestamp:
04/16/2015 05:58:59 AM (11 years ago)
Author:
endual
Message:

Closing pop up when submit clicked for better UX

Location:
wp-customer-feedback/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-customer-feedback/trunk/js/feedback.js

    r1135874 r1135910  
    1 jQuery(document).ready(function(e){var n,t,a,i,r,c,o,p,l,f,d,u,s,b,m;return l=!1,p=!1,n=30,a=300,t=400,i=function(){var n,t,a;return a=endual.title,n=endual.color,this.delay=1e3*endual.delay,t='<div id="cfbp-panel">',t+='<form accept-charset="UTF-8" action="" data-remote="true" id="wp-cfbp" method="post">',t+='<div class="cfbp-rating-header">',t+="<h3 id='cfbp-title'>"+a+"</h3>",t+='<div class="cfbp-close">X</div>',t+="</div>",t+='<div class="cfbp-comment">',t+='<textarea name="comment" placeholder="'+a+'"></textarea>',t+='<input class="cfbp-email" type="email" name="email" placeholder="Your email address?"></textarea>',t+='<input class="cfbp-rating-submit" name="commit" type="submit" value="Submit">',t+="</div>",t+="</form>",t+="</div>",e("body").append(t),e(".cfbp-rating-header").css({background:n}),e("<style type='text/css'> .hilite{ color:"+n+";} .checked{ color:"+n+";}</style>").appendTo("head")},u=function(){return f(),e(window).on("resize",d),e(window).on("scroll",d),e("#cfbp-panel .cfbp-rating-header").click(function(){return s()}),e("#cfbp-panel .cfbp-close").click(function(e){return e.stopPropagation(),m()}),e("#cfbp-panel .cfbp-close").hide(),e("#wp-cfbp").submit(function(){var n,t;return t=e("#wp-cfbp").serializeArray(),n={},e.map(t,function(e){return n[e.name]=e.value}),n.action="process_form_data",e.post(endual.ajaxurl,n,r),!1})},f=function(){var n,t;return t=e(window).innerHeight()+2,n=c(),e("#cfbp-panel").css({transform:"translate( "+n+"px, "+t+"px )"}),b()},c=function(){var n;return n=e(window).width()-t<0?(e(window).width()-a)/2+a:t,e(window).width()-n},b=function(){var t;return t=e(window).innerHeight()-n,e("#cfbp-panel").delay(this.delay).animate({top:"-32"},600,"swing",function(){return l=!0})},m=function(){var t;if(p)return p=!1,l=!1,e("#cfbp-panel .cfbp-close").hide(),t=e(window).innerHeight()-n,e("#cfbp-panel").animate({top:"-32"},600,"swing",function(){return l=!1})},d=function(){var t,a;if(p||l)return a=e(window).innerHeight()-n,l&&(a+=32),t=c(),e("#cfbp-panel").css({transform:"translate( "+t+"px, "+a+"px )"})},s=function(){var n;if(!p)return p=!0,e("#cfbp-panel .cfbp-close").show(),n=258,e("#cfbp-panel").animate({top:"-="+n},600)},r=function(){var n;return e("#cfbp-panel .cfbp-comment").html("<br /><br /><p>Thanks for the feedback!</p>"),n=e(window).innerHeight()+2,e("#cfbp-panel").animate({top:"+=130"},600).delay(3e3).animate({top:"+=200"},600,"swing",o),e(window).off("resize",d)},o=function(){return e("#cfbp-panel").hide()},i(),u()});
     1jQuery(document).ready(function(e){var n,t,a,i,r,c,o,p,l,f,d,u,s,b,m;return l=!1,p=!1,n=30,a=300,t=400,i=function(){var n,t,a;return a=endual.title,n=endual.color,this.delay=1e3*endual.delay,t='<div id="cfbp-panel">',t+='<form accept-charset="UTF-8" action="" data-remote="true" id="wp-cfbp" method="post">',t+='<div class="cfbp-rating-header">',t+="<h3 id='cfbp-title'>"+a+"</h3>",t+='<div class="cfbp-close">X</div>',t+="</div>",t+='<div class="cfbp-comment">',t+='<textarea name="comment" placeholder="'+a+'"></textarea>',t+='<input class="cfbp-email" type="email" name="email" placeholder="Your email address?"></textarea>',t+='<input class="cfbp-rating-submit" name="commit" type="submit" value="Submit">',t+="</div>",t+="</form>",t+="</div>",e("body").append(t),e(".cfbp-rating-header").css({background:n}),e("<style type='text/css'> .hilite{ color:"+n+";} .checked{ color:"+n+";}</style>").appendTo("head")},u=function(){return f(),e(window).on("resize",d),e(window).on("scroll",d),e("#cfbp-panel .cfbp-rating-header").click(function(){return s()}),e("#cfbp-panel .cfbp-close").click(function(e){return e.stopPropagation(),m()}),e("#cfbp-panel .cfbp-close").hide(),e("#wp-cfbp").submit(function(){var n,t;return t=e("#wp-cfbp").serializeArray(),n={},e.map(t,function(e){return n[e.name]=e.value}),n.action="process_form_data",e.post(endual.ajaxurl,n),r(),!1})},f=function(){var n,t;return t=e(window).innerHeight()+2,n=c(),e("#cfbp-panel").css({transform:"translate( "+n+"px, "+t+"px )"}),b()},c=function(){var n;return n=e(window).width()-t<0?(e(window).width()-a)/2+a:t,e(window).width()-n},b=function(){var t;return t=e(window).innerHeight()-n,e("#cfbp-panel").delay(this.delay).animate({top:"-32"},600,"swing",function(){return l=!0})},m=function(){var t;if(p)return p=!1,l=!1,e("#cfbp-panel .cfbp-close").hide(),t=e(window).innerHeight()-n,e("#cfbp-panel").animate({top:"-32"},600,"swing",function(){return l=!1})},d=function(){var t,a;if(p||l)return a=e(window).innerHeight()-n,l&&(a+=32),t=c(),e("#cfbp-panel").css({transform:"translate( "+t+"px, "+a+"px )"})},s=function(){var n;if(!p)return p=!0,e("#cfbp-panel .cfbp-close").show(),n=258,e("#cfbp-panel").animate({top:"-="+n},600)},r=function(){var n;return e("#cfbp-panel .cfbp-comment").html("<br /><br /><p>Thanks for the feedback!</p>"),n=e(window).innerHeight()+2,e("#cfbp-panel").animate({top:"+=130"},600).delay(3e3).animate({top:"+=200"},600,"swing",o),e(window).off("resize",d)},o=function(){return e("#cfbp-panel").hide()},i(),u()});
  • wp-customer-feedback/trunk/readme.txt

    r1135874 r1135910  
    11=== WP Customer Feedback ===
    22Contributors: endual
    3 Tags: feedback, review, customer, communication, marketing, survey, popup, shortcode
     3Tags: user-feedback, customer-feedback, feedback, review, customer, marketing, survey, popup
    44Author URI: http://endual.com
    55Plugin URI: http://endual.com/wp-customer-feedback
    66Requires at least: 3.3
    77Tested up to: 4.2
    8 Stable tag: 1.2.0
     8Stable tag: 1.2.1
    99License: GPLv2
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    112112== Changelog ==
    113113
     114= 1.2.1 =
     115Shutdown panel immediately on submit clicked
     116
    114117= 1.2.0 =
    115118Added ability to show with non full page posts
  • wp-customer-feedback/trunk/wp-customer-feedback.php

    r1135874 r1135910  
    55 * Plugin URI: http://endual.com/wp-customer-feedback/
    66 * Description: Simple way to get user feedback for your site
    7  * Version: 1.2.0
     7 * Version: 1.2.1
    88 * Author: Adrian Gray
    99 * Author URI: http://endual.com/about-adrian-gray/
     
    4545    }
    4646    wp_enqueue_style(   'endual-feedback', plugins_url( '/css/feedback.css', __FILE__ ) );
    47     wp_register_script( 'endual-feedback', plugins_url( '/js/feedback.js', __FILE__ ), array( 'jquery' ), '1.2.0', true);
     47    wp_register_script( 'endual-feedback', plugins_url( '/js/feedback.js', __FILE__ ), array( 'jquery' ), '1.2.1', true);
    4848  }
    4949
Note: See TracChangeset for help on using the changeset viewer.