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 2010/04/16 18:12:36 UTC
svn commit: r934976 - in
/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script:
tobago-sheet.js tobago.js
Author: lofwyr
Date: Fri Apr 16 16:12:36 2010
New Revision: 934976
URL: http://svn.apache.org/viewvc?rev=934976&view=rev
Log:
TOBAGO-874: On Mac OS the command (apple) key should to the same like the CTRL key on Windows and Linux
Modified:
myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=934976&r1=934975&r2=934976&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Fri Apr 16 16:12:36 2010
@@ -484,6 +484,7 @@ Tobago.Sheet.prototype.doSelection = fun
}
//LOG.debug("event.ctrlKey = " + event.ctrlKey);
+ //LOG.debug("event.metaKey = " + event.metaKey);
//LOG.debug("event.shiftKey = " + event.shiftKey);
//LOG.debug("srcElement = " + srcElement.tagName);
//LOG.debug("Actionid " + this.clickActionId);
@@ -501,7 +502,7 @@ Tobago.Sheet.prototype.doSelection = fun
var rowIndex = rowId.substring(rowId.lastIndexOf("_data_tr_") + 9);
var selector = Tobago.element(this.id + "_data_row_selector_" + rowIndex);
- if ((!event.ctrlKey && !selector) || this.selectable == "single" ) {
+ if ((!event.ctrlKey && !event.metaKey && !selector) || this.selectable == "single" ) {
// clearAllSelections();
Tobago.element(this.selectedId).value = ",";
}
@@ -542,6 +543,7 @@ Tobago.Sheet.prototype.doDblClick = func
}
//LOG.debug("event.ctrlKey = " + event.ctrlKey);
+ //LOG.debug("event.metaKey = " + event.metaKey);
//LOG.debug("event.shiftKey = " + event.shiftKey);
//LOG.debug("srcElement = " + srcElement.tagName);
//LOG.debug("Actionid " + this.clickActionId);
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=934976&r1=934975&r2=934976&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Fri Apr 16 16:12:36 2010
@@ -163,7 +163,7 @@ var Tobago = {
if (event.altKey) {
mod += "alt";
}
- if (event.ctrlKey) {
+ if (event.ctrlKey || event.metaKey) {
mod += "ctrl";
}
if (event.shiftKey) {
@@ -1880,11 +1880,11 @@ Tobago.In.prototype.checkMaxLength = fun
// If the input is something less than a space (e.g. tab, CR, etc.)
// return true.
- // If key was CTRL-v, which will be used to paste some new text,
+ // If key was CTRL-v (or APPLE-v), which will be used to paste some new text,
// pass it along.
if (event) {
if ((event.which < 32)
- || ((event.which == 118) && (event["ctrlKey"]))) {
+ || ((event.which == 118) && (event.ctrlKey || event.metaKey))) {
return true;
}
}