sunstone-nodes-sort.diff
/usr/lib/one/sunstone/public/js/sunstone-util.js 2013-12-13 18:08:45.730999937 +1200 | ||
---|---|---|
702 | 702 |
status_cols, |
703 | 703 |
bad_status_values, |
704 | 704 |
no_empty_opt){ |
705 |
var nodes = dataTable.fnGetData(); |
|
705 |
function compareNodes(a, b) { |
|
706 |
if (a[option_name_col] < b[option_name_col]) return -1; |
|
707 |
if (a[option_name_col] > b[option_name_col]) return 1; |
|
708 |
return 0; |
|
709 |
} |
|
710 |
var nodes = dataTable.fnGetData().sort(compareNodes); |
|
706 | 711 |
var select = ""; |
707 | 712 |
if (!no_empty_opt) |
708 | 713 |
select = '<option class="empty_value" value="">'+tr("Please select")+'</option>'; |