//>>built
require({cache:{"url:app/ui/dialogs/templates/ManageSchemeDialog.html":'\x3cdiv\x3e\n  \x3cdiv class\x3d"large-12 columns" style\x3d"padding-bottom: 20px;"\x3e\n    \x3cdiv data-dojo-type\x3d"dijit/layout/TabContainer"\n         data-dojo-attach-point\x3d"tabContainer"\n         data-dojo-props\x3d"doLayout:false"\n         class\x3d""\x3e\n\n      \x3cdiv data-dojo-type\x3d"dijit/layout/ContentPane"\n           title\x3d"Labels"\n           data-dojo-attach-point\x3d"tabLabels"\n           data-dojo-props\x3d"selected:true"\x3e\n        \x3cdiv data-dojo-attach-point\x3d"labelsNode"\x3e[ LABELS ]\x3c/div\x3e\n      \x3c/div\x3e\n\n      \x3cdiv data-dojo-type\x3d"dijit/layout/ContentPane"\n           title\x3d"Notes"\n           data-dojo-attach-point\x3d"tabNotes"\x3e\n        \x3cdiv data-dojo-attach-point\x3d"notesNode"\x3e[ NOTES ]\x3c/div\x3e\n      \x3c/div\x3e\n\n      \x3cdiv data-dojo-type\x3d"dijit/layout/ContentPane"\n           title\x3d"Sources"\n           data-dojo-attach-point\x3d"tabSources"\x3e\n        \x3cdiv data-dojo-attach-point\x3d"sourcesNode"\x3e[ SOURCES ]\x3c/div\x3e\n      \x3c/div\x3e\n      \x3c!--? todo add languages tab --\x3e\n    \x3c/div\x3e\n  \x3c/div\x3e\n  \x3cdiv class\x3d"large-12 columns text-center" style\x3d"margin-top: 30px; margin-bottom: 20px;"\x3e\n    \x3ca href\x3d"#" class\x3d"button tiny" data-dojo-attach-event\x3d"onClick: _saveScheme"\x3eSave\x3c/a\x3e\n    \x3ca href\x3d"#" class\x3d"button tiny" data-dojo-attach-event\x3d"onClick: _cancel"\x3eCancel\x3c/a\x3e\n  \x3c/div\x3e\n\x3c/div\x3e'}});
define("app/ui/dialogs/ManageSchemeDialog","dojo/_base/declare dojo/_base/lang dojo/topic dojo/dom-attr dojo/on dijit/Dialog dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin ../../utils/DomUtils ../managers/LabelManager ../managers/NoteManager ../managers/SourcesManager ../../utils/DomUtils dojo/text!./templates/ManageSchemeDialog.html dijit/layout/TabContainer dijit/layout/ContentPane".split(" "),function(d,c,p,q,r,e,f,g,h,t,k,l,m,u,n){return d([f,g,h],{templateString:n,baseClass:"edit-scheme-dialog",
dialog:null,parent:null,scheme:null,languageController:null,listController:null,conceptSchemeController:null,_mode:"edit",postCreate:function(){this.inherited(arguments);this.dialog=new e({title:"Edit scheme",style:"width: 1000px; min-height: 650px;"});this.dialog.closeText.innerHTML='\x3ci class\x3d"fa fa-times"\x3e\x3c/i\x3e';this.dialog.set("content",this);this._createLabelsTab();this._createNotesTab();this._createSourcesTab()},startup:function(){this.inherited(arguments);this.tabContainer.layout();
this.dialog.resize()},showDialog:function(a,b){b&&(this.mode=b);a&&(a.id&&this.dialog.set("title","Edit \x3cstrong\x3e"+a.label+"\x3c/strong\x3e"),this.sourcesManager.setConcept(a),this.labelManager.setConcept(a),this.noteManager.setConcept(a),this.scheme=a);this.dialog.show();this.tabContainer.selectChild(this.tabLabels);this.tabContainer.layout();this.dialog.resize()},_close:function(){this._reset();this.dialog.hide()},_saveScheme:function(a){a?a.preventDefault():null;a={};this.scheme&&(a.id=this.scheme.id||
void 0,a.uri=this.scheme.uri||void 0);var b=this.labelManager.getData();c.mixin(a,b);b=this.noteManager.getData();c.mixin(a,b);b=this.sourcesManager.getData();c.mixin(a,b);"add"===this._mode?this.emit("new.scheme.save",{scheme:a}):this.emit("scheme.save",{scheme:a})},_cancel:function(a){a?a.preventDefault():null;this._close()},_reset:function(){this.labelManager.reset();this.noteManager.reset();this.sourcesManager.reset()},_createLabelsTab:function(a){this.languageController.getLanguageStore().fetch().then(c.hitch(this,
function(b){this.labelManager=new k({languageController:this.languageController,listController:this.listController,concept:a,languageList:b},this.labelsNode);this.labelManager.startup()}))},_createNotesTab:function(a){this.languageController.getLanguageStore().fetch().then(c.hitch(this,function(b){this.noteManager=new l({languageController:this.languageController,listController:this.listController,concept:a,languageList:b},this.notesNode);this.noteManager.startup()}))},_createSourcesTab:function(a){this.sourcesManager=
new m({listController:this.listController,concept:a},this.sourcesNode);this.sourcesManager.startup()}})});
//# sourceMappingURL=ManageSchemeDialog.js.map