Skip to content

Commit

Permalink
Merge branch 'release/1.7' into issue/619
Browse files Browse the repository at this point in the history
* release/1.7: (177 commits)
  Added change log for #964
  Make exception message translatable
  Update give_do_automatic_upgrades function
  Move upgades to 1.7
  Update function version from 1.6 to 1.7
  add missing `echo` after 9a2f35d
  Set gulp textdomain task autocorretion to true
  Update more action names #957
  Update actions to use newly termed ones rather than now deprecated ones #957
  Version bump for release/1.7 branch
  Change log added for #687
  Readme logs added for #896 and #773
  replace `edd` text-domain with `give`
  replace esc_attr_e() with esc_attr()
  add misisng text-domain
  gulp task
  Update doc block in formatting.php
  Refresh current month transient when payment update
  Add function to get stat transient key
  Update description in Give Settings Screen
  ...
  • Loading branch information
Devin Walker committed Aug 29, 2016
2 parents 3c4280b + c3680ad commit c4ca573
Show file tree
Hide file tree
Showing 63 changed files with 2,043 additions and 628 deletions.
138 changes: 98 additions & 40 deletions assets/css/give-admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/give-admin.min.css

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions assets/js/admin/admin-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,46 @@ jQuery.noConflict();
$(this).val(price_string);
});


/**
* Show/Hide License notice
*/
var $notices_container = $('.give-license-notice');

// Hide license notice for 24 hours if usr already read notice.
if( $notices_container.length ){
$.each( $notices_container, function( index, item ){
var notice_id = $(this).data('notice-id'),
cookie_name = 'give_hide_license_notice_' + notice_id,
hide_notice_cookie = document.cookie.replace( new RegExp( "(?:^|.*;\\s*)" + cookie_name.replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*" ), "$1" );

// Do not show license notice.
if ( 'true' === hide_notice_cookie ) {
$(this).remove();
}
});
}

// Add click event to license notice dismiss button.
$('.give-license-notice').on( 'click', 'button.notice-dismiss', function(e){
e.preventDefault();

var notice_id = $(this).closest('div.give-license-notice').data('notice-id'),
cookie_name = 'give_hide_license_notice_' + notice_id,
hide_notice_cookie = document.cookie.replace( '/(?:(?:^|.*;\s*)' + notice_id + '\s*\=\s*([^;]*).*$)|^.*$/', '$1' ),
date = new Date( Date.now() );

if( true === hide_notice_cookie ) {
return false;
}

// Set expire date to 24 hour.
date.setDate( date.getDate() + 1 );
document.cookie = cookie_name + '=true; expires=' + date.toUTCString();

return false;
});

});

})(jQuery);
Loading

0 comments on commit c4ca573

Please sign in to comment.