/
hdca-li-edit.js.map
1 lines (1 loc) · 4.23 KB
/
hdca-li-edit.js.map
1
{"version":3,"sources":["mvc/history/hdca-li-edit.js"],"names":["_super","_hdcaLi2","default","HDCAListItemView","HDCAListItemEdit","extend","_getFoldoutPanelClass","collectionType","this","model","get","_collectionViewEdit2","ListCollectionViewEdit","PairCollectionViewEdit","ListOfPairsCollectionViewEdit","ListOfListsCollectionViewEdit","TypeError","_renderPrimaryActions","log","prototype","_renderDeleteButton","_this","deleted","_faIconButton2","title","_localization2","classes","faIcon","disabled","onclick","trigger","toString"],"mappings":"wTAMIA,EAASC,EAAAC,QAAQC,iBAGjBC,EAAmBJ,EAAOK,QAMtBC,sBAAuB,WACnB,IAAIC,EAAiBC,KAAKC,MAAMC,IAAI,mBACpC,OAAQH,GACJ,IAAK,OACD,OAAOI,EAAAT,QAAaU,uBACxB,IAAK,SAfrB,OAAAD,EAAAT,QAAAW,uBACIb,IAAS,cACb,OAAAW,EAAAT,QAAAY,8BAiBgB,IAAK,YAfjBV,OAAmBJ,EAAAA,QAAAe,8BAEf,MAAA,IAAAC,UAAA,4BAAAT,IAKIU,sBAAIV,WAGI,OAFRC,KAAAU,IAAQX,KAAR,0BAEQP,EAAAmB,UAAOF,sBAAaL,KAAAA,MAAAA,QAAAA,KAApBQ,yBAIAA,oBAAO,WAAA,IAAAC,EAAAb,KACXc,EAAKd,KAAAC,MAALC,IAAA,WACI,OAAA,EAAAa,EAAArB,UARRsB,MAAAF,GAAA,EAAAG,EAAAvB,SAAA,0CAAA,EAAAuB,EAAAvB,SAAA,UAUAwB,QAAUV,aAjBuBW,OAAA,WAmC7BC,SAAUN,EAflBO,QAAA,WAEAZ,EAAAA,IAAAA,KAAuB,wBAAAa,QAAW,YAC9BT,EAAAZ,MAAA,aAM4BsB,SAAA,WAC5B,MAAA,qBAiBkBvB,KAAKC,MAAL,GAAgBD,KAAKC,MAAU,cAjBjD,kBAOQL,iBAAAA","file":"../../../scripts/mvc/history/hdca-li-edit.js","sourcesContent":["import HDCA_LI from \"mvc/history/hdca-li\";\nimport DC_VIEW_EDIT from \"mvc/collection/collection-view-edit\";\nimport faIconButton from \"ui/fa-icon-button\";\nimport _l from \"utils/localization\";\n\n//==============================================================================\nvar _super = HDCA_LI.HDCAListItemView;\n/** @class Editing view for HistoryDatasetCollectionAssociation.\n */\nvar HDCAListItemEdit = _super.extend(\n /** @lends HDCAListItemEdit.prototype */ {\n /** logger used to record this.log messages, commonly set to console */\n //logger : console,\n\n /** Override to return editable versions of the collection panels */\n _getFoldoutPanelClass: function() {\n var collectionType = this.model.get(\"collection_type\");\n switch (collectionType) {\n case \"list\":\n return DC_VIEW_EDIT.ListCollectionViewEdit;\n case \"paired\":\n return DC_VIEW_EDIT.PairCollectionViewEdit;\n case \"list:paired\":\n return DC_VIEW_EDIT.ListOfPairsCollectionViewEdit;\n case \"list:list\":\n return DC_VIEW_EDIT.ListOfListsCollectionViewEdit;\n }\n throw new TypeError(`Unknown collection_type: ${collectionType}`);\n },\n\n // ......................................................................... delete\n /** In this override, add the delete button. */\n _renderPrimaryActions: function() {\n this.log(`${this}._renderPrimaryActions`);\n // render the display, edit attr and delete icon-buttons\n return _super.prototype._renderPrimaryActions.call(this).concat([this._renderDeleteButton()]);\n },\n\n /** Render icon-button to delete this collection. */\n _renderDeleteButton: function() {\n var deleted = this.model.get(\"deleted\");\n return faIconButton({\n title: deleted ? _l(\"Dataset collection is already deleted\") : _l(\"Delete\"),\n classes: \"delete-btn\",\n faIcon: \"fa-times\",\n disabled: deleted,\n onclick: () => {\n // ...bler... tooltips being left behind in DOM (hover out never called on deletion)\n this.$el.find(\".icon-btn.delete-btn\").trigger(\"mouseout\");\n this.model[\"delete\"]();\n }\n });\n },\n\n // ......................................................................... misc\n /** string rep */\n toString: function() {\n var modelString = this.model ? `${this.model}` : \"(no model)\";\n return `HDCAListItemEdit(${modelString})`;\n }\n }\n);\n\n//==============================================================================\nexport default {\n HDCAListItemEdit: HDCAListItemEdit\n};\n"]}