diff --git a/client/galaxy/scripts/mvc/history/history-view-edit.js b/client/galaxy/scripts/mvc/history/history-view-edit.js index aa21821326b..4816b617c61 100644 --- a/client/galaxy/scripts/mvc/history/history-view-edit.js +++ b/client/galaxy/scripts/mvc/history/history-view-edit.js @@ -497,16 +497,14 @@ var HistoryViewEdit = _super.extend( }, /** */ drop : function( ev ){ - //console.warn( 'dataTransfer:', ev.dataTransfer.getData( 'text' ) ); - //console.warn( 'dataTransfer:', ev.originalEvent.dataTransfer.getData( 'text' ) ); ev.preventDefault(); //ev.stopPropagation(); - ev.dataTransfer.dropEffect = 'move'; - //console.debug( 'ev.dataTransfer:', ev.dataTransfer ); + var dataTransfer = ev.originalEvent.dataTransfer; + dataTransfer.dropEffect = 'move'; var panel = this, - data = ev.dataTransfer.getData( "text" ); + data = dataTransfer.getData( "text" ); try { data = JSON.parse( data ); diff --git a/config/plugins/tours/core.galaxy_ui.yaml b/config/plugins/tours/core.galaxy_ui.yaml index 4bedecdab19..d86ee0563ed 100644 --- a/config/plugins/tours/core.galaxy_ui.yaml +++ b/config/plugins/tours/core.galaxy_ui.yaml @@ -1,96 +1,216 @@ +id: galaxy_ui name: Galaxy UI description: A gentle introduction to the Galaxy User Interface title_default: "Welcome to Galaxy" + +# A tour is made of several steps, each of them beginning with a dash '-' steps: + # 'title's will be displayed in the header of each step-container + # If you don't specify any title, a default title is used, defined above. - title: "Welcome to Galaxy" - content: "This short tour will walk you through Galaxy's user interface." + # 'content' is the actual text that is shown to the user + content: "This short tour will guide you through Galaxy's user interface.
+ You can navigate with your arrow keys and leave the tour at any time point with 'Escape' or the 'End tour' button." + # backdrop is just one of many properties you can attach to one step-container, + # a full reference can be found at http://bootstraptour.com/api/ backdrop: true - - element: ".upload-button" - intro: "Use this button to upload your data." + # 'element' is the JQuery Selector (http://api.jquery.com/category/selectors/) of the element you want to describe + # In this case we want to highlight the Upload button with the `.upload-button` selector + - title: "Upload your data" + element: ".upload-button" + intro: "Galaxy supports many ways to get in your data.
+ Use this button to upload your data." + # position of the text box relative to the selected element position: "right" + # You can trigger click() events on arbitrary elements before (preclick) or after (postclick) the element is shown postclick: - ".upload-button" - - element: "button#btn-local" - intro: "Upload data from your computer." + - title: "Upload your data" + element: "button#btn-local" + intro: "You can upload data from your computer." position: "top" postclick: - "button#btn-new" - - element: "button#btn-new" - intro: "Copy and Paste data or include URLs." + + - title: "Upload your data" + element: "button#btn-new" + intro: "Copy and paste data directly into Galaxy or include URLs that lead to your data" position: "top" preclick: - ".upload-button" - - element: "textarea#text-content" - intro: "Insert data into Galaxy." + - title: "Insert URLs" + element: "textarea#text-content" + intro: "URLs separated by a line break are automatically downloaded by Galaxy." position: "top" textinsert: | - https://raw.githubusercontent.com/arq5x/bedtools/master/test/merge/a.full.bed - https://raw.githubusercontent.com/arq5x/bedtools/master/test/merge/a.full.bed - https://raw.githubusercontent.com/arq5x/bedtools/master/test/merge/a.full.bed + https://raw.githubusercontent.com/bgruening/galaxytools/adf077b912ddebd97b07b947b855cdd2862ed8ef/tools/augustus/test-data/human_augustus.fa + https://raw.githubusercontent.com/bgruening/galaxytools/adf077b912ddebd97b07b947b855cdd2862ed8ef/tools/sailfish/test-data/reads_2.fastq + https://raw.githubusercontent.com/bgruening/galaxytools/adf077b912ddebd97b07b947b855cdd2862ed8ef/tools/statistics/test-data/anderson.tabular - - element: "button#btn-start" + - title: "Start the upload" + element: "button#btn-start" intro: "Upload the data into your Galaxy history." - position: "bottom" + position: "top" postclick: - "button#btn-start" - - element: "button#btn-close" - intro: "Hit the close button in upload." - position: "bottom" + - title: "Close upload/download manager" + element: "button#btn-close" + intro: "Close the upload manager with this button or with a click outside of the manager window." + position: "top" postclick: - "#btn-close" + - title: "Tools" + element: "#left" + intro: "This is your ToolBox. All tools available in your Galaxy instance you can find here." + position: "right" - - element: 'a[href$="tool_runner?tool_id=Filter1"]' + - title: "Tool search bar" + element: '#tool-search-query' + intro: "You can search for tools by keywords." + position: "right" + textinsert: 'filter' + + - title: "Tool categories" + element: '#title_filter > a' intro: "Tools are grouped into categories to make them easier to find." position: "right" preclick: - - 'a[href$="tool_runner?tool_id=Filter1"]' - postclick: - "#title_filter a" - - element: '#center-panel' - intro: "This is your Filter tool." + - title: "Select a tool" + element: 'a[href$="tool_runner?tool_id=Filter1"]' + intro: "Select and load a tool for your analysis by clicking the underlined link." position: "right" - preclick: - - '#center-panel' + postclick: + - 'a[href$="tool_runner?tool_id=Filter1"]' - - element: '#uid-0' - intro: "Your tool parameters." + - title: "Filter Tool" + element: '#center-panel' + intro: "Your tool is loaded into the main Galaxy page and ready for use." + position: "right" + #backdropContainer: 'background' + #backdrop: true + + - title: "Tool parameters" + element: '#uid-0' + intro: "Here you can choose your tool parameters. Select your input dataset from your history and specify parameters for your analysis." position: "right" - - element: 'div.toolHelp' - intro: "Your tool parameters." + - title: "Tool help" + element: 'div.ui-form-help' + intro: "Every Galaxy tool has a help section with detailed information about the tool and its parameters. + Have a look and study your tool in depth by reading it." + position: "top" + + - title: "Run your tool" + element: '#execute' + intro: "Click on 'Execute' to run your tool and send it to the compute cluster. + Don't be afraid to test different settings in parallel. Galaxy can handle multiple runs of the same tool." position: "right" - - element: '#execute' - intro: "Send your tool to the Compute Cluster." - position: "right" - preclick: + postclick: - '#execute' - - element: "#right" - intro: "This is your history! All anylysis steps will be recorded and can be redone at any time." + + - title: "History" + element: "#right" + intro: "This is your Galaxy history! All analysis steps with results of the tools and their parameters will be recorded here and can be redone at any time.
+ A running tool is shown in yellow and if your calculation is done, it turns green. If your dataset is + grey this means you are queued and need to wait until your tool can be started. If your dataset turns into red, an error has occurred. Please report the bug to the Galaxy team with the bug report button." position: "left" - - element: "#masthead" - intro: "Your top panel will give you access to a lot of useful things." + + - title: "Rename history" + element: "#current-history-panel > div.controls > div.title > div" + intro: "Name your history here and press enter." + position: "left" + preclick: + - "#current-history-panel > div.controls > div.title > div" + + - title: "View dataset" + element: ".fa-eye:eq(0)" + intro: "View your dataset by clicking the eye button." + position: "left" + #preclick: + # - ".fa-eye:eq(0)" + + - title: "Rename dataset" + element: ".fa-pencil:eq(0)" + intro: "Rename your dataset by clicking the pencil button." + position: "left" + #preclick: + # - ".fa-pencil:eq(0)" + + - title: "Remove dataset" + element: ".fa-times:eq(0)" + intro: "Delete your dataset by clicking the x-button." + position: "left" + #postclick: + # - ".fa-times:eq(0)" + + - title: "Dataset information" + element: "div.title-bar.clear:eq(0)" + intro: "Clicking on your dataset provides you with more information regarding your dataset (e.g. filetype or size)." + position: "left" + preclick: + - "div.title-bar.clear:eq(0)" + + - title: "Re-run tool" + element: ".fa-refresh:eq(1)" + intro: "By clicking the reload button, you can re-run your tool again (e.g. with different parameters or on another dataset)." + position: "left" + preclick: + - ".fa-refresh:eq(1)" + + + - title: "Panel collaps" + element: "#left > div.unified-panel-footer > div.panel-collapse.left" + intro: "To extend the view for your main Galaxy page in the middle, you can collapse the tool panel on the left hand side. Clicking the panel arrow on the right hand side, collapses the history." + position: "top" + postclick: + - "#left > div.unified-panel-footer > div.panel-collapse.left" + + - title: 'Top panel' + element: "#masthead" + intro: "The top panel will give you access to a lot of useful things." position: "bottom" - - element: "#analysis" - intro: "Start your analysis from here." + + - title: 'Analyze data' + element: "#analysis" + intro: "This is the current view. Start your analysis from here." position: "bottom" - - element: "#workflow" - intro: "Manage, Import, Export and Share your Workflows." + + - title: 'Workflow' + element: "#workflow" + intro: "Create, manage, import, export and share your Workflows." position: "bottom" - - element: "#shared" - intro: "Get access to all Workflows, Histories, Pages, Visualizations and you Data Library that are shared with you." + + - title: 'Shared data' + element: "#shared" + intro: "Get access to all Workflows, Histories, Pages, Visualizations and your Data Library that are shared with you." position: "bottom" - - element: "#visualization" - intro: "Want to start visualize your data in Trackster? Start here!" + + - title: 'Visualization' + element: "#visualization" + intro: "Do you want to start to visualize your data in Trackster? Start here!
Galaxy offers a lot more visualizations!" position: "bottom" - - element: "#help" - intro: "Here you get more help from the Galaxy Community with Videos and a QA board." + + - title: 'Help' + element: "#help" + intro: "Here you get more help from the Galaxy Community with Videos, a QA board and more tours." position: "bottom" - - element: "#user" + + - title: 'User Preferences' + element: "#user" intro: "Login and start your analysis!" position: "bottom" + + - title: 'Scratchbook' + element: "#enable-scratchbook" + intro: "Scratchbook offers you multiple visualizations next to each other. Have a look at our Scratchbook tour to learn more about it." + position: "bottom" + + - title: "Enjoy Galaxy" + intro: "Thanks for taking this tour! Happy research with Galaxy!" diff --git a/config/plugins/tours/core.history.yaml b/config/plugins/tours/core.history.yaml index 820a69717c7..873e95b854e 100644 --- a/config/plugins/tours/core.history.yaml +++ b/config/plugins/tours/core.history.yaml @@ -1,90 +1,95 @@ name: History Introduction -description: A detailed introduction to the Galaxy History +description: A detailed introduction to the Galaxy History title_default: "Galaxy History Introduction" steps: - - content: "This short tour will walk you through Galaxy's History and datasets." + - content: "This short tour will guide you through Galaxy's History and datasets." - - element: ".upload-button" + - title: "Upload data" + element: ".upload-button" intro: | - At first we get some data into your Galaxy and into your History.
- Use this button to upload your data. + "At first we upload some data into your Galaxy history.
+ Use this button to upload your data." position: "right" postclick: - ".upload-button" - - element: "button#btn-local" - intro: "Upload data from your computer." + - title: "Upload your data" + element: "button#btn-local" + intro: "You can upload data from your computer." position: "top" postclick: - "button#btn-new" - - element: "button#btn-new" - intro: "Copy and Paste data or include URLs to data which will be fetched automatically by Galaxy." + - title: "Upload your data" + element: "button#btn-new" + intro: "Copy and paste data directly into Galaxy or include URLs that lead to your data." position: "top" - - element: "textarea#text-content" - intro: "We insert some URLs to get example data in Galaxy." + - title: "Insert URLs" + element: "textarea#text-content" + intro: "URLs separated by a line break are automatically downloaded by Galaxy." position: "bottom" textinsert: | - file://home/bag/Bilder/Python-Programming-in-Galaxy.png - file://home/bag/Downloads/a.tab + https://wiki.galaxyproject.org/Images/GalaxyLogo?action=AttachFile&do=get&target=galaxy_project_logo.jpg + https://raw.githubusercontent.com/bgruening/galaxytools/adf077b912ddebd97b07b947b855cdd2862ed8ef/tools/statistics/test-data/anderson.tabular - - element: "button#btn-start" + - title: "Upload your data" + element: "button#btn-start" intro: "Upload the data into your Galaxy History." - position: "bottom" + position: "top" postclick: - "button#btn-start" - "button#btn-close" - - element: "#right" - intro: "This is your history! All anylysis steps will be recorded and can be redone at any time." + - title: "History" + element: "#right" + intro: "This is your history! All analysis steps will be recorded and can be redone at any time." position: "left" - - element: "#dataset-2d9035b3fc152403" + - title: "Dataset information" + element: "div.title-bar.clear:eq(0)" intro: "This is one of your uploaded datasets. You can get more informations and options like different visualizations by clicking on it." position: "left" postclick: - - "#dataset-2d9035b3fc152403 > div.title-bar.clear > div > span.name" + - "div.title-bar.clear:eq(0)" - - element: "#dataset-2d9035b3fc152403 > div.details > div.summary > div.datatype > label" - title: "Metadata" - intro: "Galaxy has assigned a datatype too your dataset during upload, which you can see here." + - title: "Metadata" + element: "#current-history-panel > div.list-items > div:nth-child(1) > div.details > div.summary > div.datatype > label" + intro: "Galaxy has assigned a datatype to your dataset during upload, which you can see here." position: "left" - - element: "#dataset-2d9035b3fc152403 > div.details > div.actions.clear > div.left > a.download-btn.icon-btn" + - element: "#current-history-panel > div.list-items > div:nth-child(1) > div.details > div.actions.clear > div.left > a.download-btn.icon-btn" title: "Download your dataset" intro: "You can download every dataset by using the floppy disc symbol." position: "left" - - element: "#dataset-2d9035b3fc152403 > div.details > div.actions.clear > div.left > a.icon-btn.params-btn" + - element: "#current-history-panel > div.list-items > div:nth-child(1) > div.details > div.actions.clear > div.left > a.icon-btn.params-btn" title: "Even more information" intro: "Get an overview of all metadata associated with your dataset by using the Information symbol." position: "left" preclick: - - "#dataset-2d9035b3fc152403 > div.details > div.actions.clear > div.left > a.icon-btn.params-btn" + - "#current-history-panel > div.list-items > div:nth-child(1) > div.details > div.actions.clear > div.left > a.icon-btn.params-btn" - - - - element: "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.display-btn" + - element: "#current-history-panel > div.list-items > div:nth-child(1) > div.primary-actions > a.icon-btn.display-btn" title: "Inspect your data" intro: "The eye symbol can be used to look at your data." position: "left" preclick: - - "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.display-btn" + - "#current-history-panel > div.list-items > div:nth-child(1) > div.primary-actions > a.icon-btn.display-btn" - - element: "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.edit-btn" + - element: "#current-history-panel > div.list-items > div:nth-child(1) > div.primary-actions > a.icon-btn.edit-btn" title: "Edit metadata" intro: "With the pencil button you can edit metadata attributes of your dataset, like the associated filetype or the dataset name." position: "left" preclick: - - "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.edit-btn" + - "#current-history-panel > div.list-items > div:nth-child(1) > div.primary-actions > a.icon-btn.edit-btn" - - element: "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.delete-btn" + - element: "#current-history-panel > div.list-items > div:nth-child(1) > div.primary-actions > a.icon-btn.delete-btn" title: "Remove datasets" intro: "You can remove a dataset from the history with the cross symbol." position: "left" postclick: - - "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.delete-btn" + - "#current-history-panel > div.list-items > div:nth-child(1) > div.primary-actions > a.icon-btn.delete-btn" - element: "#current-history-panel > div.controls > div.subtitle > a" title: "Include all deleted datasets" @@ -93,14 +98,14 @@ steps: postclick: - "#current-history-panel > div.controls > div.subtitle > a" - - element: "#dataset-2d9035b3fc152403 > div.warnings > div > a" + - element: "#current-history-panel > div.list-items > div:nth-child(1) > div.warnings > div > a" title: "Undeleting a dataset" intro: | - "Galaxy datasets are only marked as deleled and can be recovered by exeecuting this link. - Please note that datasets marked as deleted can be purged by your administrator at any time. :beer: " + Galaxy datasets are only marked as deleled and can be recovered by clicking this link. + Please note that datasets marked as deleted can be purged by your administrator at any time. position: "bottom" postclick: - - "#dataset-2d9035b3fc152403 > div.warnings > div > a" + - "#current-history-panel > div.list-items > div:nth-child(1) > div.warnings > div > a" - element: "#current-history-panel > div.controls > div.subtitle > a" title: "Hiding all deleted datasets" @@ -111,7 +116,7 @@ steps: - element: "#current-history-panel > div.controls > div.title > div" title: "Change your History name" - intro: "You can change the history name clicking on the title" + intro: "You can change the history name clicking on the title." position: "bottom" preclick: - "#current-history-panel > div.controls > div.title > div" @@ -122,11 +127,11 @@ steps: position: "left" textinsert: "WWFSMD" preclick: - - "#current-history-panel > div.controls > div.search > div > input" + - "#current-history-panel > div.controls > div.search > div > input" - element: "#history-options-button" title: "History Options" - intro: "In the History menue you will find a lot more usful History options." + intro: "In the History menu you will find a lot more useful History options." position: "left" postclick: - "#history-options-button" diff --git a/static/maps/mvc/history/history-view-edit.js.map b/static/maps/mvc/history/history-view-edit.js.map index b62ecc46623..0da94f61674 100644 --- a/static/maps/mvc/history/history-view-edit.js.map +++ b/static/maps/mvc/history/history-view-edit.js.map @@ -1 +1 @@ -{"version":3,"file":"history-view-edit.js","sources":["../../../src/mvc/history/history-view-edit.js"],"names":["define","HISTORY_VIEW","HISTORY_CONTENTS","STATES","HDA_MODEL","HDA_LI_EDIT","HDCA_LI_EDIT","TAGS","ANNOTATIONS","LIST_COLLECTION_CREATOR","PAIR_COLLECTION_CREATOR","LIST_OF_PAIRS_COLLECTION_CREATOR","faIconButton","PopupMenu","_l","_super","HistoryView","HistoryViewEdit","extend","HDAViewClass","HDAListItemEdit","HDCAViewClass","HDCAListItemEdit","initialize","attributes","prototype","call","this","tagsEditor","annotationEditor","purgeAllowed","annotationEditorShown","tagsEditorShown","_setUpListeners","panel","on","ev","data","dataDropped","dropTargetOff","_renderCounts","_setUpCollectionListeners","collection","_handleHdaDeletionChange","_handleHdaVisibleChange","model","fetch","_setUpModelListeners","updateHistoryDiskSize","_buildNewRender","$newRender","Galaxy","user","id","get","_renderTags","_renderAnnotation","renderItems","$whereTo","views","toggleLink","_class","text","join","$el","deleted","where","hidden","visible","msgs","length","push","showDeleted","showHidden","find","html","$where","TagsEditor","el","onshowFirstTime","render","onshow","toggleHDATagEditors","fxSpeed","onhide","$activator","title","classes","faIcon","appendTo","AnnotationEditor","toggleHDAAnnotationEditors","_setUpBehaviors","isAnonymous","nameSelector","attr","tooltip","placement","make_text_editable","on_finish","newName","previousName","save","name","fail","previous","multiselectActions","actions","func","action","HistoryDatasetAssociation","hide","getSelectedModels","ajaxQueue","unhide","undelete","confirm","purge","concat","_collectionActions","createListCollection","done","refresh","createPairCollection","createListOfPairsCollection","_attachItems","$list","append","reverse","map","view","_attachView","unshift","prepend","trigger","slideDown","_getItemViewOptions","options","_","itemModel","removeItemView","args","Array","slice","arguments","each","toggle","apply","events","clone","click .show-selectors-btn","click .toggle-deleted-link","toggleShowDeleted","click .toggle-hidden-link","toggleShowHidden","dropTargetOn","dropTarget","dropHandlers","dragenter","bind","dragover","dragleave","drop","$dropTarget","_renderDropTarget","before","_renderDropTargetHelp","evName","hasOwnProperty","$","remove","addClass","css","height","margin","border","border-radius","color","font-size","font-style","_dropHandlers","off","dropTargetToggle","preventDefault","stopPropagation","dataTransfer","dropEffect","getData","JSON","parse","err","warn","isObject","model_class","contents","copy","jQuery","when","toString"],"mappings":"AAAAA,QACI,2BACA,+BACA,qBACA,wBACA,0BACA,2BACA,UACA,iBACA,yCACA,yCACA,kDACA,oBACA,oBACA,qBACA,oBACD,SACCC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAMJ,GAAIC,GAASd,EAAae,YAUtBC,EAAkBF,EAAOG,QAOzBC,aAAkBd,EAAYe,gBAE9BC,cAAkBf,EAAagB,iBAM/BC,WAAa,SAAUC,GACnBA,EAAaA,MACbT,EAAOU,UAAUF,WAAWG,KAAMC,KAAMH,GAIxCG,KAAKC,WAAa,KAElBD,KAAKE,iBAAmB,KAGxBF,KAAKG,aAAeN,EAAWM,eAAgB,EAI/CH,KAAKI,sBAAyBP,EAAWO,wBAAyB,EAClEJ,KAAKK,gBAAmBR,EAAWQ,kBAAmB,GAI1DC,gBAAkB,WACd,GAAIC,GAAQP,IACZZ,GAAOU,UAAUQ,gBAAgBP,KAAMQ,GAEvCA,EAAMC,GAAI,OAAQ,SAA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,OAAI+G,GAAEsD,SAAU3J,IAA+B,8BAArBA,EAAK4J,aAA+C5J,EAAKgB,GACxEnB,EAAMW,MAAMqJ,SAASC,KAAM9J,EAAKgB,IAEpC+I,OAAOC,QAKlBC,SAAc,WACV,MAAO,oBAAwB3K,KAAW,MAAIA,KAAKkB,MAAMS,IAAK,QAAU,IAAU,MAKtF,QACIrC,gBAAkBA"} \ No newline at end of file +{"version":3,"file":"history-view-edit.js","sources":["../../../src/mvc/history/history-view-edit.js"],"names":["define","HISTORY_VIEW","HISTORY_CONTENTS","STATES","HDA_MODEL","HDA_LI_EDIT","HDCA_LI_EDIT","TAGS","ANNOTATIONS","LIST_COLLECTION_CREATOR","PAIR_COLLECTION_CREATOR","LIST_OF_PAIRS_COLLECTION_CREATOR","faIconButton","PopupMenu","_l","_super","HistoryView","HistoryViewEdit","extend","HDAViewClass","HDAListItemEdit","HDCAViewClass","HDCAListItemEdit","initialize","attributes","prototype","call","this","tagsEditor","annotationEditor","purgeAllowed","annotationEditorShown","tagsEditorShown","_setUpListeners","panel","on","ev","data","dataDropped","dropTargetOff","_renderCounts","_setUpCollectionListeners","collection","_handleHdaDeletionChange","_handleHdaVisibleChange","model","fetch","_setUpModelListeners","updateHistoryDiskSize","_buildNewRender","$newRender","Galaxy","user","id","get","_renderTags","_renderAnnotation","renderItems","$whereTo","views","toggleLink","_class","text","join","$el","deleted","where","hidden","visible","msgs","length","push","showDeleted","showHidden","find","html","$where","TagsEditor","el","onshowFirstTime","render","onshow","toggleHDATagEditors","fxSpeed","onhide","$activator","title","classes","faIcon","appendTo","AnnotationEditor","toggleHDAAnnotationEditors","_setUpBehaviors","isAnonymous","nameSelector","attr","tooltip","placement","make_text_editable","on_finish","newName","previousName","save","name","fail","previous","multiselectActions","actions","func","action","HistoryDatasetAssociation","hide","getSelectedModels","ajaxQueue","unhide","undelete","confirm","purge","concat","_collectionActions","createListCollection","done","refresh","createPairCollection","createListOfPairsCollection","_attachItems","$list","append","reverse","map","view","_attachView","unshift","prepend","trigger","slideDown","_getItemViewOptions","options","_","itemModel","removeItemView","args","Array","slice","arguments","each","toggle","apply","events","clone","click .show-selectors-btn","click .toggle-deleted-link","toggleShowDeleted","click .toggle-hidden-link","toggleShowHidden","dropTargetOn","dropTarget","dropHandlers","dragenter","bind","dragover","dragleave","drop","$dropTarget","_renderDropTarget","before","_renderDropTargetHelp","evName","hasOwnProperty","$","remove","addClass","css","height","margin","border","border-radius","color","font-size","font-style","_dropHandlers","off","dropTargetToggle","preventDefault","stopPropagation","dataTransfer","originalEvent","dropEffect","getData","JSON","parse","err","warn","isObject","model_class","contents","copy","jQuery","when","toString"],"mappings":"AAAAA,QACI,2BACA,+BACA,qBACA,wBACA,0BACA,2BACA,UACA,iBACA,yCACA,yCACA,kDACA,oBACA,oBACA,qBACA,oBACD,SACCC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAMJ,GAAIC,GAASd,EAAae,YAUtBC,EAAkBF,EAAOG,QAOzBC,aAAkBd,EAAYe,gBAE9BC,cAAkBf,EAAagB,iBAM/BC,WAAa,SAAUC,GACnBA,EAAaA,MACbT,EAAOU,UAAUF,WAAWG,KAAMC,KAAMH,GAIxCG,KAAKC,WAAa,KAElBD,KAAKE,iBAAmB,KAGxBF,KAAKG,aAAeN,EAAWM,eAAgB,EAI/CH,KAAKI,sBAAyBP,EAAWO,wBAAyB,EAClEJ,KAAKK,gBAAmBR,EAAWQ,kBAAmB,GAI1DC,gBAAkB,WACd,GAAIC,GAAQP,IACZZ,GAAOU,UAAUQ,gBAAgBP,KAAMQ,GAEvCA,EAAMC,GAAI,OAAQ,SAAUC,EAAIC,GAC5BH,EAAMI,YAAaD,GAEnBH,EAAMK,kBAEVL,EAAMC,GAAI,6BAA8B,WACpCD,EAAMM,iBACPN,IAKPO,0BAA4B,WASxB,MARA1B,GAAOU,UAAUgB,0BAA0Bf,KAAMC,MAEjDA,KAAKe,WAAWP,GA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,KAAW,MAAIA,KAAKkB,MAAMS,IAAK,QAAU,IAAU,MAKtF,QACIrC,gBAAkBA"} \ No newline at end of file diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index 7dd8064b60e..7f0082cb0db 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -7,6 +7,6 @@ value:c.value})),u.append(m),s(g,c.options,h),u.append(g),n(u,p)}else u.append(o this._addScratchBookFn(e.find(".visualization-link").addBack(".visualization-link")),e},_addScratchBookFn:function(t){t.click(function(t){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add({title:"Visualization",url:a(this).attr("href")}),t.preventDefault(),t.stopPropagation())})},_renderTags:function(t){if(this.hasUser){var e=this;this.tagsEditor=new n.TagsEditor({model:this.model,el:t.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){e.tagsEditorShown=!0},onhide:function(){e.tagsEditorShown=!1},$activator:r({title:c("Edit dataset tags"),classes:"tag-btn",faIcon:"fa-tags"}).appendTo(t.find(".actions .right"))}),this.tagsEditorShown&&this.tagsEditor.toggle(!0)}},_renderAnnotation:function(t){if(this.hasUser){var e=this;this.annotationEditor=new s.AnnotationEditor({model:this.model,el:t.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){e.annotationEditorShown=!0},onhide:function(){e.annotationEditorShown=!1},$activator:r({title:c("Edit dataset annotation"),classes:"annotate-btn",faIcon:"fa-comment"}).appendTo(t.find(".actions .right"))}),this.annotationEditorShown&&this.annotationEditor.toggle(!0)}},_makeDbkeyEditLink:function(t){if("?"===this.model.get("metadata_dbkey")&&!this.model.isDeletedOrPurged()){var e=a('?').attr("href",this.model.urls.edit).attr("target",this.linkTarget);t.find(".dbkey .value").replaceWith(e)}},events:o.extend(o.clone(d.prototype.events),{"click .undelete-link":"_clickUndeleteLink","click .purge-link":"_clickPurgeLink","click .edit-btn":function(t){this.trigger("edit",this,t)},"click .delete-btn":function(t){this.trigger("delete",this,t)},"click .rerun-btn":function(t){this.trigger("rerun",this,t)},"click .report-err-btn":function(t){this.trigger("report-err",this,t)},"click .visualization-btn":function(t){this.trigger("visualize",this,t)},"click .dbkey a":function(t){this.trigger("edit",this,t)}}),_clickUndeleteLink:function(t){return this.model.undelete(),!1},_clickPurgeLink:function(t){return this.model.purge(),!1},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDAEditView("+t+")"}});return h.prototype.templates=function(){var t=o.extend({},d.prototype.templates.warnings,{failed_metadata:l.wrapTemplate(['<% if( dataset.state === "failed_metadata" ){ %>','
',c("An error occurred setting the metadata for this dataset"),'
',c("Set it manually or retry auto-detection"),"","
","<% } %>"],"dataset"),deleted:l.wrapTemplate(["<% if( dataset.deleted && !dataset.purged ){ %>",'
',c("This dataset has been deleted"),'
',c("Undelete it"),"","<% if( view.purgeAllowed ){ %>",'
',c("Permanently remove it from disk"),"","<% } %>","
","<% } %>"],"dataset")}),e=l.wrapTemplate(["<% if( visualizations.length === 1 ){ %>",'">','',"","<% } else { %>",'","<% } %>"],"visualizations");return o.extend({},d.prototype.templates,{warnings:t,visualizations:e})}(),{DatasetListItemEdit:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(15),i(6),i(5)],s=function(t,e,i){var n="dataset",s=e.SearchableModelMixin,l=o.Model.extend(e.LoggableMixin).extend(e.mixin(s,{_logNamespace:n,defaults:{state:t.NEW,deleted:!1,purged:!1,name:"(unnamed dataset)",accessible:!0,data_type:"",file_ext:"",file_size:0,meta_files:[],misc_blurb:"",misc_info:"",tags:[]},initialize:function(e,i){this.debug(this+"(Dataset).initialize",e,i),this.get("accessible")||this.set("state",t.NOT_VIEWABLE),this.urls=this._generateUrls(),this._setUpListeners()},_generateUrls:function(){var t=this.get("id");if(!t)return{};var e={purge:"datasets/"+t+"/purge_async",display:"datasets/"+t+"/display/?preview=True",edit:"datasets/"+t+"/edit",download:"datasets/"+t+"/display?to_ext="+this.get("file_ext"),report_error:"dataset/errors?id="+t,rerun:"tool_runner/rerun?id="+t,show_params:"datasets/"+t+"/show_params",visualization:"visualization",meta_download:"dataset/get_metadata_file?hda_id="+t+"&metadata_name="};return a.each(e,function(t,i){e[i]=Galaxy.root+t}),this.urls=e,e},_setUpListeners:function(){this.on("change:state",function(t,e){this.log(this+" has changed state:",t,e),this.inReadyState()&&this.trigger("state:ready",t,e,this.previous("state"))}),this.on("change:id change:file_ext",function(t){this._generateUrls()})},toJSON:function(){var t=o.Model.prototype.toJSON.call(this);return a.extend(t,{urls:this.urls})},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},inReadyState:function(){var e=a.contains(t.READY_STATES,this.get("state"));return this.isDeletedOrPurged()||e},hasDetails:function(){return a.has(this.attributes,"genome_build")},hasData:function(){return this.get("file_size")>0},fetch:function(t){var e=this;return o.Model.prototype.fetch.call(this,t).always(function(){e._generateUrls()})},"delete":function(t){return this.get("deleted")?r.when():this.save({deleted:!0},t)},undelete:function(t){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},t)},purge:function(t){if(this.get("purged"))return r.when();t=t||{},t.url=this.urls.purge;var e=this,n=r.ajax(t);return n.done(function(t,i,n){e.set({deleted:!0,purged:!0})}),n.fail(function(n,s,o){var a=i("Unable to purge dataset"),r="Removal of datasets by users is not allowed in this Galaxy instance";n.responseJSON&&n.responseJSON.error?a=n.responseJSON.error:-1!==n.responseText.indexOf(r)&&(a=r),n.responseText=a,e.trigger("error",e,n,t,i(a),{error:a})}),n},searchAttributes:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],searchAliases:{title:"name",format:"file_ext",database:"genome_build",blurb:"misc_blurb",description:"misc_blurb",info:"misc_info",tag:"tags"},toString:function(){var t=this.get("id")||"";return this.get("name")&&(t='"'+this.get("name")+'",'+t),"Dataset("+t+")"}})),c=o.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,model:l,urlRoot:Galaxy.root+"api/datasets",url:function(){return this.urlRoot},ids:function(){return this.map(function(t){return t.get("id")})},notReady:function(){return this.filter(function(t){return!t.inReadyState()})},haveDetails:function(){return this.all(function(t){return t.hasDetails()})},ajaxQueue:function(t,e){var i=r.Deferred(),n=this.length,s=[];if(!n)return i.resolve([]),i;var o=this.chain().reverse().map(function(a,r){return function(){var l=t.call(a,e);l.done(function(t){i.notify({curr:r,total:n,response:t,model:a})}),l.always(function(t){s.push(t),o.length?o.shift()():i.resolve(s)})}}).value();return o.shift()(),i},matches:function(t){return this.filter(function(e){return e.matches(t)})},toString:function(){return["DatasetAssociationCollection(",this.length,")"].join("")}});return{DatasetAssociation:l,DatasetAssociationCollection:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(3),i(1))},function(t,e,i){var n,s;(function(o){n=[i(37),i(6),i(5)],s=function(t,e,i){var n=t.DatasetListItemView,s=n.extend({className:n.prototype.className+" history-content",initialize:function(t,e){n.prototype.initialize.call(this,t,e)},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDAListItemView("+t+")"}});return s.prototype.templates=function(){var t=e.wrapTemplate(['
','','
','<%- dataset.hid %> ','<%- dataset.name %>',"
","
"],"dataset"),s=o.extend({},n.prototype.templates.warnings,{hidden:e.wrapTemplate(["<% if( !dataset.visible ){ %>",'
',i("This dataset has been hidden"),"
","<% } %>"],"dataset")});return o.extend({},n.prototype.templates,{titleBar:t,warnings:s})}(),{HDAListItemView:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o){n=[i(95),i(46),i(6),i(5)],s=function(t,e,i,n){var s=t.DatasetAssociation,a=e.HistoryContentMixin,r=s.extend(i.mixin(a,{constructor:function(t,e){a.constructor.call(this,t,e)},defaults:o.extend({},s.prototype.defaults,a.defaults,{model_class:"HistoryDatasetAssociation"}),initialize:function(t,e){s.prototype.initialize.call(this,t,e),a.initialize.call(this,t,e)},toString:function(){var t=this.get("id")||"";return this.get("name")&&(t=this.get("hid")+' :"'+this.get("name")+'",'+t),"HDA("+t+")"}}));return{HistoryDatasetAssociation:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o){n=[i(15),i(34),i(93),i(6),i(5)],s=function(t,e,i,n,s){var a=e.DCListItemView,r=a.extend({className:a.prototype.className+" history-content",_setUpListeners:function(){a.prototype._setUpListeners.call(this),this.model.on({"change:populated change:visible":function(t,e){this.render()}},this)},_getFoldoutPanelClass:function(){switch(this.model.get("collection_type")){case"list":return i.ListCollectionView;case"paired":return i.PairCollectionView;case"list:paired":return i.ListOfPairsCollectionView}throw new TypeError("Uknown collection_type: "+this.model.get("collection_type"))},_swapNewRender:function(e){a.prototype._swapNewRender.call(this,e);var i=this.model.get("populated")?t.OK:t.RUNNING;return this.$el.addClass("state-"+i),this.$el},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDCAListItemView("+t+")"}});return r.prototype.templates=function(){var t=o.extend({},a.prototype.templates.warnings,{hidden:n.wrapTemplate(["<% if( !collection.visible ){ %>",'
',s("This collection has been hidden"),"
","<% } %>"],"collection")}),e=n.wrapTemplate(['
','','
','<%- collection.hid %> ','<%- collection.name %>',"
",'
',"
"],"collection");return o.extend({},a.prototype.templates,{warnings:t,titleBar:e})}(),{HDCAListItemView:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o,a,r){n=[i(47),i(4),i(6),i(5)],s=function(t,e,i,n){var s="history",l=o.Model.extend(i.LoggableMixin).extend(i.mixin(i.SearchableModelMixin,{_logNamespace:s,defaults:{model_class:"History",id:null,name:"Unnamed History",state:"new",deleted:!1},urlRoot:Galaxy.root+"api/histories",initialize:function(e,i,n){n=n||{},this.logger=n.logger||null,this.log(this+".initialize:",e,i,n),this.log("creating history contents:",i),this.contents=new t.HistoryContents(i||[],{historyId:this.get("id")}),this._setUpListeners(),this.updateTimeoutId=null},_setUpListeners:function(){this.on("error",function(t,e,i,n,s){this.errorHandler(t,e,i,n,s)}),this.contents&&this.listenTo(this.contents,"error",function(){this.trigger.apply(this,["error:contents"].concat(a.makeArray(arguments)))}),this.on("change:id",function(t,e){this.contents&&(this.contents.historyId=e)},this)},errorHandler:function(t,e,i,n,s){this.clearUpdateTimeout()},nice_size:function(){return e.bytesToString(this.get("size"),!0,2)},toJSON:function(){return r.extend(o.Model.prototype.toJSON.call(this),{nice_size:this.nice_size()})},get:function(t){return"nice_size"===t?this.nice_size():o.Model.prototype.get.apply(this,arguments)},ownedByCurrUser:function(){return Galaxy&&Galaxy.user?Galaxy.user.isAnonymous()||Galaxy.user.id!==this.get("user_id")?!1:!0:!1},contentsCount:function(){return r.reduce(r.values(this.get("state_details")),function(t,e){return t+e},0)},searchAttributes:["name","annotation","tags"],searchAliases:{title:"name",tag:"tags"},checkForUpdates:function(t){return this.contents.running().length?this.setUpdateTimeout():(this.trigger("ready"),r.isFunction(t)&&t.call(this)),this},setUpdateTimeout:function(t){t=t||l.UPDATE_DELAY;var e=this;return this.clearUpdateTimeout(),this.updateTimeoutId=setTimeout(function(){e.refresh()},t),this.updateTimeoutId},clearUpdateTimeout:function(){this.updateTimeoutId&&(clearTimeout(this.updateTimeoutId),this.updateTimeoutId=null)},refresh:function(t,e){t=t||[],e=e||{};var i=this;e.data=e.data||{},t.length&&(e.data.details=t.join(","));var n=this.contents.fetch(e);return n.done(function(t){i.checkForUpdates(function(){this.fetch()})}),n},_delete:function(t){return this.get("deleted")?a.when():this.save({deleted:!0},t)},purge:function(t){return this.get("purged")?a.when():this.save({deleted:!0,purged:!0},t)},undelete:function(t){return this.get("deleted")?this.save({deleted:!1},t):a.when()},copy:function(t,e,i){if(t=void 0!==t?t:!0,!this.id)throw new Error("You must set the history ID before copying it.");var n={history_id:this.id};t&&(n.current=!0),e&&(n.name=e),i||(n.all_datasets=!1);var s=this,o=a.post(this.urlRoot,n);return t?o.then(function(t){var e=new l(t);return e.setAsCurrent().done(function(){s.trigger("copied",s,t)})}):o.done(function(t){s.trigger("copied",s,t)})},setAsCurrent:function(){var t=this,e=a.getJSON(Galaxy.root+"history/set_as_current?id="+this.id);return e.done(function(){t.trigger("set-as-current",t)}),e},toString:function(){return"History("+this.get("id")+","+this.get("name")+")"}}));l.UPDATE_DELAY=4e3,l.getHistoryData=function(t,e){function i(e){return"current"===t?a.getJSON(Galaxy.root+"history/current_history_json"):a.ajax(Galaxy.root+"api/histories/"+t)}function n(t){return t&&t.empty}function s(t){if(n(t))return[];r.isFunction(o)&&(o=o(t)),r.isFunction(l)&&(l=l(t));var e={};return o.length&&(e.dataset_details=o.join(",")),l.length&&(e.dataset_collection_details=l.join(",")),a.ajax(Galaxy.root+"api/histories/"+t.id+"/contents",{data:e})}e=e||{};var o=e.detailIdsFn||[],l=e.hdcaDetailIds||[],c=a.Deferred(),d=null,h=e.historyFn||i,u=e.contentsFn||s,p=h(t);p.done(function(t){d=t,c.notify({status:"history data retrieved",historyJSON:d})}),p.fail(function(t,e,i){c.reject(t,"loading the history")});var f=p.then(u);return f.then(function(t){c.notify({status:"contents data retrieved",historyJSON:d,contentsJSON:t}),c.resolve(d,t)}),f.fail(function(t,e,i){c.reject(t,"loading the contents",{history:d})}),c};var c={fetch:function(t){return t=t||{},t.data=t.data||this._buildFetchData(t),t.traditional=!0,o.Collection.prototype.fetch.call(this,t)},_fetchOptions:["order","limit","offset","view","keys"],_buildFetchData:function(t){var e={},i=this._fetchDefaults();t=r.defaults(t||{},i),e=r.pick(t,this._fetchOptions);var n=r.has(t,"filters")?t.filters:i.filters||{};return r.isEmpty(n)||r.extend(e,this._buildFetchFilters(n)),e},_fetchDefaults:function(){return{}},_buildFetchFilters:function(t){var e={q:[],qv:[]};return r.each(t,function(t,i){t===!0&&(t="True"),t===!1&&(t="False"),e.q.push(i),e.qv.push(t)}),e}},d=o.Collection.extend(i.LoggableMixin).extend(c).extend({_logNamespace:s,model:l,DEFAULT_ORDER:"update_time",sortOrders:{update_time:{getter:function(t){return new Date(t.get("update_time"))},asc:!1},"update_time-asc":{getter:function(t){return new Date(t.get("update_time"))},asc:!0},name:{getter:function(t){return t.get("name")},asc:!0},"name-dsc":{getter:function(t){return t.get("name")},asc:!1},size:{getter:function(t){return t.get("size")},asc:!1},"size-asc":{getter:function(t){return t.get("size")},asc:!0}},initialize:function(t,e){e=e||{},this.log("HistoryCollection.initialize",arguments),this.includeDeleted=e.includeDeleted||!1,this.setOrder(e.order||this.DEFAULT_ORDER),this.currentHistoryId=e.currentHistoryId,this.allFetched=e.allFetched||!1,this.setUpListeners()},urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot},_fetchDefaults:function(){var t={order:this.order,view:"detailed"};return this.includeDeleted||(t.filters={deleted:!1,purged:!1}),t},setUpListeners:function(){this.on({"change:deleted":function(t){this.debug("change:deleted",this.includeDeleted,t.get("deleted")),!this.includeDeleted&&t.get("deleted")&&this.remove(t)},copied:function(t,e){this.setCurrent(new l(e,[]))},"set-as-current":function(t){var e=this.currentHistoryId;this.trigger("no-longer-current",e),this.currentHistoryId=t.id}},this)},sort:function(t){return t=t||{},this.setOrder(t.order),o.Collection.prototype.sort.call(this,t)},setOrder:function(t){var e=this,i=this.sortOrders[t];if(!r.isUndefined(i))return e.order=t,e.comparator=function(t,n){var s=e.currentHistoryId;return t.id===s?-1:n.id===s?1:(t=i.getter(t),n=i.getter(n),i.asc?t===n?0:t>n?1:-1:t===n?0:t>n?-1:1)},e.trigger("changed-order",e.order,e),e},fetch:function(t){if(t=t||{},this.allFetched)return a.when({});var e=this,i=r.defaults(t,{remove:!1,offset:e.length>=1?e.length-1:0,order:e.order}),n=t.limit;return r.isUndefined(n)||(i.limit=n),c.fetch.call(this,i).done(function(t){var i=r.isArray(t)?t.length:0;(!n||n>i)&&(e.allFetched=!0,e.trigger("all-fetched",e))})},create:function(t,e,i,n){var s=this,o=a.getJSON(Galaxy.root+"history/create_new_current");return o.done(function(t){s.setCurrent(new l(t,[],i||{}))})},setCurrent:function(t,e){return e=e||{},this.unshift(t,e),this.currentHistoryId=t.get("id"),e.silent||this.trigger("new-current",t,this),this},reset:function(t,e){return this.allFetched=!1,o.Collection.prototype.reset.call(this,t,e)},toString:function(){return"HistoryCollection("+this.length+")"}});return{History:l,HistoryCollection:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1),i(3))},function(t,e,i){var n,s;(function(o,a,r){n=[i(48),i(143),i(6),i(5),i(108)],s=function(t,e,i,n){var s="list",l=o.View.extend(i.LoggableMixin).extend({_logNamespace:s,viewClass:t.ListItemView,collectionClass:o.Collection,tagName:"div",className:"list-panel",fxSpeed:"fast",emptyMsg:n("This list is empty"),noneFoundMsg:n("No matching items found"),searchPlaceholder:n("search"),initialize:function(t,i){t=t||{},t.logger&&(this.logger=t.logger),this.log(this+".initialize:",t),this.fxSpeed=a.has(t,"fxSpeed")?t.fxSpeed:this.fxSpeed,this.filters=[],this.searchFor=t.searchFor||"",this.indicator=new e(this.$el),this.selecting=void 0!==t.selecting?t.selecting:!0,this.selected=t.selected||[],this.lastSelected=null,this.dragItems=t.dragItems||!1,this.viewClass=t.viewClass||this.viewClass,this.views=[],this.collection=t.collection||new this.collectionClass([]),this.filters=t.filters||[],this.$scrollContainer=t.$scrollContainer||this.$scrollContainer,this.title=t.title||"",this.subtitle=t.subtitle||"",this._setUpListeners()},freeViews:function(){return a.each(this.views,function(t){t.off()}),this.views=[],this},_setUpListeners:function(){return this.off(),this.on("error",function(t,e,i,n,s){console.error(t,e,i,n,s)},this),this.on("loading",function(){this._showLoadingIndicator("loading...",40)},this),this.on("loading-done",function(){this._hideLoadingIndicator(40)},this),this.once("rendered",function(){this.trigger("rendered:initial",this)},this),this.logger&&this.on("all",function(t){this.log(this+"",arguments)},this),this._setUpCollectionListeners(),this._setUpViewListeners(),this},_setUpCollectionListeners:function(){return this.log(this+"._setUpCollectionListeners",this.collection),this.collection.off(),this.collection.on("error",function(t,e,i,n,s){this.trigger("error",t,e,i,n,s)},this),this.collection.on("reset",function(){this.renderItems()},this),this.collection.on("add",this.addItemView,this),this.collection.on("remove",this.removeItemView,this),this.logger&&this.collection.on("all",function(t){this.info(this+"(collection)",arguments)},this),this},_setUpViewListeners:function(){this.log(this+"._setUpViewListeners"),this.on("view:selected",function(t,e){if(e&&e.shiftKey&&this.lastSelected){var i=this.viewFromModelId(this.lastSelected);i&&this.selectRange(t,i)}else e&&e.altKey&&!this.selecting&&this.showSelectors();this.selected.push(t.model.id),this.lastSelected=t.model.id},this),this.on("view:de-selected",function(t,e){this.selected=a.without(this.selected,t.model.id)},this)},render:function(t){this.log(this+".render",t);var e=this._buildNewRender();return this._setUpBehaviors(e),this._queueNewRender(e,t),this},_buildNewRender:function(){this.debug(this+"(ListPanel)._buildNewRender");var t=r(this.templates.el({},this));return this._renderControls(t),this._renderTitle(t),this._renderSubtitle(t),this._renderSearch(t),this.renderItems(t),t},_renderControls:function(t){this.debug(this+"(ListPanel)._renderControls");var e=r(this.templates.controls({},this));return t.find(".controls").replaceWith(e),e},_renderTitle:function(t){},_renderSubtitle:function(t){},_queueNewRender:function(t,e){e=void 0===e?this.fxSpeed:e;var i=this;i.log("_queueNewRender:",t,e),r(i).queue("fx",[function(t){this.$el.fadeOut(e,t)},function(e){i._swapNewRender(t),e()},function(t){this.$el.fadeIn(e,t)},function(t){i.trigger("rendered",i),t()}])},_swapNewRender:function(t){return this.$el.empty().attr("class",this.className).append(t.children()),this.selecting&&this.showSelectors(0),this},_setUpBehaviors:function(t){return t=t||this.$el,t.find(".controls [title]").tooltip({placement:"bottom"}),this._renderMultiselectActionMenu(t),this},_renderMultiselectActionMenu:function(t){t=t||this.$el;var e=t.find(".list-action-menu"),i=this.multiselectActions();if(!i.length)return e.empty();var s=r(['
','",'","
"].join("")),o=i.map(function(t){var e=['
  • ',t.html,"
  • "].join("");return r(e).click(function(e){return e.preventDefault(),t.func(e)})});return s.find("ul").append(o),e.replaceWith(s),s},multiselectActions:function(){return[]},$scrollContainer:function(){return this.$el.parent().parent()},$list:function(t){return(t||this.$el).find("> .list-items")},$messages:function(t){return(t||this.$el).find("> .controls .messages")},$emptyMessage:function(t){return(t||this.$el).find("> .empty-message")},renderItems:function(t){t=t||this.$el;var e=this;e.log(this+".renderItems",t);var i=e.$list(t);return e.views=e._filterCollection().map(function(t){return e._createItemView(t).render(0)}),i.empty(),e.views.length?(e._attachItems(t),e.$emptyMessage(t).hide()):e._renderEmptyMessage(t).show(),e.trigger("views:ready",e.views),e.views},_filterCollection:function(){var t=this;return t.collection.filter(a.bind(t._filterItem,t))},_filterItem:function(t){var e=this;return a.every(e.filters.map(function(e){return e.call(t)}))&&(!e.searchFor||t.matchesAll(e.searchFor))},_createItemView:function(t){var e=this._getItemViewClass(t),i=a.extend(this._getItemViewOptions(t),{model:t}),n=new e(i);return this._setUpItemViewListeners(n),n},_getItemViewClass:function(t){return this.viewClass},_getItemViewOptions:function(t){return{fxSpeed:this.fxSpeed,expanded:!1,selectable:this.selecting,selected:a.contains(this.selected,t.id),draggable:this.dragItems}},_setUpItemViewListeners:function(t){var e=this;return t.on("all",function(){var t=Array.prototype.slice.call(arguments,0);t[0]="view:"+t[0],e.trigger.apply(e,t)}),t.on("draggable:dragstart",function(t,e){var i={},n=this.getSelectedModels();i=n.length?n.toJSON():[e.model.toJSON()],t.dataTransfer.setData("text",JSON.stringify(i))},this),e},_attachItems:function(t){return this.$list(t).append(this.views.map(function(t){return t.$el})),this},_renderEmptyMessage:function(t){this.debug("_renderEmptyMessage",t,this.searchFor);var e=this.searchFor?this.noneFoundMsg:this.emptyMsg;return this.$emptyMessage(t).text(e)},expandAll:function(){a.each(this.views,function(t){t.expand()})},collapseAll:function(){a.each(this.views,function(t){t.collapse()})},addItemView:function(t,e,i){this.log(this+".addItemView:",t);var n=this;if(n._filterItem(t)){var s=n._createItemView(t);return r(s).queue("fx",[function(t){n.$emptyMessage().fadeOut(n.fxSpeed,t)},function(t){n._attachView(s),t()}]),s}},_attachView:function(t){var e=this;e.views.push(t),e.$list().append(t.render(0).$el.hide()),e.trigger("view:attached",t),t.$el.slideDown(e.fxSpeed,function(){e.trigger("view:attached:rendered")})},removeItemView:function(t,e,i){this.log(this+".removeItemView:",t);var n=this,s=n.viewFromModel(t);if(s)return n.views=a.without(n.views,s),n.trigger("view:removed",s),r({}).queue("fx",[function(t){s.$el.fadeOut(n.fxSpeed,t)},function(t){s.remove(),n.trigger("view:removed:rendered"),n.views.length?t():n._renderEmptyMessage().fadeIn(n.fxSpeed,t)}]),s},viewFromModelId:function(t){for(var e=0;ei?this.views.slice(i,n+1):this.views.slice(n,i+1)},_renderSearch:function(t){return t.find(".controls .search-input").searchInput({placeholder:this.searchPlaceholder,initialVal:this.searchFor,onfirstsearch:a.bind(this._firstSearch,this),onsearch:a.bind(this.searchItems,this),onclear:a.bind(this.clearSearch,this)}),t},_firstSearch:function(t){return this.log("onFirstSearch",t),this.searchItems(t)},searchItems:function(t){return this.searchFor=t,this.trigger("search:searching",t,this),this.renderItems(),this.$("> .controls .search-query").val(t),this},clearSearch:function(t){return this.searchFor="",this.trigger("search:clear",this),this.$("> .controls .search-query").val(""),this.renderItems(),this},THROTTLE_SELECTORS_AT:20,showSelectors:function(t){t=void 0!==t?t:this.fxSpeed,this.selecting=!0,this.$(".list-actions").slideDown(t),t=this.views.length>=this.THROTTLE_SELECTORS_AT?0:t,a.each(this.views,function(e){e.showSelector(t)})},hideSelectors:function(t){t=void 0!==t?t:this.fxSpeed,this.selecting=!1,this.$(".list-actions").slideUp(t),t=this.views.length>=this.THROTTLE_SELECTORS_AT?0:t,a.each(this.views,function(e){e.hideSelector(t)}),this.selected=[],this.lastSelected=null},toggleSelectors:function(){this.selecting?this.hideSelectors():this.showSelectors()},selectAll:function(t){a.each(this.views,function(e){e.select(t)})},deselectAll:function(t){this.lastSelected=null,a.each(this.views,function(e){e.deselect(t)})},selectRange:function(t,e){var i=this.viewRange(t,e);return a.each(i,function(t){t.select()}),i},getSelectedViews:function(){return a.filter(this.views,function(t){return t.selected})},getSelectedModels:function(){return new this.collection.constructor(a.map(this.getSelectedViews(),function(t){return t.model}))},_showLoadingIndicator:function(t,i,n){this.debug("_showLoadingIndicator",this.indicator,t,i,n),i=void 0!==i?i:this.fxSpeed,this.indicator||(this.indicator=new e(this.$el,this.$el.parent()),this.debug(" created",this.indicator)),this.$el.is(":visible")?(this.$el.fadeOut(i),this.indicator.show(t,i,n)):this.indicator.show(0,n)},_hideLoadingIndicator:function(t,e){this.debug("_hideLoadingIndicator",this.indicator,t,e),t=void 0!==t?t:this.fxSpeed,this.indicator&&this.indicator.hide(t,e)},scrollPosition:function(){return this.$scrollContainer().scrollTop()},scrollTo:function(t,e){return e=e||0,this.$scrollContainer().animate({scrollTop:t},e),this},scrollToTop:function(t){return this.scrollTo(0,t)},scrollToItem:function(t,e){if(!t)return this;var i=t.$el.position().top;return this.scrollTo(i,e)},scrollToId:function(t,e){return this.scrollToItem(this.viewFromModelId(t),e)},events:{"click .select-all":"selectAll","click .deselect-all":"deselectAll"},toString:function(){return"ListPanel("+this.collection+")"}});l.prototype.templates=function(){var t=i.wrapTemplate(["
    ",'
    ','
    ','
    ',"
    "]),e=i.wrapTemplate(['
    ','
    ','
    <%- view.title %>
    ',"
    ",'
    <%- view.subtitle %>
    ','
    ','
    ','",'
    ','
    ','",'","
    ",'
    ',"
    ","
    ","
    "]);return{el:t,controls:e}}();var c=l.extend({modelCollectionKey:"contents",initialize:function(t){l.prototype.initialize.call(this,t),this.selecting=void 0!==t.selecting?t.selecting:!1,this.setModel(this.model,t)},setModel:function(t,e){if(e=e||{},this.debug(this+".setModel:",t,e),this.freeModel(),this.freeViews(),t){var i=this.model?this.model.get("id"):null;this.model=t,this.logger&&(this.model.logger=this.logger),this._setUpModelListeners(),this.collection.off(),this.collection=this.model[this.modelCollectionKey]?this.model[this.modelCollectionKey]:e.collection||new this.collectionClass([]),this._setUpCollectionListeners(),i&&t.get("id")!==i&&this.trigger("new-model",this)}return this},freeModel:function(){return this.model&&this.stopListening(this.model),this},_setUpModelListeners:function(){return this.log(this+"._setUpModelListeners",this.model),this.model.on("error",function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("error"),this.trigger.apply(this,t)},this),this},_renderControls:function(t){this.debug(this+"(ListPanel)._renderControls");var e=this.model?this.model.toJSON():{},i=r(this.templates.controls(e,this));return t.find(".controls").replaceWith(i),i},toString:function(){return"ModelListPanel("+this.model+")"}});return c.prototype.templates=function(){var t=i.wrapTemplate(['
    ','
    ','
    <%- model.name %>
    ',"
    ",'
    <%- view.subtitle %>
    ','
    ','
    ','",'
    ','
    ','",'","
    ",'
    ',"
    ","
    ","
    "]);return a.extend(a.clone(l.prototype.templates),{controls:t})}(),{ListPanel:l,ModelListPanel:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(3),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(6),i(5)],s=function(t,e){var i=o.View.extend(t.LoggableMixin).extend(t.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"tags-display",initialize:function(t){this.listenTo(this.model,"change:tags",function(){this.render()}),this.hiddenUntilActivated(t.$activator,t)},render:function(){var t=this;return this.$el.html(this._template()),this.$input().select2({placeholder:"Add tags",width:"100%",tags:function(){return t._getTagsUsed(); }}),this._setUpBehaviors(),this},_template:function(){return['",''].join("")},tagsToCSV:function(){var t=this.model.get("tags");return!a.isArray(t)||a.isEmpty(t)?"":t.map(function(t){return a.escape(t)}).sort().join(",")},$input:function(){return this.$el.find("input.tags-input")},_getTagsUsed:function(){return Galaxy.user.get("tags_used")},_setUpBehaviors:function(){var t=this;this.$input().on("change",function(e){t.model.save({tags:e.val},{silent:!0}),e.added&&t._addNewTagToTagsUsed(e.added.text+"")})},_addNewTagToTagsUsed:function(t){var e=Galaxy.user.get("tags_used");a.contains(e,t)||(e.push(t),e.sort(),Galaxy.user.set("tags_used",e))},remove:function(){this.$input.off(),this.stopListening(this.model),o.View.prototype.remove.call(this)},toString:function(){return["TagsEditor(",this.model+"",")"].join("")}});return{TagsEditor:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(3))},,function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){return o.View.extend({initialize:function(e){this.options=t.merge(e,{class_add:"upload-icon-button fa fa-square-o",class_remove:"upload-icon-button fa fa-check-square-o",class_partial:"upload-icon-button fa fa-minus-square-o",collection:null,onchange:function(){},onadd:function(){},onremove:function(){}});var i=this;this.collection=this.options.collection,this.setElement(this._template()),this.rows=[],t.get({url:Galaxy.root+"api/remote_files",success:function(t){i._fill(t)},error:function(){i._fill()}})},_fill:function(e){if(e&&e.length>0){this.$el.find("#upload-ftp-content").html(a(this._templateTable()));var i=0;for(index in e)this.rows.push(this._add(e[index])),i+=e[index].size;if(this.$el.find("#upload-ftp-number").html(e.length+" files"),this.$el.find("#upload-ftp-disk").html(t.bytesToString(i,!0)),this.collection){var n=this;this.$("._has_collection").show(),this.$select_all=a("#upload-selectall"),this.$select_all.addClass(this.options.class_add),this.$select_all.on("click",function(){var t=n.$select_all.hasClass(n.options.class_add);for(index in e){var i=e[index],s=n._find(i);(!s&&t||s&&!t)&&n.rows[index].trigger("click")}}),this._refresh()}}else this.$el.find("#upload-ftp-content").html(a(this._templateInfo()));this.$el.find("#upload-ftp-wait").hide()},_add:function(t){var e=this,i=a(this._templateRow(t)),n=i.find(".icon");if(a(this.el).find("tbody").append(i),this.collection){var s="";s=this._find(t)?this.options.class_remove:this.options.class_add,n.addClass(s),i.on("click",function(){var i=e._find(t);n.removeClass(),i?(e.options.onremove(i),n.addClass(e.options.class_add)):(e.options.onadd(t),n.addClass(e.options.class_remove)),e._refresh()})}else i.on("click",function(){e.options.onchange(t)});return i},_refresh:function(){var t=this.collection.where({file_mode:"ftp",enabled:!0});this.$select_all.removeClass(),0==t.length?this.$select_all.addClass(this.options.class_add):t.length==this.rows.length?this.$select_all.addClass(this.options.class_remove):this.$select_all.addClass(this.options.class_partial)},_find:function(t){var e=this.collection.findWhere({file_path:t.path,file_mode:"ftp",enabled:!0});return e&&e.get("id")},_templateRow:function(e){return'
    '+e.path+''+t.bytesToString(e.size)+''+e.ctime+""},_templateTable:function(){return'Available files:   
    NameSizeCreated
    '},_templateInfo:function(){return'
    Your FTP directory does not contain any files.
    '},_template:function(){return'
    This Galaxy server allows you to upload files via FTP. To upload some files, log in to the FTP server at '+this.options.ftp_upload_site+' using your Galaxy credentials (email address and password).
    '}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1))},function(t,e,i){var n,s;(function(o){n=[i(4)],s=function(t){return o.View.extend({options:{class_check:"upload-icon-button fa fa-check-square-o",class_uncheck:"upload-icon-button fa fa-square-o"},initialize:function(t){this.app=t;var e=this;this.setElement(this._template()),this.model=this.app.model,this.$("#upload-space-to-tab").on("click",function(){e._switchState("#upload-space-to-tab","space_to_tab")}),this.$("#upload-to-posix-lines").on("click",function(){e._switchState("#upload-to-posix-lines","to_posix_lines")}),this.render()},render:function(){this._renderState("#upload-space-to-tab",this.model.get("space_to_tab")),this._renderState("#upload-to-posix-lines",this.model.get("to_posix_lines"));var t=this.$("#upload-settings-cover");this.model.get("enabled")?t.hide():t.show()},_switchState:function(t,e){if(this.model.get("enabled")){var i=!this.model.get(e);this.model.set(e,i),this._renderState(t,i)}},_renderState:function(t,e){var i=this.$(t);i.removeClass(),e?i.addClass(this.options.class_check):i.addClass(this.options.class_uncheck)},_template:function(){return'
    Convert spaces to tabs
    Use POSIX standard
    '}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},,,function(t,e,i){var n,s,o;(function(i,a){!function(i){s=[],n=i,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(){i.fn.extend({hoverhighlight:function(t,e){return t=t||"body",this.size()?(a(this).each(function(){var i=a(this),n=i.data("target");n&&i.mouseover(function(i){a(n,t).css({background:e})}).mouseout(function(t){a(n).css({background:""})})}),this):this}})})}).call(e,i(1),i(1))},function(t,e,i){var n,s,o;(function(i,a){!function(i){s=[],n=i,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(){function t(t,n){function s(t){var e=i(this).parent().children("input");e.focus().val("").trigger("clear:searchInput"),n.onclear()}function o(t,e){i(this).trigger("search:searchInput",e),"function"==typeof n.onfirstsearch&&g?(g=!1,n.onfirstsearch(e)):n.onsearch(e)}function r(){return['"].join("")}function l(){return i(r()).focus(function(t){i(this).select()}).keyup(function(t){if(t.preventDefault(),t.stopPropagation(),i(this).val()||i(this).blur(),t.which===u&&n.escWillClear)s.call(this,t);else{var e=i(this).val();t.which===p||n.minSearchLen&&e.length>=n.minSearchLen?o.call(this,t,e):e.length||s.call(this,t)}}).on("change",function(t){o.call(this,t,i(this).val())}).val(n.initialVal)}function c(){return i([''].join("")).tooltip({placement:"bottom"}).click(function(t){s.call(this,t)})}function d(){return i([''].join("")).hide().tooltip({placement:"bottom"})}function h(){f.find(".search-loading").toggle(),f.find(".search-clear").toggle()}var u=27,p=13,f=i(t),g=!0,m={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(t){},minSearchLen:0,escWillClear:!0,oninit:function(){}};return"string"===a.type(n)?("toggle-loading"===n&&h(),f):("object"===a.type(n)&&(n=a.extend(!0,{},m,n)),f.addClass("search-input").prepend([l(),c(),d()]))}var e=window._l||function(t){return t};a.fn.extend({searchInput:function(e){return this.each(function(){return t(this,e)})}})})}).call(e,i(1),i(1))},,function(t,e,i){var n,s;n=[],s=function(){function t(t,e){var i=/(-?[0-9\.]+)/g,n=t.toString().toLowerCase()||"",s=e.toString().toLowerCase()||"",o=String.fromCharCode(0),a=n.replace(i,o+"$1"+o).split(o),r=s.replace(i,o+"$1"+o).split(o),l=new Date(n).getTime(),c=l?new Date(s).getTime():null;if(c){if(c>l)return-1;if(l>c)return 1}for(var d,h,u=0,p=Math.max(a.length,r.length);p>u;u++){if(d=parseFloat(a[u])||a[u],h=parseFloat(r[u])||r[u],h>d)return-1;if(d>h)return 1}return 0}return t}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){(function(t,e){!function(i){t.event.props.push("dataTransfer"),i.uploadpost=function(e){var n=i.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."},e),s=n.data;if(s.error_message)return void n.error(s.error_message);var o=new FormData;for(var a in s.payload)o.append(a,s.payload[a]);var r=0;for(var a in s.files){var l=s.files[a];o.append(l.name,l.file,l.file.name),r+=l.file.size}return r>1048576*n.maxfilesize?void n.error(n.error_filesize):(xhr=new XMLHttpRequest,xhr.open("POST",n.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 e=null;if(xhr.responseText)try{e=t.parseJSON(xhr.responseText)}catch(i){e=xhr.responseText}if(xhr.status<200||xhr.status>299){var s=xhr.statusText;403==xhr.status?s=n.error_login:0==xhr.status?s=n.error_server:s||(s=n.error_default),n.error(s+" ("+xhr.status+")")}else n.success(e)}},xhr.upload.addEventListener("progress",function(t){t.lengthComputable&&n.progress(Math.round(100*t.loaded/t.total))},!1),Galaxy.emit.debug("uploadbox::uploadpost()","Posting following data.",n),void xhr.send(o))},i.fn.uploadinput=function(t){var e=this,n=i.extend({},{ondragover:function(){},ondragleave:function(){},onchange:function(){},multiple:!1},t),s=i('");return e.append(s.change(function(t){n.onchange(t.target.files),i(this).val("")})),e.on("drop",function(t){n.ondragleave(t),t.dataTransfer&&(n.onchange(t.dataTransfer.files),t.preventDefault())}),e.on("dragover",function(t){t.preventDefault(),n.ondragover(t)}),e.on("dragleave",function(t){t.stopPropagation(),n.ondragleave(t)}),{dialog:function(){s.trigger("click")}}},i.fn.uploadbox=function(t){function n(t){if(t&&t.length&&!m){var i=f;return e.each(t,function(t,i){"new"!==t.mode&&e.filter(p,function(e){return e.name===t.name&&e.size===t.size}).length&&(t.duplicate=!0)}),e.each(t,function(t){if(!t.duplicate){var e=String(f++);p[e]=t,u.announce(e,p[e]),g++}}),i}}function s(t){p[t]&&(delete p[t],g--)}function o(){if(0==g||v)return v=!1,m=!1,void u.complete();m=!0;var t=-1;for(var e in p){t=e;break}p[t];s(t),i.uploadpost({url:u.url,data:u.initialize(t),success:function(e){u.success(t,e),o()},error:function(e){u.error(t,e),o()},progress:function(e){u.progress(t,e)}})}function a(){_.dialog()}function r(t){for(t in p)s(t)}function l(){m||(m=!0,o())}function c(){v=!0}function d(t){return u=i.extend({},u,t)}function h(){return window.File&&window.FormData&&window.XMLHttpRequest&&window.FileList}var u=i.extend({},{dragover:function(){},dragleave:function(){},announce:function(t){},initialize:function(t){},progress:function(t,e){},success:function(t,e){},error:function(t,e){alert(e)},complete:function(){}},t),p={},f=0,g=0,m=!1,v=!1,_=i(this).uploadinput({multiple:!0,onchange:function(t){n(t)},ondragover:t.ondragover,ondragleave:t.ondragleave});return{select:a,add:n,remove:s,start:l,stop:c,reset:r,configure:d,compatible:h}}}(t)}).call(e,i(1),i(3))},function(t,e,i){var n=i(13).RightPanel,s=i(7),o=i(133);CurrentHistoryView=i(130).CurrentHistoryView,_l=i(5);var a=n.extend({title:_l("History"),initialize:function(t){n.prototype.initialize.call(this,t);var e=this;this.refreshButton=new s.ButtonLink({id:"history-refresh-button",title:_l("Refresh history"),cls:"panel-header-button",icon:"fa fa-refresh",onclick:function(){e.historyView.loadCurrentHistory()}}),this.optionsButton=new s.ButtonLink({id:"history-options-button",title:_l("History options"),cls:"panel-header-button",icon:"fa fa-cog"}),this.viewMultiButton=null,t.userIsAnonymous||(this.viewMultiButton=new s.ButtonLink({id:"history-view-multi-button",title:_l("View all histories"),cls:"panel-header-button",icon:"fa fa-columns",href:t.galaxyRoot+"history/view_multiple"})),this.optionsMenu=o(this.optionsButton.$el,{anonymous:t.userIsAnonymous,purgeAllowed:t.allow_user_dataset_purge,root:t.galaxyRoot}),this.historyView=new CurrentHistoryView({purgeAllowed:t.allow_user_dataset_purge,linkTarget:"galaxy_main",$scrollContainer:function(){return this.$el.parent()}})},render:function(){n.prototype.render.call(this),this.$(".unified-panel-header").addClass("history-panel-header"),this.$(".panel-header-buttons").append([this.refreshButton.$el,this.optionsButton.$el,this.viewMultiButton?this.viewMultiButton.$el:null]),this.historyView.setElement(this.$(".history-panel"))},_templateBody:function(t){return['
    ','
    ',"
    "].join("")},toString:function(){return"HistoryPanel"}});t.exports=a},function(t,e,i){(function(e,n){var s=i(13).LeftPanel,o=i(50),a=i(139),r=i(5),l=s.extend({title:r("Tools"),initialize:function(t){s.prototype.initialize.call(this,t),this.log(this+".initialize:",t),this.stored_workflow_menu_entries=t.stored_workflow_menu_entries||[];var e=new o.ToolSearch({spinner_url:t.spinner_url,search_url:t.search_url,hidden:!1}),i=new o.ToolCollection(t.toolbox);this.tool_panel=new o.ToolPanel({tool_search:e,tools:i,layout:t.toolbox_in_panel}),this.tool_panel_view=new o.ToolPanelView({model:this.tool_panel}),this.uploadButton=new a({nginx_upload_path:t.nginx_upload_path,ftp_upload_site:t.ftp_upload_site,default_genome:t.default_genome,default_extension:t.default_extension})},render:function(){var t=this;s.prototype.render.call(t),t.$(".panel-header-buttons").append(t.uploadButton.$el),t.tool_panel.get("layout").size()>0&&(t.tool_panel_view.render(),t.$(".toolMenu").show()),t.$(".toolMenuContainer").prepend(t.tool_panel_view.$el),t._renderWorkflowMenu(),t.$("a[minsizehint]").click(function(){parent.handle_minwidth_hint&&parent.handle_minwidth_hint(e(t).attr("minsizehint"))})},_renderWorkflowMenu:function(){var t=this;t.$("#internal-workflows").append(t._templateTool({title:r("All workflows"),href:"workflow/list_for_run"})),n.each(t.stored_workflow_menu_entries,function(e){t.$("#internal-workflows").append(t._templateTool({title:e.stored_workflow.name,href:"workflow/run?id="+e.encoded_stored_workflow_id}))})},_templateTool:function(t){return['"].join("")},_templateBody:function(){return['
    ','
    ','",'
    ','
    ','
    ',"",r("Workflows"),"","
    ",'
    ','
    ',"
    ","
    ","
    "].join("")},toString:function(){return"ToolPanel"}});t.exports=l}).call(e,i(1),i(3))},,,,,,,,,,function(t,e,i){var n,s;(function(o,a){n=[i(34),i(94),i(6),i(5)],s=function(t,e,i,n){var s=t.DCListItemView,r=s.extend({initialize:function(t){s.prototype.initialize.call(this,t)},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCListItemEdit("+t+")"}}),l=t.DCEListItemView,c=l.extend({initialize:function(t){l.prototype.initialize.call(this,t)},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCEListItemEdit("+t+")"}}),d=e.DatasetListItemEdit.extend({initialize:function(t){e.DatasetListItemEdit.prototype.initialize.call(this,t)},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):o.when()},_renderDeleteButton:function(){return null},toString:function(){var t=this.model?this.model+"":"(no model)";return"DatasetDCEListItemEdit("+t+")"}});d.prototype.templates=function(){return a.extend({},e.DatasetListItemEdit.prototype.templates,{titleBar:t.DatasetDCEListItemView.prototype.templates.titleBar})}();var h=t.NestedDCDCEListItemView.extend({toString:function(){var t=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemEdit("+t+")"}});return{DCListItemEdit:r,DCEListItemEdit:c,DatasetDCEListItemEdit:d,NestedDCDCEListItemEdit:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(3))},function(t,e,i){var n,s;n=[i(93),i(35),i(123),i(6),i(5),i(19)],s=function(t,e,i,n,s){var o=t.CollectionView,a=o.extend({DatasetDCEViewClass:i.DatasetDCEListItemEdit,NestedDCDCEViewClass:i.NestedDCDCEListItemEdit,initialize:function(t){o.prototype.initialize.call(this,t)},_setUpBehaviors:function(t){if(t=t||this.$el,o.prototype._setUpBehaviors.call(this,t),this.model&&Galaxy.user&&!Galaxy.user.isAnonymous()){var e=this,i="> .controls .name";t.find(i).attr("title",s("Click to rename collection")).tooltip({placement:"bottom"}).make_text_editable({on_finish:function(t){var n=e.model.get("name");t&&t!==n?(e.$el.find(i).text(t),e.model.save({name:t}).fail(function(){e.$el.find(i).text(e.model.previous("name"))})):e.$el.find(i).text(n)}})}},toString:function(){return"CollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),r=a.extend({DatasetDCEViewClass:i.DatasetDCEListItemEdit,toString:function(){return"ListCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),l=r.extend({toString:function(){return"PairCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),c=l.extend({_setUpBehaviors:function(t){o.prototype._setUpBehaviors.call(this,t)},toString:function(){return"NestedPairCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),d=a.extend({NestedDCDCEViewClass:i.NestedDCDCEListItemEdit.extend({foldoutPanelClass:c}),toString:function(){return"ListOfPairsCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}});return{CollectionViewEdit:a,ListCollectionViewEdit:r,PairCollectionViewEdit:l,ListOfPairsCollectionViewEdit:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(146),i(110),i(36),i(6),i(5),i(107)],s=function(t,e,i,n,s){function c(t){function e(){return i.length||(i=[new RegExp(this.filters[0]),new RegExp(this.filters[1])]),i}t=t||{},t.createPair=t.createPair||function(t){t=t||{};var e=t.listA.splice(t.indexA,1)[0],i=t.listB.splice(t.indexB,1)[0],n=t.listB.indexOf(e),s=t.listA.indexOf(i);return-1!==n&&t.listB.splice(n,1),-1!==s&&t.listA.splice(s,1),this._pair(e,i,{silent:!0})};var i=[];return t.preprocessMatch=t.preprocessMatch||function(t){var i=e.call(this);return a.extend(t,{matchTo:t.matchTo.name.replace(i[0],""),possible:t.possible.name.replace(i[1],"")})},function(e){this.debug("autopair _strategy ---------------------------"),e=e||{};var i,n=e.listA,s=e.listB,o=0,a={score:0,index:null},r=[];for(this.debug("starting list lens:",n.length,s.length),this.debug("bestMatch (starting):",JSON.stringify(a,null," "));o=d?r.push(t.createPair.call(this,{listA:n,indexA:o,listB:s,indexB:a.index})):o+=1,!n.length||!s.length)return r}return this.debug("paired:",JSON.stringify(r,null," ")),this.debug("autopair _strategy ---------------------------"),r}}function d(t){var e=t.toJSON();return f(e,{historyId:t.historyId})}var h="collections",u=o.View.extend(n.LoggableMixin).extend({_logNamespace:h,tagName:"li",className:"dataset paired",initialize:function(t){this.pair=t.pair||{}},template:a.template(['<%- pair.forward.name %>','','<%- pair.name %>',"",'<%- pair.reverse.name %>'].join("")),render:function(){return this.$el.attr("draggable",!0).data("pair",this.pair).html(this.template({pair:this.pair})).addClass("flex-column-container"),this},events:{dragstart:"_dragstart",dragend:"_dragend",dragover:"_sendToParent",drop:"_sendToParent"},_dragstart:function(t){t.currentTarget.style.opacity="0.4",t.originalEvent&&(t=t.originalEvent),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",JSON.stringify(this.pair)),this.$el.parent().trigger("pair.dragstart",[this])},_dragend:function(t){t.currentTarget.style.opacity="1.0",this.$el.parent().trigger("pair.dragend",[this])},_sendToParent:function(t){this.$el.parent().trigger(t)},toString:function(){return"PairView("+this.pair.name+")"}}),p=o.View.extend(n.LoggableMixin).extend({_logNamespace:h,className:"list-of-pairs-collection-creator collection-creator flex-row-container",initialize:function(t){this.metric("PairedCollectionCreator.initialize",t),t=a.defaults(t,{datasets:[],filters:this.DEFAULT_FILTERS,automaticallyPair:!0,strategy:"lcs",matchPercentage:.9,twoPassAutopairing:!0}),this.initialList=t.datasets,this.historyId=t.historyId,this.filters=this.commonFilters[t.filters]||this.commonFilters[this.DEFAULT_FILTERS],a.isArray(t.filters)&&(this.filters=t.filters),this.automaticallyPair=t.automaticallyPair,this.strategy=this.strategies[t.strategy]||this.strategies[this.DEFAULT_STRATEGY],a.isFunction(t.strategy)&&(this.strategy=t.strategy),this.matchPercentage=t.matchPercentage,this.twoPassAutopairing=t.twoPassAutopairing,this.removeExtensions=!0,this.oncancel=t.oncancel,this.oncreate=t.oncreate,this.autoscrollDist=t.autoscrollDist||24,this.unpairedPanelHidden=!1,this.pairedPanelHidden=!1,this.$dragging=null,this.blocking=!1,this._setUpBehaviors(),this._dataSetUp()},commonFilters:{illumina:["_1","_2"],Rs:["_R1","_R2"]},DEFAULT_FILTERS:"illumina",strategies:{simple:"autopairSimple",lcs:"autopairLCS",levenshtein:"autopairLevenshtein"},DEFAULT_STRATEGY:"lcs",_dataSetUp:function(){this.paired=[],this.unpaired=[],this.selectedIds=[],this._sortInitialList(),this._ensureIds(),this.unpaired=this.initialList.slice(0),this.automaticallyPair&&(this.autoPair(),this.once("rendered:initial",function(){this.trigger("autopair")}))},_sortInitialList:function(){this._sortDatasetList(this.initialList)},_sortDatasetList:function(t){return t.sort(function(t,i){return e(t.name,i.name)}),t},_ensureIds:function(){return this.initialList.forEach(function(t){t.hasOwnProperty("id")||(t.id=a.uniqueId())}),this.initialList},_splitByFilters:function(){function t(t,e){return e.test(t.name)}var e=this.filters.map(function(t){return new RegExp(t)}),i=[[],[]];return this.unpaired.forEach(function(n){e.forEach(function(e,s){t(n,e)&&i[s].push(n)})}),i},_addToUnpaired:function(t){var i=function(n,s){if(n===s)return n;var o=Math.floor((s-n)/2)+n,a=e(t.name,this.unpaired[o].name);if(0>a)return i(n,o);if(a>0)return i(o+1,s);for(;this.unpaired[o]&&this.unpaired[o].name===t.name;)o++;return o}.bind(this);this.unpaired.splice(i(0,this.unpaired.length),0,t)},autoPair:function(t){var e=this._splitByFilters(),i=[];return this.twoPassAutopairing&&(i=this.autopairSimple({listA:e[0],listB:e[1]}),e=this._splitByFilters()),t=t||this.strategy,e=this._splitByFilters(),i=i.concat(this[t].call(this,{listA:e[0],listB:e[1]}))},autopairSimple:c({scoreThreshold:function(){return 1},match:function(t){return t=t||{},t.matchTo===t.possible?{index:t.index,score:1}:t.bestMatch}}),autopairLevenshtein:c({scoreThreshold:function(){return this.matchPercentage},match:function(e){e=e||{};var i=t(e.matchTo,e.possible),n=1-i/Math.max(e.matchTo.length,e.possible.length);return n>e.bestMatch.score?{index:e.index,score:n}:e.bestMatch}}),autopairLCS:c({scoreThreshold:function(){return this.matchPercentage},match:function(t){t=t||{};var e=this._naiveStartingAndEndingLCS(t.matchTo,t.possible).length,i=e/Math.max(t.matchTo.length,t.possible.length);return i>t.bestMatch.score?{index:t.index,score:i}:t.bestMatch}}),_naiveStartingAndEndingLCS:function(t,e){for(var i="",n="",s=0,o=0;s=0&&o>=0&&t[s]===e[o];)n=[t[s],n].join(""),s-=1,o-=1;return i+n},_pair:function(t,e,i){i=i||{},this.debug("_pair:",t,e);var n=this._createPair(t,e,i.name);return this.paired.push(n),this.unpaired=a.without(this.unpaired,t,e),i.silent||this.trigger("pair:new",n),n},_createPair:function(t,e,i){if(!t||!e||t===e)throw new Error("Bad pairing: "+[JSON.stringify(t),JSON.stringify(e)]);return i=i||this._guessNameForPair(t,e),{forward:t,name:i,reverse:e}},_guessNameForPair:function(t,e,i){i=void 0!==i?i:this.removeExtensions;var n=t.name,s=e.name,o=this._naiveStartingAndEndingLCS(n.replace(new RegExp(this.filters[0]),""),s.replace(new RegExp(this.filters[1]),""));if(i){var a=o.lastIndexOf(".");if(a>0){var r=o.slice(a,o.length);o=o.replace(r,""),n=n.replace(r,""),s=s.replace(r,"")}}return o||n+" & "+s},_unpair:function(t,e){if(e=e||{},!t)throw new Error("Bad pair: "+JSON.stringify(t));return this.paired=a.without(this.paired,t),this._addToUnpaired(t.forward),this._addToUnpaired(t.reverse),e.silent||this.trigger("pair:unpair",[t]),t},unpairAll:function(){for(var t=[];this.paired.length;)t.push(this._unpair(this.paired[0],{silent:!0}));this.trigger("pair:unpair",t)},_pairToJSON:function(t,e){return e=e||"hda",{collection_type:"paired",src:"new_collection",name:t.name,element_identifiers:[{name:"forward",id:t.forward.id,src:e},{name:"reverse",id:t.reverse.id,src:e}]}},createList:function(t){var e=this,i=Galaxy.root+"api/histories/"+this.historyId+"/contents/dataset_collections",n={type:"dataset_collection",collection_type:"list:paired",name:a.escape(t||e.$(".collection-name").val()),element_identifiers:e.paired.map(function(t){return e._pairToJSON(t)})};return e.blocking=!0,r.ajax(i,{type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n)}).always(function(){e.blocking=!1}).fail(function(t,i,n){e._ajaxErrHandler(t,i,n)}).done(function(t,i,n){e.trigger("collection:created",t,i,n),e.metric("collection:created",t),"function"==typeof e.oncreate&&e.oncreate.call(this,t,i,n)})},_ajaxErrHandler:function(t,e,i){this.error(t,e,i);var n=s("An error occurred while creating this collection");t&&(n+=0===t.readyState&&0===t.status?": "+s("Galaxy could not be reached and may be updating.")+s(" Try again in a few minutes."):t.responseJSON?"
    "+JSON.stringify(t.responseJSON)+"
    ":": "+i),creator._showAlert(n,"alert-danger")},render:function(t,e){return this.$el.empty().html(p.templates.main()),this._renderHeader(t),this._renderMiddle(t),this._renderFooter(t),this._addPluginComponents(),this.trigger("rendered",this),this},_renderHeader:function(t,e){var i=this.$(".header").empty().html(p.templates.header()).find(".help-content").prepend(l(p.templates.helpContent()));return this._renderFilters(),i},_renderFilters:function(){return this.$(".forward-column .column-header input").val(this.filters[0]).add(this.$(".reverse-column .column-header input").val(this.filters[1]))},_renderMiddle:function(t,e){var i=this.$(".middle").empty().html(p.templates.middle());return this.unpairedPanelHidden?this.$(".unpaired-columns").hide():this.pairedPanelHidden&&this.$(".paired-columns").hide(),this._renderUnpaired(),this._renderPaired(),i},_renderUnpaired:function(t,e){var i,n,o=this,a=[],r=this._splitByFilters();return this.$(".forward-column .title").text([r[0].length,s("unpaired forward")].join(" ")),this.$(".forward-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-r[0].length)),this.$(".reverse-column .title").text([r[1].length,s("unpaired reverse")].join(" ")),this.$(".reverse-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-r[1].length)),this.$(".unpaired-columns .column-datasets").empty(),this.$(".autopair-link").toggle(0!==this.unpaired.length),0===this.unpaired.length?void this._renderUnpairedEmpty():(n=r[1].map(function(t,e){return void 0!==r[0][e]&&r[0][e]!==t&&a.push(o._renderPairButton()),o._renderUnpairedDataset(t)}),i=r[0].map(function(t){return o._renderUnpairedDataset(t)}),i.length||n.length?(this.$(".unpaired-columns .forward-column .column-datasets").append(i).add(this.$(".unpaired-columns .paired-column .column-datasets").append(a)).add(this.$(".unpaired-columns .reverse-column .column-datasets").append(n)),void this._adjUnpairedOnScrollbar()):void this._renderUnpairedNotShown())},_renderUnpairedDisplayStr:function(t){return["(",t," ",s("filtered out"),")"].join("")},_renderUnpairedDataset:function(t){return l("
  • ").attr("id","dataset-"+t.id).addClass("dataset unpaired").attr("draggable",!0).addClass(t.selected?"selected":"").append(l("").addClass("dataset-name").text(t.name)).data("dataset",t)},_renderPairButton:function(){return l("
  • ").addClass("dataset unpaired").append(l("").addClass("dataset-name").text(s("Pair these datasets")))},_renderUnpairedEmpty:function(){var t=l('
    ').text("("+s("no remaining unpaired datasets")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(t),t},_renderUnpairedNotShown:function(){var t=l('
    ').text("("+s("no datasets were found matching the current filters")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(t),t},_adjUnpairedOnScrollbar:function(){var t=this.$(".unpaired-columns").last(),e=this.$(".unpaired-columns .reverse-column .dataset").first();if(e.size()){var i=t.offset().left+t.outerWidth(),n=e.offset().left+e.outerWidth(),s=Math.floor(i)-Math.floor(n);this.$(".unpaired-columns .forward-column").css("margin-left",s>0?s:0)}},_renderPaired:function(t,e){if(this.$(".paired-column-title .title").text([this.paired.length,s("paired")].join(" ")),this.$(".unpair-all-link").toggle(0!==this.paired.length),0===this.paired.length)return void this._renderPairedEmpty();this.$(".remove-extensions-link").show(),this.$(".paired-columns .column-datasets").empty();var i=this;this.paired.forEach(function(t,e){var n=new u({pair:t});i.$(".paired-columns .column-datasets").append(n.render().$el).append(['"].join(""))})},_renderPairedEmpty:function(){var t=l('
    ').text("("+s("no paired datasets yet")+")");return this.$(".paired-columns .column-datasets").empty().prepend(t),t},_renderFooter:function(t,e){var i=this.$(".footer").empty().html(p.templates.footer()); return this.$(".remove-extensions").prop("checked",this.removeExtensions),"function"==typeof this.oncancel&&this.$(".cancel-create.btn").show(),i},_addPluginComponents:function(){this._chooseFiltersPopover(".choose-filters-link"),this.$(".help-content i").hoverhighlight(".collection-creator","rgba( 64, 255, 255, 1.0 )")},_chooseFiltersPopover:function(t){function e(t,e){return['"].join("")}var i=l(a.template(['
    ','
    ',s("Choose from the following filters to change which unpaired reads are shown in the display"),":
    ",a.values(this.commonFilters).map(function(t){return e(t[0],t[1])}).join(""),"
    "].join(""))({}));return this.$(t).popover({container:".collection-creator",placement:"bottom",html:!0,content:i})},_validationWarning:function(t,e){var i="validation-warning";"name"===t&&(t=this.$(".collection-name").add(this.$(".collection-name-prompt")),this.$(".collection-name").focus().select()),e?(t=t||this.$("."+i),t.removeClass(i)):t.addClass(i)},_setUpBehaviors:function(){return this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("pair:new",function(){this._renderUnpaired(),this._renderPaired(),this.$(".paired-columns").scrollTop(8e6)}),this.on("pair:unpair",function(t){this._renderUnpaired(),this._renderPaired(),this.splitView()}),this.on("filter-change",function(){this.filters=[this.$(".forward-unpaired-filter input").val(),this.$(".reverse-unpaired-filter input").val()],this.metric("filter-change",this.filters),this._renderFilters(),this._renderUnpaired()}),this.on("autopair",function(){this._renderUnpaired(),this._renderPaired();var t,e=null;this.paired.length?(e="alert-success",t=this.paired.length+" "+s("pairs created"),this.unpaired.length||(t+=": "+s("all datasets have been successfully paired"),this.hideUnpaired(),this.$(".collection-name").focus())):t=s(["Could not automatically create any pairs from the given dataset names.","You may want to choose or enter different filters and try auto-pairing again.","Close this message using the X on the right to view more help."].join(" ")),this._showAlert(t,e)}),this},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .header .alert button":"_hideAlert","click .forward-column .column-title":"_clickShowOnlyUnpaired","click .reverse-column .column-title":"_clickShowOnlyUnpaired","click .unpair-all-link":"_clickUnpairAll","change .forward-unpaired-filter input":function(t){this.trigger("filter-change")},"focus .forward-unpaired-filter input":function(t){l(t.currentTarget).select()},"click .autopair-link":"_clickAutopair","click .choose-filters .filter-choice":"_clickFilterChoice","click .clear-filters-link":"_clearFilters","change .reverse-unpaired-filter input":function(t){this.trigger("filter-change")},"focus .reverse-unpaired-filter input":function(t){l(t.currentTarget).select()},"click .forward-column .dataset.unpaired":"_clickUnpairedDataset","click .reverse-column .dataset.unpaired":"_clickUnpairedDataset","click .paired-column .dataset.unpaired":"_clickPairRow","click .unpaired-columns":"clearSelectedUnpaired","mousedown .unpaired-columns .dataset":"_mousedownUnpaired","click .paired-column-title":"_clickShowOnlyPaired","mousedown .flexible-partition-drag":"_startPartitionDrag","click .paired-columns .dataset.paired":"selectPair","click .paired-columns":"clearSelectedPaired","click .paired-columns .pair-name":"_clickPairName","click .unpair-btn":"_clickUnpair","dragover .paired-columns .column-datasets":"_dragoverPairedColumns","drop .paired-columns .column-datasets":"_dropPairedColumns","pair.dragstart .paired-columns .column-datasets":"_pairDragstart","pair.dragend .paired-columns .column-datasets":"_pairDragend","change .remove-extensions":function(t){this.toggleExtensions()},"change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","click .cancel-create":function(t){"function"==typeof this.oncancel&&this.oncancel.call(this)},"click .create-collection":"_clickCreate"},_clickMoreHelp:function(t){this.$(".main-help").addClass("expanded"),this.$(".more-help").hide()},_clickLessHelp:function(t){this.$(".main-help").removeClass("expanded"),this.$(".more-help").show()},_showAlert:function(t,e){e=e||"alert-danger",this.$(".main-help").hide(),this.$(".header .alert").attr("class","alert alert-dismissable").addClass(e).show().find(".alert-message").html(t)},_hideAlert:function(t){this.$(".main-help").show(),this.$(".header .alert").hide()},_clickShowOnlyUnpaired:function(t){this.$(".paired-columns").is(":visible")?this.hidePaired():this.splitView()},_clickShowOnlyPaired:function(t){this.$(".unpaired-columns").is(":visible")?this.hideUnpaired():this.splitView()},hideUnpaired:function(t,e){this.unpairedPanelHidden=!0,this.pairedPanelHidden=!1,this._renderMiddle(t,e)},hidePaired:function(t,e){this.unpairedPanelHidden=!1,this.pairedPanelHidden=!0,this._renderMiddle(t,e)},splitView:function(t,e){return this.unpairedPanelHidden=this.pairedPanelHidden=!1,this._renderMiddle(t,e),this},_clickUnpairAll:function(t){this.metric("unpairAll"),this.unpairAll()},_clickAutopair:function(t){var e=this.autoPair();this.metric("autopair",e.length,this.unpaired.length),this.trigger("autopair")},_clickFilterChoice:function(t){var e=l(t.currentTarget);this.$(".forward-unpaired-filter input").val(e.data("forward")),this.$(".reverse-unpaired-filter input").val(e.data("reverse")),this._hideChooseFilters(),this.trigger("filter-change")},_hideChooseFilters:function(){this.$(".choose-filters-link").popover("hide"),this.$(".popover").css("display","none")},_clearFilters:function(t){this.$(".forward-unpaired-filter input").val(""),this.$(".reverse-unpaired-filter input").val(""),this.trigger("filter-change")},_clickUnpairedDataset:function(t){return t.stopPropagation(),this.toggleSelectUnpaired(l(t.currentTarget))},toggleSelectUnpaired:function(t,e){e=e||{};var i=t.data("dataset"),n=void 0!==e.force?e.force:!t.hasClass("selected");return t.size()&&void 0!==i?(n?(t.addClass("selected"),e.waitToPair||this.pairAllSelected()):t.removeClass("selected"),t):t},pairAllSelected:function(t){t=t||{};var e=this,i=[],n=[],s=[];return e.$(".unpaired-columns .forward-column .dataset.selected").each(function(){i.push(l(this).data("dataset"))}),e.$(".unpaired-columns .reverse-column .dataset.selected").each(function(){n.push(l(this).data("dataset"))}),i.length=n.length=Math.min(i.length,n.length),i.forEach(function(t,i){try{s.push(e._pair(t,n[i],{silent:!0}))}catch(o){e.error(o)}}),s.length&&!t.silent&&this.trigger("pair:new",s),s},clearSelectedUnpaired:function(){this.$(".unpaired-columns .dataset.selected").removeClass("selected")},_mousedownUnpaired:function(t){if(t.shiftKey){var e=this,i=l(t.target).addClass("selected"),n=function(t){e.$(t.target).filter(".dataset").addClass("selected")};i.parent().on("mousemove",n),l(document).one("mouseup",function(t){i.parent().off("mousemove",n),e.pairAllSelected()})}},_clickPairRow:function(t){var e=l(t.currentTarget).index(),i=l(".unpaired-columns .forward-column .dataset").eq(e).data("dataset"),n=l(".unpaired-columns .reverse-column .dataset").eq(e).data("dataset");this._pair(i,n)},_startPartitionDrag:function(t){function e(t){n.$(".flexible-partition-drag").css("color",""),l("body").css("cursor","").unbind("mousemove",i)}function i(t){var e=t.pageY-s;n.adjPartition(e)||l("body").trigger("mouseup"),n._adjUnpairedOnScrollbar(),s+=e}var n=this,s=t.pageY;l("body").css("cursor","ns-resize"),n.$(".flexible-partition-drag").css("color","black"),l("body").mousemove(i),l("body").one("mouseup",e)},adjPartition:function(t){var e=this.$(".unpaired-columns"),i=this.$(".paired-columns"),n=parseInt(e.css("height"),10),s=parseInt(i.css("height"),10);n=Math.max(10,n+t),s-=t;var o=0>t;if(o){if(this.unpairedPanelHidden)return!1;if(10>=n)return this.hideUnpaired(),!1}else this.unpairedPanelHidden&&(e.show(),this.unpairedPanelHidden=!1);if(o)this.pairedPanelHidden&&(i.show(),this.pairedPanelHidden=!1);else{if(this.pairedPanelHidden)return!1;if(15>=s)return this.hidePaired(),!1}return e.css({height:n+"px",flex:"0 0 auto"}),!0},selectPair:function(t){t.stopPropagation(),l(t.currentTarget).toggleClass("selected")},clearSelectedPaired:function(t){this.$(".paired-columns .dataset.selected").removeClass("selected")},_clickPairName:function(t){t.stopPropagation();var e=l(t.currentTarget),i=e.parent().parent(),n=i.index(".dataset.paired"),s=this.paired[n],o=prompt("Enter a new name for the pair:",s.name);o&&(s.name=o,s.customizedName=!0,e.text(s.name))},_clickUnpair:function(t){var e=Math.floor(l(t.currentTarget).index(".unpair-btn"));this._unpair(this.paired[e])},_dragoverPairedColumns:function(t){t.preventDefault();var e=this.$(".paired-columns .column-datasets");this._checkForAutoscroll(e,t.originalEvent.clientY);var i=this._getNearestPairedDatasetLi(t.originalEvent.clientY);l(".element-drop-placeholder").remove();var n=l('
    ');i.size()?i.before(n):e.append(n)},_checkForAutoscroll:function(t,e){var i=2,n=t.offset(),s=t.scrollTop(),o=e-n.top,a=n.top+t.outerHeight()-e;o>=0&&o=0&&at&&t>o-a)return s}return l()},_dropPairedColumns:function(t){t.preventDefault(),t.dataTransfer.dropEffect="move";var e=this._getNearestPairedDatasetLi(t.originalEvent.clientY);return e.size()?this.$dragging.insertBefore(e):this.$dragging.insertAfter(this.$(".paired-columns .unpair-btn").last()),this._syncPairsToDom(),!1},_syncPairsToDom:function(){var t=[];this.$(".paired-columns .dataset.paired").each(function(){t.push(l(this).data("pair"))}),this.paired=t,this._renderPaired()},_pairDragstart:function(t,e){e.$el.addClass("selected");var i=this.$(".paired-columns .dataset.selected");this.$dragging=i},_pairDragend:function(t,e){l(".element-drop-placeholder").remove(),this.$dragging=null},toggleExtensions:function(t){var e=this;e.removeExtensions=void 0!==t?t:!e.removeExtensions,a.each(e.paired,function(t){t.customizedName||(t.name=e._guessNameForPair(t.forward,t.reverse))}),e._renderPaired(),e._renderFooter()},_changeName:function(t){this._validationWarning("name",!!this._getName())},_nameCheckForEnter:function(t){13!==t.keyCode||this.blocking||this._clickCreate()},_getName:function(){return a.escape(this.$(".collection-name").val())},_clickCreate:function(t){var e=this._getName();e?this.blocking||this.createList():this._validationWarning("name")},_printList:function(t){var e=this;a.each(t,function(i){t===e.paired&&e._printPair(i)})},_printPair:function(t){this.debug(t.forward.name,t.reverse.name,": ->",t.name)},toString:function(){return"PairedCollectionCreator"}});p.templates=p.templates||{main:a.template(['
    ','
    ','