Skip to content

Commit

Permalink
Merge pull request #68 from ahmadfh/master
Browse files Browse the repository at this point in the history
decode post text in main thread + fix bottom bar alignment
  • Loading branch information
abuturla authored Apr 14, 2017
2 parents 13b29af + 1f268cc commit 66bd5a1
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 59 deletions.
32 changes: 12 additions & 20 deletions widget/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,14 @@

.holder.bottom-post .post-holder {
position: relative;
height: 100%;
}

.holder.bottom-post .post-holder .add-message {
width: 100%;
padding: 0 50px 0 38px;
position: absolute;
top: 12px;
width:100%;
text-align:center;
}

.holder.bottom-post .post-holder .add-message input {
Expand All @@ -363,32 +366,20 @@

.holder.bottom-post .post-holder .add-media {
position: absolute;
left: 0px;
top: 0px;
width: 38px;
height: 100%;
text-align: center;
}

.holder.bottom-post .post-holder .add-media a {
padding: 7px;
display: inline-block;
left: 17px;
top: 11px;
font-size: 22px;
}

.holder.bottom-post .post-holder .send-message {
position: absolute;
right: 0px;
top: 0px;
width: 49px;
height: 100%;
right: 17px;
top: 11px;
}

.holder.bottom-post .post-holder .add-media .icon {
font-size: 20px;
line-height: 24px;
font-size: 22px;
color: inherit !important;
position: relative;
top: 1px;
}

.holder.bottom-post .post-holder .send-message input {
Expand Down Expand Up @@ -741,6 +732,7 @@ textarea {
/* Comment Box */
.small-post-box{
position: relative;
height: 100%;
}
.small-post-box .image-upload-queue{
position: absolute;
Expand Down
4 changes: 4 additions & 0 deletions widget/controllers/widget.wall.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,10 @@
}, 500);
};

WidgetWall.decodeText = function (text) {
return decodeURIComponent(text);
};

$scope.$watch(function () {
return WidgetWall.SocialItems.items;
}, function () {
Expand Down
23 changes: 9 additions & 14 deletions widget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<div class="copy padding-left-ten padding-right-ten margin-bottom-fifteen">
<p class="margin-zero cursor-pointer">
<span ng-click="WidgetWall.goInToThread(post.uniqueLink)"
ng-bind-html="(post.text | limitTo : (post.limit || 150) :0) | newLine"></span>
ng-bind-html="(WidgetWall.decodeText(post.text) | limitTo : (post.limit || 150) :0) | newLine"></span>
<span ng-if="(post.text.length>150 && !post.seeMore)"
class="ng-cloak">...</span>
<a ng-if="(post.text.length>150 && !post.seeMore)"
Expand Down Expand Up @@ -142,8 +142,8 @@ <h5 class="text-center margin-top-fifteen">You do not have any posts yet.</h5>
</div>
<div class="holder padding-zero bottom-post backgroundColorTheme" ng-class="{'full-post-section':WidgetWall.goFullScreen}">
<hr class="small">
<form class="small-post-box" ng-submit="" handle-phone-submit ng-show="!WidgetWall.goFullScreen">
<div class="post-holder clearfix">
<div ng-click="WidgetWall.openPostSection()" class="small-post-box" ng-submit="" handle-phone-submit ng-show="!WidgetWall.goFullScreen">
<div class="post-holder">
<div class="image-upload-queue ng-cloak" ng-if="WidgetWall.imageSelected">
<div class="uploadifive-queue-item"><a ng-click="WidgetWall.cancelImageSelect()"
class="btn-delete-icon cross-icon"></a>
Expand All @@ -153,25 +153,20 @@ <h5 class="text-center margin-top-fifteen">You do not have any posts yet.</h5>
</div>
</div>
</div>
<div class="add-media">
<a>
<span class="icon icon-camera2 text-primary" ng-click="WidgetWall.openPostSection()"></span>
</a>
<div class="add-media icon icon-camera2 text-primary">
</div>
<div class="add-message pull-left">
<div class="add-message">
<!--<textarea ng-click="WidgetWall.goFullScreen = true" rows="1" cols="30" placeholder="Type your message..." name="text"-->
<!--ng-model="WidgetWall.postText" class="text-area-custom"></textarea>-->

<label ng-click="WidgetWall.openPostSection()"
ng-model="WidgetWall.postText" class="text-area-custom text-primary">Type your message...</label>
<label class="text-primary">Write a post…</label>
</div>
<div class="send-message">
<input type="submit" class="text-primary send-btn" value="Post"
ng-click="WidgetWall.createPost($event)">
<label class="text-primary" >Post</label>
</div>

</div>
</form>
</div>

<form ng-submit="" handle-phone-submit class="full-post-box slide-top" ng-show="WidgetWall.goFullScreen">
<div class="clearfix comment-actions border-bottom-grey">
Expand All @@ -194,7 +189,7 @@ <h5 class="text-center margin-top-fifteen">You do not have any posts yet.</h5>
</div>
</div>
<div class="add-message">
<textarea rows="1" cols="30" placeholder="Type your message..." name="text"
<textarea rows="1" cols="30" placeholder="Write a post…" name="text"
ng-model="WidgetWall.postText" class="text-area-custom backgroundColorTheme text-primary"></textarea>
</div>
<div class="image-upload-queue ng-cloak" ng-if="WidgetWall.imageSelected">
Expand Down
49 changes: 24 additions & 25 deletions widget/templates/thread.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,33 @@
</div>
<div class="holder padding-zero bottom-post backgroundColorTheme" ng-class="{'full-post-section':Thread.goFullScreen}">
<hr class="small">
<div class="post-holder clearfix" ng-show="!Thread.goFullScreen">
<div class="add-media">
<a>
<span class="icon icon-camera2 text-primary" ng-click="Thread.openCommentSection()"></span>
</a>
</div>
<div class="add-message pull-left">
<!--<textarea rows="1" cols="30" placeholder="Type your comment message..." name="text"-->
<!--ng-model="Thread.comment" class="text-area-custom"></textarea>-->
<label ng-click="Thread.openCommentSection()"
ng-model="Thread.comment" class="text-area-custom text-primary">Type your comment message...</label>
<!-- <input type="text" class="form-control" placeholder="Type your comment message..."
ng-model="Thread.comment">-->
</div>
<div class="send-message">
<input type="submit" class="text-primary send-btn" value="Post" ng-click="Thread.addComment()">
</div>
<!--<div class="image-upload-queue" ng-if="Thread.imageSelected">-->
<div ng-click="Thread.openCommentSection()" ng-show="!Thread.goFullScreen" class="small-post-box" >
<div class="post-holder" >
<div class="add-media icon icon-camera2 text-primary">
</div>
<div class="add-message">
<!--<textarea rows="1" cols="30" placeholder="Type your comment message..." name="text"-->
<!--ng-model="Thread.comment" class="text-area-custom"></textarea>-->
<label class="text-primary">Write a comment…</label>
<!-- <input type="text" class="form-control" placeholder="Type your comment message..."
ng-model="Thread.comment">-->
</div>
<div class="send-message">
<label class="text-primary" >Post</label>
</div>
<!--<div class="image-upload-queue" ng-if="Thread.imageSelected">-->
<!--<div class="uploadifive-queue-item"><a ng-click="Thread.cancelImageSelect()"-->
<!--class="btn-delete-icon cross-icon"></a>-->
<!--<div><span class="filename">{{Thread.imageName}}</span></div>-->
<!--<div class="progress" ng-if="Thread.showImageLoader">-->
<!--<div class="progress-bar"></div>-->
<!--</div>-->
<!--class="btn-delete-icon cross-icon"></a>-->
<!--<div><span class="filename">{{Thread.imageName}}</span></div>-->
<!--<div class="progress" ng-if="Thread.showImageLoader">-->
<!--<div class="progress-bar"></div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>


<div class="full-post-box slide-top" ng-show="Thread.goFullScreen">
<div class="clearfix comment-actions border-bottom-grey">
<a ng-click="Thread.closeCommentSection()" class="pull-left text-primary">Cancel</a>
Expand All @@ -173,7 +172,7 @@
</div>
</div>
<div class="add-message">
<textarea rows="1" cols="30" placeholder="Type your comment message..." name="text"
<textarea rows="1" cols="30" placeholder="Write a comment" name="text"
ng-model="Thread.comment" class="text-area-custom backgroundColorTheme text-primary"></textarea>
</div>
<div class="media-section border-top-grey">
Expand Down

0 comments on commit 66bd5a1

Please sign in to comment.