微信回复框自动增高
This commit is contained in:
parent
77f5ad09d2
commit
78a6785b6b
|
@ -52,7 +52,7 @@
|
|||
<div ng-if="!blog.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-input-container">
|
||||
<textarea class="copy-input"></textarea>
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
|
|
|
@ -19,6 +19,6 @@ app.controller("RegController",["$scope","$http","$location","alertService","$lo
|
|||
app.controller("SendClassListController",["$scope","$http","$routeParams","config","auth","alertService","rms",function(e,s,o,a,t,r,c){var n=e,l=o.id;n.alertService=r.create(),n.syllabuses=[];var i=function(){s.get(a.apiUrl+"syllabuses?token="+t.token()).then(function(e){console.log(e.data),n.syllabuses=e.data.data})};i(),n.selectCourse=function(e){"boolean"!=typeof e.checked&&(e.checked=!1),e.checked=!e.checked},n.sendToCourses=function(){var e=[];for(var o in n.syllabuses)for(var r in n.syllabuses[o].courses)n.syllabuses[o].courses[r].checked&&e.push(n.syllabuses[o].courses[r].id);return e.length<=0?void n.alertService.showMessage("提醒","请先选择班级"):void s.post(a.apiUrl+"resources/send",{token:t.token(),course_ids:e,send_id:l}).then(function(e){console.log(e.data),0==e.data.status?n.alertService.showMessage("提示","发送成功",function(){window.history.back()}):n.alertService.showMessage("发送出错",e.data.message)})}}]);
|
||||
app.directive("myAlert",["config",function(t){return{templateUrl:t.rootPath+"templates/alert.html",scope:{title:"=",message:"=",visible:"=",cb:"="},link:function(t){t.dismiss=function(){t.visible=!1,"function"==typeof t.cb&&t.cb()}}}}]),app.directive("myAlert2",["config",function(t){return{templateUrl:t.rootPath+"templates/alert2.html",scope:{title:"=",message:"=",visible:"=",cb:"="},link:function(t){t.dismiss=function(){t.visible=!1},t.confirm=function(){t.visible=!1,"function"==typeof t.cb&&t.cb()}}}}]);
|
||||
app.directive("pwdconfirm",function(){return{require:"ngModel",link:function(r,n,i,e){e.$validators.pwdconfirm=function(n,i){return r.user&&r.user.password==i}}}});
|
||||
app.directive("inputAuto",function(){return{restrict:"A",scope:{},link:function(n,t){var e=t.parent().children().eq(0),i=t.next();t.on("input",function(){console.log(i),e.html(t[0].value);var n=e[0].scrollHeight;t.css("height",n+"px")}),i.on("click",function(){t.css("height","28px")})}}});
|
||||
app.directive("inputAuto",function(){return{restrict:"A",scope:{},link:function(n,t){var e=t.parent().children().children().eq(0),i=t.next();t.on("input",function(){console.log(i),e.html(t[0].value);var n=e[0].scrollHeight;t.css("height",n+"px")}),i.on("click",function(){t.css("height","28px")})}}});
|
||||
app.directive("loadingSpinner",["$http","config",function(t,e){return{templateUrl:e.rootPath+"templates/loading.html"}}]);
|
||||
app.config(["$routeProvider","$httpProvider","$locationProvider","config",function(e,o,t,l){var r=l.rootPath,s={delay:["auth",function(e){return e.get_bind()}]},n=function(e,o){return{templateUrl:r+e,controller:o,resolve:s}};e.when("/login",{templateUrl:r+"login.html",controller:"LoginController"}).when("/reg",{templateUrl:r+"reg.html",controller:"RegController"}).when("/activites",n("activities.html","ActivityController")).when("/issues/:id",n("issue_detail.html","IssueController")).when("/project_discussion/:id",n("project_discussion.html","DiscussionController")).when("/homework/:id",n("homework_detail.html","HomeworkController")).when("/course_notice/:id",n("course_notice.html","CourseNoticeController")).when("/course_discussion/:id",n("course_discussion.html","DiscussionController")).when("/journal_for_message/:id",n("jour_message_detail.html","JournalsController")).when("/blog_comment/:id",n("blog_detail.html","BlogController")).when("/class",n("class.html","ClassController")).when("/new_class",n("new_class.html","NewClassController")).when("/edit_class",n("edit_class.html","EditClassController")).when("/class_list",n("class_list.html","ClassListController")).when("/myresource",n("myresource.html","MyResourceController")).when("/invite_code",n("invite_code.html","InviteCodeController")).when("/send_class_list",n("send_class_list.html","SendClassListController")).otherwise({redirectTo:"/activites"}),o.interceptors.push(["$q","$rootScope",function(e,o){return void 0==o.activeCalls&&(o.activeCalls=0),{request:function(e){return o.activeCalls+=1,e},requestError:function(e){return o.activeCalls-=1,e},response:function(e){return o.activeCalls-=1,e},responseError:function(e){return o.activeCalls-=1,e}}}])}]);
|
|
@ -126,6 +126,7 @@ a.underline {text-decoration:underline;}
|
|||
.post-reply-content a {color:#136ec2;}
|
||||
.post-reply-date, .post-reply-trigger {font-size:13px;}
|
||||
.post-input-container {position:relative; padding-right:70px;}
|
||||
.copy-input-container {position:relative; padding-right:70px;}
|
||||
.copy-input {width:100%; height:28px; line-height:28px; padding:0 5px; vertical-align: middle; font-size:12px; border-radius:3px; position:absolute; left:-999em;}
|
||||
.post-reply-input {width:100%; height:28px; max-height:84px; line-height:28px; vertical-align: middle; font-size:13px; border:1px solid #e6e6e6; outline:none; padding:0 5px; margin:0; border-radius:3px; overflow-y:auto; resize:none; background-color:#f0eff4;}
|
||||
.post-reply-submit {position:absolute; font-size:13px; height:30px; line-height:30px; vertical-align:middle; padding:0 8px; color:#fff; background-color:#269ac9; outline:none; border:none; top:0; right:0;}
|
||||
|
|
Loading…
Reference in New Issue