Commit 6f9878235cda5f676ed538c060104bd4068bcfd7

Authored by Ahmed Owian
1 parent ad427ea887
Exists in master

Added to /alfresco-skype-share-amp/src/main/resources/alfresco/web-extension/sit…

…e-webscripts/org/alfresco/skype
share-amp/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/skype/skype.get.desc.xml
... ... @@ -0,0 +1,7 @@
  1 +<webscript>
  2 + <shortname>Skype</shortname>
  3 + <description>Skype Integration</description>
  4 + <family>Share</family>
  5 + <format default="json" />
  6 + <url>/skype</url>
  7 +</webscript>
0 8 \ No newline at end of file
... ...
share-amp/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/skype/skype.get.js
... ... @@ -0,0 +1,25 @@
  1 +function main()
  2 +{
  3 + var profileId = args.userid;
  4 + if (profileId != null)
  5 + {
  6 + // load user details for the profile from the repo
  7 + var userObj = user.getUser(profileId);
  8 + if (userObj != null)
  9 + {
  10 + model.profile = userObj;
  11 + }
  12 + else
  13 + {
  14 + // fallback if unable to get user details
  15 + model.profile = user.getUser(user.id);
  16 + }
  17 + }
  18 + else
  19 + {
  20 + // if no profile specified, must be current user
  21 + model.profile = user.getUser(user.id);
  22 + }
  23 +};
  24 +
  25 +main();
0 26 \ No newline at end of file
... ...
share-amp/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/skype/skype.get.json.ftl
... ... @@ -0,0 +1,4 @@
  1 +{
  2 + "userId":"${profile.id}",
  3 + "skypeId":"${profile.skype}"
  4 +}
0 5 \ No newline at end of file
... ...