Пример #1
0
    function showModal(viewOptions) {
        if (modalOpen) {
            log.warn("Modal already open, ignoring request to open another.");
            return Promise.reject();
        }
        if (!modalRegion) {
            initialize();
        }

        var modalView = new ModalView(viewOptions);
        modalRegion.show(modalView);

        return modalView.okDeferred.promise;
    }
 .catch(function () {
     log.warn("Blocked routing of '" + actualFragment + "'.");
 });