Skip to content

Commit

Permalink
Unbind inline action when link clicked.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Shaw committed May 5, 2012
1 parent 674f3f2 commit 9eb569f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/views/scripts/grid.phtml
Expand Up @@ -91,7 +91,7 @@
<?php if(sizeof($this->actions)): ?>
<td style="text-align:center;">
<?php $i = 1; foreach($this->actions as $action): ?>
<a href="<?php echo $action['url']; ?>/<?php echo $action['field']; ?>/<?php echo urlencode($this->escape($data[$action['field']])); ?>" <?php if(isset($action['title'])): ?>title="<?php echo $action['title']; ?>"<?php endif; ?>><?php echo $action['label']; ?></a><?php if($i<count($this->actions)): ?> | <?php endif; ?>
<a id="inline" href="<?php echo $action['url']; ?>/<?php echo $action['field']; ?>/<?php echo urlencode($this->escape($data[$action['field']])); ?>" <?php if(isset($action['title'])): ?>title="<?php echo $action['title']; ?>"<?php endif; ?>><?php echo $action['label']; ?></a><?php if($i<count($this->actions)): ?> | <?php endif; ?>
<?php $i++; endforeach; ?>
</td>
<?php endif; ?>
Expand Down
1 change: 1 addition & 0 deletions public/js/gridola.js
Expand Up @@ -107,6 +107,7 @@ function ($) {
input: function (element) {
$(element).find('input').on('mouseenter', this.enter);
$(element).find('input').on('mouseleave', this.leave);
$(element).find('#inline').on('click', this.enter);
},
enter: function (e) {
$(this).parents('tr').unbind(namespace);
Expand Down

0 comments on commit 9eb569f

Please sign in to comment.