Изменения
Перейти к навигации
Перейти к поиску
Строка 34:
Строка 34:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Строка 66:
Строка 94:
− +
+
+
+
+
+
+
+
+
− var instance = new CommentToVk(); +
MediaWiki:Gadget-CommentsToVk.js (посмотреть исходный код)
Версия от 16:41, 30 июля 2016
, 16:41, 30 июля 2016нет описания правки
}, 0);
}, 0);
}
}
var publishDialog = this.publishDialog = $('<div id="commentsToVkDialog" title="Добавить комментарий в очередь"></div>')
var publishForm = $('<form></form>')
publishForm.appendTo(publishDialog);
var publishFormText = this.publishFormText = $('<textarea rows="10" cols="80"></textarea>')
publishForm.appendTo(publishForm);
var publishFormLink = this.publishFormLink = $('<input type="url"></input>')
publishForm.appendTo(publishForm);
var publishFormTime = this.publishFormTime = $('<input type="datetime"></input>')
publishForm.appendTo(publishForm);
publishDialog.dialog({
autoOpen : false,
height : 'auto',
width : 'auto',
modal : true,
buttons : {
Submit : function() {
},
Cancel : function() {
publishDialog.dialog("close");
}
},
});
}
}
}
}
CommentToVk.prototype.dialogPublish = function() {
CommentToVk.prototype.dialogPublish = function(cItem) {
var container = $(item).find(".c-container");
var comment = $(item).find(".c-comment");
var link = $(container.finc("a")[0]).attr('href');
link = link.split('#')[0];
var text = comment.text();
this.publishFormText = text;
this.publishFormLink = link;
this.publishDialog.dialog('open');
}
}
if (wgArticleId == 5168) {
if (wgArticleId == 5168) {
new CommentToVk();
}
}
})();
})();