mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Avoid duplicate upload entries, revise modals, add tests
Revise styles Add more tests
This commit is contained in:
@@ -43,6 +43,7 @@ var PageLayoutView = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend({
|
||||
this.log( this + '.render:' );
|
||||
this.$el.attr( 'scroll', 'no' );
|
||||
this.$el.html( this.template( this.options ) );
|
||||
this.$el.append( this.modal.$el );
|
||||
|
||||
//TODO: no render on masthead, needs init each time
|
||||
Galaxy.masthead = this.masthead = new MASTHEAD.GalaxyMasthead( _.extend( this.options.config, {
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
define([], function() {
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
|
||||
// base element
|
||||
elMain: 'body',
|
||||
|
||||
// defaults options
|
||||
optionsDefault: {
|
||||
// defaults
|
||||
optionsDefault : {
|
||||
container : 'body',
|
||||
title : 'ui-modal',
|
||||
cls : 'ui-modal',
|
||||
body : '',
|
||||
backdrop : true,
|
||||
height : null,
|
||||
@@ -21,177 +18,164 @@ var View = Backbone.View.extend({
|
||||
buttonList: {},
|
||||
|
||||
// initialize
|
||||
initialize : function(options) {
|
||||
if (options){
|
||||
this._create(options);
|
||||
initialize: function( options ) {
|
||||
this.setElement( this._template() );
|
||||
this.options = _.defaults( options || {}, this.optionsDefault );
|
||||
$( this.options.container ).prepend( this.el );
|
||||
|
||||
// link elements
|
||||
this.$header = this.$( '.modal-header' );
|
||||
this.$dialog = this.$( '.modal-dialog' );
|
||||
this.$body = this.$( '.modal-body' );
|
||||
this.$footer = this.$( '.modal-footer' );
|
||||
this.$backdrop = this.$( '.modal-backdrop' );
|
||||
this.$buttons = this.$( '.buttons' );
|
||||
|
||||
// optional render
|
||||
options && this.render();
|
||||
},
|
||||
|
||||
/*
|
||||
Displays modal
|
||||
*/
|
||||
show: function( options ) {
|
||||
if ( options ) {
|
||||
this.options = _.defaults( options, this.optionsDefault );
|
||||
this.render();
|
||||
}
|
||||
if ( !this.visible ) {
|
||||
this.visible = true;
|
||||
this.$el.fadeIn( 'fast' );
|
||||
}
|
||||
},
|
||||
|
||||
// adds and displays a new frame/window
|
||||
show: function(options) {
|
||||
// create
|
||||
this.initialize(options);
|
||||
|
||||
// fix height
|
||||
if (this.options.height){
|
||||
this.$body.css('height', this.options.height);
|
||||
this.$body.css('overflow', 'hidden');
|
||||
} else {
|
||||
this.$body.css('max-height', $(window).height() / 2);
|
||||
}
|
||||
|
||||
// fix width
|
||||
if (this.options.width) {
|
||||
this.$dialog.css('width', this.options.width);
|
||||
}
|
||||
|
||||
// show
|
||||
if (this.visible) {
|
||||
this.$el.show();
|
||||
} else {
|
||||
this.$el.fadeIn('fast');
|
||||
}
|
||||
|
||||
// set visible flag
|
||||
this.visible = true;
|
||||
},
|
||||
|
||||
// hide
|
||||
hide: function( cancelled ) {
|
||||
/**
|
||||
* Hide modal
|
||||
*/
|
||||
hide: function( canceled ) {
|
||||
this.visible = false;
|
||||
this.$el.fadeOut('fast');
|
||||
if (this.options.closing_callback){
|
||||
this.options.closing_callback( cancelled );
|
||||
this.$el.fadeOut( 'fast' );
|
||||
this.options.closing_callback && this.options.closing_callback( canceled );
|
||||
},
|
||||
|
||||
/**
|
||||
* Render modal
|
||||
*/
|
||||
render: function() {
|
||||
var self = this;
|
||||
if (this.options.body == 'progress') {
|
||||
this.options.body = $( '<div class="progress progress-striped active">' +
|
||||
'<div class="progress-bar progress-bar-info" style="width:100%"/>' +
|
||||
'</div>' );
|
||||
}
|
||||
|
||||
// fix main content
|
||||
this.$el.removeClass().addClass( 'modal' ).addClass( this.options.cls );
|
||||
this.$header.find( '.title' ).html( this.options.title );
|
||||
this.$body.html( this.options.body );
|
||||
|
||||
// append buttons
|
||||
this.$buttons.empty();
|
||||
this.buttonList = {};
|
||||
if ( this.options.buttons ) {
|
||||
var counter = 0;
|
||||
$.each( this.options.buttons, function( name, callback ) {
|
||||
var $button = $( '<button/>' ).attr( 'id', 'button-' + counter++ ).text( name ).click( callback );
|
||||
self.$buttons.append( $button ).append( ' ' );
|
||||
self.buttonList[ name ] = $button;
|
||||
});
|
||||
} else {
|
||||
this.$footer.hide();
|
||||
}
|
||||
|
||||
// bind the ESC key and background click to hide() function
|
||||
$( document ).off( 'keyup.ui-modal' );
|
||||
if ( this.options.closing_events ) {
|
||||
$( document ).on( 'keyup.ui-modal', function( e ) {
|
||||
e.keyCode == 27 && self.hide( true );
|
||||
});
|
||||
this.$backdrop.off( 'click' ).on( 'click', function() { self.hide( true ) } );
|
||||
}
|
||||
|
||||
// configure background, separator line
|
||||
this.$backdrop[ this.options.backdrop && 'addClass' || 'removeClass' ]( 'in' );
|
||||
this.$header[ !this.options.title_separator && 'addClass' || 'removeClass' ]( 'no-separator' );
|
||||
|
||||
// fix dimensions
|
||||
if ( this.options.height ) {
|
||||
this.$body.css( 'height', this.options.height );
|
||||
this.$body.css( 'overflow', 'hidden' );
|
||||
} else {
|
||||
this.$body.css( 'max-height', $( window ).height() / 2 );
|
||||
}
|
||||
if ( this.options.width ) {
|
||||
this.$dialog.css( 'width', this.options.width );
|
||||
}
|
||||
},
|
||||
|
||||
// enable buttons
|
||||
enableButton: function(name) {
|
||||
var button_id = this.buttonList[name];
|
||||
this.$buttons.find('#' + button_id).prop('disabled', false);
|
||||
/**
|
||||
* Returns the button dom
|
||||
* @param{String} name - Button name/title
|
||||
*/
|
||||
getButton: function( name ) {
|
||||
return this.buttonList[ name ];
|
||||
},
|
||||
|
||||
// disable buttons
|
||||
disableButton: function(name) {
|
||||
var button_id = this.buttonList[name];
|
||||
this.$buttons.find('#' + button_id).prop('disabled', true);
|
||||
/**
|
||||
* Enables a button
|
||||
* @param{String} name - Button name/title
|
||||
*/
|
||||
enableButton: function( name ) {
|
||||
this.getButton( name ).prop( 'disabled', false );
|
||||
},
|
||||
|
||||
// show buttons
|
||||
showButton: function(name) {
|
||||
var button_id = this.buttonList[name];
|
||||
this.$buttons.find('#' + button_id).show();
|
||||
/**
|
||||
* Disables a button
|
||||
* @param{String} name - Button name/title
|
||||
*/
|
||||
disableButton: function( name ) {
|
||||
this.getButton( name ).prop( 'disabled', true );
|
||||
},
|
||||
|
||||
// hide buttons
|
||||
hideButton: function(name) {
|
||||
var button_id = this.buttonList[name];
|
||||
this.$buttons.find('#' + button_id).hide();
|
||||
/**
|
||||
* Show a button
|
||||
* @param{String} name - Button name/title
|
||||
*/
|
||||
showButton: function( name ) {
|
||||
this.getButton( name ).show();
|
||||
},
|
||||
|
||||
// get button
|
||||
getButton: function(name) {
|
||||
var button_id = this.buttonList[name];
|
||||
return this.$buttons.find('#' + button_id);
|
||||
/**
|
||||
* Hide a button
|
||||
* @param{String} name - Button name/title
|
||||
*/
|
||||
hideButton: function( name ) {
|
||||
this.getButton( name ).hide();
|
||||
},
|
||||
|
||||
// returns scroll top for body element
|
||||
/**
|
||||
* Returns scroll top for body element
|
||||
*/
|
||||
scrollTop: function() {
|
||||
return this.$body.scrollTop();
|
||||
},
|
||||
|
||||
// create
|
||||
_create: function(options) {
|
||||
// link this
|
||||
var self = this;
|
||||
|
||||
// configure options
|
||||
this.options = _.defaults(options, this.optionsDefault);
|
||||
|
||||
// check for progress bar request
|
||||
if (this.options.body == 'progress'){
|
||||
this.options.body = $('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"></div></div>');
|
||||
}
|
||||
|
||||
// remove former element
|
||||
if (this.$el) {
|
||||
// remove element
|
||||
this.$el.remove();
|
||||
|
||||
// remove escape event
|
||||
$(document).off('keyup.ui-modal');
|
||||
}
|
||||
|
||||
// create new element
|
||||
this.setElement(this._template(this.options.title));
|
||||
|
||||
// link elements
|
||||
this.$dialog = (this.$el).find('.modal-dialog');
|
||||
this.$body = (this.$el).find('.modal-body');
|
||||
this.$footer = (this.$el).find('.modal-footer');
|
||||
this.$buttons = (this.$el).find('.buttons');
|
||||
this.$backdrop = (this.$el).find('.modal-backdrop');
|
||||
|
||||
// append body
|
||||
this.$body.html(this.options.body);
|
||||
|
||||
// configure background
|
||||
if (!this.options.backdrop){
|
||||
this.$backdrop.removeClass('in');
|
||||
}
|
||||
|
||||
// append buttons
|
||||
if (this.options.buttons) {
|
||||
// reset button list
|
||||
this.buttonList = {};
|
||||
var counter = 0;
|
||||
$.each(this.options.buttons, function(name, value) {
|
||||
var button_id = 'button-' + counter++;
|
||||
self.$buttons.append($('<button id="' + button_id + '"></button>').text(name).click(value)).append(" ");
|
||||
self.buttonList[name] = button_id;
|
||||
});
|
||||
} else {
|
||||
// hide footer
|
||||
this.$footer.hide();
|
||||
}
|
||||
|
||||
// append to main element
|
||||
$(this.elMain).append($(this.el));
|
||||
|
||||
// bind additional closing events
|
||||
if (this.options.closing_events) {
|
||||
// bind the ESC key to hide() function
|
||||
$(document).on('keyup.ui-modal', function(e) {
|
||||
if (e.keyCode == 27) {
|
||||
self.hide( true );
|
||||
}
|
||||
});
|
||||
|
||||
// hide modal if background is clicked
|
||||
this.$el.find('.modal-backdrop').on('click', function() { self.hide( true ); });
|
||||
}
|
||||
|
||||
// removes the default separator line
|
||||
if (!this.options.title_separator) {
|
||||
this.$('.modal-header').css({ 'border': 'none', 'padding-bottom': '0px' });
|
||||
}
|
||||
},
|
||||
|
||||
// fill regular modal template
|
||||
_template: function(title) {
|
||||
return '<div class="ui-modal modal">' +
|
||||
'<div class="modal-backdrop fade in" style="z-index: -1;"></div>' +
|
||||
/**
|
||||
* Returns the modal template
|
||||
*/
|
||||
_template: function() {
|
||||
return '<div class="ui-modal">' +
|
||||
'<div class="modal-backdrop fade"/>' +
|
||||
'<div class="modal-dialog">' +
|
||||
'<div class="modal-content">' +
|
||||
'<div class="modal-header">' +
|
||||
'<button type="button" class="close" style="display: none;">×</button>' +
|
||||
'<h4 class="title">' + title + '</h4>' +
|
||||
'<h4 class="title"/>' +
|
||||
'</div>' +
|
||||
'<div class="modal-body" style="position: static;"></div>' +
|
||||
'<div class="modal-body"/>' +
|
||||
'<div class="modal-footer">' +
|
||||
'<div class="buttons" style="float: right;"></div>' +
|
||||
'<div class="buttons"/>' +
|
||||
'</div>' +
|
||||
'</div' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
progress : function() {},
|
||||
url : null,
|
||||
maxfilesize : 2048,
|
||||
error_filesize : 'File exceeds 2GB. Please use an FTP client.',
|
||||
error_filesize : 'File exceeds 2GB. Please use a FTP client.',
|
||||
error_default : 'Please make sure the file is available.',
|
||||
error_server : 'Upload request failed.',
|
||||
error_login : 'Uploads require you to log in.'
|
||||
@@ -116,10 +116,10 @@
|
||||
|
||||
// append hidden upload field
|
||||
var $input = $('<input type="file" style="display: none" ' + (opts.multiple && 'multiple' || '') + '/>');
|
||||
el.append($input).change(function (e) {
|
||||
el.append($input.change(function (e) {
|
||||
opts.onchange(e.target.files);
|
||||
$(this).val('');
|
||||
});
|
||||
}));
|
||||
|
||||
// drag/drop events
|
||||
el.on('drop', function (e) {
|
||||
@@ -185,12 +185,21 @@
|
||||
function add(files) {
|
||||
if (files && files.length && !queue_running) {
|
||||
var current_index = queue_index;
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var index = String(queue_index++);
|
||||
queue[index] = files[i];
|
||||
opts.announce(index, queue[index]);
|
||||
queue_length++;
|
||||
}
|
||||
_.each(files, function(file, key) {
|
||||
if (file.mode !== 'new' && _.filter(queue, function(f) {
|
||||
return f.name === file.name && f.size === file.size;
|
||||
}).length) {
|
||||
file.duplicate = true;
|
||||
}
|
||||
});
|
||||
_.each(files, function(file) {
|
||||
if (!file.duplicate) {
|
||||
var index = String(queue_index++);
|
||||
queue[index] = file;
|
||||
opts.announce(index, queue[index]);
|
||||
queue_length++;
|
||||
}
|
||||
});
|
||||
return current_index;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,32 @@
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.ui-modal {
|
||||
.modal-header.no-separator {
|
||||
border: none !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
.modal-backdrop {
|
||||
z-index: -1;
|
||||
}
|
||||
.modal-body {
|
||||
position: static;
|
||||
}
|
||||
.modal-footer {
|
||||
.buttons {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ui-modal-styled {
|
||||
&:extend(.ui-modal all);
|
||||
ul {
|
||||
list-style-type: square;
|
||||
padding: 5px 25px;
|
||||
}
|
||||
}
|
||||
|
||||
// icons
|
||||
.ui-icon {
|
||||
font-size: 1.2em;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"page.js","sources":["../../src/layout/page.js"],"names":["define","MASTHEAD","PANEL","MODAL","BASE_MVC","PageLayoutView","Backbone","View","extend","LoggableMixin","_logNamespace","el","className","_panelIds","defaultOptions","message_box_visible","message_box_content","message_box_class","show_inactivity_warning","inactivity_box_content","initialize","options","this","log","_","pick","defaults","omit","Galaxy","modal","$everything","$","render","$el","attr","html","template","masthead","GalaxyMasthead","config","get","messageBox","inactivityWarning","renderPanels","content","level","addClass","toggle","verificationLink","root","append","page","remove","forEach","panelId","has","panelView","setElement","left","center","css","right","join","hideSidePanels","hide","toString"],"mappings":"AAAAA,QACI,kBACA,eACA,kBACA,gBACD,SAAUC,EAAUC,EAAOC,EAAOC,GAGrC,GAAIC,GAAiBC,SAASC,KAAKC,OAAQJ,EAASK,eAAgBD,QAChEE,cAAgB,SAEhBC,GAAK,OACLC,UAAY,eAEZC,WACI,OAAQ,SAAU,SAGtBC,gBACIC,qBAAsB,EACtBC,oBAAsB,GACtBC,kBAAsB,OAEtBC,yBAA0B,EAC1BC,uBAA0B,IAG9BC,WAAa,SAAUC,GACnBC,KAAKC,IAAKD,KAAO,eAAgBD,GACjCG,EAAEhB,OAAQc,KAAME,EAAEC,KAAMJ,EAASC,KAAKT,YACtCS,KAAKD,QAAUG,EAAEE,SAAUF,EAAEG,KAAMN,EAASC,KAAKT,WAAaS,KAAKR,gBAGnEc,OAAOC,MAAQP,KAAKO,MAAQ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AE3BtC,MAKXc,SAAU,WAEN,OACI,gGACI,yBACA,2EACA,qDACA,oFAGAd,KAAKoC,KAAQ,mBAAqB,GAClCpC,KAAKqC,OAAQ,qCAAuC,GACpDrC,KAAKuC,MAAQ,oBAAsB,GACvC,SAEA,oDAEA,aACI,4DACI,QACI,wDACA,QACI,gFACA,iDACJ,SACJ,SACJ,SACJ,eACFC,KAAK,KAGXC,eAAiB,WACTzC,KAAKoC,MACLpC,KAAKoC,KAAKM,OAEV1C,KAAKuC,OACLvC,KAAKuC,MAAMG,QAInBC,SAAW,WAAY,MAAO,mBAI9B,QACI5D,eAAgBA"}
|
||||
{"version":3,"file":"page.js","sources":["../../src/layout/page.js"],"names":["define","MASTHEAD","PANEL","MODAL","BASE_MVC","PageLayoutView","Backbone","View","extend","LoggableMixin","_logNamespace","el","className","_panelIds","defaultOptions","message_box_visible","message_box_content","message_box_class","show_inactivity_warning","inactivity_box_content","initialize","options","this","log","_","pick","defaults","omit","Galaxy","modal","$everything","$","render","$el","attr","html","template","append","masthead","GalaxyMasthead","config","get","messageBox","inactivityWarning","renderPanels","content","level","addClass","toggle","verificationLink","root","page","remove","forEach","panelId","has","panelView","setElement","left","center","css","right","join","hideSidePanels","hide","toString"],"mappings":"AAAAA,QACI,kBACA,eACA,kBACA,gBACD,SAAUC,EAAUC,EAAOC,EAAOC,GAGrC,GAAIC,GAAiBC,SAASC,KAAKC,OAAQJ,EAASK,eAAgBD,QAChEE,cAAgB,SAEhBC,GAAK,OACLC,UAAY,eAEZC,WACI,OAAQ,SAAU,SAGtBC,gBACIC,qBAAsB,EACtBC,oBAAsB,GACtBC,kBAAsB,OAEtBC,yBAA0B,EAC1BC,uBAA0B,IAG9BC,WAAa,SAAUC,GACnBC,KAAKC,IAAKD,KAAO,eAAgBD,GACjCG,EAAEhB,OAAQc,KAAME,EAAEC,KAAMJ,EAASC,KAAKT,YACtCS,KAAKD,QAAUG,EAAEE,SAAUF,EAAEG,KAAMN,EAASC,KAAKT,WAAaS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1B,IAAI2B,IAAK,OAAQ,GAE5BtC,KAAKuC,OACNvC,KAAKqC,OAAO1B,IAAI2B,IAAK,QAAS,GAE3BtC,MAKXc,SAAU,WAEN,OACI,gGACI,yBACA,2EACA,qDACA,oFAGAd,KAAKoC,KAAQ,mBAAqB,GAClCpC,KAAKqC,OAAQ,qCAAuC,GACpDrC,KAAKuC,MAAQ,oBAAsB,GACvC,SAEA,oDAEA,aACI,4DACI,QACI,wDACA,QACI,gFACA,iDACJ,SACJ,SACJ,SACJ,eACFC,KAAK,KAGXC,eAAiB,WACTzC,KAAKoC,MACLpC,KAAKoC,KAAKM,OAEV1C,KAAKuC,OACLvC,KAAKuC,MAAMG,QAInBC,SAAW,WAAY,MAAO,mBAI9B,QACI5D,eAAgBA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"ui-modal.js","sources":["../../../src/mvc/ui/ui-modal.js"],"names":["define","View","Backbone","extend","elMain","optionsDefault","title","body","backdrop","height","width","closing_events","closing_callback","title_separator","buttonList","initialize","options","this","_create","show","$body","css","$","window","$dialog","visible","$el","fadeIn","hide","cancelled","fadeOut","enableButton","name","button_id","$buttons","find","prop","disableButton","showButton","hideButton","getButton","scrollTop","self","_","defaults","remove","document","off","setElement","_template","$footer","$backdrop","html","removeClass","buttons","counter","each","value","append","text","click","el","on","e","keyCode","border","padding-bottom"],"mappings":"AAAAA,UAAW,WAEX,GAAIC,GAAOC,SAASD,KAAKE,QAGrBC,OAAQ,OAGRC,gBACIC,MAAmB,WACnBC,KAAmB,GACnBC,UAAmB,EACnBC,OAAmB,KACnBC,MAAmB,KACnBC,gBAAmB,EACnBC,iBAAmB,KACnBC,iBAAmB,GAIvBC,cAGAC,WAAa,SAASC,GACdA,GACAC,KAAKC,QAAQF,IAKrBG,KAAM,SAASH,GAEXC,KAAKF,WAAWC,GAGZC,KAAKD,QAAQP,QACbQ,KAAKG,MAAMC,IAAI,SAAUJ,KAAKD,QAAQP,QACtCQ,KAAKG,MAAMC,IAAI,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AQ,IAAEkB,KAAK,iBAC/BlB,KAAKG,MAASH,KAAQ,IAAEkB,KAAK,eAC7BlB,KAAKiC,QAAYjC,KAAQ,IAAEkB,KAAK,iBAChClB,KAAKiB,SAAYjB,KAAQ,IAAEkB,KAAK,YAChClB,KAAKkC,UAAalC,KAAQ,IAAEkB,KAAK,mBAGjClB,KAAKG,MAAMgC,KAAKnC,KAAKD,QAAQT,MAGxBU,KAAKD,QAAQR,UACdS,KAAKkC,UAAUE,YAAY,MAI3BpC,KAAKD,QAAQsC,QAAS,CAEtBrC,KAAKH,aACL,IAAIyC,GAAU,CACdjC,GAAEkC,KAAKvC,KAAKD,QAAQsC,QAAS,SAAStB,EAAMyB,GACxC,GAAIxB,GAAY,UAAYsB,GAC5Bb,GAAKR,SAASwB,OAAOpC,EAAE,eAAiBW,EAAY,eAAe0B,KAAK3B,GAAM4B,MAAMH,IAAQC,OAAO,KACnGhB,EAAK5B,WAAWkB,GAAQC,QAI5BhB,MAAKiC,QAAQtB,MAIjBN,GAAEL,KAAKb,QAAQsD,OAAOpC,EAAEL,KAAK4C,KAGzB5C,KAAKD,QAAQL,iBAEbW,EAAEwB,UAAUgB,GAAG,iBAAkB,SAASC,GACrB,IAAbA,EAAEC,SACFtB,EAAKd,MAAM,KAKnBX,KAAKS,IAAIS,KAAK,mBAAmB2B,GAAG,QAAS,WAAapB,EAAKd,MAAM,MAIpEX,KAAKD,QAAQH,iBACdI,KAAKK,EAAE,iBAAiBD,KAAM4C,OAAU,OAAQC,iBAAkB,SAK1EjB,UAAW,SAAS3C,GAChB,MAAQ,0QAMuCA,EAAQ,0KAY/D,QACIL,KAAOA"}
|
||||
{"version":3,"file":"ui-modal.js","sources":["../../../src/mvc/ui/ui-modal.js"],"names":["define","View","Backbone","extend","optionsDefault","container","title","cls","body","backdrop","height","width","closing_events","closing_callback","title_separator","buttonList","initialize","options","this","setElement","_template","_","defaults","$","prepend","el","$header","$dialog","$body","$footer","$backdrop","$buttons","render","show","visible","$el","fadeIn","hide","canceled","fadeOut","self","removeClass","addClass","find","html","empty","buttons","counter","each","name","callback","$button","attr","text","click","append","document","off","on","e","keyCode","css","window","getButton","enableButton","prop","disableButton","showButton","hideButton","scrollTop"],"mappings":"AAAAA,UAAW,WACX,GAAIC,GAAOC,SAASD,KAAKE,QAErBC,gBACIC,UAAmB,OACnBC,MAAmB,WACnBC,IAAmB,WACnBC,KAAmB,GACnBC,UAAmB,EACnBC,OAAmB,KACnBC,MAAmB,KACnBC,gBAAmB,EACnBC,iBAAmB,KACnBC,iBAAmB,GAIvBC,cAGAC,WAAY,SAAUC,GAClBC,KAAKC,WAAYD,KAAKE,aACtBF,KAAKD,QAAUI,EAAEC,SAAUL,MAAeC,KAAKd,gBAC/CmB,EAAGL,KAAKD,QAAQZ,WAAYmB,QAASN,KAAKO,IAG1CP,KAAKQ,QAAaR,KAAKK,EAAG,iBAC1BL,KAAKS,QAAaT,KAAKK,EAAG,iBAC1BL,KAAKU,MAAaV,KAAKK,EAAG,eAC1BL,KAAKW,QAAaX,KAAKK,EAAG,iBAC1BL,KAAKY,UAAaZ,KAAKK,EAAG,mBAC1BL,KAAKa,SAAab,KAAKK,EAAG,YAG1BN,GAAWC,KAAKc,UAMpBC,KAAM,SAAUhB,GACPA,IACDC,KAAKD,QAAUI,EAAEC,SAAUL,EAASC,KAAKd,gBACzCc,KAAKc,UAEHd,KAAKgB,UACPhB,KAAKgB,SAAU,EACfhB,KAAKiB,IAAIC,OAAQ,UAOzBC,KAAM,SAAUC,GACZpB,KAAKgB,SAAU,EACfhB,KAAKiB,IAAII,QAAS,QAClBrB,KAAKD,QAAQJ,kBAAoBK,KAAKD,QAAQJ,iBAAkByB,IAMpEN,OAAQ,WACJ,GAAIQ,GAAOtB,IAeX,IAdyB,YAArBA,KAAKD,QAAQT,OACbU,KAAKD,QAAQT,KAAOe,EAAI,yHAM5BL,KAAKiB,IAAIM,cAAcC,SAAU,SAAUA,SAAUxB,KAAKD,QAAQV,KAClEW,KAAKQ,Q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AOhB,QAO3BmC,WAAY,SAAUnB,GAClB/B,KAAK6C,UAAWd,GAAOZ,QAM3BgC,UAAW,WACP,MAAOnD,MAAKU,MAAMyC,aAMtBjD,UAAW,WACP,MAAQ,sQAiBhB,QACInB,KAAOA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"uploadbox.js","sources":["../../src/utils/uploadbox.js"],"names":["$","jQuery","event","props","push","uploadpost","config","cnf","extend","data","success","error","progress","url","maxfilesize","error_filesize","error_default","error_server","error_login","error_message","form","FormData","key","payload","append","sizes","files","d","name","file","size","xhr","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","DONE","response","responseText","parseJSON","e","status","text","statusText","upload","addEventListener","lengthComputable","Math","round","loaded","total","Galaxy","emit","debug","send","fn","uploadinput","options","el","this","opts","ondragover","ondragleave","onchange","multiple","$input","change","target","val","on","dataTransfer","preventDefault","stopPropagation","dialog","trigger","uploadbox","add","length","queue_running","current_index","queue_index","i","index","String","queue","announce","queue_length","remove","process","queue_stop","complete","initialize","message","percentage","select","reset","start","stop","configure","compatible","window","File","FileList","dragover","dragleave","m","alert"],"mappings":"CAGC,SAAUA,GAEPC,OAAOC,MAAMC,MAAMC,KAAK,gBAKxBJ,EAAEK,WAAa,SAAUC,GAErB,GAAIC,GAAMP,EAAEQ,WACRC,QACAC,QAAkB,aAClBC,MAAkB,aAClBC,SAAkB,aAClBC,IAAkB,KAClBC,YAAkB,KAClBC,eAAkB,8CAClBC,cAAkB,0CAClBC,aAAkB,yBAClBC,YAAkB,kCACnBZ,GAGCG,EAAOF,EAAIE,IAGf,IAAIA,EAAKU,cAEL,WADAZ,GAAII,MAAMF,EAAKU,cAKnB,IAAIC,GAAO,GAAIC,SACf,KAAK,GAAIC,KAAOb,GAAKc,QACjBH,EAAKI,OAAOF,EAAKb,EAAKc,QAAQD,GAIlC,IAAIG,GAAQ,CACZ,KAAK,GAAIH,KAAOb,GAAKiB,MAAO,CACxB,GAAIC,GAAIlB,EAAKiB,MAA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EAAYiB,SAIhB,QAASsB,GAAMb,GACX,IAAKA,IAASE,GACVG,EAAOL,GAKf,QAASc,KACAlB,IACDA,GAAgB,EAChBU,KAKR,QAASS,KACLR,GAAa,EAIjB,QAASS,GAAUzC,GAEf,MADAG,GAAO7D,EAAEQ,UAAWqD,EAAMH,GAK9B,QAAS0C,KACL,MAAOC,QAAOC,MAAQD,OAAOhF,UAAYgF,OAAOrE,gBAAkBqE,OAAOE,SA5H7E,GAAI1C,GAAO7D,EAAEQ,WACTgG,SAAkB,aAClBC,UAAkB,aAClBnB,SAAkB,aAClBM,WAAkB,aAClBhF,SAAkB,aAClBF,QAAkB,aAClBC,MAAkB,SAASgB,EAAG+E,GAAKC,MAAMD,IACzCf,SAAkB,cACnBjC,GAGC2B,KAGAJ,EAAc,EACdM,EAAe,EAGfR,GAAgB,EAChBW,GAAa,EAGbjC,EAAczD,EAAE4D,MAAMH,aACtBQ,UAAc,EACdD,SAAc,SAAStC,GAASmD,EAAInD,IACpCoC,WAAcJ,EAAQI,WACtBC,YAAcL,EAAQK,aAqG1B,QACIgC,OAAkBA,EAClBlB,IAAkBA,EAClBW,OAAkBA,EAClBS,MAAkBA,EAClBC,KAAkBA,EAClBF,MAAkBA,EAClBG,UAAkBA,EAClBC,WAAkBA,KAG3BnG"}
|
||||
{"version":3,"file":"uploadbox.js","sources":["../../src/utils/uploadbox.js"],"names":["$","jQuery","event","props","push","uploadpost","config","cnf","extend","data","success","error","progress","url","maxfilesize","error_filesize","error_default","error_server","error_login","error_message","form","FormData","key","payload","append","sizes","files","d","name","file","size","xhr","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","DONE","response","responseText","parseJSON","e","status","text","statusText","upload","addEventListener","lengthComputable","Math","round","loaded","total","Galaxy","emit","debug","send","fn","uploadinput","options","el","this","opts","ondragover","ondragleave","onchange","multiple","$input","change","target","val","on","dataTransfer","preventDefault","stopPropagation","dialog","trigger","uploadbox","add","length","queue_running","current_index","queue_index","_","each","mode","filter","queue","f","duplicate","index","String","announce","queue_length","remove","process","queue_stop","complete","initialize","message","percentage","select","reset","start","stop","configure","compatible","window","File","FileList","dragover","dragleave","m","alert"],"mappings":"CAGC,SAAUA,GAEPC,OAAOC,MAAMC,MAAMC,KAAK,gBAKxBJ,EAAEK,WAAa,SAAUC,GAErB,GAAIC,GAAMP,EAAEQ,WACRC,QACAC,QAAkB,aAClBC,MAAkB,aAClBC,SAAkB,aAClBC,IAAkB,KAClBC,YAAkB,KAClBC,eAAkB,6CAClBC,cAAkB,0CAClBC,aAAkB,yBAClBC,YAAkB,kCACnBZ,GAGCG,EAAOF,EAAIE,IAGf,IAAIA,EAAKU,cAEL,WADAZ,GAAII,MAAMF,EAAKU,cAKnB,IAAIC,GAAO,GAAIC,SACf,KAAK,GAAIC,KAAOb,GAAKc,QACjBH,EAAKI,OAAOF,EAAKb,EAAKc,QAAQD,GAIlC,IAAIG,GAAQ,CACZ,KAAK,GAAIH,KAAOb,GAAKiB,MAAO,CACxB,GAAIC,GAAIlB,EAAKiB,MAAMJ,EACnBF,GAAKI,OAAOG,EAAEC,KAAMD,EAAEE,KAAMF,EAAEE,KAAKD,MACnCH,GAASE,EAAEE,KAAKC,KAIpB,MAAIL,GAAQ,QAAUlB,EAAIO,gBACtBP,GAAII,MAAMJ,EAAIQ,iBAKlBgB,IAAM,GAAIC,gBACVD,IAAIE,KAAK,OAAQ1B,EAAIM,KAAK,GAC1BkB,IAAIG,iBAAiB,SAAU,oBAC/BH,IAAIG,iBAAiB,gBAAiB,YACtCH,IAAIG,iBAAiB,mBAAoB,kBAGzCH,IAAII,mBAAqB,WAErB,GAAIJ,IAAIK,YAAcL,IAAIM,KAAM,CAE5B,GAAIC,GAAW,IACf,IAAIP,IAAIQ,aACJ,IACID,EAAWrC,OAAOuC,UAAUT,IAAIQ,cAClC,MAAOE,GACLH,EAAWP,IAAIQ,aAIvB,GAAIR,IAAIW,OAAS,KAAOX,IAAIW,OAAS,IAAK,CACtC,GAAIC,GAAOZ,IA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AClBC,MAAkB,SAASgB,EAAGoF,GAAKC,MAAMD,IACzCf,SAAkB,cACnBtC,GAGC4B,KAGAL,EAAc,EACdW,EAAe,EAGfb,GAAgB,EAChBgB,GAAa,EAGbtC,EAAczD,EAAE4D,MAAMH,aACtBQ,UAAc,EACdD,SAAc,SAAStC,GAASmD,EAAInD,IACpCoC,WAAcJ,EAAQI,WACtBC,YAAcL,EAAQK,aA8G1B,QACIqC,OAAkBA,EAClBvB,IAAkBA,EAClBgB,OAAkBA,EAClBS,MAAkBA,EAClBC,KAAkBA,EAClBF,MAAkBA,EAClBG,UAAkBA,EAClBC,WAAkBA,KAG3BxG"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define(["layout/masthead","layout/panel","mvc/ui/ui-modal","mvc/base-mvc"],function(a,b,c,d){var e=Backbone.View.extend(d.LoggableMixin).extend({_logNamespace:"layout",el:"body",className:"full-content",_panelIds:["left","center","right"],defaultOptions:{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""},initialize:function(a){this.log(this+".initialize:",a),_.extend(this,_.pick(a,this._panelIds)),this.options=_.defaults(_.omit(a,this._panelIds),this.defaultOptions),Galaxy.modal=this.modal=new c.View},$everything:function(){return this.$("#everything")},render:function(){return this.log(this+".render:"),this.$el.attr("scroll","no"),this.$el.html(this.template(this.options)),Galaxy.masthead=this.masthead=new a.GalaxyMasthead(_.extend(this.options.config,{el:this.$("#masthead").get(0)})),this.options.message_box_visible&&this.messageBox(this.options.message_box_content,this.options.message_box_class),this.options.show_inactivity_warning&&this.inactivityWarning(this.options.inactivity_box_content),this.renderPanels(),this},messageBox:function(a,b){return a=a||"",b=b||"info",this.$el.addClass("has-message-box"),this.$("#messagebox").attr("class","panel-"+b+"-message").html(a).toggle(!!a),this},inactivityWarning:function(a){var b='<a href="'+Galaxy.root+'user/resend_verification">Resend verification.</a>';return this.$el.addClass("has-inactivity-box"),this.$("#inactivebox").html(a).append(" "+b).toggle(!!a),this},renderPanels:function(){var a=this;return $(".select2-hidden-accessible").remove(),this._panelIds.forEach(function(b){if(_.has(a,b)){var c=a[b];c.setElement("#"+b),c.render()}}),this.left||this.center.$el.css("left",0),this.right||this.center.$el.css("right",0),this},template:function(){return['<div id="everything" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">','<div id="background"/>','<div id="masthead" class="navbar navbar-fixed-top navbar-inverse"></div>','<div id="messagebox" style="display: none;"></div>','<div id="inactivebox" class="panel-warning-message" style="display: none;"></div>',this.left?'<div id="left"/>':"",this.center?'<div id="center" class="inbound"/>':"",this.right?'<div id="right"/>':"","</div>",'<div id="dd-helper" style="display: none;"></div>',"<noscript>",'<div class="overlay overlay-background noscript-overlay">',"<div>",'<h3 class="title">Javascript Required for Galaxy</h3>',"<div>","The Galaxy analysis interface requires a browser with Javascript enabled.<br>","Please enable Javascript and refresh this page","</div>","</div>","</div>","</noscript>"].join("")},hideSidePanels:function(){this.left&&this.left.hide(),this.right&&this.right.hide()},toString:function(){return"PageLayoutView"}});return{PageLayoutView:e}});
|
||||
define(["layout/masthead","layout/panel","mvc/ui/ui-modal","mvc/base-mvc"],function(a,b,c,d){var e=Backbone.View.extend(d.LoggableMixin).extend({_logNamespace:"layout",el:"body",className:"full-content",_panelIds:["left","center","right"],defaultOptions:{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""},initialize:function(a){this.log(this+".initialize:",a),_.extend(this,_.pick(a,this._panelIds)),this.options=_.defaults(_.omit(a,this._panelIds),this.defaultOptions),Galaxy.modal=this.modal=new c.View},$everything:function(){return this.$("#everything")},render:function(){return this.log(this+".render:"),this.$el.attr("scroll","no"),this.$el.html(this.template(this.options)),this.$el.append(this.modal.$el),Galaxy.masthead=this.masthead=new a.GalaxyMasthead(_.extend(this.options.config,{el:this.$("#masthead").get(0)})),this.options.message_box_visible&&this.messageBox(this.options.message_box_content,this.options.message_box_class),this.options.show_inactivity_warning&&this.inactivityWarning(this.options.inactivity_box_content),this.renderPanels(),this},messageBox:function(a,b){return a=a||"",b=b||"info",this.$el.addClass("has-message-box"),this.$("#messagebox").attr("class","panel-"+b+"-message").html(a).toggle(!!a),this},inactivityWarning:function(a){var b='<a href="'+Galaxy.root+'user/resend_verification">Resend verification.</a>';return this.$el.addClass("has-inactivity-box"),this.$("#inactivebox").html(a).append(" "+b).toggle(!!a),this},renderPanels:function(){var a=this;return $(".select2-hidden-accessible").remove(),this._panelIds.forEach(function(b){if(_.has(a,b)){var c=a[b];c.setElement("#"+b),c.render()}}),this.left||this.center.$el.css("left",0),this.right||this.center.$el.css("right",0),this},template:function(){return['<div id="everything" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">','<div id="background"/>','<div id="masthead" class="navbar navbar-fixed-top navbar-inverse"></div>','<div id="messagebox" style="display: none;"></div>','<div id="inactivebox" class="panel-warning-message" style="display: none;"></div>',this.left?'<div id="left"/>':"",this.center?'<div id="center" class="inbound"/>':"",this.right?'<div id="right"/>':"","</div>",'<div id="dd-helper" style="display: none;"></div>',"<noscript>",'<div class="overlay overlay-background noscript-overlay">',"<div>",'<h3 class="title">Javascript Required for Galaxy</h3>',"<div>","The Galaxy analysis interface requires a browser with Javascript enabled.<br>","Please enable Javascript and refresh this page","</div>","</div>","</div>","</noscript>"].join("")},hideSidePanels:function(){this.left&&this.left.hide(),this.right&&this.right.hide()},toString:function(){return"PageLayoutView"}});return{PageLayoutView:e}});
|
||||
//# sourceMappingURL=../../maps/layout/page.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
define([],function(){var a=Backbone.View.extend({elMain:"body",optionsDefault:{title:"ui-modal",body:"",backdrop:!0,height:null,width:null,closing_events:!1,closing_callback:null,title_separator:!0},buttonList:{},initialize:function(a){a&&this._create(a)},show:function(a){this.initialize(a),this.options.height?(this.$body.css("height",this.options.height),this.$body.css("overflow","hidden")):this.$body.css("max-height",$(window).height()/2),this.options.width&&this.$dialog.css("width",this.options.width),this.visible?this.$el.show():this.$el.fadeIn("fast"),this.visible=!0},hide:function(a){this.visible=!1,this.$el.fadeOut("fast"),this.options.closing_callback&&this.options.closing_callback(a)},enableButton:function(a){var b=this.buttonList[a];this.$buttons.find("#"+b).prop("disabled",!1)},disableButton:function(a){var b=this.buttonList[a];this.$buttons.find("#"+b).prop("disabled",!0)},showButton:function(a){var b=this.buttonList[a];this.$buttons.find("#"+b).show()},hideButton:function(a){var b=this.buttonList[a];this.$buttons.find("#"+b).hide()},getButton:function(a){var b=this.buttonList[a];return this.$buttons.find("#"+b)},scrollTop:function(){return this.$body.scrollTop()},_create:function(a){var b=this;if(this.options=_.defaults(a,this.optionsDefault),"progress"==this.options.body&&(this.options.body=$('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"></div></div>')),this.$el&&(this.$el.remove(),$(document).off("keyup.ui-modal")),this.setElement(this._template(this.options.title)),this.$dialog=this.$el.find(".modal-dialog"),this.$body=this.$el.find(".modal-body"),this.$footer=this.$el.find(".modal-footer"),this.$buttons=this.$el.find(".buttons"),this.$backdrop=this.$el.find(".modal-backdrop"),this.$body.html(this.options.body),this.options.backdrop||this.$backdrop.removeClass("in"),this.options.buttons){this.buttonList={};var c=0;$.each(this.options.buttons,function(a,d){var e="button-"+c++;b.$buttons.append($('<button id="'+e+'"></button>').text(a).click(d)).append(" "),b.buttonList[a]=e})}else this.$footer.hide();$(this.elMain).append($(this.el)),this.options.closing_events&&($(document).on("keyup.ui-modal",function(a){27==a.keyCode&&b.hide(!0)}),this.$el.find(".modal-backdrop").on("click",function(){b.hide(!0)})),this.options.title_separator||this.$(".modal-header").css({border:"none","padding-bottom":"0px"})},_template:function(a){return'<div class="ui-modal modal"><div class="modal-backdrop fade in" style="z-index: -1;"></div><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" style="display: none;">×</button><h4 class="title">'+a+'</h4></div><div class="modal-body" style="position: static;"></div><div class="modal-footer"><div class="buttons" style="float: right;"></div></div></div</div></div>'}});return{View:a}});
|
||||
define([],function(){var a=Backbone.View.extend({optionsDefault:{container:"body",title:"ui-modal",cls:"ui-modal",body:"",backdrop:!0,height:null,width:null,closing_events:!1,closing_callback:null,title_separator:!0},buttonList:{},initialize:function(a){this.setElement(this._template()),this.options=_.defaults(a||{},this.optionsDefault),$(this.options.container).prepend(this.el),this.$header=this.$(".modal-header"),this.$dialog=this.$(".modal-dialog"),this.$body=this.$(".modal-body"),this.$footer=this.$(".modal-footer"),this.$backdrop=this.$(".modal-backdrop"),this.$buttons=this.$(".buttons"),a&&this.render()},show:function(a){a&&(this.options=_.defaults(a,this.optionsDefault),this.render()),this.visible||(this.visible=!0,this.$el.fadeIn("fast"))},hide:function(a){this.visible=!1,this.$el.fadeOut("fast"),this.options.closing_callback&&this.options.closing_callback(a)},render:function(){var a=this;if("progress"==this.options.body&&(this.options.body=$('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"/></div>')),this.$el.removeClass().addClass("modal").addClass(this.options.cls),this.$header.find(".title").html(this.options.title),this.$body.html(this.options.body),this.$buttons.empty(),this.buttonList={},this.options.buttons){var b=0;$.each(this.options.buttons,function(c,d){var e=$("<button/>").attr("id","button-"+b++).text(c).click(d);a.$buttons.append(e).append(" "),a.buttonList[c]=e})}else this.$footer.hide();$(document).off("keyup.ui-modal"),this.options.closing_events&&($(document).on("keyup.ui-modal",function(b){27==b.keyCode&&a.hide(!0)}),this.$backdrop.off("click").on("click",function(){a.hide(!0)})),this.$backdrop[this.options.backdrop&&"addClass"||"removeClass"]("in"),this.$header[!this.options.title_separator&&"addClass"||"removeClass"]("no-separator"),this.options.height?(this.$body.css("height",this.options.height),this.$body.css("overflow","hidden")):this.$body.css("max-height",$(window).height()/2),this.options.width&&this.$dialog.css("width",this.options.width)},getButton:function(a){return this.buttonList[a]},enableButton:function(a){this.getButton(a).prop("disabled",!1)},disableButton:function(a){this.getButton(a).prop("disabled",!0)},showButton:function(a){this.getButton(a).show()},hideButton:function(a){this.getButton(a).hide()},scrollTop:function(){return this.$body.scrollTop()},_template:function(){return'<div class="ui-modal"><div class="modal-backdrop fade"/><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="title"/></div><div class="modal-body"/><div class="modal-footer"><div class="buttons"/></div></div></div></div>'}});return{View:a}});
|
||||
//# sourceMappingURL=../../../maps/mvc/ui/ui-modal.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(a){jQuery.event.props.push("dataTransfer"),a.uploadpost=function(b){var c=a.extend({},{data:{},success:function(){},error:function(){},progress:function(){},url:null,maxfilesize:2048,error_filesize:"File exceeds 2GB. Please use an FTP client.",error_default:"Please make sure the file is available.",error_server:"Upload request failed.",error_login:"Uploads require you to log in."},b),d=c.data;if(d.error_message)return void c.error(d.error_message);var e=new FormData;for(var f in d.payload)e.append(f,d.payload[f]);var g=0;for(var f in d.files){var h=d.files[f];e.append(h.name,h.file,h.file.name),g+=h.file.size}return g>1048576*c.maxfilesize?void c.error(c.error_filesize):(xhr=new XMLHttpRequest,xhr.open("POST",c.url,!0),xhr.setRequestHeader("Accept","application/json"),xhr.setRequestHeader("Cache-Control","no-cache"),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.onreadystatechange=function(){if(xhr.readyState==xhr.DONE){var a=null;if(xhr.responseText)try{a=jQuery.parseJSON(xhr.responseText)}catch(b){a=xhr.responseText}if(xhr.status<200||xhr.status>299){var d=xhr.statusText;403==xhr.status?d=c.error_login:0==xhr.status?d=c.error_server:d||(d=c.error_default),c.error(d+" ("+xhr.status+")")}else c.success(a)}},xhr.upload.addEventListener("progress",function(a){a.lengthComputable&&c.progress(Math.round(100*a.loaded/a.total))},!1),Galaxy.emit.debug("uploadbox::uploadpost()","Posting following data.",c),void xhr.send(e))},a.fn.uploadinput=function(b){var c=this,d=a.extend({},{ondragover:function(){},ondragleave:function(){},onchange:function(){},multiple:!1},b),e=a('<input type="file" style="display: none" '+(d.multiple&&"multiple"||"")+"/>");return c.append(e).change(function(b){d.onchange(b.target.files),a(this).val("")}),c.on("drop",function(a){d.ondragleave(a),a.dataTransfer&&(d.onchange(a.dataTransfer.files),a.preventDefault())}),c.on("dragover",function(a){a.preventDefault(),d.ondragover(a)}),c.on("dragleave",function(a){a.stopPropagation(),d.ondragleave(a)}),{dialog:function(){e.trigger("click")}}},a.fn.uploadbox=function(b){function c(a){if(a&&a.length&&!p){for(var b=n,c=0;c<a.length;c++){var d=String(n++);m[d]=a[c],l.announce(d,m[d]),o++}return b}}function d(a){m[a]&&(delete m[a],o--)}function e(){if(0==o||q)return q=!1,p=!1,void l.complete();p=!0;var b=-1;for(var c in m){b=c;break}m[b];d(b),a.uploadpost({url:l.url,data:l.initialize(b),success:function(a){l.success(b,a),e()},error:function(a){l.error(b,a),e()},progress:function(a){l.progress(b,a)}})}function f(){r.dialog()}function g(a){for(a in m)d(a)}function h(){p||(p=!0,e())}function i(){q=!0}function j(b){return l=a.extend({},l,b)}function k(){return window.File&&window.FormData&&window.XMLHttpRequest&&window.FileList}var l=a.extend({},{dragover:function(){},dragleave:function(){},announce:function(){},initialize:function(){},progress:function(){},success:function(){},error:function(a,b){alert(b)},complete:function(){}},b),m={},n=0,o=0,p=!1,q=!1,r=a(this).uploadinput({multiple:!0,onchange:function(a){c(a)},ondragover:b.ondragover,ondragleave:b.ondragleave});return{select:f,add:c,remove:d,start:h,stop:i,reset:g,configure:j,compatible:k}}}(jQuery);
|
||||
!function(a){jQuery.event.props.push("dataTransfer"),a.uploadpost=function(b){var c=a.extend({},{data:{},success:function(){},error:function(){},progress:function(){},url:null,maxfilesize:2048,error_filesize:"File exceeds 2GB. Please use a FTP client.",error_default:"Please make sure the file is available.",error_server:"Upload request failed.",error_login:"Uploads require you to log in."},b),d=c.data;if(d.error_message)return void c.error(d.error_message);var e=new FormData;for(var f in d.payload)e.append(f,d.payload[f]);var g=0;for(var f in d.files){var h=d.files[f];e.append(h.name,h.file,h.file.name),g+=h.file.size}return g>1048576*c.maxfilesize?void c.error(c.error_filesize):(xhr=new XMLHttpRequest,xhr.open("POST",c.url,!0),xhr.setRequestHeader("Accept","application/json"),xhr.setRequestHeader("Cache-Control","no-cache"),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.onreadystatechange=function(){if(xhr.readyState==xhr.DONE){var a=null;if(xhr.responseText)try{a=jQuery.parseJSON(xhr.responseText)}catch(b){a=xhr.responseText}if(xhr.status<200||xhr.status>299){var d=xhr.statusText;403==xhr.status?d=c.error_login:0==xhr.status?d=c.error_server:d||(d=c.error_default),c.error(d+" ("+xhr.status+")")}else c.success(a)}},xhr.upload.addEventListener("progress",function(a){a.lengthComputable&&c.progress(Math.round(100*a.loaded/a.total))},!1),Galaxy.emit.debug("uploadbox::uploadpost()","Posting following data.",c),void xhr.send(e))},a.fn.uploadinput=function(b){var c=this,d=a.extend({},{ondragover:function(){},ondragleave:function(){},onchange:function(){},multiple:!1},b),e=a('<input type="file" style="display: none" '+(d.multiple&&"multiple"||"")+"/>");return c.append(e.change(function(b){d.onchange(b.target.files),a(this).val("")})),c.on("drop",function(a){d.ondragleave(a),a.dataTransfer&&(d.onchange(a.dataTransfer.files),a.preventDefault())}),c.on("dragover",function(a){a.preventDefault(),d.ondragover(a)}),c.on("dragleave",function(a){a.stopPropagation(),d.ondragleave(a)}),{dialog:function(){e.trigger("click")}}},a.fn.uploadbox=function(b){function c(a){if(a&&a.length&&!p){var b=n;return _.each(a,function(a){"new"!==a.mode&&_.filter(m,function(b){return b.name===a.name&&b.size===a.size}).length&&(a.duplicate=!0)}),_.each(a,function(a){if(!a.duplicate){var b=String(n++);m[b]=a,l.announce(b,m[b]),o++}}),b}}function d(a){m[a]&&(delete m[a],o--)}function e(){if(0==o||q)return q=!1,p=!1,void l.complete();p=!0;var b=-1;for(var c in m){b=c;break}m[b];d(b),a.uploadpost({url:l.url,data:l.initialize(b),success:function(a){l.success(b,a),e()},error:function(a){l.error(b,a),e()},progress:function(a){l.progress(b,a)}})}function f(){r.dialog()}function g(a){for(a in m)d(a)}function h(){p||(p=!0,e())}function i(){q=!0}function j(b){return l=a.extend({},l,b)}function k(){return window.File&&window.FormData&&window.XMLHttpRequest&&window.FileList}var l=a.extend({},{dragover:function(){},dragleave:function(){},announce:function(){},initialize:function(){},progress:function(){},success:function(){},error:function(a,b){alert(b)},complete:function(){}},b),m={},n=0,o=0,p=!1,q=!1,r=a(this).uploadinput({multiple:!0,onchange:function(a){c(a)},ondragover:b.ondragover,ondragleave:b.ondragleave});return{select:f,add:c,remove:d,start:h,stop:i,reset:g,configure:j,compatible:k}}}(jQuery);
|
||||
//# sourceMappingURL=../../maps/utils/uploadbox.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -21,6 +21,7 @@ define([
|
||||
window.Galaxy = new appBase.GalaxyApp( bootstrapped );
|
||||
window.Galaxy.currHistoryPanel = { model: new Backbone.Model() };
|
||||
window.fakeserver = sinon.fakeServer.create();
|
||||
window.WAIT_FADE_FAST = 300;
|
||||
for (var route in serverdata) {
|
||||
window.fakeserver.respondWith('GET', Galaxy.root + route, [ 200, { 'Content-Type': 'application/json' }, serverdata[ route ].data ]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<!-- Minimal outline test page for a requirejs+qunit testing setup,
|
||||
test environment is bootstrapped in test-common.js -->
|
||||
<html>
|
||||
<head>
|
||||
<script data-main="../test-common" src="../scripts/libs/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,87 @@
|
||||
/* global define, QUnit, module, test, ok, equal, deepEqual, notEqual */
|
||||
define([ "test-app", "mvc/ui/ui-modal"
|
||||
], function( testApp, GalaxyModal ){
|
||||
"use strict";
|
||||
module( "Modal dialog test", {
|
||||
setup: function() {
|
||||
testApp.create();
|
||||
var self = this;
|
||||
this.app = new GalaxyModal.View({
|
||||
title : 'Test title',
|
||||
body : 'Test body',
|
||||
buttons : {
|
||||
'Ok' : function() {},
|
||||
'Cancel' : function() { self.app.hide() }
|
||||
}
|
||||
});
|
||||
},
|
||||
teardown: function() {
|
||||
testApp.destroy();
|
||||
}
|
||||
} );
|
||||
|
||||
test( "test dialog attributes", function() {
|
||||
ok( this.app.$header.find( '.title' ).html() == 'Test title', 'Modal header has correct title.');
|
||||
ok( this.app.$body.html() == 'Test body', 'Modal header has correct body.');
|
||||
} );
|
||||
|
||||
test( "test dialog visibility", function() {
|
||||
ok( this.app.$el.css( 'display' ) == 'block', 'Modal is initially visible' );
|
||||
this.app.hide();
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'none', 'Modal hidden manually' );
|
||||
this.app.show();
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'block', 'Modal shown manually' );
|
||||
this.app.getButton( 'Ok' ).trigger( 'click' );
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'block', 'Modal still visible after clicking Ok' );
|
||||
this.app.getButton( 'Cancel' ).trigger( 'click' );
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'none', 'Modal hidden after clicking Cancel' );
|
||||
this.app.show();
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'block', 'Modal manually shown again' );
|
||||
ok( !this.app.$header.hasClass( 'no-separator' ), 'Title separator tagged as visible.' );
|
||||
this.app.show({ title_separator: false });
|
||||
ok( this.app.$header.hasClass( 'no-separator' ), 'Title separator tagged as hidden.' );
|
||||
ok( this.app.$backdrop.hasClass( 'in' ), 'Backdrop tagged as shown.');
|
||||
this.app.show({ backdrop: false });
|
||||
ok( !this.app.$backdrop.hasClass( 'in' ), 'Backdrop tagged as hidden.');
|
||||
} );
|
||||
|
||||
test( "test dialog closing events", function() {
|
||||
this.app.$backdrop.trigger( 'click' );
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'block', 'Modal shown after backdrop click' );
|
||||
this.app.show({ closing_events: true });
|
||||
ok( this.app.$el.css( 'display' ) == 'block', 'Modal shown with closing events' );
|
||||
this.app.$backdrop.trigger( 'click' );
|
||||
this.clock.tick( WAIT_FADE_FAST );
|
||||
ok( this.app.$el.css( 'display' ) == 'none', 'Modal hidden after backdrop click' );
|
||||
} );
|
||||
|
||||
test( "test dialog rendering", function() {
|
||||
var before = this.app.$el.html();
|
||||
this.app.render();
|
||||
ok( before == this.app.$el.html(), 'Re-rendering successful' );
|
||||
this.app.options.title = 'New Title';
|
||||
this.app.render();
|
||||
ok( this.app.$header.find( '.title' ).html() == 'New Title', 'Modal header has correct new title.' );
|
||||
});
|
||||
|
||||
test( "test button states", function() {
|
||||
ok( this.app.getButton( 'Ok' ).html() === 'Ok', 'Ok has correct label' );
|
||||
ok( !this.app.getButton( 'Ok' ).prop( 'disabled' ), 'Ok is active' );
|
||||
ok( !this.app.getButton( 'Cancel' ).prop( 'disabled' ), 'Cancel is active' );
|
||||
this.app.disableButton( 'Ok' );
|
||||
ok( this.app.getButton( 'Ok' ).prop( 'disabled' ), 'Ok is disabled' );
|
||||
ok( !this.app.getButton( 'Cancel' ).prop( 'disabled' ), 'Cancel is still active' );
|
||||
this.app.disableButton( 'Cancel' );
|
||||
ok( this.app.getButton( 'Cancel' ).prop( 'disabled' ), 'Cancel is also disabled' );
|
||||
ok( this.app.getButton( 'Ok' ).prop( 'disabled' ), 'Ok is still disabled' );
|
||||
this.app.enableButton( 'Ok' );
|
||||
ok( this.app.getButton( 'Cancel' ).prop( 'disabled' ), 'Cancel is still disabled' );
|
||||
ok( !this.app.getButton( 'Ok' ).prop( 'disabled' ), 'Ok is active again' );
|
||||
} );
|
||||
});
|
||||
Reference in New Issue
Block a user