Изменения

Перейти к навигации Перейти к поиску
нет описания правки
Строка 1: Строка 1: −
(function() {
+
{{Преподаватель
 +
|Фотография=Devyaterikov_Ivan_Petrovich_1.gif
 +
|Дата рождения =1939
 +
|Дата смерти=10.8.2021
 +
|Бывшие кафедры=Кафедра теоретической механики
 +
|Бывшие предметы=Теоретическая механика
 +
|Учёная степень=Кандидат физико-математических наук
 +
|Другие фотографии=Devyaterikov_Ivan_Petrovich_2.jpeg, Девятериков Иван Петрович 3.jpeg,
 +
}}
 +
Был доцентом, зам. зав. [[Кафедра теоретической механики|кафедрой теоретической механики]], к.ф.-м.н.
 +
По сообщениям читателей портала (см. ниже), умер в августе 2021 г.
   −
CommentToVk = function() {
+
Прекрасно знает предмет, более того, очень им увлечен. Объясняет прекрасно. Рассказывает четко, ясно, неторопливо, в то же время успевает рассказать все. С дамами галантен... пропустит вперед - и только. Девчонки сдают ему так же, как все. Задание принимает долго. Необходимое условие сдачи - наличие его лекций. После сдачи в голове наступает прояснение. На экзамене спрашивает в точности то, что спрашивал на задании у своих групп. Очень язвительный человек. А еще любит на экзамене улыбаться, а если студен чего-то не знает, может и накричать, тогда выше 3-х баллов не ожидается.
var instance = this;
     −
var loginDiv = this.loginDiv = $('<div id="vkLoginStatus" style="float: right;"></div>');
+
Похож на гномика, особенно после зимних каникул (он каждый год ухитряется себе чего-нибудь повредить и немерено загореть в каком-нибудь походе). Если и похож на Фунтика, то это весьма язвительный Фунтик. Одет в костюм с каким-нибудь совершенно диким галстуком.
var loginLabel = this.loginLabel = $('<h4>Пользователь не авторизован</h4>');
  −
loginLabel.appendTo(loginDiv);
     −
var btnLogin = $("<button>Login</button>");
+
== Ссылки ==
btnLogin.button();
+
* [http://parus-mfti.narod.ru/hist.html О нём (дата рождения)] // Яхт-клуб МФТИ
btnLogin.click(function() {
  −
instance.login();
  −
});
  −
loginDiv.append(btnLogin);
     −
loginDiv.prependTo($("#bodyContent"));
+
{{комментарии}}
 
  −
if ($("#vk_api_transport").length == 0) {
  −
$(document.body).append($('<div id="vk_api_transport"></div>'));
  −
 
  −
window.vkAsyncInit = function() {
  −
VK.init({
  −
apiId : 2654830
  −
});
  −
};
  −
 
  −
setTimeout(function() {
  −
var el = document.createElement("script");
  −
el.type = "text/javascript";
  −
el.src = "//vk.com/js/api/openapi.js";
  −
el.async = true;
  −
document.getElementById("vk_api_transport").appendChild(el);
  −
}, 0);
  −
}
  −
 
  −
var publishDialog = this.publishDialog = $('<div id="commentsToVkDialog" title="Добавить комментарий в очередь"></div>')
  −
var publishForm = $('<form></form>')
  −
publishForm.appendTo(publishDialog);
  −
 
  −
var publishFormFieldset = $('<fieldset></fieldset>')
  −
publishFormFieldset.appendTo(publishForm);
  −
 
  −
var publishFormText = this.publishFormText = $('<textarea rows="10" cols="80"></textarea>')
  −
publishFormFieldset.append(publishFormText);
  −
publishFormFieldset.append('<br>');
  −
 
  −
var publishFormLink = this.publishFormLink = $('<input type="url"></input>')
  −
publishFormFieldset.append(publishFormLink);
  −
publishFormFieldset.append('<br>');
  −
 
  −
var publishFormTime = this.publishFormTime = $('<input type="datetime"></input>')
  −
publishFormFieldset.append(publishFormTime);
  −
publishFormFieldset.append('<br>');
  −
 
  −
publishDialog.dialog({
  −
autoOpen : false,
  −
height : 'auto',
  −
width : 'auto',
  −
modal : true,
  −
buttons : {
  −
Submit : function() {
  −
instance.publish();
  −
},
  −
Cancel : function() {
  −
publishDialog.dialog("close");
  −
}
  −
},
  −
});
  −
 
  −
$.datetimepicker.setLocale('ru');
  −
}
  −
 
  −
CommentToVk.prototype.login = function() {
  −
var instance = this;
  −
 
  −
VK.Auth.login(function(result) {
  −
if (result.status === 'connected') {
  −
var user = result.session.user;
  −
instance.loginLabel.text('Авторизован: ' + user.first_name
  −
+ ' ' + user.last_name);
  −
 
  −
instance.appendPublishButtons();
  −
}
  −
});
  −
}
  −
 
  −
CommentToVk.prototype.appendPublishButtons = function() {
  −
var instance = this;
  −
 
  −
$(".c-item").each(function(index, item) {
  −
var container = $(item).find(".c-container");
  −
 
  −
var btnPublish = $("<button>Publish</button>");
  −
btnPublish.button();
  −
btnPublish.click(function() {
  −
instance.dialogPublish($(item));
  −
});
  −
container.append($("<br>"));
  −
container.append(btnPublish);
  −
});
  −
}
  −
 
  −
CommentToVk.prototype.dialogPublish = function(cItem) {
  −
var container = $(cItem).find(".c-container");
  −
var comment = $(cItem).find(".c-comment");
  −
var link = $(container.find("a")[0]).attr('href');
  −
link = link.split('#')[0];
  −
var text = comment.text();
  −
 
  −
this.publishFormText.val(text);
  −
this.publishFormLink.val(link);
  −
this.publishDialog.dialog('open');
  −
 
  −
var lastDate;
  −
if (typeof localStorage['CommentsToVk_lastDate'] === 'undefined') {
  −
lastDate = new Date();
  −
} else {
  −
var lastDate = new Date(1 * localStorage['CommentsToVk_lastDate']);
  −
lastDate = new Date(Math.max(new Date().getTime(), lastDate
  −
.getTime()));
  −
}
  −
nextDate = new Date(
  −
(Math.floor(lastDate.getTime() / 1000.0 / 60 / 60) + 1) * 1000 * 60 * 60);
  −
 
  −
this.publishFormTime.datetimepicker({
  −
format : 'H:i:s d.m.Y',
  −
value : nextDate.toLocaleTimeString("ru-RU") + ' '
  −
+ nextDate.toLocaleDateString("ru-RU")
  −
});
  −
}
  −
 
  −
CommentToVk.prototype.publish = function() {
  −
var link = this.publishFormLink.val();
  −
var text = this.publishFormText.val();
  −
var date = this.publishFormTime.datetimepicker('getValue');
  −
var timestamp = Math.round(date.getTime() / 1000);
  −
 
  −
VK.Api.call('wall.post', {
  −
owner_id : -47630162,
  −
from_group : 1,
  −
message : text + '\n\n' + link,
  −
signed : 0,
  −
publish_date : Math.floor(date.getTime() / 1000),
  −
}, function(r) {
  −
console.log(r);
  −
if (r.response) {
  −
localStorage['CommentsToVk_lastDate'] = date.getTime();
  −
this.publishDialog.dialog("close");
  −
return;
  −
}
  −
if (r.error) {
  −
alert(r.error.error_msg);
  −
}
  −
});
  −
}
  −
 
  −
if (wgArticleId == 5168) {
  −
new CommentToVk();
  −
}
  −
})();
 

Навигация