Authored by 2586703@qq.com

Merge branch 'ly_develop' into develop

04-22 17:30
Conflicts:
	web/.sass-cache/d6bd5b1d5e4a3dac7860662e94fe536e29fb85cb/idangerous.swiper.scssc
require('./channel/detail');
\ No newline at end of file
require('./channel/detail');
require('./channel/magazine')
\ No newline at end of file
... ...
/*
* detail页js
* @author: yue.liu@yoho.cn
* @date: 2015-04-16
*/
var $ = require('jquery'),
share = require("../plugin/share"),
share = require('../plugin/share'),
box = require('../plugin/box'),
imgZoom = require('../plugin/imgzoom'),
tools = require('yoho-tools');
... ...
/*
* @fileOverview magazine页的JS
* @author fei.hong@yoho.cn
* @date 2014-05-30
* magazine页js
* @author: yue.liu@yoho.cn
* @date: 2015-04-22
*/
var $ = require("jquery");
var dot = require("dot");
var json = require("json");
var share = require("yoho-share");
var swiper = require('yoho.swiper');
require('../plugin/lazyloadImage');
require('../plugin/imgSlider');
require('jquery.cycle');
require('../plugin/imgZoom');
/**
* 初始化
*/
exports.init = function()
{
var shareUrl = $(".share").attr("data-link");
share.init({
shareUrl:shareUrl,
img:$(".mags-slide li").eq(0).find("img").attr("src"),
sinaText:'随时引领潮流生活,我正在看《YOHO!潮流志》'+$(".date-price").find("span").text()+'期点杂志,每月7日,17日,27日出刊哦~',
fbTextFunction:function(){
return {
des:'随时引领潮流生活,我正在看《YOHO!潮流志》'+$(".date-price").find("span").text()+'期点杂志,每月7日,17日,27日出刊哦~',
name:'随时引领潮流生活,我正在看《YOHO!潮流志》'+$(".date-price").find("span").text()+'期点杂志,每月7日,17日,27日出刊哦~',
caption:'随时引领潮流生活,我正在看《YOHO!潮流志》'+$(".date-price").find("span").text()+'期点杂志,每月7日,17日,27日出刊哦~',
url:location.href
}
},
tweetText:'随时引领潮流生活,我正在看《YOHO!潮流志》'+$(".date-price").find("span").text()+'期点杂志,每月7日,17日,27日出刊哦~',
qqText:'随时引领潮流生活,我正在看《YOHO!潮流志》'+$(".date-price").find("span").text()+'期点杂志,每月7日,17日,27日出刊哦~'
var $ = require('jquery'),
share = require('../plugin/share'),
swiper = require('yoho-idangerous.swiper');
require('lazyload');
require('../plugin/imgslider');
exports.init = function() {
var shareUrl = $('.share').attr('data-link'),
shareCover = $('.share').attr('cover-url'),
detailTitle = $('.detail-title').find('h1'),
detailSubtitle = $('.detail-title').find('h2'),
magazineSlide,
timer,
magazineTimer;
//分享
share.init({
shareUrl: shareUrl,
img: shareCover,
sinaText:'【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
fbTextFunction: function(){
return {
des: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
name: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
caption: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
url: location.href
}
},
tweetText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
qqText: '【Yoho!Girls】' + detailTitle.text() + ' ' + detailSubtitle.text() + '(来自Yoho!Girls)'
});
//图片懒加载
$('img.lazy').lazyload({
placeholder: 'data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=='
});
//显示控制箭头
(function() {
$('.column-slide').on('mouseenter',function() {
$('.column-slide').find('.slide-ctrl').hide();
if ($(this).find('li').size() <= 4) return;
clearTimeout(timer);
$(this).find('.slide-ctrl').show();
}).on('mouseleave',function(event) {
var $that = $(this);
timer = setTimeout(function() {
$that.find('.slide-ctrl').hide();
}, 1000)
});
//显示控制箭头
(function(){
var timer;
$(".column-slide").on("mouseenter",function(){
$(".column-slide").find(".slide-ctrl").hide();
if($(this).find("li").size()<=4) return;
clearTimeout(timer);
$(this).find(".slide-ctrl").show();
}).on("mouseleave",function(event){
var $that = $(this);
timer=setTimeout(function(){
$that.find(".slide-ctrl").hide();
},1000)
});
$(".column-slide .slide-ctrl").on("mouseenter",function(){
clearTimeout(timer);
$(this).show();
}).on("mouseleave",function(){
timer=setTimeout(function(){
$(this).hide();
},100)
});
})();
$("img.lazy").lazyload({
effect : "fadeIn"
$('.column-slide .slide-ctrl').on('mouseenter',function() {
clearTimeout(timer);
$(this).show();
}).on('mouseleave',function() {
timer=setTimeout(function() {
$(this).hide();
}, 100)
});
})();
//封面杂志图滚动
magazineSlide = new swiper('.mags-slide .swiper-container', {
pagination: '.slide-ctrl-tabs',
wrapperClass: 'slide-piclist',
slideClass: 'magazine-swiper',
paginationClickable: true,
autoplay: 5000,
loop: true,
slidesPerView: 'auto',
slideElement: 'li'
});
$('.column-slide.magazine-list').imgSlider({
itemClass:'magazine'
});
//当页面改变大小,ipad横竖屏切换重新加载插件
$(window).resize(function() {
clearTimeout(magazineTimer);
magazineTimer = setTimeout(function() {
$('.column-slide.magazine-list').imgSlider('resize');
}, 0)
});
$.ajax({
type:'GET',
url:'/channel/magazine/ezine',
success:function(response) {
var data = response.data,
len = data.length;
item ='',
ulNum = Math.ceil(len/16),
ulItem ='',
ulAnimateIndex = 0;
var animateWidth,
slideWrapWidth,
itemIndexStart,
itemIndexEnd,
i;
$('.e-zine .slide-box').html('<div class="slide-piclist-wrap clearfix" style="position:relative;top:0;left:0;"></div>');
//添加4个ul
for (var i=0; i<ulNum; i++) {
ulItem += '<ul class="slide-piclist clearfix"></ul>';
}
var magazineSlide = new swiper('.mags-slide .swiper-container',{
pagination: '.slide-ctrl-tabs',
wrapperClass:'slide-piclist',
slideClass:'magazine-swiper',
paginationClickable: true,
autoplay:5000,
loop:true,
slidesPerView: 'auto',
slideElement: 'li'
})
/*var magazineSlide=new swiper('.magazine-list .swiper-container',{
//slidesPerView: 'auto',
//slideElement: 'li'
simulateTouch:false,
wrapperClass:'slide-piclist',
slideClass:'magazine',
paginationClickable: true,
slidesPerView: 'auto',
slideElement: 'li',
onSlideChangeEnd: fallSwiperItems_buy
});
$('.slide-piclist-wrap').html(ulItem);
function fallSwiperItems_buy(){
var currentSlide=arguments[0];
_fallSwiperItems(currentSlide,"buy");
}
animateWidth = $('.mags-column').find('.slide-piclist').outerWidth();
slideWrapWidth = animateWidth * ulNum;
$('.slide-piclist-wrap').css({'width': slideWrapWidth});
function fallSwiperItems_rule(){
var currentSlide=arguments[0];
_fallSwiperItems(currentSlide,"rule");
}
var currentPageNumber=1;
function _fallSwiperItems(currentSlide,type){
var url="";
if(type=="buy") {
url="/channel/magazine/page?type=1&p=";
} else if( type=="zine") {
url="/channel/magazine/page?type=2&p=";
} else {
url="/channel/magazine/rules?p=";
//分别插入数据到4个ul
for (i=0; i<ulNum; i++) {
itemIndexStart = i * 16,
itemIndexEnd = i * 16 + 16;
item = '';
if (itemIndexEnd > len) {
itemIndexEnd = len;
}
for(var j = itemIndexStart;j<itemIndexEnd;j++){
item += '<li data-type='+data[j].magazineType+'><a href="javascript:;" title="'+data[j].releaseDate+'"><div class="img-wrap"><img src="'+data[j].cover+'" alt="" /></div><span>'+data[j].releaseDate+'</span></a></li>';
}
$('.slide-piclist-wrap').find('.slide-piclist').eq(i).html(item);
}
var totalLength=$(currentSlide.container).find(".swiper-slide").length;
var currentIndex=currentSlide.activeIndex;
if(totalLength-currentIndex<=6) {
$.ajax({
url:YohoConfig.mainUrl+url+(currentPageNumber++),
cache:false,
success:function(data){
for(var i=0;i<data.data.length;i++) {
var msg=data.data;
var newAppend=currentSlide.createSlide('<li class="'+_this.options.itemClass+' swiper-slide"><a href="javascript:;"><img src="" data-slide="'+msg[i].pics+'" data-original="'+msg[i].cover+'"/><span>'+msg[i].title+'</span></a></li>');
newAppend.append();
}
var oLi=$(currentSlide.container).find(".swiper-slide");
var LastSlide = currentSlide.getLastSlide();
currentSlide.reInit();
}
});
}
}*/
//滚动
$('.mags-column').find('.slide-ctrl-prev').hide();
/*$(".magazine-list").find(".slide-ctrl").find('.slide-ctrl-prev').on('click', function(e){
e.preventDefault();
magazineSlide.swipePrev();
});
$(".magazine-list").find(".slide-ctrl").find('.slide-ctrl-next').on('click', function(e){
e.preventDefault()
magazineSlide.swipeNext();
$(".magazine").find("img").lazyload();
});*/
/*$(".mags-slide .slide-piclist").cycle({
fx: 'scrollHorz',
speed: 300,
timeout: 5000,
pager: '.mags-slide .slide-ctrl-tabs'
});*/
$.ajax({
type:'GET',
url:'/channel/magazine/ezine',
success:function(response){
var data = response.data;
var len = data.length;
var item ='';
var ulNum = Math.ceil(len/16);
var ulItem ='';
var ulAnimateIndex = 0;
$(".mags-column .slide-box").html('<div class="slide-piclist-wrap clearfix" style="position:relative;top:0;left:0;"></div>');
$(window).resize(function() {
animateWidth = $('.mags-column').find('.slide-piclist').outerWidth();
slideWrapWidth = animateWidth * ulNum;
//添加4个ul
for(var r=0;r<ulNum;r++){
ulItem += '<ul class="slide-piclist clearfix"></ul>';
}
$(".slide-piclist-wrap").html(ulItem);
var animateWidth = $(".mags-column").find(".slide-piclist").outerWidth();
var slideWrapWidth = animateWidth * ulNum;
$(".slide-piclist-wrap").css({"width":slideWrapWidth});
//分别插入数据到4个ul
for(var i=0;i<ulNum;i++){
var itemIndexStart = i*16;
var itemIndexEnd = i*16+16;
item = '';
if(itemIndexEnd>len){
itemIndexEnd=len;
}
for(var j = itemIndexStart;j<itemIndexEnd;j++){
item += '<li data-type='+data[j].magazineType+'><a href="javascript:;" title="'+data[j].releaseDate+'"><div class="img-wrap"><img src="'+data[j].cover+'" alt="" /></div><span>'+data[j].releaseDate+'</span></a></li>';
}
$(".slide-piclist-wrap").find(".slide-piclist").eq(i).html(item);
}
//滚动
$(".mags-column").find(".slide-ctrl-prev").hide();
$(".mags-column").on("click.next",".slide-ctrl-next",function(){
if(ulAnimateIndex>=ulNum-1) return;
if($(".slide-piclist-wrap").is(":animated")) return;
if(ulAnimateIndex==ulNum-2){
$('.mags-column').on('click.next','.slide-ctrl-next',function() {
if (ulAnimateIndex >= ulNum-1) return;
if ($('.slide-piclist-wrap').is(':animated')) return;
if (ulAnimateIndex==ulNum-2) {
$(this).hide();
}
$(this).siblings(".slide-ctrl-prev").show();
$(this).siblings('.slide-ctrl-prev').show();
ulAnimateIndex++;
$(".slide-piclist-wrap").stop().animate({"left":-animateWidth*ulAnimateIndex},500);
$('.slide-piclist-wrap').stop().animate({'left':-animateWidth * ulAnimateIndex}, 500);
});
$(".mags-column").on("click.prev",".slide-ctrl-prev",function(){
if(ulAnimateIndex<=0) return;
if($(".slide-piclist-wrap").is(":animated")) return;
if(ulAnimateIndex==1){
$('.mags-column').on('click.prev','.slide-ctrl-prev',function() {
if (ulAnimateIndex <= 0) return;
if ($('.slide-piclist-wrap').is(':animated')) return;
if (ulAnimateIndex === 1) {
$(this).hide();
}
$(this).siblings(".slide-ctrl-next").show();
$(this).siblings('.slide-ctrl-next').show();
ulAnimateIndex--;
$(".slide-piclist-wrap").stop().animate({"left":-animateWidth*ulAnimateIndex},500);
$('.slide-piclist-wrap').stop().animate({'left':-animateWidth * ulAnimateIndex}, 500);
});
/*for(var i=0;i<len;i++){
item += '<li data-type='+data[i].magazineType+'><a href="javascript:;" title="'+data[i].releaseDate+'"><div class="img-wrap"><img src="'+data[i].cover+'" alt="" /></div><span>'+data[i].releaseDate+'</span></a></li>';
}
$(".mags-column .slide-piclist").html(item);
$(".column-slide").imgSlider();
*/
$(".mags-column .slide-piclist").find("li").each(function(){
if($(this).data("type") ==2){
$('<em class="border"></em><i class="special-icon"></i>').appendTo($(this).find(".img-wrap"));
};
});
}
})
$(".column-slide.magazine-list").imgSlider({
itemClass:'magazine'
});
$(".column-slide.rule").imgSlider();
//ipad横竖屏切换
$(window).resize(function(){
clearTimeout(timer);
var timer = setTimeout(function(){
$(".column-slide.rule").imgSlider('resize');
$(".column-slide.magazine-list").imgSlider('resize');
},0)
clearTimeout(timer);
timer = setTimeout(function() {
$('.slide-piclist-wrap').css({'width': slideWrapWidth});
$('.slide-piclist-wrap').css({'left':-animateWidth * ulAnimateIndex}, 500);
}, 0)
}).resize();
});
$('.column-slide.rule').ImgZoom({
imgSrcAttr:'data-imgZoom'
});
$(".slide-piclist").on("click",".magazine",function(){
if(!$(this).find("img").attr("data-slide")) return;
if($(this).find("ul").size()>=1) return;
var data = decodeURIComponent($(this).find("img").attr("data-slide"));
var arr =eval("("+data+")");
var len = arr.length;
var $picList = $('<ul style="display:none;" class="magazine-content"></ul').appendTo($(this));
var item =''
for(var i=0;i<len;i++){
item += '<li><img src="" data-imgzoom="'+arr[i]+'" alt="" /></li>';
/*for(var i=0;i<len;i++){
item += '<li data-type='+data[i].magazineType+'><a href='javascript:;' title=''+data[i].releaseDate+''><div class='img-wrap'><img src=''+data[i].cover+'' alt='' /></div><span>'+data[i].releaseDate+'</span></a></li>';
}
$(item).appendTo($picList);
$(this).ImgZoom({
isContainFather: true
});
});
$(".column-slide.rule").on("mouseenter","li",function(){
var gifSrc = $(this).find("img").attr("data-imgzoom");
$(this).find("img").attr("src",gifSrc);
}).on("mouseleave","li",function(){
var staticSrc = $(this).find("img").attr("data-original");
$(this).find("img").attr("src",staticSrc);
})
}
$('.mags-column .slide-piclist').html(item);
$('.column-slide').imgSlider();
*/
$('.mags-column .slide-piclist').find('li').each(function() {
if($(this).data('type') ==2) {
$('<em class="border"></em><i class="special-icon"></i>').appendTo($(this).find('.img-wrap'));
};
});
}
})
}
\ No newline at end of file
... ...
... ... @@ -27,6 +27,19 @@ require("./login");
publishUrl: '/writer/default/publish',
deleteUrl: '/writer/default/delete',
commentNum: $(".comment-num"),
commentItemTpl: '<li class="clearfix">'+
'<div class="userimg">'+
'<img src="\{{userimg}}" alt="">'+
'<i class="\{{partnerType}}"></i>'+
'</div>'+
'<div class="userinfo">'+
'<h6>\{{username}}</h6> '+
'<p class="comment-text">\{{content}}</p>'+
'\{{# isSelf}}'+
'<a class="delete-comment" href="javascript:;" pid="{{id}}"></a>'+
'\{{/ isSelf}} '+
'</div>'+
'</li>',
thirdLogin: false,
isEdit: false,
isMobile: false,
... ... @@ -68,9 +81,10 @@ require("./login");
moreString = viewMoreNum + '', //剩余评论数量转为字符串
moreFirstnum = moreString.slice(0,1), //评论数量的首数字
commentTpl = $('#comment-tpl').html(), //引入评论html模板
commentPage, //分页数据
commentHtml, //用数据渲染后的html
commentData, //评论数据
commentPage; //分页数据
commentData; //评论数据
if(data.length === 0) return;
... ... @@ -90,15 +104,18 @@ require("./login");
//如果分页数据不为空和undefined,渲染分页
if ($.trim(data.page) !== '' || typeof(data.page) === 'undefined' || !!data.page) {
commentPage = data.page;
commentData = {
comment: data.comment,
more: {
moreNum : viewMoreNum
},
page: commentPage
}
}
}
commentHtml = mustache.render(commentTpl, commentData);
commentHtml = mustache.render(commentTpl, commentData, {
html: commentPage
});
that.$element.prepend($(commentHtml));
//5条后的评论隐藏
... ... @@ -149,7 +166,7 @@ require("./login");
if (this.options.thirdLogin === true) {
$(thirdLoginTpl).appendTo(this.$element);
//this.$element.html(thirdLoginTpl);
//this.$element.html(thirdLoginTpl);
}
},
... ... @@ -159,7 +176,7 @@ require("./login");
//查看更多评论
this.$element.on("click.comment",".view-more",function() {
that.$element.find("li").show(); //显示第一页后五条
that.$element.find(".pager-content").show(); //显示分页按钮
that.$element.find(".comment-pager-content").show(); //显示分页按钮
that.$element.find(".view-more").remove(); //移除view more
});
... ... @@ -185,36 +202,91 @@ require("./login");
//发表评论
this.$element.on("click.publish",".publish-btn",function() {
var $textarea = that.$element.find("textarea"),
nameVal = that.$element.find(".name-input").val(),
comment = $textarea.val();
if (typeof(comment) === 'undefined' || $.trim(comment) === '' || typeof(nameVal) === 'undefined' || $.trim(nameVal) === '') {
var valEmpty = tips.getTips("commentUncompleted");
if(that.options.isFeedback) {
valEmpty = tips.getTips("feedbackEmpty");
} else if (that.options.isEdit){
valEmpty = tips.getTips("editEmpty");
}
box.alert(valEmpty, 5,function() {
$textarea.focus();
});
return false;
};
nameInput = that.$element.find(".name-input"),
emailInput = that.$element.find(".email-input"),
comment = $textarea.val(),
cid,
data,
commentsNum,
commentsList,
publishHtml;
//验证名字
if (!tools.IYOHO_isUserName(nameInput.val())) {
box.alert(tips.getTips("commentUncompleted"), 5, function() {
nameInput.focus();
});
return false;
};
//验证邮箱
if (emailInput.val() !== '' && !tools.IYOHO_isEmail(emailInput.val())) {
box.alert(tips.getTips("commentUncompleted"), 5, function() {
emailInput.focus();
});
return false;
};
//验证评论
if (typeof(comment) === 'undefined' || $.trim(comment) === '') {
box.alert(tips.getTips("commentUncompleted"), 5, function() {
$textarea.focus();
});
return false;
};
if (comment.length > 100) {
box.alert(tips.getTips("commentToMuch"), 5);
return false;
};
var cid = that.$element.attr('cid');
cid = that.$element.attr('cid');
if (!cid) {
return false;
};
var data = {id:cid,comment:comment,sync:'222',title:'111'};
$.ajax({
data = {id:cid,comment:comment,sync:'222',title:'111'};
$.ajax({
type: 'GET',
url: YohoConfig.mainUrl + that.options.publishUrl,
success: function(response) {
if (response.code === '800000') {
box.alert(tips.getTips("relogin"), 5);
that.$element.login("setLogout");
return false;
};
if (response.status && response.data) {
var $commentsList = $(".comments-list");
publishHtml = mustache.render(that.options.commentItemTpl, response.data);
if ($commentsList .find("li").size() === 0){
$commentsList.html(publishHtml);
} else {
$commentsList.find("li").eq(0).before(publishHtml);
}
box.alert(tips.getTips("publishSuccess"), 5);
$(".comment-textarea textarea").val('');
commentsNum = 1;
if(!!parseInt(that.options.commentNum.eq(0).text())){
commentsNum = parseInt(that.options.commentNum.eq(0).text())+1;
};
that.options.commentNum.text(commentsNum);
} else if (900000 === response.code) {
box.alert(tips.getTips("notSameContent"), 5);
} else {
box.alert(tips.getTips("systemBus"), 5);
}
publishHtml = mustache.render(that.options.commentItemTpl, response.data);
that.$element.find(".comments-list").prepend(publishHtml);
}
})
/*$.ajax({
type:'POST',
url:YohoConfig.mainUrl + that.options.publishUrl,
data: data,
... ... @@ -227,7 +299,7 @@ require("./login");
return false;
}
if (response.status && response.data) {
var $target = $(".comments-list");
var $commentsList = $(".comments-list");
var commentItem = '<li class="clearfix">'+
'<div class="userimg">'+
'<img src="'+response.data.headpic+'" alt="">'+
... ... @@ -251,10 +323,10 @@ require("./login");
'</div>'+
'</li>';
}
if($target.find("li").size()==0){
$target.html(commentItem);
if($commentsList .find("li").size()==0){
$commentsList .html(commentItem);
}else{
$target.find("li").eq(0).before(commentItem);
$commentsList .find("li").eq(0).before(commentItem);
}
if(that.options.isFeedback){
box.alert(tips.getTips("publishFeedback"), 5);
... ... @@ -278,58 +350,28 @@ require("./login");
box.alert(tips.getTips("systemBus"), 5);
}
}
});
}); */
});
//评论翻页
this.$element.on("click.commentPage",".pager-item",function(){
var url = $(this).attr("href");
var $_this = $(this);
var url = $(this).attr("href"),
pageHtml,
pageIcon,
commentListTop;
$.ajax({
type:'GET',
url:url,
success:function(response)
{
var data = response.data;
var commentArr = data.comment,
commentLen = commentArr.length,
commentsItem = '',
commentPage = data.page;
var pageIcon = $('<div class="channel-index-pager">'+commentPage+'</div>');
type: 'GET',
url: url,
success: function(response) {
$(".comments-list").empty();
for (var i = 0; i < commentLen; i++){
if(commentArr[i].isSelf == true){
commentsItem = $('<li class="clearfix">\n\
<div class="userimg">\n\
<img src="'+commentArr[i].userimg+'" alt="">\n\
<i class="'+commentArr[i].partnerType+'"></i>\n\
</div>\n\
<div class="userinfo">\n\
<h6>'+commentArr[i].username+'</h6>\n\
<p class="comment-text">'+commentArr[i].content+'</p>\n\
<a class="delete-comment" href="javascript:;" pid="'+commentArr[i].id+'"></a>\n\
</div>\n\
</li>');
}else{
commentsItem = $('<li class="clearfix">\n\
<div class="userimg">\n\
<img src="'+commentArr[i].userimg+'" alt="">\n\
<i class="'+commentArr[i].partnerType+'"></i>\n\
</div>\n\
<div class="userinfo">\n\
<h6>'+commentArr[i].username+'</h6>\n\
<p class="comment-text">'+commentArr[i].content+'</p>\n\
</div>\n\
</li>');
}
$(".comments-list").append(commentsItem);
}
pageHtml = mustache.render(that.options.commentItemTpl, response.data.comment);
$(".comments-list").html(pageHtml);
pageIcon = $('<div class="channel-index-pager">'+response.data.page+'</div>');
$(".comment-pager-content").html(pageIcon);
var commentListTop = $(".comments-list").offset().top - $("#minEnterprise").outerHeight();
commentListTop = $(".comments-list").offset().top - $("#minEnterprise").outerHeight();
$(window).scrollTop(commentListTop);
}
});
... ... @@ -376,13 +418,13 @@ require("./login");
});
});
$(".feedback-login").on("click","a",function(){
$(".third-login-box").on("click","a",function(){
var _this = $(this);
if (!_this.attr('ref')) return;
window.open(_this.attr('ref'), "","width=760,height=650,top=300,left=300");
return false;
})
$(".feedback-login").on("click","a.yoho",function(){
$(".third-login-box").on("click","a.yoho",function(){
$(this).login("loginBoxAnimate");
})
},
... ...
... ... @@ -19,7 +19,8 @@
"jquery": "~1.8.3",
"yoho-tools": "0.0.4",
"lazyload": "1.9.6",
"mustache": "2.0.0"
"mustache": "2.0.0",
"yoho-idangerous.swiper": "0.0.1"
},
"devDependencies": {
"expect.js": "0.3.1"
... ...
... ... @@ -243,9 +243,6 @@
}
}
}
.comment-pager-content .channel-index-pager a.pager-item{
width: 40px;
}
.view-more{
margin: 18px 0 23px 0;
font-weight: bold;
... ... @@ -257,48 +254,32 @@
}
}
.comment-textarea{
width:558px;
width:100%;
.anonymous-info {
input {
width: 348px;
height: 38px;
line-height: 38px;
&:first-child {
width: 347px;
border-right:none;
}
}
}
textarea{
width: 542px;
height: 98px;
border: 1px solid #000;
resize:none;
outline: none;
font-family: arial,'helveticaneue','黑体';
margin: 0;
width: 716px;
height: 76px;
}
.login-status{
margin: -6px 0 0 0;
width: 100%;
height: 36px;
padding: 2px;
border: 1px solid #000;
border-top: none;
.userimg{
float: left;
margin: 3px 0 0 10px;
margin-top: 6px\0;
width: 30px;
height: 30px;
img{
display: block;
width: 100%;
}
}
.publish{
float: right;
margin: 3px 16px 0 0;
margin-top: 6px\0;
.publish-btn{
display: block;
width: 70px;
height: 28px;
line-height: 28px;
text-align: center;
background: url("../assets/images/detail/publish-btn.png");
color: #fff;
font-size: 14px;
}
width: 732px;
height: 40px;
.publish {
margin: 6px 16px 0 0;
}
}
}
... ...
... ... @@ -270,9 +270,6 @@
}
}
}
.comment-pager-content .channel-index-pager a.pager-item{
line-height:50px;
}
.view-more{
margin: 18px 0 23px 0;
font-weight: bold;
... ... @@ -284,19 +281,33 @@
}
}
.comment-textarea{
.anonymous-info {
margin-bottom: 6px;
input {
padding: 0 6px;
width: 217px;
height: 23px;
line-height: 23px;
&:first-child {
width: 216px;
}
}
}
textarea{
width: 362px;
height: 36px;
width: 447px;
height: 35px;
border: 1px solid #000;
resize:none;
outline: none;
font-family: arial,'helveticaneue','黑体';
margin: 0;
overflow: hidden;
padding: 6px;
}
.login-status{
width: 378px;
height: 21px;
width: 455px;
height: 24px;
padding: 2px;
border: 1px solid #000;
border-top: none;
... ... @@ -323,9 +334,9 @@
.publish{
margin: 0px 16px 0 0;
.publish-btn{
width: 56px;
height: 20px;
line-height: 20px;
width: 55px;
height: 22px;
line-height: 22px;
background-image: url("../assets/images/detail/publish-btn.png");
background-size: 100% 100%;
font-size: 12px;
... ...
... ... @@ -395,12 +395,10 @@
}
}
}
.comment-pager-content .channel-index-pager a.pager-item {
width: 34px;
&:focus {
outline:none;
}
.comment-pager-content {
width: 100%;
border: none;
}
.detail-pagination {
... ... @@ -434,6 +432,7 @@
width: 294px;
height: 32px;
line-height: 32px;
outline: none;
&:first-child {
width: 293px;
... ... @@ -444,7 +443,7 @@
textarea {
width: 608px;
height: 98px;
height: 66px;
border: 1px solid #666 ;
resize:none;
outline: none;
... ... @@ -460,7 +459,7 @@
.login-status {
width: 624px;
height: 36px;
height: 34px;
padding: 2px;
border: 1px solid #000;
border-top: none;
... ... @@ -469,8 +468,8 @@
float: left;
margin: 3px 0 0 10px;
margin-top: 6px\0;
width: 30px;
height: 30px;
width: 31px;
height: 31px;
img{
border-radius: 15px;
display: block;
... ... @@ -533,6 +532,7 @@
line-height: 28px;
text-align: center;
background: url("../assets/images/detail/publish-btn.png");
background-size: 100% 100%;
color: #fff;
font-size: 14px;
}
... ...
... ... @@ -119,7 +119,7 @@ Pagination Styles
@include blockwh(30px,30px);
float:left;
cursor:pointer;
background:url(../assets/images/pagercycle.png) no-repeat;
background:url(../assets/images/pagercycle.png) no-repeat;
}
... ...