From: <dj...@us...> - 2012-01-14 17:56:40
|
Revision: 8723 http://xoops.svn.sourceforge.net/xoops/?rev=8723&view=rev Author: djculex Date: 2012-01-14 17:56:33 +0000 (Sat, 14 Jan 2012) Log Message: ----------- replaced jquery renaming with original $ to avoid error Modified Paths: -------------- XoopsModules/xim/trunk/modules/xim/js/adminddselector.js XoopsModules/xim/trunk/modules/xim/js/jquery.form.js XoopsModules/xim/trunk/modules/xim/js/xim_tabs.js Modified: XoopsModules/xim/trunk/modules/xim/js/adminddselector.js =================================================================== --- XoopsModules/xim/trunk/modules/xim/js/adminddselector.js 2012-01-14 14:58:48 UTC (rev 8722) +++ XoopsModules/xim/trunk/modules/xim/js/adminddselector.js 2012-01-14 17:56:33 UTC (rev 8723) @@ -24,12 +24,12 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // -xoops_imAdmin(function() { -xoops_imAdmin(".ximAdminLogs_update_button").click(function() +$(function() { +$(".ximAdminLogs_update_button").click(function() { -var AdminDDoptions = xoops_imAdmin("#AdminDDoptions").val(); +var AdminDDoptions = $("#AdminDDoptions").val(); -dataString = xoops_imAdmin("#ximAdminLogMaintnance").serialize(); +dataString = $("#ximAdminLogMaintnance").serialize(); //var dataString = 'AdminDDoptions='+ AdminDDoptions; if(AdminDDoptions=='') { @@ -37,16 +37,16 @@ } else { -xoops_imAdmin("#flash").show(); -xoops_imAdmin("#flash").fadeIn(800).html('<img src="../images/ajaxloader.gif" alt=""/>Saved!'); -xoops_imAdmin.ajax({ +$("#flash").show(); +$("#flash").fadeIn(800).html('<img src="../images/ajaxloader.gif" alt=""/>Saved!'); +$.ajax({ type: "POST", url: "do_logmaintnance.php", data: dataString, cache: false, success: function(html){ dataStrint = ''; -xoops_imAdmin("#flash").hide(2000); +$("#flash").hide(2000); } }); }return false; Modified: XoopsModules/xim/trunk/modules/xim/js/jquery.form.js =================================================================== --- XoopsModules/xim/trunk/modules/xim/js/jquery.form.js 2012-01-14 14:58:48 UTC (rev 8722) +++ XoopsModules/xim/trunk/modules/xim/js/jquery.form.js 2012-01-14 17:56:33 UTC (rev 8723) @@ -21,18 +21,18 @@ * @author Culex - homepage.: http://culex.dk & email.: cu...@cu... */ -xoops_imAdmin(document).ready(function(){ +$(document).ready(function(){ - xoops_imAdmin('#xim_admin_message').val(""); - xoops_imAdmin("#xim_admin_message").keyup(function() { + $('#xim_admin_message').val(""); + $("#xim_admin_message").keyup(function() { limitChars(300); }); - xoops_imAdmin(".xim_admin_button").click(function() { - if(xoops_imAdmin('#xim_admin_message').val()==''){ - xoops_imAdmin('#xim_admin_error').html("Message cannot be empty").addClass('xim_admin_error').hide().fadeIn("slow"); + $(".xim_admin_button").click(function() { + if($('#xim_admin_message').val()==''){ + $('#xim_admin_error').html("Message cannot be empty").addClass('xim_admin_error').hide().fadeIn("slow"); setTimeout(function() { - xoops_imAdmin('#xim_admin_error').html("<br>").hide().fadeIn("fast"); + $('#xim_admin_error').html("<br>").hide().fadeIn("fast"); }, 2000); return false; } else { @@ -40,27 +40,27 @@ } }); - if(xoops_imAdmin('#xim_admin_message').val().length>300){ - xoops_imAdmin('#xim_admin_error').html("Message must not exceed 300 characters.").addClass('xim_admin_error').hide().fadeIn("slow"); + if($('#xim_admin_message').val().length>300){ + $('#xim_admin_error').html("Message must not exceed 300 characters.").addClass('xim_admin_error').hide().fadeIn("slow"); setTimeout(function() { - xoops_imAdmin('#xim_admin_error').html("<br>").hide().fadeIn("fast"); + $('#xim_admin_error').html("<br>").hide().fadeIn("fast"); }, 2000); return false; }; if(postData()){ - xoops_imAdmin('#xim_admin_error').html("Processing.....").removeClass('xim_admin_error').hide().fadeIn("slow"); - xoops_imAdmin.timer(10000,function(){ - xoops_imAdmin('#xim_admin_error').html("Message inserted!").addClass('success').hide().fadeIn("slow"); + $('#xim_admin_error').html("Processing.....").removeClass('xim_admin_error').hide().fadeIn("slow"); + $.timer(10000,function(){ + $('#xim_admin_error').html("Message inserted!").addClass('success').hide().fadeIn("slow"); setTimeout(function() { - xoops_imAdmin('#xim_admin_count').html('0'); - xoops_imAdmin('#xim_admin_error').html("<br>").hide().fadeIn("fast"); + $('#xim_admin_count').html('0'); + $('#xim_admin_error').html("<br>").hide().fadeIn("fast"); }, 2000); - xoops_imAdmin('#xim_admin_message').val(""); + $('#xim_admin_message').val(""); }); }else{ - //xoops_imAdmin('#xim_admin_error').html("Database Error.").fadeIn("slow"); + //$('#xim_admin_error').html("Database Error.").fadeIn("slow"); return false; } return false; @@ -69,17 +69,17 @@ function limitChars(limit){ - var text = xoops_imAdmin('#xim_admin_message').val(); + var text = $('#xim_admin_message').val(); var textlength = text.length; - xoops_imAdmin('#xim_admin_count').html(textlength); - //xoops_imAdmin('#xim_admin_error').hide(); + $('#xim_admin_count').html(textlength); + //$('#xim_admin_error').hide(); if(textlength > limit){ - xoops_imAdmin('#xim_admin_error').html("Message must not exceed 300 characters.").addClass('xim_admin_error').hide().fadeIn("slow"); + $('#xim_admin_error').html("Message must not exceed 300 characters.").addClass('xim_admin_error').hide().fadeIn("slow"); setTimeout(function() { - xoops_imAdmin('#xim_admin_error').html("<br>").hide().fadeIn("fast"); + $('#xim_admin_error').html("<br>").hide().fadeIn("fast"); }, 2000); return false; } else{ @@ -88,12 +88,12 @@ } function postData(){ - var xim_admin_message = xoops_imAdmin('#xim_admin_message').val(); + var xim_admin_message = $('#xim_admin_message').val(); var dataString = 'xim_admin_message=' + xim_admin_message; if (xim_admin_message === '') { return false; } - xoops_imAdmin.ajax({ + $.ajax({ type: "POST", url: "../admin/adminsend.php", data: dataString, @@ -102,11 +102,11 @@ return false; }, success: function() { - xoops_imAdmin('#xim_admin_error').html("Message inserted!").addClass('success').hide().fadeIn("slow"); + $('#xim_admin_error').html("Message inserted!").addClass('success').hide().fadeIn("slow"); setTimeout(function() { - xoops_imAdmin('#xim_admin_message').val(""); - xoops_imAdmin('#xim_admin_count').html('0'); - xoops_imAdmin('#xim_admin_error').html("<br>").hide().fadeIn("fast"); + $('#xim_admin_message').val(""); + $('#xim_admin_count').html('0'); + $('#xim_admin_error').html("<br>").hide().fadeIn("fast"); }, 2000); } @@ -122,13 +122,13 @@ * @copyright 2009 Evan Byrne (http://www.evanbot.com) */ -xoops_imAdmin.timer = function(time,func,callback){ +$.timer = function(time,func,callback){ var a = {timer:setTimeout(func,time),callback:null} if(typeof(callback) == 'function'){a.callback = callback;} return a; }; -xoops_imAdmin.clearTimer = function(a){ +$.clearTimer = function(a){ clearTimeout(a.timer); if(typeof(a.callback) == 'function'){a.callback();}; return this; Modified: XoopsModules/xim/trunk/modules/xim/js/xim_tabs.js =================================================================== --- XoopsModules/xim/trunk/modules/xim/js/xim_tabs.js 2012-01-14 14:58:48 UTC (rev 8722) +++ XoopsModules/xim/trunk/modules/xim/js/xim_tabs.js 2012-01-14 17:56:33 UTC (rev 8723) @@ -21,24 +21,24 @@ * @author Culex - homepage.: http://culex.dk & email.: cu...@cu... */ -var xoops_imAdmin = jQuery.noConflict(); +var $ = jQuery.noConflict(); -xoops_imAdmin(document).ready(function() { +$(document).ready(function() { //When page loads... - xoops_imAdmin(".ximadmin_tab_content").hide(); //Hide all content - xoops_imAdmin("ul.ximadmin_tabs li:first").addClass("active").show(); //Activate first tab - xoops_imAdmin(".ximadmin_tab_content:first").show(); //Show first tab content + $(".ximadmin_tab_content").hide(); //Hide all content + $("ul.ximadmin_tabs li:first").addClass("active").show(); //Activate first tab + $(".ximadmin_tab_content:first").show(); //Show first tab content //On Click Event - xoops_imAdmin("ul.ximadmin_tabs li").click(function() { + $("ul.ximadmin_tabs li").click(function() { - xoops_imAdmin("ul.ximadmin_tabs li").removeClass("active"); //Remove any "active" class - xoops_imAdmin(this).addClass("active"); //Add "active" class to selected tab - xoops_imAdmin(".ximadmin_tab_content").hide(); //Hide all tab content + $("ul.ximadmin_tabs li").removeClass("active"); //Remove any "active" class + $(this).addClass("active"); //Add "active" class to selected tab + $(".ximadmin_tab_content").hide(); //Hide all tab content - var activeTab = xoops_imAdmin(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content - xoops_imAdmin(activeTab).fadeIn(); //Fade in the active ID content + var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content + $(activeTab).fadeIn(); //Fade in the active ID content return false; }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |