fixed rebase bugs with weird ids

This commit is contained in:
Peter Cottle 2012-10-30 22:33:25 -07:00
parent 23e86e5105
commit 866749bad5
3 changed files with 7 additions and 10 deletions

View file

@ -99,7 +99,7 @@
Rebasing <%= num %> Commits
</p>
<p class="helperText">
(Drag and drop to re-order, and toggle the "pick" button to drop / re-add commits)
(Drag and drop to re-order. Toggling the "pick" button to omit or re-add a commit)
</p>
<div id="entryHolders">
<ul id="rebaseEntries">
@ -121,7 +121,7 @@
<%= id %>
</span>
<a id="toggleButton" class="uiButton uiButtonPink">
Toggle Pick
Pick
</a>
</div>
</li>

View file

@ -133,14 +133,13 @@ var RebaseEntryView = Backbone.View.extend({
},
render: function() {
var json = this.model.toJSON();
this.$el.append(this.template(this.model.toJSON()));
// have to build some of this stuff up manually, lame.
// backbone needs a collectionview, this is ugly
var id = '#' + this.model.get('id');
this.listEntry = this.$(id);
this.$(id + ' #toggleButton').on('click', _.bind(function() {
// hacky :( who would have known jquery barfs on ids with %'s and quotes
this.listEntry = this.$el.children(':last');
this.listEntry.delegate('#toggleButton', 'click', _.bind(function() {
this.toggle();
}, this));
}

View file

@ -15,8 +15,6 @@ Small things to implement:
Minor Bugs to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jQuery gets confused with ids like #C1''.... ?
Big Bugs to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~