123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <div id="tabs-container">
- <ul class="tabs-menu">
- <a href="/broadcast/shots/auditing"><li class="Auditing"><span>UNDER REVIEW</span></li></a>
- <a href="/broadcast/shots/pass"><li class="Pass"><span>APPROVED</span></li></a>
- <a href="/broadcast/shots/failed"><li class="Failed"><span>REJECTED</span></li></a>
- </ul>
- <ul class="plusBtn">
- <li>
- <a id="Photo" href="javascript:;"><div class="plusPhoto">+ Photo Shot</div></a>
- </li>
- <li>
- <a id="Video" href="javascript:;"><div class="plusVideo">+ Video Shot</div></a>
- </li>
- </ul>
- </div>
- <script>
- $(function(){
- //查看视频
- $('.video').on('click', function(){
- var videoUrl = $(this).attr('data-video');
- var status = $(this).attr('data-status');
- if(status == 1){
- parent.layer.open({
- type: 2,
- title: '',
- closeBtn: 0,
- resize: false,
- area : ['640px', '519px'],
- content: '/broadcast/shotsLayer/playVideo?videoUrl='+videoUrl
- });
- }else{
- parent.layer.open({
- type: 2,
- title: '',
- closeBtn: 0,
- resize: false,
- area : ['640px', '522px'],
- content: '/broadcast/shotsLayer/playError'
- });
- }
- })
- //查看图片
- var showOriginal = 0;
- $('.showOriginal').on('click', function(){
- if(showOriginal) {
- return false;
- }
- showOriginal = 1;
- var img = $(this).attr('data-img');
- var image = new Image();
- image.src = img;
- image.onload = function(){
- var width = image.width;
- var height = image.height;
- width = width*0.9;
- height = height*0.9;
- var windowHeigth = $(parent).height();
- var windowWidth = $(parent).width();
- var imgHeigth = '';
- var imgWidth = '';
- if(windowHeigth < height){
- windowHeigth = parseInt(windowHeigth * 0.6);
- windowWidth = parseInt(windowWidth * 0.6);
- height = windowHeigth;
- width = windowWidth;
- imgHeigth = windowHeigth;
- imgWidth = windowWidth;
- }else{
- imgHeigth = height;
- imgWidth = width;
- }
- width = width + 20 + 'px';
- height = height + 50 + 'px';
- parent.layer.open({
- type: 2,
- title: '',
- closeBtn: 0,
- resize: false,
- shadeClose: true,
- area : [width, height],
- content: '/broadcast/shotsLayer/showOriginal?img='+img+'&width='+imgWidth+'&height='+imgHeigth,
- end:function(){
- showOriginal = 0;
- }
- });
- }
- })
- //添加视频
- $('#Video').on('click', function(){
- parent.layer.open({
- type: 2,
- title: '',
- closeBtn: 0,
- resize: false,
- // shadeClose: true,
- area : ['556px', '418px'],
- content: '/broadcast/shotsLayer/addVideo',
- end:function(){
- var status = Cookies.getJSON('add_success_video');
- Cookies.remove('add_success_video');
- if(status && status.status == 1){
- window.location.reload();
- }
- }
- });
- })
- //添加图片
- $('#Photo').on('click', function(){
- parent.layer.open({
- type: 2,
- title: '',
- closeBtn: 0,
- resize: false,
- // shadeClose: true,
- area : ['556px', '350px'],
- content: '/broadcast/shotsLayer/addPhoto',
- end:function(){
- var status = Cookies.getJSON('add_success_photo');
- Cookies.remove('add_success_photo');
- if(status && status.status == 1){
- window.location.reload();
- }
- }
- });
- })
- })
- </script>
|