From: <dj...@us...> - 2012-01-25 14:33:43
|
Revision: 8809 http://xoops.svn.sourceforge.net/xoops/?rev=8809&view=rev Author: djculex Date: 2012-01-25 14:33:36 +0000 (Wed, 25 Jan 2012) Log Message: ----------- - Implimenting colorbox instead of jquery dialog(); - Correction in stats() function to show correct user avatar - Css adjustments - Re-attach validate to colorbox forms Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/editimages.php XoopsModules/smallworld/trunk/smallworld/galleryshow.php XoopsModules/smallworld/trunk/smallworld/img_upload.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -20,7 +20,7 @@ **/ -require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +//require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; include_once dirname(__FILE__) . '/admin_header.php'; xoops_cp_header(); Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-25 14:33:36 UTC (rev 8809) @@ -330,6 +330,11 @@ left:20px } +#_smallworld_birthplace_map,#_smallworld_present_map { +height:550px; +width:550px; +} + /*-------- Register items ---------*/ #smallworld_divstepy-error { @@ -554,9 +559,10 @@ } .smallworld_edit_desc { + overflow:scroll; margin: 0 10px 0 15%; - width: 250px; - height:50px; + width:400px; + height:400px; } .smallworld_editTextSpan { @@ -941,6 +947,9 @@ margin: 5px; } +div#smallworldStatsDiv { +overflow:hidden; +} #smallworld_Stats_title { bottom: 10px; color: red; Modified: XoopsModules/smallworld/trunk/smallworld/editimages.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editimages.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/editimages.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -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) { $userID = $xoopsUser->getVar('uid'); @@ -51,6 +51,8 @@ $i++; } $xoopsTpl->append('editimages',$editimages); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header("index.php", 1); } Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -34,6 +34,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.opacityrollover.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/gallery_mod.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); $id = $xoopsUser->getVar('uid'); $check = new SmallWorldUser; Modified: XoopsModules/smallworld/trunk/smallworld/img_upload.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/img_upload.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/img_upload.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -33,6 +33,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/upload_application.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); $id = $xoopsUser->getVar('uid'); $check = new SmallWorldUser; $profile = $check->CheckIfProfile($id); Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -452,7 +452,7 @@ $nu[$i]['username_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$r['username']."'>"; $nu[$i]['username_link'] .= $r['username']." (".$r['realname'].") [".$nu[$i]['regdate']."] </a>"; $nu[$i]['userimage'] = $r['userimage']; - $nu[$i]['userimage_link'] = smallworld_getAvatarLink ($r['userid'], $r['userimage']); + $nu[$i]['userimage_link'] = smallworld_getAvatarLink ($r['userid'], Gravatar($r['userid'])); $i++; } Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -136,6 +136,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $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); } Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-25 14:33:36 UTC (rev 8809) @@ -14,53 +14,24 @@ xoops_smallworld(function() { // GET pop for statistics xoops_smallworld('#smallworld_statistics_lnk').live('click',function() { - xoops_smallworld("#smallworldStatsDiv").load('stats.php').dialog({ - show: "blind", - minHeight: "120px", - hide: "explode", - width: "950px", - close: function(event, ui) { - xoops_smallworld("#smallworldStatsDiv").hide(); - xoops_smallworld("#smallworldStatsDiv").empty(); - } - }); - xoops_smallworld("#smallworldStatsDiv").show(); - xoops_smallworld('#smallworldStatsDiv').find(".ui-dialog-titlebar").hide(); - xoops_smallworld('#smallworldStatsDiv').css('overflow','visible'); - - return false; + if (xoops_smallworld('#smallworld_statistics_lnk').length) { // implies *not* zero + xoops_smallworld('#smallworldStatsDiv').show(); + xoops_smallworld("#smallworldStatsDiv").load('stats.php'); + xoops_smallworld.fn.colorbox({ + width:"75%", + height:"18%", + inline:true, + onCleanup:function() { + xoops_smallworld('#smallworldStatsDiv').hide(); + }, + onClosed:function() { + xoops_smallworld('#smallworldStatsDiv').hide(); + }, + href:"#smallworldStatsDiv" + }); + }; }); - - // GET pop for about - xoops_smallworld('#smallworld_information_lnk').live('click',function() { - xoops_smallworld("#smallworldStatsDiv").load('about.php').dialog({ - show: "blind", - minHeight: "120px", - hide: "explode", - width: "950px", - close: function(event, ui) { - xoops_smallworld("#smallworldStatsDiv").hide(); - xoops_smallworld("#smallworldStatsDiv").empty(); - } - }); - xoops_smallworld("#smallworldStatsDiv").show(); - xoops_smallworld('#smallworldStatsDiv').find(".ui-dialog-titlebar").hide(); - xoops_smallworld('#smallworldStatsDiv').css('overflow','visible'); - return false; - }); - - // Function to make registration form into ui dialog - xoops_smallworld('#smallworld_regform1').dialog({ - minWidth: 800, - show: "blind", - hide: "explode", - width: "750px", - close: function(event, ui) { - 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(){ @@ -70,6 +41,9 @@ width:"auto", height:"70%", inline:true, + onComplete: function() { + smallworld_DoValStart (); + }, onCleanup:function() { xoops_smallworld('#smallworld_regform1').hide(); }, @@ -83,49 +57,83 @@ // Function to make friend invitations form into ui dialog xoops_smallworld(function() { - if (hasmessages > 0) { - xoops_smallworld('#friendInvitations_box').dialog({ - minWidth: 500, - show: "blind", - hide: "explode", - width: "500px" - }); + if (hasmessages > 0) { + if (xoops_smallworld('#friendInvitations_box').length) { // implies *not* zero + xoops_smallworld('#friendInvitations_box').show(); + xoops_smallworld.fn.colorbox({ + width:"50%", + inline:true, + onCleanup:function() { + xoops_smallworld('#friendInvitations_box').hide(); + }, + href:"#friendInvitations_box" + }); + }; xoops_smallworld('#smallworldrequestlink').live('click',function() { - xoops_smallworld('#friendInvitations_box').dialog( "close" ); + //xoops_smallworld('#friendInvitations_box').dialog( "close" ); + xoops_smallworld.colorbox.close(); }); } }); // Function to make Edit image descriptions form into ui dialog - xoops_smallworld('#smallworld_edit_imageform').dialog({ - minWidth: 800, - show: "blind", - height: 300, - hide: "explode", - width: "600px", - close: function(event, ui) { location.href = 'index.php'; } - }); + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('#smallworld_edit_imageform').length) { // implies *not* zero + xoops_smallworld('#smallworld_edit_imageform').show(); + xoops_smallworld.fn.colorbox({ + width:"800", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#smallworld_edit_imageform').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"#smallworld_edit_imageform" + }); + }; + }); // Function to make File upload form into ui dialog - xoops_smallworld('#file_upload').dialog({ - minWidth: 900, - height: 300, - show: "blind", - hide: "explode", - width: "950px", - close: function(event, ui) { location.href = 'editimages.php'; } - }); + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('#file_upload').length) { // implies *not* zero + xoops_smallworld('#file_upload').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#file_upload').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"#file_upload", + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + } + }); + }; + }); // Function to make Div with id page into ui dialog - xoops_smallworld('div#page').dialog({ - minWidth: "900px", - show: "blind", - hide: "explode", - width: "980px", - close: function(event, ui) { - location.href = 'index.php'; - } - }); + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('div#page').length) { // implies *not* zero + xoops_smallworld('div#page').show(); + xoops_smallworld.fn.colorbox({ + innerWidth:"1000px", + inline:true, + onCleanup:function() { + xoops_smallworld('div#page').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"div#page" + }); + }; + }); // If user does not have a profile in smallworld then goto register. // If user has already a profile then goto edit profile dialog @@ -189,111 +197,7 @@ titleClick: false }); }); - - xoops_smallworld(function() { - // Attact validation to registeration parts in register form - if (smallworldvalidationstrenght != 0) { - xoops_smallworld("#smallworld_profileform-next-0").hide(); - xoops_smallworld("#smallworld_profileform-next-1").hide(); - - if(xoops_smallworld.inArray('realname',smallworlduseverification) > -1) { - xoops_smallworld("input#realname").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationNameErrorMsg, - }); - } - - if(xoops_smallworld.inArray('gender',smallworlduseverification) > -1) { - xoops_smallworld("select#gender").validate({ - expression: "if (VAL != 0) return true; else return false;", - message: SmallworldValidationGenderErrorMsg - }); - } - - if(xoops_smallworld.inArray('interestedin',smallworlduseverification) > -1) { - xoops_smallworld("#intingender").validate({ - expression: "if (isChecked(SelfID)) return true; else return false;", - message: SmallworldValidationIntingenderErrorMsg - }); - - } - - if(xoops_smallworld.inArray('lookingfor',smallworlduseverification) > -1) { - xoops_smallworld("#searchrelat").validate({ - expression: "if (isChecked(SelfID)) return true; else return false;", - message: SmallworldValidationSearchrelatErrorMsg - }); - } - - if(xoops_smallworld.inArray('emails',smallworlduseverification) > -1) { - xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ - var id = xoops_smallworld(this).attr('id'); - xoops_smallworld("#"+id).validate({ - expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", - message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" - }); - }); - } - - if(xoops_smallworld.inArray('birthday',smallworlduseverification) > -1) { - xoops_smallworld("input[name='birthday']").validate({ - expression: "if (!isValidDate(parseInt(VAL.split('-')[2],10), parseInt(VAL.split('-')[1],10), parseInt(VAL.split('-')[0],10))) return false; else return true;", - message: SmallworldValidationBirthdayErrorMsg - }); - } - - if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { - xoops_smallworld("#birthplace").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationBirthplaceErrorMsg - }); - } - if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { - xoops_smallworld("input#adress").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationAdressErrorMsg - }); - } - - if(xoops_smallworld.inArray('presentcity',smallworlduseverification) > -1) { - xoops_smallworld("input#present_city").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationCityErrorMsg - }); - } - - if(xoops_smallworld.inArray('country',smallworlduseverification) > -1) { - xoops_smallworld("input#present_country").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationCountryErrorMsg - }); - } - - - if(xoops_smallworld.inArray('website',smallworlduseverification) > -1) { - xoops_smallworld("textarea#website").validate({ - expression: "if (urlCheck(VAL)) return true; else return false;", - message: SmallworldValidationWebsiteErrorMsg - }); - } - - - // Activation of validations to be filled on initial load - xoops_smallworld('fieldset:visible').find('input,select,textarea').each(function() { - xoops_smallworld(this).blur(); - }); - - } - - if (smallworlduseverification.length !=0) { - xoops_smallworld('#smallworld_profileform-next-0').show(); - xoops_smallworld('#smallworld_profileform-next-1').show(); - } - }); - - - // Attach geolocate autocomplete to forms if (geoL === 1) { xoops_smallworld('#birthplace').geo_autocomplete(); @@ -304,7 +208,7 @@ // Make Textareas elastic xoops_smallworld(function() { - xoops_smallworld('.favourites, .smallworld_edit_desc, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); + xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); }); @@ -476,77 +380,132 @@ image = "<img src ='"+url+"' />"; xoops_smallworld('<div id="lookingglassuseravatar">'+image+'</div>').appendTo('body'); event.preventDefault(); - xoops_smallworld("div#lookingglassuseravatar").dialog({ - width: 'auto', - modal: true, - open: function(event, ui) { - xoops_smallworld('.ui-dialog-titlebar').hide(); - }, - buttons: [{text: "X", click: function() { xoops_smallworld(this).dialog("close"); }}], - close: function(event, ui) { - xoops_smallworld("#lookingglassuseravatar").remove(); - } - }); + if (xoops_smallworld('#lookingglassuseravatar').length) { // implies *not* zero + xoops_smallworld('#lookingglassuseravatar').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#lookingglassuseravatar').hide(); + }, + onClosed:function() { + xoops_smallworld("#lookingglassuseravatar").remove(); + }, + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + }, + href:"#lookingglassuseravatar" + }); + }; }); //close click }); // Attach on clik open education & work (..more) dialogues - xoops_smallworld('#_smallworld_workmore').live('click',function(){ - xoops_smallworld('#workfull').dialog({ - minWidth: 400, - show: "blind", - height: 300, - hide: "explode", - width: "450px" - }); - }); + xoops_smallworld('#_smallworld_workmore').live('click',function(){ + if (xoops_smallworld('#workfull').length) { // implies *not* zero + xoops_smallworld('#workfull').show(); + xoops_smallworld.fn.colorbox({ + width:"450", + height:"300", + inline:true, + onCleanup:function() { + xoops_smallworld('#workfull').hide(); + }, + onClosed:function() { + }, + href:"#workfull" + }); + }; + }); // Show educations in dialog when clicked on more xoops_smallworld('#_smallworld_educationmore').live('click',function(){ - xoops_smallworld('#educationfull').dialog({ - minWidth: 400, - show: "blind", - height: 300, - hide: "explode", - width: "450px" - }); + if (xoops_smallworld('#educationfull').length) { // implies *not* zero + xoops_smallworld('#educationfull').show(); + xoops_smallworld.fn.colorbox({ + width:"450", + height:"300", + inline:true, + onCleanup:function() { + xoops_smallworld('#educationfull').hide(); + }, + onClosed:function() { + }, + href:"#educationfull" + }); + }; }); // Show more info in dialog xoops_smallworld('#_SMALLWORLD_MOREINFO').live('click',function(){ - xoops_smallworld('#interestsandmore').dialog({ - minWidth: 300, - show: "blind", - height: 300, - hide: "explode", - width: "600px" - }); + if (xoops_smallworld('#interestsandmore').length) { // implies *not* zero + xoops_smallworld('#interestsandmore').show(); + xoops_smallworld.fn.colorbox({ + width:"600", + height:"300", + inline:true, + onCleanup:function() { + xoops_smallworld('#interestsandmore').hide(); + }, + onClosed:function() { + }, + href:"#interestsandmore" + }); + }; }); - // Display birthplace in a map dialog - xoops_smallworld('#_smallworld_birthplace_maplink').live('click',function(){ - xoops_smallworld('#_smallworld_birthplace_map').dialog({ - minWidth: 550, - show: "blind", - height: 550, - hide: "explode", - width: "550px" - }); - initialize_birthplace(smallworld_birthlng,smallworld_birthlatt); - }); + //Function to show images in birthplace input + xoops_smallworld('#_smallworld_birthplace_maplink').live('click',function(){ + if (xoops_smallworld('#_smallworld_birthplace_map').length) { // implies *not* zero + xoops_smallworld('#_smallworld_birthplace_map').show(); + xoops_smallworld.fn.colorbox({ + innerWidth:"550px", + innerHeight:"550px", + inline:true, + onCleanup:function() { + xoops_smallworld('#_smallworld_birthplace_map').hide(); + }, + onComplete:function() { + initialize_birthplace(smallworld_birthlng,smallworld_birthlatt); + xoops_smallworld('#_smallworld_birthplace_map').show(); + }, + title: function() { + var title = xoops_smallworld("#_smallworld_birthplace_map").attr( 'title' ); + return title != 'undefined' ? title : false; + }, + href:"#_smallworld_birthplace_map", + }); + + }; + }); - // Display Present location in a map dialog + //Function to show images in present location input xoops_smallworld('#_smallworld_present_maplink').live('click',function(){ - xoops_smallworld('#_smallworld_present_map').dialog({ - minWidth: 550, - show: "blind", - height: 550, - hide: "explode", - width: "550px" - }); - initialize_currplace(smallworld_currlng,smallworld_currlatt); - }); - + if (xoops_smallworld('#_smallworld_present_map').length) { // implies *not* zero + xoops_smallworld('#_smallworld_present_map').show(); + xoops_smallworld.fn.colorbox({ + innerWidth:"550px", + innerHeight:"550px", + inline:true, + onCleanup:function() { + xoops_smallworld('#_smallworld_present_map').hide(); + }, + onComplete:function(){ + initialize_currplace(smallworld_currlng,smallworld_currlatt); + xoops_smallworld('#_smallworld_present_map').show(); + }, + title: function() { + var title = xoops_smallworld("#_smallworld_present_map").attr( 'title' ); + return title != 'undefined' ? title : false; + }, + href:"#_smallworld_present_map" + }); + }; + + }); + + // Function to rewrite urls used in xoops core for directing to profile.php // Sets var uname = link text() // removes /userinfo.php?uid=# @@ -570,7 +529,7 @@ containerheight: '50px' }); - + // Return jSon with count of friends smallworld_getCountFriendMessagesEtcJS(); // Sharing bookmarks defines @@ -609,6 +568,7 @@ // Init birthplace_map function initialize_birthplace(smallworld_birthlng,smallworld_birthlatt) { + var birth_myLatlng = new google.maps.LatLng(smallworld_birthlatt, smallworld_birthlng); var birth_myOptions = { zoom: 8, @@ -767,3 +727,106 @@ }); setTimeout('smallworld_getCountFriendMessagesEtcJS()',10000); }; + +function smallworld_DoValStart () { + // Attact validation to registeration parts in register form + if (smallworldvalidationstrenght != 0) { + xoops_smallworld("#smallworld_profileform-next-0").hide(); + xoops_smallworld("#smallworld_profileform-next-1").hide(); + + if(xoops_smallworld.inArray('realname',smallworlduseverification) > -1) { + + xoops_smallworld("input#realname").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationNameErrorMsg, + }); + } + + if(xoops_smallworld.inArray('gender',smallworlduseverification) > -1) { + xoops_smallworld("select#gender").validate({ + expression: "if (VAL != 0) return true; else return false;", + message: SmallworldValidationGenderErrorMsg + }); + } + + if(xoops_smallworld.inArray('interestedin',smallworlduseverification) > -1) { + xoops_smallworld("#intingender").validate({ + expression: "if (isChecked(SelfID)) return true; else return false;", + message: SmallworldValidationIntingenderErrorMsg + }); + + } + + if(xoops_smallworld.inArray('lookingfor',smallworlduseverification) > -1) { + xoops_smallworld("#searchrelat").validate({ + expression: "if (isChecked(SelfID)) return true; else return false;", + message: SmallworldValidationSearchrelatErrorMsg + }); + } + + if(xoops_smallworld.inArray('emails',smallworlduseverification) > -1) { + xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ + var id = xoops_smallworld(this).attr('id'); + xoops_smallworld("#"+id).validate({ + expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", + message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" + }); + }); + } + + if(xoops_smallworld.inArray('birthday',smallworlduseverification) > -1) { + xoops_smallworld("input[name='birthday']").validate({ + expression: "if (!isValidDate(parseInt(VAL.split('-')[2],10), parseInt(VAL.split('-')[1],10), parseInt(VAL.split('-')[0],10))) return false; else return true;", + message: SmallworldValidationBirthdayErrorMsg + }); + } + + if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { + xoops_smallworld("#birthplace").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationBirthplaceErrorMsg + }); + } + + if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { + xoops_smallworld("input#adress").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationAdressErrorMsg + }); + } + + if(xoops_smallworld.inArray('presentcity',smallworlduseverification) > -1) { + xoops_smallworld("input#present_city").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationCityErrorMsg + }); + } + + if(xoops_smallworld.inArray('country',smallworlduseverification) > -1) { + xoops_smallworld("input#present_country").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationCountryErrorMsg + }); + } + + + if(xoops_smallworld.inArray('website',smallworlduseverification) > -1) { + xoops_smallworld("textarea#website").validate({ + expression: "if (urlCheck(VAL)) return true; else return false;", + message: SmallworldValidationWebsiteErrorMsg + }); + } + + + // Activation of validations to be filled on initial load + xoops_smallworld('fieldset:visible').find('input,select,textarea').each(function() { + xoops_smallworld(this).blur(); + }); + + } + + if (smallworlduseverification.length !=0) { + xoops_smallworld('#smallworld_profileform-next-0').show(); + xoops_smallworld('#smallworld_profileform-next-1').show(); + } +} \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js 2012-01-25 14:33:36 UTC (rev 8809) @@ -6,6 +6,7 @@ var _smallworldContinueToReg = "Continue to registration"; var _smallworldCancel = "Cancel"; +var _smallworldClose = "close"; var SmallworldGenderError = "Please choose your gender"; var SmallworldBirthdayError = "Please choose your birthday"; Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -243,7 +243,7 @@ define('_SMALLWORLD_UPLOADDESC','Image description'); define('_SMALLWORLD_UPLOAD_TITLE','Upload images to your image album'); define('_SMALLWORLD_UPLOADTEXT','Start upload'); -define('_SMALLWORLD_UPLOADFILESTEXT','Upload image(s)'); +define('_SMALLWORLD_UPLOADFILESTEXT','Select image(s)'); define('_SMALLWORLD_IMGDESCRIPTION','Image description'); define('_SMALLWORLD_IMGTITLE','Image title'); define('_SMALLWORLD_IMAGE_EDIT_TITLE','Edit descriptions where neded at send'); Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -218,6 +218,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js'); } else { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js'); + $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. |