tfabrica
Version:
library for TFabrica - TechSol
34 lines • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var TfabricaCrudField = (function () {
function TfabricaCrudField() {
}
TfabricaCrudField.compare = function (a, b) {
if (a.position > b.position)
return 1;
else
return -1;
};
TfabricaCrudField.prototype.getStyle = function () {
try {
var s = this.style.replace(/\\n/g, "\\n")
.replace(/\\'/g, "\\'")
.replace(/\\"/g, '\\"')
.replace(/\\&/g, "\\&")
.replace(/\\r/g, "\\r")
.replace(/\\t/g, "\\t")
.replace(/\\b/g, "\\b")
.replace(/\\f/g, "\\f");
// remove non-printable and other non-valid JSON chars
s = s.replace(/[\u0000-\u0019]+/g, "");
//console.log(s);
return JSON.parse(s);
}
catch (Err) {
return "";
}
};
return TfabricaCrudField;
}());
exports.TfabricaCrudField = TfabricaCrudField;
//# sourceMappingURL=tfabrica.crud.field.model.js.map