Updated JQuery; Added resize sensor library; Updated the admin code (prior to changing gears to use Meteor).
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
<div class="input-group date">
|
||||
<input name="date" id="DFDate" type="text" class="form-control" tabindex="0" placeholder="" required>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<label for="DFItem">Item</label>
|
||||
<div class="form-group">
|
||||
@@ -111,7 +111,8 @@ $(function() {
|
||||
}
|
||||
};
|
||||
|
||||
var dataTable = new LinkedTable($page.find('#dataTable'), {
|
||||
var $table = $page.find('#dataTable');
|
||||
$table.buildTable({
|
||||
url: "data/Sale/readAll",
|
||||
attr: "data-key-name",
|
||||
selection: "row",
|
||||
@@ -156,15 +157,14 @@ $(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
var dataTable = $table.getTable();
|
||||
|
||||
$page.find('#dataTable').on('dblclick', 'tr', function(event) {
|
||||
if(dataTable.getSelectedRow()) {
|
||||
location.hash = "#!/sales-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();
|
||||
@@ -187,9 +187,9 @@ $(function() {
|
||||
//Update the dialog drop downs when the queries finish.
|
||||
$.when.apply($, queries).then(function(query1, query2, query3) {
|
||||
//Initialize the drop down menus.
|
||||
$editorForm.find("#DFItem").buildEditableSelect(query1[0], {textAttr: 'name', listClass: 'comboList'});
|
||||
$editorForm.find("#DFMeasure").buildEditableSelect(query2[0], {textAttr: 'name', listClass: 'comboList'});
|
||||
$editorForm.find("#DFVenue").buildEditableSelect(query3[0], {textAttr: 'name', listClass: 'comboList'});
|
||||
$editorForm.find("#DFItem").buildCombo(query1[0], {textAttr: 'name', listClass: 'comboList'});
|
||||
$editorForm.find("#DFMeasure").buildCombo(query2[0], {textAttr: 'name', listClass: 'comboList'});
|
||||
$editorForm.find("#DFVenue").buildCombo(query3[0], {textAttr: 'name', listClass: 'comboList'});
|
||||
//Initialize the validator
|
||||
$editorForm.validator();
|
||||
});
|
||||
@@ -287,6 +287,21 @@ $(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;
|
||||
}
|
||||
});
|
||||
|
||||
$page.find('div.date').datetimepicker({
|
||||
viewMode: 'years',
|
||||
format: 'MM/DD/YY'
|
||||
});
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++ Delete View +++++++++++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user