-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
…nto rocketchat-lib
- Loading branch information
Showing
160 changed files
with
4,424 additions
and
2,095 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
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
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
14 changes: 0 additions & 14 deletions
14
packages/rocketchat-channel-settings-mail-messages/client/lib/startup.coffee
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/rocketchat-channel-settings-mail-messages/client/lib/startup.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import resetSelection from '../resetSelection'; | ||
Meteor.startup(() => { | ||
RocketChat.ChannelSettings.addOption({ | ||
group: ['room'], | ||
id: 'mail-messages', | ||
template: 'channelSettingsMailMessages', | ||
validation() { | ||
return RocketChat.authz.hasAllPermission('mail-messages'); | ||
} | ||
}); | ||
RocketChat.callbacks.add('roomExit', () => resetSelection(false), RocketChat.callbacks.priority.MEDIUM, 'room-exit-mail-messages'); | ||
}); |
11 changes: 11 additions & 0 deletions
11
packages/rocketchat-channel-settings-mail-messages/client/resetSelection.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default function resetSelection(reset) { | ||
const [el] = $('.messages-box'); | ||
if (!el) { | ||
return; | ||
} | ||
const view = Blaze.getView(el); | ||
if (view && typeof view.templateInstance === 'function') { | ||
const {resetSelection} = view.templateInstance(); | ||
typeof resetSelection === 'function' && resetSelection(reset); | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
...rocketchat-channel-settings-mail-messages/client/views/channelSettingsMailMessages.coffee
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...ges/rocketchat-channel-settings-mail-messages/client/views/channelSettingsMailMessages.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import resetSelection from '../resetSelection'; | ||
|
||
Template.channelSettingsMailMessages.helpers({ | ||
canSendEmail() { | ||
return FlowRouter.getRouteName() !== 'admin-rooms'; | ||
} | ||
}); | ||
|
||
Template.channelSettingsMailMessages.events({ | ||
'click button.mail-messages'() { | ||
Session.set('channelSettingsMailMessages', Session.get('openedRoom')); | ||
this.tabBar.setTemplate('mailMessagesInstructions'); | ||
resetSelection(true); | ||
} | ||
}); | ||
|
||
Template.channelSettingsMailMessages.onCreated(() =>resetSelection(false)); |
126 changes: 0 additions & 126 deletions
126
...es/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.coffee
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.