check if user has disallowed feedback api

pull/1/head
ansuz 8 years ago
parent d15a08830e
commit 1a259bb3aa

@ -24,16 +24,9 @@ define([
Alertify: Alertify,
};
common.feedback = function (action) {
if (!action) { return; }
$.ajax({
type: "HEAD",
url: '/common/feedback.html?' + action + '=' + (+new Date()),
});
};
var store;
var find = common.find = function (map, path) {
return (map && path.reduce(function (p, n) {
return typeof(p[n]) !== 'undefined' && p[n];
@ -61,6 +54,17 @@ define([
return;
};
common.feedback = function (action) {
if (!action) { return; }
try {
if (!getStore().getProxy().proxy.allowUserFeedback) { return; }
} catch (e) { return void console.error(e); }
$.ajax({
type: "HEAD",
url: '/common/feedback.html?' + action + '=' + (+new Date()),
});
};
var whenRealtimeSyncs = common.whenRealtimeSyncs = function (realtime, cb) {
realtime.sync();
realtime.onSettle(cb);

Loading…
Cancel
Save