
There are no longer two separate projects living inside the horizon repository. There is a single project now with a single setup.py, single README, etc. The openstack-dashboard/dashboard django project is now named "openstack_dashboard" and lives as an example project in the topmost horizon directory. The "horizon/horizon" directory has been bumped up a level and now is directly on the path when the root horizon directory is on your python path. Javascript media which the horizon module directly relies upon now ships in the horizon/static dir rather than openstack-dashboard/dashboard/static. All the corresponding setup, installation, build, and env scripts have been updated accordingly. Implements blueprint unified-packaging. Change-Id: Ieed8e3c777432cd046c3e0298869a9428756ab62
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
horizon.addInitFunction(function() {
|
|
$('.table_search input').quicksearch('tr.odd, tr.even', {
|
|
'delay': 300,
|
|
'loader': 'span.loading',
|
|
'bind': 'keyup click',
|
|
'show': function () {
|
|
this.style.display = '';
|
|
},
|
|
'hide': function () {
|
|
this.style.display = 'none';
|
|
},
|
|
'prepareQuery': function (val) {
|
|
return new RegExp(val, "i");
|
|
},
|
|
'testQuery': function (query, txt, _row) {
|
|
return query.test($(_row).find('td:not(.hidden)').text());
|
|
}
|
|
});
|
|
|
|
$('table.sortable').each(function(index, table) {
|
|
var $table = $(table);
|
|
// Only trigger if we have actual data rows in the table.
|
|
// Calling on an empty table throws a javascript error.
|
|
if ($table.find('tbody tr').length) {
|
|
$table.tablesorter();
|
|
}
|
|
});
|
|
|
|
$('table').on('click', 'tr .ajax-update', function (evt) {
|
|
var $this = $(this);
|
|
$.ajax($this.attr('href'), {
|
|
complete: function (jqXHR, status) {
|
|
var $new_row = $(jqXHR.responseText);
|
|
$new_row.find("td.status_unknown").prepend('<i class="icon-updating ajax-updating"></i>');
|
|
$this.closest('tr').replaceWith($new_row);
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
|
|
horizon.datatables.update();
|
|
});
|