save point (see note)

Added initial alembic skeleton, improved base pyramid templates, added auth db
extension, etc...
This commit is contained in:
Lance Edgar 2012-04-09 11:18:34 -05:00
parent 727b9a5fa7
commit b1e6b12b71
43 changed files with 2293 additions and 347 deletions

View file

@ -174,7 +174,7 @@ $(function() {
return false;
});
$('table.grid th.sortable a').live('click', function() {
$('div.grid table th.sortable a').live('click', function() {
var div = $(this).parents('div.grid:first');
var th = $(this).parents('th:first');
var dir = 'asc';
@ -185,43 +185,44 @@ $(function() {
var url = div.attr('url');
url += url.match(/\?/) ? '&' : '?';
url += 'sort=' + th.attr('field') + '&dir=' + dir;
url += '&partial=true';
div.load(url);
return false;
});
$('table.grid.hoverable tbody tr').live('mouseenter', function() {
$('div.grid.hoverable table tbody tr').live('mouseenter', function() {
$(this).addClass('hovering');
});
$('table.grid.hoverable tbody tr').live('mouseleave', function() {
$('div.grid.hoverable table tbody tr').live('mouseleave', function() {
$(this).removeClass('hovering');
});
$('table.grid.clickable tbody tr').live('mouseenter', function() {
$('div.grid.clickable table tbody tr').live('mouseenter', function() {
$(this).addClass('hovering');
});
$('table.grid.clickable tbody tr').live('mouseleave', function() {
$('div.grid.clickable table tbody tr').live('mouseleave', function() {
$(this).removeClass('hovering');
});
$('table.grid.selectable tbody tr').live('mouseenter', function() {
$('div.grid.selectable table tbody tr').live('mouseenter', function() {
$(this).addClass('hovering');
});
$('table.grid.selectable tbody tr').live('mouseleave', function() {
$('div.grid.selectable table tbody tr').live('mouseleave', function() {
$(this).removeClass('hovering');
});
$('table.grid.checkable tbody tr').live('mouseenter', function() {
$('div.grid.checkable table tbody tr').live('mouseenter', function() {
$(this).addClass('hovering');
});
$('table.grid.checkable tbody tr').live('mouseleave', function() {
$('div.grid.checkable table tbody tr').live('mouseleave', function() {
$(this).removeClass('hovering');
});
$('table.grid.clickable tbody tr').live('click', function() {
$('div.grid.clickable table tbody tr').live('click', function() {
var div = $(this).parents('div.grid:first');
if (div.attr('usedlg') == 'True') {
var dlg = get_dialog('grid-object');
@ -240,9 +241,9 @@ $(function() {
}
});
$('table.grid.checkable thead th.checkbox input[type=checkbox]').live('click', function() {
$('div.grid.checkable table thead th.checkbox input[type=checkbox]').live('click', function() {
var checked = $(this).is(':checked');
var table = $(this).parents('table.grid:first');
var table = $(this).parents('table:first');
table.find('tbody tr').each(function() {
$(this).find('td.checkbox input[type=checkbox]').attr('checked', checked);
if (checked) {
@ -253,7 +254,7 @@ $(function() {
});
});
$('table.grid.selectable tbody tr').live('click', function() {
$('div.grid.selectable table tbody tr').live('click', function() {
var table = $(this).parents('table:first');
if (! table.hasClass('multiple')) {
table.find('tbody tr').removeClass('selected');
@ -261,12 +262,22 @@ $(function() {
$(this).addClass('selected');
});
$('table.grid.checkable tbody tr').live('click', function() {
$('div.grid.checkable table tbody tr').live('click', function() {
var checkbox = $(this).find('td:first input[type=checkbox]');
checkbox.attr('checked', !checkbox.is(':checked'));
$(this).toggleClass('selected');
});
$('div.grid td.delete').live('click', function() {
if (confirm("Do you really wish to delete this object?")) {
var grid = $(this).parents('div.grid:first');
var url = grid.attr('delurl');
// alert(url + '?uuid=' + get_uuid(this) + '&delete=true');
location.href = url + '?uuid=' + get_uuid(this) + '&delete=true';
}
return false;
});
$('#grid-page-count').live('change', function() {
var div = $(this).parents('div.grid:first');
loading(div);
@ -320,7 +331,7 @@ $(function() {
$('div.dialog.lookup button.ok').live('click', function() {
var dialog = $(this).parents('div.dialog.lookup:first');
var tr = dialog.find('table.grid tbody tr.selected');
var tr = dialog.find('div.grid table tbody tr.selected');
if (! tr.length) {
alert("You haven't selected anything.");
return false;