BlueSpire/Durandal — pull request #531 by YipYipX4 (2014-06-02 20:57:01+00:00)
Title: Made dialog.isOpen computed

I have a full-screen loading animation that I have hooked into router.isNavigating (which is observable), but I would also like to hook into dialog.isOpen so that I can hide the loading animation if a dialog is shown (for example, when confirming deactivation).

Therefore, I simply changed dialogCount to be ko.observable and updated all instances of dialogCount, then wrapped the isOpen function with ko.computed.

I am now able to hook into/bind to isOpen and hide the loading animation when isOpen is true.