mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Move thumbnail list view to shared ui elements
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
/** This class renders the selection grid. */
|
||||
define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-tabs' ], function( Utils, Ui, Tabs ) {
|
||||
var View = Backbone.View.extend({
|
||||
events : {
|
||||
'click .ui-thumbnails-item' : '_onclick',
|
||||
'dblclick .ui-thumbnails-item' : '_ondblclick'
|
||||
},
|
||||
|
||||
initialize : function( options ) {
|
||||
this.model = options.model || new Backbone.Model( options );
|
||||
this.collection = new Backbone.Collection( this.model.get( 'items' ) );
|
||||
this.tabs = new Tabs.View( {} );
|
||||
this.setElement( this.tabs.$el.addClass( 'ui-thumbnails' ) );
|
||||
this.render();
|
||||
this.listenTo( this.model, 'change', this.render, this );
|
||||
this.listenTo( this.collection, 'change', this.render, this );
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.first = null;
|
||||
this.tabs.delAll();
|
||||
this._renderDefault();
|
||||
this._renderList();
|
||||
},
|
||||
|
||||
_renderDefault: function() {
|
||||
var self = this;
|
||||
var index = [];
|
||||
var title_length = 20;
|
||||
var $el = $( '<div/>' ).addClass( 'ui-thumbnails-grid' );
|
||||
this.collection.each( function( model ) {
|
||||
if ( model.get( 'keywords' ).indexOf( 'default' ) !== -1 ) {
|
||||
var title = model.get( 'title' );
|
||||
$el.append( $( self._templateThumbnailItem( {
|
||||
id : model.id,
|
||||
title : title.length < title_length ? title : title.substr( 0, title_length ) + '...',
|
||||
title_icon : model.get( 'title_icon' ),
|
||||
url : model.get( 'url' )
|
||||
})).tooltip( { title: model.get( 'description' ), placement: 'bottom' } ) );
|
||||
}
|
||||
});
|
||||
if ( $el.children().length > 0 ) {
|
||||
this.tabs.add( { id: Utils.uid(), title: self.model.get( 'title_default' ), $el: $el } );
|
||||
}
|
||||
},
|
||||
|
||||
_renderList: function() {
|
||||
var self = this;
|
||||
if ( this.collection.length > 0 ) {
|
||||
this.first = this.first || this.collection.first().id;
|
||||
var $el = $( '<div/>' ).addClass( 'ui-thumbnails-grid' );
|
||||
this.collection.each( function( model ) {
|
||||
$el.append( self._templateRegularItem( model.attributes ) );
|
||||
});
|
||||
this.tabs.add( { id: Utils.uid(), title: 'List of available visualizations', $el: $el } );
|
||||
}
|
||||
},
|
||||
|
||||
/** Set/Get value */
|
||||
value: function( new_value ) {
|
||||
if ( new_value !== undefined ) {
|
||||
new_value = new_value == '__first' ? this.first : new_value;
|
||||
var before = this.$( '.ui-thumbnail-current' ).attr( 'value' );
|
||||
this.$( '.ui-thumbnail-current' ).removeClass( 'ui-thumbnail-current' );
|
||||
this.$( '[value="' + new_value + '"]' ).addClass( 'ui-thumbnail-current' );
|
||||
var after = this.$( '.ui-thumbnail-current' ).attr( 'value' );
|
||||
var change_handler = this.model.get( 'onchange' );
|
||||
after != before && change_handler && change_handler( after );
|
||||
}
|
||||
return this.$( '.ui-thumbnail-current' ).attr( 'value' );
|
||||
},
|
||||
|
||||
/** Add click handler */
|
||||
_onclick: function( e ) {
|
||||
this.value( $( e.target ).closest( '.ui-thumbnails-item' ).attr( 'value' ) );
|
||||
},
|
||||
|
||||
/** Add double click handler */
|
||||
_ondblclick: function( e ) {
|
||||
this.model.get( 'ondblclick' ) && this.model.get( 'ondblclick' )( this.value() );
|
||||
},
|
||||
|
||||
/* Thumbnail template with image */
|
||||
_templateThumbnailItem: function( options ) {
|
||||
return '<div class="ui-thumbnails-item ui-thumbnails-item-float" value="' + options.id + '">' +
|
||||
'<img class="ui-thumbnails-image" src="' + options.url + '">' +
|
||||
'<div class="ui-thumbnails-title ui-form-info">' +
|
||||
'<span class="fa ' + options.title_icon + '"/>' + options.title +
|
||||
'</div>' +
|
||||
'<div>';
|
||||
},
|
||||
|
||||
/* Thumbnail template with image and description */
|
||||
_templateRegularItem: function( options ) {
|
||||
return '<div class="ui-thumbnails-item" value="' + options.id + '">' +
|
||||
'<table>' +
|
||||
'<tr>' +
|
||||
'<td>' +
|
||||
'<img class="ui-thumbnails-image" src="' + options.url + '">' +
|
||||
'</td>' +
|
||||
'<td>' +
|
||||
'<div class="ui-thumbnails-description-title ui-form-info">' + options.title + '</div>' +
|
||||
'<div class="ui-thumbnails-description-text ui-form-info">' + options.description + '</div>' +
|
||||
'</td>' +
|
||||
'</tr>' +
|
||||
'<div>';
|
||||
}
|
||||
});
|
||||
|
||||
return { View: View }
|
||||
});
|
||||
@@ -200,6 +200,48 @@
|
||||
}
|
||||
}
|
||||
|
||||
// thumbnails
|
||||
.ui-thumbnails {
|
||||
margin-bottom: 80px;
|
||||
.ui-thumbnails-grid {
|
||||
.ui-thumbnails-item {
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
border-radius:5px;
|
||||
.ui-thumbnails-title {
|
||||
text-align: center;
|
||||
font-size: 0.9em;
|
||||
word-wrap: break-work;
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
}
|
||||
.ui-thumbnails-image {
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
height: 86px;
|
||||
}
|
||||
.ui-thumbnails-description-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui-thumbnails-description-text {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
.ui-thumbnail-current {
|
||||
border-color:#66afe9;
|
||||
background-color:#EEEEFF;
|
||||
outline:0;
|
||||
-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
||||
box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
||||
}
|
||||
.ui-thumbnails-item-float {
|
||||
float: left;
|
||||
height: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tables
|
||||
.ui-table {
|
||||
&:extend(.grid);
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.charts-types .nav-tabs {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.charts-description-image {
|
||||
width: 50px;
|
||||
height: 43px;
|
||||
@@ -50,46 +46,6 @@
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.charts-grid .item {
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
border-radius:5px;
|
||||
}
|
||||
.charts-grid .item-float {
|
||||
float: left;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.charts-grid .title {
|
||||
text-align: center;
|
||||
font-size: 0.9em;
|
||||
word-wrap: break-work;
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.charts-grid .header {
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
padding-bottom: 10px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.charts-grid .current {
|
||||
border-color:#66afe9;
|
||||
background-color:#EEEEFF;
|
||||
outline:0;
|
||||
-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
||||
box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
||||
}
|
||||
|
||||
.charts-grid .image {
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
height: 86px;
|
||||
}
|
||||
|
||||
.charts-viewport {
|
||||
height: inherit;
|
||||
min-height: 50px;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* The charts editor holds the tabs for selecting chart types, chart configuration
|
||||
* and data group selections.
|
||||
*/
|
||||
define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils', 'plugin/views/settings', 'plugin/views/groups', 'plugin/views/types' ],
|
||||
function( Tabs, Ui, Portlet, Utils, SettingsView, GroupsView, TypesView ) {
|
||||
define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'mvc/ui/ui-thumbnails', 'utils/utils', 'plugin/views/settings', 'plugin/views/groups' ],
|
||||
function( Tabs, Ui, Portlet, Thumbnails, Utils, SettingsView, GroupsView ) {
|
||||
return Backbone.View.extend({
|
||||
initialize: function( app, options ){
|
||||
var self = this;
|
||||
@@ -35,8 +35,21 @@ define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils'
|
||||
});
|
||||
|
||||
// grid with chart types
|
||||
this.types = new TypesView( app, {
|
||||
onchange : function( chart_type ) {
|
||||
this.types = new Thumbnails.View({
|
||||
title_default : 'Suggested visualizations',
|
||||
title_others : 'List of available visualizations',
|
||||
items : _.map( this.app.types, function( type, type_id ) {
|
||||
return {
|
||||
id : type_id,
|
||||
keywords : type.keywords,
|
||||
title : type.title + ' (' + type.library + ')',
|
||||
title_icon : type.zoomable && 'fa-search-plus',
|
||||
url : repository_root + '/visualizations/' + self.app.split( type_id ) + '/logo.png',
|
||||
description : type.description
|
||||
}
|
||||
}),
|
||||
ondblclick : function( chart_id ) { self._drawChart() },
|
||||
onchange : function( chart_type ) {
|
||||
var chart_definition = self.app.types[ chart_type ];
|
||||
if ( !chart_definition ) {
|
||||
self.tabs.hideTab( 'settings' );
|
||||
@@ -53,9 +66,6 @@ define( [ 'mvc/ui/ui-tabs', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet', 'utils/utils'
|
||||
self.message.model.set( 'message', '' );
|
||||
console.debug( 'editor::onchange() - Switched visualization type.' );
|
||||
}
|
||||
},
|
||||
ondblclick : function( chart_id ) {
|
||||
self._drawChart();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
/** This class renders the chart type selection grid. */
|
||||
define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-tabs' ], function( Utils, Ui, Tabs ) {
|
||||
return Backbone.View.extend({
|
||||
events : {
|
||||
'click .item' : '_onclick',
|
||||
'dblclick .item' : '_ondblclick'
|
||||
},
|
||||
|
||||
initialize : function( app, options ) {
|
||||
var self = this;
|
||||
this.app = app;
|
||||
this.options = Utils.merge( options, this.optionsDefault );
|
||||
this.tabs = new Tabs.View( {} );
|
||||
this.setElement( this.tabs.$el.addClass( 'charts-types' ) );
|
||||
this.render();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.first = null;
|
||||
this.tabs.delAll();
|
||||
this._renderDefault();
|
||||
this._renderList();
|
||||
},
|
||||
|
||||
_renderDefault: function() {
|
||||
var self = this;
|
||||
var index = [];
|
||||
var title_length = 20;
|
||||
var $el = $( '<div/>' ).addClass( 'charts-grid' );
|
||||
_.each( this.app.types, function( type, type_id ) {
|
||||
if ( type.keywords.indexOf( 'default' ) !== -1 ) {
|
||||
var title = type.title.length < title_length ? type.title : type.title.substr( 0, title_length ) + '...';
|
||||
$el.append( $( self._templateThumbnailItem( {
|
||||
id : type_id,
|
||||
title : ( type.zoomable ? '<span class="fa fa-search-plus"/>' : '' ) + title + ' (' + type.library + ')',
|
||||
url : repository_root + '/visualizations/' + self.app.split( type_id ) + '/logo.png'
|
||||
})).tooltip( { title: type.description, placement: 'bottom' } ) );
|
||||
}
|
||||
});
|
||||
if ( $el.children().length > 0 ) {
|
||||
this.tabs.add( { id: Utils.uid(), title: 'Suggested visualizations', $el: $el } );
|
||||
}
|
||||
},
|
||||
|
||||
_renderList: function() {
|
||||
var self = this;
|
||||
var index = [];
|
||||
_.each( this.app.types, function( type, type_id ) {
|
||||
index.push( {
|
||||
id : type_id,
|
||||
title : ( type.zoomable ? '<span class="fa fa-search-plus"/>' : '' ) + type.title + ' (' + type.library + ')',
|
||||
description : type.description || 'No description available.',
|
||||
url : repository_root + '/visualizations/' + self.app.split( type_id ) + '/logo.png'
|
||||
});
|
||||
});
|
||||
if ( index.length > 0 ) {
|
||||
this.first = this.first || index[ 0 ].id;
|
||||
var $el = $( '<div/>' ).addClass( 'charts-grid' );
|
||||
_.each( index, function( d, i ) {
|
||||
$el.append( self._templateRegularItem( d ) );
|
||||
});
|
||||
this.tabs.add( { id: Utils.uid(), title: 'List of available visualizations', $el: $el } );
|
||||
}
|
||||
},
|
||||
|
||||
/** Set/Get selected chart type */
|
||||
value: function( new_value ) {
|
||||
if ( new_value !== undefined ) {
|
||||
new_value = new_value == '__first' ? this.first : new_value;
|
||||
var before = this.$( '.current' ).attr( 'chart_id' );
|
||||
this.$( '.current' ).removeClass( 'current' );
|
||||
this.$( '[chart_id="' + new_value + '"]' ).addClass( 'current' );
|
||||
var after = this.$( '.current' ).attr( 'chart_id' );
|
||||
if ( after != before && this.options.onchange ) {
|
||||
this.options.onchange( after );
|
||||
}
|
||||
}
|
||||
return this.$( '.current' ).attr( 'chart_id' );
|
||||
},
|
||||
|
||||
/** Add click handler */
|
||||
_onclick: function( e ) {
|
||||
this.value( $( e.target ).closest( '.item' ).attr( 'chart_id' ) );
|
||||
},
|
||||
|
||||
/** Add double click handler */
|
||||
_ondblclick: function( e ) {
|
||||
this.options.ondblclick && this.options.ondblclick( this.value() );
|
||||
},
|
||||
|
||||
/* Chart type template with image */
|
||||
_templateThumbnailItem: function( options ) {
|
||||
return '<div class="item item-float" chart_id="' + options.id + '">' +
|
||||
'<img class="image" src="' + options.url + '">' +
|
||||
'<div class="title ui-form-info">' + options.title + '</div>' +
|
||||
'<div>';
|
||||
},
|
||||
|
||||
/* Chart type template with image */
|
||||
_templateRegularItem: function( options ) {
|
||||
return '<div class="item" chart_id="' + options.id + '">' +
|
||||
'<table>' +
|
||||
'<tr>' +
|
||||
'<td>' +
|
||||
'<img class="image" src="' + options.url + '">' +
|
||||
'</td>' +
|
||||
'<td>' +
|
||||
'<div class="charts-description-title ui-form-info">' + options.title + '</div>' +
|
||||
'<div class="charts-description-text ui-form-info">' + options.description + '</div>' +
|
||||
'</td>' +
|
||||
'</tr>' +
|
||||
'<div>';
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ui-thumbnails.js","sources":["../../../src/mvc/ui/ui-thumbnails.js"],"names":["define","Utils","Ui","Tabs","View","Backbone","extend","events","click .ui-thumbnails-item","dblclick .ui-thumbnails-item","initialize","options","this","model","Model","collection","Collection","get","tabs","setElement","$el","addClass","render","listenTo","first","delAll","_renderDefault","_renderList","self","title_length","$","each","indexOf","title","append","_templateThumbnailItem","id","length","substr","title_icon","url","tooltip","placement","children","add","uid","_templateRegularItem","attributes","value","new_value","undefined","before","attr","removeClass","after","change_handler","_onclick","e","target","closest","_ondblclick","description"],"mappings":"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"}
|
||||
@@ -0,0 +1,2 @@
|
||||
define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs"],function(a,b,c){var d=Backbone.View.extend({events:{"click .ui-thumbnails-item":"_onclick","dblclick .ui-thumbnails-item":"_ondblclick"},initialize:function(a){this.model=a.model||new Backbone.Model(a),this.collection=new Backbone.Collection(this.model.get("items")),this.tabs=new c.View({}),this.setElement(this.tabs.$el.addClass("ui-thumbnails")),this.render(),this.listenTo(this.model,"change",this.render,this),this.listenTo(this.collection,"change",this.render,this)},render:function(){this.first=null,this.tabs.delAll(),this._renderDefault(),this._renderList()},_renderDefault:function(){var b=this,c=20,d=$("<div/>").addClass("ui-thumbnails-grid");this.collection.each(function(a){if(-1!==a.get("keywords").indexOf("default")){var e=a.get("title");d.append($(b._templateThumbnailItem({id:a.id,title:e.length<c?e:e.substr(0,c)+"...",title_icon:a.get("title_icon"),url:a.get("url")})).tooltip({title:a.get("description"),placement:"bottom"}))}}),d.children().length>0&&this.tabs.add({id:a.uid(),title:b.model.get("title_default"),$el:d})},_renderList:function(){var b=this;if(this.collection.length>0){this.first=this.first||this.collection.first().id;var c=$("<div/>").addClass("ui-thumbnails-grid");this.collection.each(function(a){c.append(b._templateRegularItem(a.attributes))}),this.tabs.add({id:a.uid(),title:"List of available visualizations",$el:c})}},value:function(a){if(void 0!==a){a="__first"==a?this.first:a;var b=this.$(".ui-thumbnail-current").attr("value");this.$(".ui-thumbnail-current").removeClass("ui-thumbnail-current"),this.$('[value="'+a+'"]').addClass("ui-thumbnail-current");var c=this.$(".ui-thumbnail-current").attr("value"),d=this.model.get("onchange");c!=b&&d&&d(c)}return this.$(".ui-thumbnail-current").attr("value")},_onclick:function(a){this.value($(a.target).closest(".ui-thumbnails-item").attr("value"))},_ondblclick:function(){this.model.get("ondblclick")&&this.model.get("ondblclick")(this.value())},_templateThumbnailItem:function(a){return'<div class="ui-thumbnails-item ui-thumbnails-item-float" value="'+a.id+'"><img class="ui-thumbnails-image" src="'+a.url+'"><div class="ui-thumbnails-title ui-form-info"><span class="fa '+a.title_icon+'"/>'+a.title+"</div><div>"},_templateRegularItem:function(a){return'<div class="ui-thumbnails-item" value="'+a.id+'"><table><tr><td><img class="ui-thumbnails-image" src="'+a.url+'"></td><td><div class="ui-thumbnails-description-title ui-form-info">'+a.title+'</div><div class="ui-thumbnails-description-text ui-form-info">'+a.description+"</div></td></tr><div>"}});return{View:d}});
|
||||
//# sourceMappingURL=../../../maps/mvc/ui/ui-thumbnails.js.map
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user