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:08:04 +00:00
parent de3ceb5144
commit 1141805153
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 // create a dummy parent with a correct reference to an application specific egw object
var parent = new et2_widget(); var parent = new et2_widget();
// if egw object is passed in because called from et2, just use it // 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; parent._egw = _egw_or_appname;
} }
@ -543,10 +543,10 @@ jQuery.extend(et2_dialog,
value: _value value: _value
}, parent); }, parent);
}, },
/** /**
* Show an alert message with OK button * Show an alert message with OK button
* *
* @param {String} _message Message to be place in the dialog. * @param {String} _message Message to be place in the dialog.
* @param {String} _title Text in the top bar of the dialog. * @param {String} _title Text in the top bar of the dialog.
* @param integer _type One of the message constants. This defines the style of the message. * @param integer _type One of the message constants. This defines the style of the message.
@ -562,7 +562,7 @@ jQuery.extend(et2_dialog,
dialog_type: _type || et2_dialog.INFORMATION_MESSAGE dialog_type: _type || et2_dialog.INFORMATION_MESSAGE
}, parent); }, parent);
}, },
/** /**
* Show a prompt dialog * Show a prompt dialog
* *

View File

@ -57,35 +57,6 @@ var fw_base = Class.extend({
// Override the egw_getAppName function // Override the egw_getAppName function
window.egw_getAppName = this.egw_getAppName; 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);
}
}, },
/** /**
@ -203,7 +174,7 @@ var fw_base = Class.extend({
else if (_app.browser != null && else if (_app.browser != null &&
// check if app has its own linkHandler // check if app has its own linkHandler
!(this.applications[_app.appName].app_refresh) && !(this.applications[_app.appName].app_refresh) &&
_app.browser.iframe == null && _url == _app.browser.currentLocation _app.browser.iframe == null && _url == _app.browser.currentLocation
// links with load may needs to be reloaded e.g. admin applications global cats // links with load may needs to be reloaded e.g. admin applications global cats
&& !(_app.browser.currentLocation.match(/&load=[^&]+/g) && _app == 'admin')) && !(_app.browser.currentLocation.match(/&load=[^&]+/g) && _app == 'admin'))
{ {
@ -570,23 +541,17 @@ var fw_base = Class.extend({
{ {
var _app = null; var _app = null;
//Read the menuaction parts from the url and check whether the first part // Check the menuaction parts from the url
//of the url contains a valid app name var matches = _url.match(/menuaction=([a-z0-9_-]+)\./i) ||
var matches = _url.match(/menuaction=([a-z0-9_-]+)\./i); // Check the url for a scheme of "/app/something.php"
if (matches && (_app = this.getApplicationByName(matches[1]))) _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 return _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(); appWindow.focus();
// et2 available, let its widgets prepare // et2 available, let its widgets prepare
var deferred = [] var deferred = [];
var et2_list = []; var et2_list = [];
$j('.et2_container',this.activeApp.tab.contDiv).each(function() { $j('.et2_container',this.activeApp.tab.contDiv).each(function() {
var et2 = etemplate2.getById(this.id); var et2 = etemplate2.getById(this.id);

View File

@ -241,11 +241,11 @@
// to take padding/margin into account // to take padding/margin into account
var delta_width = w.width - ($et2.outerWidth(true) + ($main_div.outerWidth(true) - $main_div.width())); var delta_width = w.width - ($et2.outerWidth(true) + ($main_div.outerWidth(true) - $main_div.width()));
var delta_height = w.height - ($et2.outerHeight(true) + ($main_div.outerHeight(true) - $main_div.height())); var delta_height = w.height - ($et2.outerHeight(true) + ($main_div.outerHeight(true) - $main_div.height()));
// Don't let the window gets horizental scrollbar // Don't let the window gets horizental scrollbar
var scrollWidth = document.body.scrollWidth - document.body.clientWidth; var scrollWidth = document.body.scrollWidth - document.body.clientWidth;
if (scrollWidth > 0 && scrollWidth + egw_getWindowOuterWidth() < screen.availWidth) delta_width = -scrollWidth; if (scrollWidth > 0 && scrollWidth + egw_getWindowOuterWidth() < screen.availWidth) delta_width = -scrollWidth;
if (delta_height && egw_getWindowOuterHeight() >= egw.availHeight()) if (delta_height && egw_getWindowOuterHeight() >= egw.availHeight())
{ {
delta_height = 0; delta_height = 0;
@ -312,6 +312,35 @@
{ {
window.scrollTo(0, 1); 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} _name name of the preference, eg. 'dateformat', or '*' to get all the application's preferences
* @param {string} _app default 'common' * @param {string} _app default 'common'
* @return string preference value * @param {function} _callback optional callback, if preference needs loading first
* @todo add a callback to query it asynchron * @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 _app == 'undefined') _app = 'common';
if (typeof prefs[_app] == 'undefined') if (typeof prefs[_app] == 'undefined')
{ {
var request = this.json('home.egw_framework.ajax_get_preference.template', [_app]); var request = this.json('home.egw_framework.ajax_get_preference.template', [_app], _callback, _context);
request.sendRequest(false, 'GET'); // use synchronous (cachable) GET request request.sendRequest(typeof _callback == 'function', 'GET'); // use synchronous (cachable) GET request
if (typeof prefs[_app] == 'undefined') prefs[_app] = {}; 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]; if (_name == "*") return typeof prefs[_app] ==='object' ? jQuery.extend({},prefs[_app]) : prefs[_app];

View File

@ -420,6 +420,7 @@ insert in dokument common de In Dokument einfügen
insert row after common de Zeile danach einfügen insert row after common de Zeile danach einfügen
insert row before common de Zeile davor einfügen insert row before common de Zeile davor einfügen
international common de International international common de International
introduction common de Einführung
invalid filename common de Ungültiger Dateiname invalid filename common de Ungültiger Dateiname
invalid ip address common de Ungültige IP Adresse invalid ip address common de Ungültige IP Adresse
invalid password common de Ungültiges Passwort invalid password common de Ungültiges Passwort
@ -564,6 +565,7 @@ no filters common de Filter aufheben
no history for this record common de Keine Historie für diesen Datensatz no history for this record common de Keine Historie für diesen Datensatz
no savant2 template directories were found in: common de Kein Savant2 Vorlagen Verzeichnis gefunden in: no savant2 template directories were found in: common de Kein Savant2 Vorlagen Verzeichnis gefunden in:
no subject common de Kein Betreff no subject common de Kein Betreff
no thanks common de Nein danke
none common de Keine none common de Keine
none of %1 common de keines von %1 none of %1 common de keines von %1
norfolk island common de NORFOLK INSELN norfolk island common de NORFOLK INSELN
@ -769,6 +771,8 @@ show in sidebox common de In Seitenmenü anzeigen
show log of following device groupdav de Zeige Log des folgenden Geräts 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 logo's on the desktop. common de Logos auf der Arbeitsfläche anzeigen.
show menu common de Menü 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 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 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? show page generation time? common de Erstellungszeit der Seite anzeigen?
@ -897,6 +901,7 @@ view common de Anzeigen
virgin islands, british common de VIRGIN ISLANDS, BRITISH virgin islands, british common de VIRGIN ISLANDS, BRITISH
virgin islands, u.s. common de VIRGIN ISLANDS, U.S. virgin islands, u.s. common de VIRGIN ISLANDS, U.S.
wallis and futuna common de WALLIS AND FUTUNA wallis and futuna common de WALLIS AND FUTUNA
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 wednesday common de Mittwoch
welcome common de Willkommen welcome common de Willkommen
western european common de Westeuropäisch western european common de Westeuropäisch

View File

@ -420,6 +420,7 @@ insert in dokument common en Insert in document
insert row after common en Insert row after insert row after common en Insert row after
insert row before common en Insert row before insert row before common en Insert row before
international common en International international common en International
introduction common en Introduction
invalid filename common en Invalid file name. invalid filename common en Invalid file name.
invalid ip address common en Invalid IP address. invalid ip address common en Invalid IP address.
invalid password common en Invalid password. invalid password common en Invalid password.
@ -564,6 +565,7 @@ no filters common en No filters
no history for this record common en No history for this record no history for this record common en No history for this record
no savant2 template directories were found in: common en No Savant2 template directories were found in: no savant2 template directories were found in: common en No Savant2 template directories were found in:
no subject common en No subject no subject common en No subject
no thanks common en No thanks
none common en None none common en None
none of %1 common en none of %1 none of %1 common en none of %1
norfolk island common en NORFOLK ISLAND norfolk island common en NORFOLK ISLAND
@ -768,6 +770,8 @@ show in sidebox common en Show in side menu
show log of following device groupdav en Show log of following device 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 logo's on the desktop. common en Show logo on the desktop.
show menu common en Show menu 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 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 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 show page generation time? common en Show page generation time
@ -896,6 +900,7 @@ view common en View
virgin islands, british common en VIRGIN ISLANDS, BRITISH virgin islands, british common en VIRGIN ISLANDS, BRITISH
virgin islands, u.s. common en VIRGIN ISLANDS, U.S. virgin islands, u.s. common en VIRGIN ISLANDS, U.S.
wallis and futuna common en WALLIS AND FUTUNA wallis and futuna common en WALLIS AND FUTUNA
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 wednesday common en Wednesday
welcome common en Welcome welcome common en Welcome
western european common en Western european western european common en Western european