View Issue Details

IDProjectCategoryView StatusLast Update
0009117mantisbtjavascriptpublic2014-12-08 00:34
Reporterschoenfeld Assigned Todhx  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0009117: Please remove projax from mantis
Description

As it appears mantis currently uses a library called projax for some AJAX effects in mantis. Code occurences are in

mantis_(update|report)_advanced.php

I would request you to remove this stuff, because its bad to ship libraries that are bad maintained upstream or in this case even dead. Attached is a patch which disables projax features without a substituion. I plan to include it in Debian, so please have a look at it, if it is plausible.

Tagspatch
Attached Files
projax.patch (4,707 bytes)   
Common subdirectories: www/admin and /root/mantis.patched/admin
diff -u www/bug_report_advanced_page.php /root/mantis.patched/bug_report_advanced_page.php
--- www/bug_report_advanced_page.php	2008-04-29 16:23:24.000000000 +0200
+++ /root/mantis.patched/bug_report_advanced_page.php	2008-04-30 16:44:36.591173024 +0200
@@ -31,7 +31,6 @@
 	require_once( $t_core_path.'file_api.php' );
 	require_once( $t_core_path.'custom_field_api.php' );
 	require_once( $t_core_path.'last_visited_api.php' );
-	require_once( $t_core_path.'projax_api.php' );
 
 	$f_master_bug_id = gpc_get_int( 'm_id', 0 );
 
@@ -247,20 +246,12 @@
 		<?php echo lang_get( 'platform' ) ?>
 	</td>
 	<td>
-		<?php
-			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
-		?>
 				<select name="platform">
 					<option value=""></option>
 				<?php
 						print_platform_option_list( $f_platform );
 				?>
 				</select>
-		<?php
-			} else {
-				projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => $f_platform, 'size' => '32', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
-			}
-		?>
 	</td>
 </tr>
 
@@ -271,20 +262,12 @@
 		<?php echo lang_get( 'os' ) ?>
 	</td>
 	<td>
-		<?php
-			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
-		?>
 				<select name="os">
 					<option value=""></option>
 				<?php
 						print_os_option_list( $f_os );
 				?>
 				</select>
-		<?php
-			} else {
-				projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => $f_os, 'size' => '32', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
-			}
-		?>
 	</td>
 </tr>
 
@@ -295,20 +278,12 @@
 		<?php echo lang_get( 'os_version' ) ?>
 	</td>
 	<td>
-		<?php
-			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
-		?>
 				<select name="os_build">
 					<option value=""></option>
 				<?php
 						print_os_build_option_list( $f_os_build );
 				?>
 				</select>
-		<?php
-			} else {
-				projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => $f_os_build, 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
-			}
-		?>
 	</td>
 </tr>
 
diff -u www/bug_update_advanced_page.php /root/mantis.patched/bug_update_advanced_page.php
--- www/bug_update_advanced_page.php	2008-04-29 16:23:24.000000000 +0200
+++ /root/mantis.patched/bug_update_advanced_page.php	2008-04-30 16:44:36.580173313 +0200
@@ -30,7 +30,6 @@
 	require_once( $t_core_path.'custom_field_api.php' );
 	require_once( $t_core_path.'date_api.php' );
 	require_once( $t_core_path.'last_visited_api.php' );
-	require_once( $t_core_path.'projax_api.php' );
 ?>
 <?php
 	$f_bug_id = gpc_get_int( 'bug_id' );
@@ -248,20 +247,12 @@
 		<?php echo lang_get( 'platform' ) ?>
 	</td>
 	<td>
-		<?php
-			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
-		?>
 				<select name="platform">
 					<option value=""></option>
 				<?php
 						print_platform_option_list( $t_bug->platform );
 				?>
 				</select>
-		<?php
-			} else {
-				projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => $t_bug->platform, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
-			}
-		?>
 	</td>
 
 </tr>
@@ -300,20 +291,12 @@
 		<?php echo lang_get( 'os' ) ?>
 	</td>
 	<td>
-		<?php
-			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
-		?>
 				<select name="os">
 					<option value=""></option>
 				<?php
 						print_os_option_list( $t_bug->os );
 				?>
 				</select>
-		<?php
-			} else {
-				projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => $t_bug->os, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
-			}
-		?>
 	</td>
 
 </tr>
@@ -339,20 +322,12 @@
 		<?php echo lang_get( 'os_version' ) ?>
 	</td>
 	<td>
-		<?php
-			if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF ) {
-		?>
 				<select name="os_build">
 					<option value=""></option>
 				<?php
 						print_os_build_option_list( $t_bug->os_build );
 				?>
 				</select>
-		<?php
-			} else {
-				projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => $t_bug->os_build, 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
-			}
-		?>
 	</td>
 
 </tr>
Common subdirectories: www/core and /root/mantis.patched/core
Common subdirectories: www/css and /root/mantis.patched/css
Common subdirectories: www/graphs and /root/mantis.patched/graphs
Common subdirectories: www/images and /root/mantis.patched/images
Common subdirectories: www/javascript and /root/mantis.patched/javascript
Common subdirectories: www/lang and /root/mantis.patched/lang
projax.patch (4,707 bytes)   

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
related to 0011523 closeddhx Ajax not defined on bug_update_page.php 
child of 0011826 closeddhx Remove all inline JavaScript from MantisBT (use external scripts instead) 

Activities

vboctor

vboctor

2008-07-13 15:21

manager   ~0018456

I agree with moving away from projax, but we should choose a replacement. giallu was looking at alternatives.

aik099

aik099

2009-06-09 08:28

reporter   ~0022063

jQuery seems to be a good replacement.

dhx

dhx

2010-06-23 01:27

reporter   ~0025957

Targeting for removal in 1.3.x as jQuery and Projax are conflicting with each other causing bugs like 0011523.

dhx

dhx

2010-06-23 11:21

reporter   ~0025967

Finally removed Projax and replaced it with jQuery. Tested and ready for 1.3.x :)

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036502

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master b77ea9cd

2010-06-23 11:00

dhx


Details Diff
Fix 0009117: Replace Projax with jQuery UI Autocomplete

Projax is an old outdated library that is no longer maintained. This
commit completely removes Projax from MantisBT and replaces it with a
more modern jQuery UI Autocomplete equivalent.

XMLHTTPRequest now returns JSON encoded data to jQuery so plugins and
other pages can perform AJAX functions using standard methods for
transferring data.
Affected Issues
0009117
rm - javascript/min/projax/effects.js Diff
mod - bug_report_page.php Diff File
rm - javascript/min/projax/prototype.js Diff
rm - javascript/dev/projax/MIT-LICENSE Diff
rm - javascript/min/projax/MIT-LICENSE Diff
mod - bug_update_advanced_page.php Diff File
rm - javascript/dev/projax/scriptaculous.js Diff
rm - javascript/dev/projax/slider.js Diff
rm - library/projax/classes/Prototype.php Diff
rm - javascript/min/projax/builder.js Diff
rm - javascript/dev/projax/prototype_b.js Diff
rm - javascript/min/projax/prototype_b.js Diff
rm - javascript/dev/projax/license.html Diff
rm - javascript/min/projax/license.html Diff
rm - javascript/min/projax/slider.js Diff
rm - library/projax/classes/Scriptaculous.php Diff
mod - javascript/min/common.js Diff File
rm - javascript/min/projax/scriptaculous.js Diff
rm - core/projax_api.php Diff
mod - library/README.libs Diff File
rm - library/projax/readme_mantis.txt Diff
rm - library/projax/projax.php Diff
mod - javascript/dev/common.js Diff File
rm - javascript/dev/projax/effects.js Diff
rm - javascript/min/projax/dragdrop.js Diff
mod - core/xmlhttprequest_api.php Diff File
rm - javascript/dev/projax/builder.js Diff
rm - javascript/dev/projax/controls.js Diff
rm - javascript/dev/projax/prototype.js Diff
mod - core/html_api.php Diff File
rm - javascript/min/projax/controls.js Diff
rm - library/projax/index.html Diff
rm - library/projax/classes/JavaScript.php Diff
rm - javascript/dev/projax/dragdrop.js Diff