mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Started moving public folder stuff back to website
This commit is contained in:
41
website/public/js/static.js
Normal file
41
website/public/js/static.js
Normal file
@@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
|
||||
window.habitrpg = angular.module('habitrpg', ['chieffancypants.loadingBar', 'ui.bootstrap'])
|
||||
.constant("API_URL", "")
|
||||
.constant("STORAGE_USER_ID", 'habitrpg-user')
|
||||
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
||||
.constant("MOBILE_APP", false)
|
||||
|
||||
.controller("RootCtrl", ['$scope', '$location', '$modal', '$http', function($scope, $location, $modal, $http){
|
||||
var memberId = $location.search()['memberId'];
|
||||
if (memberId) {
|
||||
$http.get('/api/v2/members/'+memberId).success(function(data, status, headers, config){
|
||||
$scope.profile = data;
|
||||
$scope.Content = window.habitrpgShared.content;
|
||||
$modal.open({
|
||||
templateUrl: 'modals/member.html',
|
||||
scope: $scope
|
||||
});
|
||||
})
|
||||
}
|
||||
}])
|
||||
|
||||
.controller("PlansCtrl", ['$rootScope',
|
||||
function($rootScope) {
|
||||
$rootScope.clickContact = function(){
|
||||
window.ga && ga('send', 'event', 'button', 'click', 'Contact Us (Plans)');
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
.controller('AboutCtrl',[function(){
|
||||
$(document).ready(function(){
|
||||
$('a.gallery').colorbox({
|
||||
maxWidth: '90%',
|
||||
maxHeight: '80%',
|
||||
transition: 'none',
|
||||
scalePhotos:true
|
||||
//maxHeight: '70%'
|
||||
});
|
||||
});
|
||||
}])
|
||||
Reference in New Issue
Block a user