-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes made to the calcontroller.js file for sharing multiple tokens #765
Changes from 3 commits
df74643
356ea35
b9accfc
630a584
7547102
2f18a6a
c40daa2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,15 +140,18 @@ app.controller('CalController', ['$scope', 'Calendar', 'CalendarService', 'VEven | |
$scope.$apply(); | ||
}); | ||
} else { | ||
$scope.calendarsPromise = CalendarService.getPublicCalendar(constants.publicSharingToken).then(function(calendar) { | ||
constants.publicSharingToken.split(".").forEach(token=> | ||
{ | ||
$scope.calendarsPromise = CalendarService.getPublicCalendar(token).then(function(calendar) { | ||
$scope.calendars = [calendar]; | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sorry, but the indentation is still wrong. This should be indented by one tab. |
||
is.loading = false; | ||
// TODO - scope.apply should not be necessary here | ||
$scope.$apply(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please only call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two lines are still called for each calendar. Please only call them once all calendars loaded. To make sure they are called after all are done, you need to create an array with all For more information about Promise functions see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Furthermore the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will look into the same :) |
||
}).catch((reason) => { | ||
}).catch((reason) => { | ||
angular.element('#header-right').css('display', 'none'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems to be indent issues here. Does your editor understands .editorconfig files (maybe with a plugin) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tcitworld I am using sublime text to edit the code, can you please explain why my pull request can't be merged :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Install this package : https://packagecontrol.io/packages/EditorConfig There's a few indenting issues I see (when opening a bracket, add a new line indented). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have installed the package and restarted the sublime text but still cannot see any changes made in the indentation of the code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't use Sublime Text for a while, doesn't it shows some errors somehow ? Don't bother too much for this, I'll fix these kind of typos afterwards. |
||
angular.element('#emptycontent-container').css('display', 'block'); | ||
}); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove spaces here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove spaces added at the end of the line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it alright now or do I further look into the indentation ,please tell :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @arunikayadav42 No, its still there. Remove spaces added at the end of the line. |
||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spaces before and after token, and I think it should be inside some parenthesis.