2 controller('notebookFrameController', ['$scope', '$location','$window','$http', function ($scope,$location,$window,$http) {
4 $scope.invokeSaveNotebook() = function() {
7 // $http.post('rNotebookFE/authCr', $scope.postData).success(function(data, status) {
8 $http({method:'POST', url:'rNotebookFE/authCr', data: $scope.notebookvalue, params:{'qparams' : $scope.additionalqueryParams}}).success(function(data, status) {
9 console.log('Data Sent', data);
10 console.log('Status ', status);
14 // iframe.name = "my_iframe";
16 // $scope.ifr = "<div><iframe src='http://www.w3schools.com'/></div>"
18 // var url = "https://rcloud.research.att.com";
19 // document.getElementById('itestfr').src = data;
20 window.open ('notebook.htm#/notebook-frame','_self',false);
21 // $scope.iframevisibility = true;
22 // document.getElementById('itestfr').src = data;
31 app.controller('notebookFrameController', function ($scope,$location,$window,$http,$routeParams) {
33 //alert($location.search(1, $scope.additionalqueryParams));
34 //var nid = $routeParams.nid;
35 //var qprms = $routeParams.qprms;
36 //var value = $routeParams.value;
37 //console.log('check id ');
38 var nid = $window.location.search.substr($window.location.search.indexOf("=")+1);
39 //console.log('nid',nid);
40 //console.log('qprms',qprms);
41 //$scope.notebookvalue = '833c0a69ec1433fbb2f8752af733cf0e';
42 $scope.additionalqueryParams={};
43 if ($window.location.search.substr($window.location.search.indexOf("=")+1)) {
44 $scope.queryParams = $window.location.search;
45 //console.log('$window.location.search',$window.location.search.substring(0, $window.location.search.length-1));
46 //if ($window.location.search.indexOf("&")!=-1) {
47 if($window.location.search.substring(0, $window.location.search.length-1).indexOf("&")!=-1) {
48 $scope.notebookparam = $window.location.search.substring($window.location.search.indexOf("?")+1,$window.location.search.indexOf("&"));
49 $scope.additionalqueryParams = JSON.parse('{"' + decodeURI($scope.queryParams.substr($scope.queryParams.indexOf("&")+1).replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}');
50 //console.log('Additional parameters present');
53 $scope.notebookparam1 = $window.location.search.substr($window.location.search.indexOf("?")+1);
54 $scope.notebookparam = $scope.notebookparam1.substring(0, $scope.notebookparam1.length - 1);
55 //console.log('Additional parameters absent');
57 //console.log('add parameters',$scope.additionalqueryParams);
58 // $scope.notebookid = $scope.notebookparam.substring(0,$scope.notebookparam.indexOf("="));
59 $scope.notebookvalue = $scope.notebookparam.substr($scope.notebookparam.indexOf("=")+1);
60 // $scope.notebookvalue = $scope.notebookvalue1.substring(0, $scope.notebookvalue1.length - 1);
61 //console.log('New VALL',$scope.notebookvalue);
62 //$scope.postData = $window.location.search.substr($window.location.search.indexOf("=")+1);
63 //console.log('Notebook value present ',$scope.notebookvalue);
66 $scope.notebookvalue = '833c0a69ec1433fbb2f8752af733cf0e';
67 //console.log('Notebook value absent ',$scope.notebookvalue);
72 $http({method:'POST', url:'rNotebookFE/authCr', data: $scope.notebookvalue, params:{'qparams' : $scope.additionalqueryParams}}).success(function(data, status) {
73 //console.log('Data received', data);
74 //console.log('Status ', status);
75 document.getElementById('itestframe').src = data;