Author: mgallegos Date: 2012-05-20 03:36:01 +0200 (Sun, 20 May 2012) New Revision: 410 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-05-20 01:30:12 UTC (rev 409) +++ trunk/src/mc-dia-form2.js 2012-05-20 01:36:01 UTC (rev 410) @@ -1,251 +1,251 @@ -var $jj = jQuery.noConflict(); +var $j = jQuery.noConflict(); // categories selection function clickCheckBox(id){ - if($jj('#'+id+'-checkbox').val()=='N'){ - $j('#'+id+'-checkbox').val('S'); - $jj("#mc-form-" + id).addClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-"+ id).slideDown(); + if($j('#'+id+'-checkbox').val()=='N'){ + $('#'+id+'-checkbox').val('S'); + $j("#mc-form-" + id).addClass("mc-form-descbox-selected"); + $j("#mc-cat-selected-"+ id).slideDown(); if(id=='np'){ - $j("#registered-non-profit").removeAttr("disabled"); - $j("#open-accounting").removeAttr("disabled"); - $j("#accept-donations").removeAttr("disabled"); + $("#registered-non-profit").removeAttr("disabled"); + $("#open-accounting").removeAttr("disabled"); + $("#accept-donations").removeAttr("disabled"); } if(id=='rp'){ - $j("#terms-of-use").removeAttr("disabled"); - $j("#creative-commons").removeAttr("disabled"); - $j("#other-license").removeAttr("disabled"); - $j("#organization-structure").removeAttr("disabled"); - $j("#projects-and-results").removeAttr("disabled"); - $j("#methods-procedures").removeAttr("disabled"); - $j("#documentation").removeAttr("disabled"); + $("#terms-of-use").removeAttr("disabled"); + $("#creative-commons").removeAttr("disabled"); + $("#other-license").removeAttr("disabled"); + $("#organization-structure").removeAttr("disabled"); + $("#projects-and-results").removeAttr("disabled"); + $("#methods-procedures").removeAttr("disabled"); + $("#documentation").removeAttr("disabled"); } if(id=='gr'){ - $j("#decisions-general-assemblies").removeAttr("disabled"); - $j("#decisions-consensus").removeAttr("disabled"); - $j("#representatives-democratically").removeAttr("disabled"); - $j("#meetings-transparent").removeAttr("disabled"); - $j("#decisions-voting").removeAttr("disabled"); + $("#decisions-general-assemblies").removeAttr("disabled"); + $("#decisions-consensus").removeAttr("disabled"); + $("#representatives-democratically").removeAttr("disabled"); + $("#meetings-transparent").removeAttr("disabled"); + $("#decisions-voting").removeAttr("disabled"); } } else{ - $j('#'+id+'-checkbox').val('N'); - $jj("#mc-form-" + id).removeClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-"+ id).slideUp(); + $('#'+id+'-checkbox').val('N'); + $j("#mc-form-" + id).removeClass("mc-form-descbox-selected"); + $j("#mc-cat-selected-"+ id).slideUp(); if(id=='np'){ - $j("#registered-non-profit").attr("disabled", "disabled"); - $j('#registered-non-profit').attr('checked', false); - $j("#open-accounting").attr("disabled", "disabled"); - $j('#open-accounting').attr('checked', false); - $j("#accept-donations").attr("disabled", "disabled"); - $j('#accept-donations').attr('checked', false); - $jj('#non-profit-website').hide(); - $jj('#infield-non-profit-website').hide(); - $jj('#open-accounting-website').hide(); - $jj('#infield-open-accounting-website').hide(); - $jj('#donation-website').hide(); - $jj('#infield-donation-website').hide(); + $("#registered-non-profit").attr("disabled", "disabled"); + $('#registered-non-profit').attr('checked', false); + $("#open-accounting").attr("disabled", "disabled"); + $('#open-accounting').attr('checked', false); + $("#accept-donations").attr("disabled", "disabled"); + $('#accept-donations').attr('checked', false); + $j('#non-profit-website').hide(); + $j('#infield-non-profit-website').hide(); + $j('#open-accounting-website').hide(); + $j('#infield-open-accounting-website').hide(); + $j('#donation-website').hide(); + $j('#infield-donation-website').hide(); } if(id=='rp'){ - $j("#terms-of-use").attr("disabled", "disabled"); - $j('#terms-of-use').attr('checked', false); - $j("#creative-commons").attr("disabled", "disabled"); - $j('#creative-commons').attr('checked', false); - $j("#other-license").attr("disabled", "disabled"); - $j('#other-license').attr('checked', false); - $j("#organization-structure").attr("disabled", "disabled"); - $j('#organization-structure').attr('checked', false); - $j("#projects-and-results").attr("disabled", "disabled"); - $j('#projects-and-results').attr('checked', false); - $j("#methods-procedures").attr("disabled", "disabled"); - $j('#methods-procedures').attr('checked', false); - $j("#documentation").attr("disabled", "disabled"); - $j('#documentation').attr('checked', false); - $jj('#terms-of-use-website').hide(); - $jj('#infield-terms-of-use-website').hide(); - $jj('#creative-commons-website').hide(); - $jj('#infield-creative-commons-website').hide(); - $jj('#other-license-website').hide(); - $jj('#infield-other-license-website').hide(); + $("#terms-of-use").attr("disabled", "disabled"); + $('#terms-of-use').attr('checked', false); + $("#creative-commons").attr("disabled", "disabled"); + $('#creative-commons').attr('checked', false); + $("#other-license").attr("disabled", "disabled"); + $('#other-license').attr('checked', false); + $("#organization-structure").attr("disabled", "disabled"); + $('#organization-structure').attr('checked', false); + $("#projects-and-results").attr("disabled", "disabled"); + $('#projects-and-results').attr('checked', false); + $("#methods-procedures").attr("disabled", "disabled"); + $('#methods-procedures').attr('checked', false); + $("#documentation").attr("disabled", "disabled"); + $('#documentation').attr('checked', false); + $j('#terms-of-use-website').hide(); + $j('#infield-terms-of-use-website').hide(); + $j('#creative-commons-website').hide(); + $j('#infield-creative-commons-website').hide(); + $j('#other-license-website').hide(); + $j('#infield-other-license-website').hide(); } if(id=='gr'){ - $j("#decisions-general-assemblies").attr("disabled", "disabled"); - $j('#decisions-general-assemblies').attr('checked', false); - $j("#decisions-consensus").attr("disabled", "disabled"); - $j('#decisions-consensus').attr('checked', false); - $j("#representatives-democratically").attr("disabled", "disabled"); - $j('#representatives-democratically').attr('checked', false); - $j("#meetings-transparent").attr("disabled", "disabled"); - $j('#meetings-transparent').attr('checked', false); - $j("#decisions-voting").attr("disabled", "disabled"); - $j('#decisions-voting').attr('checked', false); + $("#decisions-general-assemblies").attr("disabled", "disabled"); + $('#decisions-general-assemblies').attr('checked', false); + $("#decisions-consensus").attr("disabled", "disabled"); + $('#decisions-consensus').attr('checked', false); + $("#representatives-democratically").attr("disabled", "disabled"); + $('#representatives-democratically').attr('checked', false); + $("#meetings-transparent").attr("disabled", "disabled"); + $('#meetings-transparent').attr('checked', false); + $("#decisions-voting").attr("disabled", "disabled"); + $('#decisions-voting').attr('checked', false); } if(id=='rc') reset_areas(); } } -function select_cat($jid, $jid2) { - var cat_id = "#mc-form-" + $jid; - $jj(cat_id + ",#mc-form-icon-" + $jid).click( +function select_cat($id, $id2) { + var cat_id = "#mc-form-" + $id; + $j(cat_id + ",#mc-form-icon-" + $id).click( function () {/* - // if ($jid != "rc") { - $jj(cat_id).addClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-"+ $jid).slideDown(); + // if ($id != "rc") { + $j(cat_id).addClass("mc-form-descbox-selected"); + $j("#mc-cat-selected-"+ $id).slideDown(); //} - $jj("#mc-form-" + $jid2).removeClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-"+ $jid2).slideUp(); - // $jj("#mc-form-more-link-" + $jid2).show('slow'); - $jj("#mc-form-less-link-" + $jid2).hide(); - // $jj("#mc-form-" + $jid).removeAttr("title"); - // $jj("#mc-form-" + $jid2).attr("title", click_to_select); - $jj("#mc-form-more-text-" + $jid2).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") { - //$jj("#mc-cat-rc-options").slideDown(function() {adjustHeights();}); + //$j("#mc-cat-rc-options").slideDown(function() {adjustHeights();}); mc_rc="0"; - update_logo($jid); - //$jj('div.blockMe3').unblock(); - //$j('#mc-form-optional-reinforcing').show(); + update_logo($id); + //$j('div.blockMe3').unblock(); + //$('#mc-form-optional-reinforcing').show(); } else if (cat_id == "#mc-form-nrc") { - //$jj("#mc-cat-rc-options").slideUp(function() {adjustHeights();}); + //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();}); reset_areas(); - update_logo($jid); + update_logo($id); } else if (cat_id == "#mc-form-np") { - //$jj('div.blockMe1').unblock(); - //$j('#mc-form-optional-non-profit').show(); + //$j('div.blockMe1').unblock(); + //$('#mc-form-optional-non-profit').show(); } else if (cat_id == "#mc-form-rp") { - //$jj('div.blockMe2').unblock(); - //$j('#mc-form-optional-reproducible').show(); + //$j('div.blockMe2').unblock(); + //$('#mc-form-optional-reproducible').show(); } else if (cat_id == "#mc-form-gr") { - //$jj('div.blockMe4').unblock(); - //$j('#mc-form-optional-grassroots').show(); + //$j('div.blockMe4').unblock(); + //$('#mc-form-optional-grassroots').show(); } else { - update_logo($jid); - //$jj("#mc-cat-rc-options").slideUp(function() {adjustHeights();}); + update_logo($id); + //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();}); } }); }; -function hover_cat($jid) { - var cat_id = "#mc-form-" + $jid; - $jj(cat_id + ",#mc-form-icon-" + $jid).hover( +function hover_cat($id) { + var cat_id = "#mc-form-" + $id; + $j(cat_id + ",#mc-form-icon-" + $id).hover( function () { - $jj(cat_id).addClass("mc-form-descbox-high"); - //if ($jj('#mc-form-less-link-'+$jid).is(':hidden')) - // $jj("#mc-form-more-link-"+$jid).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 () { - $jj(cat_id).removeClass("mc-form-descbox-high"); - //if ($jj('#mc-form-less-link-'+$jid).is(':hidden')) - // $jj("#mc-form-more-link-"+$jid).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($jid) { - $jj("#mc-form-more-link-" + $jid).click( +function click_more_link($id) { + $j("#mc-form-more-link-" + $id).click( function (event) { event.stopPropagation(); - $jj(this).hide(); - /*if ($jid == "rc") { - $jj("#mc-cat-rc-options").slideDown(); + $j(this).hide(); + /*if ($id == "rc") { + $j("#mc-cat-rc-options").slideDown(); }*/ - $jj("#mc-form-less-link-" + $jid).show('slow'); - $jj("#mc-form-more-text-" + $jid).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($jid) { - $jj("#mc-form-less-link-" + $jid).click( +function click_less_link($id) { + $j("#mc-form-less-link-" + $id).click( function (event) { event.stopPropagation(); - $jj(this).hide(); - /*if ($jid == "rc") { - $jj("#mc-cat-rc-options").slideUp(); + $j(this).hide(); + /*if ($id == "rc") { + $j("#mc-cat-rc-options").slideUp(); }*/ - $jj("#mc-form-more-link-" + $jid).show('slow'); - $jj("#mc-form-more-text-" + $jid).slideUp(function() {adjustHeights();}); - //if ($jid == "rc") { $jj("#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($jid) { - $jj("#mc-form-more-link-" + $jid).hover( +function hover_more_link($id) { + $j("#mc-form-more-link-" + $id).hover( function () { - $jj(this).addClass("mc-form-link-high"); + $j(this).addClass("mc-form-link-high"); }, function () { - $jj(this).removeClass("mc-form-link-high"); + $j(this).removeClass("mc-form-link-high"); }); }; -function hover_less_link($jid) { - $jj("#mc-form-less-link-" + $jid).hover( +function hover_less_link($id) { + $j("#mc-form-less-link-" + $id).hover( function () { - $jj(this).addClass("mc-form-link-high"); + $j(this).addClass("mc-form-link-high"); }, function () { - $jj(this).removeClass("mc-form-link-high"); + $j(this).removeClass("mc-form-link-high"); }); }; -function hide_initial($jid) { - $jj("#mc-form-more-link-" + $jid).hide(); - //$jj("#mc-form-more-text-" + $jid).hide(); - $jj("#mc-form-less-link-" + $jid).hide(); +function hide_initial($id) { + $j("#mc-form-more-link-" + $id).hide(); + //$j("#mc-form-more-text-" + $id).hide(); + $j("#mc-form-less-link-" + $id).hide(); }; -function dclick_toggle($jid) { - $jj("#mc-form-" + $jid).dblclick( +function dclick_toggle($id) { + $j("#mc-form-" + $id).dblclick( function () { - var id_text = "#mc-form-more-text-" + $jid; - var id_link = "#mc-form-more-link-" + $jid; - if ($jj(id_text).is(':visible')) { $jj(id_text).slideUp(); $jj(id_link).slideDown(); } - else { $jj(id_text).slideDown(); $jj(id_link).slideUp(); }; + var id_text = "#mc-form-more-text-" + $id; + var id_link = "#mc-form-more-link-" + $id; + 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"; - $jj("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected"); - $jj("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected"); - $jj("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected"); - $jj("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected"); - $jj("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"}); - $jj("#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($jid) { - var cat_id = "#mc-cat-rc-option-box-" + $jid; - $jj(cat_id + ",#mc-cat-rc-option-icon-" + $jid).click( +function select_area($id) { + var cat_id = "#mc-cat-rc-option-box-" + $id; + $j(cat_id + ",#mc-cat-rc-option-icon-" + $id).click( function (event) { - if($jj('#rc-checkbox').val()=='N') + if($j('#rc-checkbox').val()=='N') return; event.stopPropagation(); reset_areas(); - $jj("#mc-form-rc").addClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-rc").slideDown(); - $jj(cat_id).addClass("mc-cat-rc-option-box-selected"); - $jj("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $jid + "60.png"}); - update_logo($jid); + $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); }); }; // Inspired in: // http://stackoverflow.com/questions/803688/how-do-i-keep-multiple-divs-the-sa... -function adjustPairHeights($jid1, $jid2) { +function adjustPairHeights($id1, $id2) { var maxHeight = 0; - var idcat1 = "#mc-form-category-group-" + $jid1; - var idcat2 = "#mc-form-category-group-" + $jid2; + var idcat1 = "#mc-form-category-group-" + $id1; + var idcat2 = "#mc-form-category-group-" + $id2; var ids = idcat1 + "," + idcat2; - $jj(ids).each(function(){ - $jj(this).height('auto'); - if (maxHeight < $jj(this).height()) {maxHeight = $jj(this).height();} + $j(ids).each(function(){ + $j(this).height('auto'); + if (maxHeight < $j(this).height()) {maxHeight = $j(this).height();} }); - if($jj(idcat1).height() < maxHeight) { $jj(idcat1).height(maxHeight); }; - if($jj(idcat2).height() < maxHeight) { $jj(idcat2).height(maxHeight); }; + if($j(idcat1).height() < maxHeight) { $j(idcat1).height(maxHeight); }; + if($j(idcat2).height() < maxHeight) { $j(idcat2).height(maxHeight); }; } function adjustHeights() { @@ -253,16 +253,16 @@ adjustPairHeights("bb", "ba"); } -function update_logo($jcat) { - if ($jcat == "np" ) mc_np="np-"; - if ($jcat == "nnp") mc_np="fp-"; - if ($jcat == "rp" ) mc_rp="rp-"; - if ($jcat == "nrp") mc_rp="ex-"; - if ($jcat == "gr" ) mc_gr="gr-"; - if ($jcat == "ngr") mc_gr="rs-"; - if ($jcat == "ec" || $jcat == "bo" || - $jcat == "to" || $jcat == "di") mc_rc="rc." + $jcat + "-"; - if ($jcat == "nrc") mc_rc="ro-"; +function update_logo($cat) { + if ($cat == "np" ) mc_np="np-"; + if ($cat == "nnp") mc_np="fp-"; + if ($cat == "rp" ) mc_rp="rp-"; + if ($cat == "nrp") mc_rp="ex-"; + if ($cat == "gr" ) mc_gr="gr-"; + if ($cat == "ngr") mc_gr="rs-"; + if ($cat == "ec" || $cat == "bo" || + $cat == "to" || $cat == "di") mc_rc="rc." + $cat + "-"; + if ($cat == "nrc") mc_rc="ro-"; mc_category = ""; var icon_url = ""; @@ -273,34 +273,34 @@ if (mc_rc!="") { mc_category += mc_rc; } if (mc_gr!="") { mc_category += mc_gr; } // /lang/mc-0-1-np-rp-sc-dc/ - mc_category = mc_category.replace(/-$j/, ""); + mc_category = mc_category.replace(/-$/, ""); icon_url = "/mc/0.1/images/" + mc_category + "-120x90-0.1.png"; } if (icon_url != "") { - $jj("#mc-form-icon-result").attr({src : icon_url}); - $jj("#mc-form-icon-result").show('fast'); + $j("#mc-form-icon-result").attr({src : icon_url}); + $j("#mc-form-icon-result").show('fast'); } else { - $jj("#mc-form-icon-result").hide(); + $j("#mc-form-icon-result").hide(); } checkIfFormReady(); } function checkIfFormReady() { - urlIni = $jj('#url').val(); - nameIni = $jj('#ininame').val(); - keywordsIni = $jj('#keywords').val(); + urlIni = $j('#url').val(); + nameIni = $j('#ininame').val(); + keywordsIni = $j('#keywords').val(); if (mc_category != "" && nameIni.length > 0 && urlIni.length > 0) { - $jj("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled"); - $jj("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled"); - $jj("#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 { - $jj("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled"); - $jj("#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($jid) { - $jj($jid).bind("change keyup", function(event) { +function confInputValidation($id) { + $j($id).bind("change keyup", function(event) { checkIfFormReady(); }); } @@ -315,28 +315,28 @@ } } -function conf_link($jid) { - var nid = "n" + $jid; - //hover_more_link($jid); +function conf_link($id) { + var nid = "n" + $id; + //hover_more_link($id); //hover_more_link(nid); //hover_less_link(nid); //hover_less_link(nid); - //hide_initial($jid); + //hide_initial($id); //hide_initial(nid); - //click_more_link($jid); + //click_more_link($id); //click_more_link(nid); - //click_less_link($jid); + //click_less_link($id); //click_less_link(nid); - select_cat($jid, nid); - select_cat(nid, $jid); - //hover_cat($jid); + select_cat($id, nid); + select_cat(nid, $id); + //hover_cat($id); //hover_cat(nid); - // dclick_toggle($jid); + // dclick_toggle($id); // dclick_toggle(nid); }; function conf_click_continue() { - $jj("#mc-dia-continue-btn").click( + $j("#mc-dia-continue-btn").click( function (event) { event.stopPropagation(); if (mc_category != "" && urlIni.length > 0 && nameIni.length > 0) { @@ -353,23 +353,23 @@ // http://www.richreuter.com/2008/08/01/UsingJQueryToResizeTextBoxesToMaxLength... function max_textsize() { - $jj('input[type=text]').each(function() { - var max_length = $jj(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"; - $jj(this).width(w); + $j(this).width(w); }); } // http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-and... -$j.fn.labelOver = function(overClass) { +$.fn.labelOver = function(overClass) { return this.each(function() { - var label = $jj(this); + var label = $j(this); var f = label.attr('for'); if (f) { - var input = $jj('#' + f); + var input = $j('#' + f); this.hide = function() { label.css({ textIndent: -10000 }); @@ -397,7 +397,7 @@ var nameIni = ""; var urlIni = ""; var keywordsIni = ""; -// var click_to_select = $jj("#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"); @@ -410,106 +410,106 @@ //confInputValidation("#url"); //confInputValidation("#ininame"); -$jj("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled"); -//$jj("#mc-cat-rc-options").hide(function() {adjustHeights();}); -$jj("#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(); -//$jj('#label1').labelOver('over-apply'); +//$j('#label1').labelOver('over-apply'); // max_textsize(); -$jj(window).load(function () { doadjustwithsleep(0); }); +$j(window).load(function () { doadjustwithsleep(0); }); -$jj("#registered-non-profit").click(function(){ - if($jj("#registered-non-profit").attr("checked")){ - $jj('#non-profit-website').show(); - $jj('#infield-non-profit-website').show(); +$j("#registered-non-profit").click(function(){ + if($j("#registered-non-profit").attr("checked")){ + $j('#non-profit-website').show(); + $j('#infield-non-profit-website').show(); } else{ - $jj('#non-profit-website').hide(); - $jj('#infield-non-profit-website').hide(); + $j('#non-profit-website').hide(); + $j('#infield-non-profit-website').hide(); } }); -$jj("#open-accounting").click(function(){ - if($jj("#open-accounting").attr("checked")){ - $jj('#open-accounting-website').show(); - $jj('#infield-open-accounting-website').show(); +$j("#open-accounting").click(function(){ + if($j("#open-accounting").attr("checked")){ + $j('#open-accounting-website').show(); + $j('#infield-open-accounting-website').show(); } else{ - $jj('#open-accounting-website').hide(); - $jj('#infield-open-accounting-website').hide(); + $j('#open-accounting-website').hide(); + $j('#infield-open-accounting-website').hide(); } }); -$jj("#accept-donations").click(function(){ - if($jj("#accept-donations").attr("checked")){ - $jj('#donation-website').show(); - $jj('#infield-donation-website').show(); +$j("#accept-donations").click(function(){ + if($j("#accept-donations").attr("checked")){ + $j('#donation-website').show(); + $j('#infield-donation-website').show(); } else{ - $jj('#donation-website').hide(); - $jj('#infield-donation-website').hide(); + $j('#donation-website').hide(); + $j('#infield-donation-website').hide(); } }); -$jj("#terms-of-use").click(function(){ - if($jj("#terms-of-use").attr("checked")){ - $jj('#terms-of-use-website').show(); - $jj('#infield-terms-of-use-website').show(); +$j("#terms-of-use").click(function(){ + if($j("#terms-of-use").attr("checked")){ + $j('#terms-of-use-website').show(); + $j('#infield-terms-of-use-website').show(); } else{ - $jj('#terms-of-use-website').hide(); - $jj('#infield-terms-of-use-website').hide(); + $j('#terms-of-use-website').hide(); + $j('#infield-terms-of-use-website').hide(); } }); -$jj("#creative-commons").click(function(){ - if($jj("#creative-commons").attr("checked")){ - $jj('#creative-commons-website').show(); - $jj('#infield-creative-commons-website').show(); +$j("#creative-commons").click(function(){ + if($j("#creative-commons").attr("checked")){ + $j('#creative-commons-website').show(); + $j('#infield-creative-commons-website').show(); } else{ - $jj('#creative-commons-website').hide(); - $jj('#infield-creative-commons-website').hide(); + $j('#creative-commons-website').hide(); + $j('#infield-creative-commons-website').hide(); } }); -$jj("#other-license").click(function(){ - if($jj("#other-license").attr("checked")){ - $jj('#other-license-website').show(); - $jj('#infield-other-license-website').show(); +$j("#other-license").click(function(){ + if($j("#other-license").attr("checked")){ + $j('#other-license-website').show(); + $j('#infield-other-license-website').show(); } else{ - $jj('#other-license-website').hide(); - $jj('#infield-other-license-website').hide(); + $j('#other-license-website').hide(); + $j('#infield-other-license-website').hide(); } }); /* -$jj("#button-close-a").click(function(){ - $jj("#mc-form-np").removeClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-np").slideUp(); - $j('#mc-form-optional-non-profit').hide(); +$j("#button-close-a").click(function(){ + $j("#mc-form-np").removeClass("mc-form-descbox-selected"); + $j("#mc-cat-selected-np").slideUp(); + $('#mc-form-optional-non-profit').hide(); }); -$jj("#button-close-b").click(function(){ - $jj("#mc-form-rp").removeClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-rp").slideUp(); - $j('#mc-form-optional-reproducible').hide(); +$j("#button-close-b").click(function(){ + $j("#mc-form-rp").removeClass("mc-form-descbox-selected"); + $j("#mc-cat-selected-rp").slideUp(); + $('#mc-form-optional-reproducible').hide(); }); -$jj("#button-close-c").click(function(){ - $jj("#mc-form-rc").removeClass("mc-form-descbox-selected"); - //$jj("#mc-cat-selected-rc").slideUp(); +$j("#button-close-c").click(function(){ + $j("#mc-form-rc").removeClass("mc-form-descbox-selected"); + //$j("#mc-cat-selected-rc").slideUp(); reset_areas(); - $j('#mc-form-optional-reinforcing').hide(); + $('#mc-form-optional-reinforcing').hide(); }); -$jj("#button-close-d").click(function(){ - $jj("#mc-form-gr").removeClass("mc-form-descbox-selected"); - $jj("#mc-cat-selected-gr").slideUp(); - $j('#mc-form-optional-grassroots').hide(); +$j("#button-close-d").click(function(){ + $j("#mc-form-gr").removeClass("mc-form-descbox-selected"); + $j("#mc-cat-selected-gr").slideUp(); + $('#mc-form-optional-grassroots').hide(); }); */ @@ -533,7 +533,7 @@ $j('input#languages').inputfocus({ value: field_values['Language(s)'] }); $j('input#keywords').inputfocus({ value: field_values['Keywords'] }); $j('input#location').inputfocus({ value: field_values['Location'] }); - //$j('input#email').inputfocus({ value: field_values['email'] }); + //$('input#email').inputfocus({ value: field_values['email'] }); @@ -588,7 +588,7 @@ //remove classes $j('#second_step input').removeClass('error').removeClass('valid'); - var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$j/; + var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; var fields = $j('#second_step input[type=text]'); var error = 0; fields.each(function(){ @@ -633,7 +633,7 @@ ); var tr = $j('#fourth_step tr'); tr.each(function(){ - //alert( fields[$j(this).index()] ) + //alert( fields[$(this).index()] ) $j(this).children('td:nth-child(2)').html(fields[$j(this).index()]); }); Modified: trunk/wp-theme/mc2-form.php =================================================================== --- trunk/wp-theme/mc2-form.php 2012-05-20 01:30:12 UTC (rev 409) +++ trunk/wp-theme/mc2-form.php 2012-05-20 01:36:01 UTC (rev 410) @@ -282,8 +282,8 @@ $j('#slider1').bxSlider({startingSlide:0}); $j('#fifth').remove(); */ - $("ul.qtrans_language_chooser > li").css("display", "inline"); - $("ul.qtrans_language_chooser").css("margin-top", "-25px"); + $j("ul.qtrans_language_chooser > li").css("display", "inline"); + $j("ul.qtrans_language_chooser").css("margin-top", "-25px"); }); //$j('div.blockMe1').block({ message: null });