Hormold

VK Change (#1355329214)

Dec 12th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.60 KB | None | 0 0
  1. Файл - video.js:
  2. 134.  -   privateTooltip: function(obj) {
  3. 135.  -     showTooltip(obj, {
  4. 136.  -       black: 1,
  5. 137.  -       text: '<div style="padding: 2px;">'+getLang('video_is_private_tt')+'</div>',
  6. 138.  -       center: 0,
  7. 139.  -       shift: [14, 6, 0],
  8. 140.  -     });
  9. 141.  -
  10. 142.  -   },
  11. 143.  -   privateClick: function(obj, ev) {
  12. 144.  -     geByClass1('video_row_icon_edit', obj.parentNode.parentNode.parentNode).click();
  13. 145.  -     return cancelEvent(ev);
  14. 146.  -
  15. 147.  -   },
  16. 248.  -       if (cur.sections[i][0] > 0) {
  17. 249.  -         albums.push(cur.sections[i]);
  18. 250.  +       if (i > 0) {
  19. 251.  +         albums.push([i, cur.sections[i][0]]);
  20. 322.  -     var vidCont = ge('video_row'+oid+'_'+vid);
  21. 323.  -     cur.restoreRaw[oid+'_'+vid] = vidCont.innerHTML;
  22. 324.  -     addClass(vidCont, 'video_row_loading');
  23. 325.  +     cur.restoreRaw[oid+'_'+vid] = ge('video_row'+oid+'_'+vid).innerHTML;
  24. 335.  -       for(var i in cur.sections) {
  25. 336.  -         if (cur.sections[i][0] == -1) {
  26. 337.  -           a.unshift([-1, cur.sections[i][1]]);
  27. 338.  -         }
  28. 339.  +       if (cur.sections[-1]) {
  29. 340.  +         a.unshift([-1, cur.sections[-1][0]]);
  30. 351.  -           var shown = isVisible('video_albums_more');
  31. 352.  -           html += '<a class="video_albums_show_more" onclick="Video.showAlbums(this)" style="'+(shown ? 'display: none' : '')+'">'+albumsMore+'</a><div id="video_albums_more" style="'+(shown ? 'display: block' : '')+'">';
  32. 353.  +           html += '<a class="video_albums_show_more" onclick="Video.showAlbums(this)">'+albumsMore+'</a><div id="video_albums_more">';
  33. 356.  -         for(var i in cur.sections) {
  34. 357.  -           if (cur.sections[i][0] == alb) {
  35. 358.  -             var v = cur.sections[i];
  36. 359.  -           }
  37. 360.  -         }
  38. 361.  -         var title = v[1];
  39. 362.  +         var v = cur.sections[alb];
  40. 363.  +         var title = v[0];
  41. 369.  -       }
  42. 370.  -       if (num > 3) {
  43. 371.  -         html += '</div>';
  44. 380.  -       if (cur.sections[i][0] > 0) {
  45. 381.  +       if (i > 0) {
  46. 386.  -       cur.sections.push(newList[i]);
  47. 387.  +       cur.sections[i] = newList[i];
  48. 400.  -       if (cur.cansort) {
  49. 401.  -         qsorter.update(cur.vRows, {dragEls: geByClass('video_album_candrop', cur.albumsCont)});
  50. 402.  -       }
  51. 657.  -         if (vk.id == cur.oid || (cur.oid < 0 && cur.isGroupAdmin)) {
  52. 658.  -           str += '<span class="divider">|</span><span><a onclick="Video.deleteAlbum(\'' + cur.vSection + '\');">' + getLang('video_delete_album') + '</a></span>';
  53. 659.  -         }
  54. 660.  +         str += '<span class="divider">|</span><span><a onclick="Video.deleteAlbum(\'' + cur.vSection + '\');">' + getLang('video_delete_album') + '</a></span>';
  55. 801.  -     }
  56. 802.  -     if (cur.cansort) {
  57. 803.  -       qsorter.added(cur.vRows);
  58. 805.  +
  59. 859.  -     if (v[3].length > 44) {
  60. 860.  -       v[3] = trim(v[3].substr(0, 42))+'..';
  61. 861.  -     }
  62. 865.  -     return cur.videoTpl(v, (v[11].substr(0, 1) != '_') ? ' video_can_edit' : '');
  63. 866.  +     return cur.videoTpl(v, v[11] ? ' video_can_edit' : '');
  64. 1091.  -       } else {
  65. 1092.  -         var tabName = '';
  66. 1093.  -         for (var i in cur.sections) {
  67. 1094.  -           if (cur.sections[i][0] == ((section == 'tagged') ? -1 :  parseInt(section.substr(6)))) {
  68. 1095.  -             tabName = cur.sections[i][1];
  69. 1096.  -           }
  70. 1097.  -
  71. 1098.  -         }
  72. 1099.  +       } else if (cur.sections[(section == 'tagged') ? -1 :  parseInt(section.substr(6))]) {
  73. 1100.  +         var tabName = cur.sections[(section == 'tagged') ? -1 :  parseInt(section.substr(6))][0];
  74. 1120.  -     if (cur.cansort) {
  75. 1121.  -       qsorter.update(cur.vRows, {dragEls: geByClass('video_album_candrop', cur.albumsCont)});
  76. 1122.  -     }
  77. 1124.  -   deleteAlbum: function(section, ev) {
  78. 1125.  +   deleteAlbum: function(section) {
  79. 1127.  -     return cancelEvent(ev);
  80. 1128.  -   },
  81. 1129.  -   editAlbum: function(aid, ev) {
  82. 1130.  -     showBox('al_video.php', {act: 'edit_album', oid: cur.oid, aid: aid, oid: cur.oid});
  83. 1131.  -     return cancelEvent(ev);
  84. 1162.  -   },
  85. 1163.  -   albumOver: function(obj) {
  86. 1164.  -     if (cur.canEditAlbums && obj.id.split('_')[2] > 0) {
  87. 1165.  -       Video.activate(geByClass1('video_album_controls', obj));
  88. 1166.  -     }
  89. 1167.  -   },
  90. 1168.  -   albumOut: function(obj) {
  91. 1169.  -     if (cur.canEditAlbums) {
  92. 1170.  -       Video.deactivate(geByClass1('video_album_controls', obj), 0);
  93. 1171.  -     }
  94. 1172.  -   },
  95. 1173.  -
  96. 1174.  -   addFromList: function(videoRaw, hash, ev) {
  97. 1175.  -     var videoCont = ge('video_cont'+videoRaw);
  98. 1176.  -     if (hasClass(videoCont, 'video_row_added')) {
  99. 1177.  -       return cancelEvent(ev);
  100. 1178.  -     }
  101. 1179.  -     videoview.addVideo(videoRaw, hash, false, false, false, 'list');
  102. 1180.  -       var videoEl = geByClass1('video_row_icon_add', videoCont);
  103. 1181.  -       if (videoEl && videoEl.tt) {
  104. 1182.  -         videoEl.tt.hide();
  105. 1183.  -       }
  106. 1184.  -     return cancelEvent(ev);
  107. 1186.  -
  108. 1188.  -     var animEl = geByClass1((hasClass(obj.parentNode, 'video_can_edit')) ? 'video_row_controls' :  'video_row_add', obj);
  109. 1189.  -     Video.activate(animEl);
  110. 1190.  +     if (hasClass(obj.parentNode, 'video_can_edit')) {
  111. 1191.  +       Video.activate(geByClass1('video_row_controls', obj));
  112. 1192.  +     }
  113. 1195.  -     var animEl = geByClass1((hasClass(obj.parentNode, 'video_can_edit')) ? 'video_row_controls' :  'video_row_add', obj);
  114. 1196.  -     Video.deactivate(animEl, 0);
  115. 1197.  +     if (hasClass(obj.parentNode, 'video_can_edit')) {
  116. 1198.  +       Video.deactivate(geByClass1('video_row_controls', obj), 0);
  117. 1199.  +     }
  118. 1201.  -   activate: function(obj, ttLng, check) {
  119. 1202.  +   activate: function(obj) {
  120. 1204.  -     if (ttLng) {
  121. 1205.  -       if (check == 1 && hasClass(obj.parentNode.parentNode.parentNode.parentNode, 'video_row_added')) {
  122. 1206.  -         return false;
  123. 1207.  -       }
  124. 1208.  -       showTooltip(obj, {
  125. 1209.  -         black: 1,
  126. 1210.  -         center: 1,
  127. 1211.  -         shift: [0,2,0],
  128. 1212.  -         text: getLang('video_'+ttLng)
  129. 1213.  -       });
  130. 1214.  -     }
  131. 1261.  -       onDone: function(text, newList) {
  132. 1262.  -         showDoneBox(text);
  133. 1263.  -         Video.updateAlbums(newList);
  134. 1264.  -         /*moveEl.innerHTML = text;
  135. 1265.  +       onDone: function(text) {
  136. 1266.  +         moveEl.innerHTML = text;
  137. 1269.  -         setTimeout(Video.albumDragOut.pbind(el), 3000);*/
  138. 1270.  +         setTimeout(Video.albumDragOut.pbind(el), 3000);
  139. ------
  140. Файл - video.css:
  141. 364.  - .video_row_controls, .video_album_controls, .video_row_add {
  142. 365.  + .video_row_controls {
  143. 381.  -   display: block;
  144. 382.  - }
  145. 383.  - .video_albums_can_edit .video_album_controls {
  146. 393.  -   opacity: 0.8;
  147. 394.  -   filter: alpha(opacity=80);
  148. 395.  - }
  149. 396.  - .video_row_icon_add {
  150. 397.  -   padding: 6px 3px 6px 4px;
  151. 406.  - }
  152. 407.  - .video_row_icon_add .video_row_icon {
  153. 408.  -   width: 16px;
  154. 409.  -   background: url(/images/icons/audio_icons.png?2) -92px -51px no-repeat;
  155. 410.  - }
  156. 411.  - .video_row_added .video_row_icon_add .video_row_icon {
  157. 412.  -   background: url(/images/icons/audio_icons.png?2) -184px -51px no-repeat;
  158. 509.  -   color: #000000;
  159. 580.  -   margin: 0px 10px 15px 0px;
  160. 714.  - }
  161. 715.  - .video_album_text {
  162. 716.  -   overflow: hidden;
  163. 717.  -   text-overflow: ellipsis;
  164. 718.  -   width: 154px;
  165. 719.  -   height: 12px;
  166. 720.  - }
  167. 721.  - .video_is_private {
  168. 722.  -   display: inline-block;
  169. 723.  -   *display: block;
  170. 724.  -   zoom: 1;
  171. 725.  -   background: url(/images/icons/photo_icons.png?2) 0 -34px no-repeat;
  172. 726.  -   width: 10px;
  173. 727.  -   height: 12px;
  174. 728.  -   margin-left: 4px;
  175. 729.  -   margin-bottom: -2px;
  176. ------
  177. Файл - videoview.js:
  178. 874.  - addVideo: function(videoRaw, hash, obj, gid, accessHash, from) {
  179. 875.  + addVideo: function(videoRaw, hash, obj, gid, accessHash) {
  180. 881.  -       from: from || 'videoviewer'
  181. 882.  +       from: 'videoviewer'
  182. 890.  -       from: from || 'videoviewer',
  183. 891.  +       from: 'videoviewer',
  184. 913.  -       }
  185. 914.  -       if (window.mvcur) {
  186. 915.  -         if (mvcur.mvData && mvcur.mvData.afterAdd) {
  187. 916.  -           mvcur.mvData.afterAdd(row[0]+'_'+row[1], shareHash);
  188. 917.  -         } else {
  189. 918.  -           mvcur.mvData.addedVideo = row[0]+'_'+row[1];
  190. 919.  -           mvcur.mvData.addedVideoHash = hash;
  191. 920.  -           mvcur.mvData.addedVideoShareHash = shareHash;
  192. 921.  -         }
  193. 922.  -       }
  194. 923.  -       var videoEl = ge('video_cont'+videoRaw);
  195. 924.  -       if (videoEl) {
  196. 925.  -         addClass(videoEl, 'video_row_added');
  197. 927.  -       if (from == 'list') {
  198. 928.  -         showDoneBox(text);
  199. 929.  +       if (mvcur.mvData && mvcur.mvData.afterAdd) {
  200. 930.  +         mvcur.mvData.afterAdd(row[0]+'_'+row[1], shareHash);
  201. 931.  +       } else {
  202. 932.  +         mvcur.mvData.addedVideo = row[0]+'_'+row[1];
  203. 933.  +         mvcur.mvData.addedVideoHash = hash;
  204. 934.  +         mvcur.mvData.addedVideoShareHash = shareHash;
  205. 1025.  -   showBox('like.php', {act: 'publish_box', object: 'video'+(mvcur.mvData.addedVideo || videoRaw)});
  206. 1026.  -   return false;
  207. 1027.  +   mvcur.mvData.afterAdd = function(video, hash) {
  208. 1028.  +
  209. 1029.  +     var mv = mvcur.mvData, object = 'video' + video, current = (mv.videoRaw == video);
  210. 1030.  +     var el = current ? ge('like_share_video' + video) : false, was = current && isChecked(el);
  211. 1031.  +     if (current) checkbox(el);
  212. 1032.  +     ajax.post('like.php', {act: 'a_do_' + (was ? 'un' : '') + 'publish', object: object, hash: hash, short_view: 1, from: 'videoview'}, {
  213. 1033.  +       onDone: current && function(count, title) {
  214. 1034.  +         videoview.likeUpdate(true, count, title, true);
  215. 1035.  +       }
  216. 1036.  +     });
  217. 1037.  +     if (current) videoview.likeUpdate(true, mv.likes + (mv.liked ? 0 : 1), undefined, true);
  218. 1038.  +
  219. 1039.  +     delete mvcur.mvData.afterAdd;
  220. 1040.  +   }
  221. 1041.  +   if (mvcur.mvData.addedVideo) {
  222. 1042.  +     mvcur.mvData.afterAdd(mvcur.mvData.addedVideo, mvcur.mvData.addedVideoShareHash);
  223. 1043.  +     addClass(ge('mv_like_line'), 'video_posted');
  224. 1044.  +   }
  225. 1137.  +   }
  226. 1138.  +   if (from == 'list' && cur.restoreRaw && cur.restoreRaw[oid+'_'+vid]) {
  227. 1139.  +     var row = ge('video_row'+oid+'_'+vid);
  228. 1140.  +     row.innerHTML = cur.restoreRaw[oid+'_'+vid];
  229. 1141.  +     removeClass(row, 'video_row_deleted');
  230. 1142.  +     setStyle(geByClass1('video_row_icon_delete', row), {opacity: 0.8});
  231. 1143.  +     var skipClear = true;
  232. 1144.  +   } else {
  233. 1145.  +     var skipClear = false;
  234. 1155.  -       if (from == 'list' && cur.restoreRaw && cur.restoreRaw[oid+'_'+vid]) {
  235. 1156.  -         var rowCont = ge('video_row'+oid+'_'+vid);
  236. 1157.  -         rowCont.innerHTML = cur.restoreRaw[oid+'_'+vid];
  237. 1158.  -
  238. 1159.  -         removeClass(rowCont, 'video_row_loading');
  239. 1160.  -         removeClass(rowCont, 'video_row_deleted');
  240. 1161.  -         setStyle(geByClass1('video_row_icon_delete', rowCont), {opacity: 0.8});
  241. 1162.  -         var skipClear = true;
  242. 1163.  -       } else {
  243. 1164.  -         var skipClear = false;
  244. 1165.  -       }
  245. 1180.  -     },
  246. 1181.  -     onFail: function(text) {
  247. 1182.  -       setTimeout(showFastBox(getLang('global_error'), text).hide, 5000);
  248. 1183.  -       return true;
  249. 1224.  -           Video.removeFromLists(oid+'_'+vid);
  250. 1225.  +           Video.removeFromLists({oid: oid, vid: vid});
  251. 1234.  -         Video.removeFromLists(oid+'_'+vid, true);
  252. 1235.  +         Video.removeFromLists({oid: oid, vid: vid}, true);
  253. 1370.  -           Video.removeFromLists(oid+'_'+vid);
  254. 1371.  +           Video.removeFromLists({oid: oid, vid: vid});
  255. 1375.  -         Video.removeFromLists(oid+'_'+vid, true);
  256. 1376.  +         Video.removeFromLists({oid: oid, vid: vid}, true);
  257. ------
  258. Файл - videoview.css:
  259. 717.  -   padding: 6px 4px 7px;
  260. 719.  - #mv_title_text, #mv_create_album {
  261. 720.  + #mv_title_text {
  262. ------
Advertisement
Add Comment
Please, Sign In to add comment