Simple image host.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728
  1. $(document).on("ready", function() {
  2. $("#collections .date-created").each(function() {
  3. this.innerHTML = util.dateToString(new Date(this.innerHTML));
  4. });
  5. var collections = [];
  6. $("#collections .collection").each(function() {
  7. collections[this.getAttribute("data-id")] = $(this);
  8. });
  9. $("#collections .delete").on("click", function(evt) {
  10. var id = evt.target.getAttribute("data-id");
  11. var collection = collections[id];
  12. var name = collection.children(".name").html();
  13. if (!confirm("Are you sure you want to delete collection "+name+"?"))
  14. return;
  15. util.api("collection_delete", {
  16. id: id
  17. }, function(err, res) {
  18. if (err)
  19. return util.error(err);
  20. collection.remove();
  21. });
  22. });
  23. });