Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge updates #4

Merged
merged 7 commits into from
Sep 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ All notable changes to this project will be documented in this file.
* Update the unit-tests README and inline docs. Props [bobbingwide](https://github.com/bobbingwide) ([#714](https://github.com/WebDevStudios/CMB2/pull/714), [#715](https://github.com/WebDevStudios/CMB2/pull/715)).
* Minor update to make naming-conventions consistent. Props [ramiy](https://github.com/ramiy) ([#718](https://github.com/WebDevStudios/CMB2/pull/718)).
* Update files to be compatible with PHP7 CodeSniffer standards. Props [ryanshoover](https://github.com/ryanshoover) ([#719](https://github.com/WebDevStudios/CMB2/pull/719), [#720](https://github.com/WebDevStudios/CMB2/pull/720)).
* Make exception message translatable. Props [ramiy](https://github.com/ramiy) ([#724](https://github.com/WebDevStudios/CMB2/pull/724)).
* Portuguese translation provided by [@alvarogois](https://github.com/alvarogois) and [@pedro-mendonca](https://github.com/pedro-mendonca) - [#709](https://github.com/WebDevStudios/CMB2/pull/709), [#727](https://github.com/WebDevStudios/CMB2/pull/727).


### Bug Fixes

* If custom field types use a method and the Type object has not been instantiated, Try to guess the Type object and instantiate, then throw a `_doing_it_wrong` notice.
* Normalize WordPress root path (`ABSPATH`) and theme rooth path (`get_theme_root()`). Props [@rianbotha](https://github.com/rianbotha) ([#677](https://github.com/WebDevStudios/CMB2/pull/677), [#676](https://github.com/WebDevStudios/CMB2/pull/676)).
* Fix issue with `'cmb2_remove_row'` Javascript callback for non-group row removal. Fixes [#729](https://github.com/WebDevStudios/CMB2/pull/729)).

## 2.2.2.1 - 2016-06-27

Expand Down
16 changes: 11 additions & 5 deletions js/cmb2.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ window.CMB2 = window.CMB2 || {};
cmb.trigger( 'cmb_init' );
};

cmb.resetTitlesAndIterator = function() {
cmb.resetTitlesAndIterator = function( evt ) {
if ( ! evt.group ) {
return;
}

// Loop repeatable group tables
$( '.cmb-repeatable-group' ).each( function() {
var $table = $( this );
Expand Down Expand Up @@ -493,7 +497,8 @@ window.CMB2 = window.CMB2 || {};
$table.find('.cmb-remove-group-row').prop( 'disabled', false );
}

cmb.triggerElement( $table, 'cmb2_add_row', $newRow );
cmb.triggerElement( $table, { type: 'cmb2_add_row', group: true }, $newRow );

};

cmb.addAjaxRow = function( evt ) {
Expand All @@ -513,7 +518,7 @@ window.CMB2 = window.CMB2 || {};

cmb.afterRowInsert( $row );

cmb.triggerElement( $table, 'cmb2_add_row', $row );
cmb.triggerElement( $table, { type: 'cmb2_add_row', group: false }, $row );

$table.find( '.cmb-remove-row-button' ).removeClass( 'button-disabled' );

Expand Down Expand Up @@ -545,7 +550,7 @@ window.CMB2 = window.CMB2 || {};
$table.find('.cmb-remove-group-row').prop( 'disabled', false );
}

cmb.triggerElement( $table, 'cmb2_remove_row' );
cmb.triggerElement( $table, { type: 'cmb2_remove_row', group: true } );

};

Expand All @@ -572,7 +577,8 @@ window.CMB2 = window.CMB2 || {};
$table.find( '.cmb-remove-row-button' ).addClass( 'button-disabled' );
}

cmb.triggerElement( $table, 'cmb2_remove_row' );
cmb.triggerElement( $table, { type: 'cmb2_remove_row', group: false } );

} else {
$this.addClass( 'button-disabled' );
}
Expand Down
2 changes: 1 addition & 1 deletion js/cmb2.min.js

Large diffs are not rendered by default.

Binary file modified languages/cmb2-pt_PT.mo
Binary file not shown.
Loading