mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Move content of .js.html files to .html
This commit is contained in:
parent
61e556ae11
commit
1fa3c4b3fb
43 changed files with 550 additions and 507 deletions
|
@ -450,3 +450,47 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php insert_scripts(); ?>
|
||||
<script>
|
||||
function WEBrandom() {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var webrandom = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
webrandom += chars.substr(rnum, 1);
|
||||
}
|
||||
document.v_edit_web.v_stats_password.value = webrandom;
|
||||
}
|
||||
|
||||
function FTPrandom(elm) {
|
||||
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
|
||||
var string_length = 10;
|
||||
var ftprandomstring = '';
|
||||
for (var i = 0; i < string_length; i++) {
|
||||
var rnum = Math.floor(Math.random() * chars.length);
|
||||
ftprandomstring += chars.substr(rnum, 1);
|
||||
}
|
||||
|
||||
$(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring);
|
||||
App.Actions.WEB.randomPasswordGenerated && App.Actions.WEB.randomPasswordGenerated(elm);
|
||||
}
|
||||
|
||||
function elementHideShow(elementToHideOrShow){
|
||||
var el = document.getElementById(elementToHideOrShow);
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$('#vstobjects').bind('submit', function(evt) {
|
||||
$('input[disabled]').each(function(i, elm) {
|
||||
var copy_elm = $(elm).clone(true);
|
||||
$(copy_elm).attr('type', 'hidden');
|
||||
$(copy_elm).removeAttr('disabled');
|
||||
$(elm).after(copy_elm);
|
||||
});
|
||||
});
|
||||
|
||||
GLOBAL.FTP_USER_PREFIX = <?=json_encode($user.'_')?>;
|
||||
</script>
|
||||
<script src="/js/pages/edit.web.js"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue