Fixes for search form - "Reset Criteria" works, and now you can ORDER BY correctly.
This commit is contained in:
parent
9835a605ce
commit
8bb5334aaa
|
@ -3,7 +3,11 @@
|
||||||
// This file contains a list of all the HTML forms in the system,
|
// This file contains a list of all the HTML forms in the system,
|
||||||
// encoded as arrays.
|
// encoded as arrays.
|
||||||
//
|
//
|
||||||
$tmpAct = isset($_REQUEST['act']) ? $_REQUEST['act'] : '';
|
$tmpAct = '';
|
||||||
|
if (isset($_REQUEST['act'])) {
|
||||||
|
// Get everything up to the first dot
|
||||||
|
$tmpAct = substr($_REQUEST["act"], 0, strpos($_REQUEST["act"], '.'));
|
||||||
|
}
|
||||||
|
|
||||||
$ui_fmask = array(
|
$ui_fmask = array(
|
||||||
/* ===================== list of system preferences which can be adjusted */
|
/* ===================== list of system preferences which can be adjusted */
|
||||||
|
@ -74,7 +78,7 @@ $ui_fmask = array(
|
||||||
'isPref' => TRUE,
|
'isPref' => TRUE,
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => 'Archive server location URL',
|
'label' => 'Archive server location URL',
|
||||||
'default' => "http://" . $CC_CONFIG['archiveUrlHost'] . ":" . $CC_CONFIG['archiveUrlPort'] . $CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'],
|
'default' => "http://" . $CC_CONFIG['archiveUrlHost'] . ":" . $CC_CONFIG['archiveUrlPort'] . $CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'],
|
||||||
'required' => TRUE,
|
'required' => TRUE,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
@ -382,8 +386,8 @@ $ui_fmask = array(
|
||||||
array(
|
array(
|
||||||
'element' => 'clear',
|
'element' => 'clear',
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
'label' => 'Reset criteria',
|
'label' => 'Reset Criteria',
|
||||||
'attributes' => array('class' => 'button_wide', 'onClick' => "this.form.reset(); hpopup('".UI_HANDLER."?act=SEARCH.clear', 'SF')"),
|
'attributes' => array('class' => 'button_wide', 'onClick' => "this.form.reset(); location='".UI_HANDLER."?act=SEARCH.clear'"),
|
||||||
'groupit' => TRUE,
|
'groupit' => TRUE,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -128,18 +128,30 @@ switch ($_REQUEST['act']) {
|
||||||
|
|
||||||
case "SEARCH.newSearch":
|
case "SEARCH.newSearch":
|
||||||
$uiHandler->SEARCH->newSearch($_REQUEST);
|
$uiHandler->SEARCH->newSearch($_REQUEST);
|
||||||
|
$NO_REDIRECT = true;
|
||||||
|
$_REQUEST["act"] = "SEARCH";
|
||||||
|
include("ui_browser.php");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SEARCH.simpleSearch":
|
case "SEARCH.simpleSearch":
|
||||||
$uiHandler->SEARCH->simpleSearch($_REQUEST);
|
$uiHandler->SEARCH->simpleSearch($_REQUEST);
|
||||||
|
$NO_REDIRECT = true;
|
||||||
|
$_REQUEST["act"] = "SEARCH";
|
||||||
|
include("ui_browser.php");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SEARCH.reorder":
|
case "SEARCH.reorder":
|
||||||
$uiHandler->SEARCH->reorder($_REQUEST['by']);
|
$uiHandler->SEARCH->reorder($_REQUEST['by']);
|
||||||
|
$NO_REDIRECT = true;
|
||||||
|
$_REQUEST["act"] = "SEARCH";
|
||||||
|
include("ui_browser.php");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SEARCH.clear":
|
case "SEARCH.clear":
|
||||||
$uiHandler->SEARCH->clear();
|
$uiHandler->SEARCH->clear();
|
||||||
|
$NO_REDIRECT = true;
|
||||||
|
$_REQUEST["act"] = "SEARCH";
|
||||||
|
include("ui_browser.php");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SEARCH.setOffset":
|
case "SEARCH.setOffset":
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
<table style="width: 600px;">
|
<table style="width: 600px;">
|
||||||
<tr class="blue_head">
|
<tr class="blue_head">
|
||||||
<td style="width: 20px"><input type="checkbox" name="all" onClick="collector_switchAll('SEARCHRESULTS')"></td>
|
<td style="width: 20px"><input type="checkbox" name="all" onClick="collector_switchAll('SEARCHRESULTS')"></td>
|
||||||
<td style="width: 200px;"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:title" id="blue_head">##Title##</a></td>
|
<td style="width: 200px;"><a href="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:title" id="blue_head">##Title##</a></td>
|
||||||
<td style="width: 195px"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:creator" id="blue_head">##Creator##</a></td>
|
<td style="width: 195px"><a href="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:creator" id="blue_head">##Creator##</a></td>
|
||||||
<td style="width: 195px"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:source" id="blue_head">##Album##</a></td>
|
<td style="width: 195px"><a href="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:source" id="blue_head">##Album##</a></td>
|
||||||
<td style="width: 25px"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=ls:track_num" id="blue_head">##Track##</a></td>
|
<td style="width: 25px"><a href="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=ls:track_num" id="blue_head">##Track##</a></td>
|
||||||
<td><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dcterms:extent" id="blue_head">##Duration##</a></td>
|
<td><a href="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dcterms:extent" id="blue_head">##Duration##</a></td>
|
||||||
<td style="width: 41px; border: 0; text-align: center">{*<a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=type" id="blue_head">*}##Type##{*</a>*}</td>
|
<td style="width: 41px; border: 0; text-align: center">{*<a href="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=type" id="blue_head">*}##Type##{*</a>*}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{foreach from=$_results.items item=i}
|
{foreach from=$_results.items item=i}
|
||||||
<!-- start item -->
|
<!-- start item -->
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<div class="footer" style="width: 595px;">
|
<div class="footer" style="width: 595px;">
|
||||||
|
|
||||||
<div class="counter">
|
<div class="counter">
|
||||||
{* {if $_results.prev}<a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=prev" id="blue_head">##previous##</a>{/if} *}
|
{* {if $_results.prev}<a href="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=prev" id="blue_head">##previous##</a>{/if} *}
|
||||||
|
|
||||||
{foreach from=$_results.pagination item=p key=k}
|
{foreach from=$_results.pagination item=p key=k}
|
||||||
{if $k != $_results.page+1}
|
{if $k != $_results.page+1}
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
{* {if $_results.next}<a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=next" id="blue_head">##next##</a>{/if} *}
|
{* {if $_results.next}<a href="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=next" id="blue_head">##next##</a>{/if} *}
|
||||||
|
|
||||||
##Range##: {$_criteria.offset+1}-{if ($_criteria.offset+$_criteria.limit)>$_results.cnt}{$_results.cnt}{else}{$_criteria.offset+$_criteria.limit}{/if}
|
##Range##: {$_criteria.offset+1}-{if ($_criteria.offset+$_criteria.limit)>$_results.cnt}{$_results.cnt}{else}{$_criteria.offset+$_criteria.limit}{/if}
|
||||||
##Count##: {$_results.cnt}
|
##Count##: {$_results.cnt}
|
||||||
|
|
Loading…
Reference in New Issue