浏览代码

文章点赞相关操作的样式完善

luyanan 8 年之前
父节点
当前提交
84cd374bd9
共有 6 个文件被更改,包括 80 次插入58 次删除
  1. 8 13
      app/css/app.css
  2. 30 17
      app/html/professorArticle.html
  3. 2 2
      app/html/searchFilters.html
  4. 3 3
      app/html/searchListNew.html
  5. 2 2
      app/html/searchNew.html
  6. 35 21
      app/js/professorArticle.js

+ 8 - 13
app/css/app.css

@ -123,7 +123,7 @@ div.textareaboxEmp:focus{content:none;}
123 123
.topmore.mui-icon{ font-size:24px; line-height:24px;}
124 124
.topmore .sharebox{padding:0; margin: 0; position: absolute;display: none;}
125 125
.topmore .sharebox li{list-style: none;}
126
.topWord{color:#666;line-height: 45px;}
126
.topWord{color:#FFFFFF;line-height: 45px;}
127 127

128 128
.topsave{color: #FFFFFF; line-height: 44px; cursor: pointer;}
129 129
.toptit{color: #FFFFFF; font-size: 20px;}
@ -132,6 +132,7 @@ div.textareaboxEmp:focus{content:none;}
132 132
.footbox{ background: #FFFFFF;border-top:1px solid #DDDDDD;-webkit-box-shadow: 0px 6px 6px 2px #CCCCCC;box-shadow: 0px 6px 6px 2px #CCCCCC;}
133 133
.footbox .mui-tab-item.mui-active{ color: #FF9900;}
134 134
.footbox .iconfont{line-height: 24px;}
135
.footOpert.footbox .mui-tab-item.mui-active{ color: #929292;}
135 136

136 137
.listtit0{font-size: 14px; color: #222222;}
137 138
.listtit{ font-size: 15px; color: #333333;position: relative;}/*中标题*/
@ -869,11 +870,7 @@ footer.chatFooter .mui-icon-paperplane {font-size: 16px;word-break: keep-all;lin
869 870
.rewardRule .rewardCount{right: 0;color:#333;font-size:15px;}
870 871
.rewardRule .h2Font{font-size: 13px;line-height: 28px;}
871 872
/*--------------我(个人中心)-------------*/
872
.userLogin{height: 180px;overflow: hidden;
873
  background: linear-gradient(#ff9900,#ff7200);
874
  background: -moz-linear-gradient(#ff9900,#ff7200);
875
	background: -webkit-linear-gradient(#ff9900,#ff7200);
876
	background: -ms-linear-gradient(#ff9900,#ff7200);}
873
.userLogin{height: 180px;overflow: hidden;background:#3c3e51;}
877 874
.loginStatus.mui-table-view{background: none;margin:36px 0 26px;}
878 875
.loginStatus.mui-table-view .mui-table-view-cell{padding:0 15px;}
879 876
.loginStatus.mui-table-view .mui-table-view-cell.mui-active{background: none;}
@ -920,7 +917,7 @@ footer.chatFooter .mui-icon-paperplane {font-size: 16px;word-break: keep-all;lin
920 917
.itemIcon.iconSet{background-image: url(../images/me_button_shezhi_nor@3x.png);}
921 918
/*--------------搜索-------------*/
922 919
.searchboxNew{width:100%;padding-left:18px;margin:2px 0;}
923
.searchboxNew input.searchtxtNew[type='search']{border:1px solid #E5E5E5;background:#f6f6f6;vertical-align:middle;text-align: left;width:100%;height: 30px; border-radius:4px; font-size:12px; line-height:16px;}
920
.searchboxNew input.searchtxtNew[type='search']{background:#FFFFFF;vertical-align:middle;text-align: left;width:100%;height: 30px; border-radius:4px; font-size:12px; line-height:16px;}
924 921
.hotsearchboxNew{ padding:14px;background: #FFFFFF;}
925 922
.hotsearchboxNew h5{color:#999;font-size:14px; margin:0 0 10px 6px;}
926 923
.hotsearchboxNew ul{ padding:0;margin:6px 0;margin-right: -10px; overflow: hidden;}
@ -928,14 +925,12 @@ footer.chatFooter .mui-icon-paperplane {font-size: 16px;word-break: keep-all;lin
928 925
.hotsearchNew li:active{background: #FF9900;color:#FFFFFF;}
929 926

930 927
.searchboxNewT{padding-right:34px;}
931
.mui-bar .leftnav{position:absolute;left:0;color:#666;}
932
.mui-bar .rightnav{position:absolute;right:0;top:50%;margin-top:-15px;padding:0 10px;text-align: center;font-size:12px;line-height: 12px;color:#666;}
933
.mui-bar .rightnav .mui-icon{font-size:20px;padding-bottom: 0;padding-top:0;color:#666}
928
.mui-bar .leftnav{position:absolute;left:0;}
929
.mui-bar .rightnav{position:absolute;right:0;top:50%;margin-top:-15px;padding:0 10px;text-align: center;font-size:12px;line-height: 12px;color:#FFFFFF;}
930
.mui-bar .rightnav .mui-icon{font-size:20px;padding-bottom: 0;padding-top:0;color:#FFFFFF;}
934 931
.mui-bar .rightnav .mui-badge{position:absolute;top:-2px;padding:1px 4px;z-index: 32;display: none;}
935 932
.mui-bar .rightnav:active{opacity:.3;}
936
.mui-bar .rightnav.filtered{color:#ff9900;}
937
.mui-bar .rightnav.filtered .mui-icon{color:#ff9900;}
938
.mui-bar .rightnav.filtered .mui-badge{display:inline-block;background: #ff9900;color:#FFFFFF;}
933
.mui-bar .rightnav.filtered .mui-badge{display:inline-block;background: #FFFFFF;color:#FF9900;}
939 934

940 935
.fixboxNew{background: #FFFFFF; position:fixed;top:45px;left:0;width:100%; z-index:4;}
941 936
.fixboxNew .fixbtnNew{ padding:0; margin: 0; overflow: hidden;}

+ 30 - 17
app/html/professorArticle.html

@ -26,24 +26,37 @@
26 26
			<h1 class="mui-title toptit">科研文章</h1>
27 27
			<a class="mui-icon iconfont icon-share mui-pull-right button topmore" id="shareBtn"></a>
28 28
		</header>
29
		<nav class="mui-bar mui-bar-tab mui-clearfix footbox">
30
			<div class="attentbtn attentbtn2 mui-pull-left" id="thumbsUp">
31
				<em class="mui-iocn iconfont icon-appreciate mui-pull-left" id="appreciate"></em>
32
				<em class="mui-iocn iconfont icon-appreciatefill mui-pull-left" style="display:none;" id="appreciatefill"></em>
33
				<span class="mui-pull-left" style="font-size:16px;line-height: 20px;margin-left: 8px;" id="numerCount"></span>
34
			</div>
35
			<div class="dialogbtn mui-pull-left btnactive" style="background:#FF9900; color: #FFFFFF;width:60%;" id="leaveWord">
36
				<div>
37
					<em class="mui-iocn iconfont icon-community mui-pull-left"></em>
38
					<span class="mui-pull-left">留言</span> 
39
				</div>
40
			</div>
41
			<div class="attentbtn mui-pull-left" id="collect">
42
				<em class="mui-iocn iconfont icon-favor" id="yesExpert"></em>
43
				<em class="mui-iocn iconfont icon-favorfill" style="display:none;" id="noExpert"></em>
44
				<!--已经关注icon-favorfill-->
45
			</div>
29
		<nav class="mui-bar mui-bar-tab footbox footOpert">
30
		    <a class="mui-tab-item" id="thumbsUp">
31
		        <span class="mui-icon iconfont icon-appreciate" id="appreciate"></span>
32
		        <span class="mui-tab-label">点赞(<span id="numerCount"></span>)</span>
33
		    </a>
34
		    <a class="mui-tab-item" id="leaveWord">
35
		        <span class="mui-icon iconfont icon-community"></span>
36
		        <span class="mui-tab-label">留言</span>
37
		    </a>
38
		    <a class="mui-tab-item" id="collect">
39
		        <span class="mui-icon iconfont icon-favor" id="yesExpert"></span>
40
		        <span class="mui-tab-label">关注</span>
41
		    </a>
46 42
		</nav>
43
		<!--<nav class="mui-bar mui-bar-tab mui-clearfix footbox">
44
			<div class="attentbtn attentbtn2 mui-pull-left" id="thumbsUp">
45
				<em class="mui-iocn iconfont icon-appreciate mui-pull-left" id="appreciate"></em>
46
				<em class="mui-iocn iconfont icon-appreciatefill mui-pull-left" style="display:none;" id="appreciatefill"></em>
47
				<span class="mui-pull-left" style="font-size:16px;line-height: 20px;margin-left: 8px;" id="numerCount"></span>
48
			</div>
49
			<div class="dialogbtn mui-pull-left btnactive" style="background:#FF9900; color: #FFFFFF;width:60%;" id="leaveWord">
50
				<div>
51
					<em class="mui-iocn iconfont icon-community mui-pull-left"></em>
52
					<span class="mui-pull-left">留言</span> 
53
				</div>
54
			</div>
55
			<div class="attentbtn mui-pull-left" id="collect">
56
				<em class="mui-iocn iconfont icon-favor" id="yesExpert"></em>
57
				<em class="mui-iocn iconfont icon-favorfill" style="display:none;" id="noExpert"></em>
58
			</div>
59
		</nav>-->
47 60
		<div class="mui-content">
48 61
			<div class="art_topicBox">
49 62
				

+ 2 - 2
app/html/searchFilters.html

@ -14,9 +14,9 @@
14 14
	</head>
15 15
16 16
	<body>
17
		<header class="mui-bar mui-bar-nav toptitbox" style="background: #FFFFFF;border-bottom:1px solid #F0F0F0;">
17
		<header class="mui-bar mui-bar-nav toptitbox">
18 18
			<a class="mui-pull-left topWord">重置</a>
19
			<h1 class="mui-title">“找专家”</h1>
19
			<h1 class="mui-title toptit">“找专家”</h1>
20 20
			<a class="mui-pull-right topWord">完成</a>
21 21
		</header>
22 22
		<div class="mui-content">

+ 3 - 3
app/html/searchListNew.html

@ -12,14 +12,14 @@
12 12
13 13
	<body>
14 14
		<!-- 主页面标题 -->
15
		<header class="mui-bar mui-bar-nav toptitbox" style="background: #FFFFFF;">
16
			<a class="mui-action-back mui-icon mui-icon-left-nav leftnav" style="color: #BBBBBB;"></a>
15
		<header class="mui-bar mui-bar-nav toptitbox">
16
			<a class="mui-action-back mui-icon mui-icon-left-nav topback leftnav"></a>
17 17
			<div class="searchboxNew searchboxNewT">
18 18
				<form onsubmit="return false;">
19 19
					<input type="search" class="mui-input-clear searchtxtNew" placeholder="搜索你喜欢的" id="searchval" />
20 20
				</form>
21 21
			</div>
22
			<div class="rightnav"><!--选择筛选条件之后添加 filtered-->
22
			<div class="rightnav filtered"><!--选择筛选条件之后添加 filtered-->
23 23
				<a class="mui-icon iconfont icon-filter"></a><br />筛选
24 24
				<span class="mui-badge">3</span>
25 25
			</div>

+ 2 - 2
app/html/searchNew.html

@ -13,8 +13,8 @@
13 13
	<body>
14 14
15 15
		<!-- 主页面标题 -->
16
		<header class="mui-bar mui-bar-nav toptitbox" style="background: #FFFFFF;border-bottom:1px solid #F0F0F0;">
17
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left leftnav" style="color: #BBBBBB;"></a>
16
		<header class="mui-bar mui-bar-nav toptitbox">
17
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback leftnav"></a>
18 18
			<div class="searchboxNew">
19 19
				<form onsubmit="return false;">
20 20
					<input type="search" class="mui-input-clear searchtxtNew" placeholder="搜索你喜欢的" id="searchval" />

+ 35 - 21
app/js/professorArticle.js

@ -210,16 +210,19 @@ mui.plusReady(function() {
210 210
			beforeSend: function() {},
211 211
			success: function(data, textState) {
212 212
				if(data.success) {
213
					diFlag=1;
213 214
					console.log(JSON.stringify(data));
214
					var oNumber=document.getElementById("thumbsUp").getElementsByTagName("span")[0];
215
					var oNumber=document.getElementById("numerCount");
215 216
					if(oThumsflag==0){
216
						document.getElementById("appreciate").style.display="none";
217
						document.getElementById("appreciatefill").style.display="block";
217
						document.getElementById("appreciate").classList.remove("icon-appreciate");
218
						document.getElementById("appreciate").classList.add("icon-appreciatefill");
219
						document.getElementById("thumbsUp").style.color="#ff9900";
218 220
						oNumber.innerHTML=Number(oNumber.innerHTML)+1;
219 221
						document.getElementById("thumbsUp").setAttribute("oThumsflag","1");
220 222
					}else if(oThumsflag==1){
221
						document.getElementById("appreciate").style.display="block";
222
						document.getElementById("appreciatefill").style.display="none";
223
						document.getElementById("appreciate").classList.add("icon-appreciate");
224
						document.getElementById("appreciate").classList.remove("icon-appreciatefill");
225
						document.getElementById("thumbsUp").style.color="#929292";
223 226
						oNumber.innerHTML=Number(oNumber.innerHTML)-1;
224 227
						document.getElementById("thumbsUp").setAttribute("oThumsflag","0");
225 228
					}
@ -231,9 +234,9 @@ mui.plusReady(function() {
231 234
			}
232 235
		})
233 236
	}
234
		document.getElementById("thumbsUp").addEventListener("tap", function() {
237
	document.getElementById("thumbsUp").addEventListener("tap", function() {
235 238
	var userid = plus.storage.getItem('userid');
236
	var oUrl;
239
	var oUrl,diFlag=1;
237 240
	oThumsflag = this.getAttribute("oThumsflag");
238 241
	console.log(oThumsflag)
239 242
	if(!userid) {
@ -249,6 +252,11 @@ mui.plusReady(function() {
249 252
		});
250 253
		return;
251 254
	}
255
	if(diFlag==1){
256
		diFlag=0;
257
	}else{
258
		return;
259
	}
252 260
	(oThumsflag == 0) ? oUrl = "/ajax/article/agree": oUrl = "/ajax/article/unAgree";
253 261
	console.log(oUrl);
254 262
	thums(oUrl);
@ -271,13 +279,15 @@ mui.plusReady(function() {
271 279
				success: function(data) {oThumsflag="1"
272 280
					if(data.success) {
273 281
						if(data.data==null){
274
						document.getElementById("appreciate").style.display="block";
275
						document.getElementById("appreciatefill").style.display="none";
276
						document.getElementById("thumbsUp").setAttribute("oThumsflag","0");
282
							document.getElementById("appreciate").classList.add("icon-appreciate");
283
							document.getElementById("appreciate").classList.remove("icon-appreciatefill");
284
							document.getElementById("thumbsUp").style.color="#929292";
285
							document.getElementById("thumbsUp").setAttribute("oThumsflag","0");
277 286
						}else{
278
						document.getElementById("appreciate").style.display="none";
279
						document.getElementById("appreciatefill").style.display="block";
280
						document.getElementById("thumbsUp").setAttribute("oThumsflag","1");
287
						document.getElementById("appreciate").classList.remove("icon-appreciate");
288
							document.getElementById("appreciate").classList.add("icon-appreciatefill");
289
							document.getElementById("thumbsUp").style.color="#ff9900";
290
							document.getElementById("thumbsUp").setAttribute("oThumsflag","1");
281 291
						}
282 292
					}
283 293
				},
@ -306,8 +316,9 @@ mui.plusReady(function() {
306 316
					if(data.success) {
307 317
						plus.nativeUI.toast("收藏成功", toastStyle);
308 318
						document.getElementById("collect").setAttribute("collectFlag","1");
309
						document.getElementById("yesExpert").style.display="none";
310
						document.getElementById("noExpert").style.display="block";
319
						document.getElementById("collect").style.color="#F6DC00";
320
						document.getElementById("yesExpert").classList.remove("icon-favor");
321
						document.getElementById("yesExpert").classList.add("icon-favorfill");
311 322
					}
312 323
				},
313 324
				error: function(XMLHttpRequest, textStats, errorThrown) {
@ -326,8 +337,9 @@ mui.plusReady(function() {
326 337
						if(data.success) {
327 338
							plus.nativeUI.toast("已取消收藏", toastStyle);
328 339
							document.getElementById("collect").setAttribute("collectFlag","0");
329
							document.getElementById("yesExpert").style.display="block";
330
							document.getElementById("noExpert").style.display="none";
340
							document.getElementById("collect").style.color="#929292";
341
							document.getElementById("yesExpert").classList.add("icon-favor");
342
						    document.getElementById("yesExpert").classList.remove("icon-favorfill");
331 343
						} 
332 344
					}
333 345
				},
@ -375,12 +387,14 @@ mui.plusReady(function() {
375 387
					if(data.success) {
376 388
						if(data.data==null){
377 389
							document.getElementById("collect").setAttribute("collectFlag","0");
378
							document.getElementById("yesExpert").style.display="block";
379
							document.getElementById("noExpert").style.display="none";
390
							document.getElementById("collect").style.color="#929292";
391
							document.getElementById("yesExpert").classList.add("icon-favor");
392
							document.getElementById("yesExpert").classList.remove("icon-favorfill");
380 393
						}else{
381 394
						document.getElementById("collect").setAttribute("collectFlag","1");
382
						document.getElementById("yesExpert").style.display="none";
383
						document.getElementById("noExpert").style.display="block";
395
						document.getElementById("collect").style.color="#F6DC00";
396
						document.getElementById("yesExpert").classList.remove("icon-favor");
397
						document.getElementById("yesExpert").classList.add("icon-favorfill");
384 398
						}
385 399
					}
386 400
				},