-
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 iCal Dashlet trunk to branches/1.0 and update version to 0.2
- Title set to 'Untitled Calendar' for feeds missing title and description - Support for Surf connectors using scheme remote:connectorName/path/to/asset - Config bar now hidden for non-admins in a site git-svn-id: https://share-extras.googlecode.com/svn/branches/1.0/iCal Feed Dashlet@1274 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
- Loading branch information
Showing
7 changed files
with
202 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
jar.name=ical-feed-dashlet.jar | ||
jar.name=ical-feed-dashlet-0.2.jar |
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
27 changes: 27 additions & 0 deletions
27
config/alfresco/site-webscripts/org/alfresco/components/dashlets/ical-feed.get.js
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 |
---|---|---|
@@ -1,5 +1,32 @@ | ||
function main() | ||
{ | ||
var hasConfigPermission = false; | ||
|
||
// Work out if the user has permission to configure the dashlet | ||
|
||
if (page.url.templateArgs.site != null) // Site or user dashboard? | ||
{ | ||
// Call the repository to see if the user is a site manager or not | ||
var obj = context.properties["memberships"]; | ||
if (!obj) | ||
{ | ||
var json = remote.call("/api/sites/" + page.url.templateArgs.site + "/memberships/" + stringUtils.urlEncode(user.name)); | ||
if (json.status == 200) | ||
{ | ||
obj = eval('(' + json + ')'); | ||
} | ||
} | ||
if (obj) | ||
{ | ||
hasConfigPermission = (obj.role == "SiteManager"); | ||
} | ||
} | ||
else | ||
{ | ||
hasConfigPermission = true; // User dashboard | ||
} | ||
|
||
model.hasConfigPermission = hasConfigPermission; | ||
} | ||
|
||
main(); |
1 change: 1 addition & 0 deletions
1
config/alfresco/site-webscripts/org/alfresco/components/dashlets/ical-feed.get.properties
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
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,5 @@ | ||
.dashlet.ical-feed-dashlet .body > div | ||
{ | ||
padding-left: 8px; | ||
padding-right: 8px; | ||
} |
Oops, something went wrong.