Commit f22cde8e authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files
parent 7be64978
...@@ -38,7 +38,7 @@ var QfqNS = QfqNS || {}; ...@@ -38,7 +38,7 @@ var QfqNS = QfqNS || {};
}; };
n.QfqRecordList.prototype.handleDeleteButtonClick = function (event) { n.QfqRecordList.prototype.handleDeleteButtonClick = function (event) {
var $eventTarget = $(event.target); var $eventTarget = $(event.delegateTarget);
var $recordElement = this.getRecordElement(event.target); var $recordElement = this.getRecordElement(event.target);
if ($recordElement.length !== 1) { if ($recordElement.length !== 1) {
......
...@@ -25,11 +25,16 @@ ...@@ -25,11 +25,16 @@
<th></th> <th></th>
</tr> </tr>
<!--
Please note: The text is enclosed in <span/> tags to simulate the real world deployment. Buttons are mostly used
with <span/> tags to display icons on them. Seldom do they only contain text.
-->
<tr class="record"> <tr class="record">
<td>1</td> <td>1</td>
<td>a</td> <td>a</td>
<td> <td>
<button data-sip="1" class="record-delete">Delete</button> <button data-sip="1" class="record-delete"><span>Delete</span></button>
</td> </td>
</tr> </tr>
...@@ -37,7 +42,7 @@ ...@@ -37,7 +42,7 @@
<td>2</td> <td>2</td>
<td>b</td> <td>b</td>
<td> <td>
<button data-sip="2" class="record-delete">Delete</button> <button data-sip="2" class="record-delete"><span>Delete</span></button>
</td> </td>
</tr> </tr>
...@@ -45,7 +50,7 @@ ...@@ -45,7 +50,7 @@
<td>3</td> <td>3</td>
<td>c</td> <td>c</td>
<td> <td>
<button data-sip="3" class="record-delete">Delete</button> <button data-sip="3" class="record-delete"><span>Delete</span></button>
</td> </td>
</tr> </tr>
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
<td>4</td> <td>4</td>
<td>d</td> <td>d</td>
<td> <td>
<button data-sip="4" class="record-delete">Delete</button> <button data-sip="4" class="record-delete"><span>Delete</span></button>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -67,7 +72,7 @@ ...@@ -67,7 +72,7 @@
$(function () { $(function () {
'use strict'; 'use strict';
var qfqRecordList = new QfqNS.QfqRecordList('api/' + $("#deleteTo").val()) var qfqRecordList = new QfqNS.QfqRecordList('api/' + $("#deleteTo").val());
$("#deleteTo").on("change", function (evt) { $("#deleteTo").on("change", function (evt) {
qfqRecordList.deleteUrl = 'api/' + $(evt.target).val(); qfqRecordList.deleteUrl = 'api/' + $(evt.target).val();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment