Merge branch 'guange_dev' into 'develop'

微信at显示问题



See merge request !117
This commit is contained in:
黄井泉 2017-01-06 21:58:20 +08:00
commit 3caca58c26
4 changed files with 31 additions and 8 deletions

View File

@ -92,7 +92,7 @@
<div class="post-reply-row border-bottom-none"> <div class="post-reply-row border-bottom-none">
<div class="post-input-container"> <div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div> <div class="copy-input-container"><textarea class="copy-input"></textarea></div>
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" placeholder="输入回复内容~" /></textarea> <textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" ng-change="onPostChange(object.comment, '{{object.comment}}')" placeholder="{{replytip}}" /></textarea>
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button> <button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button> <button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
<div class="cl"></div> <div class="cl"></div>

View File

@ -4,7 +4,7 @@
<div class="class-detail-name"><span class="course-name-width hidden inline-block">选择您要@的人</span> <div class="class-detail-name"><span class="course-name-width hidden inline-block">选择您要@的人</span>
<button ng-click="cancelAt()" class="cancel-btn-new fr border-radius">取消</button> <button ng-click="cancelAt()" class="cancel-btn-new fr border-radius">取消</button>
</div> </div>
<ul class="weixin-users-all"> <ul class="weixin-users-all" id="at-list">
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">{{person.login}}</p></li> <li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">{{person.login}}</p></li>
</ul> </ul>
</div> </div>

View File

@ -950,7 +950,13 @@ $(function(){
return; return;
} }
if(res.length<1){ if (res.err == -2) {
alert("该作业没有任何附件可下载");
return;
}
if(res.length < 1 ){
alert("该作业没有任何附件可下载");
return; return;
} }
@ -983,10 +989,22 @@ $(function(){
$('#download_homework_attachments').bind('ajax:complete', function (event, data, status, xhr) { $('#download_homework_attachments').bind('ajax:complete', function (event, data, status, xhr) {
if(status == 'success'){ if(status == 'success'){
var res = JSON.parse(data.responseText); var res = JSON.parse(data.responseText);
if(res.length == null){
alert("该作业没有任何附件可下载"); if(res.err == -1){
var htmlvalue = '<div id="muban_popup_box" style="width:auto;"><div class="muban_popup_top"><h3 class="fl">温馨提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15 mr10 ml10"><p class="text_c f14">因附件资源太大请通过微信或者QQ联系Trustie管理员</br>辅助您完成下载</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 143px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue,380,166);
return;
} }
else if(res.length<1){
if (res.err == -2) {
alert("该作业没有任何附件可下载");
return;
}
if(res.length < 1 ){
alert("该作业没有任何附件可下载");
return; return;
} }
else else

View File

@ -93,7 +93,7 @@ app.factory('rms', function(){
return {save: save, get: get}; return {save: save, get: get};
}); });
app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$location', function($http, auth, $routeParams,rms,config,wx,$location){ app.factory('common', ['$http', '$location', '$anchorScroll', 'auth', '$routeParams','rms','config','wx','$location', function($http, $location, $anchorScroll, auth, $routeParams,rms,config,wx,$location){
var addCommonReply = function(id, type, data,args,reply_type, beforeReply, cb){ var addCommonReply = function(id, type, data,args,reply_type, beforeReply, cb){
if(!data.comment || data.comment.length<=0){ if(!data.comment || data.comment.length<=0){
return; return;
@ -523,6 +523,11 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
if(newValue.length > oldValue.length && newValue.match(/@$/)=='@'){ if(newValue.length > oldValue.length && newValue.match(/@$/)=='@'){
console.log('@ fire'); console.log('@ fire');
vm.showAtDialog = true; vm.showAtDialog = true;
window.scrollTo(0,0);
$location.hash();
if(!vm.at_persons){ if(!vm.at_persons){
$http.get('/at/'+$routeParams.id+'.json?type='+atType).then(function (response) { $http.get('/at/'+$routeParams.id+'.json?type='+atType).then(function (response) {
vm.at_persons = response.data; vm.at_persons = response.data;