From 3c11c23f3e8dc1c088a07b941d719229d6e58197 Mon Sep 17 00:00:00 2001 From: Benaka Moorthi <benaka.moorthi@gmail.com> Date: Thu, 5 Sep 2013 06:42:14 -0400 Subject: [PATCH] Refs #4041, moved & renamed actionDataTable JavaScript class to file in the Actions plugin. --- plugins/Actions/Actions.php | 8 +- .../Actions/javascripts/actionsDataTable.js | 315 ++++++++++++++++ plugins/CoreHome/javascripts/dataTable.js | 339 +----------------- .../CoreVisualizations/javascripts/jqplot.js | 7 +- .../javascripts/seriesPicker.js | 1 + plugins/Live/javascripts/visitorProfile.js | 1 + 6 files changed, 331 insertions(+), 340 deletions(-) create mode 100644 plugins/Actions/javascripts/actionsDataTable.js diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 442a14cfea..519f384de8 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -62,6 +62,7 @@ class Actions extends \Piwik\Plugin 'API.getSegmentsMetadata' => 'getSegmentsMetadata', 'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties', 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getJsFiles' => 'getJsFiles' ); return $hooks; } @@ -70,6 +71,11 @@ class Actions extends \Piwik\Plugin { $cssFiles[] = "plugins/Actions/stylesheets/dataTableActions.less"; } + + public function getJsFiles(&$jsFiles) + { + $jsFiles[] = "plugins/Actions/javascripts/actionsDataTable.js"; + } public function getSegmentsMetadata(&$segments) { @@ -654,7 +660,7 @@ class Actions extends \Piwik\Plugin private function addBaseDisplayProperties(&$result) { - $result['datatable_js_type'] = 'actionDataTable'; + $result['datatable_js_type'] = 'ActionsDataTable'; $result['visualization_properties']['table']['subtable_template'] = '@CoreHome/_dataTableActions_subDataTable.twig'; $result['search_recursive'] = true; diff --git a/plugins/Actions/javascripts/actionsDataTable.js b/plugins/Actions/javascripts/actionsDataTable.js new file mode 100644 index 0000000000..74fcb9d095 --- /dev/null +++ b/plugins/Actions/javascripts/actionsDataTable.js @@ -0,0 +1,315 @@ +/*! + * Piwik - Web Analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + + (function ($, require) { + + var dataTable = window.dataTable, + dataTablePrototype = dataTable.prototype; + + // helper function for actionDataTable + function getLevelFromClass(style) { + if (!style || typeof style == "undefined") return 0; + + var currentLevel = 0; + + var currentLevelIndex = style.indexOf('level'); + if (currentLevelIndex >= 0) { + currentLevel = Number(style.substr(currentLevelIndex + 5, 1)); + } + return currentLevel; + } + + // helper function for actionDataTable + function setImageMinus(domElem) { + $('img.plusMinus', domElem).attr('src', 'plugins/Zeitgeist/images/minus.png'); + } + + // helper function for actionDataTable + function setImagePlus(domElem) { + $('img.plusMinus', domElem).attr('src', 'plugins/Zeitgeist/images/plus.png'); + } + + /** + * TODO + * + * @constructor + */ + window.ActionsDataTable = function () { + dataTable.call(this); + + this.parentAttributeParent = ''; + this.parentId = ''; + this.disabledRowDom = {}; // to handle double click on '+' row + }; + + $.extend(window.ActionsDataTable.prototype, dataTablePrototype, { + + //initialisation of the actionDataTable + init: function (workingDivId, domElem) { + if (typeof domElem == "undefined" + || domElem.length == 0) // needed for actions subtables where truncating was not working otherwise + { + domElem = $('#' + workingDivId); + } + this.workingDivId = workingDivId; + this.bindEventsAndApplyStyle(domElem); + this.initialized = true; + + domElem.data('piwikDataTable', this); + }, + + //see dataTable::bindEventsAndApplyStyle + bindEventsAndApplyStyle: function (domElem, rows) { + var self = this; + + self.cleanParams(); + + if (!rows) { + rows = $('tr', domElem); + } + + // we dont display the link on the row with subDataTable when we are already + // printing all the subTables (case of recursive search when the content is + // including recursively all the subtables + if (!self.param.filter_pattern_recursive) { + self.numberOfSubtables = rows.filter('.subDataTable').click(function () { + self.onClickActionSubDataTable(this) + }).size(); + } + + self.applyCosmetics(domElem, rows); + self.handleRowActions(domElem, rows); + self.handleLimit(domElem); + self.handleAnnotationsButton(domElem); + self.handleExportBox(domElem); + self.handleSort(domElem); + self.handleOffsetInformation(domElem); + if (self.workingDivId != undefined) { + var dataTableLoadedProxy = function (response) { + self.dataTableLoaded(response, self.workingDivId); + }; + + self.handleSearchBox(domElem, dataTableLoadedProxy); + self.handleConfigurationBox(domElem, dataTableLoadedProxy); + } + + self.handleColumnDocumentation(domElem); + self.handleReportDocumentation(domElem); + self.handleRelatedReports(domElem); + self.handleTriggeredEvents(domElem); + self.handleCellTooltips(domElem); + }, + + //see dataTable::applyCosmetics + applyCosmetics: function (domElem, rows) { + var self = this; + var rowsWithSubtables = rows.filter('.subDataTable'); + + rowsWithSubtables.css('font-weight', 'bold'); + + $("th:first-child", domElem).addClass('label'); + $('td span.label', domElem).each(function () { self.truncate($(this)); }); + var imagePlusMinusWidth = 12; + var imagePlusMinusHeight = 12; + $('td:first-child', rowsWithSubtables) + .each(function () { + $(this).prepend('<img width="' + imagePlusMinusWidth + '" height="' + imagePlusMinusHeight + '" class="plusMinus" src="" />'); + if (self.param.filter_pattern_recursive) { + setImageMinus(this); + } + else { + setImagePlus(this); + } + }); + + var rootRow = rows.first().prev(); + + // we look at the style of the row before the new rows to determine the rows' + // level + var level = rootRow.length ? getLevelFromClass(rootRow.attr('class')) + 1 : 0; + + rows.each(function () { + var currentStyle = $(this).attr('class') || ''; + + if (currentStyle.indexOf('level') == -1) { + $(this).addClass('level' + level); + } + + // we add an attribute parent that contains the ID of all the parent categories + // this ID is used when collapsing a parent row, it searches for all children rows + // which 'parent' attribute's value contains the collapsed row ID + $(this).prop('parent', function () { + return self.parentAttributeParent + ' ' + self.parentId; + }); + + // Add some styles on the cells even/odd + // label (first column of a data row) or not + $("td:first-child:odd", this).addClass('label labeleven'); + $("td:first-child:even", this).addClass('label labelodd'); + $("tr:odd td", domElem).slice(1).addClass('column columnodd'); + $("tr:even td", domElem).slice(1).addClass('column columneven'); + }); + }, + + handleRowActions: function (domElem, rows) { + this.doHandleRowActions(rows); + }, + + // Called when the user click on an actionDataTable row + onClickActionSubDataTable: function (domElem) { + var self = this; + + // get the idSubTable + var idSubTable = $(domElem).attr('id'); + + var divIdToReplaceWithSubTable = 'subDataTable_' + idSubTable; + + var NextStyle = $(domElem).next().attr('class'); + var CurrentStyle = $(domElem).attr('class'); + + var currentRowLevel = getLevelFromClass(CurrentStyle); + var nextRowLevel = getLevelFromClass(NextStyle); + + // if the row has not been clicked + // which is the same as saying that the next row level is equal or less than the current row + // because when we click a row the level of the next rows is higher (level2 row gives level3 rows) + if (currentRowLevel >= nextRowLevel) { + //unbind click to avoid double click problem + $(domElem).off('click'); + self.disabledRowDom = $(domElem); + + var numberOfColumns = $(domElem).children().length; + $(domElem).after('\ + <tr id="' + divIdToReplaceWithSubTable + '" class="cellSubDataTable">\ + <td colspan="' + numberOfColumns + '">\ + <span class="loadingPiwik" style="display:inline"><img src="plugins/Zeitgeist/images/loading-blue.gif" /> Loading...</span>\ + </td>\ + </tr>\ + '); + var savedActionVariable = self.param.action; + + // reset all the filters from the Parent table + var filtersToRestore = self.resetAllFilters(); + + // Do not reset the sorting filters that must be applied to sub tables + this.param['filter_sort_column'] = filtersToRestore['filter_sort_column']; + this.param['filter_sort_order'] = filtersToRestore['filter_sort_order']; + this.param['enable_filter_excludelowpop'] = filtersToRestore['enable_filter_excludelowpop']; + + self.param.idSubtable = idSubTable; + self.param.action = self.props.subtable_controller_action; + + self.reloadAjaxDataTable(false, function (resp) { + self.actionsSubDataTableLoaded(resp, idSubTable); + self.repositionRowActions($(domElem)); + }); + self.param.action = savedActionVariable; + + self.restoreAllFilters(filtersToRestore); + + delete self.param.idSubtable; + } + // else we toggle all these rows + else { + var plusDetected = $('td img.plusMinus', domElem).attr('src').indexOf('plus') >= 0; + + $(domElem).siblings().each(function () { + var parents = $(this).prop('parent').split(' '); + if (parents) { + if (parents.indexOf(idSubTable) >= 0 + || parents.indexOf('subDataTable_' + idSubTable) >= 0) { + if (plusDetected) { + $(this).css('display', ''); + + //unroll everything and display '-' sign + //if the row is already opened + var NextStyle = $(this).next().attr('class'); + var CurrentStyle = $(this).attr('class'); + + var currentRowLevel = getLevelFromClass(CurrentStyle); + var nextRowLevel = getLevelFromClass(NextStyle); + + if (currentRowLevel < nextRowLevel) + setImageMinus(this); + } + else { + $(this).css('display', 'none'); + } + self.repositionRowActions($(domElem)); + } + } + }); + } + + // toggle the +/- image + var plusDetected = $('td img.plusMinus', domElem).attr('src').indexOf('plus') >= 0; + if (plusDetected) { + setImageMinus(domElem); + } + else { + setImagePlus(domElem); + } + }, + + //called when the full table actions is loaded + dataTableLoaded: function (response, workingDivId) { + var content = $(response); + var idToReplace = workingDivId || $(content).attr('id'); + + //reset parents id + self.parentAttributeParent = ''; + self.parentId = ''; + + var dataTableSel = $('#' + idToReplace); + + // keep the original list of related reports + var oldReportsElem = $('.datatableRelatedReports', dataTableSel); + $('.datatableRelatedReports', content).replaceWith(oldReportsElem); + + dataTableSel.replaceWith(content); + piwikHelper.lazyScrollTo(content[0], 400); + + return content; + }, + + // Called when a set of rows for a category of actions is loaded + actionsSubDataTableLoaded: function (response, idSubTable) { + var self = this; + var idToReplace = 'subDataTable_' + idSubTable; + var root = $('#' + self.workingDivId); + + var response = $(response); + self.parentAttributeParent = $('tr#' + idToReplace).prev().prop('parent'); + self.parentId = idToReplace; + + $('tr#' + idToReplace, root).after(response).remove(); + + var missingColumns = (response.prev().find('td').size() - response.find('td').size()); + for (var i = 0; i < missingColumns; i++) { + // if the subtable has fewer columns than the parent table, add some columns. + // this happens for example, when the parent table has performance metrics and the subtable doesn't. + response.append('<td>-</td>'); + } + + var re = /subDataTable_(\d+)/; + var ok = re.exec(self.parentId); + if (ok) { + self.parentId = ok[1]; + } + + // we execute the bindDataTableEvent function for the new DIV + self.bindEventsAndApplyStyle($('#' + self.workingDivId), response); + + //bind back the click event (disabled to avoid double-click problem) + self.disabledRowDom.click( + function () { + self.onClickActionSubDataTable(this) + }); + } + }); + +})(jQuery, require); \ No newline at end of file diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index 0926d18608..e37848b73e 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -1526,341 +1526,4 @@ dataTable.prototype = } return h2; } -}; - - -//----------------------------------------------------------------------------- -// Action Data Table -//----------------------------------------------------------------------------- - -//inheritance declaration -//actionDataTable is a child of dataTable -actionDataTable.prototype = new dataTable; -actionDataTable.prototype.constructor = actionDataTable; - -/** - * actionDataTable - * @constructor - */ -function actionDataTable() { - dataTable.call(this); - this.parentAttributeParent = ''; - this.parentId = ''; - this.disabledRowDom = {}; //to handle double click on '+' row -} - -//Prototype of the actionDataTable object -actionDataTable.prototype = -{ - //method inheritance - cleanParams: dataTable.prototype.cleanParams, - reloadAjaxDataTable: dataTable.prototype.reloadAjaxDataTable, - handleConfigurationBox: dataTable.prototype.handleConfigurationBox, - handleSearchBox: dataTable.prototype.handleSearchBox, - handleAnnotationsButton: dataTable.prototype.handleAnnotationsButton, - handleExportBox: dataTable.prototype.handleExportBox, - handleSort: dataTable.prototype.handleSort, - handleColumnDocumentation: dataTable.prototype.handleColumnDocumentation, - handleReportDocumentation: dataTable.prototype.handleReportDocumentation, - doHandleRowActions: dataTable.prototype.doHandleRowActions, - createRowActions: dataTable.prototype.createRowActions, - repositionRowActions: dataTable.prototype.repositionRowActions, - onClickSort: dataTable.prototype.onClickSort, - truncate: dataTable.prototype.truncate, - handleOffsetInformation: dataTable.prototype.handleOffsetInformation, - resetAllFilters: dataTable.prototype.resetAllFilters, - restoreAllFilters: dataTable.prototype.restoreAllFilters, - exportToFormatHide: dataTable.prototype.exportToFormatHide, - handleLimit: dataTable.prototype.handleLimit, - notifyWidgetParametersChange: dataTable.prototype.notifyWidgetParametersChange, - handleRelatedReports: dataTable.prototype.handleRelatedReports, - handleTriggeredEvents: dataTable.prototype.handleTriggeredEvents, - handleCellTooltips: dataTable.prototype.handleCellTooltips, - _findReportHeader: dataTable.prototype._findReportHeader, - - //initialisation of the actionDataTable - init: function (workingDivId, domElem) { - if (typeof domElem == "undefined" - || domElem.length == 0) // needed for actions subtables where truncating was not working otherwise - { - domElem = $('#' + workingDivId); - } - this.workingDivId = workingDivId; - this.bindEventsAndApplyStyle(domElem); - this.initialized = true; - - domElem.data('piwikDataTable', this); - }, - - //see dataTable::bindEventsAndApplyStyle - bindEventsAndApplyStyle: function (domElem, rows) { - var self = this; - - self.cleanParams(); - - if (!rows) { - rows = $('tr', domElem); - } - - // we dont display the link on the row with subDataTable when we are already - // printing all the subTables (case of recursive search when the content is - // including recursively all the subtables - if (!self.param.filter_pattern_recursive) { - self.numberOfSubtables = rows.filter('.subDataTable').click(function () { - self.onClickActionSubDataTable(this) - }).size(); - } - - self.applyCosmetics(domElem, rows); - self.handleRowActions(domElem, rows); - self.handleLimit(domElem); - self.handleAnnotationsButton(domElem); - self.handleExportBox(domElem); - self.handleSort(domElem); - self.handleOffsetInformation(domElem); - if (self.workingDivId != undefined) { - var dataTableLoadedProxy = function (response) { - self.dataTableLoaded(response, self.workingDivId); - }; - - self.handleSearchBox(domElem, dataTableLoadedProxy); - self.handleConfigurationBox(domElem, dataTableLoadedProxy); - } - - self.handleColumnDocumentation(domElem); - self.handleReportDocumentation(domElem); - self.handleRelatedReports(domElem); - self.handleTriggeredEvents(domElem); - self.handleCellTooltips(domElem); - }, - - //see dataTable::applyCosmetics - applyCosmetics: function (domElem, rows) { - var self = this; - var rowsWithSubtables = rows.filter('.subDataTable'); - - rowsWithSubtables.css('font-weight', 'bold'); - - $("th:first-child", domElem).addClass('label'); - $('td span.label', domElem).each(function () { self.truncate($(this)); }); - var imagePlusMinusWidth = 12; - var imagePlusMinusHeight = 12; - $('td:first-child', rowsWithSubtables) - .each(function () { - $(this).prepend('<img width="' + imagePlusMinusWidth + '" height="' + imagePlusMinusHeight + '" class="plusMinus" src="" />'); - if (self.param.filter_pattern_recursive) { - setImageMinus(this); - } - else { - setImagePlus(this); - } - }); - - var rootRow = rows.first().prev(); - - // we look at the style of the row before the new rows to determine the rows' - // level - var level = rootRow.length ? getLevelFromClass(rootRow.attr('class')) + 1 : 0; - - rows.each(function () { - var currentStyle = $(this).attr('class') || ''; - - if (currentStyle.indexOf('level') == -1) { - $(this).addClass('level' + level); - } - - // we add an attribute parent that contains the ID of all the parent categories - // this ID is used when collapsing a parent row, it searches for all children rows - // which 'parent' attribute's value contains the collapsed row ID - $(this).prop('parent', function () { - return self.parentAttributeParent + ' ' + self.parentId; - }); - - // Add some styles on the cells even/odd - // label (first column of a data row) or not - $("td:first-child:odd", this).addClass('label labeleven'); - $("td:first-child:even", this).addClass('label labelodd'); - $("tr:odd td", domElem).slice(1).addClass('column columnodd'); - $("tr:even td", domElem).slice(1).addClass('column columneven'); - }); - }, - - handleRowActions: function (domElem, rows) { - this.doHandleRowActions(rows); - }, - - // Called when the user click on an actionDataTable row - onClickActionSubDataTable: function (domElem) { - var self = this; - - // get the idSubTable - var idSubTable = $(domElem).attr('id'); - - var divIdToReplaceWithSubTable = 'subDataTable_' + idSubTable; - - var NextStyle = $(domElem).next().attr('class'); - var CurrentStyle = $(domElem).attr('class'); - - var currentRowLevel = getLevelFromClass(CurrentStyle); - var nextRowLevel = getLevelFromClass(NextStyle); - - // if the row has not been clicked - // which is the same as saying that the next row level is equal or less than the current row - // because when we click a row the level of the next rows is higher (level2 row gives level3 rows) - if (currentRowLevel >= nextRowLevel) { - //unbind click to avoid double click problem - $(domElem).off('click'); - self.disabledRowDom = $(domElem); - - var numberOfColumns = $(domElem).children().length; - $(domElem).after('\ - <tr id="' + divIdToReplaceWithSubTable + '" class="cellSubDataTable">\ - <td colspan="' + numberOfColumns + '">\ - <span class="loadingPiwik" style="display:inline"><img src="plugins/Zeitgeist/images/loading-blue.gif" /> Loading...</span>\ - </td>\ - </tr>\ - '); - var savedActionVariable = self.param.action; - - // reset all the filters from the Parent table - var filtersToRestore = self.resetAllFilters(); - - // Do not reset the sorting filters that must be applied to sub tables - this.param['filter_sort_column'] = filtersToRestore['filter_sort_column']; - this.param['filter_sort_order'] = filtersToRestore['filter_sort_order']; - this.param['enable_filter_excludelowpop'] = filtersToRestore['enable_filter_excludelowpop']; - - self.param.idSubtable = idSubTable; - self.param.action = self.props.subtable_controller_action; - - self.reloadAjaxDataTable(false, function (resp) { - self.actionsSubDataTableLoaded(resp, idSubTable); - self.repositionRowActions($(domElem)); - }); - self.param.action = savedActionVariable; - - self.restoreAllFilters(filtersToRestore); - - delete self.param.idSubtable; - } - // else we toggle all these rows - else { - var plusDetected = $('td img.plusMinus', domElem).attr('src').indexOf('plus') >= 0; - - $(domElem).siblings().each(function () { - var parents = $(this).prop('parent').split(' '); - if (parents) { - if (parents.indexOf(idSubTable) >= 0 - || parents.indexOf('subDataTable_' + idSubTable) >= 0) { - if (plusDetected) { - $(this).css('display', ''); - - //unroll everything and display '-' sign - //if the row is already opened - var NextStyle = $(this).next().attr('class'); - var CurrentStyle = $(this).attr('class'); - - var currentRowLevel = getLevelFromClass(CurrentStyle); - var nextRowLevel = getLevelFromClass(NextStyle); - - if (currentRowLevel < nextRowLevel) - setImageMinus(this); - } - else { - $(this).css('display', 'none'); - } - self.repositionRowActions($(domElem)); - } - } - }); - } - - // toggle the +/- image - var plusDetected = $('td img.plusMinus', domElem).attr('src').indexOf('plus') >= 0; - if (plusDetected) { - setImageMinus(domElem); - } - else { - setImagePlus(domElem); - } - }, - - //called when the full table actions is loaded - dataTableLoaded: function (response, workingDivId) { - var content = $(response); - var idToReplace = workingDivId || $(content).attr('id'); - - //reset parents id - self.parentAttributeParent = ''; - self.parentId = ''; - - var dataTableSel = $('#' + idToReplace); - - // keep the original list of related reports - var oldReportsElem = $('.datatableRelatedReports', dataTableSel); - $('.datatableRelatedReports', content).replaceWith(oldReportsElem); - - dataTableSel.replaceWith(content); - piwikHelper.lazyScrollTo(content[0], 400); - - return content; - }, - - // Called when a set of rows for a category of actions is loaded - actionsSubDataTableLoaded: function (response, idSubTable) { - var self = this; - var idToReplace = 'subDataTable_' + idSubTable; - var root = $('#' + self.workingDivId); - - var response = $(response); - self.parentAttributeParent = $('tr#' + idToReplace).prev().prop('parent'); - self.parentId = idToReplace; - - $('tr#' + idToReplace, root).after(response).remove(); - - var missingColumns = (response.prev().find('td').size() - response.find('td').size()); - for (var i = 0; i < missingColumns; i++) { - // if the subtable has fewer columns than the parent table, add some columns. - // this happens for example, when the parent table has performance metrics and the subtable doesn't. - response.append('<td>-</td>'); - } - - var re = /subDataTable_(\d+)/; - var ok = re.exec(self.parentId); - if (ok) { - self.parentId = ok[1]; - } - - // we execute the bindDataTableEvent function for the new DIV - self.bindEventsAndApplyStyle($('#' + self.workingDivId), response); - - //bind back the click event (disabled to avoid double-click problem) - self.disabledRowDom.click( - function () { - self.onClickActionSubDataTable(this) - }); - } -}; - -//helper function for actionDataTable -function getLevelFromClass(style) { - if (!style || typeof style == "undefined") return 0; - - var currentLevelIndex = style.indexOf('level'); - var currentLevel = 0; - if (currentLevelIndex >= 0) { - currentLevel = Number(style.substr(currentLevelIndex + 5, 1)); - } - return currentLevel; -} - -//helper function for actionDataTable -function setImageMinus(domElem) { - $('img.plusMinus', domElem).attr('src', 'plugins/Zeitgeist/images/minus.png'); -} - -//helper function for actionDataTable -function setImagePlus(domElem) { - $('img.plusMinus', domElem).attr('src', 'plugins/Zeitgeist/images/plus.png'); -} - +}; \ No newline at end of file diff --git a/plugins/CoreVisualizations/javascripts/jqplot.js b/plugins/CoreVisualizations/javascripts/jqplot.js index 863a17a9e8..63101a565a 100644 --- a/plugins/CoreVisualizations/javascripts/jqplot.js +++ b/plugins/CoreVisualizations/javascripts/jqplot.js @@ -13,6 +13,11 @@ var dataTable = window.dataTable, dataTablePrototype = dataTable.prototype; + /** + * DataTable UI class for jqPlot graph datatable visualizations. + * + * @constructor + */ window.JqplotGraphDataTable = function () { dataTable.call(this); }; @@ -20,7 +25,7 @@ $.extend(window.JqplotGraphDataTable.prototype, dataTablePrototype, { /** - * Constructor. + * Initializes this class. * * @param {String} workingDivId The HTML ID of the data table DOM element. * @param {Element} [domElem] The DOM element of the data table. diff --git a/plugins/CoreVisualizations/javascripts/seriesPicker.js b/plugins/CoreVisualizations/javascripts/seriesPicker.js index c851b71ba8..136aa8d7e6 100644 --- a/plugins/CoreVisualizations/javascripts/seriesPicker.js +++ b/plugins/CoreVisualizations/javascripts/seriesPicker.js @@ -36,6 +36,7 @@ * }); * * @param {dataTable} The dataTable instance to add a series picker to. + * @constructor */ var SeriesPicker = function (dataTable) { this.domElem = null; diff --git a/plugins/Live/javascripts/visitorProfile.js b/plugins/Live/javascripts/visitorProfile.js index 8d9b4ad73d..f36d03fa61 100644 --- a/plugins/Live/javascripts/visitorProfile.js +++ b/plugins/Live/javascripts/visitorProfile.js @@ -17,6 +17,7 @@ * * @param {Element} element The HTML element returned by the Live.getVisitorLog controller * action. Should have the CSS class 'visitor-profile'. + * @constructor */ var VisitorProfileControl = function (element) { this.$element = $(element).focus(); -- GitLab