Skip to content

Commit

Permalink
Merge pull request #6 from learning-layers/integration
Browse files Browse the repository at this point in the history
Integration
  • Loading branch information
pjotrsavitski committed Nov 26, 2014
2 parents a2c689d + b899dac commit 8c91348
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
4 changes: 4 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,7 @@ label.notBoldLabel {
position: relative;
}

.widgetHidden {
display: none;
}

17 changes: 13 additions & 4 deletions js/view/AppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ define(['logger', 'tracker', 'backbone', 'jquery', 'voc','underscore',
tagName: 'fieldset',
circleRenameModalView: this.circleRenameModalView
});

if( widgetView.isBrowse() ) {
versionElem.prepend(widgetView.$el);
}else if( widgetView.isOrganize() ) {
Expand Down Expand Up @@ -143,7 +142,7 @@ define(['logger', 'tracker', 'backbone', 'jquery', 'voc','underscore',
if( version === this.model.get(Voc.currentVersion)) {
this.show(version);
} else {
versionElem.css('visibility', 'hidden');
versionElem.addClass('widgetHidden');
}
},
show: function(version) {
Expand All @@ -156,13 +155,23 @@ define(['logger', 'tracker', 'backbone', 'jquery', 'voc','underscore',
AppLog.debug('showing', version.getSubject());

var that= this;
this.widgetFrame.children().css('visibility', 'hidden');
this.widgetFrame.children().addClass('widgetHidden');
AppLog.debug('hide' , this.widgetFrame.children());
var element = this.widgetFrame.children('*[about="'+version.getSubject()+'"]');
element.css('visibility', 'visible');
element.removeClass('widgetHidden');
element.detach();
this.widgetFrame.prepend(element);

// This force redraws current timeline element.
// This happends due to elements being hidden initially.
_.each(this.widgetViews, function(widget) {
if ( widget.model.get(Voc.belongsToVersion) === version ) {
if ( widget.isBrowse() && widget.view.timeline ) {
widget.view.timeline.redraw();
}
}
});

},
browseCurrentBrowseWidget: function(entity) {
var version = this.model.get(Voc.currentVersion);
Expand Down
6 changes: 5 additions & 1 deletion js/view/LoginFormView.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ define(['module', 'logger', 'underscore', 'jquery', 'backbone', 'voc', 'UserAuth
return false;
}

var url = this.oidcAuthorizationUrl + '?response_type=' + encodeURIComponent('id_token token') + '&client_id=' + this.oidcClientID + '&scope=' + encodeURIComponent('openid email profile');
var url = this.oidcAuthorizationUrl
+ '?response_type=' + encodeURIComponent('id_token token')
+ '&client_id=' + this.oidcClientID
+ '&scope=' + encodeURIComponent('openid email profile')
+ '&redirect_uri=' + encodeURIComponent(window.location.origin + window.location.pathname);

window.location.href = url;
},
Expand Down

0 comments on commit 8c91348

Please sign in to comment.