Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
issue vitmalina#226, added lockPage, unlockPage to w2form
  • Loading branch information
mpf82 committed Nov 2, 2017
1 parent e173d32 commit 67797cf
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/w2form.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,28 @@
setTimeout(function () { w2utils.unlock(box, speed); }, 25); // needed timer so if server fast, it will not flash
},

lockPage: function(page, msg){
var $page = $(this.box).find(".page-" + page);
if($page.length){
// page found
w2utils.lock($page, msg);
return true;
}
// page with this id not found!
return false;
},

unlockPage: function(page, speed){
var $page = $(this.box).find(".page-" + page);
if($page.length){
// page found
w2utils.unlock($page, speed);
return true;
}
// page with this id not found!
return false;
},

goto: function (page) {
if (this.page === page) return; // already on this page
if (page != null) this.page = page;
Expand Down

0 comments on commit 67797cf

Please sign in to comment.