From fdd52c23c303b476b0bc930bf171fe1646e90a84 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Thu, 13 Nov 2014 22:15:22 +0100 Subject: [PATCH] merge small fixes --- .gitignore | 3 ++- www/index.html | 3 +-- www/js/index.js | 25 +++++++++++++------------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 81cbd9a..d5ffaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bower_components/ -platforms/ \ No newline at end of file +platforms/ +/nbproject/ diff --git a/www/index.html b/www/index.html index 0555699..f5bb96d 100644 --- a/www/index.html +++ b/www/index.html @@ -102,8 +102,7 @@
  • - - +
    diff --git a/www/js/index.js b/www/js/index.js index 67f2d52..437c4d6 100644 --- a/www/js/index.js +++ b/www/js/index.js @@ -36,7 +36,7 @@ MessageList.prototype.update = function(clb){ if(clb) clb(data); }.bind(this)); -} +}; /** @@ -86,7 +86,7 @@ Messages.prototype.update = function(username, clb) { if(clb) clb(data); }.bind(this)); -} +}; /** * Send Message @@ -110,7 +110,7 @@ function Compose(sel_elm){ var out=""; for (k in this.friends) { var f = this.friends[k]; - out += "" + out += ""; } out += ''; @@ -142,7 +142,7 @@ function Compose(sel_elm){ Compose.prototype.update = function(clb){ if (this.last_update > (new Date())-60000) { - if (clb) clb(this.friends) + if (clb) clb(this.friends); return; } var dl = this.elm.find("#contacts"); @@ -152,16 +152,17 @@ Compose.prototype.update = function(clb){ this.friends = {}; for (k in data){ var friend = data[k]; - if (friend.network == "dfrn") - this.friends[friend.screen_name] = friend; + if (friend.network == "dfrn") { + this.friends[friend.screen_name] = friend; out += ""; + } } this.last_update = (new Date()) - 0; dl.html(out); if (clb) clb(data); }.bind(this)); -} +}; Compose.prototype.send = function(clb){ @@ -223,7 +224,7 @@ Compose.prototype.send = function(clb){ // send the form! form.submit(); }, 1 ); -} +}; /** * App settings @@ -246,19 +247,19 @@ Settings.prototype.update = function(clb) { this.elm.find("#"+k).val(this.opts[k]); } if(clb) clb(); -} +}; Settings.prototype.is_valid = function() { return this.opts !== null && this.opts.host !== undefined && this.opts.host !== "" && this.opts.user !== undefined && this.opts.user !== "" && this.opts.pass !== undefined && this.opts.pass !==""; -} +}; Settings.prototype.set = function(name, value) { this.opts[name] = value; window.localStorage.setItem("opts", JSON.stringify(this.opts)); -} +}; @@ -302,7 +303,7 @@ var app = { app.messages.update(user, function(){ - var ofs = $("#messages li:last-of-type").offset() + var ofs = $("#messages li:last-of-type").offset(); if (ofs !== null) $("#messagePage .scrollable").scrollTop(ofs.top); -- 2.1.4