[evolvis-commits] r17652: revert r1764[6789], will be done in an svn branch first, then in a bzr branch; agreed by mike

mirabilos at evolvis.org mirabilos at evolvis.org
Fri Oct 28 18:08:40 CEST 2011


Author: mirabilos
Date: 2011-10-28 18:08:40 +0200 (Fri, 28 Oct 2011)
New Revision: 17652

Removed:
   trunk/gforge_base/evolvisforge-5.1/src/common/advanced_search/
   trunk/gforge_base/evolvisforge-5.1/src/www/scripts/jquery-tipsy/
   trunk/gforge_base/evolvisforge-5.1/src/www/scripts/jquery/
   trunk/gforge_base/evolvisforge-5.1/src/www/themes/css/smoothness/
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/search.php
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php
Log:
revert r1764[6789], will be done in an svn branch first, then in a bzr branch; agreed by mike

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php	2011-10-28 16:06:55 UTC (rev 17651)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php	2011-10-28 16:08:40 UTC (rev 17652)
@@ -294,11 +294,14 @@
 		$aux_extra_fields = $_extra_fields;
 	}
 	$status_box=$ath->renderSelect ($ath->getCustomStatusField(),$aux_extra_fields[$ath->getCustomStatusField()],false,'',true,_('Any'));
+	/*XXX what a fuckup, this… */
+	$status_box_name = 'extra_fields['.$ath->getCustomStatusField().']';
 } else {
 	if (is_array($_status)) {
 		$_status='';
 	}
 	$status_box = $ath->statusBox('_status',$_status,true,_('Any'));
+	$status_box_name = '_status';
 }
 
 // start of RDFa
@@ -376,72 +379,10 @@
 	echo '<strong>
 	<a href="/tracker/?atid='. $ath->getID().'&group_id='.$group_id.'&func=query">'._('Build Query').'</a></strong>';
 }
-
-/**
- * New advaced search begins here!
- */
-?>
-<script>
-	$(function() {
-		function split( val ) {
-			return val.split( / \s*/ );
-		}
-		function extractLast( term ) {
-			return split( term ).pop();
-		}
-
-		$( "#advanced_search" )
-			// don't navigate away from the field on tab when selecting an item
-			.bind( "keydown", function( event ) {
-				if ( event.keyCode === $.ui.keyCode.TAB &&
-						$( this ).data( "autocomplete" ).menu.active ) {
-					event.preventDefault();
-				}
-			})
-			.autocomplete({
-				source: function( request, response ) {
-					$.getJSON( "search.php?tracker_id=<?php echo $_GET['atid'];?>&cur_input=" + request.term, {
-						term: extractLast( request.term )
-					}, response );
-				},
-				search: function() {
-					// custom minLength
-					var term = extractLast( this.value );
-					if ( term.length < 0 ) {
-						return false;
-					}
-				},
-				focus: function() {
-					// prevent value inserted on focus
-					return false;
-				},
-				select: function( event, ui ) {
-					var terms = split( this.value );
-					// remove the current input
-					terms.pop();
-					// add the selected item
-					terms.push( ui.item.value );
-					terms.push( "" );
-					this.value = terms.join( " " );
-					return false;
-				}
-			});
-	});
-	</script>
-<span class="ui-widget">
-	<label for="advanced_search"><?php echo _('Search').':';?> </label>
-	<input id="advanced_search" style="width: 500px;"/>
-	<input id="search" type="button" value="<?php echo _('Search'); ?>"/>
-	<input id="save" type="button" value="<?php echo _('Save'); ?>" />
-</span>
-<?php
-/**
- * New advaced search ends here!
- */
 echo '
 	</div>
 	<div class="tabbertab'.($af->query_type == 'custom' ? ' tabbertabdefault' : '').'" title="'._('Simple Filtering and Sorting').'">
-	<form action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&atid='.$ath->getID().'" method="post">
+	<form name="headerForm" action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&atid='.$ath->getID().'" method="post">
 	<input type="hidden" name="query_id" value="-1" />
 	<input type="hidden" name="set" value="custom" />
 	<table width="100%" cellspacing="0">
@@ -479,6 +420,20 @@
 	</tr>
 	</table>
 	</form>
+
+	<script type="text/javascript">//<![CDATA[
+
+	function submitForm() {
+		document.headerForm.submit.click();
+	}
+
+	document.headerForm._assigned_to.onchange = submitForm;
+	document.headerForm.elements["'.$status_box_name.'"].onchange = submitForm;
+	document.headerForm._sort_col.onchange = submitForm;
+	document.headerForm._sort_ord.onchange = submitForm;
+
+	//]]></script>
+
 	</div>';
 if ($af->query_type == 'default') {
 	echo '<div class="tabbertab tabbertabdefault" title="'._('Default').'">';



More information about the evolvis-commits mailing list