Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ Thumbs.db | |
|
||
#ignore lib | ||
fullajax.js | ||
fullajax.min.js | ||
fullajax_uncompressed.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* @version 2012.10.14 (0.9) | ||
* @package Add FullAjax for Joomla! | ||
* @author Fedik | ||
* @email getthesite@gmail.com | ||
* @link http://www.getsite.org.ua | ||
* @license GNU/GPL http://www.gnu.org/licenses/gpl.html | ||
*/ | ||
|
||
(function($) { | ||
$(document).ready(function(){ | ||
//display configuration depend of selected method | ||
var $selectMethod = $("#jform_params_positionupd"); | ||
axChangeDependsMethod($selectMethod.val()) | ||
$selectMethod.bind("change", function(){ | ||
axChangeDependsMethod($(this).val()) | ||
}) | ||
|
||
//toggle the check active item configuration | ||
var $checkmenuit = $("#jform_params_checkmenuit"); | ||
axToggleCheckActiv($checkmenuit.children('input:checked').val()); | ||
$checkmenuit.bind("click", function(){ | ||
axToggleCheckActiv($(this).children('input:checked').val()); | ||
}) | ||
}) | ||
|
||
function axChangeDependsMethod(id){ | ||
//hide all | ||
var $contid = $("#jform_params_contid").parents("div.control-group").slideUp(); | ||
var $posParams = $("#jform_params_posParams").parents("div.control-group").slideUp(); | ||
var $allowed_positions = $("#jform_params_allowed_positions").parents("div.control-group").slideUp(); | ||
|
||
switch(id) { | ||
case "3": | ||
$allowed_positions.slideDown(); | ||
break; | ||
case "1": | ||
$contid.slideDown(); | ||
$posParams.slideDown(); | ||
break; | ||
case "2": | ||
case "0": | ||
default: | ||
$contid.slideDown(); | ||
} | ||
} | ||
|
||
function axToggleCheckActiv(checked){ | ||
//hide all | ||
var $checkmenuitA = $("#jform_params_checkmenuit_active_for_a").parents("div.control-group").slideUp(); | ||
var $menuClass = $("#jform_params_menuClass").parents("div.control-group").slideUp(); | ||
if (checked == "1") { | ||
$checkmenuitA.slideDown(); | ||
$menuClass.slideDown(); | ||
} | ||
} | ||
|
||
}(jQuery)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* @version 2012.10.14 (0.9) | ||
* @package Add FullAjax for Joomla! | ||
* @author Fedik | ||
* @email getthesite@gmail.com | ||
* @link http://www.getsite.org.ua | ||
* @license GNU/GPL http://www.gnu.org/licenses/gpl.html | ||
*/ | ||
window.addEvent("domready", function() { | ||
//display configuration depend of selected method | ||
var selectMethod = document.id("jform_params_positionupd"); | ||
axChangeDependsMethod(selectMethod.get("value")); | ||
selectMethod.addEvent("change", function(){ | ||
axChangeDependsMethod(this.get("value")); | ||
}); | ||
|
||
//clear selected menu items | ||
var ignorInput = document.id("jform_params_menu_items_ignor"); | ||
var axNoInput = document.id("jform_params_menu_items_no_ax_load"); | ||
if(ignorInput && axNoInput){ | ||
var btClear = new Element("button",{ | ||
html: "Clear", | ||
type: "button", | ||
events: { click : axDeselectSelectedItems } | ||
}); | ||
ignorInput.getParent("li").adopt(btClear); | ||
axNoInput.getParent("li").adopt(btClear.clone().cloneEvents(btClear)); | ||
} | ||
|
||
//toggle the check active item configuration | ||
var checkmenuit = document.id("jform_params_checkmenuit"); | ||
axToggleCheckActiv(checkmenuit.getElement("input:checked").get("value")); | ||
checkmenuit.addEvent("click", function(){ | ||
axToggleCheckActiv(this.getElement("input:checked").get("value")); | ||
}); | ||
|
||
}); | ||
function axDeselectSelectedItems(e){ | ||
var sel = e.target.getSiblings("select")[0]; | ||
sel.getElements("option[selected=\"selected\"]").removeProperty("selected"); | ||
} | ||
function axToggleCheckActiv(checked){ | ||
//hide all | ||
var checkmenuitA = document.id("jform_params_checkmenuit_active_for_a").getParent("li").slide("out"); | ||
var menuClass = document.id("jform_params_menuClass").getParent("li").slide("out"); | ||
if (checked == "1") { | ||
checkmenuitA.slide("in"); | ||
menuClass.slide("in"); | ||
} | ||
} | ||
function axChangeDependsMethod(id){ | ||
//hide all | ||
var contid = document.id("jform_params_contid").getParent("li").slide("out"); | ||
var posParams = document.id("jform_params_posParams").getParent("li").slide("out"); | ||
var allowed_positions = document.id("jform_params_allowed_positions").getParent("li").slide("out"); | ||
|
||
switch(id) { | ||
case "3": | ||
allowed_positions.slide("in"); | ||
break; | ||
case "1": | ||
contid.slide("in"); | ||
posParams.slide("in"); | ||
break; | ||
case "2": | ||
case "0": | ||
default: | ||
contid.slide("in"); | ||
} | ||
} |