forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from adamroach/loop-calls-info
Bug 985596 Set up the conversation window infrastructure and obtain the list of calls r=dmose
- Loading branch information
Showing
6 changed files
with
153 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
- License, v. 2.0. If a copy of the MPL was not distributed with this | ||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Conversation</title> | ||
<link rel="stylesheet" type="text/css" href="shared/css/common.css"> | ||
<link rel="stylesheet" type="text/css" href="shared/css/conversation.css"> | ||
</head> | ||
<body onload="loop.conversation.init();"> | ||
<script type="text/javascript" src="shared/libs/jquery-2.1.0.js"></script> | ||
<script type="text/javascript" src="shared/libs/lodash-2.4.1.js"></script> | ||
<script type="text/javascript" src="shared/libs/backbone-1.1.2.js"></script> | ||
<script type="text/javascript" src="js/client.js"></script> | ||
<script type="text/javascript" src="js/conversation.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
/*global loop*/ | ||
// XXX This file needs unit testing | ||
|
||
var loop = loop || {}; | ||
loop.conversation = (function(_, __) { | ||
"use strict"; | ||
|
||
// XXX: baseApiUrl should be configurable (browser pref) | ||
var baseApiUrl = "http://localhost:5000"; | ||
|
||
/** | ||
* Panel initialisation. | ||
*/ | ||
function init() { | ||
// Send a message to the server to get the call info | ||
this.client = new loop.Client({ | ||
baseApiUrl: baseApiUrl | ||
}); | ||
|
||
// Get the call information | ||
this.client.requestCallsInfo(function(err, calls) { | ||
if (err) { | ||
console.error("Error getting call data: ", err); | ||
return; | ||
} | ||
|
||
console.log("Received Calls Data: ", calls); | ||
}); | ||
} | ||
|
||
return { | ||
init: init | ||
}; | ||
})(_); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters