amalgame/commit
IMPROVED: controls better aligned with new module classes
author | Jacco van Ossenbruggen |
---|---|
Sat Sep 6 15:23:18 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Sat Sep 6 15:23:18 2014 +0200 | |
commit | bb4ea6e7402798151f6a3f49e787bc618612e51d |
tree | c776e72b1db23928633f5e992d6920a4e8f49930 |
parent | dc3d9b8664e3124d29a50986efd778a1b6274da6 |
Diff style: patch stat
diff --git a/components/amalgame/controls.pl b/components/amalgame/controls.pl index e89d52e..f60d918 100644 --- a/components/amalgame/controls.pl +++ b/components/amalgame/controls.pl @@ -22,9 +22,9 @@ html_controls --> \html_control_set(current_control_set, true, 'About the selected node', \html_info_control), - \html_control_set(match_control_set, false, + \html_control_set(generate_control_set, false, 'Generate', - \html_match_control(Matchers)), + \html_generate_control(Matchers)), \html_control_set(select_control_set, false, 'Partition', \html_select_control(Partitioners)), @@ -118,27 +118,22 @@ html_select_control(Modules) --> html(div(id(select), [ div(class(c), ul([li('partition a set according to some criterium'), - li('typically resulting in selected and discarded subsets') + li('typically resulting in selected and discarded subsets'), + \html_mapping_input_select ])), \html_modules(Modules) ])). -html_match_control(Modules) --> +html_generate_control(Modules) --> html(div(id(match), [ div(class(c), - \html_align_input), + [ h4('Choose input'), + \html_source_target_input_select] + ), \html_modules(Modules) ])). -html_align_input --> - html([h4('Choose input'), - div(class(i), - \html_mapping_select), - div(class(i), - \html_source_target_select) - ]). - -html_mapping_select --> +html_mapping_input_select --> html(table([tr([td(button(id(inputbtn), 'set as input')), td([input([type(text), id(inputLabel), autocomplete(off)]), input([type(hidden), id(input), name(input)]) @@ -146,7 +141,7 @@ html_mapping_select --> ]) ])). -html_source_target_select --> +html_source_target_input_select --> html(table([tr([td(button(id(sourcebtn), 'set as source')), td([input([type(text), id(sourceLabel), autocomplete(off)]), input([type(hidden), id(source), name(source)]) diff --git a/web/js/controls.js b/web/js/controls.js index bb99552..bc71d43 100644 --- a/web/js/controls.js +++ b/web/js/controls.js @@ -96,14 +96,10 @@ YUI.add('controls', function(Y) { // The input is selected based on the type of the control // which is stored as a CSS class - if(node.hasClass("match") || node.hasClass("preloaded") ) { - if(input) { - data.input = input; - } - else if(source&&target) { - data.source = source; - data.target = target; - } + if( node.hasClass("vocab") || + node.hasClass("preloaded") ) { + data.source = source; + data.target = target; } else if(selected) { data.input = selected.uri; }