Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Fiedorowicz committed Sep 29, 2016
1 parent 0c31b04 commit 7ea6fa4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 14 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Installation
Changelog
---------

## 1.1.1.0-alpha, September 29, 2016

- Bug fixes

## 1.1.0.9-alpha, September 28, 2016

- Styling fixes for inputs
Expand Down
32 changes: 23 additions & 9 deletions web/js/layout/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ $(window).ready(function() {
mata.form.trackFormChange();
mata.form.setFormGroups();

$('.back-btn', window.parent.document).on('mousedown', function () {
$('.back-btn', parent.document).on('click', function (e) {
if (mata.form.checkFormChange() == false) {

e.stopPropagation();
e.preventDefault();
return false;
}
});

$(window.parent.document).trigger('myCustomTrigger');
});

Expand All @@ -26,14 +24,30 @@ $(window.parent).on('popstate pushstate', function(e) {
}
});

$("#w0 a, #subnav-overlay a, .cd-3d-nav a", window.parent.document).on("mousedown", function() {
// $("#w0 a, #subnav-overlay a, .cd-3d-nav a", parent.document).on("click", function(e) {
// if (mata.form.checkFormChange() == false) {
// console.log(this, 'click', false)
// e.stopPropagation();
// e.preventDefault();
// return false;
// }
// });

$(".cd-3d-nav a", parent.document).on("click", function(e) {
if (mata.form.checkFormChange() == false) {
e.stopPropagation();
e.preventDefault();
return false;
}
return false;
}
});

// $(".cd-3d-nav a", parent.document).on("mouseover mouseout", function(e) {
// if (mata.form.hasChanged) {
// console.log(this, e, false)
// e.stopPropagation();
// e.preventDefault();
// return false;
// }
// });

mata.form.trackFormChange = function() {
$('.container form input, .container form select, .container form textarea').on("change keyup paste", function() {
mata.form.hasChanged = true;
Expand Down
2 changes: 1 addition & 1 deletion web/js/layout/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mata.simpleTheme.header = {};

$(window).ready(function() {

$("#header-inner-container .back-btn").on("click", mata.simpleTheme.navigator.handleLink);
$(document).on("click", "#header-inner-container .back-btn", mata.simpleTheme.navigator.handleLink);

})

Expand Down
6 changes: 3 additions & 3 deletions web/js/layout/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jQuery(document).ready(function($) {
//select a new item from the 3d navigation


$('.cd-3d-nav a').on('click', function(e) {

$(document).on('click', '.cd-3d-nav a', function(e) {
console.log(1)
if ($(this).attr("data-subnav") != null) {
showSubnav($(this).attr("data-subnav"))
e.stopPropagation();
Expand All @@ -35,7 +35,7 @@ jQuery(document).ready(function($) {
})


$('.cd-3d-nav a').on('mouseover', function(e) {
$(document).on('mouseover', '.cd-3d-nav a', function(e) {
var selected = $(this);
selected.parent('li').addClass('cd-selected').siblings('li').removeClass('cd-selected');
updateSelectedNav();
Expand Down
2 changes: 1 addition & 1 deletion web/js/layout/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mata.simpleTheme.navigator.handleLink = function() {
}

$(window).ready(function() {
$("#w0 a, #subnav-overlay a").on("click", mata.simpleTheme.navigator.handleLink);
$(document).on("click", "#w0 a, #subnav-overlay a", mata.simpleTheme.navigator.handleLink);

mata.simpleTheme.iframe.on("load", function() {
mata.simpleTheme.iframe.trigger(mata.simpleTheme.events.IFRAME_LOADED);
Expand Down

0 comments on commit 7ea6fa4

Please sign in to comment.