|
860 | 860 | //Add the back button if it's not there |
861 | 861 | if(hdr.find(".backButton").length===1) return; |
862 | 862 | hdr.prepend("<a class='backButton back'>" + this.backButtonText + "</a>"); |
863 | | - //Fix device click no response issue |
864 | | - hdr.on("click", ".backButton", function() { |
865 | | - if(this.useInternalRouting) |
866 | | - this.goBack(this); |
867 | | - }); |
868 | 863 | } |
869 | 864 | else { |
870 | 865 | hdr.find(".backButton").remove(); |
|
971 | 966 | if(!back){ |
972 | 967 | this.classList.remove("active"); |
973 | 968 | //If 'this' is view, then find active panel and remove active from it |
974 | | - var activePanel = $(this).find(".active").get(0); |
975 | | - if (undefined !== activePanel) { |
976 | | - activePanel.classList.remove("active"); |
| 969 | + var tmpActive = $(this).find(".active").get(0); |
| 970 | + if (undefined !== tmpActive) { |
| 971 | + $(tmpActive).trigger("panelunload", [back]); |
| 972 | + tmpActive.classList.remove("active"); |
977 | 973 | } |
978 | | - $(this).trigger("panelunload", [back]); |
| 974 | + //Below trigger will be called when 'to animation' done |
| 975 | + //$(this).trigger("panelunload", [back]); |
979 | 976 | } |
980 | 977 | else{ |
981 | 978 | this.classList.add("active"); |
|
1001 | 998 | //Fixes #850, #860, #873 |
1002 | 999 | var tmpActive = $(hide).find(".active").get(0); |
1003 | 1000 | if (undefined !== tmpActive) { |
| 1001 | + $(tmpActive).trigger("panelunload", [back]); |
1004 | 1002 | tmpActive.classList.remove("active"); |
1005 | 1003 |
|
1006 | 1004 | } |
|
1012 | 1010 | } |
1013 | 1011 | this.classList.remove("active"); |
1014 | 1012 | //If 'hide' is view, then find active panel and remove active from it |
1015 | | - var activePanel = $(this).find(".active").get(0); |
1016 | | - if (undefined !== activePanel) { |
1017 | | - activePanel.classList.remove("active"); |
| 1013 | + var tmpActive = $(this).find(".active").get(0); |
| 1014 | + if (undefined !== tmpActive) { |
| 1015 | + $(tmpActive).trigger("panelunload", [back]); |
| 1016 | + tmpActive.classList.remove("active"); |
1018 | 1017 | } |
1019 | 1018 | $(hide).trigger("panelload", [back]); |
1020 | 1019 | $(hide).addClass("active"); |
|
0 commit comments