This commit is contained in:
Jon Lambson 2017-10-24 14:32:36 -06:00
parent 6a2843d95f
commit 43fa9e69f8
9 changed files with 9 additions and 1506 deletions

View File

@ -593,7 +593,7 @@ a:hover, a:focus {
background-color: #e74c3c; background-color: #e74c3c;
border-radius: 5px; border-radius: 5px;
display: block; display: block;
padding: 60px 20px; padding: 30px 20px;
text-align: center; text-align: center;
width: 100%; width: 100%;
} }

View File

@ -22,7 +22,6 @@
<script src="/js/lib/jquery/jquery-2.2.0.min.js" charset="utf-8"></script> <script src="/js/lib/jquery/jquery-2.2.0.min.js" charset="utf-8"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<script src="/js/lib/bootstrap/bootstrap.min.js" charset="utf-8"></script> <script src="/js/lib/bootstrap/bootstrap.min.js" charset="utf-8"></script>
<script src="/js/underscore.js" charset="utf-8"></script>
<!-- Daplie Modules --> <!-- Daplie Modules -->
<script src="/assets/oauth3.org/oauth3.core.js" charset="utf-8"></script> <script src="/assets/oauth3.org/oauth3.core.js" charset="utf-8"></script>
<script src="/assets/oauth3.org/oauth3.dns.js" charset="utf-8"></script> <script src="/assets/oauth3.org/oauth3.dns.js" charset="utf-8"></script>
@ -44,7 +43,6 @@
<!-- Services --> <!-- Services -->
<script src="/assets/oauth3.org/oauth3.ng.js" charset="utf-8"></script> <script src="/assets/oauth3.org/oauth3.ng.js" charset="utf-8"></script>
<script src="/js/services/auth-service.js" charset="utf-8"></script> <script src="/js/services/auth-service.js" charset="utf-8"></script>
<script src="/js/services/websites-service.js" charset="utf-8"></script>
<!-- Controllers --> <!-- Controllers -->
<script src="/js/controllers/login-controller.js" charset="utf-8"></script> <script src="/js/controllers/login-controller.js" charset="utf-8"></script>
<script src="/js/controllers/profile-controller.js" charset="utf-8"></script> <script src="/js/controllers/profile-controller.js" charset="utf-8"></script>
@ -56,8 +54,6 @@
<script src="/js/controllers/website-controller.js" charset="utf-8"></script> <script src="/js/controllers/website-controller.js" charset="utf-8"></script>
<script src="/js/controllers/dns-controller.js" charset="utf-8"></script> <script src="/js/controllers/dns-controller.js" charset="utf-8"></script>
<script src="/js/controllers/email-controller.js" charset="utf-8"></script> <script src="/js/controllers/email-controller.js" charset="utf-8"></script>
<script src="/js/controllers/websites-controller.js" charset="utf-8"></script>
<script src="/js/controllers/websitesDetail-controller.js" charset="utf-8"></script>
<!-- Divrectives --> <!-- Divrectives -->
<script src="/js/directives/achievement-directive.js" charset="utf-8"></script> <script src="/js/directives/achievement-directive.js" charset="utf-8"></script>
<script src="/js/directives/todo-directive.js" charset="utf-8"></script> <script src="/js/directives/todo-directive.js" charset="utf-8"></script>

View File

@ -121,11 +121,6 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider
} }
} }
}) })
.state('app.websites.detail', {
url: '/detail/:id',
templateUrl: 'templates/websites-detail.html',
controller: 'websiteCtrl as vm'
})
.state('app.dns', { .state('app.dns', {
url: 'dns', url: 'dns',
views: { views: {

View File

@ -68,8 +68,8 @@ app.directive('notificationBar', [function () {
}]); }]);
app.controller('websiteCtrl', [ app.controller('websiteCtrl', [
'$scope', '$q', 'Auth', 'azp@oauth3.org', '$timeout', '$sce','$stateParams', 'websitesService', '$scope', '$q', 'Auth', 'azp@oauth3.org', '$timeout', '$sce',
function ($scope, $q, Auth, Oauth3, $timeout, $sce, $stateParams, websitesService) { function ($scope, $q, Auth, Oauth3, $timeout, $sce) {
var vm = this; var vm = this;
var angular = window.angular; var angular = window.angular;
@ -622,6 +622,7 @@ app.controller('websiteCtrl', [
token: vm.Shares.inviteToken token: vm.Shares.inviteToken
}).then(function (result) { }).then(function (result) {
window.alert(JSON.stringify(result)); window.alert(JSON.stringify(result));
console.log('shasres')
vm.listSites(); vm.listSites();
}); });
}; };
@ -692,8 +693,8 @@ app.controller('websiteCtrl', [
sites = _sites.concat(sites); sites = _sites.concat(sites);
return; return;
} }
// console.error('_sites is not an array'); console.error('_sites is not an array');
// console.error(_sites); console.error(_sites);
}, function (err) { }, function (err) {
console.error('_sites had an error'); console.error('_sites had an error');
console.error(err); console.error(err);
@ -703,10 +704,9 @@ app.controller('websiteCtrl', [
sites.forEach(function (site) { sites.forEach(function (site) {
site.pending = !domainIsVerified(site); site.pending = !domainIsVerified(site);
}); });
// console.log('[listSites] sites:'); console.log('[listSites] sites:');
// console.log(sites); console.log(sites);
vm.sites = sites; vm.sites = sites;
vm.shows = sites;
vm.sites.forEach(function(site) { vm.sites.forEach(function(site) {
site.urlSafeDomain = "https://" + site.domain; site.urlSafeDomain = "https://" + site.domain;
site.urlSafeDomain = $sce.trustAsResourceUrl(site.urlSafeDomain); site.urlSafeDomain = $sce.trustAsResourceUrl(site.urlSafeDomain);
@ -726,6 +726,7 @@ app.controller('websiteCtrl', [
vm.domains = els; vm.domains = els;
$scope.domain = vm.domains; $scope.domain = vm.domains;
}); });
console.log('asdfasdfa')
vm.listSites(); vm.listSites();
vm.triggerDropdown = function() { vm.triggerDropdown = function() {

View File

@ -1,4 +0,0 @@
app.controller('websitesCtrl', ['$scope','ShowsService', function($scope, ShowsService) {
var vm = this;
vm.shows = ShowsService.list();
}]);

View File

@ -1,4 +0,0 @@
app.controller('websitesDetailCtrl', ['$scope','$stateParams', 'ShowsService', function($scope, $stateParams, ShowsService) {
var vm = this;
vm.selectedShow = ShowsService.find($stateParams.id);
}]);

View File

@ -1,60 +0,0 @@
app.factory('websitesService',[
'$q', 'Auth', 'azp@oauth3.org', '$timeout', '$sce', '$stateParams',
function($q, Auth, Oauth3, $timeout, $sce, $stateParams){
// var shows = [];
// var shows = [{
// id: 1,
// name: 'Walking Dead',
// description: 'The Walking Dead is an American post-apocalyptic horror drama television series developed by Frank Darabont. It is based on the comic book series of the same name by Robert Kirkman, Tony Moore, and Charlie Adlard. It stars Andrew Lincoln as sheriff\'s deputy Rick Grimes, who awakens from a coma to find a post-apocalyptic world dominated by flesh-eating zombies.'
// },
// {
// id: 2,
// name: 'Breaking Bad',
// description: 'Breaking Bad is an American crime drama television series created and produced by Vince Gilligan. The show originally aired on the AMC network for five seasons, from January 20, 2008 to September 29, 2013. The main character is Walter White (Bryan Cranston), a struggling high school chemistry teacher who is diagnosed with inoperable lung cancer at the beginning of the series.'
// },
// {
// id: 3,
// name: '7D',
// description: 'The 7D is an American animated television series produced by Disney Television Animation, and broadcast on Disney XD starting in July 7, 2014. It is a re-imagining of the titular characters from the 1937 film Snow White and the Seven Dwarfs by Walt Disney Productions'
// }];
var sites = [];
listSites = function () {
var sites = [];
return $q.all(Auth.sessions.map(function (session) {
return Auth.get(session).then(function (oauth3) {
var pkg = oauth3.pkg('www@daplie.com');
return pkg.list().then(function (result) {
var _sites = result.data;
if (Array.isArray(_sites)) {
sites = _sites.concat(sites);
return;
}
// console.error('_sites is not an array');
// console.error(_sites);
}, function (err) {
console.error('_sites had an error');
console.error(err);
});
});
})).then(function () {
var sitez;
sitez = sites;
return sitez;
console.log('[listSites] sites:');
console.log(sites);
});
};
return {
list: function(){
console.log('asdf');
// return sites;
},
find: function(id){
return _.find(sites, function(site){
return site.id == id;
});
}
};
}]);

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +0,0 @@
<h1>hello - {{ vm.blah }}</h1>
<h3 style="red">{{ vm.selectedShow }}</h3>
<h3>{{ vm.selectedShow.id }}</h3>
<p>
{{ vm.selectedShow.domain }}
</p>