LT-107: Add countdown dialog
- Remove ui from meteor-stale-session package
This commit is contained in:
1 parent
d18a66d513
commit
5ec3cace94
14 files changed
+158
-74
No files matched your search
@@ -71,8 +71,6 @@ meteor-base@1.0.1
|
||||
meteor-platform@1.2.3
|
||||
minifiers@1.1.7
|
||||
minimongo@1.0.10
|
||||
mizzao:build-fetcher@0.2.0
|
||||
mizzao:jquery-ui@1.11.4
|
||||
mobile-experience@1.0.1
|
||||
mobile-status-bar@1.0.6
|
||||
momentjs:moment@2.11.2
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{> timeoutCountdownDialog}}
|
||||
{{> yield}}
|
||||
</template>
|
||||
@@ -11,3 +11,31 @@ Template.layoutLesionTracker.helpers({
|
||||
return Meteor.user().profile.fullName;
|
||||
}
|
||||
});
|
||||
|
||||
Template.layoutLesionTracker.onCreated(function() {
|
||||
// Show countdown dialog
|
||||
var handle;
|
||||
$(document).on('TriggerOpenTimeoutCountdownDialog', function (e, leftTime) {
|
||||
// TODO: Show modal dialog
|
||||
handle = setInterval(function() {
|
||||
leftTime --;
|
||||
// Set countdownDialogLeftTime session
|
||||
Session.set("countdownDialogLeftTime", leftTime);
|
||||
// Show dialog
|
||||
if ($("#timeoutCountdownDialog").css("display") == "none") {
|
||||
$("#timeoutCountdownDialog").css("display", "block");
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
|
||||
$(document).on('TriggerCloseTimeoutCountdownDialog', function (e) {
|
||||
$("#timeoutCountdownDialog").css("display", "none");
|
||||
if (handle) {
|
||||
clearInterval(handle);
|
||||
// Close the dialog
|
||||
$("#timeoutCountdownDialog").css("display", "none");
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user