Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
b66f00ff07
|
@ -101,10 +101,12 @@ class Application_Model_Datatables
|
||||||
prepared */
|
prepared */
|
||||||
$params = array();
|
$params = array();
|
||||||
|
|
||||||
$advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm);
|
if ($data['advSearch'] === 'true') {
|
||||||
if (!empty($advancedWhere['clause'])) {
|
$advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm);
|
||||||
$where[] = join(" AND ", $advancedWhere['clause']);
|
if (!empty($advancedWhere['clause'])) {
|
||||||
$params = $advancedWhere['params'];
|
$where[] = join(" AND ", $advancedWhere['clause']);
|
||||||
|
$params = $advancedWhere['params'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($data["sSearch"] !== "") {
|
if ($data["sSearch"] !== "") {
|
||||||
|
|
|
@ -525,8 +525,17 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"sAjaxDataProp": "files",
|
"sAjaxDataProp": "files",
|
||||||
|
|
||||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
"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;
|
var type;
|
||||||
aoData.push( { name: "format", value: "json"} );
|
aoData.push( { name: "format", value: "json"} );
|
||||||
|
aoData.push( { name: "advSearch", value: advSearchValid} );
|
||||||
|
|
||||||
//push whether to search files/playlists or all.
|
//push whether to search files/playlists or all.
|
||||||
type = $("#library_display_type").find("select").val();
|
type = $("#library_display_type").find("select").val();
|
||||||
|
|
|
@ -69,9 +69,9 @@ AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
if ($lib.filter(':visible').length > 0) {
|
if ($lib.filter(':visible').length > 0) {
|
||||||
|
|
||||||
$lib.width(Math.floor(screenWidth * 0.5));
|
$lib.width(Math.floor(screenWidth * 0.49));
|
||||||
|
|
||||||
$builder.width(Math.floor(screenWidth * 0.5))
|
$builder.width(Math.floor(screenWidth * 0.49))
|
||||||
.find("#sb_edit")
|
.find("#sb_edit")
|
||||||
.remove()
|
.remove()
|
||||||
.end()
|
.end()
|
||||||
|
@ -155,9 +155,9 @@ AIRTIME = (function(AIRTIME) {
|
||||||
AIRTIME.showbuilder.resetTimestamp();
|
AIRTIME.showbuilder.resetTimestamp();
|
||||||
|
|
||||||
$lib.show()
|
$lib.show()
|
||||||
.width(Math.floor(screenWidth * 0.5));
|
.width(Math.floor(screenWidth * 0.49));
|
||||||
|
|
||||||
$builder.width(Math.floor(screenWidth * 0.5))
|
$builder.width(Math.floor(screenWidth * 0.49))
|
||||||
.find("#sb_edit")
|
.find("#sb_edit")
|
||||||
.remove()
|
.remove()
|
||||||
.end()
|
.end()
|
||||||
|
|
Loading…
Reference in New Issue