-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add and configure bower * add basic logic for auth @dodo121
- Loading branch information
Showing
36 changed files
with
35,333 additions
and
5 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
app/assets/javascripts/controllers/sessions/userSessionsCtrl.js.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
angular.module('Organizer').controller('UserSessionsCtrl', ['$scope', 'Navbar', ($scope, Navbar) -> | ||
Navbar.switchTo('#sign-in-link') | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div id="template-with-background"> | ||
<div id="content"> | ||
<form ng-submit="submitLogin(loginForm)" role="form" ng-init="loginForm = {}"> | ||
<div class="form-group"> | ||
<label for="email">Email | ||
<input type="email" | ||
name="email" | ||
id="email" | ||
ng-model="loginForm.email" | ||
required="required" | ||
class="form-control"> | ||
</label> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="password">Password | ||
<input type="password" | ||
name="password" | ||
id="password" | ||
ng-model="loginForm.password" | ||
required="required" | ||
class="form-control"> | ||
</label> | ||
</div> | ||
|
||
<button type="submit" class="btn btn-primary btn-lg">Sign in</button> | ||
</form> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "organizer", | ||
"version": "0.0.0", | ||
"homepage": "https://github.com/dodo121/organizer", | ||
"authors": [ | ||
"Dominik Szromik <[email protected]>" | ||
], | ||
"description": "bower files for organizer app", | ||
"moduleType": [ | ||
"node" | ||
], | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"ng-token-auth": "^0.0.29" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
10.times do | ||
Note.create(content: Faker::Lorem.sentences(rand(5)).join(' ')) | ||
end | ||
|
||
User.create(email: '[email protected]', password: 'yourpassword', password_confirmation: 'yourpassword', | ||
confirmed_at: Time.zone.now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "bower_components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "angular-cookie", | ||
"main": "angular-cookie.js", | ||
"version": "4.1.0", | ||
"homepage": "https://github.com/ivpusic/angular-cookie", | ||
"authors": [ | ||
"ivpusic <[email protected]>" | ||
], | ||
"description": "angular module for accessing browser cookies", | ||
"keywords": [ | ||
"cookie", | ||
"angular" | ||
], | ||
"license": "MIT", | ||
"location": "[email protected]:ivpusic/angular-cookie.git", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"example", | ||
"karma.conf.js", | ||
"LICENSE", | ||
"README.md", | ||
"Gruntfile.js" | ||
], | ||
"dependencies": { | ||
"angular": "*" | ||
}, | ||
"_release": "4.1.0", | ||
"_resolution": { | ||
"type": "version", | ||
"tag": "v4.1.0", | ||
"commit": "514a9df3ead0d60149c62231169adfc903e34489" | ||
}, | ||
"_source": "https://github.com/ivpusic/angular-cookie.git", | ||
"_target": "~4.1.0", | ||
"_originalSource": "angular-cookie" | ||
} |
125 changes: 125 additions & 0 deletions
125
vendor/assets/bower_components/angular-cookie/angular-cookie.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/* | ||
* Copyright 2013 Ivan Pusic | ||
* Contributors: | ||
* Matjaz Lipus | ||
*/ | ||
angular.module('ivpusic.cookie', ['ipCookie']); | ||
angular.module('ipCookie', ['ng']). | ||
factory('ipCookie', ['$document', | ||
function ($document) { | ||
'use strict'; | ||
|
||
function tryDecodeURIComponent(value) { | ||
try { | ||
return decodeURIComponent(value); | ||
} catch(e) { | ||
// Ignore any invalid uri component | ||
} | ||
} | ||
|
||
return (function () { | ||
function cookieFun(key, value, options) { | ||
|
||
var cookies, | ||
list, | ||
i, | ||
cookie, | ||
pos, | ||
name, | ||
hasCookies, | ||
all, | ||
expiresFor; | ||
|
||
options = options || {}; | ||
var dec = options.decode || tryDecodeURIComponent; | ||
var enc = options.encode || encodeURIComponent; | ||
|
||
if (value !== undefined) { | ||
// we are setting value | ||
value = typeof value === 'object' ? JSON.stringify(value) : String(value); | ||
|
||
if (typeof options.expires === 'number') { | ||
expiresFor = options.expires; | ||
options.expires = new Date(); | ||
// Trying to delete a cookie; set a date far in the past | ||
if (expiresFor === -1) { | ||
options.expires = new Date('Thu, 01 Jan 1970 00:00:00 GMT'); | ||
// A new | ||
} else if (options.expirationUnit !== undefined) { | ||
if (options.expirationUnit === 'hours') { | ||
options.expires.setHours(options.expires.getHours() + expiresFor); | ||
} else if (options.expirationUnit === 'minutes') { | ||
options.expires.setMinutes(options.expires.getMinutes() + expiresFor); | ||
} else if (options.expirationUnit === 'seconds') { | ||
options.expires.setSeconds(options.expires.getSeconds() + expiresFor); | ||
} else if (options.expirationUnit === 'milliseconds') { | ||
options.expires.setMilliseconds(options.expires.getMilliseconds() + expiresFor); | ||
} else { | ||
options.expires.setDate(options.expires.getDate() + expiresFor); | ||
} | ||
} else { | ||
options.expires.setDate(options.expires.getDate() + expiresFor); | ||
} | ||
} | ||
return ($document[0].cookie = [ | ||
enc(key), | ||
'=', | ||
enc(value), | ||
options.expires ? '; expires=' + options.expires.toUTCString() : '', | ||
options.path ? '; path=' + options.path : '', | ||
options.domain ? '; domain=' + options.domain : '', | ||
options.secure ? '; secure' : '' | ||
].join('')); | ||
} | ||
|
||
list = []; | ||
all = $document[0].cookie; | ||
if (all) { | ||
list = all.split('; '); | ||
} | ||
|
||
cookies = {}; | ||
hasCookies = false; | ||
|
||
for (i = 0; i < list.length; ++i) { | ||
if (list[i]) { | ||
cookie = list[i]; | ||
pos = cookie.indexOf('='); | ||
name = cookie.substring(0, pos); | ||
value = dec(cookie.substring(pos + 1)); | ||
if(angular.isUndefined(value)) | ||
continue; | ||
|
||
if (key === undefined || key === name) { | ||
try { | ||
cookies[name] = JSON.parse(value); | ||
} catch (e) { | ||
cookies[name] = value; | ||
} | ||
if (key === name) { | ||
return cookies[name]; | ||
} | ||
hasCookies = true; | ||
} | ||
} | ||
} | ||
if (hasCookies && key === undefined) { | ||
return cookies; | ||
} | ||
} | ||
cookieFun.remove = function (key, options) { | ||
var hasCookie = cookieFun(key) !== undefined; | ||
|
||
if (hasCookie) { | ||
if (!options) { | ||
options = {}; | ||
} | ||
options.expires = -1; | ||
cookieFun(key, '', options); | ||
} | ||
return hasCookie; | ||
}; | ||
return cookieFun; | ||
}()); | ||
} | ||
]); |
1 change: 1 addition & 0 deletions
1
vendor/assets/bower_components/angular-cookie/angular-cookie.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "angular-cookie", | ||
"main": "angular-cookie.js", | ||
"version": "4.1.0", | ||
"homepage": "https://github.com/ivpusic/angular-cookie", | ||
"authors": [ | ||
"ivpusic <[email protected]>" | ||
], | ||
"description": "angular module for accessing browser cookies", | ||
"keywords": [ | ||
"cookie", | ||
"angular" | ||
], | ||
"license": "MIT", | ||
"location": "[email protected]:ivpusic/angular-cookie.git", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"example", | ||
"karma.conf.js", | ||
"LICENSE", | ||
"README.md", | ||
"Gruntfile.js" | ||
], | ||
"dependencies": { | ||
"angular": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('./angular-cookie'); | ||
module.exports = 'ipCookie'; |
Oops, something went wrong.