Created
September 8, 2018 20:20
-
-
Save Charuru/903a8c25cd0b661756bf400ac0d768bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ty.dulst.propertyValueChange = function(property, old, newString) { | |
ty.dulst.cardsInterface.cardCollection.each(function(card) { | |
var changeThisCard; | |
var out = card.get(property); | |
if (out && out === old) { | |
changeThisCard = true; | |
} | |
if (changeThisCard) { | |
console.log("attempting to update", card.get("title")); | |
card.save(property, newString, { | |
error: function() {}, | |
success: function() { | |
console.log( | |
"updated", | |
card.get("title"), | |
"from", | |
old, | |
"to", | |
newString | |
); | |
} | |
}); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment