Commit 6ee9a051 authored by Leo Iannacone's avatar Leo Iannacone

renamed init in start and initialized socket in constructor

parent 7b330b50
......@@ -3,5 +3,5 @@ var socket = io.connect('//' + config.hostname );
new Page_Generic().init(socket)
if (window.location.pathname == config.paths.distribution) {
new Page_Distrubion().init(socket)
new Page_Distrubion(socket).start()
}
\ No newline at end of file
function Page_Distrubion()
function Page_Distrubion(socket)
{
var socket
var socket = socket
var events = config.events.client
var data = Utils.from_hash_to_data()
......@@ -266,9 +266,7 @@ function Page_Distrubion()
update.view()
}
this.init = function (mysocket) {
socket = mysocket
this.start = function (mysocket) {
socket.on(events.distribution_packages.set, function(socket_data){
packages.set(socket_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment