fix intro offer was not translated and now shown in idots template, also changed wording a little and added German translation

This commit is contained in:
Ralf Becker 2015-10-24 11:07:22 +00:00
parent a4a5e9d18d
commit db774ece2b
6 changed files with 62 additions and 56 deletions

View File

@ -503,7 +503,7 @@ jQuery.extend(et2_dialog,
// create a dummy parent with a correct reference to an application specific egw object
var parent = new et2_widget();
// if egw object is passed in because called from et2, just use it
if (typeof _egw_or_appname == 'object')
if (typeof _egw_or_appname != 'string')
{
parent._egw = _egw_or_appname;
}

View File

@ -57,35 +57,6 @@ var fw_base = Class.extend({
// Override the egw_getAppName function
window.egw_getAppName = this.egw_getAppName;
// Open tutorial popup with an introduction video about egroupware
// the popup can be discarded for the next time show if user
// select "Never" or can select "Later" and the introduction
// dialog will show upon the next session refresh
if (!egw.preference('egw_tutorial_noautoload', 'common')
&& !parseInt(document.getElementById('egw_script_id').getAttribute('data-framework-reload')))
{
var buttons = [
{text:"Show", id:"show", default:"true"},
{text:"Later", id:"later"},
{text:"Never", id:"never"}
];
et2_dialog.show_dialog(function (_button_id)
{
if (_button_id == "show" )
{
egw.open_link(egw.link('/index.php', 'menuaction=home.home_tutorial_ui.popup&tuid=introduction-'+egw.preference('lang')+'-0-a'),'_blank','960x580');
}
else if(_button_id == "never")
{
egw.set_preference('common', 'egw_tutorial_noautoload',true);
}
},
egw.lang('We would like to introduce you to EGroupware by showing a short introduction video.'),
egw.lang('Introduction'),
{}, buttons, et2_dialog.QUESTION_MESSAGE, undefined, egw);
}
},
/**
@ -570,23 +541,17 @@ var fw_base = Class.extend({
{
var _app = null;
//Read the menuaction parts from the url and check whether the first part
//of the url contains a valid app name
var matches = _url.match(/menuaction=([a-z0-9_-]+)\./i);
if (matches && (_app = this.getApplicationByName(matches[1])))
// Check the menuaction parts from the url
var matches = _url.match(/menuaction=([a-z0-9_-]+)\./i) ||
// Check the url for a scheme of "/app/something.php"
_url.match(/\/([^\/]+)\/[^\/]+\.php/i);
if (matches)
{
return _app;
// check if this is a regular app-name
_app = this.getApplicationByName(matches[1]);
}
//Check the url for a scheme of "/app/something.php" and check this one for a valid app
//name
var matches = _url.match(/\/([^\/]+)\/[^\/]+\.php/i);
if (matches && (_app = this.getApplicationByName(matches[1])))
{
return _app;
}
return null;
},
/**
@ -1005,7 +970,7 @@ var fw_base = Class.extend({
appWindow.focus();
// et2 available, let its widgets prepare
var deferred = []
var deferred = [];
var et2_list = [];
$j('.et2_container',this.activeApp.tab.contDiv).each(function() {
var et2 = etemplate2.getById(this.id);

View File

@ -312,6 +312,35 @@
{
window.scrollTo(0, 1);
}
// Open tutorial popup with an introduction video about egroupware
if (window.framework === window.top.framework && typeof et2_dialog != 'undefined' &&
!egw.preference('egw_tutorial_noautoload', 'common') &&
!parseInt(document.getElementById('egw_script_id').getAttribute('data-framework-reload')))
{
// we need to wait until common translations are loaded
egw.langRequireApp(window, 'common', function()
{
var buttons = [
{text:egw.lang("Show now"), id:"show", image: "check", default:"true"},
{text:egw.lang("Show next login"), id:"later", image: "right"},
{text:egw.lang("No thanks"), id:"never", image: "cancel"}
];
et2_dialog.show_dialog(function (_button_id)
{
if (_button_id == "show" )
{
egw.open_link(egw.link('/index.php', 'menuaction=home.home_tutorial_ui.popup&tuid=introduction-'+egw.preference('lang')+'-0-a'),'_blank','960x580');
}
if(_button_id != "later")
{
egw.set_preference('common', 'egw_tutorial_noautoload',true);
}
},
egw.lang('We would like to introduce you to EGroupware by showing a short introduction video.'),
egw.lang('Introduction'),
{}, buttons, et2_dialog.QUESTION_MESSAGE, undefined, egw(window));
}, this);
}
});
});

View File

@ -55,18 +55,20 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() {
*
* @param {string} _name name of the preference, eg. 'dateformat', or '*' to get all the application's preferences
* @param {string} _app default 'common'
* @return string preference value
* @todo add a callback to query it asynchron
* @param {function} _callback optional callback, if preference needs loading first
* @param {object} _context context for callback
* @return string|bool preference value or false, if callback given and preference not yet loaded
*/
preference: function(_name, _app)
preference: function(_name, _app, _callback, _context)
{
if (typeof _app == 'undefined') _app = 'common';
if (typeof prefs[_app] == 'undefined')
{
var request = this.json('home.egw_framework.ajax_get_preference.template', [_app]);
request.sendRequest(false, 'GET'); // use synchronous (cachable) GET request
var request = this.json('home.egw_framework.ajax_get_preference.template', [_app], _callback, _context);
request.sendRequest(typeof _callback == 'function', 'GET'); // use synchronous (cachable) GET request
if (typeof prefs[_app] == 'undefined') prefs[_app] = {};
if (typeof _callback == 'function') return false;
}
if (_name == "*") return typeof prefs[_app] ==='object' ? jQuery.extend({},prefs[_app]) : prefs[_app];

View File

@ -426,6 +426,7 @@ insert in dokument common de In Dokument einfügen
insert row after common de Zeile danach einfügen
insert row before common de Zeile davor einfügen
international common de International
introduction common de Einführung
invalid filename common de Ungültiger Dateiname
invalid ip address common de Ungültige IP Adresse
invalid password common de Ungültiges Passwort
@ -574,6 +575,7 @@ no history for this record common de Keine Historie für diesen Datensatz
no key for recipient: common de Keinen Schlüssel für Empfänger:
no savant2 template directories were found in: common de Kein Savant2 Vorlagen Verzeichnis gefunden in:
no subject common de Kein Betreff
no thanks common de Nein danke
none common de Keine
none of %1 common de keines von %1
norfolk island common de NORFOLK INSELN
@ -781,6 +783,8 @@ show in sidebox common de In Seitenmenü anzeigen
show log of following device groupdav de Zeige Log des folgenden Geräts
show logo's on the desktop. common de Logos auf der Arbeitsfläche anzeigen.
show menu common de Menü anzeigen
show next login common de Beim nächsten Anmelden
show now common de Jetzt anzeigen
show page generation time common de Zeit zum Erstellen der Seite anzeigen
show page generation time on the bottom of the page? common de Zeit zum Erstellen der Seite in der Fußzeile anzeigen
show page generation time? common de Erstellungszeit der Seite anzeigen?
@ -912,6 +916,7 @@ virgin islands, british common de VIRGIN ISLANDS, BRITISH
virgin islands, u.s. common de VIRGIN ISLANDS, U.S.
wallis and futuna common de WALLIS AND FUTUNA
was not able to delete the backup key because %1 common de Es war nicht möglich das Backup-Schlüssel zu löschen weil...
we would like to introduce you to egroupware by showing a short introduction video. common de Wir möchten Ihnen EGroupware mit einem kurzen Einführungsvideo vorstellen.
wednesday common de Mittwoch
welcome common de Willkommen
western european common de Westeuropäisch

View File

@ -426,6 +426,7 @@ insert in dokument common en Insert in document
insert row after common en Insert row after
insert row before common en Insert row before
international common en International
introduction common en Introduction
invalid filename common en Invalid file name.
invalid ip address common en Invalid IP address.
invalid password common en Invalid password.
@ -574,6 +575,7 @@ no history for this record common en No history for this record
no key for recipient: common en No key for recipient:
no savant2 template directories were found in: common en No Savant2 template directories were found in:
no subject common en No subject
no thanks common en No thanks
none common en None
none of %1 common en none of %1
norfolk island common en NORFOLK ISLAND
@ -781,6 +783,8 @@ show in sidebox common en Show in side menu
show log of following device groupdav en Show log of following device
show logo's on the desktop. common en Show logo on the desktop.
show menu common en Show menu
show next login common en Show next login
show now common en Show now
show page generation time common en Show page generation time
show page generation time on the bottom of the page? common en Show page generation time on the bottom of the page.
show page generation time? common en Show page generation time
@ -912,6 +916,7 @@ virgin islands, british common en VIRGIN ISLANDS, BRITISH
virgin islands, u.s. common en VIRGIN ISLANDS, U.S.
wallis and futuna common en WALLIS AND FUTUNA
was not able to delete the backup key because %1 common en Was not able to delete the backup key because %1
we would like to introduce you to egroupware by showing a short introduction video. common en We would like to introduce you to EGroupware by showing a short introduction video.
wednesday common en Wednesday
welcome common en Welcome
western european common en Western european