//>>built
require({cache:{"url:app/ui/dialogs/templates/ImportConceptDialog.html":'\x3cdiv class\x3d"dijitDialog" role\x3d"dialog" aria-labelledby\x3d"importConceptDialog_title"\x3e\n  \x3cdiv data-dojo-attach-point\x3d"titleBar" class\x3d"dijitDialogTitleBar"\x3e\n    \x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitDialogTitle" role\x3d"heading"\x3e\x3c/span\x3e\n\t\t\x3cspan data-dojo-attach-point\x3d"closeButtonNode" class\x3d"dijitDialogCloseIcon"\n          data-dojo-attach-event\x3d"ondijitclick: onCancel" title\x3d"Annuleren" role\x3d"button" tabIndex\x3d"-1"\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"closeText" class\x3d"closeText" title\x3d"Annuleren" tabIndex\x3d"-1"\x3e\n        \x3ci class\x3d"fa fa-times"\x3e\x3c/i\x3e\x3c/span\x3e\n\t\t\x3c/span\x3e\n  \x3c/div\x3e\n\n  \x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitDialogPaneContent"\x3e\n    \x3cdiv class\x3d"row"\x3e\n      \x3cdiv class\x3d"large-12 columns"\x3e\n        \x3cp style\x3d"margin-top: 0; padding-top: 0;"\x3eSelect an external scheme and enter a label to search for a match:\x3c/p\x3e\n      \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"row"\x3e\n      \x3cdiv class\x3d"large-6 columns"\x3e\n        \x3cselect data-dojo-attach-point\x3d"externalSchemeSelect"\x3e\x3c/select\x3e\n      \x3c/div\x3e\n      \x3cdiv class\x3d"large-5 columns"\x3e\n        \x3cinput type\x3d"search" style\x3d"float: right" data-dojo-attach-point\x3d"searchLabelInput" placeholder\x3d"Enter a label .." /\x3e\n      \x3c/div\x3e\n      \x3cdiv class\x3d"large-1 columns"\x3e\n        \x3ca href\x3d"#" class\x3d"button tiny" style\x3d"float: right" data-dojo-attach-event\x3d"onClick: _searchConcepts"\x3e\x3ci class\x3d"fa fa-search"\x3e\x3c/i\x3e\x3c/a\x3e\n      \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"row"\x3e\n      \x3cdiv class\x3d"large-12 columns"\x3e\n        \x3cdiv data-dojo-attach-point\x3d"importConceptGridNode" style\x3d"height: 330px; width: 100%"\x3e\x3c/div\x3e\n      \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"row footerButtons"\x3e\n      \x3cdiv class\x3d"large-12 columns text-center"\x3e\n        \x3ca href\x3d"#" data-dojo-attach-event\x3d"onClick: _okClick" class\x3d"button tiny"\x3eImport\x3c/a\x3e\n        \x3ca href\x3d"#" data-dojo-attach-event\x3d"onClick: _cancelClick" class\x3d"button tiny"\x3eCancel\x3c/a\x3e\n      \x3c/div\x3e\n    \x3c/div\x3e\n  \x3c/div\x3e\n\x3c/div\x3e'}});
define("app/ui/dialogs/ImportConceptDialog","dojo/_base/declare dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/Dialog dojo/_base/lang dojo/_base/array dstore/Memory dojo/topic dojo/dom-construct dgrid/OnDemandGrid dgrid/extensions/DijitRegistry dgrid/extensions/ColumnResizer dgrid/Selection ../../utils/DomUtils dojo/text!./templates/ImportConceptDialog.html".split(" "),function(c,h,k,l,d,u,e,v,m,n,p,q,r,f,t){return c([l,h,k],{templateString:t,parentNode:null,baseClass:"import-concept-dialog",
title:"Choose an external concept",conceptSchemeController:null,externalSchemeStore:null,_importConceptGrid:null,_importConceptStore:null,postCreate:function(){this.inherited(arguments);this._importConceptGrid=this._createGrid({collection:this._importConceptStore},this.importConceptGridNode);this.externalSchemeStore.fetch().then(d.hitch(this,function(a){f.addOptionsToSelect(this.externalSchemeSelect,{data:a,idProperty:"id",labelProperty:"label"})}))},startup:function(){this.inherited(arguments);this._importConceptGrid.startup()},
reset:function(){this.externalSchemeSelect.selectedIndex=0;this._importConceptStore=new e({data:[]});this._importConceptGrid.set("collection",this._importConceptStore);this.searchLabelInput.value=""},hide:function(){this.reset();this.inherited(arguments)},_createGrid:function(a,b){var g=new (c([n,p,q,r]))({collection:a.collection,columns:{label:{label:""},id:{label:""},type:{label:""},link:{label:"",renderCell:function(a){if(a&&a.uri)return m.create("a",{href:a.uri,target:"_blank",title:a.uri,innerHTML:'\x3ci class\x3d"fa fa-external-link"\x3e\x3c/i\x3e'})}}},
selectionMode:"single",showHeader:!1,noDataMessage:"",loadingMessage:"Fetching data.."},b);g.on("dgrid-error",function(a){});return g},_okClick:function(a){a.preventDefault();a=null;for(var b in this._importConceptGrid.selection)this._importConceptGrid.selection[b]&&(a=this._importConceptStore.getSync(b));a&&(this.emit("concept.import",{concept:a,schemeId:this.externalSchemeSelect.value}),this.hide())},_cancelClick:function(a){a.preventDefault();this.hide()},_searchConcepts:function(a){a?a.preventDefault():
null;a=f.getSelectedOption(this.externalSchemeSelect);var b=this.searchLabelInput.value;a&&b&&""!==b&&this._loadStore(a,b)},_loadStore:function(a,b){this.conceptSchemeController.searchForConcepts(a,b).then(d.hitch(this,function(a){this._importConceptStore=new e({data:a});this._importConceptGrid.set("collection",this._importConceptStore);this._importConceptGrid.resize()}),function(a){})},_validate:function(){}})});
//# sourceMappingURL=ImportConceptDialog.js.map