diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-02-16 14:19:04 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-02-16 14:19:04 +0100 |
commit | f0c63383b5200861fc9924441150b5ec58df04b9 (patch) | |
tree | 5dedddbd6b33585efd94decc1b7c4613a30bd7bb | |
parent | 7d6cff116a9323f07398dae2acf961a0acb57d0a (diff) |
Add new bisectElement data.
* Dynamically add a new link to go back to the bisect summary.
Change-Id: I803a6fb6dbcefddc74697ce32f14e0974973e50a
-rw-r--r-- | app/dashboard/static/js/linaro-bisect-0.0.2.js | 16 | ||||
-rw-r--r-- | app/dashboard/static/js/linaro-boots-id-1.2.2.js | 6 | ||||
-rw-r--r-- | app/dashboard/static/js/linaro-builds-job-kernel-defconfig-1.1.2.js | 6 |
3 files changed, 22 insertions, 6 deletions
diff --git a/app/dashboard/static/js/linaro-bisect-0.0.2.js b/app/dashboard/static/js/linaro-bisect-0.0.2.js index d650312..d958931 100644 --- a/app/dashboard/static/js/linaro-bisect-0.0.2.js +++ b/app/dashboard/static/js/linaro-bisect-0.0.2.js @@ -76,7 +76,9 @@ var Bisect = (function() { prevBisect: null, // The ID of the div element where to put show/hide buttons for the // bisect table rows. - bisectShowHideID: null + bisectShowHideID: null, + // The ID of the div with the title of the bisect section. + bisectSectionId: null }; // Format strings used to build links, tooltips, labels... @@ -432,7 +434,7 @@ var Bisect = (function() { // Create the +/- buttons to show/hide bisect table rows. function createBisectShowHideButton( - elNumber, elementID, tableID, isComparison) { + elNumber, elementID, tableID, sectionId, tableDivId, isComparison) { var plusButton, minusButton, buttonLayout, @@ -470,6 +472,14 @@ var Bisect = (function() { buttonLayout = sprintf('%s %s', plusButton, minusButton); JSBase.replaceContentByID(elementID, buttonLayout); + $(JSBase.checkIfID(tableDivId)).append( + '<div class="pull-right bisect-back">' + + '<span rel="tooltip" data-toggle="tooltip" ' + + 'title="Go back to bisect summary">' + + '<small><a href="' + sectionId + '">Back to Section</a></small>' + + '</span>' + + '</div>' + ); } // Function called to hide bisect table rows. @@ -665,6 +675,8 @@ var Bisect = (function() { localLen, bisectElements.bisectShowHideID, bisectElements.tableID, + bisectElements.bisectSectionId, + bisectElements.tableDivID, isComparison); if (isComparison) { diff --git a/app/dashboard/static/js/linaro-boots-id-1.2.2.js b/app/dashboard/static/js/linaro-boots-id-1.2.2.js index 7e4cd7a..f534446 100644 --- a/app/dashboard/static/js/linaro-boots-id-1.2.2.js +++ b/app/dashboard/static/js/linaro-boots-id-1.2.2.js @@ -599,7 +599,8 @@ function bisectComparedToMainline(data) { bisectScriptContentID: '#bisect-compare-script', bisectCompareDescriptionID: '#bisect-compare-description', prevBisect: bisectData, - bisectShowHideID: '#bisect-compare-hide-div' + bisectShowHideID: '#bisect-compare-hide-div', + bisectSectionId: '#bisect-compared' }; $.when(ajaxDeferredCall).done(function(data) { @@ -669,7 +670,8 @@ function getBisectData(data) { bisectScriptContentID: '#bisect-script', bisectCompareDescriptionID: null, prevBisect: null, - bisectShowHideID: '#bisect-hide-div' + bisectShowHideID: '#bisect-hide-div', + bisectSectionId: '#bisect-default' }; $.when(bisectAjaxCall) diff --git a/app/dashboard/static/js/linaro-builds-job-kernel-defconfig-1.1.2.js b/app/dashboard/static/js/linaro-builds-job-kernel-defconfig-1.1.2.js index c1c80d8..db40c1e 100644 --- a/app/dashboard/static/js/linaro-builds-job-kernel-defconfig-1.1.2.js +++ b/app/dashboard/static/js/linaro-builds-job-kernel-defconfig-1.1.2.js @@ -430,7 +430,8 @@ function buildBisectComparedToMainline(data) { bisectScriptContentID: '#bisect-compare-script', bisectCompareDescriptionID: '#bisect-compare-description', prevBisect: bisectData, - bisectShowHideID: '#bisect-compare-hide-div' + bisectShowHideID: '#bisect-compare-hide-div', + bisectSectionId: '#bisect-compared' }; JSBase.removeCssClassForID('#bisect-compare-div', 'hidden'); @@ -500,7 +501,8 @@ function getBisectData(data) { bisectScriptContentID: '#bisect-script', bisectCompareDescriptionID: null, prevBisect: null, - bisectShowHideID: '#bisect-hide-div' + bisectShowHideID: '#bisect-hide-div', + bisectSectionId: '#bisect-default' }; $.when(deferredAjaxCall) |