From f4e5819c68b6e6705fd64fa102a2ef2ec7fbe16d Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2016 11:13:34 -0400 Subject: [PATCH] Align permissions ui wrapper --- .../scripts/mvc/user/change-permissions.js | 72 +++---------------- .../maps/mvc/user/change-permissions.js.map | 2 +- static/scripts/bundled/libs.bundled.js | 4 +- static/scripts/bundled/libs.bundled.js.map | 2 +- static/scripts/mvc/user/change-permissions.js | 2 +- 5 files changed, 16 insertions(+), 66 deletions(-) diff --git a/client/galaxy/scripts/mvc/user/change-permissions.js b/client/galaxy/scripts/mvc/user/change-permissions.js index 94b493e3641..7877f6a3107 100644 --- a/client/galaxy/scripts/mvc/user/change-permissions.js +++ b/client/galaxy/scripts/mvc/user/change-permissions.js @@ -32,68 +32,18 @@ define( [ 'mvc/form/form-view', 'mvc/ui/ui-misc' ], function( Form, Ui ) { this.setElement( this.form.$el ); }, - initializedssd: function ( app, options, $el ) { + /** Saves the changed password */ + _save: function() { var self = this; - this.model = options && options.model || new Backbone.Model( options ); - this.form = self._buildForm( options, app, self, $el ); - $el.append( this.form.$el ); - }, - - /** Build the form for changing permissions */ - _buildForm: function( options, app, self, $el ) { - return new Form({ - title: 'Manage dataset permissions on EMAIL', - icon: 'fa-universal-access', - inputs: options['role_form'], - operations: { - 'back': new Ui.ButtonIcon({ - icon : 'fa-caret-left', - tooltip : 'Return to user preferences', - title : 'Preferences', - onclick : function() { self.form.$el.remove(); app.showPreferences() } - }) - }, - onchange: function() { - self._savePermissions( self, app, $el ); - } + $.ajax({ + url : Galaxy.root + 'api/user_preferences/' + Galaxy.user.id + '/permissions', + type : 'PUT', + data : self.form.data.create(), + }).done( function( response ) { + self.form.message.update( { message: response.message, status: 'success' } ); + }).fail( function( response ) { + self.form.message.update( { message: response.responseJSON.err_msg, status: 'danger' } ); }); - }, - - /** Update form with new data */ - _updateForm: function( app, $el, self, response ) { - self.form.$el.remove(); - self.form = self._buildForm( response, app, self, $el ); - $el.append( self.form.$el ); - self.form.message.update({ - message : response.message, - status : response.status === 'error' ? 'danger' : 'success', - }); - }, - - /** Save the permissions */ - _savePermissions: function( self, app, $el ) { - var objects = self.form.data.create(), - save = false, - action = false, - data = {}; - for( var item in objects ) { - // check if move up or down button is selected - if( item.indexOf('actionrole') > 0 && objects[item] !== null ) { - save = true; - } - // add checked item(s) from the select box - if( ( item.indexOf('_in') > 0 || item.indexOf('_out') > 0 ) && objects[item] !== null ) { - action = true; - data[item] = objects[item][0]; - } - } - if( save && action ) { - data.update_roles = action; - $.getJSON( Galaxy.root + 'api/user_preferences/set_default_permissions', data, function( response ) { - self._updateForm( app, $el, self, response ); - }); - } } }); -}); - +}); \ No newline at end of file diff --git a/static/maps/mvc/user/change-permissions.js.map b/static/maps/mvc/user/change-permissions.js.map index 5120e3c551c..d0269c47058 100644 --- a/static/maps/mvc/user/change-permissions.js.map +++ b/static/maps/mvc/user/change-permissions.js.map @@ -1 +1 @@ -{"version":3,"file":"change-permissions.js","sources":["../../../src/mvc/user/change-permissions.js"],"names":["define","Form","Ui","Backbone","View","extend","initialize","options","self","this","model","Model","window","console","log","form","title","name","inputs","icon","operations","back","ButtonIcon","tooltip","onclick","remove","onclose","buttons","save","Button","cls","floating","_save","setElement","$el","initializedssd","app","_buildForm","append","showPreferences","onchange","_savePermissions","_updateForm","response","message","update","status","objects","data","create","action","item","indexOf","update_roles","$","getJSON","Galaxy","root"],"mappings":"AACAA,QAAU,qBAAsB,kBAAoB,SAAUC,EAAMC,GAChE,MAAOC,UAASC,KAAKC,QACjBC,WAAY,SAAWC,GACnB,GAAIC,GAAOC,IACXA,MAAKC,MAAQH,GAAWA,EAAQG,OAAS,GAAIP,UAASQ,MAAOJ,GAC7DK,OAAOC,QAAQC,IAAKP,GACpBE,KAAKM,KAAO,GAAId,IACZe,MAAc,6BACdC,KAAc,iBACdC,OAAcX,EAAQW,OACtBC,KAAc,sBACdC,YACIC,KAAU,GAAInB,GAAGoB,YACbH,KAAU,gBACVI,QAAU,6BACVP,MAAU,cACVQ,QAAU,WAAahB,EAAKiB,SAAUlB,EAAQmB,cAGtDC,SACIC,KAAU,GAAI1B,GAAG2B,QACbN,QAAU,eACVP,MAAU,mBACVG,KAAU,UACVW,IAAU,4BACVC,SAAU,QACVP,QAAU,WAAahB,EAAKwB,cAIxCvB,KAAKwB,WAAYxB,KAAKM,KAAKmB,MAG/BC,eAAgB,SAAWC,EAAK7B,EAAS2B,GACrC,GAAI1B,GAAOC,IACXA,MAAKC,MAAQH,GAAWA,EAAQG,OAAS,GAAIP,UAASQ,MAAOJ,GAC7DE,KAAKM,KAAOP,EAAK6B,WAAY9B,EAAS6B,EAAK5B,EAAM0B,GACjDA,EAAII,OAAQ7B,KAAKM,KAAKmB,MAI1BG,WAAY,SAAU9B,EAAS6B,EAAK5B,EAAM0B,GACtC,MAAO,IAAIjC,IACPe,MAAO,sCACPG,KAAM,sBACND,OAAQX,EAAmB,UAC3Ba,YACIC,KAAQ,GAAInB,GAAGoB,YACXH,KAAU,gBACVI,QAAU,6BACVP,MAAU,cACVQ,QAAU,WAAahB,EAAKO,KAAKmB,IAAIT,SAAUW,EAAIG,sBAG3DC,SAAU,WACNhC,EAAKiC,iBAAkBjC,EAAM4B,EAAKF,OAM9CQ,YAAa,SAAUN,EAAKF,EAAK1B,EAAMmC,GACnCnC,EAAKO,KAAKmB,IAAIT,SACdjB,EAAKO,KAAOP,EAAK6B,WAAYM,EAAUP,EAAK5B,EAAM0B,GAClDA,EAAII,OAAQ9B,EAAKO,KAAKmB,KACtB1B,EAAKO,KAAK6B,QAAQC,QACdD,QAAUD,EAASC,QACnBE,OAA6B,UAApBH,EAASG,OAAqB,SAAW,aAK1DL,iBAAkB,SAAUjC,EAAM4B,EAAKF,GACnC,GAAIa,GAAUvC,EAAKO,KAAKiC,KAAKC,SACzBrB,GAAO,EACPsB,GAAS,EACTF,IACJ,KAAK,GAAIG,KAAQJ,GAETI,EAAKC,QAAQ,cAAgB,GAAuB,OAAlBL,EAAQI,KAC1CvB,GAAO,IAGLuB,EAAKC,QAAQ,OAAS,GAAKD,EAAKC,QAAQ,QAAU,IAA0B,OAAlBL,EAAQI,KACpED,GAAS,EACTF,EAAKG,GAAQJ,EAAQI,GAAM,GAG/BvB,IAAQsB,IACRF,EAAKK,aAAeH,EACpBI,EAAEC,QAASC,OAAOC,KAAO,+CAAgDT,EAAM,SAAUL,GACrFnC,EAAKkC,YAAaN,EAAKF,EAAK1B,EAAMmC"} \ No newline at end of file +{"version":3,"file":"change-permissions.js","sources":["../../../src/mvc/user/change-permissions.js"],"names":["define","Form","Ui","Backbone","View","extend","initialize","options","self","this","model","Model","window","console","log","form","title","name","inputs","icon","operations","back","ButtonIcon","tooltip","onclick","remove","onclose","buttons","save","Button","cls","floating","_save","setElement","$el","$","ajax","url","Galaxy","root","user","id","type","data","create","done","response","message","update","status","fail","responseJSON","err_msg"],"mappings":"AACAA,QAAU,qBAAsB,kBAAoB,SAAUC,EAAMC,GAChE,MAAOC,UAASC,KAAKC,QACjBC,WAAY,SAAWC,GACnB,GAAIC,GAAOC,IACXA,MAAKC,MAAQH,GAAWA,EAAQG,OAAS,GAAIP,UAASQ,MAAOJ,GAC7DK,OAAOC,QAAQC,IAAKP,GACpBE,KAAKM,KAAO,GAAId,IACZe,MAAc,6BACdC,KAAc,iBACdC,OAAcX,EAAQW,OACtBC,KAAc,sBACdC,YACIC,KAAU,GAAInB,GAAGoB,YACbH,KAAU,gBACVI,QAAU,6BACVP,MAAU,cACVQ,QAAU,WAAahB,EAAKiB,SAAUlB,EAAQmB,cAGtDC,SACIC,KAAU,GAAI1B,GAAG2B,QACbN,QAAU,eACVP,MAAU,mBACVG,KAAU,UACVW,IAAU,4BACVC,SAAU,QACVP,QAAU,WAAahB,EAAKwB,cAIxCvB,KAAKwB,WAAYxB,KAAKM,KAAKmB,MAI/BF,MAAO,WACH,GAAIxB,GAAOC,IACX0B,GAAEC,MACEC,IAAWC,OAAOC,KAAO,wBAA0BD,OAAOE,KAAKC,GAAK,eACpEC,KAAW,MACXC,KAAWnC,EAAKO,KAAK4B,KAAKC,WAC3BC,KAAM,SAAUC,GACftC,EAAKO,KAAKgC,QAAQC,QAAUD,QAASD,EAASC,QAASE,OAAQ,cAChEC,KAAM,SAAUJ,GACftC,EAAKO,KAAKgC,QAAQC,QAAUD,QAASD,EAASK,aAAaC,QAASH,OAAQ"} \ No newline at end of file diff --git a/static/scripts/bundled/libs.bundled.js b/static/scripts/bundled/libs.bundled.js index f8951865e41..df3f7fb217b 100644 --- a/static/scripts/bundled/libs.bundled.js +++ b/static/scripts/bundled/libs.bundled.js @@ -42,6 +42,6 @@ v='",{size:1}).attr("size")&&t.attrFn,a=t.attr,l=t.attrHooks.value&&t.attrHooks.value.get||function(){return null},h=t.attrHooks.value&&t.attrHooks.value.set||function(){return i},c=/^(?:input|button)$/i,u=/^[238]$/,d=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,p=/^(?:checked|selected)$/i;s(t,"attrFn",r||{},"jQuery.attrFn is deprecated"),t.attr=function(e,s,o,l){var h=s.toLowerCase(),f=e&&e.nodeType;return l&&(a.length<4&&n("jQuery.fn.attr( props, pass ) is deprecated"),e&&!u.test(f)&&(r?s in r:t.isFunction(t.fn[s])))?t(e)[s](o):("type"===s&&o!==i&&c.test(e.nodeName)&&e.parentNode&&n("Can't change the 'type' of an input or button in IE 6/7/8"),!t.attrHooks[h]&&d.test(h)&&(t.attrHooks[h]={get:function(e,n){var s,o=t.prop(e,n);return o===!0||"boolean"!=typeof o&&(s=e.getAttributeNode(n))&&s.nodeValue!==!1?n.toLowerCase():i},set:function(e,i,n){var s;return i===!1?t.removeAttr(e,n):(s=t.propFix[n]||n,s in e&&(e[s]=!0),e.setAttribute(n,n.toLowerCase())),n}},p.test(h)&&n("jQuery.fn.attr('"+h+"') might use property instead of attribute")),a.call(t,e,s,o))},t.attrHooks.value={get:function(t,e){var i=(t.nodeName||"").toLowerCase();return"button"===i?l.apply(this,arguments):("input"!==i&&"option"!==i&&n("jQuery.fn.attr('value') no longer gets properties"),e in t?t.value:null)},set:function(t,e){var i=(t.nodeName||"").toLowerCase();return"button"===i?h.apply(this,arguments):("input"!==i&&"option"!==i&&n("jQuery.fn.attr('value', val) no longer sets properties"),void(t.value=e))}};var f,g,m=t.fn.init,v=t.parseJSON,y=/^\s*)([^>]*)$/;t.fn.init=function(e,s,o){var r,a;return e&&"string"==typeof e&&!t.isPlainObject(s)&&(r=_.exec(t.trim(e)))&&r[0]&&(y.test(e)||n("$(html) HTML strings must start with '<' character"),r[3]&&n("$(html) HTML text after last tag is ignored"),"#"===r[0].charAt(0)&&(n("HTML string cannot start with a '#' character"),t.error("JQMIGRATE: Invalid selector string (XSS)")),s&&s.context&&(s=s.context),t.parseHTML)?m.call(this,t.parseHTML(r[2],s&&s.ownerDocument||s||document,!0),s,o):("#"===e?(n("jQuery( '#' ) is not a valid selector"),e=[]):b.test(e)&&n("Attribute selectors with '#' must be quoted: '"+e+"'"),a=m.apply(this,arguments),e&&e.selector!==i?(a.selector=e.selector,a.context=e.context):(a.selector="string"==typeof e?e:"",e&&(a.context=e.nodeType?e:s||document)),a)},t.fn.init.prototype=t.fn,t.parseJSON=function(t){return t?v.apply(this,arguments):(n("jQuery.parseJSON requires a valid JSON string"),null)},t.uaMatch=function(t){t=t.toLowerCase();var e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},t.browser||(f=t.uaMatch(navigator.userAgent),g={},f.browser&&(g[f.browser]=!0,g.version=f.version),g.chrome?g.webkit=!0:g.webkit&&(g.safari=!0),t.browser=g),s(t,"browser",t.browser,"jQuery.browser is deprecated"),t.boxModel=t.support.boxModel="CSS1Compat"===document.compatMode,s(t,"boxModel",t.boxModel,"jQuery.boxModel is deprecated"),s(t.support,"boxModel",t.support.boxModel,"jQuery.support.boxModel is deprecated"),t.sub=function(){function e(t,i){return new e.fn.init(t,i)}t.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,s){var o=t.fn.init.call(this,n,s,i);return o instanceof e?o:e(o)},e.fn.init.prototype=e.fn;var i=e(document);return n("jQuery.sub() is deprecated"),e},t.fn.size=function(){return n("jQuery.fn.size() is deprecated; use the .length property"),this.length};var w=!1;t.swap&&t.each(["height","width","reliableMarginRight"],function(e,i){var n=t.cssHooks[i]&&t.cssHooks[i].get;n&&(t.cssHooks[i].get=function(){var t;return w=!0,t=n.apply(this,arguments),w=!1,t})}),t.swap=function(t,e,i,s){var o,r,a={};w||n("jQuery.swap() is undocumented and deprecated");for(r in e)a[r]=t.style[r],t.style[r]=e[r];o=i.apply(t,s||[]);for(r in e)t.style[r]=a[r];return o},t.ajaxSetup({converters:{"text json":t.parseJSON}});var x=t.fn.data;t.fn.data=function(e){var s,o,r=this[0];return!r||"events"!==e||1!==arguments.length||(s=t.data(r,e),o=t._data(r,e),s!==i&&s!==o||o===i)?x.apply(this,arguments):(n("Use of jQuery.fn.data('events') is deprecated"),o)};var C=/\/(java|ecma)script/i;t.clean||(t.clean=function(e,i,s,o){i=i||document,i=!i.nodeType&&i[0]||i,i=i.ownerDocument||i,n("jQuery.clean() is deprecated");var r,a,l,h,c=[];if(t.merge(c,t.buildFragment(e,i).childNodes),s)for(l=function(t){if(!t.type||C.test(t.type))return o?o.push(t.parentNode?t.parentNode.removeChild(t):t):s.appendChild(t)},r=0;null!=(a=c[r]);r++)t.nodeName(a,"script")&&l(a)||(s.appendChild(a),"undefined"!=typeof a.getElementsByTagName&&(h=t.grep(t.merge([],a.getElementsByTagName("script")),l),c.splice.apply(c,[r+1,0].concat(h)),r+=h.length));return c});var k=t.event.add,S=t.event.remove,T=t.event.trigger,E=t.fn.toggle,$=t.fn.live,A=t.fn.die,N=t.fn.load,M="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",O=new RegExp("\\b(?:"+M+")\\b"),D=/(?:^|\s)hover(\.\S+|)\b/,P=function(e){return"string"!=typeof e||t.event.special.hover?e:(D.test(e)&&n("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),e&&e.replace(D,"mouseenter$1 mouseleave$1"))};t.event.props&&"attrChange"!==t.event.props[0]&&t.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),t.event.dispatch&&s(t.event,"handle",t.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),t.event.add=function(t,e,i,s,o){t!==document&&O.test(e)&&n("AJAX events should be attached to document: "+e),k.call(this,t,P(e||""),i,s,o)},t.event.remove=function(t,e,i,n,s){S.call(this,t,P(e)||"",i,n,s)},t.each(["load","unload","error"],function(e,i){t.fn[i]=function(){var t=Array.prototype.slice.call(arguments,0);return"load"===i&&"string"==typeof t[0]?N.apply(this,t):(n("jQuery.fn."+i+"() is deprecated"),t.splice(0,0,i),arguments.length?this.bind.apply(this,t):(this.triggerHandler.apply(this,t),this))}}),t.fn.toggle=function(e,i){if(!t.isFunction(e)||!t.isFunction(i))return E.apply(this,arguments);n("jQuery.fn.toggle(handler, handler...) is deprecated");var s=arguments,o=e.guid||t.guid++,r=0,a=function(i){var n=(t._data(this,"lastToggle"+e.guid)||0)%r;return t._data(this,"lastToggle"+e.guid,n+1),i.preventDefault(),s[n].apply(this,arguments)||!1};for(a.guid=o;r").addClass("ui-form-element").append(o("
").addClass("ui-form-error ui-error").append(o("").addClass("fa fa-arrow-down")).append(o("").addClass("ui-form-error-text"))).append(o("
").addClass("ui-form-title").append(o("
").addClass("ui-form-collapsible").append(o("").addClass("ui-form-collapsible-icon")).append(o("").addClass("ui-form-collapsible-text"))).append(o("").addClass("ui-form-title-text"))).append(o("
").addClass("ui-form-field").append(o("").addClass("ui-form-info")).append(o("
").addClass("ui-form-backdrop"))).append(o("
").addClass("ui-form-preview"))}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,r,a){n=[i(6),i(7),i(112),i(114),i(113),i(110)],s=function(t,e,i,n,s,l){return o.Model.extend({types:{text:"_fieldText",password:"_fieldText",select:"_fieldSelect",data_column:"_fieldSelect",genomebuild:"_fieldSelect",data:"_fieldData",data_collection:"_fieldData",integer:"_fieldSlider","float":"_fieldSlider","boolean":"_fieldBoolean",drill_down:"_fieldDrilldown",color:"_fieldColor",hidden:"_fieldHidden",hidden_data:"_fieldHidden",baseurl:"_fieldHidden",library_data:"_fieldLibrary",ftpfile:"_fieldFtp"},create:function(t){var e=this.types[t.type],i="function"==typeof this[e]?this[e].call(this,t):null;return i||(i=t.options?this._fieldSelect(t):this._fieldText(t),Galaxy.emit.debug("form-parameters::_addRow()","Auto matched field type ("+t.type+").")),void 0===t.value&&(t.value=null),i.value&&i.value(t.value),i},_fieldData:function(t){return new i.View({id:"field-"+t.id,extensions:t.extensions,optional:t.optional,multiple:t.multiple,type:t.type,flavor:t.flavor,data:t.options,onchange:t.onchange})},_fieldSelect:function(t){if(t.is_workflow)return this._fieldText(t);"data_column"==t.type&&(t.error_text="Missing columns in referenced dataset.");var i=t.data;i||(i=[],r.each(t.options,function(t){i.push({label:t[0],value:t[1]})}));var n=e.Select;switch(t.display){case"checkboxes":n=e.Checkbox;break;case"radio":n=e.Radio;break;case"radiobutton":n=e.RadioButton}return new n.View({id:"field-"+t.id,data:i,error_text:t.error_text||"No options available",multiple:t.multiple,optional:t.optional,onchange:t.onchange,searchable:"workflow"!==t.flavor})},_fieldDrilldown:function(t){return t.is_workflow?this._fieldText(t):new e.Drilldown.View({id:"field-"+t.id,data:t.options,display:t.display,optional:t.optional,onchange:t.onchange})},_fieldText:function(i){if(i.options&&i.data)if(i.area=i.multiple,t.isEmpty(i.value))i.value=null;else if(a.isArray(i.value)){var n="";for(var s in i.value){if(n+=String(i.value[s]),!i.multiple)break;n+="\n"}i.value=n}return new e.Input({id:"field-"+i.id,type:i.type,area:i.area,readonly:i.readonly,placeholder:i.placeholder,onchange:i.onchange})},_fieldSlider:function(t){return new e.Slider.View({id:"field-"+t.id,precise:"float"==t.type,is_workflow:t.is_workflow,min:t.min,max:t.max,onchange:t.onchange})},_fieldHidden:function(t){return new e.Hidden({id:"field-"+t.id,info:t.info})},_fieldBoolean:function(t){return new e.RadioButton.View({id:"field-"+t.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:t.onchange})},_fieldColor:function(t){return new l({id:"field-"+t.id,onchange:t.onchange})},_fieldLibrary:function(t){return new n.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:t.onchange})},_fieldFtp:function(t){return new s.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:t.onchange})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,r,a){n=[i(6),i(21),i(7)],s=function(t,e,i){var n=o.View.extend({initialize:function(e){this.list={},this.options=t.merge(e,{title:"Repeat",empty_text:"Not available.",max:null,min:null}),this.button_new=new i.ButtonIcon({icon:"fa-plus",title:"Insert "+this.options.title,tooltip:"Add new "+this.options.title+" block",floating:"clear",cls:"ui-button-icon form-repeat-add",onclick:function(){e.onnew&&e.onnew()}}),this.setElement(r("
").append(this.$list=r("
")).append(r("
").append(this.button_new.$el)))},size:function(){return a.size(this.list)},add:function(t){if(!t.id||this.list[t.id])return void Galaxy.emit.debug("form-repeat::add()","Duplicate or invalid repeat block id.");var n=new i.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain form-repeat-delete",onclick:function(){t.ondel&&t.ondel()}}),s=new e.View({id:t.id,title:"placeholder",cls:t.cls||"ui-portlet-repeat",operations:{button_delete:n}});s.append(t.$el),s.$el.addClass("section-row").hide(),this.list[t.id]=s,this.$list.append(s.$el.fadeIn("fast")),this.options.max>0&&this.size()>=this.options.max&&this.button_new.disable(),this._refresh()},del:function(t){return this.list[t]?(this.$list.find("#"+t).remove(),delete this.list[t],this.button_new.enable(),void this._refresh()):void Galaxy.emit.debug("form-repeat::del()","Invalid repeat block id.")},delAll:function(){for(var t in this.list)this.del(t)},hideOptions:function(){this.button_new.$el.hide(),a.each(this.list,function(t){t.hideOperation("button_delete")}),a.isEmpty(this.list)&&this.$el.append(r("
").addClass("ui-form-info").html(this.options.empty_text))},_refresh:function(){var t=0;for(var e in this.list){var i=this.list[e];i.title(++t+": "+this.options.title),i[this.size()>this.options.min?"showOperation":"hideOperation"]("button_delete")}}});return{View:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,r,a,l){n=[i(6),i(7),i(21),i(101),i(99),i(100)],s=function(t,e,i,n,s,h){var c=o.View.extend({initialize:function(t,e){this.app=t,this.inputs=e.inputs,this.parameters=new h,this.setElement(r("
")),this.render()},render:function(){var t=this;this.$el.empty(),a.each(this.inputs,function(e){t.add(e)})},add:function(e){var i=l.extend(!0,{},e);switch(i.id=e.id=t.uid(),this.app.input_list[i.id]=i,i.type){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(t){var e=this;t.test_param.id=t.id,this.app.options.sustain_conditionals&&(t.test_param.disabled=!0);var i=this._addRow(t.test_param);i.model&&i.model.set("onchange",function(i){var n=e.app.data.matchCase(t,i);for(var s in t.cases){var o=t.cases[s],r=e.$("#"+t.id+"-section-"+s),a=!1;for(var l in o.inputs)if(!o.inputs[l].hidden){a=!0;break}s==n&&a?r.fadeIn("fast"):r.hide()}e.app.trigger("change")});for(var n in t.cases){var s=new c(this.app,{inputs:t.cases[n].inputs});this._append(s.$el.addClass("ui-form-section"),t.id+"-section-"+n)}i.trigger("change")},_addRepeat:function(t){function e(e){var n=t.id+"-section-"+o++,s=new c(i.app,{inputs:e});r.add({id:n,$el:s.$el,ondel:function(){r.del(n),i.app.trigger("change")}})}for(var i=this,o=0,r=new n.View({title:t.title||"Repeat",min:t.min,max:t.max,onnew:function(){e(t.inputs),i.app.trigger("change")}}),l=a.size(t.cache),h=0;h").addClass("ui-form-info").html(t.help)),this.app.on("expand",function(t){e.$("#"+t).length>0&&e.expand()}),this._append(e.$el,t.id)},_addRow:function(t){var e=this,i=t.id;t.onchange=function(){e.app.trigger("change",i)};var n=this.parameters.create(t);this.app.field_list[i]=n;var o=new s(this.app,{name:t.name,label:t.label||t.name,value:t.value,text_value:t.text_value,collapsible_value:t.collapsible_value,collapsible_preview:t.collapsible_preview,help:t.help,argument:t.argument,disabled:t.disabled,color:t.color,style:t.style,backdrop:t.backdrop,hidden:t.hidden,field:n});return this.app.element_list[i]=o,this._append(o.$el,t.id),n},_append:function(t,e){this.$el.append(t.addClass("section-row").attr("id",e))}});return{View:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2),i(1))},,,,,,,,function(t,e,i){var n,s;(function(o,r){n=[i(6)],s=function(t){return o.View.extend({colors:{standard:["c00000","ff0000","ffc000","ffff00","92d050","00b050","00b0f0","0070c0","002060","7030a0"],base:["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646"],theme:[["f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada"],["d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5"],["bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","92cddc","fac08f"],["a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","31859b","e36c09"],["7f7f7e","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","205867","974806"]]},initialize:function(e){this.options=t.merge(e,{}),this.setElement(this._template()),this.$panel=this.$(".ui-color-picker-panel"),this.$view=this.$(".ui-color-picker-view"),this.$value=this.$(".ui-color-picker-value"),this.$header=this.$(".ui-color-picker-header"),this._build(),this.visible=!1,this.value(this.options.value),this.$boxes=this.$(".ui-color-picker-box");var i=this;this.$boxes.on("click",function(){i.value(r(this).css("background-color")),i.$header.trigger("click")}),this.$header.on("click",function(){i.visible=!i.visible,i.visible?i.$view.fadeIn("fast"):i.$view.fadeOut("fast")})},value:function(t){return void 0!==t&&null!==t&&(this.$value.css("background-color",t),this.$(".ui-color-picker-box").empty(),this.$(this._getValue()).html(this._templateCheck()),this.options.onchange&&this.options.onchange(t)),this._getValue()},_getValue:function(){function t(t){return("0"+parseInt(t).toString(16)).slice(-2)}var e=this.$value.css("background-color");return e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),e?"#"+t(e[1])+t(e[2])+t(e[3]):null},_build:function(){this._content({label:"Theme Colors",colors:this.colors.base,padding:10});for(var t in this.colors.theme){var e={};0==t?e.bottom=!0:t!=this.colors.theme.length-1?(e.top=!0,e.bottom=!0):(e.top=!0,e.padding=5),e.colors=this.colors.theme[t],this._content(e)}this._content({label:"Standard Colors",colors:this.colors.standard,padding:5})},_content:function(t){var e=(t.label,t.colors),i=t.padding,n=t.top,s=t.bottom,o=r(this._templateContent()),a=o.find(".label");t.label?a.html(t.label):a.hide();var l=o.find(".line");this.$panel.append(o);for(var h in e){var c=r(this._templateBox(e[h]));n&&(c.css("border-top","none"),c.css("border-top-left-radius","0px"),c.css("border-top-right-radius","0px")),s&&(c.css("border-bottom","none"),c.css("border-bottom-left-radius","0px"),c.css("border-bottom-right-radius","0px")),l.append(c)}return i&&l.css("padding-bottom",i),o},_templateCheck:function(){return'
'},_templateContent:function(){return'
'},_templateBox:function(t){return'
'},_template:function(){return'
Select a color
'}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,n){var s,o;(function(r,a){s=[n(6),n(66)],o=function(t,e){var n=e.BaseIcons.extend({initialize:function(t){t.type=t.display||"checkbox",t.multiple="checkbox"==t.type,e.BaseIcons.prototype.initialize.call(this,t)},_setValue:function(t){if(e.BaseIcons.prototype._setValue.call(this,t),void 0!==t&&null!==t&&this.header_index){var i=this,n=r.isArray(t)?t:[t];a.each(n,function(t){var e=i.header_index[t];a.each(e,function(t){i._setState(t,!0)})})}},_setState:function(t,e){var i=this.$(".button-"+t),n=this.$(".subgroup-"+t);i.data("is_expanded",e),e?(n.show(),i.removeClass("fa-plus-square").addClass("fa-minus-square")):(n.hide(),i.removeClass("fa-minus-square").addClass("fa-plus-square"))},_templateOptions:function(){function e(t,e){var i=t.find(".button-"+e);i.on("click",function(){s._setState(e,!i.data("is_expanded"))})}function n(o,a,l){l=l||[];for(i in a){var h=a[i],c=h.options&&h.options.length>0,u=l.slice(0);s.header_index[h.value]=u.slice(0);var d=r("
");if(c){var p=t.uid(),f=r("").addClass("button-"+p).addClass("ui-drilldown-button fa fa-plus-square"),g=r("
").addClass("subgroup-"+p).addClass("ui-drilldown-subgroup");d.append(r("
").append(f).append(s._templateOption({label:h.name,value:h.value}))),u.push(p),n(g,h.options,u),d.append(g),e(d,p)}else d.append(s._templateOption({label:h.name,value:h.value}));o.append(d)}}var s=this;this.header_index={};var o=r("
");return n(o,this.model.get("data")),o},_template:function(){return r("
").addClass("ui-options-list drilldown-container").attr("id",this.model.id)}});return{View:n}}.apply(e,s),!(void 0!==o&&(t.exports=o))}).call(e,n(1),n(2))},function(t,e,i){var n,s;(function(o,r,a){n=[i(6),i(7),i(67)],s=function(t,e,i){var n={DISABLED:"disabled",ENABLED:"enabled",LINKED:"linked"},s={data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:n.DISABLED},{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.LINKED},{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.LINKED}],data_multiple:[{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.DISABLED},{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED}],data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED}],workflow_data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:n.DISABLED}],workflow_data_multiple:[{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.DISABLED}],workflow_data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED}],module_data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:n.DISABLED},{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.ENABLED}],module_data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED},{src:"hdca",icon:"fa-folder",tooltip:"Multiple collections",multiple:!0,batch:n.ENABLED}]},l=o.View.extend({initialize:function(t){var i=this;this.model=t&&t.model||new o.Model({src_labels:{hda:"dataset",hdca:"dataset collection"},pagelimit:100}).set(t),this.setElement(r("
").addClass("ui-select-content")),this.button_product=new e.RadioButton.View({value:"false",data:[{icon:"fa fa-chain",value:"false",tooltip:"Linked inputs will be run in matched order with other datasets e.g. use this for matching forward and reverse reads."},{icon:"fa fa-chain-broken",value:"true",tooltip:"Unlinked dataset inputs will be run against *all* other inputs."}]});var n=r("
").addClass("ui-form-info").append(r("").addClass("fa fa-sitemap")).append(r("").html("This is a batch mode input field. Separate jobs will be triggered for each dataset selection."));this.$batch={linked:n.clone(),enabled:n.clone().append(r("
").append(r("
").addClass("ui-form-title").html("Batch options:")).append(this.button_product.$el)).append(r("
").css("clear","both"))},this.history={},this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:current",this._changeCurrent,this),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:type change:optional change:multiple change:extensions",this._changeType,this),this.render(),this.on("change",function(){t.onchange&&t.onchange(i.value())})},render:function(){this._changeType(),this._changeValue(),this._changeWait()},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},update:function(t){this.model.set("data",t)},value:function(t){void 0!==t&&this.model.set("value",t);var e=this.model.get("current");if(this.config[e]){var i=this.fields[e].value();if(null!==i&&(i=r.isArray(i)?i:[i],i.length>0)){var n=this._batch({values:[]});for(var s in i){var o=this.history[i[s]+"_"+this.config[e].src];if(!o)return Galaxy.emit.debug("ui-select-content::value()","Requested details not found for '"+i[s]+"'."), -null;n.values.push(o)}return n.values.sort(function(t,e){return t.hid-e.hid}),n}}else Galaxy.emit.debug("ui-select-content::value()","Invalid value/source '"+t+"'.");return null},_changeCurrent:function(){var t=this;a.each(this.fields,function(e,i){t.model.get("current")==i?(e.$el.show(),a.each(t.$batch,function(e,n){e[t.config[i].batch==n?"show":"hide"]()}),t.button_type.value(i)):e.$el.hide()})},_changeType:function(){var n=this,o=(this.model.get("flavor")?this.model.get("flavor")+"_":"")+String(this.model.get("type"))+(this.model.get("multiple")?"_multiple":"");s[o]?this.config=s[o]:(this.config=s.data,Galaxy.emit.debug("ui-select-content::_changeType()","Invalid configuration/type id '"+o+"'."));var r=n.model.get("data"),l=t.textify(this.model.get("extensions")),h=this.model.get("src_labels");this.fields=[],this.button_data=[],a.each(this.config,function(t,e){n.button_data.push({value:e,icon:t.icon,tooltip:t.tooltip}),n.fields.push(new i.View({optional:n.model.get("optional"),multiple:t.multiple,searchable:!t.multiple||r&&r[t.src]&&r[t.src].length>n.model.get("pagelimit"),selectall:!1,error_text:"No "+(l?l+" ":"")+(h[t.src]||"content")+" available.",onchange:function(){n.trigger("change")}}))}),this.button_type=new e.RadioButton.View({value:this.model.get("current"),data:this.button_data,onchange:function(t){n.model.set("current",t),n.trigger("change")}}),this.$el.empty();var c=0;this.fields.length>1&&(this.$el.append(this.button_type.$el),c=Math.max(0,36*this.fields.length)+"px"),a.each(this.fields,function(t){n.$el.append(t.$el.css({"margin-left":c}))}),a.each(this.$batch,function(t,e){n.$el.append(t.css({"margin-left":c}))}),this.model.set("current",0),this._changeCurrent(),this._changeData()},_changeWait:function(){var t=this;a.each(this.fields,function(e){e[t.model.get("wait")?"wait":"unwait"]()})},_changeData:function(){var t=this.model.get("data"),e=this,i={};a.each(t,function(t,n){i[n]=[],a.each(t,function(t){i[n].push({hid:t.hid,keep:t.keep,label:t.hid+": "+t.name,value:t.id}),e.history[t.id+"_"+n]=t})}),a.each(this.config,function(t,n){i[t.src]&&e.fields[n].add(i[t.src],function(t,e){return e.hid-t.hid})})},_changeValue:function(){var t=this.model.get("value");if(t&&t.values&&t.values.length>0){var e=[];a.each(t.values,function(t){e.push(t.id)});for(var i=t.values[0].src,n=t.values.length>1,s=0;s
Select Library
'}});return{View:a}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o,r){n=[i(6)],s=function(t){var e=o.View.extend({initialize:function(e){var i=this;this.options=t.merge(e,{id:t.uid(),min:null,max:null,step:null,precise:!1,split:1e4}),this.setElement(this._template(this.options)),this.useslider=null!==this.options.max&&null!==this.options.min&&this.options.max>this.options.min,null===this.options.step&&(this.options.step=1,this.options.precise&&this.useslider&&(this.options.step=(this.options.max-this.options.min)/this.options.split)),this.useslider?(this.$slider=this.$("#slider"),this.$slider.slider(this.options),this.$slider.on("slide",function(t,e){i.value(e.value)})):this.$(".ui-form-slider-text").css("width","100%"),this.$text=this.$("#text"),void 0!==this.options.value&&this.value(this.options.value);var n=[];this.$text.on("change",function(){i.value(r(this).val())}),this.$text.on("keyup",function(t){n[t.which]=!1,i.options.onchange&&i.options.onchange(r(this).val())}),this.$text.on("keydown",function(t){var e=t.which;n[e]=!0,i.options.is_workflow&&n[16]&&52==e?(i.value("$"),event.preventDefault()):8==e||9==e||13==e||37==e||39==e||e>=48&&e<=57&&!n[16]||e>=96&&e<=105||(190==e||110==e)&&r(this).val().indexOf(".")==-1&&i.options.precise||(189==e||109==e)&&r(this).val().indexOf("-")==-1||i._isParameter(r(this).val())||n[91]||n[17]||event.preventDefault()})},value:function(t){return void 0!==t&&(null===t||""===t||this._isParameter(t)||(isNaN(t)&&(t=0),null!==this.options.max&&(t=Math.min(t,this.options.max)),null!==this.options.min&&(t=Math.max(t,this.options.min))),this.$slider&&this.$slider.slider("value",t),this.$text.val(t),this.options.onchange&&this.options.onchange(t)),this.$text.val()},_isParameter:function(t){return this.options.is_workflow&&"$"===String(t).substring(0,1)},_template:function(t){return'
'}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(6)],s=function(t){var e=o.View.extend({row:null,row_count:0,optionsDefault:{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",cls_tr:""},events:{click:"_onclick",dblclick:"_ondblclick"},initialize:function(e){this.options=t.merge(e,this.optionsDefault);var i=r(this._template(this.options));this.$thead=i.find("thead"),this.$tbody=i.find("tbody"),this.$tmessage=i.find("tmessage"),this.setElement(i),this.row=this._row()},addHeader:function(t){var e=r("");e.append(t),this.row.append(e)},appendHeader:function(){this.$thead.append(this.row),this.row=r("")},add:function(t,e,i){var n=r("");e&&n.css("width",e),i&&n.css("text-align",i),n.append(t),this.row.append(n)},append:function(t,e){this._commit(t,e,!1)},prepend:function(t,e){this._commit(t,e,!0)},get:function(t){return this.$el.find("#"+t)},del:function(t){var e=this.$tbody.find("#"+t);e.length>0&&(e.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(t){this.before=this.$tbody.find(".current").attr("id"),void 0!==t&&(this.$tbody.find("tr").removeClass("current"),t&&this.$tbody.find("#"+t).addClass("current"));var e=this.$tbody.find(".current").attr("id");return void 0===e?null:(e!=this.before&&this.options.onchange&&this.options.onchange(t),e)},size:function(){return this.$tbody.find("tr").length},_commit:function(t,e,i){this.del(t),this.row.attr("id",t),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),e&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return r('')},_onclick:function(t){var e=this.value(),i=r(t.target).closest("tr").attr("id");""!=i&&i&&e!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(t){var e=this.value();e&&this.options.ondblclick&&this.options.ondblclick(e)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(t){return'
'+t.content+"
"}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,,,,,,,function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Web API Key",icon:"fa-key",inputs:[{name:"api-key",type:"text",label:"Current API key:",value:i.api_key||"Not available.",readonly:!0,help:" An API key will allow you to access "+("galaxy"===i.webapp?"Galaxy":"the Tool Shed")+" via its web API. Please note that this key acts as an alternate means to access your account and should be treated with the same care as your login password."}],operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{submit:new e.Button({tooltip:"Generate new key "+(i.api_key?"(invalidates old key) ":""),title:"Generate a new key",icon:"fa-check",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._submit()}})}}),this.setElement(this.form.$el)},_submit:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/api_key",type:"PUT",data:{new_api_key:!0}}).done(function(e){if(e.api_key){var i=t.form.data.match("api-key");t.form.field_list[i].value(e.api_key),t.form.message.update({message:e.message,status:"success"})}else t.form.message.update({message:"API key missing from response.",status:"danger"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Enable real-time communication with other Galaxy users",icon:"fa-child",inputs:[{name:"enable",type:"boolean",label:"Enable communication",value:i.activated}],operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},onchange:function(){n._save()}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/communication",type:"PUT",data:{enable:t.form.data.create().enable}}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.original_email=i.email,this.original_username=i.username,this.form=new t({title:"Login Information",inputs:i.inputs,operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({tooltip:"Save",title:"Save Changes",icon:"fa-save",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement("
"),this.$el.append(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/information",type:"PUT",data:t.form.data.create()}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Change Password",icon:"fa-key",inputs:[{name:"current",type:"password",label:"Current password"},{name:"password",type:"password",label:"New password"},{name:"confirm",type:"password",label:"Confirm password"},{name:"token",type:"hidden",hidden:!0,ignore:null}],operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({icon:"fa-save",tooltip:"Save settings",title:"Save Password",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/password",type:"PUT",data:{enable:t.form.data.create()}}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),window.console.log(i),this.form=new t({title:"Manage dataset permissions",name:"toolbox_filter",inputs:i.inputs,icon:"fa-universal-access",operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({tooltip:"Save changes",title:"Save Permissions",icon:"fa-save",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement(this.form.$el)},initializedssd:function(t,e,i){var n=this;this.model=e&&e.model||new o.Model(e),this.form=n._buildForm(e,t,n,i),i.append(this.form.$el)},_buildForm:function(i,n,s,o){return new t({title:"Manage dataset permissions on EMAIL",icon:"fa-universal-access",inputs:i.role_form,operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){s.form.$el.remove(),n.showPreferences()}})},onchange:function(){s._savePermissions(s,n,o)}})},_updateForm:function(t,e,i,n){i.form.$el.remove(),i.form=i._buildForm(n,t,i,e),e.append(i.form.$el),i.form.message.update({message:n.message,status:"error"===n.status?"danger":"success"})},_savePermissions:function(t,e,i){var n=t.form.data.create(),s=!1,o=!1,a={};for(var l in n)l.indexOf("actionrole")>0&&null!==n[l]&&(s=!0),(l.indexOf("_in")>0||l.indexOf("_out")>0)&&null!==n[l]&&(o=!0,a[l]=n[l][0]);s&&o&&(a.update_roles=o,r.getJSON(Galaxy.root+"api/user_preferences/set_default_permissions",a,function(n){t._updateForm(e,i,t,n)}))}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Manage Toolbox Filters",name:"toolbox_filter",inputs:i.inputs,icon:"fa-filter",operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({tooltip:"Save changes",title:"Save Filters",icon:"fa-save",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/toolbox_filters",type:"PUT",data:t.form.data.create()}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r,a){n=[i(126),i(127),i(128),i(124),i(129),i(125)],s=function(t,e,i,n,s,l){var h=o.View.extend({initialize:function(){this.setElement("
"),this.render()},_link:function(t){var e=this,i=r(''+t.title+"").on("click",function(){r.ajax({url:Galaxy.root+t.url,type:"GET"}).always(function(i){e.$preferences.hide(),i.onclose=function(){e.$preferences.show()},e.$el.append(new t.module(i).$el)})});this.$pages.append(r("
  • ").append(i))},render:function(){var o=this;r.getJSON(Galaxy.root+"api/user_preferences",function(h){if(o.$preferences=r("
    "),null!==h.id){if(o.$preferences.append("

    User preferences

    ").append("

    You are currently logged in as "+a.escape(h.email)+".

    ").append(o.$pages=r("
      ")),h.remote_user||(o._link({title:"Manage your information (email, address, etc.)",url:"api/user_preferences/"+Galaxy.user.id+"/information",module:t}),o._link({title:"Change your password",url:"api/user_preferences/"+Galaxy.user.id+"/password",module:e})),"galaxy"==h.webapp?(o._link({title:"Change your communication settings",url:"api/user_preferences/"+Galaxy.user.id+"/communication",module:l}),o._link({title:"Change default permissions for new histories",url:"api/user_preferences/"+Galaxy.user.id+"/permissions",module:i}),o._link({title:"Manage your API keys",url:"api/user_preferences/"+Galaxy.user.id+"/api_key",module:n}),o._link({title:"Manage your ToolBox filters",url:"api/user_preferences/"+Galaxy.user.id+"/toolbox_filters",module:s}),h.openid&&!h.remote_user&&o._link({title:"Manage OpenIDs linked to your account",module:null})):(o._link({title:"Manage your API keys",module:n}),o._link({title:"Manage your email alerts",module:null})),"galaxy"==h.webapp){var c="

      You are using "+h.disk_usage+" of disk space in this Galaxy instance. ";h.enable_quotas&&(c+="Your disk quota is: "+h.quota+". "),c+='Is your usage more than expected? See the documentation for tips on how to find all of the data in your account.

      ',o.$preferences.append(c)}}else h.message||o.$preferences.append("

      You are currently not logged in.

      "),$preferences('');o.$el.empty().append(o.$preferences)})}});return{UserPreferences:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,r,a){n=[i(5),i(4)],s=function(t,e){"use strict";var i="user",n=o.View.extend(t.LoggableMixin).extend({_logNamespace:i,options:{warnAtPercent:85,errorAtPercent:100},initialize:function(t){this.log(this+".initialize:",t),r.extend(this.options,t),this.listenTo(this.model,"change:quota_percent change:total_disk_usage",this.render)},update:function(t){return this.log(this+" updating user data...",t),this.model.loadFromApi(this.model.get("id"),t),this},isOverQuota:function(){return null!==this.model.get("quota_percent")&&this.model.get("quota_percent")>=this.options.errorAtPercent},_render_quota:function(){var t=this.model.toJSON(),e=t.quota_percent,i=a(this._templateQuotaMeter(t)),n=i.find(".progress-bar");return this.isOverQuota()?(n.attr("class","progress-bar progress-bar-danger"),i.find(".quota-meter-text").css("color","white"),this.trigger("quota:over",t)):e>=this.options.warnAtPercent?(n.attr("class","progress-bar progress-bar-warning"),this.trigger("quota:under quota:under:approaching",t)):(n.attr("class","progress-bar progress-bar-success"),this.trigger("quota:under quota:under:ok",t)),i},_render_usage:function(){var t=a(this._templateUsage(this.model.toJSON()));return this.log(this+".rendering usage:",t),t},render:function(){var t=null;return this.log(this+".model.quota_percent:",this.model.get("quota_percent")),t=null===this.model.get("quota_percent")||void 0===this.model.get("quota_percent")?this._render_usage():this._render_quota(),this.$el.html(t),this.$el.find(".quota-meter-text").tooltip(),this},_templateQuotaMeter:function(t){return['
      ','
      ','
      ':">",e("Using")," ",t.quota_percent,"%","
      ","
      "].join("")},_templateUsage:function(t){return['
      ','
      ',t.nice_total_disk_usage?e("Using ")+t.nice_total_disk_usage:"","
      ","
      "].join("")},toString:function(){return"UserQuotaMeter("+this.model+")"}});return{UserQuotaMeter:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){(function(t,e,n,s){function o(e,i,n){function o(t){var e=s(t),i={placeholder:"Click to select",closeOnSelect:!e.is("[MULTIPLE]"),dropdownAutoWidth:!0,containerCssClass:"select2-minwidth"};return t.select2(i)}t.fn.select2&&(void 0===e&&(e=20),void 0===i&&(i=3e3),n=n||s("select"),n.each(function(){var t=s(this).not("[multiple]"),n=t.find("option").length;ni||t.hasClass("no-autocomplete")||o(t)}))}function r(){s("select[refresh_on_change='true']").off("change").change(function(){var t=s(this),e=t.val(),i=t.attr("refresh_on_change_values");if(i){i=i.split(",");var n=t.attr("last_selected_value");if(s.inArray(e,i)===-1&&s.inArray(n,i)===-1)return}s(window).trigger("refresh_on_change"),s(document).trigger("convert_to_values"),t.get(0).form.submit()}),s(":checkbox[refresh_on_change='true']").off("click").click(function(){var t=s(this),e=t.val(),i=t.attr("refresh_on_change_values");if(i){i=i.split(",");var n=t.attr("last_selected_value");if(s.inArray(e,i)===-1&&s.inArray(n,i)===-1)return}s(window).trigger("refresh_on_change"),t.get(0).form.submit()}),s("a[confirm]").off("click").click(function(){return confirm(s(this).attr("confirm"))})}window.jQuery=t,window.$=t,window._=e,window.Backbone=n,window.panels=i(10),e.extend(window,i(43)),window.async_save_text=i(137);var a=i(135);window.make_popupmenu=a.make_popupmenu,window.make_popup_menus=a.make_popup_menus,window.init_tag_click_function=i(71);var l=i(36);i(41);window.init_refresh_on_change=r,s(document).ready(function(){r(),s.fn.tooltip&&(s(".unified-panel-header [title]").tooltip({placement:"bottom"}),s("[title]").tooltip()),make_popup_menus(),o(20,1500),s("a").click(function(){var t=s(this),e=parent.frames&&parent.frames.galaxy_main;if("galaxy_main"==t.attr("target")&&!e){var i=t.attr("href");i+=i.indexOf("?")==-1?"?":"&",i+="use_panels=True",t.attr("href",i),t.attr("target","_self")}return t});var t=JSON.parse(sessionStorage.getItem("activeGalaxyTour"));if(t&&(t=l.hooked_tour_from_data(t),t&&t.steps&&window&&window.self===window.top)){var i=new Tour(e.extend({steps:t.steps},l.tour_opts));i.init(),i.restart()}})}).call(e,i(1),i(2),i(3),i(1))},function(t,e,i){(function(t){!function(){"use strict";window.console=window.console||{log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){}},Object.assign=Object.assign||t.extend;for(var e=0,i=["ms","moz","webkit","o"],n=0;n=0}catch(t){}return!1}}],o=s.filter(function(t){return!t.compatible()}).map(function(t){return t.name});if(o.length){var r=document.querySelectorAll('link[rel="index"]').item(0);r&&(window.location=r.href+"static/incompatible-browser.html"),console.log("incompatible browser:\n"+o.join("\n"))}}()}).call(e,i(2))},,function(t,e,i){var n,s;(function(o){n=[i(1)],s=function(t){"use_strict";function e(t,e){var i=t.data("menu_options");t.data("menu_options",e),i||t.bind("click.show_popup",function(e){return n(".popmenu-wrapper").remove(),setTimeout(function(){var i=n(""),s=t.data("menu_options");o.size(s)<=0&&n("
    • No Options.
    • ").appendTo(i),n.each(s,function(t,e){if(e){var s=e.action||e;i.append(n("
    • ").append(n("").attr("href",e.url).html(t).click(s)))}else i.append(n("
    • ").addClass("head").append(n("
      ").html(t)))});var r=n("
      ").append(i).appendTo("body"),a=e.pageX-r.width()/2;a=Math.min(a,n(document).scrollLeft()+n(window).width()-n(r).width()-5),a=Math.max(a,n(document).scrollLeft()+5),r.css({top:e.pageY,left:a})},10),setTimeout(function(){var t=function(t){n(t).bind("click.close_popup",function(){n(".popmenu-wrapper").remove(),t.unbind("click.close_popup")})};t(n(window.document)),t(n(window.top.document));for(var e=window.top.frames.length;e--;){var i=n(window.top.frames[e].document);t(i)}},50),!1})}function i(t){t=t||document,n(t).find("div[popupmenu]").each(function(){var i={},s=n(this);s.find("a").each(function(){var t=n(this),e=t.get(0),s=e.getAttribute("confirm"),o=e.getAttribute("href"),r=e.getAttribute("target");o?i[t.text()]={url:o,action:function(e){if(!s||confirm(s)){if(r)return window.open(o,r),!1;t.click()}else e.preventDefault()}}:i[t.text()]=null});var o=n(t).find("#"+s.attr("popupmenu"));o.find("a").bind("click",function(t){return t.stopPropagation(),!0}),e(o,i),o.addClass("popup"),s.remove()})}var n=t;return{make_popupmenu:e,make_popup_menus:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},,function(t,e,i){var n,s;n=[i(1)],s=function(t){"use_strict";function e(t,e,n,s,o,r,a,l,h){void 0===o&&(o=30),void 0===a&&(a=4),i("#"+t).click(function(){if(!(i("#renaming-active").length>0)){var t,c=i("#"+e),u=c.text();t=r?i("").attr({rows:a,cols:o}).text(i.trim(u)):i("").attr({value:i.trim(u),size:o}),t.attr("id","renaming-active"),t.blur(function(){i(this).remove(),c.show(),h&&h(t)}),t.keyup(function(o){if(27===o.keyCode)i(this).trigger("blur");else if(13===o.keyCode){var r={};r[s]=i(this).val(),i(this).trigger("blur"),i.ajax({url:n,data:r,error:function(){alert("Text editing for elt "+e+" failed")},success:function(e){""!==e?c.text(e):c.html("None"),h&&h(t)}})}}),l&&l(t),c.hide(),t.insertAfter(c),t.focus(),t.select()}})}var i=t;return e}.apply(e,n),!(void 0!==s&&(t.exports=s))},,function(t,e,i){var n,s;(function(i){n=[],s=function(){function t(t){t=t||{};var e=this;return e.userId=window.bootstrapped&&window.bootstrapped.user?window.bootstrapped.user.id:null,e.userId=e.userId||t.userId||null,e.consoleLogger=t.consoleLogger||null,e._init(t),e}function e(t){var e=this;return e._init(t||{})}return t.ALL=0,t.LOG=0,t.DEBUG=10,t.INFO=20,t.WARN=30,t.ERROR=40,t.METRIC=50,t.NONE=100,t.defaultOptions={logLevel:t.NONE,consoleLevel:t.NONE,defaultNamespace:"Galaxy",consoleNamespaceWhitelist:null,clientPrefix:"client.",maxCacheSize:3e3,postSize:1e3,addTime:!0,cacheKeyPrefix:"logs-",postUrl:"/api/metrics",delayPostInMs:6e5,getPingData:void 0,onServerResponse:void 0},t.prototype._init=function(e){var i=this;i.options={};for(var n in t.defaultOptions)t.defaultOptions.hasOwnProperty(n)&&(i.options[n]=e.hasOwnProperty(n)?e[n]:t.defaultOptions[n]);return i.options.logLevel=i._parseLevel(i.options.logLevel),i.options.consoleLevel=i._parseLevel(i.options.consoleLevel),i._sending=!1,i._waiting=null,i._postSize=i.options.postSize,i._initCache(),i},t.prototype._initCache=function(){try{this.cache=new e({maxSize:this.options.maxCacheSize,key:this.options.cacheKeyPrefix+this.userId})}catch(i){this._emitToConsole("warn","MetricsLogger",["Could not intitialize logging cache:",i]),this.options.logLevel=t.NONE}},t.prototype._parseLevel=function(e){var i=typeof e;if("number"===i)return e;if("string"===i){var n=e.toUpperCase();if(t.hasOwnProperty(n))return t[n]}throw new Error("Unknown log level: "+e)},t.prototype.emit=function(t,e,i){var n=this;return e=e||n.options.defaultNamespace,t&&i?(t=n._parseLevel(t),t>=n.options.logLevel&&n._addToCache(t,e,i),n.consoleLogger&&t>=n.options.consoleLevel&&n._emitToConsole(t,e,i),n):n},t.prototype._addToCache=function(t,e,i){this._emitToConsole("debug","MetricsLogger",["_addToCache:",arguments,this.options.addTime,this.cache.length()]);var n=this;try{var s=n.cache.add(n._buildEntry(t,e,i));s>=n._postSize&&n._postCache()}catch(o){n._emitToConsole("warn","MetricsLogger",["Metrics logger could not stringify logArguments:",e,i]),n._emitToConsole("error","MetricsLogger",[o])}return n},t.prototype._buildEntry=function(t,e,i){this._emitToConsole("debug","MetricsLogger",["_buildEntry:",arguments]);var n={level:t,namespace:this.options.clientPrefix+e,args:i};return this.options.addTime&&(n.time=(new Date).toISOString()),n},t.prototype._postCache=function(t){if(t=t||{},this._emitToConsole("info","MetricsLogger",["_postCache",t,this._postSize]),!this.options.postUrl||this._sending)return i.when({});var e=this,n=t.count||e._postSize,s=e.cache.get(n),o=s.length,r="function"==typeof e.options.getPingData?e.options.getPingData():{};return r.metrics=JSON.stringify(s),e._sending=!0,i.post(e.options.postUrl,r).always(function(){e._sending=!1}).fail(function(t,i,n){e._postSize=e.options.maxCacheSize,e.emit("error","MetricsLogger",["_postCache error:",t.readyState,t.status,t.responseJSON||t.responseText])}).done(function(t){"function"==typeof e.options.onServerResponse&&e.options.onServerResponse(t),e.cache.remove(o),e._postSize=e.options.postSize})},t.prototype._delayPost=function(){var t=this;t._waiting=setTimeout(function(){t._waiting=null},t.options.delayPostInMs)},t.prototype._emitToConsole=function(e,i,n){var s=this,o=s.options.consoleNamespaceWhitelist;if(!s.consoleLogger)return s;if(o&&o.indexOf(i)===-1)return s;var r=Array.prototype.slice.call(n,0);return r.unshift(i),e>=t.METRIC&&"function"==typeof s.consoleLogger.info?s.consoleLogger.info.apply(s.consoleLogger,r):e>=t.ERROR&&"function"==typeof s.consoleLogger.error?s.consoleLogger.error.apply(s.consoleLogger,r):(e>=t.WARN&&"function"==typeof s.consoleLogger.warn?s.consoleLogger.warn.apply(s.consoleLogger,r):e>=t.INFO&&"function"==typeof s.consoleLogger.info?s.consoleLogger.info.apply(s.consoleLogger,r):e>=t.DEBUG&&"function"==typeof s.consoleLogger.debug?s.consoleLogger.debug.apply(s.consoleLogger,r):"function"==typeof s.consoleLogger.log&&s.consoleLogger.log.apply(s.consoleLogger,r), -s)},t.prototype.log=function(){this.emit(1,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.debug=function(){this.emit(t.DEBUG,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.info=function(){this.emit(t.INFO,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.warn=function(){this.emit(t.WARN,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.error=function(){this.emit(t.ERROR,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.metric=function(){this.emit(t.METRIC,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},e.defaultOptions={maxSize:5e3},e.prototype._init=function(t){if(!this._hasStorage())throw new Error("LoggingCache needs localStorage");if(!t.key)throw new Error("LoggingCache needs key for localStorage");return this.key=t.key,this._initStorage(),this.maxSize=t.maxSize||e.defaultOptions.maxSize,this},e.prototype._hasStorage=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype._initStorage=function(){return null===localStorage.getItem(this.key)?this.empty():this},e.prototype.add=function(t){var e=this,i=e._fetchAndParse(),n=i.length+1-e.maxSize;return n>0&&i.splice(0,n),i.push(t),e._unparseAndStore(i),i.length},e.prototype._fetchAndParse=function(){var t=this;return JSON.parse(localStorage.getItem(t.key))},e.prototype._unparseAndStore=function(t){var e=this;return localStorage.setItem(e.key,JSON.stringify(t))},e.prototype.length=function(){return this._fetchAndParse().length},e.prototype.get=function(t){return this._fetchAndParse().slice(0,t)},e.prototype.remove=function(t){var e=this._fetchAndParse(),i=e.splice(0,t);return this._unparseAndStore(e),i},e.prototype.empty=function(){return localStorage.setItem(this.key,"[]"),this},e.prototype.stringify=function(t){return JSON.stringify(this.get(t))},e.prototype.print=function(){console.log(JSON.stringify(this._fetchAndParse(),null," "))},{MetricsLogger:t,LoggingCache:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1))},,,,,,,,function(t,e){var i={__root:{"This history is empty":!1,"No matching datasets found":!1,"An error occurred while getting updates from the server":!1,"Please contact a Galaxy administrator if the problem persists":!1,"Search datasets":!1,"You are currently viewing a deleted history!":!1,"You are over your disk quota":!1,"Tool execution is on hold until your disk usage drops below your allocated quota":!1,All:!1,None:!1,"For all selected":!1,"Edit history tags":!1,"Edit history Annotation":!1,"Click to rename history":!1,"Operations on multiple datasets":!1,"Hide datasets":!1,"Unhide datasets":!1,"Delete datasets":!1,"Undelete datasets":!1,"Permanently delete datasets":!1,"This will permanently remove the data in your datasets. Are you sure?":!1,Dataset:!1,Annotation:!1,"This history is empty. Click 'Get Data' on the left tool menu to start":!1,"You must be logged in to create histories":!1,"Unable to purge dataset":!1,"Cannot display datasets removed from disk":!1,"This dataset must finish uploading before it can be viewed":!1,"This dataset is not yet viewable":!1,"View data":!1,Download:!1,"Download dataset":!1,"Additional files":!1,"View details":!1,"This is a new dataset and not all of its data are available yet":!1,"You do not have permission to view this dataset":!1,"The job creating this dataset was cancelled before completion":!1,"This job is waiting to run":!1,"This dataset is currently uploading":!1,"Metadata is being auto-detected":!1,"This job is currently running":!1,'This job is paused. Use the "Resume Paused Jobs" in the history menu to resume':!1,"An error occurred with this dataset":!1,"No data":!1,"An error occurred setting the metadata for this dataset":!1,"There was an error getting the data for this dataset":!1,"This dataset has been deleted and removed from disk":!1,"This dataset has been deleted":!1,"This dataset has been hidden":!1,format:!1,database:!1,"Edit attributes":!1,"Cannot edit attributes of datasets removed from disk":!1,"Undelete dataset to edit attributes":!1,"This dataset must finish uploading before it can be edited":!1,"This dataset is not yet editable":!1,Delete:!1,"Dataset is already deleted":!1,"View or report this error":!1,"Run this job again":!1,Visualize:!1,"Visualize in":!1,"Undelete it":!1,"Permanently remove it from disk":!1,"Unhide it":!1,"You may be able to":!1,"set it manually or retry auto-detection":!1,"Edit dataset tags":!1,"Edit dataset annotation":!1,Tags:!1,"Edit annotation":!1},__ja:{"This history is empty":"ヒストリーは空です","No matching datasets found":"一致するデータセットが見つかりませんでした","Search datasets":"データセットを検索する","You are currently viewing a deleted history!":"消去したヒストリーをみています。","You are over your disk quota":"あなたはディスククォータを超えている",All:"一式",None:"なし","For all selected":"各項目を","Click to rename history":"ヒストリーの名前を変更するにはクリック","Operations on multiple datasets":"複数のデータセットに対する操作","Permanently delete datasets":"永久にデータセットを削除","This will permanently remove the data in your datasets. Are you sure?":"これは永久にあなたのデータセット内のデータを削除します。本当に?",Dataset:"データセット","This history is empty. Click 'Get Data' on the left tool menu to start":"ヒストリーは空です。解析をはじめるには、左パネルの 'データ取得' をクリック","You must be logged in to create histories":"ヒストリーを作成するためにはログインする必要があります","View data":"データを表示",Download:"ダウンロード","Download dataset":"データセットをダウンロード","View details":"細部を表示","This job is waiting to run":"ジョブは実行待ちです","This job is currently running":"ジョブは実行中です","An error occurred with this dataset":"このジョブの実行中に発生したエラー","No data":"データ無し","This dataset has been deleted and removed from disk":"このデータセットは、永続的にディスクから削除されました","This dataset has been deleted":"このデータセットは削除されました","This dataset has been hidden":"このデータセットは、非表示にされた",format:"フォーマット",database:"データベース","Edit attributes":"変数を編集する",Delete:"削除する","View or report this error":"このエラーを届け出る","Run this job again":"もう一度このジョブを実行する",Visualize:"可視化する","Undelete it":"復元する","Permanently remove it from disk":"永久にディスクから削除","Unhide it":"非表示解除する"},__zh:{"This history is empty":"历史已空","No matching datasets found":"没有发现","Search datasets":"搜索数据集","You are currently viewing a deleted history!":"正在查看已删除的历史","You are over your disk quota":"您已超过磁盘配额",All:"皆",None:"一个也没有","For all selected":"为每个选定","Click to rename history":"单击要重命名的历史","Operations on multiple datasets":"编辑多个数据集","Permanently delete datasets":"永久删除数据集","This will permanently remove the data in your datasets. Are you sure?":"这将永久在你的数据集删除数据。你确定?",Dataset:"数据集","This history is empty. Click 'Get Data' on the left tool menu to start":"历史已空,请单击左边窗格中‘获取数据’","You must be logged in to create histories":"你必须登录后才能创建历史","View data":"数据",Download:"下载","Download dataset":"下载数据集","View details":"查看详情","This job is waiting to run":"等待运行的进程","This job is currently running":"正在运行的进程","An error occurred with this dataset":"进程运行时出错","No data":"没有数据","This dataset has been deleted":"此数据集已被删除","This dataset has been hidden":"此数据集已隐藏",format:"格式",database:"数据库","Edit attributes":"编辑属性",Delete:"删除","View or report this error":"报告错误","Run this job again":"重新运行",Visualize:"图形","Undelete it":"反删除","Permanently remove it from disk":"从磁盘中永久删除","Unhide it":"取消隐藏"}};i.init=function(t){t||(t=window._i18n&&window._i18n.locale?window._i18n.locale:"root"),Object.assign(this,this.__root,this["__"+t])},i.init(),t.exports=i}]); +null;n.values.push(o)}return n.values.sort(function(t,e){return t.hid-e.hid}),n}}else Galaxy.emit.debug("ui-select-content::value()","Invalid value/source '"+t+"'.");return null},_changeCurrent:function(){var t=this;a.each(this.fields,function(e,i){t.model.get("current")==i?(e.$el.show(),a.each(t.$batch,function(e,n){e[t.config[i].batch==n?"show":"hide"]()}),t.button_type.value(i)):e.$el.hide()})},_changeType:function(){var n=this,o=(this.model.get("flavor")?this.model.get("flavor")+"_":"")+String(this.model.get("type"))+(this.model.get("multiple")?"_multiple":"");s[o]?this.config=s[o]:(this.config=s.data,Galaxy.emit.debug("ui-select-content::_changeType()","Invalid configuration/type id '"+o+"'."));var r=n.model.get("data"),l=t.textify(this.model.get("extensions")),h=this.model.get("src_labels");this.fields=[],this.button_data=[],a.each(this.config,function(t,e){n.button_data.push({value:e,icon:t.icon,tooltip:t.tooltip}),n.fields.push(new i.View({optional:n.model.get("optional"),multiple:t.multiple,searchable:!t.multiple||r&&r[t.src]&&r[t.src].length>n.model.get("pagelimit"),selectall:!1,error_text:"No "+(l?l+" ":"")+(h[t.src]||"content")+" available.",onchange:function(){n.trigger("change")}}))}),this.button_type=new e.RadioButton.View({value:this.model.get("current"),data:this.button_data,onchange:function(t){n.model.set("current",t),n.trigger("change")}}),this.$el.empty();var c=0;this.fields.length>1&&(this.$el.append(this.button_type.$el),c=Math.max(0,36*this.fields.length)+"px"),a.each(this.fields,function(t){n.$el.append(t.$el.css({"margin-left":c}))}),a.each(this.$batch,function(t,e){n.$el.append(t.css({"margin-left":c}))}),this.model.set("current",0),this._changeCurrent(),this._changeData()},_changeWait:function(){var t=this;a.each(this.fields,function(e){e[t.model.get("wait")?"wait":"unwait"]()})},_changeData:function(){var t=this.model.get("data"),e=this,i={};a.each(t,function(t,n){i[n]=[],a.each(t,function(t){i[n].push({hid:t.hid,keep:t.keep,label:t.hid+": "+t.name,value:t.id}),e.history[t.id+"_"+n]=t})}),a.each(this.config,function(t,n){i[t.src]&&e.fields[n].add(i[t.src],function(t,e){return e.hid-t.hid})})},_changeValue:function(){var t=this.model.get("value");if(t&&t.values&&t.values.length>0){var e=[];a.each(t.values,function(t){e.push(t.id)});for(var i=t.values[0].src,n=t.values.length>1,s=0;s
      Select Library
    '}});return{View:a}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o,r){n=[i(6)],s=function(t){var e=o.View.extend({initialize:function(e){var i=this;this.options=t.merge(e,{id:t.uid(),min:null,max:null,step:null,precise:!1,split:1e4}),this.setElement(this._template(this.options)),this.useslider=null!==this.options.max&&null!==this.options.min&&this.options.max>this.options.min,null===this.options.step&&(this.options.step=1,this.options.precise&&this.useslider&&(this.options.step=(this.options.max-this.options.min)/this.options.split)),this.useslider?(this.$slider=this.$("#slider"),this.$slider.slider(this.options),this.$slider.on("slide",function(t,e){i.value(e.value)})):this.$(".ui-form-slider-text").css("width","100%"),this.$text=this.$("#text"),void 0!==this.options.value&&this.value(this.options.value);var n=[];this.$text.on("change",function(){i.value(r(this).val())}),this.$text.on("keyup",function(t){n[t.which]=!1,i.options.onchange&&i.options.onchange(r(this).val())}),this.$text.on("keydown",function(t){var e=t.which;n[e]=!0,i.options.is_workflow&&n[16]&&52==e?(i.value("$"),event.preventDefault()):8==e||9==e||13==e||37==e||39==e||e>=48&&e<=57&&!n[16]||e>=96&&e<=105||(190==e||110==e)&&r(this).val().indexOf(".")==-1&&i.options.precise||(189==e||109==e)&&r(this).val().indexOf("-")==-1||i._isParameter(r(this).val())||n[91]||n[17]||event.preventDefault()})},value:function(t){return void 0!==t&&(null===t||""===t||this._isParameter(t)||(isNaN(t)&&(t=0),null!==this.options.max&&(t=Math.min(t,this.options.max)),null!==this.options.min&&(t=Math.max(t,this.options.min))),this.$slider&&this.$slider.slider("value",t),this.$text.val(t),this.options.onchange&&this.options.onchange(t)),this.$text.val()},_isParameter:function(t){return this.options.is_workflow&&"$"===String(t).substring(0,1)},_template:function(t){return'
    '}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(6)],s=function(t){var e=o.View.extend({row:null,row_count:0,optionsDefault:{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",cls_tr:""},events:{click:"_onclick",dblclick:"_ondblclick"},initialize:function(e){this.options=t.merge(e,this.optionsDefault);var i=r(this._template(this.options));this.$thead=i.find("thead"),this.$tbody=i.find("tbody"),this.$tmessage=i.find("tmessage"),this.setElement(i),this.row=this._row()},addHeader:function(t){var e=r("");e.append(t),this.row.append(e)},appendHeader:function(){this.$thead.append(this.row),this.row=r("")},add:function(t,e,i){var n=r("");e&&n.css("width",e),i&&n.css("text-align",i),n.append(t),this.row.append(n)},append:function(t,e){this._commit(t,e,!1)},prepend:function(t,e){this._commit(t,e,!0)},get:function(t){return this.$el.find("#"+t)},del:function(t){var e=this.$tbody.find("#"+t);e.length>0&&(e.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(t){this.before=this.$tbody.find(".current").attr("id"),void 0!==t&&(this.$tbody.find("tr").removeClass("current"),t&&this.$tbody.find("#"+t).addClass("current"));var e=this.$tbody.find(".current").attr("id");return void 0===e?null:(e!=this.before&&this.options.onchange&&this.options.onchange(t),e)},size:function(){return this.$tbody.find("tr").length},_commit:function(t,e,i){this.del(t),this.row.attr("id",t),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),e&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return r('')},_onclick:function(t){var e=this.value(),i=r(t.target).closest("tr").attr("id");""!=i&&i&&e!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(t){var e=this.value();e&&this.options.ondblclick&&this.options.ondblclick(e)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(t){return'
    '+t.content+"
    "}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,,,,,,,function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Web API Key",icon:"fa-key",inputs:[{name:"api-key",type:"text",label:"Current API key:",value:i.api_key||"Not available.",readonly:!0,help:" An API key will allow you to access "+("galaxy"===i.webapp?"Galaxy":"the Tool Shed")+" via its web API. Please note that this key acts as an alternate means to access your account and should be treated with the same care as your login password."}],operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{submit:new e.Button({tooltip:"Generate new key "+(i.api_key?"(invalidates old key) ":""),title:"Generate a new key",icon:"fa-check",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._submit()}})}}),this.setElement(this.form.$el)},_submit:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/api_key",type:"PUT",data:{new_api_key:!0}}).done(function(e){if(e.api_key){var i=t.form.data.match("api-key");t.form.field_list[i].value(e.api_key),t.form.message.update({message:e.message,status:"success"})}else t.form.message.update({message:"API key missing from response.",status:"danger"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Enable real-time communication with other Galaxy users",icon:"fa-child",inputs:[{name:"enable",type:"boolean",label:"Enable communication",value:i.activated}],operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},onchange:function(){n._save()}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/communication",type:"PUT",data:{enable:t.form.data.create().enable}}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.original_email=i.email,this.original_username=i.username,this.form=new t({title:"Login Information",inputs:i.inputs,operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({tooltip:"Save",title:"Save Changes",icon:"fa-save",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement("
    "),this.$el.append(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/information",type:"PUT",data:t.form.data.create()}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Change Password",icon:"fa-key",inputs:[{name:"current",type:"password",label:"Current password"},{name:"password",type:"password",label:"New password"},{name:"confirm",type:"password",label:"Confirm password"},{name:"token",type:"hidden",hidden:!0,ignore:null}],operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({icon:"fa-save",tooltip:"Save settings",title:"Save Password",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/password",type:"PUT",data:{enable:t.form.data.create()}}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),window.console.log(i),this.form=new t({title:"Manage dataset permissions",name:"toolbox_filter",inputs:i.inputs,icon:"fa-universal-access",operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({tooltip:"Save changes",title:"Save Permissions",icon:"fa-save",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/permissions",type:"PUT",data:t.form.data.create()}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(9),i(7)],s=function(t,e){return o.View.extend({initialize:function(i){var n=this;this.model=i&&i.model||new o.Model(i),this.form=new t({title:"Manage Toolbox Filters",name:"toolbox_filter",inputs:i.inputs,icon:"fa-filter",operations:{back:new e.ButtonIcon({icon:"fa-caret-left",tooltip:"Return to user preferences",title:"Preferences",onclick:function(){n.remove(),i.onclose()}})},buttons:{save:new e.Button({tooltip:"Save changes",title:"Save Filters",icon:"fa-save",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){n._save()}})}}),this.setElement(this.form.$el)},_save:function(){var t=this;r.ajax({url:Galaxy.root+"api/user_preferences/"+Galaxy.user.id+"/toolbox_filters",type:"PUT",data:t.form.data.create()}).done(function(e){t.form.message.update({message:e.message,status:"success"})}).fail(function(e){t.form.message.update({message:e.responseJSON.err_msg,status:"danger"})})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r,a){n=[i(126),i(127),i(128),i(124),i(129),i(125)],s=function(t,e,i,n,s,l){var h=o.View.extend({initialize:function(){this.setElement("
    "),this.render()},_link:function(t){var e=this,i=r(''+t.title+"").on("click",function(){r.ajax({url:Galaxy.root+t.url,type:"GET"}).always(function(i){e.$preferences.hide(),i.onclose=function(){e.$preferences.show()},e.$el.append(new t.module(i).$el)})});this.$pages.append(r("
  • ").append(i))},render:function(){var o=this;r.getJSON(Galaxy.root+"api/user_preferences",function(h){if(o.$preferences=r("
    "),null!==h.id){if(o.$preferences.append("

    User preferences

    ").append("

    You are currently logged in as "+a.escape(h.email)+".

    ").append(o.$pages=r("