Issue#2995: Add custom video conference system

stable
Jesús Espino 2015-07-01 11:12:45 +02:00 committed by David Barragán Merino
parent 6556a1e20e
commit 13b23197b8
6 changed files with 26 additions and 9 deletions

View File

@ -5,6 +5,7 @@
### Features
- Ability to create single-line or multi-line custom fields. (thanks to [@artlepool](https://github.com/artlepool))
- Add custom videoconference system.
### Misc
- Improve performance: Show cropped images in timelines.

View File

@ -189,9 +189,10 @@ module.directive("tgProjectDefaultValues", ["$tgRepo", "$tgConfirm", "$tgLoading
ProjectModulesDirective = ($repo, $confirm, $loading, projectService) ->
link = ($scope, $el, $attrs) ->
form = $el.find("form").checksley()
submit = =>
form = $el.find("form").checksley()
return if not form.validate()
target = angular.element(".admin-functionalities a.button-green")
$loading.start(target)
@ -221,7 +222,7 @@ ProjectModulesDirective = ($repo, $confirm, $loading, projectService) ->
else
$el.find(".videoconference-attributes").addClass("hidden")
$scope.project.videoconferences = null
$scope.project.videoconferences_salt = ""
$scope.project.videoconferences_extra_data = ""
$scope.$watch "project", (project) ->
if project.videoconferences?

View File

@ -407,7 +407,12 @@
"MEETUP": "Meet Up",
"MEETUP_DESCRIPTION": "Choose your videoconference system. Even developers need face to face contact.",
"SELECT_VIDEOCONFERENCE": "Select a videoconference system",
"SALT_CHAT_ROOM": "If you want you can append a salt code to the name of the chat room"
"SALT_CHAT_ROOM": "If you want you can append a salt code to the name of the chat room",
"JITSI_CHAT_ROOM": "Jitsi",
"APPEARIN_CHAT_ROOM": "AppearIn",
"TALKY_CHAT_ROOM": "Talky",
"CUSTOM_CHAT_ROOM": "Custom",
"URL_CHAT_ROOM": "URL of your chat room"
},
"PROJECT_PROFILE": {
"PAGE_TITLE": "{{sectionName}} - Project profile - {{projectName}}",

View File

@ -81,14 +81,16 @@ class ProjectMenuController
baseUrl = "https://talky.io/"
else if @.project.get("videoconferences") == "jitsi"
baseUrl = "https://meet.jit.si/"
url = @.project.get("slug") + "-" + taiga.slugify(@.project.get("videoconferences_salt"))
url = @.project.get("slug") + "-" + taiga.slugify(@.project.get("videoconferences_extra_data"))
url = url.replace(/-/g, "")
return baseUrl + url
else if @.project.get("videoconferences") == "custom"
return @.project.get("videoconferences_extra_data")
else
return ""
if @.project.get("videoconferences_salt")
url = @.project.get("slug") + "-" + @.project.get("videoconferences_salt")
if @.project.get("videoconferences_extra_data")
url = @.project.get("slug") + "-" + @.project.get("videoconferences_extra_data")
else
url = @.project.get("slug")

View File

@ -63,7 +63,7 @@ describe "ProjectMenu", ->
it "videoconference url", () ->
project = Immutable.fromJS({
"videoconferences": "appear-in",
"videoconferences_salt": "123",
"videoconferences_extra_data": "123",
"slug": "project-slug"
})

View File

@ -86,8 +86,16 @@ div.wrapper(tg-project-modules, ng-controller="ProjectProfileController as ctrl"
div.videoconference-attributes.hidden
select(ng-model="project.videoconferences",
ng-options="e.id as e.name for e in [{'id':'appear-in', 'name':'AppearIn'},{'id':'jitsi', 'name': 'Jitsi'},{'id':'talky', 'name': 'Talky'}]")
ng-options="e.id as e.name|translate for e in [{'id':'appear-in', 'name':'ADMIN.MODULES.APPEARIN_CHAT_ROOM'},{'id':'jitsi', 'name': 'ADMIN.MODULES.JITSI_CHAT_ROOM'},{'id':'talky', 'name': 'ADMIN.MODULES.TALKY_CHAT_ROOM'},{'id':'custom', 'name': 'ADMIN.MODULES.CUSTOM_CHAT_ROOM'}]")
option(value="", translate="ADMIN.MODULES.SELECT_VIDEOCONFERENCE")
input(type="text", ng-model="project.videoconferences_salt",
input(ng-if="project.videoconferences && project.videoconferences != 'custom'",
type="text",
ng-model="project.videoconferences_extra_data",
data-maxlength="255",
placeholder="{{'ADMIN.MODULES.SALT_CHAT_ROOM' | translate}}")
input(ng-if="project.videoconferences == 'custom'",
type="text",
ng-model="project.videoconferences_extra_data",
data-maxlength="255",
placeholder="{{'ADMIN.MODULES.URL_CHAT_ROOM' | translate}}")
button.button-green.submit-button(type="submit", title="{{'COMMON.SAVE' | translate}}", translate="COMMON.SAVE")