Skip to content

Commit

Permalink
* code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JayGray committed Jul 29, 2014
1 parent e3e172f commit 43c0e22
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/js/components/lib_view.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*global Audica:true, XMLHttpRequest:true, console:true, window, chrome*/
(function(window, Audica) {
/*global Audica*/
(function (window, Audica) {
'use strict';

function AudicaViewError(message) {
this.message = (message || '');
}

AudicaViewError.prototype = new Error();

//private
Expand All @@ -29,7 +30,7 @@


//module
function View(){
function View() {
this.closePlayerControlViewTimerId = null;
this.resizeEventTimeoutId = null;

Expand Down Expand Up @@ -90,7 +91,7 @@
preferencesView: null
};

View.prototype.init = function(){
View.prototype.init = function () {
Audica.on('registerEvents', this.bindEvents.bind(this));
for (var selector in this.Dom) {
if (this.Dom.hasOwnProperty(selector)) {
Expand Down Expand Up @@ -244,7 +245,7 @@
selectedElems.find(currentXClass).attr('positionX', true);
};

View.prototype.bindEvents = function(){
View.prototype.bindEvents = function () {
var _this = this;
$(document).mousemove(function () {
var playerControlView = _this.Dom.playerControlView;
Expand Down Expand Up @@ -400,12 +401,11 @@
Audica.on('previousSong', this.applyCoverArtStyle.bind(this));

$(window).on('resize', function () {
window.clearTimeout(self.resizeEventTimeoutId);
window.clearTimeout(_this.resizeEventTimeoutId);
_this.resizeEventTimeoutId = window.setTimeout(_this.applyCoverArtStyle.bind(_this), 250);
});
};

var encodeDecodeElement = $('<div />');
View.prototype.encodeHtml = function (string) {
if (typeof string === 'string') {
return string.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
Expand All @@ -414,6 +414,7 @@
}
};

var encodeDecodeElement = $('<div />');
View.prototype.decodeHtml = function (string) {
if (typeof string === 'string') {
return encodeDecodeElement.html(string).text();
Expand Down

0 comments on commit 43c0e22

Please sign in to comment.