Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap modal selecting wrong item with jQuery Tablesorter
    primarykey
    data
    text
    <p>When I trigger this bootstrap modal it selects the topmost entry in the table as e.entry and not the entry on the row. If I sort the column, the modal will again pick the topmost entry. </p> <p>Any ideas as to what might be the issue?</p> <p>Thanks!</p> <pre><code> &lt;script &gt; $(document).ready(function(){ $("#EntryTable").tablesorter( {sortList: [[1,0]]} ); }); &lt;/script&gt; &lt;table class="table" id="EntryTable"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Idea&lt;/th&gt; &lt;th&gt;Edit&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; {% for e in projects.entries.all %} &lt;tr class="info"&gt; &lt;td&gt;{{ e.entry }}&lt;/td&gt; &lt;td&gt;&lt;a href="#EditModal" role="button" data-toggle="modal" class="open-EditEntryDialog label label-info" data-id="{{ e.entry }}"&gt;Edit&lt;/a&gt; &lt;div class="modal hide fade" id="EditModal" tabindex="-1" role="dialog" aria-labelledby="EditModalLabel" aria-hidden="true"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt; &lt;h3 id="EditModalLabel"&gt;Edit an Entry&lt;/h3&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;form action="{{ projects.get_absolute_url }}" method="post"&gt; {% csrf_token %} &lt;input type='hidden' name='entry_id' value='{{ e.id }}'&gt; &lt;input type='hidden' name='project_id' value='{{ projects.id }}'&gt; &lt;input type='text' id='entry' name="entry" placeholder="{{ e.entry }}"&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt; &lt;button type='submit' name="edit_entry" value='Edit Entry' class="btn btn-primary"&gt;Edit Entry&lt;/button&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; {% endfor %} </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload