diff --git a/application/nicewebpage.class.inc.php b/application/nicewebpage.class.inc.php index d0b4fa44b..d14de2c64 100644 --- a/application/nicewebpage.class.inc.php +++ b/application/nicewebpage.class.inc.php @@ -58,6 +58,7 @@ class NiceWebPage extends WebPage $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_numeric.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_enum.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_key.js'); + $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_hierarchical_key.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_abstract.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_time.js'); diff --git a/css/light-grey.css b/css/light-grey.css index d762ab8fe..1f62c493b 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -1021,7 +1021,7 @@ input.dp-applied { width: 88px; } .search_form_handler .sf_criterion_area .sf_more_criterion { - margin-right: 5px; + margin-right: 10px; } .search_form_handler .sf_criterion_area .sf_more_criterion.opened { z-index: 2; diff --git a/css/light-grey.scss b/css/light-grey.scss index 8f9d7fb49..4c7bd9209 100644 --- a/css/light-grey.scss +++ b/css/light-grey.scss @@ -1178,7 +1178,7 @@ input.dp-applied { /* More criterion */ .sf_more_criterion{ - margin-right: 5px; + margin-right: 10px; &.opened{ z-index: 2; /* To be over criterion */ diff --git a/js/search/search_form_criteria_hierarchical_key.js b/js/search/search_form_criteria_hierarchical_key.js new file mode 100644 index 000000000..40f993c82 --- /dev/null +++ b/js/search/search_form_criteria_hierarchical_key.js @@ -0,0 +1,52 @@ +//iTop Search form criteria hierarchical key +; +$(function() +{ + // the widget definition, where 'itop' is the namespace, + // 'search_form_criteria_hierarchical_key' the widget name + $.widget( 'itop.search_form_criteria_hierarchical_key', $.itop.search_form_criteria_enum, + { + // default options + options: + { + }, + + + // the constructor + _create: function() + { + var me = this; + + this._super(); + this.element.addClass('search_form_criteria_hierarchical_key'); + }, + // called when created, and later when changing options + _refresh: function() + { + + }, + // events bound via _bind are removed automatically + // revert other modifications here + _destroy: function() + { + this.element.removeClass('search_form_criteria_hierarchical_key'); + this._super(); + }, + // _setOptions is called with a hash of all options that are changing + // always refresh when changing options + _setOptions: function() + { + this._superApply(arguments); + }, + // _setOption is called for each individual option that is changing + _setOption: function( key, value ) + { + this._super( key, value ); + }, + + //------------------ + // Inherited methods + //------------------ + + }); +});