Animate deleting groups, fix bug where edit mode was exited improperly when deleting groups
This commit is contained in:
		
							parent
							
								
									e2ead1d33f
								
							
						
					
					
						commit
						00615e0dfe
					
				|  | @ -160,9 +160,19 @@ function deleteGroup(e) { | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			loadBookmarks(); |  | ||||||
| 			groupsStore.delete(groups.length - 1); | 			groupsStore.delete(groups.length - 1); | ||||||
| 			db.close(); | 			db.close(); | ||||||
|  | 
 | ||||||
|  | 			$("#cardList").children().each(function (index, item) { | ||||||
|  | 				item = $(item); | ||||||
|  | 				if (index == groupIndex) { | ||||||
|  | 					item.hide(300, "swing", e => item.remove()); | ||||||
|  | 				} else if (index > groupIndex) { | ||||||
|  | 					// modify id and data to reflect new index
 | ||||||
|  | 					$(item.children()[0]).attr("data-group-index", index - 1); | ||||||
|  | 					item.attr("id", "group-" + (index - 1)); | ||||||
|  | 				} | ||||||
|  | 			}); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue