check if user has disallowed feedback api
This commit is contained in:
@@ -24,16 +24,9 @@ define([
|
|||||||
Alertify: Alertify,
|
Alertify: Alertify,
|
||||||
};
|
};
|
||||||
|
|
||||||
common.feedback = function (action) {
|
|
||||||
if (!action) { return; }
|
|
||||||
$.ajax({
|
|
||||||
type: "HEAD",
|
|
||||||
url: '/common/feedback.html?' + action + '=' + (+new Date()),
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var store;
|
var store;
|
||||||
|
|
||||||
|
|
||||||
var find = common.find = function (map, path) {
|
var find = common.find = function (map, path) {
|
||||||
return (map && path.reduce(function (p, n) {
|
return (map && path.reduce(function (p, n) {
|
||||||
return typeof(p[n]) !== 'undefined' && p[n];
|
return typeof(p[n]) !== 'undefined' && p[n];
|
||||||
@@ -61,6 +54,17 @@ define([
|
|||||||
return;
|
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) {
|
var whenRealtimeSyncs = common.whenRealtimeSyncs = function (realtime, cb) {
|
||||||
realtime.sync();
|
realtime.sync();
|
||||||
realtime.onSettle(cb);
|
realtime.onSettle(cb);
|
||||||
|
|||||||
Reference in New Issue
Block a user