微信修改资料select框去边框;二级回复显隐点击效果更改

This commit is contained in:
Tim 2016-09-08 14:15:00 +08:00
parent 1109eba460
commit 216c834a40
4 changed files with 67 additions and 35 deletions

View File

@ -1,19 +1,40 @@
app.directive('inputAuto',function(){
return{
restrict: 'A',
scope: {},
link: function(scope, element){
var copyContainer = element.parent().children().children().eq(0);
var sendButton = element.next();
element.on('input',function(){
//console.log(sendButton);
copyContainer.html(element[0].value);
var textHeight = copyContainer[0].scrollHeight-10;
element.css('height', textHeight + 'px');
});
sendButton.on('click',function(){
element.css('height','18px');
});
}
}
});
//app.directive('inputAuto',function(){
// return{
// restrict: 'A',
// scope: {},
// link: function(scope, element){
// var copyContainer = element.parent().children().children().eq(0);
// var sendButton = element.next();
// element.on('input',function(){
// //console.log(sendButton);
// copyContainer.html(element[0].value);
// var textHeight = copyContainer[0].scrollHeight-10;
// element.css('height', textHeight + 'px');
// });
// sendButton.on('click',function(){
// element.css('height','18px');
// });
// }
// }
//});
app.directive('inputAuto',["$timeout",function(timer){
return{
restrict: 'A',
scope: {},
link: function(scope, element){
timer(function(){
$(".post-reply-input").bind("input",function(){
var copyInput = $(this).prev().children();
var sendButton = $(this).next();
copyInput.html($(this).val());
var textHeight = copyInput[0].scrollHeight-10;
$(this).css("height",textHeight + "px");
sendButton.click(function(){
$(this).prev().css("height","18px");
})
});
});
}
}
}]);

View File

@ -7,23 +7,35 @@ app.directive('multiReply',["$timeout",function(timer){
scope: {},
link: function(scope, element){
timer(function(){
$(".reply-icons").live("click",function(){
if($(this).hasClass("multi-hide")){
$(".multi-input-container").addClass("undis");
$(".reply-icons").addClass("multi-hide");
$(".reply-icons").each(function(){
$(this).toggle(function(){
$(this).next().next().removeClass("undis");
$(this).next().next().focus();
$(this).removeClass("multi-hide");
$(".post-reply-input").val("");
$("#post_input_1").hide();
}
else{
$(this).addClass("multi-hide");
$(".post-input-container").addClass("undis");
$(".post-reply-input").val("");
$("#post_input_1, #post_input_1 .post-input-container").show();
}
},function(){
$(this).next().next().addClass("undis");
});
});
// $(".reply-icons").live("click",function(){
// if($(this).hasClass("multi-hide")){
// $(".multi-input-container").addClass("undis");
// $(".reply-icons").addClass("multi-hide");
// $(this).next().next().removeClass("undis");
// $(this).next().next().focus();
// $(this).removeClass("multi-hide");
// $(".post-reply-input").val("");
// }
// else{
// $(this).addClass("multi-hide");
// $(".post-input-container").addClass("undis");
// $(".post-reply-input").val("");
// $("#post_input_1, #post_input_1 .post-input-container").show();
// }
// });
// $(".post-reply-submit,#more_reply").click(function(){
// $(".reply-icons").addClass("multi-hide");
// $(".post-input-container").addClass("undis");
// $("#post_input_1, #post_input_1 .post-input-container").show();
// });
})
}
}

View File

@ -111,7 +111,6 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
}
var temp = data.comment.replace(/\n/g,'<br/>');
temp = temp.replace(/^\:[a-z0-9_]+\:$/g, "[表情]");
var userInfo = {
type: type,

View File

@ -266,4 +266,4 @@ a.underline {text-decoration:underline;}
/*.upload-input-container:after {content:" "; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); background-color:#ddd; background-image:url(../images/male.jpg); width:30px; height:30px; background-size:30px 30px; border-radius:50%;}*/
.select-container {position:relative; padding-left:62px;}
.select-text {position:absolute; left:15px;}
.select-model {width:100%; border:none; color:#999; margin-top:8px;}
.select-model {width:100%; border:none; color:#999; margin-top:8px; outline:none;}