amalgame/commit
pass concept selected by vocab browser to concepts module
author | Jacco van Ossenbruggen |
---|---|
Mon Aug 18 09:43:51 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Mon Aug 18 09:43:51 2014 +0200 | |
commit | 2b6adcc43713915a2a3ad34322d014fac18e7aec |
tree | 6447930f135cca9155a5bbda8d7aff096e6d802b |
parent | 24cfc93e9058bd6472c742606f800ed41c648f14 |
Diff style: patch stat
diff --git a/web/js/builder.js b/web/js/builder.js index af2bbbe..e28aa64 100644 --- a/web/js/builder.js +++ b/web/js/builder.js @@ -15,30 +15,12 @@ YUI.add('builder', function(Y) { } Builder.NAME = "builder"; Builder.ATTRS = { - strategy : { - value: null - }, - readonly : { - value: true - }, - paths:{ - value: {}, - validator: function(val) { - return Lang.isObject(val) - } - }, - selected : { - value:{}, - validator: function(val) { - return Lang.isObject(val) - } - }, - nodes:{ - value:{}, - validator: function(val) { - return Lang.isObject(val) - } - } + strategy: { value: null }, + readonly: { value: true }, + paths: { value: {} }, + selected: { value: {} }, + nodes: { value: {} }, + currentConcept: { value: null } // selected concept from SKOS browser }; Y.extend(Builder, Y.Base, { @@ -173,6 +155,7 @@ YUI.add('builder', function(Y) { selected: this.get("selected"), strategy: this.get("strategy") }); + this.vocabulary.on("conceptChange", this._onConceptChange, this); }, // helper functions for resizing @@ -191,6 +174,10 @@ YUI.add('builder', function(Y) { }, /* handlers */ + _onConceptChange : function(ev) { + this.controls.set('currentConcept', ev.newVal); + }, + _onControlSubmit : function(o) { var oSelf = this, paths = this.get("paths"),