mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
search widget : date and datetime widget
SVN:b1162[5504]
This commit is contained in:
@@ -58,6 +58,8 @@ 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_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');
|
||||
|
||||
$this->add_dict_entries('UI:Combo');
|
||||
|
||||
@@ -990,6 +990,12 @@ input.dp-applied {
|
||||
.search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group.advanced .sfc_fg_more {
|
||||
display: none;
|
||||
}
|
||||
.search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group.advanced .hide_on_advanced {
|
||||
display: none;
|
||||
}
|
||||
.search_form_handler .sf_criterion_area .search_form_criteria .sfc_form_group:not(.advanced) .hide_on_less {
|
||||
display: none;
|
||||
}
|
||||
.search_form_handler .sf_criterion_area .search_form_criteria.search_form_criteria_raw .sfc_title {
|
||||
cursor: initial;
|
||||
}
|
||||
|
||||
@@ -1126,6 +1126,16 @@ input.dp-applied {
|
||||
.sfc_fg_more{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hide_on_advanced {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.advanced) {
|
||||
.hide_on_less {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1168,6 +1178,9 @@ input.dp-applied {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* More criterion */
|
||||
|
||||
@@ -1444,5 +1444,11 @@ When associated with a trigger, each action is given an "order" number, specifyi
|
||||
|
||||
// - Widget other translations
|
||||
'UI:Search:Criteria:DateTime:From' => 'From',
|
||||
'UI:Search:Criteria:DateTime:FromTime' => 'From',
|
||||
'UI:Search:Criteria:DateTime:Until' => 'Until',
|
||||
'UI:Search:Criteria:DateTime:UntilTime' => 'Until',
|
||||
'UI:Search:Criteria:DateTime:PlaceholderFrom' => 'Any date',
|
||||
'UI:Search:Criteria:DateTime:PlaceholderFromTime' => 'Any date',
|
||||
'UI:Search:Criteria:DateTime:PlaceholderUntil' => 'Any date',
|
||||
'UI:Search:Criteria:DateTime:PlaceholderUntilTime' => 'Any date',
|
||||
));
|
||||
|
||||
@@ -338,15 +338,27 @@ $(function()
|
||||
// Prevent propagation to parents and therefore multiple attempts to close it
|
||||
oEvent.stopPropagation();
|
||||
|
||||
oEventTargetElem = $(oEvent.target);
|
||||
|
||||
// If not more menu, close all criterion
|
||||
if($(oEvent.target).closest('.sf_more_criterion').length > 0)
|
||||
if(oEventTargetElem.closest('.sf_more_criterion').length > 0)
|
||||
{
|
||||
me._closeAllCriterion();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if using the datetimepicker, do not close anything
|
||||
if (oEventTargetElem.closest('#ui-datepicker-div, .ui-datepicker-prev, .ui-datepicker-next').length > 0 )
|
||||
{
|
||||
//no closing in this case
|
||||
}
|
||||
// //if the context is not document, then we have encountered a bug : the css ::after elements do have a context on click and thus, we cannot check if they are inside a #ui-datepicker-div
|
||||
// else if (typeof oEventTargetElem.context != 'undefined' && $(oEventTargetElem.context).is('.ui-icon'))
|
||||
// {
|
||||
// //no closing in this case (bugfix)
|
||||
// }
|
||||
// If criteria, close more menu & all criterion but me
|
||||
if($(oEvent.target).closest('.search_form_criteria').length > 0)
|
||||
else if(oEventTargetElem.closest('.search_form_criteria').length > 0)
|
||||
{
|
||||
me._closeMoreCriterion();
|
||||
// All criterion but me is already handle by the criterion, no callback needed.
|
||||
|
||||
Reference in New Issue
Block a user