return this.linksActions[linkId].indexOf(action) >= 0;
},
- unlockNextPage: function () {
+ unlockCurrentPage: function () {
+ var $this = this;
+ var change = false;
$.each(this.locks, function (k, v) {
if (v.unlocked === 1) {
return;
}
- if (v.conditions.length === 0) {
+ var currentPage = $this.fluidbook.currentPage;
+ if (currentPage % 2 === 1) {
+ currentPage--;
+ }
+ var lockPage = k;
+ if (lockPage % 2 === 1) {
+ lockPage--;
+ }
+ if (currentPage !== lockPage) {
return;
}
$this.locks[k].unlocked = 1;
+ change = true;
return true;
});
- if (this.getNextLockPage() !== this.getMaxPage()) {
+
+ if (change) {
this.setMaxPage(this.getNextLockPage(), false);
}
+
}
}
\ No newline at end of file
f();
},
- unlockNextPage: function () {
- this.contentlock.unlockNextPage();
+ unlockCurrentPage: function () {
+ this.contentlock.unlockCurrentPage();
},
flushNetworkQueue: function () {