History panel: display error message when anon user tries to create a new history, do not re-render; pack scripts

This commit is contained in:
Carl Eberhard
2013-11-11 11:48:28 -05:00
parent b0f58f837c
commit 0d2ee886fc
3 changed files with 6 additions and 2 deletions
@@ -238,6 +238,10 @@ var HistoryPanel = Backbone.View.extend( LoggableMixin ).extend(
/** creates a new history on the server and sets it as the user's current history */
createNewHistory : function( attributes ){
if( !Galaxy || !Galaxy.currUser || Galaxy.currUser.isAnonymous() ){
this.displayMessage( 'error', _l( 'You must be logged in to create histories' ) );
return $.when();
}
var panel = this,
historyFn = function(){
// get history data from posting a new history (and setting it to current)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long