mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Advanced search: WIP POC, client widgets.
SVN:b1162[5401]
This commit is contained in:
@@ -117,7 +117,7 @@ $(function()
|
|||||||
this.element
|
this.element
|
||||||
.append('<div class="sfc_title"></div>')
|
.append('<div class="sfc_title"></div>')
|
||||||
.append('<div class="sfc_form_group"></div>')
|
.append('<div class="sfc_form_group"></div>')
|
||||||
.append('<div class="sfc_toggle"><a class="fa fa-caret-down" href="#"></a></div>');
|
.append('<span class="sfc_toggle"><a class="fa fa-caret-down" href="#"></a></span>');
|
||||||
|
|
||||||
// Bind events
|
// Bind events
|
||||||
// - Toggler
|
// - Toggler
|
||||||
@@ -128,7 +128,7 @@ $(function()
|
|||||||
// Removable / locked decoration
|
// Removable / locked decoration
|
||||||
if(this.options.is_removable === true)
|
if(this.options.is_removable === true)
|
||||||
{
|
{
|
||||||
this.element.append('<div class="sfc_close"><a class="fa fa-times" href="#"></a></div>');
|
this.element.append('<span class="sfc_close"><a class="fa fa-times" href="#"></a></span>');
|
||||||
this.element.find('.sfc_close').on('click', function(){
|
this.element.find('.sfc_close').on('click', function(){
|
||||||
me._remove();
|
me._remove();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -256,9 +256,12 @@ $(function()
|
|||||||
var sWidgetClass = 'search_form_criteria' + '_' + sType;
|
var sWidgetClass = 'search_form_criteria' + '_' + sType;
|
||||||
|
|
||||||
// Add some informations from the field
|
// Add some informations from the field
|
||||||
oData.field = {
|
if(this._hasFieldDefinition(sRef))
|
||||||
label: this.options.search.fields[sRef].label,
|
{
|
||||||
};
|
oData.field = {
|
||||||
|
label: this.options.search.fields[sRef].label,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Create DOM element
|
// Create DOM element
|
||||||
var oCriteriaElem = $('<div></div>')
|
var oCriteriaElem = $('<div></div>')
|
||||||
@@ -308,6 +311,12 @@ $(function()
|
|||||||
this._submit();
|
this._submit();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Field helpers
|
||||||
|
_hasFieldDefinition: function(sRef)
|
||||||
|
{
|
||||||
|
return (this.options.search.fields[sRef] !== undefined);
|
||||||
|
},
|
||||||
|
|
||||||
// Button handlers
|
// Button handlers
|
||||||
_onSubmitClick: function(oEvent)
|
_onSubmitClick: function(oEvent)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user