Removed subgroups from coffee files

pull/190/head
Marcelo Schmidt 11 years ago
parent 0b1601b098
commit 9b10c8a536
  1. 8
      client/lib/accounts.coffee
  2. 2
      client/methods/hideRoom.coffee
  3. 2
      client/methods/leaveRoom.coffee
  4. 2
      client/methods/saveRoomName.coffee
  5. 2
      client/methods/sendMessage.coffee
  6. 2
      client/methods/toogleFavorite.coffee
  7. 2
      client/methods/typingStatus.coffee
  8. 2
      client/methods/updateMessage.coffee
  9. 14
      client/views/app/chatMessageDashboard.coffee
  10. 10
      client/views/app/chatWindowDashboard.coffee
  11. 2
      client/views/app/sideNav/channels.coffee
  12. 2
      client/views/app/sideNav/privateGroups.coffee
  13. 6
      client/views/app/sideNav/userStatus.coffee
  14. 2
      client/views/avatar/prompt.coffee
  15. 2
      client/views/login/footer.coffee
  16. 22
      client/views/login/form.coffee
  17. 2
      client/views/login/services.coffee

@ -1,16 +1,16 @@
Accounts.onEmailVerificationLink (token, done) ->
Accounts.verifyEmail token, (error) ->
if not error?
alert(t('accounts.Email_verified'))
alert(t('Email_verified'))
done()
Accounts.onResetPasswordLink (token, done) ->
newPassword = prompt(t('accounts.New_password'))
newPassword = prompt(t('New_password'))
Accounts.resetPassword token, newPassword, (error) ->
if error?
console.log error
alert(t('accounts.Error_changing_password'))
alert(t('Error_changing_password'))
else
alert('accounts.Password_changed')
alert('Password_changed')
done()

@ -1,7 +1,7 @@
Meteor.methods
hideRoom: (rid) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
ChatSubscription.update
rid: rid

@ -1,7 +1,7 @@
Meteor.methods
leaveRoom: (rid) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
ChatSubscription.remove
rid: rid

@ -1,7 +1,7 @@
Meteor.methods
saveRoomName: (rid, name) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
room = ChatRoom.findOne rid

@ -1,7 +1,7 @@
Meteor.methods
sendMessage: (message) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
Tracker.nonreactive ->

@ -1,7 +1,7 @@
Meteor.methods
toogleFavorite: (rid, f) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
ChatSubscription.update
rid: rid

@ -1,7 +1,7 @@
Meteor.methods
typingStatus: (rid, start) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
filter =
t: 't'

@ -1,7 +1,7 @@
Meteor.methods
updateMessage: (message) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('general.User_logged_out')
throw new Meteor.Error 203, t('User_logged_out')
Tracker.nonreactive ->

@ -24,13 +24,13 @@ Template.chatMessageDashboard.helpers
message: ->
switch this.t
when 'r' then t('chatMessageDashboard.Room_name_changed', { room_name: this.msg, user_by: Session.get('user_' + this.u._id + '_name') }) + '.'
when 'au' then t('chatMessageDashboard.User_added_by', { user_added: this.msg, user_by: Session.get('user_' + this.u._id + '_name') })
when 'ru' then t('chatMessageDashboard.User_removed_by', { user_removed: this.msg, user_by: Session.get('user_' + this.u._id + '_name') })
when 'ul' then t('chatMessageDashboard.User_left', this.msg)
when 'nu' then t('chatMessageDashboard.User_added', this.msg)
when 'wm' then t('chatMessageDashboard.Welcome', this.msg)
when 'uj' then t('chatMessageDashboard.User_joined_channel', { user: this.msg })
when 'r' then t('Room_name_changed', { room_name: this.msg, user_by: Session.get('user_' + this.u._id + '_name') }) + '.'
when 'au' then t('User_added_by', { user_added: this.msg, user_by: Session.get('user_' + this.u._id + '_name') })
when 'ru' then t('User_removed_by', { user_removed: this.msg, user_by: Session.get('user_' + this.u._id + '_name') })
when 'ul' then t('User_left', this.msg)
when 'nu' then t('User_added', this.msg)
when 'wm' then t('Welcome', this.msg)
when 'uj' then t('User_joined_channel', { user: this.msg })
else this.msg
time: ->

@ -7,11 +7,11 @@ Template.chatWindowDashboard.helpers
tAddUsers: ->
console.log 'chatWindowDashboard.helpers tAddUsers' if window.rocketDebug
return t('chatWindowDashboard.Add_users')
return t('Add_users')
tQuickSearch: ->
console.log 'chatWindowDashboard.helpers tQuickSearch' if window.rocketDebug
return t('chatWindowDashboard.Quick_Search')
return t('Quick_Search')
favorite: ->
console.log 'chatWindowDashboard.helpers favorite' if window.rocketDebug
@ -270,9 +270,9 @@ Template.chatWindowDashboard.helpers
seeAll: ->
console.log 'chatWindowDashboard.helpers seeAll' if window.rocketDebug
if Template.instance().showUsersOffline.get()
return t('chatWindowDashboard.See_only_online')
return t('See_only_online')
else
return t('chatWindowDashboard.See_all')
return t('See_all')
getPupupConfig: ->
console.log 'chatWindowDashboard.helpers getPupupConfig' if window.rocketDebug
@ -474,7 +474,7 @@ renameRoom = (rid, name) ->
if result
Session.set('editRoomTitle', false)
toastr.success t('chatWindowDashboard.Room_name_changed_successfully')
toastr.success t('Room_name_changed_successfully')
if error
toastr.error error.reason

@ -1,6 +1,6 @@
Template.channels.helpers
tRoomMembers: ->
return t('chatRooms.Members_placeholder')
return t('Members_placeholder')
rooms: ->
return ChatSubscription.find { t: { $in: ['c']}, f: { $ne: true } }, { sort: 't': 1, 'name': 1 }

@ -1,6 +1,6 @@
Template.privateGroups.helpers
tRoomMembers: ->
return t('chatRooms.Members_placeholder')
return t('Members_placeholder')
rooms: ->
return ChatSubscription.find { t: { $in: ['p']}, f: { $ne: true } }, { sort: 't': 1, 'name': 1 }
total: ->

@ -4,11 +4,11 @@ Template.userStatus.helpers
username = Meteor.user()?.username
switch Session.get('user_' + username + '_status')
when "away"
visualStatus = t("userStatus.away")
visualStatus = t("away")
when "busy"
visualStatus = t("userStatus.busy")
visualStatus = t("busy")
when "offline"
visualStatus = t("userStatus.invisible")
visualStatus = t("invisible")
return {
name: Session.get('user_' + username + '_name')
status: Session.get('user_' + username + '_status')

@ -36,7 +36,7 @@ Template.avatarPrompt.events
Meteor[loginWithService] serviceConfig, (error) ->
if error?.error is 'github-no-public-email'
alert t("loginServices.github_no_public_email")
alert t("github_no_public_email")
return
console.log error

@ -1,7 +1,7 @@
Template.loginFooter.helpers
LanguageVersion: ->
if Template.instance().languageVersion.get()
return TAPi18next.t('project:footer.Language_Version', { lng: Template.instance().languageVersion.get() })
return TAPi18next.t('project:Language_Version', { lng: Template.instance().languageVersion.get() })
Template.loginFooter.events
'click a.switch-language': (e, t) ->

@ -29,13 +29,13 @@ Template.loginForm.helpers
btnLoginSave: ->
switch Template.instance().state.get()
when 'register'
return t('general.Submit')
return t('Submit')
when 'login'
return t('general.Login')
return t('Login')
when 'email-verification'
return t('general.Send_confirmation_email')
return t('Send_confirmation_email')
when 'forgot-password'
return t('general.Reset_password')
return t('Reset_password')
Template.loginForm.events
'submit #login-card': (event, instance) ->
@ -49,14 +49,14 @@ Template.loginForm.events
if instance.state.get() is 'email-verification'
Meteor.call 'sendConfirmationEmail', formData.email, (err, result) ->
RocketChat.Button.reset(button)
toastr.success t('login.We_have_sent_registration_email')
toastr.success t('We_have_sent_registration_email')
instance.state.set 'login'
return
if instance.state.get() is 'forgot-password'
Meteor.call 'sendForgotPasswordEmail', formData.email, (err, result) ->
RocketChat.Button.reset(button)
toastr.success t('login.We_have_sent_password_email')
toastr.success t('We_have_sent_password_email')
instance.state.set 'login'
return
@ -65,7 +65,7 @@ Template.loginForm.events
RocketChat.Button.reset(button)
Meteor.loginWithPassword formData.email, formData.pass, (error) ->
if error?.error is 'no-valid-email'
toastr.success t('login.We_have_sent_registration_email')
toastr.success t('We_have_sent_registration_email')
instance.state.set 'login'
else
Router.go 'index'
@ -102,17 +102,17 @@ Template.loginForm.onCreated ->
if instance.state.get() isnt 'login'
unless formObj['email'] and /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]+\b/i.test(formObj['email'])
validationObj['email'] = t('login.Invalid_email')
validationObj['email'] = t('Invalid_email')
if instance.state.get() isnt 'forgot-password'
unless formObj['pass']
validationObj['pass'] = t('login.Invalid_pass')
validationObj['pass'] = t('Invalid_pass')
if instance.state.get() is 'register'
unless formObj['name']
validationObj['name'] = t('login.Invalid_name')
validationObj['name'] = t('Invalid_name')
if formObj['confirm-pass'] isnt formObj['pass']
validationObj['confirm-pass'] = t('login.Invalid_confirm_pass')
validationObj['confirm-pass'] = t('Invalid_confirm_pass')
$("#login-card input").removeClass "error"
unless _.isEmpty validationObj

@ -35,7 +35,7 @@ Template.loginServices.events
Meteor[loginWithService] serviceConfig, (error) ->
if error?.error is 'github-no-public-email'
alert t("loginServices.github_no_public_email")
alert t("github_no_public_email")
return
console.log error

Loading…
Cancel
Save