summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2017-09-03 21:02:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-21 16:51:07 +0100
commit17b4f4e7319b95f001f2a6269881d7516ac99fee (patch)
treee0133ef4e7543799f21a549bd1c9906ab1730295
parent8ef614ee7738abd34f083991920a6286eee97ba2 (diff)
downloadpoky-17b4f4e7319b95f001f2a6269881d7516ac99fee.tar.gz
bitbake: toaster: edit column list not sorted
The list of columns in the many 'Edit Columns' pop-ups became unsorted with the 'Toaster Table' implementation. These entries need to be gathered and sorted in the column processing. [YOCTO #12004] (Bitbake rev: d06a8ff74be11e4315feac6768064355ec15611f) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/table.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js
index 1bbc8d1b5a..abcb5ca7a0 100644
--- a/bitbake/lib/toaster/toastergui/static/js/table.js
+++ b/bitbake/lib/toaster/toastergui/static/js/table.js
@@ -202,6 +202,7 @@ function tableInit(ctx){
202 } 202 }
203 203
204 /* Add table header and column toggle menu */ 204 /* Add table header and column toggle menu */
205 var column_edit_entries = [];
205 for (var i in tableData.columns){ 206 for (var i in tableData.columns){
206 var col = tableData.columns[i]; 207 var col = tableData.columns[i];
207 if (col.displayable === false) { 208 if (col.displayable === false) {
@@ -293,9 +294,17 @@ function tableInit(ctx){
293 defaultHiddenCols.push(col.field_name); 294 defaultHiddenCols.push(col.field_name);
294 } 295 }
295 296
296 editColMenu.append(toggler); 297 /* Gather the Edit Column entries */
298 column_edit_entries.push({'title':col.title,'html':toggler});
299
297 } /* End for each column */ 300 } /* End for each column */
298 301
302 /* Append the sorted Edit Column toggler entries */
303 column_edit_entries.sort(function(a,b) {return (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0);} );
304 for (var col in column_edit_entries){
305 editColMenu.append(column_edit_entries[col].html);
306 }
307
299 tableChromeDone = true; 308 tableChromeDone = true;
300 } 309 }
301 310