Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aa21c29
basic filestructure in place, dependencies installed, contents of web…
radenska Mar 28, 2017
434cf67
added index.html skeleton and contents to entry.js
radenska Mar 28, 2017
b5fa06e
added content to landing and home views, no styling yet
radenska Mar 28, 2017
9dfd2e3
added auth service content
radenska Mar 28, 2017
c248d91
added content to both login and signup components, no styling
radenska Mar 28, 2017
4d8e72a
debbuged, now functional (still no styling)
radenska Mar 29, 2017
a789987
stying added
radenska Mar 29, 2017
5f020ad
added __DEBUG__ to webpack config and made log config file
radenska Mar 29, 2017
2cf81ef
logout button functioning and styled, moved logo and heading into nav…
radenska Mar 29, 2017
c0c782a
created gallery service and create gallery controller, both functiona…
radenska Mar 29, 2017
23cd493
formatting done, all pretty! (though the scss files are not pretty
radenska Mar 29, 2017
c2195d5
fixed button styling issues
radenska Mar 30, 2017
1fb45dc
delete function working, each gallery has delete button
radenska Mar 30, 2017
f17c69b
added some code for put, not functional yet
radenska Mar 30, 2017
3e3bb31
update method works without any weird glitches, finally
radenska Mar 30, 2017
6ea497a
finally done with styling
radenska Mar 31, 2017
95b80cd
added basic file structure and content to photo service and thumbnail…
radenska Apr 3, 2017
00f2173
added all logic for uploading a photo (no delete or styling yet
radenska Apr 3, 2017
92744de
photos not posting, 500 error I cannot debug
radenska Apr 4, 2017
871661d
assignment complete, including styling and pic delete
radenska Apr 4, 2017
c8b2f63
added testing framework
radenska Apr 4, 2017
190f53f
added auth get token and create gallery tests
radenska Apr 4, 2017
86e55fb
assignment finished
radenska Apr 4, 2017
3ad9073
added delete test
radenska Apr 5, 2017
60e95a1
this assignment makes no sense
radenska Apr 6, 2017
6c16d28
added filter and changed entry.js
radenska Apr 6, 2017
e2c1d8b
done with assignment
radenska Apr 7, 2017
d50ba89
saving changes
radenska Apr 11, 2017
582bc49
the actual content for filters and directives
radenska Apr 11, 2017
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions lab-yana/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "presets": ["es2015"] }
1 change: 1 addition & 0 deletions lab-yana/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_URL='http://localhost:3003'
21 changes: 21 additions & 0 deletions lab-yana/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"rules": {
"no-console": "off",
"indent": [ "error", 2 ],
"quotes": [ "error", "single" ],
"semi": ["error", "always"],
"linebreak-style": [ "error", "unix" ]
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
120 changes: 120 additions & 0 deletions lab-yana/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Created by https://www.gitignore.io/api/node,vim,osx,macos,linux

*node_modules

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

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

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

# ignore angular build directory
build

# 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

# node-waf configuration
.lock-wscript

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

# Dependency directories
node_modules
jspm_packages

# 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



### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags


### 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


### macOS ###
# Icon must end with two \r
# Thumbnails
# Files that might appear in the root of a volume
# Directories potentially created on remote AFP share


### 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*

# End of https://www.gitignore.io/api/node,vim,osx,macos,linux
13 changes: 13 additions & 0 deletions lab-yana/app/component/gallery/create-gallery/_create-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import '../../../scss/lib/theme/_vars.scss';

.create-gallery {
img {
width: 25px;
}
button {
left: 254px;
padding-left: 30px;
padding-right: 30px;
border-radius: 7px;
}
}
13 changes: 13 additions & 0 deletions lab-yana/app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<section class="create-gallery">
<article>Create a new gallery.</article>
<form name="createGalleryForm"
class="gallery-form"
ng-submit="createGalleryCtrl.createGallery()">
<fieldset>
<input name="name" class="input-std" type="text" placeholder="gallery name"
ng-model="createGalleryCtrl.gallery.name" required>
<input name="desc" class="input-std" type="text" placeholder="gallery description"
ng-model="createGalleryCtrl.gallery.desc" required>
</fieldset>
<button class="btn-std">create gallery</button>
</section>
25 changes: 25 additions & 0 deletions lab-yana/app/component/gallery/create-gallery/create-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

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

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() {
$log.debug('CreateGalleryController.createGallery');

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

.edit {
margin-top: -15px;
width: 100%;
background-color: $mainBackground;
input {
display: inline-block;
width: 67%;
margin-top: -5px;
color: #696969;
float: left;
font-size: 14px;
border-radius: 8px;
background-color: #B0B0B0;
padding-top: 3px;
padding-bottom: 3px;
margin-left: 5px;
border: 1px solid #606060;
}

div {
width: 100%;
border-radius: 7px;
background-color: $footerBackground;
padding-bottom: 2px;
padding-top: 1px;
padding-right: 10px;
}

button {
left: 152px;
font-size: 12px;
border-radius: 7px;
padding-right: 30px;
padding-left: 30px;
padding-top: 5px;
padding-bottom: 5px;
}
fieldset {
text-align: left;
}
fieldset:first-of-type {
input {
margin-top: 9px;
width: 78%;
}
.item-label {
margin-top: 14px;
}
}
.item-label {
font-weight: bold;
display: inline-block;
float: left;
}
}
19 changes: 19 additions & 0 deletions lab-yana/app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<section class="edit">
<form class="edit-gallery"
name="editGallery"
ng-submit="editGalleryCtrl.updateGallery()" novalidate>
<div>
<fieldset>
<span class="item-label">name:</span>
<input name="name" class="input-std" type="text"
ng-model="editGalleryCtrl.gallery.name">
</fieldset>
<fieldset>
<span class="item-label">description:</span>
<input name="desc" class="input-std" type="text"
ng-model="editGalleryCtrl.gallery.desc">
</fieldset>
</div>
<button class="btn-std">update</button>
</form>
</section>
22 changes: 22 additions & 0 deletions lab-yana/app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

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

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

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

this.updateGallery = function() {
$log.debug('EditGalleryController.updateGallery');

galleryService.updateGallery(this.gallery._id, this.gallery);
};
}
55 changes: 55 additions & 0 deletions lab-yana/app/component/gallery/gallery-item/_gallery-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@import '../../../scss/lib/theme/_vars.scss';

.gallery-item {
display: block;
clear: both;
width: 98%;
background-color: $mainBackground;

.current-item {
display: block;
text-align: left;
color: $highlightBackground;
background-color: $footerBackground;
border-radius: 7px;
padding-bottom: 62px;
span {
font-weight: bold;
display: inline-block;
float: left;
clear: left;
}
p {
display: inline-block;
font-weight: normal;
color: #696969;
float: left;
clear: right;
margin-left: 14px;
}
}

}
.button-container {
display: block;
background-color: $mainBackground;
margin-top: 15px;
clear: right;
margin-bottom: 70px;

button:first-of-type {
background-color: $highlightBackground;
color: $mainBackground;
margin-left: 10px;
}
button {
float: right;
font-size: 12px;
border-radius: 7px;
padding-right: 32px;
padding-left: 32px;
padding-top: 6px;
padding-bottom: 6px;
border: none;
}
}
20 changes: 20 additions & 0 deletions lab-yana/app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<li class="gallery-item">
<div class="current-item" ng-if="!galleryItemCtrl.showEdit">
<div>
<span class="item-label">name:</span>
<p>{{galleryItemCtrl.gallery.name | uppercase }}</p>
<!-- uppercases the gallery name -->
</div>
<div>
<span class="item-label">description:</span>
<p>{{galleryItemCtrl.gallery.desc | lowercase | limitTo: 20 }}</p>
<!-- limits characters in description to 20 -->
</div>
</div>

<edit-gallery ng-if="galleryItemCtrl.showEdit" gallery="galleryItemCtrl.gallery"></edit-gallery>
<div class="button-container" ng-if="!galleryItemCtrl.showEdit">
<button ng-click="galleryItemCtrl.deleteGallery()">delete</button>
<button ng-click="galleryItemCtrl.showEdit = !galleryItemCtrl.showEdit">edit</button>
</div>
</li>
Loading