diff --git a/customize.dist/pages.js b/customize.dist/pages.js index f9a5addc6..784fc007f 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -657,10 +657,6 @@ define([ return loadingScreen(); }; - Pages['/contacts2/'] = Pages['/contacts2/index.html'] = function () { - return loadingScreen(); - }; - Pages['/pad/'] = Pages['/pad/index.html'] = function () { return loadingScreen(); }; diff --git a/customize.dist/template.js b/customize.dist/template.js index a980270a3..062be4308 100644 --- a/customize.dist/template.js +++ b/customize.dist/template.js @@ -9,7 +9,7 @@ define([ $(function () { var $body = $('body'); var isMainApp = function () { - return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|contacts2|drive|settings|profile|todo)\/$/.test(location.pathname); + return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|drive|settings|profile|todo)\/$/.test(location.pathname); }; var infoPage = function () { @@ -55,9 +55,6 @@ $(function () { } else if (/^\/contacts\/$/.test(pathname)) { $('body').append(h('body', Pages[pathname]()).innerHTML); require([ '/contacts/main.js' ], ready); - } else if (/contacts2/.test(pathname)) { - $('body').append(h('body', Pages[pathname]()).innerHTML); - require([ '/contacts2/main.js' ], ready); } else if (/pad/.test(pathname)) { $('body').append(h('body', Pages[pathname]()).innerHTML); require([ '/pad/main.js' ], ready); diff --git a/www/contacts/main.js b/www/contacts/main.js index 4803a812a..f1d58029c 100644 --- a/www/contacts/main.js +++ b/www/contacts/main.js @@ -4,9 +4,12 @@ define([ '/common/toolbar2.js', '/common/cryptpad-common.js', + '/common/common-messenger.js', + '/contacts/messenger-ui.js', + 'css!/bower_components/components-font-awesome/css/font-awesome.min.css', 'less!/customize/src/less/cryptpad.less', -], function ($, Crypto, Toolbar, Cryptpad) { +], function ($, Crypto, Toolbar, Cryptpad, Messenger, UI) { var Messages = Cryptpad.Messages; var APP = window.APP = { @@ -46,14 +49,11 @@ define([ console.error('reconnecting: ', uid); Cryptpad.findOKButton().click(); - APP.messenger.cleanFriendChannels(); - APP.messenger.openFriendChannels(); - APP.messenger.setEditable(true); + //APP.messenger.cleanFriendChannels(); + //APP.messenger.openFriendChannels(); + //APP.messenger.setEditable(true); }); - var ui = APP.ui = Cryptpad.initMessagingUI(Cryptpad, $list, $messages); - APP.messenger = Cryptpad.initMessaging(Cryptpad, ui); - var $infoBlock = $('
', {'class': 'info'}).appendTo($messages); $('

').text(Messages.contacts_info1).appendTo($infoBlock); var $ul = $('