Updated JQuery; Added resize sensor library; Updated the admin code (prior to changing gears to use Meteor).
This commit is contained in:
@@ -104,7 +104,8 @@ $(function() {
|
||||
}
|
||||
};
|
||||
|
||||
var dataTable = new LinkedTable($page.find('#dataTable'), {
|
||||
var $table = $page.find('#dataTable');
|
||||
$table.buildTable({
|
||||
url: "data/Subcategory/readAll",
|
||||
attr: "data-key-name",
|
||||
selection: "row",
|
||||
@@ -148,15 +149,14 @@ $(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
var dataTable = $table.getTable();
|
||||
|
||||
$page.find('#dataTable').on('dblclick', 'tr', function(event) {
|
||||
if(dataTable.getSelectedRow()) {
|
||||
location.hash = "#!/subcategories-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();
|
||||
@@ -188,7 +188,7 @@ $(function() {
|
||||
//Update the dialog drop downs when the queries finish.
|
||||
$.when.apply($, queries).then(function(query1) {
|
||||
//Initialize the drop down menu.
|
||||
$editorForm.find("#DFCategory").buildEditableSelect(query1, {textAttr: 'name', listClass: 'comboList'});
|
||||
$editorForm.find("#DFCategory").buildCombo(query1, {textAttr: 'name', listClass: 'comboList'});
|
||||
//Initialize the validator
|
||||
$editorForm.validator();
|
||||
});
|
||||
@@ -266,6 +266,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