Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lab-regan/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
24 changes: 24 additions & 0 deletions lab-regan/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"rules": {
"no-console": "off",
"indent": [ "error", 2 ],
"quotes": [ "error", "single" ],
"semi": ["error", "always"],
"linebreak-style": [ "error", "unix" ]
},
"env": {
"es6": true,
"node": true,

Error: Parse error on line 11:
... "node": true, }, "ecmaFeatures":
----------------------^
Expecting 'STRING'
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
132 changes: 132 additions & 0 deletions lab-regan/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@

# Created by https://www.gitignore.io/api/osx,node,linux,windows

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

###Local Files###
build

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/osx,node,linux,windows
Binary file added lab-regan/app/assets/cfLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions lab-regan/app/assets/cfLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lab-regan/app/assets/labicons9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.create-gallery{
h2{
padding-left: 10%;
margin-bottom: -2em;
padding-top: 2em;
}
}
19 changes: 19 additions & 0 deletions lab-regan/app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<section class="create-gallery">
<h2>Create a new gallery</h2>
<form name="createGalleryForm"
class="galleryForm"
ng-submit="createGalleryCtrl.createGallery()">

<fieldset>
<input type="text" name="name" placeholder="gallery name" class="input-std"
ng-model="createGalleryCtrl.gallery.name" required>
</fieldset>

<fieldset>
<input type="text" name="desc" placeholder="gallery description" class="input-std"
ng-model="createGalleryCtrl.gallery.desc" required>
</fieldset>

<input class="btn-std" type="submit">
</form>
</section>
20 changes: 20 additions & 0 deletions lab-regan/app/component/gallery/create-gallery/create-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';

module.exports = {
template: require('./create-gallery.html'),
controller:['$log', 'galleryService', CreateGalleryController],
controllerAs: 'createGalleryCtrl'
};

function CreateGalleryController($log, galleryService){
$log.debug('CreateGalleryController');

this.gallery = {};
this.createGallery= function(){
galleryService.createGallery(this.gallery)
.then( () => {
this.gallery.name = null;
this.gallery.desc = null;
});
};
};
42 changes: 42 additions & 0 deletions lab-regan/app/component/gallery/edit-gallery/_edit-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@import "../../../scss/lib/theme/vars";

.edit {
width: 80%;
margin: 0 auto;
padding: 0.75em;
border-radius: 8px;
color: $site-primary;
div {
&:first-child{
background: $site-secondary;
border-radius: 6px;
},
&:nth-child(2){
text-align: right;
}
.btn-std{
margin-right: 0;
}
}
fieldset{
margin: 0.75em 0;

span{
float: left;
&:first-child{
font-weight: bold;
}
}
input .input-std {
float: left;
display: inline-block;
&:first-child {
border: 1px red dotted;
margin-left: 4%;
}
}
}
}
// & > span {
// margin: 1em 0;
// }
23 changes: 23 additions & 0 deletions lab-regan/app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<section class="edit">
<form class="edit-gallery"
name="edit-gallery"
ng-submit="editGalleryCtrl.updateGallery()"
novalidate>
<div class="fieldsetHolder">
<fieldset>
<span class="item-label">name:</span>
<input type="text" class="input-std" name="name"
ng-model="editGalleryCtrl.gallery.name">
</fieldset>

<fieldset>
<span class="item-label">description</span>
<input type="text" class="input-std" name="desc"
ng-model="editGalleryCtrl.gallery.desc">
</fieldset>
</div>
<div>
<button class="btn-std" name="update" type="submit">update</button>
</div>
</form>
</section>
21 changes: 21 additions & 0 deletions lab-regan/app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

require('./_edit-gallery.scss');

module.exports = {
template: require('./edit-gallery.html'),
controller: ['$log', 'galleryService', EditGalleryController],
controllerAs: 'editGalleryCtrl',
//this is a reserved property name
bindings: {
gallery: '<'
}
};

function EditGalleryController($log, galleryService){
$log.debug('EditGalleryController');

this.updateGallery = function(){
galleryService.updateGallery(this.gallery._id, this.gallery);
};
};
45 changes: 45 additions & 0 deletions lab-regan/app/component/gallery/gallery-item/_gallery-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import "../../../scss/lib/theme/vars";

.gallery-item {
.current-item {
width: 80%;
margin: 0 auto;
background: $site-secondary;
padding: 0.75em;
border-radius: 8px;
color: $site-primary;
div{
margin: 0.75em 0;

span{
&:first-child{
font-weight: bold;
}
}
}
& > span {
margin: 1em 0;
}
}
.edit-container {
width: 100%;
div{
width: 80%;
margin: auto;
text-align: right;
span {
display: inline-block;
background: $site-primary;
color: $white;
padding: 0.25em 2em;
border-radius: 8px;
margin: 0.5em 0;
margin-bottom: 1.5em;
&:last-child{
background: $site-tertiary;
color: $black;
}
}
}
}
}
21 changes: 21 additions & 0 deletions lab-regan/app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<li class="gallery-item">
<div class="current-item"
ng-if="!galleryItemCtrl.showEditGallery">
<div>
<span class="item-label">name:</span>
<span>{{ galleryItemCtrl.gallery.name }}</span>
</div>
<div>
<span class="item-label">description:</span>
<span>{{ galleryItemCtrl.gallery.desc }}</span>
</div>
</div>
<edit-gallery ng-if="galleryItemCtrl.showEditGallery" gallery="galleryItemCtrl.gallery"></edit-gallery>

<div class="edit-container">
<div ng-hide="galleryItemCtrl.showEditGallery">
<span ng-click="galleryItemCtrl.showEditGallery = !galleryItemCtrl.showEditGallery">edit</span>
<span ng-click="galleryItemCtrl.deleteGallery()">delete</span>
</div>
</div>
</li>
Loading