Viewing File: /usr/local/cpanel/base/sharedjs/angular/oauth2.min.js
var OAuth2App=angular.module("OAuth2App",[]);OAuth2App.controller("OAuth2Landing",["$scope","$http","$window",function($scope,$http,$window){"use strict";$scope.oauth2_endpoint=PAGE.oauth2_endpoint;$scope.oauth2_config=PAGE.oauth2_config;$scope.isProcessing=false;$scope.buildRedirectURI=function(uri){return location.protocol+"//"+location.hostname+":"+location.port+uri};$scope.oauth2_config.redirect_uri=$scope.buildRedirectURI($scope.oauth2_config.redirect_uri);$scope.login=function(){var popupOptions={name:"OAuth2Window",openParams:{autoCenter:true,height:415,width:450}};var formatPopupOptions=function(options){var pairs=[];angular.forEach(options,function(value,key){if(value||value===0){value=value===true?"yes":value;pairs.push(key+"="+value)}});return pairs.join(",")};if($scope.oauth2_config&&$scope.oauth2_config.email){var emails=$scope.oauth2_config.email.split(/[,]/);$scope.oauth2_config.email=emails[0]}var url=encodeURI($scope.oauth2_endpoint)+"?"+$.param($scope.oauth2_config);$window.open(url,popupOptions.name,formatPopupOptions(popupOptions.openParams))}}]);
Back to Directory
File Manager