Updated JQuery; Added resize sensor library; Updated the admin code (prior to changing gears to use Meteor).

This commit is contained in:
Wynne Crisman
2016-12-28 11:13:44 -08:00
parent 801c0507e5
commit 00f2be30ce
58 changed files with 29553 additions and 252 deletions

View File

@@ -15,7 +15,7 @@
</label>
</div>
</div>
<table id="dataTable" class="table table-striped table-hover">
<table id="dataTable" class="table table-striped table-hover" tabindex="0">
<thead>
<tr>
<th data-key-name="name">Name</th>
@@ -99,7 +99,8 @@ $(function() {
}
};
var dataTable = new LinkedTable($page.find('#dataTable'), {
var $table = $page.find('#dataTable');
$table.buildTable({
url: "data/Venue/readAll",
attr: "data-key-name",
selection: "row",
@@ -122,16 +123,19 @@ $(function() {
}
}
});
var dataTable = $table.getTable();
$page.find('#dataTable').on('dblclick', 'tr', function(event) {
if(dataTable.getSelectedRow()) {
location.hash = "#!/venues-edit";
}
});
$page.find('#dataTable').on('keyup', 'table', function(event) {
$page.find('#page').on('keyup', '.page', function(event) {
switch(event.keyCode || event.which) {
case 0x0D: //Enter
if(dataTable.getSelectedRow()) {
$btnEdit.click();
location.hash = '#!/venues-edit';
}
break;
case 0x08: //Backspace
@@ -144,9 +148,6 @@ $(function() {
}
});
//Call the refresh user table function once initially.
dataTable.build();
//Refresh the data table if the user toggles the button to show/hide deleted elements.
$page.find('#includeDeletedToggle').on('click', function(event) {
dataTable.refresh();
@@ -247,6 +248,16 @@ $(function() {
});
});
//Close the view if the user uses the escape key and it isn't handled at the widget level.
$editorView.on('keyup', function(event) {
switch(event.keyCode) {
case 27:
if(!event.isDefaultPrevented())
history.back();
break;
}
});
//++++++++++++++++++++++++++++++++++++++
// ++++++++++ Delete View +++++++++++