Updated JQuery; Added resize sensor library; Updated the admin code (prior to changing gears to use Meteor).
This commit is contained in:
@@ -99,7 +99,8 @@ $(function() {
|
||||
}
|
||||
};
|
||||
|
||||
var dataTable = new LinkedTable($page.find('#dataTable'), {
|
||||
var $table = $page.find('#dataTable');
|
||||
$table.buildTable({
|
||||
url: "data/Category/readAll",
|
||||
attr: "data-key-name",
|
||||
selection: "row",
|
||||
@@ -122,15 +123,14 @@ $(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
var dataTable = $table.getTable();
|
||||
|
||||
$page.find('#dataTable').on('dblclick', 'tr', function(event) {
|
||||
if(dataTable.getSelectedRow()) {
|
||||
location.hash = "#!/categories-edit";
|
||||
}
|
||||
});
|
||||
|
||||
//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();
|
||||
@@ -231,6 +231,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 +++++++++++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user