View Issue Details

IDProjectCategoryView StatusLast Update
0009117mantisbtjavascriptpublic2014-12-08 00:34
Reporterschoenfeld 
Assigned Todhx 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version 
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

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

2008-04-30 10:56

 

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)
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 15:00:29

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.
rm - javascript/min/projax/effects.js Diff File
mod - bug_report_page.php Diff File
rm - javascript/min/projax/prototype.js Diff File
rm - javascript/dev/projax/MIT-LICENSE Diff File
rm - javascript/min/projax/MIT-LICENSE Diff File
mod - bug_update_advanced_page.php Diff File
rm - javascript/dev/projax/scriptaculous.js Diff File
rm - javascript/dev/projax/slider.js Diff File
rm - library/projax/classes/Prototype.php Diff File
rm - javascript/min/projax/builder.js Diff File
rm - javascript/dev/projax/prototype_b.js Diff File
rm - javascript/min/projax/prototype_b.js Diff File
rm - javascript/dev/projax/license.html Diff File
rm - javascript/min/projax/license.html Diff File
rm - javascript/min/projax/slider.js Diff File
rm - library/projax/classes/Scriptaculous.php Diff File
mod - javascript/min/common.js Diff File
rm - javascript/min/projax/scriptaculous.js Diff File
rm - core/projax_api.php Diff File
mod - library/README.libs Diff File
rm - library/projax/readme_mantis.txt Diff File
rm - library/projax/projax.php Diff File
mod - javascript/dev/common.js Diff File
rm - javascript/dev/projax/effects.js Diff File
rm - javascript/min/projax/dragdrop.js Diff File
mod - core/xmlhttprequest_api.php Diff File
rm - javascript/dev/projax/builder.js Diff File
rm - javascript/dev/projax/controls.js Diff File
rm - javascript/dev/projax/prototype.js Diff File
mod - core/html_api.php Diff File
rm - javascript/min/projax/controls.js Diff File
rm - library/projax/index.html Diff File
rm - library/projax/classes/JavaScript.php Diff File
rm - javascript/dev/projax/dragdrop.js Diff File

Issue History

Date Modified Username Field Change
2008-04-30 10:56 schoenfeld New Issue
2008-04-30 10:56 schoenfeld File Added: projax.patch
2008-07-13 15:19 vboctor Tag Attached: patch
2008-07-13 15:21 vboctor Note Added: 0018456
2008-07-13 15:21 vboctor Status new => acknowledged
2009-06-09 08:28 aik099 Note Added: 0022063
2010-06-23 01:26 dhx Relationship added related to 0011523
2010-06-23 01:27 dhx Note Added: 0025957
2010-06-23 01:27 dhx Assigned To => dhx
2010-06-23 01:27 dhx Status acknowledged => assigned
2010-06-23 01:27 dhx Target Version => 1.3.0-beta.1
2010-06-23 11:20 dhx Changeset attached => MantisBT master b77ea9cd
2010-06-23 11:20 dhx Resolution open => fixed
2010-06-23 11:20 dhx Fixed in Version => 1.3.0-beta.1
2010-06-23 11:21 dhx Note Added: 0025967
2010-06-23 11:21 dhx Status assigned => resolved
2010-06-23 11:34 dhx Relationship added child of 0011826
2013-04-05 17:57 grangeway Status resolved => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036502
2013-04-05 18:04 grangeway Relationship added related to 0015721
2013-04-06 03:44 dregad Status acknowledged => resolved
2013-04-06 07:20 grangeway Status resolved => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-12-08 00:34 vboctor Status resolved => closed