| 
      
      
      From: <dj...@us...> - 2012-01-24 18:03:21
      
     | 
| Revision: 8804
          http://xoops.svn.sourceforge.net/xoops/?rev=8804&view=rev
Author:   djculex
Date:     2012-01-24 18:03:10 +0000 (Tue, 24 Jan 2012)
Log Message:
-----------
Added: Colorbox implimentation for more cool register dialog box
Modified Paths:
--------------
    XoopsModules/smallworld/trunk/smallworld/editprofile.php
    XoopsModules/smallworld/trunk/smallworld/js/smallworld.js
    XoopsModules/smallworld/trunk/smallworld/register.php
Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/editprofile.php	2012-01-24 17:24:54 UTC (rev 8803)
+++ XoopsModules/smallworld/trunk/smallworld/editprofile.php	2012-01-24 18:03:10 UTC (rev 8804)
@@ -24,7 +24,7 @@
 include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php");
 include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/arrays.php");
 include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php");
-global $xoopsUser,$xoopsTpl,$xoopsDB;
+global $xoopsUser,$xoopsTpl,$xoopsDB, $xoTheme;
 
 	if ($xoopsUser) {
 		$id = $xoopsUser->getVar('uid');
@@ -315,6 +315,9 @@
 			 $xoopsTpl->append('smallworld_register_title',_SMALLWORLD_REGRISTATION_TITLE);
 			 $xoopsTpl->assign('smallworld_beforesubmit',_SMALLWORLD_TEXTBEFORESUBMIT);
 			 $xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT);	
+			 
+			$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
+			$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
 	}	 
 		}	else {
 			redirect_header("register.php", 1); 
Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js	2012-01-24 17:24:54 UTC (rev 8803)
+++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js	2012-01-24 18:03:10 UTC (rev 8804)
@@ -60,6 +60,26 @@
 				location.href = 'index.php'; 
 			}
 		});  
+		
+		// Attach colorbox.js to selector in register.php and edit_profile.php
+		// If other page / no presence of #smallworld_regform1 then exit function and continue
+		xoops_smallworld(document).ready(function(){
+		 if (xoops_smallworld('#smallworld_regform1').length) { // implies *not* zero
+			xoops_smallworld('#smallworld_regform1').show();
+			xoops_smallworld.fn.colorbox({
+				width:"auto", 
+				height:"70%",
+				inline:true, 
+				onCleanup:function() {
+					xoops_smallworld('#smallworld_regform1').hide();
+				},
+				onClosed:function() {
+					location.href = 'index.php'; 
+				},
+				href:"#smallworld_regform1"
+			});
+			};
+        }); 
 
 	// Function to make friend invitations form into ui dialog
 	 xoops_smallworld(function() {
Modified: XoopsModules/smallworld/trunk/smallworld/register.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/register.php	2012-01-24 17:24:54 UTC (rev 8803)
+++ XoopsModules/smallworld/trunk/smallworld/register.php	2012-01-24 18:03:10 UTC (rev 8804)
@@ -25,7 +25,7 @@
 include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php");
 include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/arrays.php");
 include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php");
-global $xoopsUser,$xoopsTpl;
+global $xoopsUser,$xoopsTpl,$xoTheme;
 
 	if ($xoopsUser) {
 		$id = $xoopsUser->getVar('uid');
@@ -287,6 +287,9 @@
 		 $xoopsTpl->append('smallworld_register_title',_SMALLWORLD_REGRISTATION_TITLE);
 		 $xoopsTpl->assign('smallworld_beforesubmit',_SMALLWORLD_TEXTBEFORESUBMIT);
 		 $xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT);
+		 
+		 $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
+		 $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
 		}
 	} else {
 		redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |