点击展开功能完成
This commit is contained in:
parent
8ac8e1c9e5
commit
99f39696d0
|
@ -16,8 +16,7 @@
|
|||
<span class="mr15">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> 匿评开启时间:{{act.homework_common_detail.evaluation_start}}<br />
|
||||
<span class="mr15">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
|
||||
</div>
|
||||
<a>点击展开</a>
|
||||
<a herf="javascript:void(0);" class="link-blue f13 fl mt5 post-more undis" style="text-decoration:underline">点击展开</a>
|
||||
<a herf="javascript:void(0);" class="link-blue f13 fl mt5 post-more undis" style="text-decoration:underline" >点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 mt10 fl">{{act.latest_update}}</span>
|
||||
<div class="cl"></div>
|
||||
|
@ -110,7 +109,7 @@
|
|||
<span class="mr15">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15">优先级:{{act.issue_detail.issue_priority}}</span> <br />
|
||||
<span class="mr15">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15">完成度:{{act.issue_detail.done_ratio}}%</span>
|
||||
</div>
|
||||
<a herf="javascript:void(0);" class="link-blue f13 fl mt5 post-more undis" style="text-decoration:underline">点击展开</a>
|
||||
<a herf="javascript:void(0);" class="link-blue f13 fl mt5 post-more undis" style="text-decoration:underline" text-auto-height>点击展开</a>
|
||||
<div class="cl"></div>
|
||||
<span class="c-grey f13 mt10 fl">{{act.latest_update}}</span>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -3,14 +3,14 @@ var apiUrl = 'http://wechat.trustie.net/api/v1/';
|
|||
var debug = true; //调试标志,如果在本地请置为true
|
||||
|
||||
if(debug===true){
|
||||
apiUrl = 'http://localhost:3000/api/v1/';
|
||||
//apiUrl = 'http://localhost:3000/api/v1/';
|
||||
}
|
||||
|
||||
app.factory('auth', function($http,$routeParams, $cookies, $q){
|
||||
var _openid = '';
|
||||
|
||||
if(debug===true){
|
||||
_openid = "1";
|
||||
_openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg";
|
||||
}
|
||||
|
||||
var getOpenId = function() {
|
||||
|
@ -397,6 +397,38 @@ app.filter('safeHtml', function ($sce) {
|
|||
}
|
||||
});
|
||||
|
||||
app.directive('textAutoHeight', function($timeout){
|
||||
return {
|
||||
restrict: 'A',
|
||||
scope: {},
|
||||
link: function(scope, element, attr){
|
||||
scope.text = '点击展开';
|
||||
$timeout(function(){
|
||||
var e = element.parent().children().eq(4);
|
||||
var height = e[0].scrollHeight;
|
||||
var offsetHeight = e[0].offsetHeight;
|
||||
console.log(height);
|
||||
console.log(offsetHeight);
|
||||
console.log(attr);
|
||||
if(height>90){
|
||||
element.css('display', 'block');
|
||||
element.on('click', function(){
|
||||
if(element.text() == "点击展开"){
|
||||
e.css("height", height+'px');
|
||||
element.text("点击隐藏");
|
||||
} else {
|
||||
e.css("height", '90px');
|
||||
element.text("点击展开");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.config(['$routeProvider',function ($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/activities', {
|
||||
|
|
Loading…
Reference in New Issue