Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - video.js:
- 134. - privateTooltip: function(obj) {
- 135. - showTooltip(obj, {
- 136. - black: 1,
- 137. - text: '<div style="padding: 2px;">'+getLang('video_is_private_tt')+'</div>',
- 138. - center: 0,
- 139. - shift: [14, 6, 0],
- 140. - });
- 141. -
- 142. - },
- 143. - privateClick: function(obj, ev) {
- 144. - geByClass1('video_row_icon_edit', obj.parentNode.parentNode.parentNode).click();
- 145. - return cancelEvent(ev);
- 146. -
- 147. - },
- 248. - if (cur.sections[i][0] > 0) {
- 249. - albums.push(cur.sections[i]);
- 250. + if (i > 0) {
- 251. + albums.push([i, cur.sections[i][0]]);
- 322. - var vidCont = ge('video_row'+oid+'_'+vid);
- 323. - cur.restoreRaw[oid+'_'+vid] = vidCont.innerHTML;
- 324. - addClass(vidCont, 'video_row_loading');
- 325. + cur.restoreRaw[oid+'_'+vid] = ge('video_row'+oid+'_'+vid).innerHTML;
- 335. - for(var i in cur.sections) {
- 336. - if (cur.sections[i][0] == -1) {
- 337. - a.unshift([-1, cur.sections[i][1]]);
- 338. - }
- 339. + if (cur.sections[-1]) {
- 340. + a.unshift([-1, cur.sections[-1][0]]);
- 351. - var shown = isVisible('video_albums_more');
- 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' : '')+'">';
- 353. + html += '<a class="video_albums_show_more" onclick="Video.showAlbums(this)">'+albumsMore+'</a><div id="video_albums_more">';
- 356. - for(var i in cur.sections) {
- 357. - if (cur.sections[i][0] == alb) {
- 358. - var v = cur.sections[i];
- 359. - }
- 360. - }
- 361. - var title = v[1];
- 362. + var v = cur.sections[alb];
- 363. + var title = v[0];
- 369. - }
- 370. - if (num > 3) {
- 371. - html += '</div>';
- 380. - if (cur.sections[i][0] > 0) {
- 381. + if (i > 0) {
- 386. - cur.sections.push(newList[i]);
- 387. + cur.sections[i] = newList[i];
- 400. - if (cur.cansort) {
- 401. - qsorter.update(cur.vRows, {dragEls: geByClass('video_album_candrop', cur.albumsCont)});
- 402. - }
- 657. - if (vk.id == cur.oid || (cur.oid < 0 && cur.isGroupAdmin)) {
- 658. - str += '<span class="divider">|</span><span><a onclick="Video.deleteAlbum(\'' + cur.vSection + '\');">' + getLang('video_delete_album') + '</a></span>';
- 659. - }
- 660. + str += '<span class="divider">|</span><span><a onclick="Video.deleteAlbum(\'' + cur.vSection + '\');">' + getLang('video_delete_album') + '</a></span>';
- 801. - }
- 802. - if (cur.cansort) {
- 803. - qsorter.added(cur.vRows);
- 805. +
- 859. - if (v[3].length > 44) {
- 860. - v[3] = trim(v[3].substr(0, 42))+'..';
- 861. - }
- 865. - return cur.videoTpl(v, (v[11].substr(0, 1) != '_') ? ' video_can_edit' : '');
- 866. + return cur.videoTpl(v, v[11] ? ' video_can_edit' : '');
- 1091. - } else {
- 1092. - var tabName = '';
- 1093. - for (var i in cur.sections) {
- 1094. - if (cur.sections[i][0] == ((section == 'tagged') ? -1 : parseInt(section.substr(6)))) {
- 1095. - tabName = cur.sections[i][1];
- 1096. - }
- 1097. -
- 1098. - }
- 1099. + } else if (cur.sections[(section == 'tagged') ? -1 : parseInt(section.substr(6))]) {
- 1100. + var tabName = cur.sections[(section == 'tagged') ? -1 : parseInt(section.substr(6))][0];
- 1120. - if (cur.cansort) {
- 1121. - qsorter.update(cur.vRows, {dragEls: geByClass('video_album_candrop', cur.albumsCont)});
- 1122. - }
- 1124. - deleteAlbum: function(section, ev) {
- 1125. + deleteAlbum: function(section) {
- 1127. - return cancelEvent(ev);
- 1128. - },
- 1129. - editAlbum: function(aid, ev) {
- 1130. - showBox('al_video.php', {act: 'edit_album', oid: cur.oid, aid: aid, oid: cur.oid});
- 1131. - return cancelEvent(ev);
- 1162. - },
- 1163. - albumOver: function(obj) {
- 1164. - if (cur.canEditAlbums && obj.id.split('_')[2] > 0) {
- 1165. - Video.activate(geByClass1('video_album_controls', obj));
- 1166. - }
- 1167. - },
- 1168. - albumOut: function(obj) {
- 1169. - if (cur.canEditAlbums) {
- 1170. - Video.deactivate(geByClass1('video_album_controls', obj), 0);
- 1171. - }
- 1172. - },
- 1173. -
- 1174. - addFromList: function(videoRaw, hash, ev) {
- 1175. - var videoCont = ge('video_cont'+videoRaw);
- 1176. - if (hasClass(videoCont, 'video_row_added')) {
- 1177. - return cancelEvent(ev);
- 1178. - }
- 1179. - videoview.addVideo(videoRaw, hash, false, false, false, 'list');
- 1180. - var videoEl = geByClass1('video_row_icon_add', videoCont);
- 1181. - if (videoEl && videoEl.tt) {
- 1182. - videoEl.tt.hide();
- 1183. - }
- 1184. - return cancelEvent(ev);
- 1186. -
- 1188. - var animEl = geByClass1((hasClass(obj.parentNode, 'video_can_edit')) ? 'video_row_controls' : 'video_row_add', obj);
- 1189. - Video.activate(animEl);
- 1190. + if (hasClass(obj.parentNode, 'video_can_edit')) {
- 1191. + Video.activate(geByClass1('video_row_controls', obj));
- 1192. + }
- 1195. - var animEl = geByClass1((hasClass(obj.parentNode, 'video_can_edit')) ? 'video_row_controls' : 'video_row_add', obj);
- 1196. - Video.deactivate(animEl, 0);
- 1197. + if (hasClass(obj.parentNode, 'video_can_edit')) {
- 1198. + Video.deactivate(geByClass1('video_row_controls', obj), 0);
- 1199. + }
- 1201. - activate: function(obj, ttLng, check) {
- 1202. + activate: function(obj) {
- 1204. - if (ttLng) {
- 1205. - if (check == 1 && hasClass(obj.parentNode.parentNode.parentNode.parentNode, 'video_row_added')) {
- 1206. - return false;
- 1207. - }
- 1208. - showTooltip(obj, {
- 1209. - black: 1,
- 1210. - center: 1,
- 1211. - shift: [0,2,0],
- 1212. - text: getLang('video_'+ttLng)
- 1213. - });
- 1214. - }
- 1261. - onDone: function(text, newList) {
- 1262. - showDoneBox(text);
- 1263. - Video.updateAlbums(newList);
- 1264. - /*moveEl.innerHTML = text;
- 1265. + onDone: function(text) {
- 1266. + moveEl.innerHTML = text;
- 1269. - setTimeout(Video.albumDragOut.pbind(el), 3000);*/
- 1270. + setTimeout(Video.albumDragOut.pbind(el), 3000);
- ------
- Файл - video.css:
- 364. - .video_row_controls, .video_album_controls, .video_row_add {
- 365. + .video_row_controls {
- 381. - display: block;
- 382. - }
- 383. - .video_albums_can_edit .video_album_controls {
- 393. - opacity: 0.8;
- 394. - filter: alpha(opacity=80);
- 395. - }
- 396. - .video_row_icon_add {
- 397. - padding: 6px 3px 6px 4px;
- 406. - }
- 407. - .video_row_icon_add .video_row_icon {
- 408. - width: 16px;
- 409. - background: url(/images/icons/audio_icons.png?2) -92px -51px no-repeat;
- 410. - }
- 411. - .video_row_added .video_row_icon_add .video_row_icon {
- 412. - background: url(/images/icons/audio_icons.png?2) -184px -51px no-repeat;
- 509. - color: #000000;
- 580. - margin: 0px 10px 15px 0px;
- 714. - }
- 715. - .video_album_text {
- 716. - overflow: hidden;
- 717. - text-overflow: ellipsis;
- 718. - width: 154px;
- 719. - height: 12px;
- 720. - }
- 721. - .video_is_private {
- 722. - display: inline-block;
- 723. - *display: block;
- 724. - zoom: 1;
- 725. - background: url(/images/icons/photo_icons.png?2) 0 -34px no-repeat;
- 726. - width: 10px;
- 727. - height: 12px;
- 728. - margin-left: 4px;
- 729. - margin-bottom: -2px;
- ------
- Файл - videoview.js:
- 874. - addVideo: function(videoRaw, hash, obj, gid, accessHash, from) {
- 875. + addVideo: function(videoRaw, hash, obj, gid, accessHash) {
- 881. - from: from || 'videoviewer'
- 882. + from: 'videoviewer'
- 890. - from: from || 'videoviewer',
- 891. + from: 'videoviewer',
- 913. - }
- 914. - if (window.mvcur) {
- 915. - if (mvcur.mvData && mvcur.mvData.afterAdd) {
- 916. - mvcur.mvData.afterAdd(row[0]+'_'+row[1], shareHash);
- 917. - } else {
- 918. - mvcur.mvData.addedVideo = row[0]+'_'+row[1];
- 919. - mvcur.mvData.addedVideoHash = hash;
- 920. - mvcur.mvData.addedVideoShareHash = shareHash;
- 921. - }
- 922. - }
- 923. - var videoEl = ge('video_cont'+videoRaw);
- 924. - if (videoEl) {
- 925. - addClass(videoEl, 'video_row_added');
- 927. - if (from == 'list') {
- 928. - showDoneBox(text);
- 929. + if (mvcur.mvData && mvcur.mvData.afterAdd) {
- 930. + mvcur.mvData.afterAdd(row[0]+'_'+row[1], shareHash);
- 931. + } else {
- 932. + mvcur.mvData.addedVideo = row[0]+'_'+row[1];
- 933. + mvcur.mvData.addedVideoHash = hash;
- 934. + mvcur.mvData.addedVideoShareHash = shareHash;
- 1025. - showBox('like.php', {act: 'publish_box', object: 'video'+(mvcur.mvData.addedVideo || videoRaw)});
- 1026. - return false;
- 1027. + mvcur.mvData.afterAdd = function(video, hash) {
- 1028. +
- 1029. + var mv = mvcur.mvData, object = 'video' + video, current = (mv.videoRaw == video);
- 1030. + var el = current ? ge('like_share_video' + video) : false, was = current && isChecked(el);
- 1031. + if (current) checkbox(el);
- 1032. + ajax.post('like.php', {act: 'a_do_' + (was ? 'un' : '') + 'publish', object: object, hash: hash, short_view: 1, from: 'videoview'}, {
- 1033. + onDone: current && function(count, title) {
- 1034. + videoview.likeUpdate(true, count, title, true);
- 1035. + }
- 1036. + });
- 1037. + if (current) videoview.likeUpdate(true, mv.likes + (mv.liked ? 0 : 1), undefined, true);
- 1038. +
- 1039. + delete mvcur.mvData.afterAdd;
- 1040. + }
- 1041. + if (mvcur.mvData.addedVideo) {
- 1042. + mvcur.mvData.afterAdd(mvcur.mvData.addedVideo, mvcur.mvData.addedVideoShareHash);
- 1043. + addClass(ge('mv_like_line'), 'video_posted');
- 1044. + }
- 1137. + }
- 1138. + if (from == 'list' && cur.restoreRaw && cur.restoreRaw[oid+'_'+vid]) {
- 1139. + var row = ge('video_row'+oid+'_'+vid);
- 1140. + row.innerHTML = cur.restoreRaw[oid+'_'+vid];
- 1141. + removeClass(row, 'video_row_deleted');
- 1142. + setStyle(geByClass1('video_row_icon_delete', row), {opacity: 0.8});
- 1143. + var skipClear = true;
- 1144. + } else {
- 1145. + var skipClear = false;
- 1155. - if (from == 'list' && cur.restoreRaw && cur.restoreRaw[oid+'_'+vid]) {
- 1156. - var rowCont = ge('video_row'+oid+'_'+vid);
- 1157. - rowCont.innerHTML = cur.restoreRaw[oid+'_'+vid];
- 1158. -
- 1159. - removeClass(rowCont, 'video_row_loading');
- 1160. - removeClass(rowCont, 'video_row_deleted');
- 1161. - setStyle(geByClass1('video_row_icon_delete', rowCont), {opacity: 0.8});
- 1162. - var skipClear = true;
- 1163. - } else {
- 1164. - var skipClear = false;
- 1165. - }
- 1180. - },
- 1181. - onFail: function(text) {
- 1182. - setTimeout(showFastBox(getLang('global_error'), text).hide, 5000);
- 1183. - return true;
- 1224. - Video.removeFromLists(oid+'_'+vid);
- 1225. + Video.removeFromLists({oid: oid, vid: vid});
- 1234. - Video.removeFromLists(oid+'_'+vid, true);
- 1235. + Video.removeFromLists({oid: oid, vid: vid}, true);
- 1370. - Video.removeFromLists(oid+'_'+vid);
- 1371. + Video.removeFromLists({oid: oid, vid: vid});
- 1375. - Video.removeFromLists(oid+'_'+vid, true);
- 1376. + Video.removeFromLists({oid: oid, vid: vid}, true);
- ------
- Файл - videoview.css:
- 717. - padding: 6px 4px 7px;
- 719. - #mv_title_text, #mv_create_album {
- 720. + #mv_title_text {
- ------
Advertisement
Add Comment
Please, Sign In to add comment