Skip to content

Commit

Permalink
MonsterInsights 6.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscct7 committed Aug 9, 2017
1 parent 6e77641 commit 5ad3817
Show file tree
Hide file tree
Showing 21 changed files with 1,100 additions and 148 deletions.
7 changes: 7 additions & 0 deletions assets/css/admin-common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#toplevel_page_monsterinsights_dashboard .wp-menu-image img,
#toplevel_page_monsterinsights_settings .wp-menu-image img,
#toplevel_page_monsterinsights_network .wp-menu-image img {
width: 18px;
height: 18px;
padding-top: 7px;
}
1 change: 1 addition & 0 deletions assets/css/admin-common.min.css

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

25 changes: 25 additions & 0 deletions assets/js/admin-common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jQuery( document ).ready( function( $ ) {
/**
* Dismissable Notices
* - Sends an AJAX request to mark the notice as dismissed
*/
$( 'div.monsterinsights-notice' ).on( 'click', 'button.notice-dismiss', function( e ) {
e.preventDefault();
$( this ).closest( 'div.monsterinsights-notice' ).fadeOut();

// If this is a dismissible notice, it means we need to send an AJAX request
if ( $( this ).parent().hasClass( 'is-dismissible' ) ) {
$.post(
monsterinsights_admin_common.ajax,
{
action: 'monsterinsights_ajax_dismiss_notice',
nonce: monsterinsights_admin_common.dismiss_notice_nonce,
notice: $( this ).parent().data( 'notice' )
},
function( response ) {},
'json'
);
}

} );
});
1 change: 1 addition & 0 deletions assets/js/admin-common.min.js

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

27 changes: 1 addition & 26 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,6 @@ jQuery( document ).ready( function( $ ) {
});
}

/**
* Dismissable Notices
* - Sends an AJAX request to mark the notice as dismissed
*/
$( 'div.monsterinsights-notice' ).on( 'click', '.notice-dismiss', function( e ) {
e.preventDefault();
$( this ).closest( 'div.monsterinsights-notice' ).fadeOut();

// If this is a dismissible notice, it means we need to send an AJAX request
if ( $( this ).hasClass( 'is-dismissible' ) ) {
$.post(
monsterinsights_admin.ajax,
{
action: 'monsterinsights_ajax_dismiss_notice',
nonce: monsterinsights_admin.dismiss_notice_nonce,
notice: $( this ).parent().data( 'notice' )
},
function( response ) {
},
'json'
);
}

} );

function modelMatcher(params, data) {
data.parentText = data.parentText || "";

Expand Down Expand Up @@ -891,7 +866,7 @@ function monsterinsights_popupwindow(url, w, h) {
monsterinsights_closepopupwindow();
var left = (screen.width/2)-(w/2);
var top = (screen.height/8);
monsterinsights_authwindow = window.open(url, 'monsterinsights_ga_auth_window', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
monsterinsights_authwindow = window.open(url, 'monsterinsights_ga_auth_window', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}

function monsterinsights_closepopupwindow() {
Expand Down
4 changes: 2 additions & 2 deletions assets/js/admin.min.js

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

Loading

0 comments on commit 5ad3817

Please sign in to comment.