diff --git a/gadgets/core/src/main/javascript/gatein-features/gatein-container/Gadgets.js b/gadgets/core/src/main/javascript/gatein-features/gatein-container/Gadgets.js
index 1ec3095b7..814993b37 100644
--- a/gadgets/core/src/main/javascript/gatein-features/gatein-container/Gadgets.js
+++ b/gadgets/core/src/main/javascript/gatein-features/gatein-container/Gadgets.js
@@ -699,13 +699,15 @@ gadgets.IfrGadget.prototype.generateForm = function(gadget) {
parentEl.appendChild(formEl);
- var gadgetJS = require("SHARED/gadget");
- var saveEl = document.createElement("div");
- saveEl.className = this.cssClassGadgetUserPrefsDialogActionBar;
- saveEl.innerHTML = ' ';
- parentEl.appendChild(saveEl);
+ var gadget = this;
+ require(['SHARED/base'], function(base) {
+ var saveEl = document.createElement("div");
+ saveEl.className = gadget.cssClassGadgetUserPrefsDialogActionBar;
+ saveEl.innerHTML = ' ';
+ parentEl.appendChild(saveEl);
+ });
};
gadgets.IfrGadget.prototype.buildUserPrefsDialog = function(content) {
diff --git a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_de.properties b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_de.properties
index ccc9fd013..a5aa52906 100644
--- a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_de.properties
+++ b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_de.properties
@@ -1,4 +1,6 @@
-SessionTimeoutDie Benutzer-Sitzung ist abgelaufen! Aktualisieren Sie Ihren Browser.
-TargetBlockNotFoundDie zu aktualisierende Ziel-blockId wurde nicht gefunden: {0}
-BlockUpdateNotFoundDie zu aktualisierende blockId wurde nicht gefunden: {0}
-DefaultThemeStandard-Thema
\ No newline at end of file
+SessionTimeout=Die Benutzer-Sitzung ist abgelaufen! Aktualisieren Sie Ihren Browser.
+TargetBlockNotFound=Die zu aktualisierende Ziel-blockId wurde nicht gefunden: {0}
+BlockUpdateNotFound=Die zu aktualisierende blockId wurde nicht gefunden: {0}
+DefaultTheme=Standard-Thema
+Save=Speichern
+Cancel=Abbrechen
diff --git a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_en.properties b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_en.properties
index 7a4d4a33a..170486fcc 100644
--- a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_en.properties
+++ b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_en.properties
@@ -13,3 +13,6 @@ weekdays.wed=W
weekdays.thu=T
weekdays.fri=F
weekdays.sat=S
+GadgetDeletionConfirmation=Are you sure to delete this gadget?
+Save=Save
+Cancel=Cancel
\ No newline at end of file
diff --git a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_fr.properties b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_fr.properties
index 88934157d..441de84bb 100644
--- a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_fr.properties
+++ b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_fr.properties
@@ -13,3 +13,6 @@ weekdays.wed=M
weekdays.thu=J
weekdays.fri=V
weekdays.sat=S
+GadgetDeletionConfirmation=Voudriez-vous supprimer ce gadget?
+Save=Enregistrer
+Cancel=Annuler
diff --git a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_ru.properties b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_ru.properties
index 39bf833f6..93cdb7aab 100644
--- a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_ru.properties
+++ b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_ru.properties
@@ -2,3 +2,5 @@ SessionTimeout=\u0422\u0430\u0439\u043c-\u0430\u0443\u0442 \u0441\u0435\u0441\u0
TargetBlockNotFound=\u0426\u0435\u043b\u0435\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043b\u043e\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d: {0}
BlockUpdateNotFound=\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043b\u043e\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d: {0}
DefaultTheme=\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e
+Save=\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C
+Cancel=\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C
\ No newline at end of file
diff --git a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_vi.properties b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_vi.properties
index e8fe82e01..18b1d5c47 100644
--- a/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_vi.properties
+++ b/web/eXoResources/src/main/webapp/WEB-INF/classes/eXo/portal_vi.properties
@@ -12,4 +12,7 @@ weekdays.tue=T3
weekdays.wed=T4
weekdays.thu=T5
weekdays.fri=T6
-weekdays.sat=T7
\ No newline at end of file
+weekdays.sat=T7
+GadgetDeletionConfirmation=B\u1EA1n ch\u1EAFc ch\u1EAFn mu\u1ED1n xa Gadget ny?
+Save=L\u01B0u
+Cancel=H\u1EE7y
diff --git a/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml b/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
index 1dc7e6e39..83cd62a28 100644
--- a/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
+++ b/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
@@ -213,9 +213,15 @@
gadget
+ de
+ en
+ fr
+ ru
+ vi
common
diff --git a/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js b/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
index c44ed8708..1a6d35d5e 100644
--- a/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
+++ b/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
@@ -92,10 +92,8 @@ var eXoGadget = {
* @param {boolean} inDesktop use to realize UIDesktopPage or no
* @param {String} metadata metadata of gadget
*/
- init : function(uiGadget, confirmDeleteMsg)
+ init : function(uiGadget)
{
- _module.UIGadget.confirmDeleteGadget = confirmDeleteMsg;
-
if (typeof (uiGadget) == "string") uiGadget = document.getElementById(uiGadget);
var gadget = gj(uiGadget);
var portletFrag = gadget.closest(".PORTLET-FRAGMENT");
@@ -330,7 +328,8 @@ var eXoGadget = {
{
var portletID = portletFrag.parent().attr("id");
var dashboardID = gadget.closest(".UIDashboard").attr("id");
- if (confirm(_module.UIGadget.confirmDeleteGadget))
+
+ if (confirm("${GadgetDeletionConfirmation}"))
{
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + portletID;
href += "&portal:type=action&uicomponent=" + dashboardID;
@@ -358,7 +357,7 @@ var eXoGadget = {
{
//Code used for desktop page
var blockID = closeIcon.closest(".UIPage").find("div.id").html();
- if (confirm(_module.UIGadget.confirmDeleteGadget))
+ if (confirm("${GadgetDeletionConfirmation}"))
{
var params = [
{name: "objectId", value : gadget.attr("id")}
diff --git a/web/eXoResources/src/main/webapp/javascript/eXo/i18n/I18NMessage.js b/web/eXoResources/src/main/webapp/javascript/eXo/i18n/I18NMessage.js
index 968f8d2a8..9b1ebd077 100644
--- a/web/eXoResources/src/main/webapp/javascript/eXo/i18n/I18NMessage.js
+++ b/web/eXoResources/src/main/webapp/javascript/eXo/i18n/I18NMessage.js
@@ -58,7 +58,9 @@ eXo.i18n.I18NMessage = {
"${weekdays.thu}",
"${weekdays.fri}",
"${weekdays.sat}"
- ]
+ ],
+ Save : "${Save}",
+ Cancel : "${Cancel}"
};
-_module.I18NMessage = eXo.i18n.I18NMessage;
\ No newline at end of file
+_module.I18NMessage = eXo.i18n.I18NMessage;
diff --git a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
index d26966cb0..dc9233be8 100644
--- a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
+++ b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
@@ -1181,10 +1181,6 @@ ThemeDropDown.item.RoundConer=Runde-Ecken-Stile
UIAddGadgetPopup.title.UIDashboardSelectContainer=Dashboard Arbeitsbereich
UIDashboardSelectContainer.action.addGadget=Gadget hinzuf\u00fcgen
UIDashboardContainer.label.openWorkspace=Gadgets hinzuf\u00fcgen
-UIDashboardContainer.label.SaveTitle=Speichern
-UIDashboardContainer.label.CancelTitle=Abbrechen
-UIDashboardContainer.label.Debug=Debug
-UIDashboardContainer.label.Cache=Kein Cache
UIDashboardEditForm.label.totalColumns=Anzahl der Spalten
UIDashboardEditForm.label.isPrivate=Ist Privat:
UIDashboardEditForm.label.owner=Eigent\u00fcmer:
diff --git a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
index 74d67bc17..53a438bb2 100644
--- a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
+++ b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
@@ -1230,7 +1230,6 @@ UIDropDownPageTemp.item.tabsPageConfigs=Tabs Page Config
UIGadgetContainerManagement.action.close=Cancel
UIGadgetContainerManagement.action.save=#{word.save}
UIGadgetContainerManagement.confirm.DeleteContainer=Are you sure to delete this container?
-UIGadgetContainerManagement.confirm.DeleteGadget=Are you sure to delete this gadget?
UIGadgetContainerManagement.title.manager=Gadget Containers Management
UIGadgetContainerManagement.title.containers=Containers
UIGadgetContainerManagement.title.selectedContainer=Selected Gadget Container Info:
@@ -1300,10 +1299,6 @@ ThemeDropDown.item.RoundConer=Round Corner Style
UIAddGadgetPopup.title.UIDashboardSelectContainer=Dashboard Workspace
UIDashboardSelectContainer.action.addGadget=Add Gadget
UIDashboardContainer.label.openWorkspace=Add Gadgets
-UIDashboardContainer.label.SaveTitle=Save
-UIDashboardContainer.label.CancelTitle=Cancel
-UIDashboardContainer.label.Debug=Debug
-UIDashboardContainer.label.Cache=No Cache
UIDashboardEditForm.label.totalColumns=Number of columns:
UIDashboardEditForm.label.isPrivate=Is Private:
UIDashboardEditForm.label.owner=Owner:
diff --git a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
index a1d36983f..6fb54924d 100644
--- a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
+++ b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
@@ -1182,10 +1182,6 @@ ThemeDropDown.item.RoundConer=Style Angle Arrondi
UIAddGadgetPopup.title.UIDashboardSelectContainer=Dashboard
UIDashboardSelectContainer.action.addGadget=Ajouter Gadget
UIDashboardContainer.label.openWorkspace=Ajouter Gadgets
-UIDashboardContainer.label.SaveTitle=Enregistrer
-UIDashboardContainer.label.CancelTitle=Annuler
-UIDashboardContainer.label.Debug=Debug
-UIDashboardContainer.label.Cache=No Cache
UIDashboardEditForm.label.totalColumns=Nombre de colonnes:
UIDashboardEditForm.label.isPrivate=Est privé:
UIDashboardEditForm.label.owner=Propriétaire:
diff --git a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
index f8537dacd..7a30dc6dd 100644
--- a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
+++ b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
@@ -1142,10 +1142,6 @@ ThemeDropDown.item.RoundConer=Скругленный стиль
UIAddGadgetPopup.title.UIDashboardSelectContainer=Рабочая область доски
UIDashboardSelectContainer.action.addGadget=Добавить гаджет
UIDashboardContainer.label.openWorkspace=Добавить гаджет
-UIDashboardContainer.label.SaveTitle=Сохранить
-UIDashboardContainer.label.CancelTitle=Отменить
-UIDashboardContainer.label.Debug=Отладка
-UIDashboardContainer.label.Cache=Без кэширования
UIDashboardEditForm.label.totalColumns=Число колонок:
UIDashboardEditForm.label.isPrivate=Is Private:
UIDashboardEditForm.label.owner=Owner:
diff --git a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
index 93153668c..a727c3d5e 100644
--- a/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
+++ b/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
@@ -1218,10 +1218,6 @@ ThemeDropDown.item.RoundConer=Phong cách vòng góc
UIAddGadgetPopup.title.UIDashboardSelectContainer=Dashboard Workspace
UIDashboardSelectContainer.action.addGadget=Thêm Gadget
UIDashboardContainer.label.openWorkspace=Thêm Gadgets
-UIDashboardContainer.label.SaveTitle=Lưu
-UIDashboardContainer.label.CancelTitle=Hủy
-UIDashboardContainer.label.Debug=Debug
-UIDashboardContainer.label.Cache=Không lưu Cache
UIDashboardEditForm.label.totalColumns=Số cột
UIDashboardEditForm.label.isPrivate=Là trang cá nhân:
UIDashboardEditForm.label.owner=Chủ nhân:
diff --git a/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl b/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
index 16d0de22b..e7f18e872 100644
--- a/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
+++ b/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
@@ -15,9 +15,8 @@
def view = uicomponent.getView();
def userPref = null;
- def confirmDelete = _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget");
def reqJS = jsmanager.require("SHARED/gadget", "gadget")
- .addScripts("gadget.UIGadget.init('$id', '$confirmDelete');");
+ .addScripts("gadget.UIGadget.init('$id');");
def isLossData = uicomponent.isLossData();
if(!isLossData) {
@@ -25,8 +24,8 @@
metadata = uicomponent.getRpcMetadata();
userPref = uicomponent.getUserPref();
def noCache = uicomponent.isNoCache();
- def isDebug = uicomponent.isDebug();
- reqJS.addScripts("gadget.UIGadget.createGadget('$url','content-$id', $metadata, $userPref, '$view', '$hostName', " + (isDebug ? 1 : 0) + ", " + (noCache ? 1 : 0) + ");");
+ def isDebug = uicomponent.isDebug();
+ reqJS.addScripts("gadget.UIGadget.createGadget('$url','content-$id', $metadata, $userPref, '$view', '$hostName', " + (isDebug ? 1 : 0) + ", " + (noCache ? 1 : 0) + ");");
}
boolean isMini = Boolean.parseBoolean(uicomponent.getProperties().get("minimized"));
diff --git a/webui/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl b/webui/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl
index c65b512a1..75a5a5f1c 100644
--- a/webui/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl
+++ b/webui/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl
@@ -1,14 +1,4 @@
-<%
- import org.exoplatform.web.application.JavascriptManager;
-
- def rcontext = _ctx.getRequestContext() ;
- JavascriptManager jsmanager = rcontext.getJavascriptManager();
- jsmanager.require("SHARED/gadget", "gadget")
- .addScripts("gadget.UIGadget.SaveTitle='" + _ctx.appRes("UIDashboardContainer.label.SaveTitle") + "';")
- .addScripts("gadget.UIGadget.CancelTitle='" + _ctx.appRes("UIDashboardContainer.label.CancelTitle") + "';")
- .addScripts("gadget.UIGadget.Cache='" + _ctx.appRes("UIDashboardContainer.label.Cache") + "';")
- .addScripts("gadget.UIGadget.Debug='" + _ctx.appRes("UIDashboardContainer.label.Debug") + "';");
-
+<%
def maxiGadget = uicomponent.getMaximizedGadget();
%>