Skip to content

Commit 4b71662

Browse files
committed
2 parents 79cf25b + ed23119 commit 4b71662

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+652
-604
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# PPMessage
2-
A Open Source Plug & Play Online Customer Communication Platform. Base on PPMessage, you can chat with your customer via Web and mobile real time.
2+
A Open Source Plug & Play Online Customer Communication Platform. On PPMessage, you can chat with your customer via Web or mobile App. As open source [Intercom](http://intercom.io) alternative, nothing needs change, you can start a SAAS with PPMessage.
33

4-
## Run PPMessage on Mac OS X
4+
PPMessage targets to be deployed on Linux, Mac OS X and Windows systems. And PPMessage is a clearly API system which could be integrated with any open source Content Management System like Wordpress, Drupal and any commercial system even a e-commerce system.
5+
6+
PPMessage includes a backend system which exposes oauth and web service APIs, a frontend SDK named PPCom, a frontend App named PPKefu.
7+
8+
PPCom run in customer user side, and can be integrated in Web site via a single line Javascript code or integrated in mobile App with PPCom mobile API. Customer use PPCom to communicate with service user.
9+
10+
PPKefu run in service user side, service user can use PPKefu application to communicate with customer user. PPKefu can run on Windows, Mac OS X, Android, iOS and Web.
511

6-
> Want to know more (install PPMessage on other OS platform, configuration etc.), please go to [PPMessage Site](http://ppmessage.com) get more documents about PPMessage.
12+
PPConsole is Web user interface of PPMessage and open sourced. After PPMessage backend running, PPConsole provided a Web interface to help the service team leader to setup the PPMessage system.
13+
14+
15+
> In the following, it is a simple guide to help developer delopy PPMessage backend and generate Web version of PPCom and PPKefu on Mac OS X. Want to know more, please go to [PPMessage Site](http://ppmessage.com) get more detail documents about PPMessage.
16+
17+
## Run PPMessage on Mac OS X
718

819
### Requirements
920

dist.sh

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,30 @@ function ppmessage_app_ios()
275275
276276
}
277277
278+
function ppmessage_gulp()
279+
{
280+
echo "generate PPCom/PPKefu/PPConsole js";
281+
cd ppmessage/ppkefu/ppkefu; gulp; cd -;
282+
cd ppmessage/ppcom/web/gulp; gulp; cd -;
283+
cd ppmessage/ppconsole/gulp; gulp; cd -;
284+
}
285+
286+
function ppmessage_bower()
287+
{
288+
echo "install PPCom/PPKefu/PPConsole js bower depends";
289+
cd ppmessage/ppcom/web; bower install; cd -;
290+
cd ppmessage/ppkefu/ppkefu; bower install; cd -;
291+
cd ppmessage/ppconsole; bower install; cd -;
292+
}
293+
294+
function ppmessage_npm()
295+
{
296+
echo "install PPCom/PPKefu/PPConsole js node depends";
297+
cd ppmessage/ppcom/web/gulp; npm install; cd -;
298+
cd ppmessage/ppkefu/ppkefu; npm install; cd -;
299+
cd ppmessage/ppconsole/gulp; npm install; cd -;
300+
}
301+
278302
279303
### MAIN ###
280304
@@ -340,12 +364,16 @@ case "$1" in
340364
ppmessage_log
341365
;;
342366
343-
ppmessage)
344-
ppmessage_ppmessage
367+
gulp)
368+
ppmessage_gulp
369+
;;
370+
371+
bower)
372+
ppmessage_bower
345373
;;
346374
347-
localhost)
348-
ppmessage_localhost
375+
npm)
376+
ppmessage_npm
349377
;;
350378
351379
app-win32)

ppmessage/ppconsole/static/js/controllers/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ angular.module("this_app")
122122
if (in_this) {
123123
self.location = url;
124124
} else {
125-
window.open(url, "ppmessage");
125+
window.open(url, "ppmessage" + "-" + userEmail);
126126
}
127127
};
128128

ppmessage/ppkefu/ppkefu/www/js/controllers/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ function ($scope, yvDB, yvLog, yvSys, yvNav, yvBase, yvLogin) {
2323
console.log("appctrl onloaded....");
2424
});
2525

26-
26+
$scope.isInAndroidApp = function () {
27+
return yvSys.in_android_app();
28+
};
29+
2730
$scope.isInMobileNative = function () {
2831
if (yvSys.in_mobile_app()) {
2932
return true;

ppmessage/ppkefu/ppkefu/www/js/controllers/auto-login.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ ppmessageModule.controller("AutoLoginCtrl", [
22
"$scope",
33
"$state",
44
"$stateParams",
5+
"$ionicHistory",
56
"yvNav",
67
"yvMain",
78
"yvLogin",
8-
function ($scope, $state, $stateParams, yvNav, yvMain, yvLogin) {
9+
function ($scope, $state, $stateParams, $ionicHistory, yvNav, yvMain, yvLogin) {
910

1011
function login_success() {
1112
console.log("login successfully...");
@@ -37,6 +38,11 @@ function ($scope, $state, $stateParams, yvNav, yvMain, yvLogin) {
3738

3839
$scope.user.user_email = _body.user_email;
3940
$scope.user.user_password = _body.user_password;
41+
var current_session = yvLogin.current_session();
42+
if (current_session && current_session.user_email == _body.user_email) {
43+
$ionicHistory.goBack();
44+
return;
45+
}
4046
yvMain.init_yvdb(function (user) {
4147
yvLogin.login($scope.user);
4248
});

ppmessage/ppkefu/ppkefu/www/js/controllers/change-avatar.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,11 @@ function ($scope, $timeout, FileUploader, $ionicLoading, yvSys, yvAPI, yvUser, y
106106
}
107107

108108

109-
function cropAvatarCallback(blob, file) {
109+
function cropAvatarCallback(blob) {
110110
if (!fileItem) {
111111
return;
112112
}
113113
fileItem._file = blob;
114-
fileItem.file = file;
115114
fileItem.upload();
116115
return;
117116
}

ppmessage/ppkefu/ppkefu/www/js/controllers/contact-list.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ function ($scope, $timeout, $rootScope, $stateParams, yvSys, yvUser, yvLink, yvB
3737
});
3838
}
3939

40-
$scope.$on("event:online", function(event, params) {
41-
console.log("receive online message in contact-list");
42-
//params.type: online, params.online: true/false, params.user_uuid: user_uuid
43-
console.log("params %o", params);
44-
//FIXME: should load contact online which already set in yvObject
45-
});
46-
4740
}
4841

4942
_init();

0 commit comments

Comments
 (0)