瀏覽代碼

4个变更

zhengkaixin 3 年之前
父節點
當前提交
9acd729ca7

二進制
assets/img/img_like.png


+ 51 - 8
assets/js/company_main.js

@@ -163,18 +163,61 @@ $(function(){
 		});
 	})
 	
-	$("#project-photo-row").on("click",".imgoptionspan",function(){
-		var code1="rgb(209, 211, 213)"
-		var code2="#e04460"
-		var value=$(this).css("background-color");
-		console.log(value)
-		if(code1==value){
-			$(this).css("background-color",code2)
+	$("#project-photo-row").on("click",".imgoptionspan.like",function(){ 
+		var value=$(this).attr("islike");
+		if("1"==value){
+			$(this).css("background-image","url(../../assets/img/unlike_heart.png )")
+			$(this).attr("islike","0");
 		}else{
-			$(this).css("background-color",code1)
+			$(this).css("background-image","url(../../assets/img/like_heart.png )")
+			$(this).attr("islike","1");
 		}
 	});
 	
+	$("#project-photo-row").on("click",".imgoptionspan.edit",function(){
+		window.location.href=("../company/postproject.html?1=1");
+		
+	});
+	
+	$("#project-photo-row").on("click",".imgoptionspan.del",function(){
+		
+		var submitlogo = $("#uploadButtonInput").val();
+		
+		var successTitle = $(".head_success").val();
+		var cancelTitle = $(".head_cancel").val();
+		
+		var warning = $(".head_tips").val();
+		var warning1 = $(".signin_warning").val()
+ 		var _this=this;
+		
+		zeroModal.alert({
+			unique: '1',
+			opacity: 0.8,
+			content: warning,
+			contentDetail: warning1,
+			width: '300px',
+			height: '280px',
+			cancel:true,
+			ok: true,
+			cancelTitle:cancelTitle,
+			okTitle:successTitle,
+			okFn: function() {
+				$(_this).parent() .parent().parent().remove()
+			},
+			onClosed: function() {
+				; //location.href='../signin/signin.html'
+			},
+			onComplete: function(evn) {
+				console.log('onComplete')
+		// 		setTimeout(function() {
+		
+		// 			zeroModal.close('1');
+		// 		}, 3000);
+			}
+		})
+	});
+	
+	
 	$(".contact-btn").on("click",function(){
 		window.open("../company/company_contact.html");
 	});

+ 47 - 2
assets/js/moments.js

@@ -156,7 +156,8 @@ function addlistNewest(name, list) {
 	]
 	var obj=window.localStorage.getItem("postmoment")
 	if(obj){
-		obj=JSON.parse(obj)
+		obj=JSON.parse(obj)
+		obj.isedit=1;
 		data=[
 			obj,
 			...data
@@ -173,7 +174,51 @@ function addlistNewest(name, list) {
 	$(".Follow").click(function(){
 		$(this).parent().find(".Follow").show()
 		$(this).hide()
-	})
+	})
+	
+	$(".imguploadlist").on("click",".opBtn.edit",function(){
+		window.location.href=("../moments/postmoment.html?1=1");
+		
+	});
+	
+	$(".imguploadlist").on("click",".opBtn.delete",function(){
+		
+ 		
+		var successTitle = $(".head_success").val();
+		var cancelTitle = $(".head_cancel").val();
+		
+		var warning = $(".head_tips").val();
+		var warning1 = $(".signin_warning").val()
+		var _this=this;
+		
+		zeroModal.alert({
+			unique: '1',
+			opacity: 0.8,
+			content: warning,
+			contentDetail: warning1,
+			width: '300px',
+			height: '280px',
+			cancel:true,
+			ok: true,
+			cancelTitle:cancelTitle,
+			okTitle:successTitle,
+			okFn: function() {
+				$(_this).parent() .parent().remove()
+			},
+			onClosed: function() {
+				; //location.href='../signin/signin.html'
+			},
+			onComplete: function(evn) {
+				console.log('onComplete')
+		// 		setTimeout(function() {
+		
+		// 			zeroModal.close('1');
+		// 		}, 3000);
+			}
+		})
+	});
+	
+	
 	$('.selectpicker').selectpicker({
 		template:{
 			caret:'<span class="sel-icon glyphicon glyphicon-menu-down"></span>'

+ 2 - 1
html/company/company_contact.html

@@ -65,6 +65,7 @@
 		</style>
 	</head>
 	<body>
+		
 		<div id="head" ></div>
 		<script>
 			$(function() {
@@ -81,7 +82,7 @@
 				<!-- <div class="col-md-5" style="padding: 0px;">
 					<img src="../../assets/img/wedloveto.png" style="width:100%;height:calc(100vh - 85px)">
 				</div> -->
-				<div  id="print" class="col-md-6 col-md-offset-3" style="padding: 0px 60px;box-sizing: border-box;min-width: 600px;">
+				<div  id="print" class="col-md-6 col-md-offset-3" style="padding: 0px 60px;box-sizing: border-box;min-width: 800px;">
 					<img  id="logo" src="../../assets/img/contact_icon.png" style="width: 85px;
 								    height: 85px;margin-top:80px;">
 					<p id="companyName" style="font-size: 18px; margin:30px 0px 20px 0px;">Helen studio CHINA | interior</p>

+ 12 - 6
html/company/company_main.html

@@ -128,6 +128,12 @@
 		</style>
 	</head>
 	<body>
+		<input type="hidden" class="head_success i18n-input"  i18n="head_yes" />
+		<input type="hidden" class="head_cancel i18n-input"  i18n="head_cancelTitle" />
+		<input type="hidden" class="head_tips i18n-input"  i18n="head_tips" />
+		<input type="hidden" class="signin_warning i18n-input"  i18n="company_main_tips" />
+ 		
+		
 		<div id="head" ></div>
 		<script>
 			$(function() {
@@ -321,9 +327,9 @@
 			/* 	display: none; */
 			}
 			.imgoption span {
-				    background: #d1d3d5;
+				 /*   background: #d1d3d5;
 					    border-radius: 5px;
-				    opacity: 0.9;
+				    opacity: 0.9; */
 				padding: 3px;
 				margin: 3px;
 				    background-size: 100% 100%;
@@ -352,13 +358,13 @@
 				        </div> 
 						<span class="imgoption ">
 							{{if look}}
-							<span  class="imgoptionspan" style="width: 20px;height: 20px;background-image:url(../../assets/img/img_like.png )"></span>
+							<span  class="imgoptionspan like" style="width: 20px;height: 20px;background-image:url(../../assets/img/unlike_heart.png )"></span>
 							
-							<span class="imgoptionspan"style="width: 20px;height: 20px;background-image:url(../../assets/img/img_edit.png)"></span>
-							<span  class="imgoptionspan" style="width: 20px;height: 20px;background-image:url(../../assets/img/img_del.png)"></span>
+							<span class="imgoptionspan edit"style="width: 20px;height: 20px;background-image:url(../../assets/img/edit_icon_small.png)"></span>
+							<span  class="imgoptionspan del" style="width: 20px;height: 20px;background-image:url(../../assets/img/img_del.png)"></span>
 							{{/if }}
 							{{if !look}}
-							<span  class="imgoptionspan" style="width: 20px;height: 20px;background-image:url(../../assets/img/img_like.png )"></span>
+							<span  class="imgoptionspan like" style="width: 20px;height: 20px;background-image:url(../../assets/img/unlike_heart.png )"></span>
 							
 							{{/if }}
 						</span>

+ 2 - 2
html/head.html

@@ -131,10 +131,10 @@
 									
 									<ul class="dropdown-menu" >
 										<li>
-											<a href="#" class="head_add">公司版本添加</a>
+											<a href="#" class="head_add"> Post Project</a>
 										</li>
 										<li>
-											<a href="../moments/postmoment.html" >个人版本添加</a>
+											<a href="../moments/postmoment.html" >Post Moment</a>
 										</li>
 									</ul>
 									

+ 18 - 5
html/moments/index.html

@@ -137,7 +137,12 @@
 				});
 			})
 		</script>
-		<main class="jpmain">
+		<main class="jpmain">
+			<input type="hidden" class="head_success i18n-input"  i18n="head_yes" />
+			<input type="hidden" class="head_cancel i18n-input"  i18n="head_cancelTitle" />
+			<input type="hidden" class="head_tips i18n-input"  i18n="head_tips" />
+			<input type="hidden" class="signin_warning i18n-input"  i18n="company_main_tips" />
+			
 			<div class="container-fluid" style="padding:0;">
 
 			<div class="tool-box">
@@ -272,7 +277,8 @@
 								min-width: 50px;
 							}
 
-							.Follow {
+							.opBtn {
+								margin-left: 10px;
 								margin-top: 25px;
 								float: right;
 								border: 0px;
@@ -351,10 +357,17 @@
 					white-space: nowrap;">
 				<img src="{{obj.logo}}" style="width: 60px;height: 60px;" >
 				
-				{{obj.name}}
+				{{obj.name}}
+				
 				
-				<button type="button" style=" {{obj.isfollow?'display: none;':''}}" i18n="head_Following" class="Follow Following i18n-text">Following</button>
-				<button type="button"  style=" {{!obj.isfollow?'display: none;':''}}"  i18n="head_Follow" class="Follow Following2 i18n-text">Follow</button>
+				<button type="button" style=" {{obj.isfollow?'display: none;':''}}" i18n="head_Following" class="opBtn Follow Following i18n-text">Following</button>
+				<button type="button"  style=" {{!obj.isfollow?'display: none;':''}}"  i18n="head_Follow" class="opBtn Follow Following2 i18n-text">Follow</button>
+		
+				{{if obj.isedit}}
+				<button type="button"  i18n="head_delete" class="opBtn delete  i18n-text">edit</button>
+				
+				<button type="button"  i18n="head_edit" class="opBtn edit  i18n-text">edit</button>
+				{{/if}}
 			</div>
 			<div class="span12 title" style="margin: 10px 0; ">
 				{{obj.title}}

+ 8 - 1
i18n/strings.properties

@@ -3,9 +3,14 @@ head_Moments=MOMENTS
 head_success=success
 head_warning=warning
 head_Submit=Submit
-
+head_tips=Tips
 head_okTitle=OK
 head_cancelTitle=cancel
+head_yes=yes
+head_edit=edit
+head_delete=delete
+
+
 
 changepwd_Change password=Change password
 changepwd_Old password=Old password
@@ -195,6 +200,8 @@ company_register_Avenue …=Avenue …
 company_register_introduction=A  short company introduction…
 company_register_upload=upload
 
+company_main_tips=Are you sure you want to delete this post?
+
 validator_required=This field is required.
 validator_remote=Please fix this field.
 validator_email=Please enter a valid email address.

+ 5 - 0
i18n/strings_zh.properties

@@ -10,6 +10,10 @@ head_cancelTitle=关闭
 head_10M=仅支持不超过10M的图片
 head_jpgpng=仅限bmp,jpg,png,jpeg图片格式
 head_Submit=提交
+head_tips=提示
+head_yes=确定
+head_edit=编辑
+head_delete=删除
 
 
 headcommon1=注册/登录
@@ -161,6 +165,7 @@ company_postproject_Only upload media you ownthe rights to=仅上传您拥有的
 company_postproject_high resolution images(png,jpg,gif)=高分辨率图像(png,jpg,gif)
 company_postproject_1600X1200 or higher recommended. Max 10MB each=1600X1200或更高。每个最大10MB
 
+company_main_tips=你确定要删除此帖子吗?
 
 
 company_register_Company_profile=公司简介