Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
40c122fafa
|
@ -100,10 +100,12 @@ class Application_Model_Datatables
|
|||
*/
|
||||
$params = array();
|
||||
|
||||
$advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm);
|
||||
if (!empty($advancedWhere['clause'])) {
|
||||
$where[] = join(" AND ", $advancedWhere['clause']);
|
||||
$params = $advancedWhere['params'];
|
||||
if ($data['advSearch'] === 'true') {
|
||||
$advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm);
|
||||
if (!empty($advancedWhere['clause'])) {
|
||||
$where[] = join(" AND ", $advancedWhere['clause']);
|
||||
$params = $advancedWhere['params'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($data["sSearch"] !== "") {
|
||||
|
|
|
@ -525,8 +525,17 @@ var AIRTIME = (function(AIRTIME) {
|
|||
"sAjaxDataProp": "files",
|
||||
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
/* The real validation check is done in dataTables.columnFilter.js
|
||||
* We also need to check it here because datatable is redrawn everytime
|
||||
* an action is performed in the Library page.
|
||||
* In order for datatable to redraw the advanced search fields
|
||||
* MUST all be valid.
|
||||
*/
|
||||
var advSearchFields = $("div#advanced_search").children(':visible');
|
||||
var advSearchValid = validateAdvancedSearch(advSearchFields);
|
||||
var type;
|
||||
aoData.push( { name: "format", value: "json"} );
|
||||
aoData.push( { name: "advSearch", value: advSearchValid} );
|
||||
|
||||
//push whether to search files/playlists or all.
|
||||
type = $("#library_display_type").find("select").val();
|
||||
|
|
Loading…
Reference in New Issue