Subversion Repositories SmartDukaan

Rev

Rev 33973 | Rev 34021 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33973 Rev 34010
Line 187... Line 187...
187
            });
187
            });
188
        });
188
        });
189
 
189
 
190
        $('#manageSuperCatalogModal').on('click', '.removeExisting',function () {
190
        $('#manageSuperCatalogModal').on('click', '.removeExisting',function () {
191
            if (confirm("Are you sure you want to remove this")) {
191
            if (confirm("Are you sure you want to remove this")) {
-
 
192
                const tr = $(this).closest('tr');
192
                const mappingId = $(this).closest('tr').data('mapping-id');
193
                const mappingId = tr.data('mapping-id');
193
                if (mappingId > 0) {
194
                if (mappingId > 0) {
194
                    doDeleteAjaxRequestHandler(context + "/super-catalog/mapping/" + mappingId, function (response) {
195
                    doDeleteAjaxRequestHandler(context + "/super-catalog/mapping/" + mappingId, function (response) {
195
                        if (response == 'true') {
196
                        if (response == "true") {
196
                            $(this).parent('td').closest('tr').remove();
197
                            tr.remove();
197
                        } else {
198
                        } else {
198
                            alert("Something went wrong while deleting the variant");
199
                            alert("Something went wrong while deleting the variant");
199
                        }
200
                        }
200
                    })
201
                    })
201
                } else {
202
                } else {
202
                    $(this).parent('td').closest('tr').remove();
203
                    tr.remove();
203
                }
204
                }
204
            }
205
            }
205
        });
206
        });
206
 
207
 
207
        $('.selectOrCreate').select2({
208
        $('.selectOrCreate').select2({