From 78b499e0cb06be9fefd538324d7ec74144f103e5 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Sat, 25 May 2013 19:12:01 +0200 Subject: deleted a bunch of files that doesn't actually get used --- app/views/home.ejs | 164 --------------- app/views/test.ejs | 46 ----- public/css/divanim.less | 203 ------------------ public/css/need.less | 4 - public/css/use.less | 138 ------------- public/font/FontAwesome.otf | Bin 48748 -> 0 bytes public/font/fontawesome-webfont.eot | Bin 25395 -> 0 bytes public/font/fontawesome-webfont.svg | 284 -------------------------- public/font/fontawesome-webfont.ttf | Bin 55096 -> 0 bytes public/font/fontawesome-webfont.woff | Bin 29380 -> 0 bytes public/img/anim/bank.png | Bin 3426 -> 0 bytes public/img/anim/bil.png | Bin 3363 -> 0 bytes public/img/anim/deltomsorg.png | Bin 4073 -> 0 bytes public/img/anim/fly.png | Bin 3547 -> 0 bytes public/img/anim/handel.png | Bin 3608 -> 0 bytes public/img/anim/hus.png | Bin 3223 -> 0 bytes public/img/anim/restaurant.png | Bin 3381 -> 0 bytes public/img/anim/sport.png | Bin 3721 -> 0 bytes public/img/anim/underholdning.png | Bin 3696 -> 0 bytes public/js/controllers/homeController.js | 67 ------ public/js/controllers/loginController.js | 14 -- public/js/controllers/signupController.js | 9 - public/js/form-validators/accountValidator.js | 80 -------- public/js/form-validators/emailValidator.js | 39 ---- public/js/form-validators/loginValidator.js | 29 --- public/js/form-validators/resetValidator.js | 37 ---- public/js/views/home.js | 49 ----- public/js/views/login.js | 51 ----- public/js/views/reset.js | 27 --- public/js/views/signup.js | 39 ---- 30 files changed, 1280 deletions(-) delete mode 100644 app/views/home.ejs delete mode 100644 app/views/test.ejs delete mode 100644 public/css/divanim.less delete mode 100644 public/css/need.less delete mode 100644 public/css/use.less delete mode 100755 public/font/FontAwesome.otf delete mode 100755 public/font/fontawesome-webfont.eot delete mode 100755 public/font/fontawesome-webfont.svg delete mode 100755 public/font/fontawesome-webfont.ttf delete mode 100755 public/font/fontawesome-webfont.woff delete mode 100644 public/img/anim/bank.png delete mode 100644 public/img/anim/bil.png delete mode 100644 public/img/anim/deltomsorg.png delete mode 100644 public/img/anim/fly.png delete mode 100644 public/img/anim/handel.png delete mode 100644 public/img/anim/hus.png delete mode 100644 public/img/anim/restaurant.png delete mode 100644 public/img/anim/sport.png delete mode 100644 public/img/anim/underholdning.png delete mode 100644 public/js/controllers/homeController.js delete mode 100644 public/js/controllers/loginController.js delete mode 100644 public/js/controllers/signupController.js delete mode 100644 public/js/form-validators/accountValidator.js delete mode 100644 public/js/form-validators/emailValidator.js delete mode 100644 public/js/form-validators/loginValidator.js delete mode 100644 public/js/form-validators/resetValidator.js delete mode 100644 public/js/views/home.js delete mode 100644 public/js/views/login.js delete mode 100644 public/js/views/reset.js delete mode 100644 public/js/views/signup.js diff --git a/app/views/home.ejs b/app/views/home.ejs deleted file mode 100644 index 70dbb0f..0000000 --- a/app/views/home.ejs +++ /dev/null @@ -1,164 +0,0 @@ -<% include header %> - - - - - - <% include navbar %> - - -
-
- -
-
- - -
-
-
-

Samarbeid om utgifter

-

Divid er en delingstjeneste som regner ut hva folk skylder hverandre

-
    -

    Registrer deg gratis

    -

    Opprett prosjekt

    -

    Inviter deltakere

    -

    Før inn utgiftene

    -

    Ta et oppgjør

    -
-
-
-

Perfekt for venner, familie og bekjente

- Registrer » -
-
-
- -
-
-
-
-
-
- -
-
- -

Bruk mobil eller nettleser

-

Divid er en webapplikasjon og kan brukes på pc, nettbrett og mobil. Uansett hva du bruker er Divid tilgjengelig.

-
-
- -

Inviter de du vil

-

Inviter deltakere til prosjekt ved å legge til epost-adressen deres eller send dem en link!

-
-
- -

Få oversikt

-

Ikke la delte utgifter gå i glemmeboken. Send påminnelser og få varsel når deltakere betaler.

-
-
-
-
-
-

Hva kan Divid brukes til

-
-
- -

Studentkollektiv

-

Fellesutgifter, fester, bøter, bursdager, øl, mat, strøm

-
-
- -

Singelliv

-

Ute på farten, stelle i stand aktiviter med andre, sydentur osv

-
-
- -

Parforhold

-

I etableringsfasen som ønsker å ha ordnet økonomi fra starten av

-
-
- -

Delt omsorg

-

Klær, mat, medisiner og aktiviteter. Hvem betaler hva for barnet?

- -
-
-
-
-
-
-
-

Hvordan bruke Divid

-
-
-

Tilgjengelig via:

-
-
-
- -
-
-
- - - -
-
-
-
-
- -
-
-

-

Registrering

-
-
-
- -
- -
-
-
- -
- -
-
-
-

-
- -
- -
-
-
- -
- -
-
-
- - -
-
-
-
-
-
-
- -<% include footer %> - - diff --git a/app/views/test.ejs b/app/views/test.ejs deleted file mode 100644 index 03a8aee..0000000 --- a/app/views/test.ejs +++ /dev/null @@ -1,46 +0,0 @@ -<% include templates/header %> - - - - <% include templates/navbar %> - - -
-
- - - - - -
-
-

<%= title %>

-

Velkommen til <%= title %>

-

Her kommer det kanskje mer senere.

-
-
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vestibulum, mauris molestie interdum venenatis, sapien diam vestibulum arcu, sit amet ultrices urna sem et ipsum. Pellentesque dapibus tellus tristique augue sollicitudin mollis. Donec consectetur scelerisque lacus sit amet ullamcorper. Maecenas lectus ante, iaculis vitae consequat quis, viverra non lacus. Vestibulum vestibulum lacinia ullamcorper. Nam facilisis blandit turpis sit amet ultricies. Nulla facilisi. Donec non quam risus. Suspendisse venenatis nisl ut dolor imperdiet in eleifend nulla sagittis. Cras facilisis tempus sapien. In dapibus sodales aliquet. Nullam blandit, elit non convallis congue, velit augue facilisis odio, vel blandit turpis purus nec eros. Donec vel ipsum tellus, id lobortis justo. Vivamus ac porta nisi. Suspendisse malesuada convallis velit, non eleifend metus vehicula vitae. Ut pretium, diam nec iaculis gravida, nunc lacus accumsan arcu, et laoreet elit justo nec libero.

-

Integer sit amet lacus lectus, quis laoreet nisl. Pellentesque ut augue odio, eget placerat mauris. Phasellus tortor libero, placerat at interdum id, luctus scelerisque ipsum. Maecenas auctor feugiat aliquam. Nullam eu lorem quis est euismod elementum. Integer sit amet nulla at dui semper pellentesque eget id sem. Sed bibendum nisl id eros ullamcorper ut condimentum justo tempus. Nam eget neque arcu, ac pulvinar justo. Nunc ac justo vel risus ultrices aliquam vel vehicula velit. Nullam faucibus, sapien eget volutpat commodo, erat ipsum congue ante, non facilisis lacus erat non eros. Pellentesque facilisis semper nibh ac tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vitae magna massa, eu laoreet libero.

-
-
-

Would you?

- -

Cras ac erat arcu, condimentum posuere lectus. Suspendisse mollis volutpat ipsum, ac posuere quam rutrum vitae. Nullam dignissim, diam eu posuere blandit, diam nibh congue eros, a posuere magna diam ut metus. Sed vehicula commodo lobortis. Aliquam erat volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam a purus lorem, non laoreet libero. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum, ligula non tristique consequat, erat lacus porttitor orci, eu viverra ipsum nunc nec risus.

-

Donec vitae felis et quam tempor vestibulum vel at diam. Donec felis mauris, euismod vel interdum ac, commodo quis nunc. Nulla nec libero diam, in tempus arcu. Cras justo neque, sodales vel rhoncus nec, placerat ut nunc. Mauris convallis urna non erat varius malesuada. Curabitur eu mauris purus, ut suscipit lorem. Ut convallis varius lacus nec sollicitudin. Fusce egestas ultricies justo, et gravida neque mollis vel. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;

-
-
-
-
- -<% include templates/footer %> - - diff --git a/public/css/divanim.less b/public/css/divanim.less deleted file mode 100644 index 84c5826..0000000 --- a/public/css/divanim.less +++ /dev/null @@ -1,203 +0,0 @@ -@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300); -.anim { - font-size: 10px; - font-family: 'Source Sans Pro', Arial, sans-serif; - font-weight: 300; - margin:0; - /*background-color: #08090A;*/ } -#scene { - z-index: 1; - position: absolute; - overflow: hidden; - width: 100%; - height: 100%; - background-position: center 40%; - background-repeat: no-repeat; - background-size: cover; - background-image: linear-gradient(#8b9da9, #fff6e4);} -#situation { - position: absolute; - width: 100%; - height: 100%; - -webkit-transform-style: preserve-3d; } -.orbit { - position: absolute; - top: 50%; - left: 50%; - border: 0px solid rgba(255, 255, 255, 0.2); - border-radius: 50%; - -webkit-transform-style: preserve-3d; - -webkit-animation-name: orbit; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; } -.orbit .orbit { - -webkit-animation-name: suborbit; } -.pos { - position: absolute; - top: 50%; - width: 2em; - height: 2em; - margin-top: -1em; - margin-left: -1em; - -webkit-transform-style: preserve-3d; - -webkit-animation-name: invert; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; } -#divid, .object, #activity3 .satellitt { - position: absolute; - top: 50%; - left: 50%; - width: 20em; - height: 23em; - margin-top: -0.5em; - margin-left: -0.5em; - border-radius: 10%; - -webkit-transform-style: preserve-3d; } -#divid { - /*background-color: #FB7209;*/ - background-repeat: no-repeat; - background-size: cover; - /*box-shadow: 0 0 60px rgba(255, 160, 60, 0.4);*/} -.object { - background-repeat: no-repeat; - background-size: cover; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; } -.ring { - position: absolute; - top: 50%; - left: 50%; - border-radius: 50%; } -/* -------------------index positions-------------------------------------------------------*/ -#activity1 { - z-index: 2; } -#activity2 { - z-index: 3; } -#activity3 { - z-index: 4; } -#satellitt { - z-index: 5; } -#activity4 { - z-index: 6; } -#divid { - z-index: 1; } -/* --------------------------------activity starting positions----------------------------------------*/ -#activity1 .pos { - left: 50%; - top: -1%; } -#activity2 .pos { - left: 0; - top: 50%; } -#activity3 .pos { - left: 100%; - top: 50%; } -#activity4 .pos { - left: 100%; - top: 50%; } - -/* --------------------webkit animations-----------------------------------------------------*/ -@-webkit-keyframes orbit { - 0% { - -webkit-transform: rotateZ(0deg); } - 100% { - -webkit-transform: rotateZ(-360deg); } } -@-webkit-keyframes suborbit { - 0% { - -webkit-transform: rotateX(90deg) rotateZ(0deg); } - 100% { - -webkit-transform: rotateX(90deg) rotateZ(-360deg); } } -@-webkit-keyframes invert { - 0% { - -webkit-transform: rotateX(-90deg) rotateY(360deg) rotateZ(0deg); } - 100% { - -webkit-transform: rotateX(-90deg) rotateY(0deg) rotateZ(0deg); } } -/* ------------------------scale 3D view----------------------------------------*/ -.view-3D.zoom-large #divid { - -webkit-transform-style: preserve-3d; } -.view-3D.zoom-large .orbit { - -webkit-transform-style: preserve-3d; } -.view-3D #situation { - -webkit-transform: rotateX(75deg); } -.view-3D #divid { - -webkit-transform: rotateX(-90deg); } -.view-3D .ring { - -webkit-transform: rotateX(90deg); } -.view-3D .object, -.view-3D .satellitt { - -webkit-transform: rotateX(0deg); } -/* ------------------------zoom----------------------------------------------------------*/ -.zoom-large #situation { - width: 100%; } -.zoom-large.view-3D .scale-stretched #situation { - font-size: 40%; } /*originalstr.62*/ -.zoom-large.view-3D .scale-d #situation { - font-size: 48%; } -.zoom-large.view-3D .scale-s #situation { - font-size: 14%; } -/* ---------------------------data-------------------------------------------------------*/ -/* ---------------------------speed-------------------------------------------------------*/ -/* sideral years */ -#activity1 .pos, -#activity1 .object, -#activity1.orbit { - /*border: 1px solid white;*/ - -webkit-animation-duration: 6.89016s; }/*2.89016*/ -#activity2 .pos, -#activity2 .object, -#activity2.orbit { - /*border: 1px solid white;*/ - -webkit-animation-duration: 8.38237s; }/*7.38237*/ -#activity3 .pos, -#activity3 .object, -#activity3.orbit { - /*border: 1px solid white;*/ - -webkit-animation-duration: 11.00021s; }/*12.00021*/ -#activity3 .orbit .pos, -#activity3 .orbit { - /*border: 1px solid white;*/ - -webkit-animation-duration: 0.89764s; }/*0.89764*/ -#activity4 .pos, -#activity4 .object, -#activity4.orbit { - /*border: 1px solid white;*/ - -webkit-animation-duration: 13.57017s; }/*22.57017*/ -/* ------------Streched orbits-----------------------------------------------------------------*/ -.scale-stretched #activity1.orbit { - width: 72em; /*32*/ - height: 72em; - margin-top: -36em; /*-16*/ - margin-left: -36em; } -.scale-stretched #activity2.orbit { - width: 72em; /*40*/ - height: 72em; - margin-top: -36em; /*-20*/ - margin-left: -36em; } -.scale-stretched #activity3.orbit { - width: 72em; /*56*/ - height: 72em; - margin-top: -36em; /*-28*/ - margin-left: -36em; } -.scale-stretched #activity3 .orbit { - width: 16em; /*6*/ - height: 16em; - margin-top: -8em; /*-3*/ - margin-left: -8em; } -.scale-stretched #activity4.orbit { - width: 72em; /*72*/ - height: 72em; - margin-top: -36em; /*-36*/ - margin-left: -36em; } - -/* ------------pictures---------------------------------------------------------------*/ -#divid { - background-image: url('group.png'); } -#activity1 .object { - background-image: url('/img/dennis.jpg');} -#activity2 .object { - background-image: url('/img/erling.jpg');} -#activity3 .object { - background-image: url('/img/robert.jpg');} -#activity3 .satelite { - background-image: url('betaling.png');} -#activity4 .object { - background-image: url('/img/stian.jpg');} diff --git a/public/css/need.less b/public/css/need.less deleted file mode 100644 index 478737a..0000000 --- a/public/css/need.less +++ /dev/null @@ -1,4 +0,0 @@ -/* Temporary*/ -.que:hover { -text-decoration: none; -} diff --git a/public/css/use.less b/public/css/use.less deleted file mode 100644 index 6800bff..0000000 --- a/public/css/use.less +++ /dev/null @@ -1,138 +0,0 @@ -.pitch { - position: relative; - margin-left: 10px; -} -.join { - float: left; - position: absolute; - margin-top: 220px; - margin-left: 10px; -} -.dash { - margin: 10px; -} -.pdash { - margin: 10px; -} -.sectionleft { - float: left; - margin-top: 20px; - margin-left: 10px; - margin-right: 20px; -} -.sectionright { - float: right; - margin: 20px; -} -.tutorial { - padding: 5px; -} -.infobox { - display: inline-block; - text-align: center; - /*background-color: @grayLighter;*/ - padding: 46px; - margin-bottom: 20px; - border: 1px solid white; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} -.register { - margin-top:45px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-image: -moz-linear-gradient(top, #fbb440, #ff9a00); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb440), to(#ff9a00)); - background-image: -webkit-linear-gradient(top, #fbb440, #ff9a00); - background-image: -o-linear-gradient(top, #fbb440, #ff9a00); - background-image: linear-gradient(to bottom, #fbb440, #ff9a00); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbb440', endColorstr='#ff9a00', GradientType=0); - border-color: #ff9a00 #ff9a00 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - /* - margin-left: 20px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-image: linear-gradient(to bottom, #FF9A00, #FFB440); - background-repeat: repeat-x; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);*/ -} -.like { -margin-top:45px; -} -.showcase { - /*height: 460px;*/ - margin-top: 40px; - margin-bottom: 20px; - margin-left: 0px; - /*background-color: @grayLighter;*/ - /*background-image: url('/img/people.png'); - background-repeat:no-repeat; - background-attachment:fixed; - background-position:center;*/ - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.logo { - float: left; -} -.devices { - float: right; - margin: 0px; -} -.scenario { -margin:60px; -text-align: center; -} -#hva { - /*height: 460px;*/ - /*margin: 0 auto;*/ - margin-top: 25px; - /*border-top: 2px solid #9fd5df;*/ - box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - - font-size: 18px; - line-height: 26px; - display: block; -} -#hvor { - /*height:460px;*/ - margin-top: 25px; - /*border-top: 2px solid #9fd5df;*/ - - color: #0D56A6; - background-color: #4186D3; - box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - /*margin: 0 auto;*/ - font-size: 18px; - line-height: 26px; - display: block; -} -#hvordan { - /*height:460px;*/ - margin-top: 25px; - /*border-top: 2px solid #9fd5df;*/ - color: #4186D3; - background-color: #0D56A6; - box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - /*margin: 0 auto;*/ - font-size: 18px; - line-height: 26px; - display: block; -} \ No newline at end of file diff --git a/public/font/FontAwesome.otf b/public/font/FontAwesome.otf deleted file mode 100755 index 64049bf..0000000 Binary files a/public/font/FontAwesome.otf and /dev/null differ diff --git a/public/font/fontawesome-webfont.eot b/public/font/fontawesome-webfont.eot deleted file mode 100755 index 7d81019..0000000 Binary files a/public/font/fontawesome-webfont.eot and /dev/null differ diff --git a/public/font/fontawesome-webfont.svg b/public/font/fontawesome-webfont.svg deleted file mode 100755 index ba0afe5..0000000 --- a/public/font/fontawesome-webfont.svg +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/font/fontawesome-webfont.ttf b/public/font/fontawesome-webfont.ttf deleted file mode 100755 index d461724..0000000 Binary files a/public/font/fontawesome-webfont.ttf and /dev/null differ diff --git a/public/font/fontawesome-webfont.woff b/public/font/fontawesome-webfont.woff deleted file mode 100755 index 3c89ae0..0000000 Binary files a/public/font/fontawesome-webfont.woff and /dev/null differ diff --git a/public/img/anim/bank.png b/public/img/anim/bank.png deleted file mode 100644 index 3dde168..0000000 Binary files a/public/img/anim/bank.png and /dev/null differ diff --git a/public/img/anim/bil.png b/public/img/anim/bil.png deleted file mode 100644 index 325a86c..0000000 Binary files a/public/img/anim/bil.png and /dev/null differ diff --git a/public/img/anim/deltomsorg.png b/public/img/anim/deltomsorg.png deleted file mode 100644 index dc36b1b..0000000 Binary files a/public/img/anim/deltomsorg.png and /dev/null differ diff --git a/public/img/anim/fly.png b/public/img/anim/fly.png deleted file mode 100644 index 46e3595..0000000 Binary files a/public/img/anim/fly.png and /dev/null differ diff --git a/public/img/anim/handel.png b/public/img/anim/handel.png deleted file mode 100644 index 10236aa..0000000 Binary files a/public/img/anim/handel.png and /dev/null differ diff --git a/public/img/anim/hus.png b/public/img/anim/hus.png deleted file mode 100644 index 868f50e..0000000 Binary files a/public/img/anim/hus.png and /dev/null differ diff --git a/public/img/anim/restaurant.png b/public/img/anim/restaurant.png deleted file mode 100644 index 4c12dc3..0000000 Binary files a/public/img/anim/restaurant.png and /dev/null differ diff --git a/public/img/anim/sport.png b/public/img/anim/sport.png deleted file mode 100644 index 2aeaaa3..0000000 Binary files a/public/img/anim/sport.png and /dev/null differ diff --git a/public/img/anim/underholdning.png b/public/img/anim/underholdning.png deleted file mode 100644 index 71c97e5..0000000 Binary files a/public/img/anim/underholdning.png and /dev/null differ diff --git a/public/js/controllers/homeController.js b/public/js/controllers/homeController.js deleted file mode 100644 index 9894d0e..0000000 --- a/public/js/controllers/homeController.js +++ /dev/null @@ -1,67 +0,0 @@ - -function HomeController() -{ - -// bind event listeners to button clicks // - var that = this; - -// handle user logout // - $('#btn-logout').click(function(){ that.attemptLogout(); }); - -// confirm account deletion // - $('#account-form-btn1').click(function(){$('.modal-confirm').modal('show')}); - -// handle account deletion // - $('.modal-confirm .submit').click(function(){ that.deleteAccount(); }); - - this.deleteAccount = function() - { - $('.modal-confirm').modal('hide'); - var that = this; - $.ajax({ - url: '/delete', - type: 'POST', - data: { id: $('#userId').val()}, - success: function(data){ - that.showLockedAlert('Your account has been deleted.
Redirecting you back to the homepage.'); - }, - error: function(jqXHR){ - console.log(jqXHR.responseText+' :: '+jqXHR.statusText); - } - }); - } - - this.attemptLogout = function() - { - var that = this; - $.ajax({ - url: "/home", - type: "POST", - data: {logout : true}, - success: function(data){ - that.showLockedAlert('You are now logged out.
Redirecting you back to the homepage.'); - }, - error: function(jqXHR){ - console.log(jqXHR.responseText+' :: '+jqXHR.statusText); - } - }); - } - - this.showLockedAlert = function(msg){ - $('.modal-alert').modal({ show : false, keyboard : false, backdrop : 'static' }); - $('.modal-alert .modal-header h3').text('Success!'); - $('.modal-alert .modal-body p').html(msg); - $('.modal-alert').modal('show'); - $('.modal-alert button').click(function(){window.location.href = '/';}) - setTimeout(function(){window.location.href = '/';}, 3000); - } -} - -HomeController.prototype.onUpdateSuccess = function() -{ - $('.modal-alert').modal({ show : false, keyboard : true, backdrop : true }); - $('.modal-alert .modal-header h3').text('Success!'); - $('.modal-alert .modal-body p').html('Your account has been updated.'); - $('.modal-alert').modal('show'); - $('.modal-alert button').off('click'); -} diff --git a/public/js/controllers/loginController.js b/public/js/controllers/loginController.js deleted file mode 100644 index a894aed..0000000 --- a/public/js/controllers/loginController.js +++ /dev/null @@ -1,14 +0,0 @@ - -function LoginController() -{ - -// bind event listeners to button clicks // - - $('#login-form #forgot-password').click(function(){ $('#get-credentials').modal('show');}); - -// automatically toggle focus between the email modal window and the login form // - - $('#get-credentials').on('shown', function(){ $('#email-tf').focus(); }); - $('#get-credentials').on('hidden', function(){ $('#user-tf').focus(); }); - -} \ No newline at end of file diff --git a/public/js/controllers/signupController.js b/public/js/controllers/signupController.js deleted file mode 100644 index 97d20e6..0000000 --- a/public/js/controllers/signupController.js +++ /dev/null @@ -1,9 +0,0 @@ - -function SignupController() -{ -// redirect to homepage when cancel button is clicked // - $('#account-form-btn1').click(function(){ window.location.href = '/';}); - -// redirect to homepage on new account creation, add short delay so user can read alert window // - $('.modal-alert #ok').click(function(){ setTimeout(function(){window.location.href = '/';}, 300)}); -} \ No newline at end of file diff --git a/public/js/form-validators/accountValidator.js b/public/js/form-validators/accountValidator.js deleted file mode 100644 index 6de2dfc..0000000 --- a/public/js/form-validators/accountValidator.js +++ /dev/null @@ -1,80 +0,0 @@ - -function AccountValidator(){ - -// build array maps of the form inputs & control groups // - - this.formFields = [$('#name-tf'), $('#email-tf'), $('#user-tf'), $('#pass-tf')]; - this.controlGroups = [$('#name-cg'), $('#email-cg'), $('#user-cg'), $('#pass-cg')]; - -// bind the form-error modal window to this controller to display any errors // - - this.alert = $('.modal-form-errors'); - this.alert.modal({ show : false, keyboard : true, backdrop : true}); - - this.validateName = function(s) - { - return s.length >= 3; - } - - this.validatePassword = function(s) - { - // if user is logged in and hasn't changed their password, return ok - if ($('#userId').val() && s===''){ - return true; - } else{ - return s.length >= 6; - } - } - - this.validateEmail = function(e) - { - var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return re.test(e); - } - - this.showErrors = function(a) - { - $('.modal-form-errors .modal-body p').text('Please correct the following problems :'); - var ul = $('.modal-form-errors .modal-body ul'); - ul.empty(); - for (var i=0; i < a.length; i++) ul.append('
  • '+a[i]+'
  • '); - this.alert.modal('show'); - } - -} - -AccountValidator.prototype.showInvalidEmail = function() -{ - this.controlGroups[1].addClass('error'); - this.showErrors(['That email address is already in use.']); -} - -AccountValidator.prototype.showInvalidUserName = function() -{ - this.controlGroups[2].addClass('error'); - this.showErrors(['That username is already in use.']); -} - -AccountValidator.prototype.validateForm = function() -{ - var e = []; - for (var i=0; i < this.controlGroups.length; i++) this.controlGroups[i].removeClass('error'); - if (this.validateName(this.formFields[0].val()) == false) { - this.controlGroups[0].addClass('error'); e.push('Please Enter Your Name'); - } - if (this.validateEmail(this.formFields[1].val()) == false) { - this.controlGroups[1].addClass('error'); e.push('Please Enter A Valid Email'); - } - if (this.validateName(this.formFields[2].val()) == false) { - this.controlGroups[2].addClass('error'); - e.push('Please Choose A Username'); - } - if (this.validatePassword(this.formFields[3].val()) == false) { - this.controlGroups[3].addClass('error'); - e.push('Password Should Be At Least 6 Characters'); - } - if (e.length) this.showErrors(e); - return e.length === 0; -} - - \ No newline at end of file diff --git a/public/js/form-validators/emailValidator.js b/public/js/form-validators/emailValidator.js deleted file mode 100644 index 5a87c04..0000000 --- a/public/js/form-validators/emailValidator.js +++ /dev/null @@ -1,39 +0,0 @@ - -function EmailValidator(){ - -// bind this to _local for anonymous functions // - - var _local = this; - -// modal window to allow users to request credentials by email // - _local.retrievePassword = $('#get-credentials'); - _local.retrievePassword.modal({ show : false, keyboard : true, backdrop : true }); - _local.retrievePasswordAlert = $('#get-credentials .alert'); - _local.retrievePassword.on('show', function(){ $('#get-credentials-form').resetForm(); _local.retrievePasswordAlert.hide();}); - -} - -EmailValidator.prototype.validateEmail = function(e) -{ - var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return re.test(e); -} - -EmailValidator.prototype.showEmailAlert = function(m) -{ - this.retrievePasswordAlert.attr('class', 'alert alert-error'); - this.retrievePasswordAlert.html(m); - this.retrievePasswordAlert.show(); -} - -EmailValidator.prototype.hideEmailAlert = function() -{ - this.retrievePasswordAlert.hide(); -} - -EmailValidator.prototype.showEmailSuccess = function(m) -{ - this.retrievePasswordAlert.attr('class', 'alert alert-success'); - this.retrievePasswordAlert.html(m); - this.retrievePasswordAlert.fadeIn(500); -} \ No newline at end of file diff --git a/public/js/form-validators/loginValidator.js b/public/js/form-validators/loginValidator.js deleted file mode 100644 index 066e822..0000000 --- a/public/js/form-validators/loginValidator.js +++ /dev/null @@ -1,29 +0,0 @@ - -function LoginValidator(){ - -// bind a simple alert window to this controller to display any errors // - - this.loginErrors = $('.modal-alert'); - this.loginErrors.modal({ show : false, keyboard : true, backdrop : true }); - - this.showLoginError = function(t, m) - { - $('.modal-alert .modal-header h3').text(t); - $('.modal-alert .modal-body p').text(m); - this.loginErrors.modal('show'); - } - -} - -LoginValidator.prototype.validateForm = function() -{ - if ($('#user-tf').val() == ''){ - this.showLoginError('Whoops!', 'Please enter a valid username'); - return false; - } else if ($('#pass-tf').val() == ''){ - this.showLoginError('Whoops!', 'Please enter a valid password'); - return false; - } else{ - return true; - } -} \ No newline at end of file diff --git a/public/js/form-validators/resetValidator.js b/public/js/form-validators/resetValidator.js deleted file mode 100644 index 71c8792..0000000 --- a/public/js/form-validators/resetValidator.js +++ /dev/null @@ -1,37 +0,0 @@ - -function ResetValidator(){ - -// modal window to allow users to reset their password // - this.setPassword = $('#set-password'); - this.setPassword.modal({ show : false, keyboard : false, backdrop : 'static' }); - this.setPasswordAlert = $('#set-password .alert'); -} - -ResetValidator.prototype.validatePassword = function(s) -{ - if (s.length >= 6){ - return true; - } else{ - this.showAlert('Password Should Be At Least 6 Characters'); - return false; - } -} - -ResetValidator.prototype.showAlert = function(m) -{ - this.setPasswordAlert.attr('class', 'alert alert-error'); - this.setPasswordAlert.html(m); - this.setPasswordAlert.show(); -} - -ResetValidator.prototype.hideAlert = function() -{ - this.setPasswordAlert.hide(); -} - -ResetValidator.prototype.showSuccess = function(m) -{ - this.setPasswordAlert.attr('class', 'alert alert-success'); - this.setPasswordAlert.html(m); - this.setPasswordAlert.fadeIn(500); -} \ No newline at end of file diff --git a/public/js/views/home.js b/public/js/views/home.js deleted file mode 100644 index eda246a..0000000 --- a/public/js/views/home.js +++ /dev/null @@ -1,49 +0,0 @@ - -$(document).ready(function(){ - - var hc = new HomeController(); - var av = new AccountValidator(); - - $('#account-form').ajaxForm({ - beforeSubmit : function(formData, jqForm, options){ - if (av.validateForm() == false){ - return false; - } else{ - // push the disabled username field onto the form data array // - formData.push({name:'user', value:$('#user-tf').val()}) - return true; - } - }, - success : function(responseText, status, xhr, $form){ - if (status == 'success') hc.onUpdateSuccess(); - }, - error : function(e){ - if (e.responseText == 'email-taken'){ - av.showInvalidEmail(); - } else if (e.responseText == 'username-taken'){ - av.showInvalidUserName(); - } - } - }); - $('#name-tf').focus(); - $('#github-banner').css('top', '41px'); - -// customize the account settings form // - - $('#account-form h1').text('Account Settings'); - $('#account-form #sub1').text('Here are the current settings for your account.'); - $('#user-tf').attr('disabled', 'disabled'); - $('#account-form-btn1').html('Delete'); - $('#account-form-btn1').addClass('btn-danger'); - $('#account-form-btn2').html('Update'); - -// setup the confirm window that displays when the user chooses to delete their account // - - $('.modal-confirm').modal({ show : false, keyboard : true, backdrop : true }); - $('.modal-confirm .modal-header h3').text('Delete Account'); - $('.modal-confirm .modal-body p').html('Are you sure you want to delete your account?'); - $('.modal-confirm .cancel').html('Cancel'); - $('.modal-confirm .submit').html('Delete'); - $('.modal-confirm .submit').addClass('btn-danger'); - -}) \ No newline at end of file diff --git a/public/js/views/login.js b/public/js/views/login.js deleted file mode 100644 index 27fe31d..0000000 --- a/public/js/views/login.js +++ /dev/null @@ -1,51 +0,0 @@ - -$(document).ready(function(){ - - var lv = new LoginValidator(); - var lc = new LoginController(); - -// main login form // - - $('#login-form').ajaxForm({ - beforeSubmit : function(formData, jqForm, options){ - if (lv.validateForm() == false){ - return false; - } else{ - // append 'remember-me' option to formData to write local cookie // - formData.push({name:'remember-me', value:$("input:checkbox:checked").length == 1}) - return true; - } - }, - success : function(responseText, status, xhr, $form){ - if (status == 'success') window.location.href = '/home'; - }, - error : function(e){ - lv.showLoginError('Login Failure', 'Please check your username and/or password'); - } - }); - $('#user-tf').focus(); - -// login retrieval form via email // - - var ev = new EmailValidator(); - - $('#get-credentials-form').ajaxForm({ - url: '/lost-password', - beforeSubmit : function(formData, jqForm, options){ - if (ev.validateEmail($('#email-tf').val())){ - ev.hideEmailAlert(); - return true; - } else{ - ev.showEmailAlert(" Error! Please enter a valid email address"); - return false; - } - }, - success : function(responseText, status, xhr, $form){ - ev.showEmailSuccess("Check your email on how to reset your password."); - }, - error : function(){ - ev.showEmailAlert("Sorry. There was a problem, please try again later."); - } - }); - -}) \ No newline at end of file diff --git a/public/js/views/reset.js b/public/js/views/reset.js deleted file mode 100644 index c6a6166..0000000 --- a/public/js/views/reset.js +++ /dev/null @@ -1,27 +0,0 @@ - -$(document).ready(function(){ - - var rv = new ResetValidator(); - - $('#set-password-form').ajaxForm({ - beforeSubmit : function(formData, jqForm, options){; - rv.hideAlert(); - if (rv.validatePassword($('#pass-tf').val()) == false){ - return false; - } else{ - return true; - } - }, - success : function(responseText, status, xhr, $form){ - rv.showSuccess("Your password has been reset."); - setTimeout(function(){ window.location.href = '/'; }, 3000); - }, - error : function(){ - rv.showAlert("I'm sorry something went wrong, please try again."); - } - }); - - $('#set-password').modal('show'); - $('#set-password').on('shown', function(){ $('#pass-tf').focus(); }) - -}); \ No newline at end of file diff --git a/public/js/views/signup.js b/public/js/views/signup.js deleted file mode 100644 index 52de197..0000000 --- a/public/js/views/signup.js +++ /dev/null @@ -1,39 +0,0 @@ - -$(document).ready(function(){ - - var av = new AccountValidator(); - var sc = new SignupController(); - - $('#account-form').ajaxForm({ - beforeSubmit : function(formData, jqForm, options){ - return av.validateForm(); - }, - success : function(responseText, status, xhr, $form){ - if (status == 'success') $('.modal-alert').modal('show'); - }, - error : function(e){ - if (e.responseText == 'email-taken'){ - av.showInvalidEmail(); - } else if (e.responseText == 'username-taken'){ - av.showInvalidUserName(); - } - } - }); - $('#name-tf').focus(); - -// customize the account signup form // - - $('#account-form h1').text('Signup'); - $('#account-form #sub1').text('Please tell us a little about yourself'); - $('#account-form #sub2').text('Choose your username & password'); - $('#account-form-btn1').html('Cancel'); - $('#account-form-btn2').html('Submit'); - $('#account-form-btn2').addClass('btn-primary'); - -// setup the alert that displays when an account is successfully created // - - $('.modal-alert').modal({ show : false, keyboard : false, backdrop : 'static' }); - $('.modal-alert .modal-header h3').text('Success!'); - $('.modal-alert .modal-body p').html('Your account has been created.
    Click OK to return to the login page.'); - -}) \ No newline at end of file -- cgit v1.2.3