diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 53dfacd..20e5574 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -133,8 +133,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A var homepath = $rootScope.homeURL; $("#CBDetailPageDiv").css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); $(".navbar-fixed-top").css({"display": "none", "pointer-events": "none", "opacity": ".5" }); - $("#topMenuBar").css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); - + $.jsPanel({ id: 'OpenResourcePanel', @@ -143,7 +142,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A currentController: 'HomeController', parentSlug: 'curriculum-builder-detail', content: '
' + - '', + '', title: "Open Module in Curriculum Builder", position: { top: 1, @@ -161,6 +160,40 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A } + $scope.loadOpenResource = function () { + + var iframe = document.getElementById('OpenModuleInCB'); + var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document; + var head = $(innerDoc).contents().find("head"); + if (head != undefined && head != null) + { + $scope.loadopenresourceContent(head); + } + else + { + $timeout(function () { + + var head = $(innerDoc).contents().find("head"); + $scope.loadopenresourceContent(head); + + }, 1000); + } + + + } + + $scope.loadopenresourceContent=function(header) + { + var css = ''; + + $(header).append(css); + } + $rootScope.forgotPwdModalShow = function () { document.getElementById("forgetPwdForm").reset() $("#forgotPwdModal").modal("show"); @@ -6781,4 +6814,15 @@ function printImagePreview(event) { } +function loadOpenResource(event) { + + console.log('resource loading') + var scope = angular.element(document.querySelector('[ng-controller="HomeController"]')).scope(); + + scope.$apply(function () { + scope.loadOpenResource(); + + }); + +}