]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8076 [verto_communicator] Ask before closing the page if a call is in progress.
authorWaldyr de Souza <waldyr.ar@gmail.com>
Wed, 28 Sep 2016 18:19:22 +0000 (15:19 -0300)
committerWaldyr de Souza <waldyr.ar@gmail.com>
Wed, 28 Sep 2016 18:19:39 +0000 (15:19 -0300)
html5/verto/js/src/jquery.verto.js
html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js

index 0e0e38bf38b7fe0328ee6320d566336a4550441a..a2574ed38708230541c6af7d51fc06873893fcb6 100644 (file)
            $.verto.unloadJobs[f]();
        }
 
+        if ($.verto.haltClosure)
+          return $.verto.haltClosure();
+
         for (var i in $.verto.saved) {
             var verto = $.verto.saved[i];
             if (verto) {
index 31ea3794d1b5f1127f0e1de137fda7e007649f60..223d2f8b341917db6a363b263c4232748372cea8 100644 (file)
       $rootScope.dtmfHistory = { value: '' };
       $rootScope.onKeydownDtmfEnabled = true;
 
+      $.verto.haltClosure = function() {
+        if (verto.data.callState == 'active') {
+          return true;
+        }
+      };
+
       if (storage.data.language && storage.data.language !== 'browser') {
         $translate.use(storage.data.language);
       } else {