Skip to content
Permalink
Browse files

More history from Pi

  • Loading branch information...
Thoulah committed Apr 13, 2019
1 parent 2c8b19f commit e1a44519020f20864a9329f23237790a1d220e80
@@ -1,4 +1,4 @@
function print_psk(key) {
function printPsk(key) {
$('#wpapsk .suppress').removeAttr('disabled');
$('.current-progress, .field-wpapsk-psk').toggleClass('d-none');
$('.progress-bar').width('');
@@ -9,7 +9,7 @@ function status(done) {
$('.progress-bar').width(Math.round(done) + '%');
}

function cal_psk() {
function calcPsk() {
$.each($('#wpapsk').data('yiiActiveForm').attributes, function() {
this.status = 3;
});
@@ -23,9 +23,9 @@ function cal_psk() {
$('.field-wpapsk-psk').addClass('d-none');
$('.current-progress').removeClass('d-none');
var pskgen = new PBKDF2($('#wpapsk-password').val(), $('#wpapsk-ssid').val(), 4096, 32);
pskgen.deriveKey(status, print_psk)
pskgen.deriveKey(status, printPsk)
}

function reset_psk() {
function resetPsk() {
$('.current-progress, .field-wpapsk-psk').addClass('d-none');
}
@@ -10,7 +10,7 @@ cb.on('success', function(e) {
});

cb.on('error', function(e) {
actionKey = (action === 'cut' ? 'X' : 'C');
var actionKey = (action === 'cut' ? 'X' : 'C');
if (/iPhone|iPad/i.test(navigator.userAgent)) {
btnSucces('No support');
} else if (/Mac/i.test(navigator.userAgent)) {
@@ -1,6 +1,6 @@
$('#formContent').keyup(function() {
len = $(this).val().length;
char = formCharCount.chars - len;
var len = $(this).val().length;
var char = formCharCount.chars - len;

if(len > formCharCount.chars) {
$('#chars').html(formCharCount.lang.overLimit).addClass('alert-danger')
@@ -1,8 +1,8 @@
btn = $('#btn-scrolltop');
tp = $('html, body').offset().top + 150;
var btn = $('#btn-scrolltop');
var tp = $('html, body').offset().top + 150;

$(document).on('scroll', function() {
pos = $(window).scrollTop();
var pos = $(window).scrollTop();
if (pos > tp && !btn.is(':visible')) {
btn.fadeIn();
} else if (pos < tp && btn.is(':visible')) {
@@ -1,14 +1,14 @@
function rndpass(length) {
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
pass = "";
for(x=0; x<length; x++) {
i = Math.floor(Math.random() * chars.length);
var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
var pass = "";
for(var x=0; x<length; x++) {
var i = Math.floor(Math.random() * chars.length);
pass += chars.charAt(i)
}
return pass
return pass;
}

function get() {
$("[name='password']").val(rndpass($("[name='length']").val()));
return false
return false;
}
@@ -107,6 +107,7 @@
'Last Name' => 'Nachname',
'Last Name (phonetic)' => 'Nachname (Lautschrift)',
'Last Week' => 'Letzte Woche',
'Last Year' => 'Letztes Jahr',
'Last.fm Username' => 'Last.fm Benutzername',
'Latitude' => 'Breitengrad',
'Leave a Comment' => 'Schreibe einen Kommentar',
@@ -235,6 +236,7 @@
'With this calculator you can check the date and time in any timezone around the world.' => 'Mit diesem Rechner können Sie Datum und Uhrzeit in jeder Zeitzone auf der ganzen Welt überprüfen.',
'Work Address' => 'Adresse (arbeit)',
'Work Telephone Number' => 'Telefonnummer (arbeit)',
'Year' => 'Jahr',
'You cannot renew your subscription for more than three years.' => 'Sie können Ihr Abonnement nicht länger als drei Jahre verlängern.',
'You may use {markdown} and {age} to show your age, calculated from <nobr>{birthday}</nobr>. HTML is not allowed.' => 'Sie können {markdown} und {age} verwenden, um Ihr Alter anzuzeigen, berechnet von <nobr>{birthday}</nobr>. HTML ist nicht erlaubt.',
'You may use {markdown}. HTML is not allowed.' => 'Sie können {markdown} verwenden. HTML ist nicht erlaubt.',
@@ -107,6 +107,7 @@
'Last Name' => 'Фамилия',
'Last Name (phonetic)' => 'Фамилия (фонетическая)',
'Last Week' => 'Прошлая неделя',
'Last Year' => 'Прошлый год',
'Last.fm Username' => 'Имя пользователя Last.fm',
'Latitude' => 'Широта',
'Leave a Comment' => 'Оставить комментарий',
@@ -235,6 +236,7 @@
'With this calculator you can check the date and time in any timezone around the world.' => 'С помощью этого калькулятора вы можете проверить дату и время в любом часовом поясе по всему миру.',
'Work Address' => 'Рабочий адрес',
'Work Telephone Number' => 'Рабочий номер телефона',
'Year' => 'Год',
'You cannot renew your subscription for more than three years.' => 'Вы не можете продлить подписку на более чем три года.',
'You may use {markdown} and {age} to show your age, calculated from <nobr>{birthday}</nobr>. HTML is not allowed.' => 'Вы можете использовать {markdown} и {age}, чтобы показать свой возраст, рассчитанный с <nobr>{birthday}</nobr>. HTML не разрешен.',
'You may use {markdown}. HTML is not allowed.' => 'Вы можете использовать {markdown}. HTML не разрешен.',
@@ -12,8 +12,8 @@
$model = new Wpapsk;
ClipboardJsAsset::register($this);
$this->registerJs(Yii::$app->formatter->jspack('calculator/wpapsk.js'), View::POS_HEAD);
$this->registerJs('reset_psk();', View::POS_READY);
$this->registerJs('$("input").keypress(function(e){if(e.which==13){cal_psk();return false}});', View::POS_READY);
$this->registerJs('resetPsk();', View::POS_READY);
$this->registerJs('$("input").keypress(function(e){if(e.which==13){calcPsk();return false}});', View::POS_READY);
$this->registerJs(Yii::$app->formatter->jspack('calculator/pbkdf2.js'), View::POS_END);
$this->registerJs(Yii::$app->formatter->jspack('calculator/sha1.js'), View::POS_END);
@@ -52,8 +52,8 @@
, ['class' => 'd-none form-group current-progress']);
echo Html::tag('div',
Html::resetButton(Yii::t('mr42', 'Reset'), ['class' => 'btn btn-default ml-1 suppress', 'tabindex' => $tab + 2, 'onclick' => 'reset_psk()']).
Html::button(Yii::t('mr42', 'Calculate'), ['class' => 'btn btn-primary ml-1 suppress', 'tabindex' => ++$tab, 'onclick' => 'cal_psk()'])
Html::resetButton(Yii::t('mr42', 'Reset'), ['class' => 'btn btn-default ml-1 suppress', 'tabindex' => $tab + 2, 'onclick' => 'resetPsk()']).
Html::button(Yii::t('mr42', 'Calculate'), ['class' => 'btn btn-primary ml-1 suppress', 'tabindex' => ++$tab, 'onclick' => 'calcPsk()'])
, ['class' => 'btn-toolbar float-right form-group']);
ActiveForm::end();
@@ -9,6 +9,7 @@
'day' => ['short' => Yii::t('mr42', 'Day'), 'long' => Yii::t('mr42', 'Last Day')],
'week' => ['short' => Yii::t('mr42', 'Week'), 'long' => Yii::t('mr42', 'Last Week')],
'month' => ['short' => Yii::t('mr42', 'Month'), 'long' => Yii::t('mr42', 'Last Month')],
'year' => ['short' => Yii::t('mr42', 'Year'), 'long' => Yii::t('mr42', 'Last Year')],
];
$datatype = [
'tempload' => Yii::t('mr42', 'Temperature & Load'),

0 comments on commit e1a4451

Please sign in to comment.
You can’t perform that action at this time.