mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-16 22:08:44 +02:00
Advanced search: WIP POC, client widgets.
SVN:b1162[5401]
This commit is contained in:
@@ -117,7 +117,7 @@ $(function()
|
||||
this.element
|
||||
.append('<div class="sfc_title"></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
|
||||
// - Toggler
|
||||
@@ -128,7 +128,7 @@ $(function()
|
||||
// Removable / locked decoration
|
||||
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(){
|
||||
me._remove();
|
||||
});
|
||||
|
||||
@@ -256,9 +256,12 @@ $(function()
|
||||
var sWidgetClass = 'search_form_criteria' + '_' + sType;
|
||||
|
||||
// Add some informations from the field
|
||||
oData.field = {
|
||||
label: this.options.search.fields[sRef].label,
|
||||
};
|
||||
if(this._hasFieldDefinition(sRef))
|
||||
{
|
||||
oData.field = {
|
||||
label: this.options.search.fields[sRef].label,
|
||||
};
|
||||
}
|
||||
|
||||
// Create DOM element
|
||||
var oCriteriaElem = $('<div></div>')
|
||||
@@ -308,6 +311,12 @@ $(function()
|
||||
this._submit();
|
||||
},
|
||||
|
||||
// Field helpers
|
||||
_hasFieldDefinition: function(sRef)
|
||||
{
|
||||
return (this.options.search.fields[sRef] !== undefined);
|
||||
},
|
||||
|
||||
// Button handlers
|
||||
_onSubmitClick: function(oEvent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user