Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 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-lee/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
2 changes: 2 additions & 0 deletions lab-lee/.coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-ci
repo_token: UZF6NYyHYhqQjOFw7vdYhJchfWBZIrCZU
5 changes: 5 additions & 0 deletions lab-lee/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules/*
**/vendor/*
**/*.min.js
**/coverage/*
**/build/*
28 changes: 28 additions & 0 deletions lab-lee/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"rules": {
"no-console": "off",
"indent": [ "error", 2 ],
"semi": ["error", "always"],
"linebreak-style": [ "error", "unix" ],
"comma-dangle": ["error", "always-multiline"],
"quotes": ["error", "single", { "allowTemplateLiterals": true }]
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"globals": {
"angular": "true",
"window": false,
"__API_URL__": false,
"__DEBUG__": false
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
133 changes: 133 additions & 0 deletions lab-lee/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# slugram ignore
db
build
*.env
data/*
coverage
html-report
# Created by https://www.gitignore.io/api/osx,vim,linux,windows,node

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


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


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


### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

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

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

# Windows shortcuts
*.lnk


### Node ###
# Logs
logs
*.log
npm-debug.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

# 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
20 changes: 20 additions & 0 deletions lab-lee/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: node_js
node_js:
- '4.4.3'
services:
- mongodb
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
env:
- CXX=g++-4.8
sudo: required
before_script: npm i
after_success: 'npm run coveralls'
script:
- npm test
- npm run lint
4 changes: 4 additions & 0 deletions lab-lee/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SLUGRAM BACKEND
[![Build Status](https://travis-ci.org/slugbyte/slugram-backend.svg?branch=stageing)](https://travis-ci.org/slugbyte/slugram-backend)
[![Coverage Status](https://coveralls.io/repos/github/slugbyte/slugram-backend/badge.svg?branch=stageing)](https://coveralls.io/github/slugbyte/slugram-backend?branch=stageing)

Empty file.
30 changes: 30 additions & 0 deletions lab-lee/app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<section class="create-gallery-container">
<h1>Create a New Gallery</h1>
<form name="createGalleryForm"
class="form-inline"
novalidate
ng-submit="createGalleryCtrl.createGallery(createGalleryCtrl.gallery)">

<div class="form-group">
<label for="name"> Name: </label>
<input name="name"
class="form-control"
type="text"
uib-tooltip="name required"
ng-model="createGalleryCtrl.gallery.name"
required>
</div>

<div class="form-group">
<label for="desc"> Description: </label>
<input name="desc"
class="form-control"
type="text"
uib-tooltip="description required"
ng-model="createGalleryCtrl.gallery.desc"
required>
</div>

<button class="btn btn-primary" type="submit"> + </button>
</form>
</section>
20 changes: 20 additions & 0 deletions lab-lee/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('init createGalleryCtrl');
this.gallery = {};

this.createGallery = function(){
galleryService.createGallery(this.gallery)
.then(() => {
this.gallery.name = null;
this.gallery.desc = null;
});
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "theme";
22 changes: 22 additions & 0 deletions lab-lee/app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div>
<form class="edit-gallery"
name="editGallery"
ng-submit="editGalleryCtrl.updateGallery()"
novalidate>
<div class="form-group">
<label for="name"> Name: </label>
<input
name="name"
class="form-control"
ng-model="editGalleryCtrl.gallery.name">
</div>
<div class="form-group">
<label for="desc"> Description: </label>
<input name="desc" class="form-control" ng-model="editGalleryCtrl.gallery.desc">
</div>

<button class="btn btn-warning"> Update </button>

</form>

</div>
18 changes: 18 additions & 0 deletions lab-lee/app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

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

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

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

.gallery-li {
// position:
// display:
// width height
// margin
margin: 2%;
// padding
padding: 2%;
// text
// color
background-color: $app-primary;
}
7 changes: 7 additions & 0 deletions lab-lee/app/component/gallery/gallery-li/gallery-li.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<li class="gallery-li">
<h2> {{ galleryLICtrl.gallery.name }} </h2>
<p> {{ galleryLICtrl.gallery.desc }} </p>
<span ng-click="galleryLICtrl.showEditGallery = !galleryLICtrl.showEditGallery" class="glyphicon glyphicon-pencil" > </span>
<span ng-click="galleryLICtrl.deleteGallery()" class="glyphicon glyphicon-trash" > </span>
<edit-gallery ng-if="galleryLICtrl.showEditGallery" gallery="galleryLICtrl.gallery"> </edit-gallery>
</li>
28 changes: 28 additions & 0 deletions lab-lee/app/component/gallery/gallery-li/gallery-li.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use strtict';

require('./_gallery-li.scss');

module.exports = {
template: require('./gallery-li.html'),
controller: ['$log', 'galleryService', GalleryLIController],
controllerAs: 'galleryLICtrl',
bindings: {
gallery: '<',
deleteDone: '&',
},
};

function GalleryLIController($log, galleryService) {
$log.debug('init galleryLICtrl');

this.showEditGallery = false;

this.deleteGallery = function() {
galleryService.deleteGallery(this.gallery._id)
.then( () => {
this.deleteDone({
galleryData: this.gallery,
});
});
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "theme";

.thumbnail {
border: solid black 1px;
width: 15em;
display:inline-block;
margin: .5em;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<div class="thumbnail-container">
<h2> {{ thumbnailContainerCtrl.gallery.name }} </h2>
<upload-pic gallery="thumbnailContainerCtrl.gallery"> </upload-pic>

<h3>Filter by pic..</h3>
<div class="search-bar-container">

<p>Search by name</p>
<search-bar
class="name-search"
term="uploadPicCtrl.pic.name">
</search-bar>
<p>Search by description</p>
<search-bar
class="desc-search"
term="uploadPicCtrl.pic.desc">
</search-bar>

</div>

<div>
<thumbnail
ng-repeat="item in thumbnailContainerCtrl.gallery.pics | gallerySearch:uploadPicCtrl.pic.name:uploadPicCtrl.pic.desc"
pic="item"
gallery="thumbnailContainerCtrl.gallery">
</thumbnail>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

require('./_thumbnail-container.scss');

module.exports = {
template: require('./thumbnail-container.html'),
controllerAs: 'thumbnailContainerCtrl',
bindings: {
gallery: '<',
},
};
Loading