Skip to content

Commit

Permalink
version bump and removed console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
DubFriend committed Oct 17, 2014
1 parent 882df44 commit ac39c3d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 39 deletions.
30 changes: 15 additions & 15 deletions issue_examples/jquery_uniform/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>jquery uniform issue</title>
<title>jquery uniform issue</title>

<link
rel="stylesheet"
type="text/css"
href="pixelmatrix-uniform/themes/agent/css/uniform.agent.css"/>
<link
rel="stylesheet"
type="text/css"
href="pixelmatrix-uniform/themes/agent/css/uniform.agent.css"/>
</head>
<body>
<a href="https://github.com/DubFriend/jquery.repeater/issues/1">
This example is to address the issue at this link.
This example is to address the issue at this link.
</a>

<form action="echo.php" class="repeater">
Expand Down Expand Up @@ -79,22 +79,22 @@
$(this).find('select, input, a.button, button').uniform();
},
hide: function (deleteElement) {
// jquery.uniform appears to add click events to button inputs
// which causes "show" and "hide" to get fired twice.
// I wrapped the callback for these events in a throttle to
// prevent this, however blocking functions like "confirm"
// will still allow the function to be called twice in some
// browsers. (I found it to be a problem in firefox,
// but not chrome)
// jquery.uniform appears to add click events to button inputs
// which causes "show" and "hide" to get fired twice.
// I wrapped the callback for these events in a throttle to
// prevent this, however blocking functions like "confirm"
// will still allow the function to be called twice in some
// browsers. (I found it to be a problem in firefox,
// but not chrome)

// if(confirm('Are you sure you want to delete this element?')) {
$(this).slideUp(deleteElement);
// }
}
});

// For the workaround to work, its important that jquery.uniform
// is fired after jquery.repeater.
// For the workaround to work, its important that jquery.uniform
// is fired after jquery.repeater.
$("select, input, a.button, button").uniform();
});
</script>
Expand Down
30 changes: 15 additions & 15 deletions issue_examples/jquery_uniform/index.pre.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>jquery uniform issue</title>
<title>jquery uniform issue</title>

<link
rel="stylesheet"
type="text/css"
href="pixelmatrix-uniform/themes/agent/css/uniform.agent.css"/>
<link
rel="stylesheet"
type="text/css"
href="pixelmatrix-uniform/themes/agent/css/uniform.agent.css"/>
</head>
<body>
<a href="https://github.com/DubFriend/jquery.repeater/issues/1">
This example is to address the issue at this link.
This example is to address the issue at this link.
</a>

<!-- @include ../../repeater.html -->
Expand Down Expand Up @@ -40,22 +40,22 @@
$(this).find('select, input, a.button, button').uniform();
},
hide: function (deleteElement) {
// jquery.uniform appears to add click events to button inputs
// which causes "show" and "hide" to get fired twice.
// I wrapped the callback for these events in a throttle to
// prevent this, however blocking functions like "confirm"
// will still allow the function to be called twice in some
// browsers. (I found it to be a problem in firefox,
// but not chrome)
// jquery.uniform appears to add click events to button inputs
// which causes "show" and "hide" to get fired twice.
// I wrapped the callback for these events in a throttle to
// prevent this, however blocking functions like "confirm"
// will still allow the function to be called twice in some
// browsers. (I found it to be a problem in firefox,
// but not chrome)

// if(confirm('Are you sure you want to delete this element?')) {
$(this).slideUp(deleteElement);
// }
}
});

// For the workaround to work, its important that jquery.uniform
// is fired after jquery.repeater.
// For the workaround to work, its important that jquery.uniform
// is fired after jquery.repeater.
$("select, input, a.button, button").uniform();
});
</script>
Expand Down
4 changes: 1 addition & 3 deletions jquery.repeater.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// jquery.repeater version 0.1.4
// jquery.repeater version 0.1.5
// https://github.com/DubFriend/jquery.repeater
// (MIT) 16-10-2014
// Brian Detering <[email protected]> (http://www.briandetering.net/)
Expand Down Expand Up @@ -776,14 +776,12 @@ $.fn.repeater = function(fig) {
// get fired twice.

$self.find('[data-repeater-create]').click(throttle(50, function () {
console.log('createa');
var $item = $itemTemplate.clone();
appendItem($item);
show.call($item.get(0));
}));

$list.on('click', '[data-repeater-delete]', throttle(50, function () {
console.log('delete');
var self = $(this).closest('[data-repeater-item]').get(0);
hide.call(self, function () {
$(self).remove();
Expand Down
Loading

0 comments on commit ac39c3d

Please sign in to comment.