Skip to content

Commit

Permalink
Release v4.2.1; see CHANGELOG for details.
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondcolebaugh committed Sep 12, 2014
1 parent 7eaa07b commit 8508df3
Show file tree
Hide file tree
Showing 58 changed files with 10,702 additions and 65 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 4.2.1 #
9/11/2014

* General changelog/developer notes
* Fixed bug in importer preventing equal valued fields from being set
* Tracked Bug Fixes:
* [1584](http://x2software.com/index.php/bugReports/1584): Undefined variable: newFields
* [1589](http://x2software.com/index.php/bugReports/1589): CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'
* [1596](http://x2software.com/index.php/bugReports/1596): Undefined variable: fmtNumber

# 4.2 #
9/3/2014

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ New in 4.2 (see [CHANGELOG](CHANGELOG.md) for full history):
* Fixed links in 'My Actions' widget
* Fixed bug in Google Calendar Sync which prevented calendar and action history from updating
after publishing events or actions
* Fixed bug in importer preventing equal valued fields from being set
* Tracked Bug Fixes:
* [1401](http://x2software.com/index.php/bugReports/1401): Undefined index: tags
* [1492](http://x2software.com/index.php/bugReports/1492): User Report
Expand All @@ -60,6 +61,9 @@ New in 4.2 (see [CHANGELOG](CHANGELOG.md) for full history):
* [1572](http://x2software.com/index.php/bugReports/1572): Unable to resolve the request "actions/viewAll/showActions/incomplete".
* [1574](http://x2software.com/index.php/bugReports/1574): Trying to get property of non-object
* [1578](http://x2software.com/index.php/bugReports/1578): Undefined variable: users
* [1584](http://x2software.com/index.php/bugReports/1584): Undefined variable: newFields
* [1589](http://x2software.com/index.php/bugReports/1589): CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'
* [1596](http://x2software.com/index.php/bugReports/1596): Undefined variable: fmtNumber



Expand Down
222 changes: 222 additions & 0 deletions x2engine/js/X2ActionHistoryChart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
/*****************************************************************************************
* X2Engine Open Source Edition is a customer relationship management program developed by
* X2Engine, Inc. Copyright (C) 2011-2014 X2Engine Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
* California 95067, USA. or at email address [email protected].
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* X2Engine" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by X2Engine".
*****************************************************************************************/

/*
Child prototype of X2Chart
*/



function X2ActionHistoryChart (argsDict) {
X2Chart.call (this, argsDict);

var thisX2Chart = this;

this.DEBUG = argsDict['DEBUG'];
this.dataStartDate = argsDict['dataStartDate'];

thisX2Chart.DEBUG && console.log ('dataStartDate = ' + this.dataStartDate);

var colors;
// color palette used for lines of action history chart
colors = [
'#7EB2E6', // pale blue
'#CEC415', // mustard
'#BC0D2C', // pomegranate
'#45B41D', // apple green
'#AB074F', // dark hot pink
//'#156A86', // dark blue
'#1B8FB5', // dark blue
'#FFC382',
'#3D1783', // dark purple
//'#5A1992',// deep purple
'#AACF7A',
'#7BB57C', // olive green
//'#69B10A', // dark lime green
//'#8DEB10',
'#C87010', // red rock
'#1D4C8C', // dark blue-purple
'#FFF882',
'#FF9CAD',
'#BAFFA1',
//'#CA8613', // orange brown
//'#C6B019', // dark sand
'#19FFF4',
'#A4F4FC',
'#99C9FF',
'#D099FF',
'#FCA74B',
'#E1A1FF',
];

this.metricOptionsColors = {}; // used to pair colors with metrics
$('#' + this.chartType + '-first-metric').find ('option').each (function () {
thisX2Chart.metricOptionsColors[$(this).val ()] = colors.shift ();
});

this.cookieTypes = [
'startDate', 'endDate', 'dateRange', 'binSize', 'firstMetric', 'showRelationships'];

/*
set up event handlers which update action history chart on action
creation/deletion.
*/
$('#' + thisX2Chart.chartType + '-chart-container #' + thisX2Chart.chartType +
'-rel-chart-data-checkbox').on ('change', function () {
thisX2Chart.DEBUG && console.log ('checked rel checkbox');
if (this.checked) {
thisX2Chart.actionParams['showRelationships'] = 'true';
thisX2Chart.getEventsBetweenDates (true);
$.cookie (thisX2Chart.cookiePrefix + 'showRelationships', 'true');
} else {
thisX2Chart.actionParams['showRelationships'] = 'false';
thisX2Chart.getEventsBetweenDates (true);
$.cookie (thisX2Chart.cookiePrefix + 'showRelationships', 'false');
}
});

/*
set up event handlers which update action history chart on action
creation/deletion.
*/
$(document).on ('chartWidgetMaximized', function () {
thisX2Chart.DEBUG && console.log ('max');
thisX2Chart.feedChart.replot ({ resetAxes: false });
});
$(document).on ('newlyPublishedAction', function () {
thisX2Chart.DEBUG && console.log ('new action');
thisX2Chart.getEventsBetweenDates (true);
});
$(document).on ('deletedAction', function () {
thisX2Chart.DEBUG && console.log ('deleted action');
thisX2Chart.getEventsBetweenDates (true);
});


//thisX2Chart.setDefaultSettings ();

thisX2Chart.start ();

}

X2ActionHistoryChart.prototype = auxlib.create (X2Chart.prototype);

/*
Sets initial state of chart setting ui elements
*/
X2ActionHistoryChart.prototype.setDefaultSettings = function () {
var thisX2Chart = this;

// start date picker default
if (thisX2Chart.dataStartDate) {
// default start date is beginning of action history
$('#' + thisX2Chart.chartType + '-chart-datepicker-from').datepicker(
'setDate', new Date (thisX2Chart.dataStartDate));
} else {
$('#' + thisX2Chart.chartType + '-chart-datepicker-from').datepicker(
'setDate', new Date ());
}

// end date picker default
$('#' + thisX2Chart.chartType + '-chart-datepicker-to').
datepicker('setDate', new Date ()); // default end date

// metric default
$('#' + thisX2Chart.chartType + '-first-metric').children ().each (function () {
$(this).attr ('selected', 'selected');
});
$('#' + thisX2Chart.chartType + '-first-metric').multiselect2 ('refresh');

};

/*
Filter function used by groupChartData to determine how chart data should be grouped
*/
X2ActionHistoryChart.prototype.chartDataFilter = function (dataPoint, type) {
var thisX2Chart = this;

if ((!(type === 'any' || type === '') && dataPoint['type'] !== type) ||
(type === '' && dataPoint['type'] !== null)) {
return true;
} else {
return false;
}
};

/*
Returns dictionary with keys equal to metric types and value equal to metric type
labels
*/
X2ActionHistoryChart.prototype.getMetricTypes = function () {
var thisX2Chart = this;

var metricTypes = [];
$('#' + thisX2Chart.chartType + '-first-metric').children ().each (function () {
if (thisX2Chart.chartSubtype === 'pie' &&
$(this).val () === 'any') return;
metricTypes.push([$(this).val (), $(this).html ()]);
});

return metricTypes;
};

/*
Add pie chart specific css rules
*/
X2ActionHistoryChart.prototype.postPieChartTearDown = function () {
var thisX2Chart = this;
$('#' + thisX2Chart.chartType + '-chart').removeClass ('pie');
$('#' + thisX2Chart.chartType + '-chart-legend').removeClass ('pie');
$('#' + thisX2Chart.chartType + '-bin-size-button-set').removeClass ('pie');
$('#' + thisX2Chart.chartType + '-datepicker-row').removeClass ('action-history-pie');
$('#' + thisX2Chart.chartType + '-top-button-row').removeClass ('pie');
$('#' + thisX2Chart.chartType + '-rel-chart-data-checkbox-container').removeClass ('pie');
};

/*
Remove pie chart specific css rules
*/
X2ActionHistoryChart.prototype.postPieChartSetUp = function () {
var thisX2Chart = this;
$('#' + thisX2Chart.chartType + '-chart').addClass ('pie');
$('#' + thisX2Chart.chartType + '-chart-legend').addClass ('pie');
$('#' + thisX2Chart.chartType + '-bin-size-button-set').addClass ('pie');
$('#' + thisX2Chart.chartType + '-datepicker-row').addClass ('action-history-pie');
$('#' + thisX2Chart.chartType + '-top-button-row').addClass ('pie');
$('#' + thisX2Chart.chartType + '-rel-chart-data-checkbox-container').addClass ('pie');
};



Loading

0 comments on commit 8508df3

Please sign in to comment.