Convert ui-admin package to js#6911
Merged
Merged
Conversation
ggazzo
reviewed
May 9, 2017
Member
ggazzo
left a comment
There was a problem hiding this comment.
fix the packages/rocketchat-ui-admin/client/admin.js
and apply the same 'logic' for all files.
| languages() { | ||
| const languages = TAPi18n.getLanguages(); | ||
| let result = []; | ||
| Object.keys(languages).forEach((key) => { |
Member
There was a problem hiding this comment.
I think one .map() would be better
| if (!group) { | ||
| return; | ||
| } | ||
| const settings = RocketChat.settings.collectionPrivate.find({ |
| } | ||
| }).fetch(); | ||
| const sections = {}; | ||
| Object.keys(settings).forEach((key) => { |
| if (!_.isArray(i18nDefaultQuery)) { | ||
| i18nDefaultQuery = [i18nDefaultQuery]; | ||
| } | ||
| Object.keys(i18nDefaultQuery).forEach((key) => { |
| }); | ||
|
|
||
| group.sections = []; | ||
| Object.keys(sections).forEach((key) =>{ |
| return { | ||
| limit: 10, | ||
| rules: [ | ||
| { |
| return color.replace(/theme-color-/, '@'); | ||
| }, | ||
| showResetButton() { | ||
| const setting = TempSettings.findOne({ |
|
|
||
| Template.admin.events({ | ||
| 'change .input-monitor, keyup .input-monitor': _.throttle(function(e) { | ||
| let value; |
Member
There was a problem hiding this comment.
you can declare and set the value at same line.
| files = []; | ||
| } | ||
| } | ||
| const results = []; |
Member
There was a problem hiding this comment.
you dont need a result, coffee by default always returns the last thing.
| toastr.info(TAPi18n.__('Uploading_file')); | ||
| const reader = new FileReader(); | ||
| reader.readAsBinaryString(blob); | ||
| results.push(reader.onloadend = () => { |
Member
There was a problem hiding this comment.
it's wrong, see again.
reader.onloadend = =>
Meteor.call 'setAsset', reader.result, blob.type, @asset, (err, data) ->
if err?
handleError(err)
# toastr.error err.reason, TAPi18n.__ err.error
console.log err
return
Member
Author
rodrigok
requested changes
May 16, 2017
| const settingId = event.currentTarget.getAttribute('data-setting'); | ||
| const selectedRooms = instance.selectedRooms.get(); | ||
| selectedRooms[settingId] = _.reject(selectedRooms[settingId] || [], function(setting) { | ||
| return setting._id === docId; |
rodrigok
approved these changes
May 17, 2017
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@RocketChat/core