diff --git a/ui/config.js b/ui/config.js
new file mode 100644
index 000000000000..13a9dd17d588
--- /dev/null
+++ b/ui/config.js
@@ -0,0 +1,31 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+// Define custom options configurable by admins for UI
+cloudStackOptions = {
+ aboutText: "label.app.name",
+ aboutTitle: "label.about.app",
+ docTitle: "label.app.name",
+ helpURL: "http://docs.cloudstack.apache.org/",
+ keyboardOptions: {
+ "us": "label.standard.us.keyboard",
+ "uk": "label.uk.keyboard",
+ "fr": "label.french.azerty.keyboard",
+ "jp": "label.japanese.keyboard",
+ "sc": "label.simplified.chinese.keyboard"
+ }
+};
diff --git a/ui/index.html b/ui/index.html
index 6e33598ed9c4..15e58fcc091b 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -1741,6 +1741,7 @@
+
diff --git a/ui/l10n/en.js b/ui/l10n/en.js
index eb7b82250891..35de8664b90d 100644
--- a/ui/l10n/en.js
+++ b/ui/l10n/en.js
@@ -787,6 +787,7 @@ var dictionary = {
"label.format":"Format",
"label.format.lower":"format",
"label.friday":"Friday",
+"label.french.azerty.keyboard":"French AZERTY keyboard",
"label.full":"Full",
"label.full.path":"Full path",
"label.gateway":"Gateway",
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 7faa8c590ca0..3d9ae472f5cb 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -482,6 +482,6 @@
cloudStack.uiCustom.login(loginArgs);
- document.title = _l('label.app.name');
+ document.title = _l(cloudStackOptions.docTitle);
});
})(cloudStack, jQuery);
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 96660fac6804..b6e2d7bb364b 100755
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -449,22 +449,12 @@
id: "",
description: ""
});
- items.push({
- id: "us",
- description: "US Keboard"
- });
- items.push({
- id: "uk",
- description: "UK Keyboard"
- });
- items.push({
- id: "jp",
- description: "Japanese Keyboard"
- });
- items.push({
- id: "sc",
- description: "Simplified Chinese"
- });
+ for (var key in cloudStackOptions.keyboardOptions) {
+ items.push({
+ id: key,
+ description: _l(cloudStackOptions.keyboardOptions[key])
+ });
+ }
args.response.success({
data: items
});
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index 3f8bb445343c..09a3ebcbc70f 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -317,23 +317,20 @@
if (this == 'label.help') {
$link.addClass('help').click(function() {
- var helpURL = 'http://cloudstack.apache.org/';
-
- window.open(helpURL, '_blank');
-
+ window.open(cloudStackOptions.helpURL, '_blank');
return false;
});
}
if (this == 'label.about') {
$link.addClass('about').click(function() {
- var $logo = $('').addClass('logo').text(_l('label.app.name')),
- $version = $('
').addClass('version').text(g_cloudstackversion),
+ var $logo = $('
').addClass('logo').text(_l(cloudStackOptions.aboutText)),
+ $version = $('
').addClass('version').text(_l(g_cloudstackversion)),
$about = $('
').addClass('about').append($logo).append($version);
-
+
var $aboutDialog = $about.dialog({
modal: true,
width: 300,
- title: _l('label.about.app'),
+ title: _l(cloudStackOptions.aboutTitle),
closeOnEscape: false,
dialogClass: 'dialog-about',
buttons: {