Commit 4deefbf08a316b80e4bd0a27deb4d50ad20a5221

Authored by Jelena Cule
1 parent 4245359759
Exists in master

moved to different folder

share-amp/src/main/amp/config/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/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/skype/skype.get.js
... ... @@ -0,0 +1,25 @@
  1 +function main()
  2 +{
  3 + var profileId = page.url.templateArgs["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/amp/config/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
... ...