mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Merge branch 'feature-1004' into feature-992
This commit is contained in:
commit
d1b6d31655
@ -1053,7 +1053,8 @@ SUNSTONE_PUBLIC_JS_PLUGINS_FILES="\
|
||||
src/sunstone/public/js/plugins/users-tab.js \
|
||||
src/sunstone/public/js/plugins/vms-tab.js \
|
||||
src/sunstone/public/js/plugins/acls-tab.js \
|
||||
src/sunstone/public/js/plugins/vnets-tab.js"
|
||||
src/sunstone/public/js/plugins/vnets-tab.js \
|
||||
src/sunstone/public/js/plugins/config-tab.js"
|
||||
|
||||
SUNSTONE_PUBLIC_CSS_FILES="src/sunstone/public/css/application.css \
|
||||
src/sunstone/public/css/layout.css \
|
||||
|
@ -45,3 +45,7 @@
|
||||
:user:
|
||||
:group:
|
||||
oneadmin: true
|
||||
- plugins/config-tab.js:
|
||||
:ALL: true
|
||||
:user:
|
||||
:group:
|
||||
|
@ -169,15 +169,3 @@ background-image: -moz-linear-gradient(
|
||||
#navigation li:hover a, .navigation-active-li-a {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
#language {
|
||||
float:right;
|
||||
margin-top:2px;
|
||||
margin-right:25px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#language select {
|
||||
width: 100px;
|
||||
height: 22px;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ function tr(str){
|
||||
//Updates template and session configuration and reloads the view.
|
||||
function setLang(lang_str){
|
||||
var lang_tmp="";
|
||||
var dialog = $('<div title="Changing language">Loading new language... please wait '+spinner+'</div>').dialog({
|
||||
var dialog = $('<div title="'+tr("Changing language")+'">'+tr("Loading new language... please wait")+' '+spinner+'</div>').dialog({
|
||||
draggable:false,
|
||||
modal:true,
|
||||
resizable:false,
|
||||
@ -79,12 +79,6 @@ function setLang(lang_str){
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
if (lang)
|
||||
$('#lang_sel option[value="'+lang+'"]').attr('selected','selected');
|
||||
$('#lang_sel').change(function(){
|
||||
setLang($(this).val());
|
||||
});
|
||||
|
||||
//Update static translations
|
||||
$('#doc_link').text(tr("Documentation"));
|
||||
$('#support_link').text(tr("Support"));
|
||||
|
58
src/sunstone/public/js/plugins/config-tab.js
Normal file
58
src/sunstone/public/js/plugins/config-tab.js
Normal file
@ -0,0 +1,58 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */
|
||||
/* */
|
||||
/* Licensed 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. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
var config_tab_content =
|
||||
'<form>\
|
||||
<table id="config_table" style="width:100%">\
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>' + tr("Sunstone UI Configuration") + '</h3>\
|
||||
<div class="panel_info">\
|
||||
\
|
||||
<table class="info_table">\
|
||||
<tr>\
|
||||
<td class="key_td">' + tr("Language") + '</td>\
|
||||
<td class="value_td">\
|
||||
<select id="lang_sel" style="width:20em;">\
|
||||
<option value="en_US">'+tr("English")+'</option>\
|
||||
<option value="ru">'+tr("Russian")+'</option>\
|
||||
</select>\
|
||||
</td>\
|
||||
</tr>\
|
||||
</table>\
|
||||
\
|
||||
</div>\
|
||||
</div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
</table></form>';
|
||||
|
||||
var config_tab = {
|
||||
title: tr("Configuration"),
|
||||
content: config_tab_content
|
||||
}
|
||||
|
||||
Sunstone.addMainTab('config_tab',config_tab);
|
||||
|
||||
$(document).ready(function(){
|
||||
if (lang)
|
||||
$('table#config_table #lang_sel option[value="'+lang+'"]').attr('selected','selected');
|
||||
$('table#config_table #lang_sel').change(function(){
|
||||
setLang($(this).val());
|
||||
});
|
||||
|
||||
});
|
@ -51,9 +51,11 @@ locale={
|
||||
"Change group":"",
|
||||
"Change owner":"",
|
||||
"Change password":"",
|
||||
"Changing language":"",
|
||||
"Clone":"",
|
||||
"Clone this image":"",
|
||||
"Community":"",
|
||||
"Configuration":"",
|
||||
"Confirmation of action":"",
|
||||
"Context":"",
|
||||
"Context variable name and value must be filled in":"",
|
||||
@ -114,6 +116,7 @@ locale={
|
||||
"Dummy":"",
|
||||
"EC2":"",
|
||||
"Enable":"",
|
||||
"English":"",
|
||||
"Error":"",
|
||||
"failed":"",
|
||||
"fd":"",
|
||||
@ -186,6 +189,7 @@ locale={
|
||||
"Keyboard configuration locale to use in the VNC display":"",
|
||||
"Keymap":"",
|
||||
"KVM":"",
|
||||
"Language":"",
|
||||
"LCM State":"",
|
||||
"Lease IP":"",
|
||||
"Lease MAC (opt):":"",
|
||||
@ -314,6 +318,7 @@ locale={
|
||||
"running":"",
|
||||
"Running VMs":"",
|
||||
"Running #VMS":"",
|
||||
"Russian":"",
|
||||
"Save":"",
|
||||
"Save as":"",
|
||||
"Saveas for VM with ID":"",
|
||||
@ -353,6 +358,7 @@ locale={
|
||||
"Stop":"",
|
||||
"Submitted":"",
|
||||
"Summary of resources":"",
|
||||
"Sunstone UI Configuration":"",
|
||||
"Support":"",
|
||||
"Suspend":"",
|
||||
"Swap":"",
|
||||
|
@ -68,14 +68,6 @@
|
||||
<div id="login-info">
|
||||
<span id="welcome">Welcome</span> <span id="user"></span> | <a href="#" id="logout">Sign Out</a>
|
||||
</div>
|
||||
<div id="language">
|
||||
<form>
|
||||
<select id="lang_sel">
|
||||
<option value="en_US">English</option>
|
||||
<option value="ru">Russian</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
<div id="links">
|
||||
<a href="http://opennebula.org/documentation:documentation" target="_blank" id="doc_link">Documentation</a> |
|
||||
<a href="http://opennebula.org/support:support" target="_blank" id="support_link">Support</a> |
|
||||
|
Loading…
x
Reference in New Issue
Block a user