unlockCurrentPage: function () {
var $this = this;
var change = false;
+
+ var unlockEvenPages = !this.fluidbook.mobilefirst.enabled;
+ var currentPage = $this.fluidbook.currentPage;
+
$.each(this.locks, function (k, v) {
if (v.unlocked === 1) {
return;
}
- var currentPage = $this.fluidbook.currentPage;
- if (currentPage % 2 === 1) {
+
+ if (unlockEvenPages && currentPage % 2 === 1) {
currentPage--;
}
- var lockPage = k;
- if (lockPage % 2 === 1) {
+ var lockPage = parseInt(k);
+ if (unlockEvenPages && lockPage % 2 === 1) {
lockPage--;
}
if (currentPage !== lockPage) {