Commit b3f885c8 authored by Jarod Owen's avatar Jarod Owen
Browse files

Merge branch 'JDO_Main' into 'master'

Merge JDO_Main

See merge request kretschmar/doorcode!4
parents 9e6aa54e 0fa1fea5
Pipeline #1167 passed with stages
in 1 minute and 34 seconds
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
</head>
<body>
Lol this ain't a thing yet lol.<br/>
<a href="home.html">Home</a>
<a href="index.html">Logout</a>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
<script src="vue.js"></script>
</head>
<body>
<header>
<h1>Manage Doors</h1>
<a href="user.html">Users</a>
<a href="userG.html">User Groups</a>
<a href="home.html">Home</a>
<a href="doorG.html">Door Groups</a>
<a href="event.html">Events</a>
<a href="log.html">Access Log</a>
<a href="map.html">Map</a>
<a href="index.html">Logout</a>
</header>
<form id="door">
Door:<select name="door" v-model="select">
<option value="">Select a door.</option>
<option v-for="item in doorList" :value="item.id">{{ item.id }}</option>
</select><br/>
Door Group:<select name="dGroups">
<option v-for="item in doorGList" :value="item.id" :selected="getDG(item.id)">{{ item.id }}</option>
</select><br/>
Normal <input type="radio" name="status" value="normal" :checked="getStat('0')"><br/>
Open <input type="radio" name="status" value="open" :checked="getStat('1')"><br/>
Locked <input type="radio" name="status" value="locked" :checked="getStat('2')"><br/>
Events:<select multiple name="events">
<option v-for="item in eventList" v-bind:value="item.id" :selected="getEv(item.id)">{{ item.id }}</option>
</select><br/>
<input type="button" value="Update" name="up"><br/>
</form>
<script src="door.js"></script>
</body>
</html>
\ No newline at end of file
var door = new Vue({
el: '#door',
data: {
select: "",
doorGList: [
{id: "A"},
{id: "B"},
{id: "C"},
{id: "D"},
{id: "E"}
],
doorList: [
{id: "001", group: "A", status: "0", event: ["e1"]},
{id: "002", group: "A", status: "0", event: ["e1", "e2"]},
{id: "003", group: "B", status: "1", event: ["e1"]},
{id: "004", group: "B", status: "1", event: ["e2"]},
{id: "005", group: "C", status: "0", event: ["e1", "e2"]},
{id: "006", group: "C", status: "0", event: ["e2"]},
{id: "007", group: "D", status: "1", event: ["e1"]},
{id: "008", group: "D", status: "1", event: ["e2"]},
{id: "009", group: "E", status: "2", event: ["e3", "e4"]},
{id: "010", group: "E", status: "2", event: ["e4"]},
{id: "012", group: "E", status: "2", event: [""]},
{id: "011", group: "E", status: "2", event: [""]},
{id: "013", group: "E", status: "2", event: [""]},
{id: "014", group: "E", status: "2", event: [""]},
{id: "015", group: "E", status: "2", event: [""]},
{id: "016", group: "E", status: "2", event: [""]}
],
eventList: [
{id: "e1"},
{id: "e2"},
{id: "e3"},
{id: "e4"},
]
},
methods: {
getDG: function (ug) {
for (i = 0; i < this.doorList.length; i++) {
if ((this.doorList[i].id == this.select) & (this.doorList[i].group == ug)) {
return true;
}
}
return false;
},
getStat: function (ug) {
for (i = 0; i < this.doorList.length; i++) {
if ((this.doorList[i].id == this.select) & (this.doorList[i].status == ug)) {
return true;
}
}
return false;
},
getEv: function (ug) {
for (i = 0; i < this.doorList.length; i++) {
for (i2 = 0; i2 < this.doorList[i].event.length; i2++) {
if ((this.doorList[i].id == this.select) & (this.doorList[i].event[i2] == ug)) {
return true;
}
}
}
return false;
}
}
})
\ No newline at end of file
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
<script src="vue.js"></script>
</head>
<body>
<header>
<h1>Manage Door Groups</h1>
<a href="user.html">Users</a>
<a href="userG.html">User Groups</a>
<a href="door.html">Doors</a>
<a href="home.html">Home</a>
<a href="event.html">Events</a>
<a href="log.html">Access Log</a>
<a href="map.html">Map</a>
<a href="index.html">Logout</a>
</header>
<form id="doorG">
Door Group:<select name="dGroup" v-model="select">
<option value="" selected>New Door Group</option>
<option v-for="item in doorGList" :value="item.id">{{ item.id }}</option>
</select><br/>
Name:<input type="text" name="nom" :value="select"><br/>
Door:<select name="doors" multiple>
<option v-for="item in doorList" :value="item.id" :selected="getDoor(item.id)">{{ item.id }}</option>
</select><br/>
Normal <input type="radio" name="status" value="normal" :checked="getStat('0')"><br/>
Open <input type="radio" name="status" value="open" :checked="getStat('1')"><br/>
Locked <input type="radio" name="status" value="locked" :checked="getStat('2')"><br/>
Events:<select multiple name="events">
<option v-for="item in eventList" v-bind:value="item.id" :selected="getEv(item.id)">{{ item.id }}</option>
</select><br/>
<input type="button" value="Delete" name="del"><br/>
<input type="button" value="Update" name="up"><br/>
<input type="button" value="New" name="new"><br/>
</form>
<script src="doorG.js"></script>
</body>
</html>
\ No newline at end of file
var door = new Vue({
el: '#doorG',
data: {
select: "",
doorGList: [
{id: "A", status: "0", event: ["e1"], doors: ["001", "002"]},
{id: "B", status: "1", event: ["e2", "e3"], doors: ["003", "004"]},
{id: "C", status: "0", event: ["e3", "e4"], doors: ["005", "006"]},
{id: "D", status: "1", event: ["e1", "e4"], doors: ["007", "008"]},
{id: "E", status: "2", event: ["e2"], doors: ["009", "010", "011", "012", "013", "014", "015", "016"]}
],
doorList: [
{id: "001"},
{id: "002"},
{id: "003"},
{id: "004"},
{id: "005"},
{id: "006"},
{id: "007"},
{id: "008"},
{id: "009"},
{id: "010"},
{id: "011"},
{id: "012"},
{id: "013"},
{id: "014"},
{id: "015"},
{id: "016"}
],
eventList: [
{id: "e1"},
{id: "e2"},
{id: "e3"},
{id: "e4"},
]
},
methods: {
getDoor: function (ug) {
for (i = 0; i < this.doorGList.length; i++) {
for (i2 = 0; i2 < this.doorGList[i].doors.length; i2++) {
if ((this.doorGList[i].id == this.select) & (this.doorGList[i].doors[i2] == ug)) {
return true;
}
}
}
return false;
},
getStat: function (ug) {
for (i = 0; i < this.doorGList.length; i++) {
if ((this.doorGList[i].id == this.select) & (this.doorGList[i].status == ug)) {
return true;
}
}
return false;
},
getEv: function (ug) {
for (i = 0; i < this.doorGList.length; i++) {
for (i2 = 0; i2 < this.doorGList[i].event.length; i2++) {
if ((this.doorGList[i].id == this.select) & (this.doorGList[i].event[i2] == ug)) {
return true;
}
}
}
return false;
}
}
})
\ No newline at end of file
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
<script src="vue.js"></script>
</head>
<body>
<header>
<h1>Manage Events</h1>
<a href="user.html">Users</a>
<a href="userG.html">User Groups</a>
<a href="door.html">Doors</a>
<a href="doorG.html">Door Groups</a>
<a href="home.html">Home</a>
<a href="log.html">Access Log</a>
<a href="map.html">Map</a>
<a href="index.html">Logout</a>
</header>
<form id="event">
Event:<select name="event" v-model="select">
<option value="">New Event</option>
<option v-for="item in eventList" :value="item.id">{{ item.id }}</option>
</select><br/>
Name:<input type="text" name="nom" :value="select"><br/>
Time(s): Still workin' on that.<br/>
Reocurring <input type="checkbox" name="reocur" :checked="getRec()"><br/>
Reocurrence Period: Still workin' on that.<br/>
Normal <input type="radio" name="status" value="normal" :checked="getStat('0')"><br/>
Open <input type="radio" name="status" value="open" :checked="getStat('1')"><br/>
Locked <input type="radio" name="status" value="locked" :checked="getStat('2')"><br/>
Doors:<select multiple name="doors">
<option v-for="item in doorList" :value="item.id" :selected="getDoor(item.id)">{{ item.id }}</option>
</select><br/>
Door Groups:<select multiple name="dGroups">
<option v-for="item in doorGList" :value="item.id" :selected="getDG(item.id)">{{ item.id }}</option>
</select><br/>
<input type="button" value="Delete" name="del"><br/>
<input type="button" value="Update" name="up"><br/>
<input type="button" value="New" name="new"><br/>
</form>
<script src="event.js"></script>
</body>
</html>
\ No newline at end of file
var door = new Vue({
el: '#event',
data: {
select: "",
doorGList: [
{id: "A"},
{id: "B"},
{id: "C"},
{id: "D"},
{id: "E"}
],
doorList: [
{id: "001"},
{id: "002"},
{id: "003"},
{id: "004"},
{id: "005"},
{id: "006"},
{id: "007"},
{id: "008"},
{id: "009"},
{id: "010"},
{id: "012"},
{id: "011"},
{id: "013"},
{id: "014"},
{id: "015"},
{id: "016"}
],
eventList: [
{id: "e1", rec: true, doors: ["001", "002", "003", "005", "007"], groups: ["A"], status: "0"},
{id: "e2", rec: true, doors: ["002", "004", "005", "006", "008"], groups: ["C"], status: "0"},
{id: "e3", rec: true, doors: ["009"], groups: [""], status: "2"},
{id: "e4", rec: true, doors: ["009", "010"], groups: ["E"], status: "2"},
]
},
methods: {
getDoor: function (ug) {
for (i = 0; i < this.eventList.length; i++) {
for (i2 = 0; i2 < this.eventList[i].doors.length; i2++) {
if ((this.eventList[i].id == this.select) & (this.eventList[i].doors[i2] == ug)) {
return true;
}
}
}
return false;
},
getDG: function (ug) {
for (i = 0; i < this.eventList.length; i++) {
for (i2 = 0; i2 < this.eventList[i].groups.length; i2++) {
if ((this.eventList[i].id == this.select) & (this.eventList[i].groups[i2] == ug)) {
return true;
}
}
}
return false;
},
getStat: function (ug) {
for (i = 0; i < this.eventList.length; i++) {
if ((this.eventList[i].id == this.select) & (this.eventList[i].status == ug)) {
return true;
}
}
return false;
},
getRec: function (ug) {
for (i = 0; i < this.eventList.length; i++) {
if (this.eventList[i].id == this.select) {
return this.eventList[i].rec;
}
}
}
}
})
\ No newline at end of file
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
</head>
<body>
<header>
<h1>Welcome to the Doorcode Site!</h1>
<a href="user.html">Users</a>
<a href="userG.html">User Groups</a>
<a href="door.html">Doors</a>
<a href="doorG.html">Door Groups</a>
<a href="event.html">Events</a>
<a href="log.html">Access Log</a>
<a href="map.html">Map</a>
<a href="index.html">Logout</a>
</header>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<html lang=en-US>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
......@@ -67,7 +67,8 @@
<div class="flex-center position-ref full-height">
<div class="content">
<div class="title m-b-md">
Doorcode
<a href="home.html">"Admin Login"</a><br/>
<a href="NYI.html">"Student Login"</a><br/>
</div>
</div>
</div>
......
Vue.component('log-entry', {
data: function () {
return {
count: 0
}
},
template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'
})
/* Vue.component('log-entry', {
data: function () {
return {
tater: "Whee!"
}
},
template: '<tr>\n<td>Kill Me!</td>\n</tr>'
}) */
//'<tr>\n<td>{{ code }}</td>\n<td>{{ door }}</td>\n<td>{{ ok }}</td>\n<td>{{ time }}</td>\n<td>{{ day }}</td>\n<td>{{ id }}</td>\n<td>{{ ug }}</td>\n<td>{{ dg }}</td>\n</tr>'
\ No newline at end of file
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
<script src="vue.js"></script>
</head>
<body>
<header>
<h1>Access Log</h1>
<a href="user.html">Users</a>
<a href="userG.html">User Groups</a>
<a href="door.html">Doors</a>
<a href="doorG.html">Door Groups</a>
<a href="event.html">Events</a>
<a href="home.html">Home</a>
<a href="map.html">Map</a>
<a href="index.html">Logout</a>
</header>
<table id="log">
<tr>
<th>Code</th>
<th>Door</th>
<th>OK?</th>
<th>Time</th>
<th>Date</th>
<th>User</th>
<th>UGroup</th>
<th>DGroup</th>
</tr>
</table>
<log-entry></log-entry>
</body>
<script type='module' src="log-entry.js"></script>
<!-- <script src="log.js"></script> -->
</html>
\ No newline at end of file
/* import LogEntry from './log-entry.js'
export default {
el: "#log",
components: {LogEntry}
} */
\ No newline at end of file
import Multiselect from 'node_modules/vue-multiselect/src/vue-multiselect'
Vue.component('multiselect', Multiselect)
\ No newline at end of file
<!DOCTYPE html>
<html lang = en-US>
<head>
<meta charset="utf-8">
<title>Doorcode</title>
</head>
<body>
<header>
<h1>Door Map</h1>
<a href="user.html">Users</a>
<a href="userG.html">User Groups</a>
<a href="door.html">Doors</a>
<a href="doorG.html">Door Groups</a>
<a href="event.html">Events</a>
<a href="log.html">Access Log</a>
<a href="home.html">Home</a>
<a href="index.html">Logout</a>
</header>
</body>
<img src="MapTemp.jpg">
</html>
\ No newline at end of file
MIT License
Copyright (c) 2016 Damian Dulisz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# vue-multiselect ![Build Status](https://circleci.com/gh/shentao/vue-multiselect/tree/2.0.svg?style=shield&circle-token=5c931ff28fd12587610f835472becdd514d09cef)[![Codecov branch](https://img.shields.io/codecov/c/github/shentao/vue-multiselect/2.0.svg)](https://codecov.io/gh/shentao/vue-multiselect/branch/2.0)[![npm](https://img.shields.io/npm/v/vue-multiselect.svg)](https://www.npmjs.com/package/vue-multiselect)
Probably the most complete *selecting* solution for Vue.js 2.0, without jQuery.
![Vue-Multiselect Screen](https://raw.githubusercontent.com/shentao/vue-multiselect/2.0/multiselect-screen-203.png)
### Features & characteristics:
* NO dependencies
* Single select
* Multiple select
* Tagging
* Dropdowns
* Filtering
* Search with suggestions
* Logic split into mixins
* Basic component and support for custom components
* V-model support
* Vuex support
* Async options support
* \> 95% test coverage
* Fully configurable (see props list below)
## Breaking changes:
* Instead of Vue.partial for custom option templates you can use a custom render function.
* The `:key` props has changed to `:track-by`, due to conflicts with Vue 2.0.
* Support for `v-model`
* `@update` has changed to `@input` to also work with v-model
* `:selected` has changed to `:value` for the same reason
* Browserify users: if you wish to import `.vue` files, please add `vueify` transform.
## Install & basic usage
```bash
npm install vue-multiselect
```
```vue
<template>
<div>
<multiselect
v-model="selected"
:options="options">
</multiselect>
</div>
</template>
<script>
import Multiselect from 'vue-multiselect'
export default {
components: { Multiselect },
data () {
return {
selected: null,
options: ['list', 'of', 'options']
}
}
}
</script>
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
```
## JSFiddle
[Example JSFiddle](https://jsfiddle.net/shentao/s0ugwmjp/) – Use this for issue reproduction.
## Examples
in jade-lang/pug-lang
### Single select / dropdown
``` jade
multiselect(
:value="value",
:options="source",
:searchable="false",
:close-on-select="false",
:allow-empty="false",
@input="updateSelected",
label="name",
placeholder="Select one",
track-by="name"
)
```