1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39:42 +02:00

github section fixed code handling

This commit is contained in:
Harvey Kandola 2016-11-12 13:50:42 -08:00
parent e7431954a0
commit deaa553205
4 changed files with 11 additions and 5 deletions

View file

@ -43,7 +43,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
pageId: page.get('id'),
showMilestones: false,
showIssues: false,
showCommits: false,
showCommits: true,
};
try {
@ -58,14 +58,19 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
config.showCommits = metaConfig.showCommits;
} catch (e) {}
if (_.isUndefined(config.showCommits)) {
config.showCommits = true;
}
self.set('config', config);
self.set('config.pageId', page.get('id'));
// On auth callback capture code
let code = window.location.search;
code = code.replace("?mode=edit", "");
if (is.not.undefined(code) && is.not.null(code) && is.not.empty(code) && code !== "") {
let tok = code.replace("?mode=edit&code=", "");
let tok = code.replace("&code=", "");
self.get('sectionService').fetch(page, "saveSecret", { "token": tok })
.then(function () {
self.send('authStage2');
@ -120,7 +125,6 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
$('#branch-since').datetimepicker();
this.set('initDateTimePicker', "Done");
}
},
getOrgReposLists() {

View file

@ -25,7 +25,8 @@ export default Ember.Controller.extend(NotifierMixin, {
let meta = {
documentId: this.get('model.document.id'),
rawBody: "",
config: ""
config: "",
externaleSource: true
};
let model = {

View file

@ -80,7 +80,6 @@
list-style: none;
cursor: pointer;
padding: 20px;
float: left;
@include ease-in();
&:hover {

View file

@ -18,8 +18,10 @@
<div class="github-view">
{{input id="show-milestone" checked=config.showMilestones type="checkbox"}}
<label>Show Milestones</label>
<br/>
{{input id="show-issues" checked=config.showIssues type="checkbox"}}
<label>Show Issues</label>
<br/>
{{input id="show-commits" checked=config.showCommits type="checkbox" }}
<label>Show Commits</label>
</div>