Fixed modal check count (don't trust js2coffee)

This commit is contained in:
Fergal Moran
2013-06-20 12:11:21 +01:00
parent a27cd72d8a
commit f423bd5abb
2 changed files with 3 additions and 2 deletions

View File

@@ -17,7 +17,8 @@ define ['jquery', 'bootstrap', 'toastr'], ($, bootstrap, toastr) ->
if document.cookie.indexOf("sessionId")
$.getJSON "/ajax/session_play_count", (data) =>
console.log "utils: got playcount"
@modal "dlg/PlayCountLoginAlert" if (data.play_count isnt 0) and (data.play_count % com.podnoms.settings.nag_count) is 0
if data.play_count != 0 and (data.play_count % com.podnoms.settings.nag_count)
@modal "dlg/PlayCountLoginAlert"
true
showError: (title, message) =>

View File

@@ -28,7 +28,7 @@
if (document.cookie.indexOf("sessionId")) {
$.getJSON("/ajax/session_play_count", function(data) {
console.log("utils: got playcount");
if ((data.play_count !== 0) && (data.play_count % com.podnoms.settings.nag_count) === 0) {
if (data.play_count !== 0 && (data.play_count % com.podnoms.settings.nag_count)) {
return _this.modal("dlg/PlayCountLoginAlert");
}
});