history panel: remove display, edit, and delete buttons from hdas in the new state; pack scripts

This commit is contained in:
Carl Eberhard
2013-03-12 16:14:37 -04:00
parent 807dce06e5
commit 2aefbcdcd3
4 changed files with 7 additions and 5 deletions
+1
View File
@@ -201,6 +201,7 @@ var HDABaseView = BaseView.extend( LoggableMixin ).extend(
// don't show display if not viewable or not accessible
// (do show if in error, running)
if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NEW )
|| ( !this.model.get( 'accessible' ) ) ){
this.displayButton = null;
return null;
+4 -3
View File
@@ -99,8 +99,8 @@ var HDAEditView = HDABaseView.extend( LoggableMixin ).extend(
// don't show edit while uploading, in-accessible
// DO show if in error (ala previous history panel)
//TODO??: not viewable/accessible are essentially the same (not viewable set from accessible)
if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.UPLOAD )
//|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR )
if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NEW )
|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.UPLOAD )
|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
|| ( !this.model.get( 'accessible' ) ) ){
this.editButton = null;
@@ -136,7 +136,8 @@ var HDAEditView = HDABaseView.extend( LoggableMixin ).extend(
_render_deleteButton : function(){
// don't show delete if...
//TODO??: not viewable/accessible are essentially the same (not viewable set from accessible)
if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NEW )
|| ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE )
|| ( !this.model.get( 'accessible' ) ) ){
this.deleteButton = null;
return null;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long