Skip to content

Commit

Permalink
Merge pull request #67 from ahmadfh/master
Browse files Browse the repository at this point in the history
remove settings page
  • Loading branch information
DanielHindi authored Apr 11, 2017
2 parents 52b804b + ebefc80 commit 13b29af
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 270 deletions.
15 changes: 0 additions & 15 deletions control/settings/app.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions control/settings/controllers/mainSettingsCtrl.js

This file was deleted.

25 changes: 9 additions & 16 deletions control/settings/index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
<!DOCTYPE html>
<html ng-app="socialPluginSettings">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Load helper.css to use our helper classes.
-->
<link href="../../../../styles/helper.css" rel="stylesheet">
<!-- input tags -->
<link href="assets/lib/input-tags/css/ng-tags-input.min.css" rel="stylesheet">
<link href="assets/lib/input-tags/css/ng-tags-input.bootstrap.min.css" rel="stylesheet">
-->

<!-- JS -->
<script src="../../../../scripts/buildfire.js"></script>
<script src="../../../../scripts/angular/angular.min.js"></script>
<script src="../../../../scripts/angular/angular-route.min.js"></script>
<!-- input tags -->
<script src="assets/lib/input-tags/js/ng-tags-input.min.js"></script>
<script src="app.js"></script>
<script src="controllers/mainSettingsCtrl.js"></script>

<script src="../../../../scripts/angular/ui-bootstrap.min.js"></script>
<!--
<script src="../../../../scripts/jquery/jquery-1.11.2.min.js"></script>
-->
<script src="../../../../scripts/angular/angular.min.js"></script>
<script src="../../../../scripts/angular/ui-bootstrap.min.js"></script>
<script src="../../../../scripts/jquery/jquery-1.11.2.min.js"></script>
-->
</head>
<body class="scrollable">
<div class="settings" ng-view></div>
<body>
<span>Settings - Hello world!</span>
</body>
</html>
30 changes: 0 additions & 30 deletions control/settings/views/mainSettings.html

This file was deleted.

2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"enabled": false
},
"settings": {
"enabled": true
"enabled": false
}
},
"widget": {
Expand Down
27 changes: 0 additions & 27 deletions test/control/settings/app.specs.js

This file was deleted.

This file was deleted.

39 changes: 0 additions & 39 deletions widget/controllers/widget.thread.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Thread.buildfire = Buildfire;
Thread.SocialItems = SocialItems.getInstance();
Thread.SocialItems.comments = [];
Thread.createThreadPermission = false;
Thread.imageSelected = false;
Thread.imageName = '';
Thread.post = {};
Expand All @@ -25,41 +24,6 @@
return (typeof _receivePushNotification !== 'undefined') ? (_receivePushNotification ? THREAD_STATUS.FOLLOWING : THREAD_STATUS.FOLLOW) : '';
};

Thread.showHideCommentBox = function () {
if (Thread.SocialItems &&
Thread.SocialItems.appSettings &&
Thread.SocialItems.appSettings.allowSideThreadTags &&
Thread.SocialItems.appSettings.sideThreadUserTags &&
Thread.SocialItems.appSettings.sideThreadUserTags.length > 0
) {
var _userTagsObj = Thread.userDetails.userTags;
var _userTags = [];
if (_userTagsObj) {
_userTags = _userTagsObj[Object.keys(_userTagsObj)[0]];
}

if (_userTags) {
var _hasPermission = false;
for (var i = 0; i < Thread.SocialItems.appSettings.sideThreadUserTags.length; i++) {
var _sideThreadTag = Thread.SocialItems.appSettings.sideThreadUserTags[i].text;
for (var x = 0; x < _userTags.length; x++) {
if (_sideThreadTag.toLowerCase() == _userTags[x].tagName.toLowerCase()) {
_hasPermission = true;
break;
}
}
}
Thread.createThreadPermission = _hasPermission;
} else {
Thread.createThreadPermission = false;
}
} else {
Thread.createThreadPermission = true;
}

$scope.$digest();
};

var getUserData = function (userId) {
if(userId){
if (userIds.indexOf(userId.toString()) == -1) {
Expand Down Expand Up @@ -172,7 +136,6 @@
console.error('Side Thread Get Social settings', err);
} else {
Thread.SocialItems.appSettings = SocialData && SocialData.data && SocialData.data.appSettings;
Thread.showHideCommentBox();
deferred.resolve();
SocialDataStore.getUserSettings({
threadId: Thread.post._id,
Expand Down Expand Up @@ -811,8 +774,6 @@
Thread.userDetails.userToken = user.userToken;
Thread.userDetails.userId = user._id;
getUserData(user._id);
//check user if has permission to create thread
Thread.showHideCommentBox();
$scope.$digest();
}
});
Expand Down
Loading

0 comments on commit 13b29af

Please sign in to comment.