(中正大學) 新版 RWD 響應式 Google 協作平台 (2017)
{{item.category.name}}
{{item.name}}
{{item.name}}
{{item.full_name}}
-->' + '' + '
' }; }]) .controller('GroupController', ['$scope', '$http', '$location', '$timeout', '$translate', '$filter', function($scope, $http, $location, $timeout, $translate, $filter) { var self = this; $scope.service_url = [location.origin, '/private'].join(''); $scope.global = { message: '' }; $scope.openTab = function(url, target) { window.open(url, target); } $scope.changeLanguage = function(lang) { lang = lang.toLowerCase(); if (lang === 'zh-tw') lang = {title: '繁體中文',type: 'zh-tw'}; else if (lang === 'zh-cn') lang = {title: '简体中文',type: 'zh-cn'}; else if (lang === 'es-ar') lang = {title: 'Español (Argentina)',type: 'es-ar'}; else if (lang === 'es-pe') lang = {title: 'Español (Perú)',type: 'es-pe'}; else if (lang === 'de-de') lang = {title: 'Deutsch',type: 'de-de'}; else lang = {title: 'English',type: 'en-us'}; $scope.language = lang; $translate.use(lang.type); if ($scope.target.account) { ga('send', '/personal/profile', 'service', 'put'); $http.put([$scope.service_url, '/personal/profile'].join(''), {language: JSON.stringify(lang)}) .success(function(response, status) { window.scrollTo(0, 0); }); } } $scope.open1know = function() { window.location.href = location.origin; } $scope.signinWithIschool = function() { var width = 800; var height = 700; var top = (screen.height/2)-(height/2); var left = (screen.width/2)-(width/2); var state = encodeURIComponent(['join_group:', $scope.target.uqid].join('')); var target = ['https://auth.ischool.com.tw/oauth/authorize.php?client_id=a266592ce660b43f980d49b4079d53ed&response_type=code&state=', state, '&redirect_uri=', window.location.origin, '/oauth/ischool&lang=', $scope.lang, '&scope=User.Mail,User.BasicInfo,User.Application'].join(''); window.open(target, '1409620722041', ['width=',width,',height=',height,',menubar=0,titlebar=0,status=0,top=',top,',left=',left].join('')).focus(); } /* Sign In with QSchool */ $scope.signinWithQschool = function(type) { var width = 800; var height = 700; var top = (screen.height/2)-(height/2); var left = (screen.width/2)-(width/2); var state = encodeURIComponent($location.url()); var target = ['https://qschool.benq.com.cn/oauth/authorize.php?client_id=a266592ce660b43f980d49b4079d53ed&response_type=code&state=', state, '&redirect_uri=', $scope.BASE_URL, '/oauth/qschool&lang=', $scope.language.type, '&scope=User.Mail,User.BasicInfo,User.Application', type].join(''); window.open(target, '1409620722041', ['width=',width,',height=',height,',menubar=0,titlebar=0,status=0,top=',top,',left=',left].join('')).focus(); } $scope.open = function() { window.location.href = [location.origin, "/#!/group/", $scope.target.uqid].join(''); } $scope.subscribe = function() { ga('send', '/group/:uqid/applyToJoin', 'service', 'post'); $http.post([$scope.service_url, '/group/', $scope.target.uqid, '/applyToJoin'].join('')) .success(function(response, status) { if (!response.error) { if ($scope.target.privacy) window.location.href = [location.origin, "/#!/group/", $scope.target.uqid].join(''); else $scope.target.status = response.success.status; } }); } ga('send', '/group/:uqid.json', 'service', 'get'); $http.get([location.origin, '/group/bdff651dda74.json'].join('')) .success(function(response, status) { $scope.target = response; $scope.target.encode_page = encodeURIComponent(response.page); $scope.editors = response.editors; $('.loading').hide(); $('.completed').show(); if (response.account) { $scope.language = response.account.language; $translate.use($scope.language.type); } else { var lang = 'en-us'; if (window.navigator.language !== undefined) lang = window.navigator.language.toLowerCase(); else if (window.navigator.systemLanguage !== undefined) lang = window.navigator.systemLanguage.toLowerCase(); if (lang === 'zh-tw') lang = {title: '繁體中文',type: 'zh-tw'}; else if (lang === 'zh-cn') lang = {title: '简体中文',type: 'zh-cn'}; else if (lang === 'es-ar') lang = {title: 'Español (Argentina)',type: 'es-ar'}; else if (lang === 'es-pe') lang = {title: 'Español (Perú)',type: 'es-pe'}; else if (lang === 'de-de') lang = {title: 'Deutsch',type: 'de-de'}; else lang = {title: 'English',type: 'en-us'}; $scope.language = lang; $translate.use($scope.language.type); } window.document.title = '(中正大學) 新版 RWD 響應式 Google 協作平台 (2017) - ' +$filter('translate')('N001'); }); }])