|
- /**
- * Created by ttang on 2016/9/5.
- */
- app.directive('multiReply',["$timeout",function(timer){
- return{
- restrict: 'A',
- scope: {},
- link: function(scope, element){
- timer(function(){
- $(".reply-icons").each(function(){
- $(this).toggle(function(){
- $(this).next().next().removeClass("undis");
- $(this).next().next().focus();
- },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();
- // });
- })
- }
- }
- }]);
|