window.Noty = Noty;
window.GrahamScan = GrahamScan;
+
window.key.filter = function (event) {
let tagName = (event.target || event.srcElement).tagName;
//let field=tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA';
function LinkEditor() {
this.mobileFirst = FLUIDBOOK_DATA.settings.mobileNavigationType === 'mobilefirst';
this.single = ['mobilefirst', 'portrait'].indexOf(FLUIDBOOK_DATA.settings.mobileNavigationType) >= 0 || FLUIDBOOK_DATA.settings.pages <= 1;
- this.rtl = FLUIDBOOK_DATA.id==30547 && !this.single && ['ar', 'he', 'fa', 'ku', 'pa', 'sd', 'ur'].indexOf(FLUIDBOOK_DATA.locale) >= 0;
this.pw = FLUIDBOOK_DATA.settings.width;
this.ph = FLUIDBOOK_DATA.settings.height;
this.dimensionProperties = ['left', 'top', 'width', 'height'];
+
this.init();
}
window.location.hash = '#' + this.currentPage;
this.clearLinksAndRulers();
- this.loader.loadPage(this.currentPage, this.rtl ? 'right' : 'left');
+ this.loader.loadPage(this.currentPage, 'left');
if (!this.single && !isSpecial) {
- this.loader.loadPage(this.currentPage + 1, this.rtl ? 'left' : 'right');
+ this.loader.loadPage(this.currentPage + 1, 'right');
}
$("#linkeditor-page-field input").val(this.currentNumericPage);
this.resize.resize();
getCurrentPage: function () {
return this.currentPage;
},
+
}
+
$(function () {
window.linkeditor = new LinkEditor();
});
},
normalizeLinksPage() {
- let $this = this;
let pw = this.linkeditor.pw;
let single = this.linkeditor.single;
- let rtl = this.linkeditor.rtl
$.each(LINKS, function (uid, link) {
link.left = parseFloat(link.left)
- if (!rtl) {
+ if (!single) {
if (link.page % 2 === 0 && link.left > pw) {
link.page++;
link.left -= pw;
link.page--;
link.left += pw;
}
- } else {
- if (link.page % 2 === 0) {
- link.page++;
- link.left += pw;
- }
}
LINKS[uid] = link;
});
roundDimension: function (v) {
return (Math.round(v * 100000) / 100000);
- },
-
- intersectRect: function (r1, r2) {
+ }, intersectRect: function (r1, r2) {
return !(r2.left > r1.right || r2.right < r1.left || r2.top > r1.bottom || r2.bottom < r1.top);
- },
-
- isfocusOnFormItem: function () {
+ }, isfocusOnFormItem: function () {
return $(document.activeElement).is('input[type="text"],input[type="email"],input[type="number"],input[type="tel"],input[type="search"],textarea,select');
},