[Movecommons-commits] r232 - in trunk: src wp-theme

Mario Gallegos mgallegos at ourproject.org
Fri Mar 16 01:03:49 CET 2012


Author: mgallegos
Date: 2012-03-16 01:03:49 +0100 (Fri, 16 Mar 2012)
New Revision: 232

Modified:
   trunk/src/mc-dia-form2.js
   trunk/wp-theme/mc2-form.php
Log:


Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js	2012-03-15 23:59:11 UTC (rev 231)
+++ trunk/src/mc-dia-form2.js	2012-03-16 00:03:49 UTC (rev 232)
@@ -1,138 +1,138 @@
-//var $ = jQuery.noConflict();
+var $j = jQuery.noConflict();
 
 // categories selection
 
 function select_cat($id, $id2) {
   var cat_id = "#mc-form-" + $id;
-  $(cat_id + ",#mc-form-icon-" + $id).click(
+  $j(cat_id + ",#mc-form-icon-" + $id).click(
     function ()
     {
       if ($id != "rc") {
-	$(cat_id).addClass("mc-form-descbox-selected");
-	$("#mc-cat-selected-"+ $id).slideDown();
+	$j(cat_id).addClass("mc-form-descbox-selected");
+	$j("#mc-cat-selected-"+ $id).slideDown();
       }
-      $("#mc-form-" + $id2).removeClass("mc-form-descbox-selected");
-      $("#mc-cat-selected-"+ $id2).slideUp();
-      // $("#mc-form-more-link-" + $id2).show('slow');
-      $("#mc-form-less-link-" + $id2).hide();
-      //      $("#mc-form-" + $id).removeAttr("title");
-      //      $("#mc-form-" + $id2).attr("title", click_to_select);
-      $("#mc-form-more-text-" + $id2).slideUp(function() {adjustHeights();});
+      $j("#mc-form-" + $id2).removeClass("mc-form-descbox-selected");
+      $j("#mc-cat-selected-"+ $id2).slideUp();
+      // $j("#mc-form-more-link-" + $id2).show('slow');
+      $j("#mc-form-less-link-" + $id2).hide();
+      //      $j("#mc-form-" + $id).removeAttr("title");
+      //      $j("#mc-form-" + $id2).attr("title", click_to_select);
+      $j("#mc-form-more-text-" + $id2).slideUp(function() {adjustHeights();});
       if (cat_id == "#mc-form-rc") {
-    	  //$("#mc-cat-rc-options").slideDown(function() {adjustHeights();});
+    	  //$j("#mc-cat-rc-options").slideDown(function() {adjustHeights();});
     	  mc_rc="0";
     	  update_logo($id);
       } else if (cat_id == "#mc-form-nrc") {
-    	  //$("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
+    	  //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
     	  reset_areas();
     	  update_logo($id);
       } else if (cat_id == "#mc-form-np") {
-    	  $('div.blockMe1').unblock();    	  	  
+    	  $j('div.blockMe1').unblock();    	  	  
       } else {
     	  update_logo($id);
-    	  //$("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
+    	  //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
       }
     });
 };
 
 function hover_cat($id) {
   var cat_id = "#mc-form-" + $id;
-  $(cat_id + ",#mc-form-icon-" + $id).hover(
+  $j(cat_id + ",#mc-form-icon-" + $id).hover(
     function ()
     {
-      $(cat_id).addClass("mc-form-descbox-high");
-      //if ($('#mc-form-less-link-'+$id).is(':hidden'))
-    	//  $("#mc-form-more-link-"+$id).show();
+      $j(cat_id).addClass("mc-form-descbox-high");
+      //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
+    	//  $j("#mc-form-more-link-"+$id).show();
     }, function () {
-      $(cat_id).removeClass("mc-form-descbox-high");
-      //if ($('#mc-form-less-link-'+$id).is(':hidden'))
-    	 // $("#mc-form-more-link-"+$id).hide();
+      $j(cat_id).removeClass("mc-form-descbox-high");
+      //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
+    	 // $j("#mc-form-more-link-"+$id).hide();
     });
 };
 
 // More links
 
 function click_more_link($id) {
-  $("#mc-form-more-link-" + $id).click(
+  $j("#mc-form-more-link-" + $id).click(
     function (event) {
       event.stopPropagation();
-      $(this).hide();
+      $j(this).hide();
       /*if ($id == "rc") {
-    	  $("#mc-cat-rc-options").slideDown();
+    	  $j("#mc-cat-rc-options").slideDown();
       }*/
-      $("#mc-form-less-link-" + $id).show('slow');
-      $("#mc-form-more-text-" + $id).show('slow',function() {adjustHeights();});
+      $j("#mc-form-less-link-" + $id).show('slow');
+      $j("#mc-form-more-text-" + $id).show('slow',function() {adjustHeights();});
 
     });
 };
 
 function click_less_link($id) {
-  $("#mc-form-less-link-" + $id).click(
+  $j("#mc-form-less-link-" + $id).click(
     function (event) {
       event.stopPropagation();
-      $(this).hide();
+      $j(this).hide();
       /*if ($id == "rc") {
-    	  $("#mc-cat-rc-options").slideUp();
+    	  $j("#mc-cat-rc-options").slideUp();
       }*/
-      $("#mc-form-more-link-" + $id).show('slow');
-      $("#mc-form-more-text-" + $id).slideUp(function() {adjustHeights();});
-      //if ($id == "rc") { $("#mc-cat-rc-options").slideUp(function() {adjustHeights();});}
+      $j("#mc-form-more-link-" + $id).show('slow');
+      $j("#mc-form-more-text-" + $id).slideUp(function() {adjustHeights();});
+      //if ($id == "rc") { $j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});}
     });
 };
 
 function hover_more_link($id) {
-  $("#mc-form-more-link-" + $id).hover(
+  $j("#mc-form-more-link-" + $id).hover(
     function () {
-      $(this).addClass("mc-form-link-high");
+      $j(this).addClass("mc-form-link-high");
     }, function () {
-      $(this).removeClass("mc-form-link-high");
+      $j(this).removeClass("mc-form-link-high");
     });
 };
 
 function hover_less_link($id) {
-  $("#mc-form-less-link-" + $id).hover(
+  $j("#mc-form-less-link-" + $id).hover(
     function () {
-      $(this).addClass("mc-form-link-high");
+      $j(this).addClass("mc-form-link-high");
     }, function () {
-      $(this).removeClass("mc-form-link-high");
+      $j(this).removeClass("mc-form-link-high");
     });
 };
 
 function hide_initial($id) {
-  $("#mc-form-more-link-" + $id).hide();
-  //$("#mc-form-more-text-" + $id).hide();
-  $("#mc-form-less-link-" + $id).hide();
+  $j("#mc-form-more-link-" + $id).hide();
+  //$j("#mc-form-more-text-" + $id).hide();
+  $j("#mc-form-less-link-" + $id).hide();
 };
 
 function dclick_toggle($id) {
-  $("#mc-form-" + $id).dblclick(
+  $j("#mc-form-" + $id).dblclick(
     function () {
       var id_text = "#mc-form-more-text-" + $id;
       var id_link = "#mc-form-more-link-" + $id;
-      if ($(id_text).is(':visible')) { $(id_text).slideUp(); $(id_link).slideDown(); }
-      else { $(id_text).slideDown(); $(id_link).slideUp(); };
+      if ($j(id_text).is(':visible')) { $j(id_text).slideUp(); $j(id_link).slideDown(); }
+      else { $j(id_text).slideDown(); $j(id_link).slideUp(); };
     });};
 
 function reset_areas() {
   mc_rc="0";
-  $("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected");
-  $("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected");
-  $("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected");
-  $("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected");
-  $("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"});
-  $("#mc-cat-selected-rc").slideUp();
+  $j("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected");
+  $j("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected");
+  $j("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected");
+  $j("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected");
+  $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"});
+  $j("#mc-cat-selected-rc").slideUp();
 }
 
 function select_area($id) {
   var cat_id = "#mc-cat-rc-option-box-" + $id;
-  $(cat_id + ",#mc-cat-rc-option-icon-" + $id).click(
+  $j(cat_id + ",#mc-cat-rc-option-icon-" + $id).click(
     function (event) {
       event.stopPropagation();
       reset_areas();
-      $("#mc-form-rc").addClass("mc-form-descbox-selected");
-      $("#mc-cat-selected-rc").slideDown();
-      $(cat_id).addClass("mc-cat-rc-option-box-selected");
-      $("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $id + "60.png"});
+      $j("#mc-form-rc").addClass("mc-form-descbox-selected");
+      $j("#mc-cat-selected-rc").slideDown();
+      $j(cat_id).addClass("mc-cat-rc-option-box-selected");
+      $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $id + "60.png"});
       update_logo($id);
     });
 };
@@ -145,12 +145,12 @@
   var idcat1 = "#mc-form-category-group-" + $id1;
   var idcat2 = "#mc-form-category-group-" + $id2;
   var ids = idcat1 + "," + idcat2;
-  $(ids).each(function(){
-		 $(this).height('auto');
-		 if (maxHeight < $(this).height()) {maxHeight = $(this).height();}
+  $j(ids).each(function(){
+		 $j(this).height('auto');
+		 if (maxHeight < $j(this).height()) {maxHeight = $j(this).height();}
                });
-  if($(idcat1).height() < maxHeight) { $(idcat1).height(maxHeight); };
-  if($(idcat2).height() < maxHeight) { $(idcat2).height(maxHeight); };
+  if($j(idcat1).height() < maxHeight) { $j(idcat1).height(maxHeight); };
+  if($j(idcat2).height() < maxHeight) { $j(idcat2).height(maxHeight); };
 }
 
 function adjustHeights() {
@@ -182,30 +182,30 @@
     icon_url = "/mc/0.1/images/" + mc_category + "-120x90-0.1.png";
   }
   if (icon_url != "") {
-    $("#mc-form-icon-result").attr({src : icon_url});
-    $("#mc-form-icon-result").show('fast');
+    $j("#mc-form-icon-result").attr({src : icon_url});
+    $j("#mc-form-icon-result").show('fast');
   } else {
-    $("#mc-form-icon-result").hide();
+    $j("#mc-form-icon-result").hide();
   }
   checkIfFormReady();
 }
 
 function checkIfFormReady()  {
-  urlIni = $('#url').val();
-  nameIni = $('#ininame').val();
-  keywordsIni = $('#keywords').val();
+  urlIni = $j('#url').val();
+  nameIni = $j('#ininame').val();
+  keywordsIni = $j('#keywords').val();
   if (mc_category != "" && nameIni.length > 0 && urlIni.length > 0) {
-    $("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled");
-    $("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled");
-    $("#mc-dia-continue-btn").effect("highlight", {}, 2000);
+    $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled");
+    $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled");
+    $j("#mc-dia-continue-btn").effect("highlight", {}, 2000);
   } else {
-    $("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
-    $("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-enabled");
+    $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
+    $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-enabled");
   }
 }
 
 function confInputValidation($id) {
-  $($id).bind("change keyup", function(event) {
+  $j($id).bind("change keyup", function(event) {
     checkIfFormReady();
   });
 }
@@ -241,7 +241,7 @@
 };
 
 function conf_click_continue() {
-  $("#mc-dia-continue-btn").click(
+  $j("#mc-dia-continue-btn").click(
     function (event) {
       event.stopPropagation();
       if (mc_category != "" && urlIni.length > 0 && nameIni.length > 0) {
@@ -258,11 +258,11 @@
 
 // http://www.richreuter.com/2008/08/01/UsingJQueryToResizeTextBoxesToMaxLength.aspx
 function max_textsize() {
-  $('input[type=text]').each(function() {
-    var max_length = $(this).attr('maxlength');
+  $j('input[type=text]').each(function() {
+    var max_length = $j(this).attr('maxlength');
     var multiplier = (max_length > 10) ? 7.3 : 8;
     var w = (max_length * multiplier) + "px";
-    $(this).width(w);
+    $j(this).width(w);
 });
 
 }
@@ -271,10 +271,10 @@
 $.fn.labelOver = function(overClass) {
   return this.each(function()
     {
-      var label = $(this);
+      var label = $j(this);
       var f = label.attr('for');
       if (f) {
-	var input = $('#' + f);
+	var input = $j('#' + f);
 
 	this.hide = function() {
 	  label.css({ textIndent: -10000 });
@@ -302,7 +302,7 @@
 var nameIni = "";
 var urlIni = "";
 var keywordsIni = "";
-// var click_to_select = $("#mc-form-gr").attr("title"); // store of title value
+// var click_to_select = $j("#mc-form-gr").attr("title"); // store of title value
 
 conf_link("np");
 conf_link("rp");
@@ -315,12 +315,12 @@
 confInputValidation("#url");
 confInputValidation("#ininame");
 
-$("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
-//$("#mc-cat-rc-options").hide(function() {adjustHeights();});
-$("#mc-form-icon-result").hide();
+$j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
+//$j("#mc-cat-rc-options").hide(function() {adjustHeights();});
+$j("#mc-form-icon-result").hide();
 conf_click_continue();
-$('#label1').labelOver('over-apply');
+$j('#label1').labelOver('over-apply');
 // max_textsize();
-$(window).load(function () { doadjustwithsleep(0); });
+$j(window).load(function () { doadjustwithsleep(0); });
 
 

Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php	2012-03-15 23:59:11 UTC (rev 231)
+++ trunk/wp-theme/mc2-form.php	2012-03-16 00:03:49 UTC (rev 232)
@@ -262,14 +262,14 @@
 <script type="text/javascript" src="/mc/0.1/mc-dia-form2.js"></script>
 
 <script type="text/javascript">
-	$('#languages').tagsInput({width:'415px',defaultText:'Add a language'});
-	$('#keywords').tagsInput({width:'415px',defaultText:'Add a keyword'});
-	$('#infield-donation-website').inFieldLabels();
-	$('#infield-non-profit-website').inFieldLabels();
-	$('#infield-open-accounting-website').inFieldLabels();
-	$('#infield-creative-commons-website').inFieldLabels();
-	$('#infield-other-license-website').inFieldLabels();
-	$('div.blockMe1').block({ message: null });
+	$j('#languages').tagsInput({width:'415px',defaultText:'Add a language'});
+	$j('#keywords').tagsInput({width:'415px',defaultText:'Add a keyword'});
+	$j('#infield-donation-website').inFieldLabels();
+	$j('#infield-non-profit-website').inFieldLabels();
+	$j('#infield-open-accounting-website').inFieldLabels();
+	$j('#infield-creative-commons-website').inFieldLabels();
+	$j('#infield-other-license-website').inFieldLabels();
+	$j('div.blockMe1').block({ message: null });
 		
 	//$( "#format" ).buttonset();	
 </script>
\ No newline at end of file




More information about the Movecommons-commits mailing list