oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skhud...@apache.org
Subject svn commit: r1354778 - in /oodt/trunk: CHANGES.txt balance/modules/puny/classes/Puny.class.php balance/modules/puny/static/js/puny.js
Date Thu, 28 Jun 2012 00:12:52 GMT
Author: skhudiky
Date: Thu Jun 28 00:12:51 2012
New Revision: 1354778

URL: http://svn.apache.org/viewvc?rev=1354778&view=rev
Log:
OODT-472 Puny Module - Return to previous page once the user is done editing 

Modified:
    oodt/trunk/CHANGES.txt
    oodt/trunk/balance/modules/puny/classes/Puny.class.php
    oodt/trunk/balance/modules/puny/static/js/puny.js

Modified: oodt/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/oodt/trunk/CHANGES.txt?rev=1354778&r1=1354777&r2=1354778&view=diff
==============================================================================
--- oodt/trunk/CHANGES.txt (original)
+++ oodt/trunk/CHANGES.txt Thu Jun 28 00:12:51 2012
@@ -4,6 +4,8 @@ Apache OODT Change Log
 Release 0.5
 --------------------------------------------
 
+* OODT-472 Puny Module - Return to previous page once the user is done editing  (skhudiky)
+
 * OODT-467 Change SciPgeConfigFileWriter to DynamicConfigFileWriter (bfoster)
 
 * OODT-464 Add file staging support to CAS-PGE's XmlFilePgeConfigBuilder (bfoster)

Modified: oodt/trunk/balance/modules/puny/classes/Puny.class.php
URL: http://svn.apache.org/viewvc/oodt/trunk/balance/modules/puny/classes/Puny.class.php?rev=1354778&r1=1354777&r2=1354778&view=diff
==============================================================================
--- oodt/trunk/balance/modules/puny/classes/Puny.class.php (original)
+++ oodt/trunk/balance/modules/puny/classes/Puny.class.php Thu Jun 28 00:12:51 2012
@@ -121,8 +121,9 @@ class Puny {
 	  if ( !self::$commonResourcesLoaded ) {
 	    $js = "\r\n"
 	      . "var puny_module_root   = '" . trim(App::Get()->settings['puny_module_root'])
. "'\r\n"
-	      . "    puny_module_static = '" . trim(App::Get()->settings['puny_module_static'])
."';\r\n";
-	    App::Get()->response->addJavascript( $js, true ); // raw Javascript
+	      . "    puny_module_static = '" . trim(App::Get()->settings['puny_module_static'])
."'\r\n"
+	      . "    puny_current_url = '" . $_SERVER['HTTP_REFERER'] ."';\r\n";
+	      App::Get()->response->addJavascript( $js, true ); // raw Javascript
 	    
 	    // Add puny default styles
 	    $staticPath = trim(App::Get()->settings['puny_module_static']);

Modified: oodt/trunk/balance/modules/puny/static/js/puny.js
URL: http://svn.apache.org/viewvc/oodt/trunk/balance/modules/puny/static/js/puny.js?rev=1354778&r1=1354777&r2=1354778&view=diff
==============================================================================
--- oodt/trunk/balance/modules/puny/static/js/puny.js (original)
+++ oodt/trunk/balance/modules/puny/static/js/puny.js Thu Jun 28 00:12:51 2012
@@ -42,7 +42,7 @@ function punyInitEditor ( elmt ) {
 };
 
 function punyCancel() {
-	window.location = site_root;
+	window.location = puny_current_url;
 }
 
 function punyPersistChanges(event) {
@@ -51,6 +51,6 @@ function punyPersistChanges(event) {
 		'resourceId' : editingResourceId
 		, 'content'  : $('#gollum-editor-body').val()
 	},function( data ) {
-		window.location = site_root;
+		window.location = puny_current_url;
 	}, 'json');
 }



Mime
View raw message