Simplify set post or query
This commit is contained in:
@ -309,17 +309,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
set: function() {
|
||||||
|
return {
|
||||||
|
query: value => {
|
||||||
|
$("[name='query']").val(value)
|
||||||
|
this.get().results()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
setup: function(id) {
|
setup: function(id) {
|
||||||
this.id = id
|
this.id = id
|
||||||
this.get().results()
|
this.get().results()
|
||||||
|
|
||||||
$('#tipo').dropdown().dropdown('set selected', '*')
|
$('#tipo').dropdown().dropdown('set selected', '*')
|
||||||
@if (trim($post) !== '')
|
@if (trim($post) !== '')
|
||||||
$("[name='query']").val('{!! $post !!}')
|
this.set().query('{!! $post !!}')
|
||||||
this.get().results()
|
|
||||||
@elseif (trim($query) !== '')
|
@elseif (trim($query) !== '')
|
||||||
$("[name='query']").val('{!! $query !!}')
|
this.set().query('{!! $query !!}')
|
||||||
this.get().results()
|
|
||||||
@endif
|
@endif
|
||||||
@if (trim($tipo) !== '')
|
@if (trim($tipo) !== '')
|
||||||
$('#tipo').dropdown('set selected', '{{$tipo}}')
|
$('#tipo').dropdown('set selected', '{{$tipo}}')
|
||||||
|
Reference in New Issue
Block a user