text and German translations for drag-n-drop modifier hints

This commit is contained in:
Ralf Becker 2014-10-24 12:19:16 +00:00
parent 981a0a1eb9
commit 247a8c5e87
3 changed files with 24 additions and 16 deletions

View File

@ -83,7 +83,7 @@ function egwDragActionImplementation()
ai.helper = null; ai.helper = null;
ai.ddTypes = []; ai.ddTypes = [];
ai.selected = []; ai.selected = [];
// Define default helper DOM // Define default helper DOM
// default helper also can be called later in application code in order to customization // default helper also can be called later in application code in order to customization
ai.defaultDDHelper = function (_selected) ai.defaultDDHelper = function (_selected)
@ -94,13 +94,13 @@ function egwDragActionImplementation()
var moreRow = $j(document.createElement('tr')).addClass('et2_egw_action_ddHelper_moreRow'); var moreRow = $j(document.createElement('tr')).addClass('et2_egw_action_ddHelper_moreRow');
// Main div helper container // Main div helper container
var div = $j(document.createElement("div")).append(table); var div = $j(document.createElement("div")).append(table);
var rows = []; var rows = [];
// Maximum number of rows to show // Maximum number of rows to show
var maxRows = 3; var maxRows = 3;
// item label // item label
var itemLabel = egw.lang(egw.link_get_registry(egw.app_name(),_selected.length > 1?'entries':'entry')||egw.app_name()); var itemLabel = egw.lang(egw.link_get_registry(egw.app_name(),_selected.length > 1?'entries':'entry')||egw.app_name());
var index = 0; var index = 0;
for (var i = 0; i < _selected.length;i++) for (var i = 0; i < _selected.length;i++)
{ {
@ -117,7 +117,7 @@ function egwDragActionImplementation()
var spanCnt = $j(document.createElement('span')) var spanCnt = $j(document.createElement('span'))
.addClass('et2_egw_action_ddHelper_itemsCnt') .addClass('et2_egw_action_ddHelper_itemsCnt')
.appendTo(div); .appendTo(div);
spanCnt.text(_selected.length +' '+ itemLabel); spanCnt.text(_selected.length +' '+ itemLabel);
// Number of not shown rows // Number of not shown rows
var restRows = _selected.length - maxRows; var restRows = _selected.length - maxRows;
@ -129,7 +129,7 @@ function egwDragActionImplementation()
break; break;
} }
} }
var text = $j(document.createElement('div')).addClass('et2_egw_action_ddHelper_tip'); var text = $j(document.createElement('div')).addClass('et2_egw_action_ddHelper_tip');
div.append(text); div.append(text);
@ -137,13 +137,14 @@ function egwDragActionImplementation()
if('draggable' in document.createElement('span') && if('draggable' in document.createElement('span') &&
navigator && navigator.userAgent.indexOf('Chrome') >= 0 && egw.app_name() == 'filemanager') // currently only filemanager supports drag out navigator && navigator.userAgent.indexOf('Chrome') >= 0 && egw.app_name() == 'filemanager') // currently only filemanager supports drag out
{ {
var key = ["Mac68K","MacPPC","MacIntel"].indexOf(window.navigator.platform) < 0 ? 'Ctrl' : 'Command'; var key = ["Mac68K","MacPPC","MacIntel"].indexOf(window.navigator.platform) < 0 ?
text.text(egw.lang('Hold Alt + Shift key to drag %2 to your computer',key, itemLabel)); egw.lang('Alt') : egw.lang('Command ⌘');
text.text(egw.lang('Hold [%1] and [%2] key to drag %3 to your desktop', key, egw.lang('Shift ⇧'), itemLabel));
} }
// Final html DOM return as helper structor // Final html DOM return as helper structor
return div; return div;
}; };
ai.doRegisterAction = function(_aoi, _callback, _context) ai.doRegisterAction = function(_aoi, _callback, _context)
{ {
var node = _aoi.getDOMNode(); var node = _aoi.getDOMNode();
@ -201,7 +202,7 @@ function egwDragActionImplementation()
{ {
// Disabling draggable adds some UI classes, but we don't care so remove them // Disabling draggable adds some UI classes, but we don't care so remove them
$j(node).removeClass("ui-draggable-disabled ui-state-disabled"); $j(node).removeClass("ui-draggable-disabled ui-state-disabled");
} }
else else
{ {
@ -327,7 +328,7 @@ function egwDragActionImplementation()
{ {
// Add a basic class to the helper in order to standardize the background layout // Add a basic class to the helper in order to standardize the background layout
ai.helper.addClass('et2_egw_action_ddHelper'); ai.helper.addClass('et2_egw_action_ddHelper');
// Append the helper object to the body element - this // Append the helper object to the body element - this
// fixes a bug in IE: If the element isn't inserted into // fixes a bug in IE: If the element isn't inserted into
// the DOM-tree jquery appends it to the parent node. // the DOM-tree jquery appends it to the parent node.
@ -351,12 +352,13 @@ function egwDragActionImplementation()
// to distinguish whether the action was intended for dragging or selecting content. // to distinguish whether the action was intended for dragging or selecting content.
var tipTelorance = 10; var tipTelorance = 10;
var helperTop = ai.helper.position().top; var helperTop = ai.helper.position().top;
if (helperTop >= dTarget.offset().top if (helperTop >= dTarget.offset().top
&& helperTop <= (dTarget.height() + dTarget.offset().top) + tipTelorance) && helperTop <= (dTarget.height() + dTarget.offset().top) + tipTelorance)
{ {
var key = (["Mac68K","MacPPC","MacIntel"].indexOf(window.navigator.platform) < 0)?"Ctrl": "Command"; var key = ["Mac68K","MacPPC","MacIntel"].indexOf(window.navigator.platform) < 0 ?
egw.message(egw.lang('Hold %1 key to select content.',key),'info'); egw.lang("Ctrl") : egw.lang("Command ⌘");
egw.message(egw.lang('Hold [%1] key to select text eg. to copy it', key), 'info');
} }
// Invalid target // Invalid target
return true; return true;

View File

@ -185,6 +185,7 @@ cocos (keeling) islands common de COCOS INSELN
collection empty. common de Collection ist leer collection empty. common de Collection ist leer
collection listing common de Auflistung der Collection collection listing common de Auflistung der Collection
colombia common de KOLUMBIEN colombia common de KOLUMBIEN
command ⌘ common de Cmd ⌘
common preferences common de Allgemeine Einstellungen common preferences common de Allgemeine Einstellungen
comoros common de KOMOREN comoros common de KOMOREN
company common de Unternehmen company common de Unternehmen
@ -373,7 +374,8 @@ height common de Höhe
help common de Hilfe help common de Hilfe
high common de Hoch high common de Hoch
highest common de Höchste highest common de Höchste
hold %1 to drag %2 to your computer common de %1 Taste halten um %2 auf Ihren Computer zu ziehen hold [%1] and [%2] key to drag %3 to your desktop common de [%1] und [%2] Tasten halten um %3 auf Ihren Schreibtisch (Desktop) zu ziehen
hold [%1] key to select text eg. to copy it common de [%1] Taste halten um Text zu markieren um ihn z.B. zu kopieren
holy see (vatican city state) common de VATICAN holy see (vatican city state) common de VATICAN
home common de Home home common de Home
home email common de private E-Mail home email common de private E-Mail
@ -731,6 +733,7 @@ setup common de Setup
setup main menu common de Setup Hauptmenü setup main menu common de Setup Hauptmenü
seychelles common de SEYCHELLEN seychelles common de SEYCHELLEN
shift common de Shift shift common de Shift
shift ⇧ common de Umschalten ⇧
show all common de alle anzeigen show all common de alle anzeigen
show all categorys common de Alle Kategorien anzeigen show all categorys common de Alle Kategorien anzeigen
show as topmenu common de Menü oben anzeigen show as topmenu common de Menü oben anzeigen

View File

@ -185,6 +185,7 @@ cocos (keeling) islands common en COCOS (KEELING) ISLANDS
collection empty. common en Collection empty. collection empty. common en Collection empty.
collection listing common en Collection listing collection listing common en Collection listing
colombia common en COLOMBIA colombia common en COLOMBIA
command ⌘ common en Command ⌘
common preferences common en Common preferences common preferences common en Common preferences
comoros common en COMOROS comoros common en COMOROS
company common en Company company common en Company
@ -373,7 +374,8 @@ height common en Height
help common en Help help common en Help
high common en High high common en High
highest common en Highest highest common en Highest
hold %1 to drag %2 to your computer common en Hold %1 to drag %2 to your computer hold [%1] and [%2] key to drag %3 to your desktop common en Hold [%1] and [%2] key to drag %3 to your desktop
hold [%1] key to select text eg. to copy it common en Hold [%1] key to select text eg. to copy it
holy see (vatican city state) common en HOLY SEE (VATICAN CITY STATE) holy see (vatican city state) common en HOLY SEE (VATICAN CITY STATE)
home common en Home home common en Home
home email common en Home email home email common en Home email
@ -731,6 +733,7 @@ setup common en Setup
setup main menu common en Setup main menu setup main menu common en Setup main menu
seychelles common en SEYCHELLES seychelles common en SEYCHELLES
shift common en Shift shift common en Shift
shift ⇧ common en Shift ⇧
show all common en Show all show all common en Show all
show all categorys common en Show all categories show all categorys common en Show all categories
show as topmenu common en Show as top menu show as topmenu common en Show as top menu