mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
Pre release
This commit is contained in:
parent
230c93fbe1
commit
3c81394a3e
25 changed files with 2486 additions and 124 deletions
|
@ -11,9 +11,9 @@ $('document').ready(function() {
|
|||
App.Utils.detectBrowser();
|
||||
App.Ref.init();
|
||||
|
||||
App.Env.world = 'USER';
|
||||
//App.Env.world = 'USER';
|
||||
// Disabled cookie tab restoring. Enable if needed
|
||||
/*if ('undefined' != typeof App.Tmp.loadTAB) {
|
||||
if ('undefined' != typeof App.Tmp.loadTAB) {
|
||||
App.Env.world = App.Tmp.loadTAB;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ $('document').ready(function() {
|
|||
else {
|
||||
App.Env.world = App.Constants.TABS[0];
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
App.Pages.init();
|
||||
App.Core.listen();
|
||||
|
|
|
@ -59,11 +59,12 @@ App.Messages.get = function(key, plural) {
|
|||
}
|
||||
|
||||
// Imutable
|
||||
App.Settings.Imutable = {};
|
||||
App.Settings.Imutable.USER = ['LOGIN_NAME'];
|
||||
App.Settings.Imutable.DB = ['DB', 'TYPE', 'USER'];
|
||||
App.Settings.Imutable.DNS = ['DNS_DOMAIN'];
|
||||
App.Settings.Imutable.IP = ['INTERFACE'];
|
||||
App.Settings.Imutable = {};
|
||||
App.Settings.Imutable.USER = ['LOGIN_NAME'];
|
||||
App.Settings.Imutable.WEB_DOMAIN = ['DOMAIN'];
|
||||
App.Settings.Imutable.DB = ['DB', 'TYPE', 'USER', 'CHARSET', 'HOST'];
|
||||
App.Settings.Imutable.DNS = ['DNS_DOMAIN'];
|
||||
App.Settings.Imutable.IP = ['IP_ADDRESS', 'NETMASK', 'INTERFACE'];
|
||||
|
||||
|
||||
// Empty
|
||||
|
|
|
@ -87,7 +87,7 @@ App.Actions.update_cs_value = function(evt)
|
|||
|
||||
if (App.Tmp[App.Env.world + '_selected_records'] > 0) {
|
||||
var confirm_message_key = App.Tmp[App.Env.world + '_selected_records'] == 1 ? 1 + ' record' : App.Tmp[App.Env.world + '_selected_records'] + ' records';
|
||||
var confirmed = confirm('This action will ' + val.toLowerCase() + ' ' + confirm_message_key + '. Do you want to proceede?');
|
||||
var confirmed = confirm('This action will ' + val.toLowerCase() + ' ' + confirm_message_key + '. Do you want to proceed?');
|
||||
if (confirmed) {
|
||||
fb.log('mass_' + val);
|
||||
var func_name = val.toLowerCase();
|
||||
|
|
|
@ -110,7 +110,7 @@ App.HTML.Build.user_form = function (options, id) {
|
|||
ns[ns.length++] = App.Templates.get('PLUS_ONE_NS', 'user').finalize();
|
||||
tpl.set(':NS', ns.done());
|
||||
} else {
|
||||
// tpl.set(':NS', '');
|
||||
tpl.set(':NS', '');
|
||||
}
|
||||
tpl = App.HTML.setTplKeys(tpl, options, true);
|
||||
tpl = App.HTML.Build.user_selects(tpl, options);
|
||||
|
@ -664,27 +664,14 @@ App.HTML.Build.db_selects = function (tpl, options) {
|
|||
});
|
||||
tpl.set(':TYPE_OPTIONS', acc.done());
|
||||
|
||||
acc = [];
|
||||
var items = App.Env.initialParams.DB.HOST;
|
||||
$.each(items, function (val) {
|
||||
var tpl = App.Templates.get('select_option', 'general');
|
||||
tpl.set(':VALUE', val);
|
||||
tpl.set(':TEXT', items[val]);
|
||||
tpl.set(':SELECTED', val == options.HOST ? 'selected="selected"' : '');
|
||||
acc[acc.length++] = tpl.finalize();
|
||||
});
|
||||
tpl.set(':HOST_OPTIONS', acc.done());
|
||||
var obj = App.Env.initialParams.DB.HOST;
|
||||
var opts = App.HTML.Build.options(obj, options.HOST);
|
||||
tpl.set(':HOST_OPTIONS', opts);
|
||||
|
||||
acc = [];
|
||||
var items = App.Env.initialParams.DB.ENCODING;
|
||||
$.each(items, function (val) {
|
||||
var tpl = App.Templates.get('select_option', 'general');
|
||||
tpl.set(':VALUE', val);
|
||||
tpl.set(':TEXT', items[val]);
|
||||
tpl.set(':SELECTED', val == options.ENCODING ? 'selected="selected"' : '');
|
||||
acc[acc.length++] = tpl.finalize();
|
||||
});
|
||||
tpl.set(':ENCODING_OPTIONS', acc.done());
|
||||
|
||||
var obj = App.Env.initialParams.DB.CHARSET;
|
||||
var opts = App.HTML.Build.options(obj, options.CHARSET);
|
||||
tpl.set(':CHARSET_OPTIONS', opts);
|
||||
|
||||
return tpl;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ Visit http://ryanfait.com/ for more information.
|
|||
|
||||
var checkboxHeight = "25";
|
||||
var radioHeight = "25";
|
||||
var selectWidth = "210";
|
||||
var selectWidth = "230";
|
||||
|
||||
|
||||
/* No need to change anything after this */
|
||||
|
@ -47,6 +47,9 @@ var Custom = {
|
|||
if ($(inputs[a]).attr('class').indexOf('do_action_toggle_batch_selector') != -1) {
|
||||
span[a].className += ' do_action_toggle_batch_selector'; // save toggle functionality
|
||||
}
|
||||
if ($(inputs[a]).attr('class').indexOf('do_action_toggle_ssl_support') != -1) {
|
||||
span[a].className += ' do_action_toggle_ssl_support'; // save toggle functionality
|
||||
}
|
||||
|
||||
|
||||
if(inputs[a].checked == true) {
|
||||
|
|
|
@ -70,7 +70,8 @@ App.Pages.USER.new_entry = function(evt)
|
|||
$(box).find('.suspended').addClass('hidden');
|
||||
App.Ref.CONTENT.prepend($(box).html());
|
||||
App.Helpers.updateScreen();
|
||||
$('#'+form_id).find('.ns-entry, .additional-ns-add').addClass('hidden');
|
||||
$('#'+form_id).find('.ns-entry, .additional-ns-add').addClass('hidden').find('.rule-required').removeClass('rule-required');
|
||||
$('#'+form_id).find('.shell-entry').addClass('hidden');
|
||||
}
|
||||
|
||||
App.Pages.WEB_DOMAIN.new_entry = function(evt)
|
||||
|
|
|
@ -144,14 +144,14 @@ App.Templates.html = {
|
|||
</select>\
|
||||
<span class="context-settings do_action_view_dns_template_settings">View template settings</span>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">TTL:</label>\
|
||||
<input type="text" value="~!:TTL~!" name="TTL" class="text-field ttl-field rule-required rule-numeric">\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">SOA:</label>\
|
||||
<input type="text" value="~!:SOA~!" name="SOA" class="text-field rule-required rule-ns">\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
|
||||
|
@ -241,7 +241,7 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">value:</label>\
|
||||
<input type="text" value="~!:RECORD_VALUE~!" name="RECORD_VALUE" class="text-field">\
|
||||
</div>\
|
||||
<div class="delete-record do_action_delete_subentry"></div>\
|
||||
<!-- div class="delete-record do_action_delete_subentry"></div -->\
|
||||
</div>']
|
||||
},
|
||||
ip: {
|
||||
|
@ -403,12 +403,12 @@ App.Templates.html = {
|
|||
~!:PACKAGE_OPTIONS~!\
|
||||
</select>\
|
||||
</div>\
|
||||
<!-- div class="form-row cc">\
|
||||
<div class="form-row shell-entry cc">\
|
||||
<label for="#" class="field-label">Shell:</label>\
|
||||
<select class="styled disabled" name="SHELL">\
|
||||
~!:SHELL_OPTIONS~!\
|
||||
</select>\
|
||||
</div -->\
|
||||
</div>\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">role:</label>\
|
||||
<select class="styled" name="ROLE">\
|
||||
|
@ -641,10 +641,10 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">Domain Aliases:</label>\
|
||||
<textarea name="ALIAS" class="textarea rule-alias">~!:ALIAS~!</textarea>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">Nginx extensions:</label>\
|
||||
<textarea name="NGINX_EXT" class="textarea rule-list">~!:NGINX_EXT~!</textarea>\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Statistics:</label>\
|
||||
<select name="STAT" class="styled">~!:STAT_OPTIONS~!</select>\
|
||||
|
@ -860,14 +860,14 @@ App.Templates.html = {
|
|||
<span class="generate-pwd do_action_generate_pass">Generate</span>\
|
||||
</div>\
|
||||
</div>\
|
||||
<!--div class="form-row hidden cc">\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Host:</label>\
|
||||
<select name="HOST" class="styled">~!:HOST_OPTIONS~!</select>\
|
||||
</div -->\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">Encoding:</label>\
|
||||
<select name="ENCODING" class="styled">~!:ENCODING_OPTIONS~!</select>\
|
||||
</div -->\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Character Set:</label>\
|
||||
<select name="CHARSET" class="styled">~!:CHARSET_OPTIONS~!</select>\
|
||||
</div>\
|
||||
<div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
|
||||
|
@ -912,10 +912,10 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="props-ext">\
|
||||
<!-- span class="backup-db do_action_backup_db">backup</span-->\
|
||||
<!-- span class="prop-box">\
|
||||
<span class="prop-title">encoding:</span>\
|
||||
<span class="prop-value">~!:ENCODING~!</span>\
|
||||
</span -->\
|
||||
<span class="prop-box">\
|
||||
<span class="prop-title">Character Set:</span>\
|
||||
<span class="prop-value">~!:CHARSET~!</span>\
|
||||
</span>\
|
||||
<!-- disk usage block -->\
|
||||
<div class="b-usage-box disk-usage cc">\
|
||||
<div class="usage-box">\
|
||||
|
|
1151
web/js/templates_admin.js
Normal file
1151
web/js/templates_admin.js
Normal file
File diff suppressed because it is too large
Load diff
1151
web/js/user_templates.js
Normal file
1151
web/js/user_templates.js
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue