Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bvallelunga committed May 2, 2014
1 parent 33503d2 commit 15cf5dd
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
5 changes: 3 additions & 2 deletions lib/models/projects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ module.exports = function (db, models) {
return req.signedCookies[cookie] || {
feedback: false,
closed: false,
visits: {}
visits: {},
expires: new Date(Date.now() + 7890000000)
}
},
set_cookie: function(res, data) {
var cookie = "%s_%s".sprintf([config.cookies.tracking, this.pub_id]);
res.cookie(cookie, data, {
httpOnly: true,
signed: true,
maxAge: 7890000000 //3 months
expires: new Date(data.expires)
});
},
rule_engine: function(req, res, callback) {
Expand Down
3 changes: 2 additions & 1 deletion lib/models/users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module.exports = function (db, models) {
required: true
},
card: Object,
stripe: String
stripe: String,
admin: Boolean
}, {
timestamp: true,
hooks: {
Expand Down
9 changes: 5 additions & 4 deletions public/js/track/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
full_params += "&";
}

full_params += key + "=" + encodeURIComponent(params[key]);
if(params[key]) {
full_params += key + "=" + encodeURIComponent(params[key]);
}
}

if(action == "GET") {
Expand Down Expand Up @@ -52,7 +54,7 @@
if(xhr.readyState < 4 || xhr.status !== 200) {
return callback(false);
} else if(xhr.readyState === 4) {
return callback(xhr.responseText);
return callback(xhr.response);
} else {
return callback(false);
}
Expand All @@ -61,6 +63,7 @@

xhr.withCredentials = true;
xhr.open(action, full_url, true);
xhr.responseType = "json";

if(action != "GET") {
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
Expand Down Expand Up @@ -93,8 +96,6 @@
var _this = this;

if(data != false) {
data = JSON.parse(data);

if(data.success && data.show) {
insertAssests(data.assests);
insertContent(data.content);
Expand Down
1 change: 1 addition & 0 deletions public/less/core/dashboard.less
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
font-size: 24px;
font-weight: lighter;
color: rgba(255, 255, 255, 0.5);
display: block;

img {
width: 24px;
Expand Down
1 change: 1 addition & 0 deletions public/less/core/popup.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ body {
font-size: 24px;
font-weight: lighter;
color: rgba(255, 255, 255, 0.5);
display: block;

img {
width: 24px;
Expand Down
2 changes: 1 addition & 1 deletion views/account/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
</div>
</div>
</div>
<% include ../includes/dashboard/logo.html %>
<% include ../includes/logo.html %>
<% include ../includes/end.html %>
5 changes: 1 addition & 4 deletions views/auth/login.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<% include ../includes/start.html %>
<div class="popup">
<div class="logo">
<img src="/img/logo.png"/>
Imprint
</div>
<% include ../includes/logo.html %>
<form action="/login/" autocomplete="off">
<div class="header">Welcome Back!</div>
<div class="info">
Expand Down
5 changes: 1 addition & 4 deletions views/auth/register.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<% include ../includes/start.html %>
<div class="popup">
<div class="logo">
<img src="/img/logo.png"/>
Imprint
</div>
<% include ../includes/logo.html %>
<form action="/register/" autocomplete="off">
<div class="header">Welcome to Imprint!</div>
<div class="info">
Expand Down
5 changes: 1 addition & 4 deletions views/dashboard/create.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<% include ../includes/start.html %>
<div class="popup">
<div class="logo">
<img src="/img/logo.png"/>
Imprint
</div>
<% include ../includes/logo.html %>
<form action="/dashboard/create/" autocomplete="off">
<div class="header">
<% if(!forced) { %>
Expand Down
2 changes: 1 addition & 1 deletion views/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
</div>
</div>
</div>
<% include ../includes/dashboard/logo.html %>
<% include ../includes/logo.html %>
<% include ../includes/end.html %>
4 changes: 4 additions & 0 deletions views/includes/logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<a href="/" class="logo">
<img src="/img/logo.png"/>
Imprint
</a>

0 comments on commit 15cf5dd

Please sign in to comment.