You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/08/29 17:38:47 UTC
svn commit: r1378616 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Author: lofwyr
Date: Wed Aug 29 15:38:46 2012
New Revision: 1378616
URL: http://svn.apache.org/viewvc?rev=1378616&view=rev
Log:
TOBAGO-1192: buttons and links rendering without javascript fragments
using default for actionId in AJAX case
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1378616&r1=1378615&r2=1378616&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Wed Aug 29 15:38:46 2012
@@ -946,26 +946,28 @@ var Tobago = {
// focus
var autofocus = Tobago.Utils.selectWidthJQuery(elements, '[autofocus]');
- autofocus.each(function setupFocus() {
+ autofocus.each(function () {
+ // setupFocus
Tobago.focusId = jQuery(this).attr("id");
Tobago.setFocus();
});
// commands
var commandButtons = Tobago.Utils.selectWidthJQuery(elements, '[data-tobago-action]');
- commandButtons.each(function setupInputFacetCommand() {
+ commandButtons.each(function () {
+ // setupInputFacetCommand
var command = jQuery(this);
var commands = command.data("tobago-action");
if (commands.click) {
command.click(function() {
if (commands.click.confirmation == null || confirm(commands.click.confirmation)) {
+ var actionId = commands.click.actionId ? commands.click.actionId : jQuery(this).attr("id");
if (commands.click.partially) {
- Tobago.reloadComponent(this, commands.click.partially, commands.click.actionId, commands.click);
+ Tobago.reloadComponent(this, commands.click.partially, actionId, commands.click);
} else if (commands.click.url) {
Tobago.navigateToUrl(commands.click.url);
} else {
- var actionId = commands.click.actionId ? commands.click.actionId : jQuery(this).attr("id");
Tobago.submitAction(this, actionId, commands.click);
}
}
@@ -1003,7 +1005,8 @@ var Tobago = {
// access keys
var accesskeys = Tobago.Utils.selectWidthJQuery(elements, '[accesskey]');
- accesskeys.each(function setupAccessKey() {
+ accesskeys.each(function () {
+ // setupAccessKey
var el = jQuery(this);
new Tobago.AcceleratorKey(function clickAccelKey() {
Tobago.clickOnElement(el.attr("id"))}, el.attr("accesskey"));