Изменения

Перейти к навигации Перейти к поиску
нет описания правки
Строка 125: Строка 125:     
this.publishFormTime.datetimepicker({
 
this.publishFormTime.datetimepicker({
format : 'hh:ii:ss dd.mm.YY',
+
format : 'H:i:s d.m.Y',
 
value : nextDate.toLocaleTimeString("ru-RU") + ' '
 
value : nextDate.toLocaleTimeString("ru-RU") + ' '
 
+ nextDate.toLocaleDateString("ru-RU")
 
+ nextDate.toLocaleDateString("ru-RU")
Строка 132: Строка 132:     
CommentToVk.prototype.publish = function() {
 
CommentToVk.prototype.publish = function() {
 +
var instance = this;
 
var link = this.publishFormLink.val();
 
var link = this.publishFormLink.val();
 
var text = this.publishFormText.val();
 
var text = this.publishFormText.val();
Строка 141: Строка 142:  
from_group : 1,
 
from_group : 1,
 
message : text,
 
message : text,
 +
attachments : link,
 
signed : 0,
 
signed : 0,
 
publish_date : Math.floor(date.getTime() / 1000),
 
publish_date : Math.floor(date.getTime() / 1000),
 
}, function(r) {
 
}, function(r) {
 
console.log(r);
 
console.log(r);
 +
if (r.response) {
 +
localStorage['CommentsToVk_lastDate'] = date.getTime();
 +
instance.publishDialog.dialog("close");
 +
return;
 +
}
 +
if (r.error) {
 +
alert(r.error.error_msg);
 +
}
 
});
 
});
 
}
 
}
Анонимный участник

Навигация