Skip to content

Commit

Permalink
Merge branch 'release/1.7' into issue/370
Browse files Browse the repository at this point in the history
* release/1.7: (22 commits)
  Space remove
  Fixed incorrect variable name
  removed unnecessary var
  CSS improvements for donors section due to merge of #938 re: #936
  Sentence closures and doc block improvements
  Do not format amount which is already formatted
  Added a readme item for #780
  Added back the gateway column #780
  Removed the gateway column #780
  Improved layout of error logs page, doc block updates
  Change log item for #937 added
  Ensure API and System Info tabs don't have save button output #937
  Reverted tabs to pre-1.5 state - a page reload after clicking each tab #937
  a11y: add `<label>` fields to newsletter `<input>` fields, with `for` attributes and `class="screen-reader-text"`
  Remove Give Tabs (`#customer-tab-wrapper-list`), replaced by WordPress Tabs (`.nav-tab-wrapper`)
  Use WordPress `.nav-tab-wrapper` class in Donor screen tabs
  Doc block updates
  Auto format amount with decimal separator when focusout from money field
  Fix currency icon before input field css bug
  Remove all decimal seperator except last if thousand seperator is same ad decimal
  ...
  • Loading branch information
Devin Walker committed Aug 24, 2016
2 parents f5b6c5c + 693a473 commit ba5b9d7
Show file tree
Hide file tree
Showing 23 changed files with 181 additions and 389 deletions.
61 changes: 10 additions & 51 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.

3 changes: 3 additions & 0 deletions assets/js/admin/admin-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,9 @@ jQuery.noConflict();
return false;
}

// Replace dot decimal separator with user defined decimal separator.
price_string = price_string.replace( '.', decimal_separator );

// Check if current number is negative or not.
if( -1 !== price_string.indexOf('-') ) {
price_string = price_string.replace('-', '' );
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-scripts.min.js

Large diffs are not rendered by default.

78 changes: 0 additions & 78 deletions assets/js/admin/admin-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,84 +12,6 @@
jQuery.noConflict();
jQuery(document).ready(function ($) {

// when page loads, make tab active
tab_switch();

// show and hide tab content on tab clicks
$('.nav-tab').on('click', function (e) {
e.preventDefault();
tab_switch($(this));
});

/**
* TAB SWITCH
*
* Changes the tab content when tab is clicked.
*
* @param $tab
*
* @since 1.0.0
*/
function tab_switch($tab) {

var id, tab;

// if $tab was not set, get the tab from the query string
// default to 'general' if no query string present
if (typeof($tab) === 'undefined') {
id = get_query_string('tab').length ? get_query_string('tab') : 'general';
} else {
// get id and content location from the chosen tab
id = $tab.attr('id');
id = id.replace('tab-', '');
}

$tab = $('.give_settings_page').find("[data-tab='" + id + "']");

// hide all tabs and show current tab
$('.cmb-form').hide();
$tab.show();

// remove and set the Wordpress active tab class on the tab navigation
$('.nav-tab').removeClass('nav-tab-active');
$('#tab-' + id).addClass('nav-tab-active').blur();

// change the browser URL to reflect the current tab;
// this allows WordPress to change to this tab on save
if (history.pushState) {

var stateObject = {dummy: true},
postvar = 'post_type=give_forms&page=give-settings';

var url = window.location.protocol
+ "//"
+ window.location.host
+ window.location.pathname
+ '?'
+ postvar
+ '&tab=' + id;

history.pushState(stateObject, $(document).find('title').text(), url);
}
}

/**
* Gets the query string.
*
* @param name
* @returns {string}
*
* @since 1.5
*/
function get_query_string(name) {
var regex, results;
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
results = regex.exec(location.search);
return results === null ?
"" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

/**
* Sortable payment gateways
*/
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-settings.min.js

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

2 changes: 1 addition & 1 deletion assets/js/frontend/give.all.min.js

Large diffs are not rendered by default.

68 changes: 14 additions & 54 deletions assets/scss/admin/donors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/

/* Donors Listing Page Style
-------------------------------------------------------------- */
//--------------------------------------------------------------
// Donors Listing Page Style
//--------------------------------------------------------------
.give_forms_page_give-donors {
.wrap > h2 {
margin-bottom: 15px;
}

.nav-tab-wrapper .dashicons {
position: relative;
top:2px;
margin: 0 3px 0 0;
}

#give-donors-filter {
position: relative;
p.search-box {
Expand All @@ -27,63 +35,15 @@
}
}

/* Donor Styles
-------------------------------------------------------------- */

#customer-tab-wrapper {

}

#customer-tab-wrapper-list {

border-bottom: 1px solid #ccc;
padding: 5px 15px 0 10px;

li {

display: inline-block;
margin: 0 0 -1px;
padding: 0;

a {
padding: 6px 10px;
font-weight: bold;
font-size: 15px;
line-height: 24px;
border: 1px solid #ccc;
border-bottom: none;
background: #e4e4e4;
color: #555;
display: inline-block;
text-decoration: none;
margin: 0;
}

}

.active {
padding: 6px 10px;
font-weight: bold;
font-size: 15px;
line-height: 24px;
border: 1px solid #ccc;
border-bottom: 1px solid #f1f1f1;
background: #f1f1f1;
color: #000;
}

.dashicons {
font-size: 20px;
line-height: 26px;
}

}

//--------------------------------------------------------------
// Donor Styles
//--------------------------------------------------------------
#give-customer-card-wrapper {
margin-left: -1px;
z-index: 2;
min-height: 200px;


input {
font-weight: normal;
}
Expand Down
1 change: 1 addition & 0 deletions assets/scss/admin/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ div.cmb-type-levels-repeater-header + div.cmb-repeat-group-wrap {

.give-money-symbol-before {
border-right: 0;
margin-right: -4px;
}

.give-money-symbol-after {
Expand Down
6 changes: 0 additions & 6 deletions assets/scss/admin/reports.scss
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,7 @@ body.give_forms_page_give-reports table.export-options-table {
//---------------------------------------------------------
//Table List Styles
//---------------------------------------------------------
.widefat {
.column-name, .column-label {
font-size: 14px;
font-weight: bold;
}

}

table.give-table {

Expand Down
Loading

0 comments on commit ba5b9d7

Please sign in to comment.