Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - walledit.js (Старый размер - 9259 | Новый - 7066):
- 7. - if (cur.editingPost && (cur.editingPost[0] != post || cur.editingPost[1]) && ge('wpe_text')) {
- 8. + if (cur.editingPost && (cur.editingPost[0] != post || cur.editingPost[1])) {
- 13. - postNode;
- 14. - if (opts.reply == 'photo_comment') {
- 15. - postNode = ge('pv_comment' + post.replace(/(\d+)photo_(\d+)pv/, '$1_$2'));
- 16. - } else if (opts.reply == 'video_comment') {
- 17. - postNode = ge('mv_comment' + post.replace(/(\d+)video_(\d+)mv/, '$1_$2'));
- 18. - } else {
- 19. - postNode = ge('post' + post);
- 20. - }
- 21. + postNode = ge('post' + post);
- 31. - hide(geByClass1('wall_signed', domPN(node)));
- 33. - var likeWrap = geByClass1(opts.reply ? 'like_wrap' : 'post_full_like_wrap', postNode, 'div');
- 34. + var likeWrap = geByClass1(opts.reply ? 'like_wrap' : 'post_like_wrap', postNode, 'div');
- 52. - <div class="clear_fix"><textarea id="wpe_text" class="fl_l" on' + checkev + '="wall.checkPostLen(\'wpe_text\', \'wpe_warn\', this.value)" onkeypress="onCtrlEnter(event, WallEdit.savePost)">' + text + '</textarea></div>\
- 53. + <div class="clear_fix"><textarea id="wpe_text" class="fl_l" on' + checkev + '="' + (!opts.copy ? 'wall.checkPostLen(\'wpe_text\', \'wpe_warn\', this.value)' : 'wall.likeShareCheckLen(\'wpe_text\', \'wpe_warn\')') + '" onkeypress="onCtrlEnter(event, WallEdit.savePost)">' + text + '</textarea></div>\
- 56. - ' + (opts.signed ? ('<div id="wpe_signed" class="checkbox' + (opts.signed > 0 ? ' on' : '') + '" onclick="checkbox(this)"><div></div>' + getLang('wall_suggest_subscribe') + '</div>') : '') + '\
- 59. - ((!opts.noatt) ? '<div id="wpe_add_media" class="fl_r"><span class="add_media_lnk">' + getLang('global_add_media') + '</span></div>' : '') +
- 60. + ((!opts.copy) ? '<div id="wpe_add_media" class="fl_r"><span class="add_media_lnk">' + getLang('global_add_media') + '</span></div>' : '') +
- 73. - if (opts.noatt) {
- 74. + if (opts.copy) {
- 76. - addClass('wpe_media_preview', 'med_no_attach');
- 77. - show(node.previousSibling, 'wpe_media_preview');
- 78. - hide(node, acts, likeWrap);
- 79. + var previewEl = ge('wpe_media_preview');
- 80. + show(node.previousSibling, previewEl);
- 81. + replaceClass(previewEl, 'media_preview', 'multi_media_preview');
- 82. + hide(node, acts);
- 93. - var mediaTypes = [], mediaOpts, dis = [];
- 94. + var mediaTypes = [], mediaOpts;
- 98. - mediaTypes.push(this);
- 99. - }
- 100. - });
- 101. - dis = ['album'];
- 102. - } else if (opts.copy) {
- 103. - each (types, function () {
- 104. - if (inArray(this[0], ['photo', 'video', 'audio', 'doc', 'postpone'])) {
- 108. - dis = ['album', 'share', 'link', 'page'];
- 117. - options: {
- 118. - toId: post.split('_')[0],
- 119. - disabledTypes: dis,
- 120. - limit: opts.copy ? 1 : (opts.reply ? 2 : 10),
- 121. - toggleLnk: opts.reply || opts.copy,
- 122. - editable: !opts.reply && !opts.copy,
- 123. - sortable: !opts.reply && !opts.copy
- 124. - }
- 125. + options: {toId: post.split('_')[0], limit: opts.reply ? 2 : 10, toggleLnk: opts.reply}
- 127. - if (opts.teWidth) mediaOpts.options.teWidth = opts.teWidth;
- 128. - if (opts.teHeight) mediaOpts.options.teHeight = opts.teHeight;
- 129. - if (opts.reply == 'photo_comment' || opts.reply == 'video_comment') {
- 130. - mediaOpts.options.nocl = 1;
- 131. - }
- 152. - cancelEditPost: function(data, html, fronly) {
- 153. + cancelEditPost: function(data, html) {
- 185. - var dcont = geByClass1('rel_date', acts);
- 186. - if (postponeDate) {
- 187. - if (html && dcont) {
- 188. - dcont.innerHTML = html;
- 189. - }
- 190. - var fronlyEl = geByClass1('page_fronly', node.parentNode);
- 191. - if (fronly && !fronlyEl) {
- 192. - if (info.nextSibling) info.parentNode.insertBefore(se(fronly), info.nextSibling);
- 193. - else info.parentNode.appendChild(se(fronly));
- 194. - } else if (!fronly && fronlyEl) {
- 195. - re(fronlyEl);
- 196. - }
- 197. + if (postponeDate && html) {
- 198. + geByClass1('rel_date', acts).innerHTML = html;
- 201. - if (post.match(/^-?\d+photo_/)) {
- 202. - window.Photoview && Photoview.commSaved(post);
- 203. - } else if (post.match(/^-?\d+video_/)) {
- 204. - window.Videoview && Videoview.commSaved(post);
- 205. - }
- 210. - show(geByClass1('wall_signed', domPN(node)));
- 228. - params = Composer.getSendParams(composer, WallEdit.savePost),
- 229. - from = cur.onepost ? 'one' : ((window.wkcur || {}).shown ? 'wk' : '');
- 230. -
- 231. - if (opts.from) {
- 232. - from = opts.from;
- 233. - } else if (post.match(/^-?\d+photo_/) && cur.pvShown) {
- 234. - from = 'photo';
- 235. - } else if (post.match(/^-?\d+video_/) && window.mvcur && mvcur.mvShown && !mvcur.minimized) {
- 236. - from = 'video';
- 237. - }
- 238. + params = Composer.getSendParams(composer, WallEdit.savePost);
- 249. - signed: isChecked('wpe_signed'),
- 250. - from: from
- 251. + from: cur.onepost ? 'one' : ''
- ------
Advertisement
Add Comment
Please, Sign In to add comment