added angular module

This commit is contained in:
Jon Lambson 2017-08-23 13:26:31 -06:00
parent 0c26190e2a
commit 75b72dd97a
9 changed files with 111 additions and 3 deletions

@ -1 +1 @@
Subproject commit 5f68ea19e22d05bebc6a289da0a89a714442e6d2 Subproject commit 9a7aa3261f2ad97ebd436c8b1e86d168cf93023d

View File

@ -0,0 +1,70 @@
.angucomplete-title .highlight {
color: red;
}
.angucomplete-holder {
position: relative;
}
.angucomplete-dropdown {
border-color: #ececec;
border-width: 1px;
border-style: solid;
border-radius: 2px;
width: 250px;
padding: 6px;
cursor: pointer;
z-index: 9999;
position: absolute;
/*top: 32px;
left: 0px;
*/
margin-top: -6px;
background-color: #ffffff;
}
.angucomplete-searching {
color: #acacac;
font-size: 14px;
}
.angucomplete-description {
font-size: 14px;
}
.angucomplete-row {
padding: 5px;
color: #000000;
margin-bottom: 4px;
clear: both;
}
.angucomplete-selected-row {
background-color: lightblue;
color: #ffffff;
}
.angucomplete-image-holder {
padding-top: 2px;
float: left;
margin-right: 10px;
margin-left: 5px;
}
.angucomplete-image {
height: 34px;
width: 34px;
border-radius: 50%;
border-color: #ececec;
border-style: solid;
border-width: 1px;
}
.angucomplete-image-default {
/* Add your own default image here
background-image: url('/assets/default.png');
*/
background-position: center;
background-size: contain;
height: 34px;
width: 34px;
}

View File

@ -5,6 +5,7 @@
<title>Launch-pad</title> <title>Launch-pad</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/lib/bootstrap/bootstrap.min.css"> <link rel="stylesheet" href="/css/lib/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="/css/lib/angucomplete/angucomplete-alt.css">
<link rel="stylesheet" href="/css/font-awesome.min.css"> <link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/styles.css"> <link rel="stylesheet" href="/css/styles.css">
</head> </head>
@ -30,6 +31,7 @@
<script src="/js/lib/angular/angular.min.js" charset="utf-8"></script> <script src="/js/lib/angular/angular.min.js" charset="utf-8"></script>
<script src="/js/lib/angular/angular-local-storage.js" charset="utf-8"></script> <script src="/js/lib/angular/angular-local-storage.js" charset="utf-8"></script>
<script src="/js/lib/angular/angular-ui-router.min.js" charset="utf-8"></script> <script src="/js/lib/angular/angular-ui-router.min.js" charset="utf-8"></script>
<script src="/js/lib/angular/angucomplete-alt.min.js" charset="utf-8"></script>
<!-- Core Files --> <!-- Core Files -->
<script src="/js/app.js" charset="utf-8"></script> <script src="/js/app.js" charset="utf-8"></script>
<!-- Services --> <!-- Services -->

View File

@ -1,4 +1,4 @@
var app = angular.module('launchpad', ['oauth3.org', 'ui.router', 'LocalStorageModule']); var app = angular.module('launchpad', ['oauth3.org', 'ui.router', 'LocalStorageModule', 'angucomplete-alt']);
app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider', app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider',
function ($stateProvider, $urlRouterProvider, localStorageServiceProvider) { function ($stateProvider, $urlRouterProvider, localStorageServiceProvider) {

View File

@ -1,4 +1,4 @@
app.controller('DnsController', [ app.controller('dnsCtrl', [
'$scope', '$scope',
function($scope) { function($scope) {
var vm = this; var vm = this;

View File

@ -2,4 +2,5 @@ app.controller('musicCtrl', [
'$scope', '$scope',
function($scope) { function($scope) {
var vm = this; var vm = this;
}]); }]);

View File

@ -252,4 +252,21 @@ app.controller('websiteCtrl', [
vm.domains = els; vm.domains = els;
}); });
vm.listSites(); vm.listSites();
$scope.domain = [
{ domainName: "jon.lambson.daplie.com" },
{ domainName: "music.daplie.me" },
{ domainName: "jon.daplie.me" }
];
$scope.localDomainSearch = function(str, domain) {
var matches = [];
domain.forEach(function(domain) {
if ((domain.domainName.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0)) {
matches.push(domain);
}
});
return matches;
};
}]); }]);

File diff suppressed because one or more lines are too long

View File

@ -75,3 +75,19 @@
</div> </div>
</div> </div>
<div angucomplete-alt
placeholder="Select a domain"
pause="300"
selected-object="selectedPerson"
local-data="domain"
local-search="localDomainSearch"
title-field="domainName"
minlength="0"
input-class="form-control form-control-small"
match-class="highlight">
</div>