From: Sapan Shah Date: Thu, 23 Jan 2014 22:39:53 +0000 (-0800) Subject: Provide callback feature when modal is visible X-Git-Tag: jenkins-controller-bulk-release-prepare-only-2-1~3^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=d5cd2fdfbd314dccdee65f4a10e06dd33071858d;hp=-c Provide callback feature when modal is visible Change-Id: I50cc978f1a32bca94d53db84d2c281ddf9099d52 Signed-off-by: Sapan Shah --- d5cd2fdfbd314dccdee65f4a10e06dd33071858d diff --git a/opendaylight/web/devices/src/main/resources/js/page.js b/opendaylight/web/devices/src/main/resources/js/page.js index 855dc90aa9..935354e304 100644 --- a/opendaylight/web/devices/src/main/resources/js/page.js +++ b/opendaylight/web/devices/src/main/resources/js/page.js @@ -127,6 +127,7 @@ one.f.switchmanager.nodesLearnt = { } }, modal : { + registry : { callback:undefined }, initialize: { updateNode: function(evt) { one.f.switchmanager.nodesLearnt.ajax.main(one.f.switchmanager.rootUrl + "/tiers", function(tiers) { @@ -151,7 +152,13 @@ one.f.switchmanager.nodesLearnt = { // inject body (nodePorts) one.lib.modal.inject.body($modal, $body); - $modal.modal(); + + $modal.modal().on("shown",function() { + var callback = one.f.switchmanager.nodesLearnt.modal.registry.callback; + if( callback !== undefined && $.isFunction(callback)) { + callback(); + } + }); }); }, popout: function() {