Add AJAX workers only for the static links.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
c267933fb8
commit
67b940aec9
@@ -10,13 +10,13 @@ var partialNavigation = new PartialNavigation({
|
||||
jQuery(document).ready(function() {
|
||||
app.setupFullHeightResizing();
|
||||
app.setupNavbarCollapse();
|
||||
app.setupAJAXperiodicWorkers();
|
||||
partialNavigation.initialize();
|
||||
});
|
||||
|
||||
var afterBaseLoad = function () {
|
||||
MayanImage.intialize();
|
||||
app.doToastrMessages();
|
||||
app.setupAJAXperiodicWorkers();
|
||||
app.setupAutoSubmit();
|
||||
app.setupItemsSelector();
|
||||
app.setupNewWindowAnchor();
|
||||
|
||||
@@ -104,22 +104,6 @@ App.prototype.AJAXperiodicWorker = function (options) {
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupAJAXperiodicWorkers = function () {
|
||||
var app = this;
|
||||
|
||||
$('a[data-apw-url]').each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
app.AJAXperiodicWorker({
|
||||
attributeName: $this.data('apw-attribute'),
|
||||
APIURL: $this.data('apw-url'),
|
||||
callback: $this.data('apw-callback'),
|
||||
element: $this,
|
||||
interval: $this.data('apw-interval'),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.doToastrMessages = function () {
|
||||
toastr.options = {
|
||||
'closeButton': true,
|
||||
@@ -186,6 +170,22 @@ App.prototype.doToastrMessages = function () {
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupAJAXperiodicWorkers = function () {
|
||||
var app = this;
|
||||
|
||||
$('a[data-apw-url]').each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
app.AJAXperiodicWorker({
|
||||
attributeName: $this.data('apw-attribute'),
|
||||
APIURL: $this.data('apw-url'),
|
||||
callback: $this.data('apw-callback'),
|
||||
element: $this,
|
||||
interval: $this.data('apw-interval'),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupAutoSubmit = function () {
|
||||
$('.select-auto-submit').change(function () {
|
||||
if ($(this).val()) {
|
||||
|
||||
Reference in New Issue
Block a user