Skip to content

Commit

Permalink
0.57.0
Browse files Browse the repository at this point in the history
This closes #65 and closes #66
  • Loading branch information
coni2k committed Jun 13, 2016
1 parent 515c45e commit 7af02ca
Show file tree
Hide file tree
Showing 21 changed files with 297 additions and 180 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
### Changelog

**0.57.0**

* Search page instead of list
https://github.com/forCrowd/WealthEconomy/issues/65
* Fix mobile navigation menu
https://github.com/forCrowd/WealthEconomy/issues/66
* glyphicon icons were replaced with font awesome

**0.56.0**

* resourcePoolManage - Field rating edit
https://github.com/forCrowd/WealthEconomy/issues/64
* Find keep alive service
https://github.com/forCrowd/WealthEconomy/issues/63
* Async action was removed from dataContext.js currentUser(): it was already keeping it as a local variable, now its returns that, which makes this function much easier to use.
* resourcePool and its child entities related functions were moved from dataContext.js to resourcePoolFactory.js

**0.55.1**

Expand Down
8 changes: 6 additions & 2 deletions SolutionItems/Documents/Social.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
gitter
personal dev network https://www.facebook.com/lists/10151319136553665
social network - Emin Pamucak
freenode? stackoverflow?
stackoverflow?
yourfirstpr (pull request)
hackernews - https://news.ycombinator.com/
https://webchat.freenode.net/
https://news.ycombinator.com/
https://www.reddit.com/
reply to twitter
https://twitter.com/sethjuarez/status/692784256670498816
https://twitter.com/martinwoodward/status/692832558447353857
Expand All @@ -14,6 +16,8 @@ https://opensource.com/how-submit-article
https://opensource.com/participate?sc_cid=701600000011jJVAAY
https://appear.in/

opensourceway, freecodecamp, nadia eghbal. microsoft open source.

upforgrabs - first timer only http://up-for-grabs.net/#/

contributing
Expand Down
2 changes: 1 addition & 1 deletion SolutionItems/Documents/Todo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*** HOT ***

* cmrp list? -> search page
* short description for cmrp
* content for editor? new content or new resourcepool - content in a content? or page as a new entity?
* route update (_system/)
* application manager - allows admin to update appSettings & restarts the app?
Expand Down
2 changes: 1 addition & 1 deletion SolutionItems/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
//
// AssemblyFileVersion is not in use for the moment
//
[assembly: AssemblyVersion("0.56.0")]
[assembly: AssemblyVersion("0.57.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion WebApi/App_Start/ODataConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void RegisterOData(HttpConfiguration config)
// Query support
var odataFilter = new EnableQueryAttribute() {
AllowedArithmeticOperators = AllowedArithmeticOperators.None,
AllowedFunctions = AllowedFunctions.None,
AllowedFunctions = AllowedFunctions.SubstringOf,
AllowedLogicalOperators = AllowedLogicalOperators.And |
AllowedLogicalOperators.Equal |
AllowedLogicalOperators.Or,
Expand Down
93 changes: 93 additions & 0 deletions ngClient/_system/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -616,3 +616,96 @@ input[type="checkbox"].input-validation-error {
vertical-align: middle;
float: none;
}

/*Table Search
------------------------------------*/
.table-search {
border-left: none;
}

.table-search .btn-group .btn-u {
top: 4px;
padding: 0 6px;
position: relative;
}

.table-search .btn-u.dropdown-toggle {
border-left: none;
}

.table-search thead {
border-bottom: solid 1px #ddd;
}

.table-search td {
vertical-align: middle !important;
}

.table-search td img {
width: 70px;
height: 70px;
margin: 0 auto;
display: block;
}

.table-search .user-names span,
.table-search .user-names small {
display: block;
text-align: center;
}

.table-search .user-names span {
color: #555;
font-size: 16px;
position: relative;
}

.table-search .user-names small {
color: #999;
font-size: 13px;
}

.table-search td h3 {
font-size: 16px;
margin: 0 0 2px;
}

.table-search td a {
color: #555;
}

.table-search td p {
margin-bottom: 0;
}

.table-search td span {
display: block;
}

.table-search td small {
font-style: italic;
}

.table-search .s-icons {
margin-bottom: 0;
}

.table-search .s-icons li {
padding: 2px;
}

.table-search .table-buttons {
margin: 0;
}

.table-search .table-buttons li {
padding: 0;
}

.table-search .table-buttons .btn-u-sm {
padding: 3px 6px;
}

.table-search .td-width {
width: 55%;
}
14 changes: 7 additions & 7 deletions ngClient/_system/js/app/config/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
.when('/_system/content/reason', { title: 'Reason', templateUrl: '/_system/views/content/reason.html?v=0.49.0', enableDisqus: true, resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/_system/content/totalCostIndex', { title: 'Total Cost Index', templateUrl: '/_system/views/content/totalCostIndex.html?v=0.49.0', enableDisqus: true, resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })

/* CMRP List */
.when('/_system/resourcePool', { title: 'CMRP List', templateUrl: '/_system/views/resourcePool/resourcePoolList.html?v=0.55.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })

/* Account */
.when('/_system/account', { title: 'Account', templateUrl: '/_system/views/account/account.html?v=0.55.0', accessType: 'authenticatedRequired', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/_system/account/accountEdit', { title: 'Account Edit', templateUrl: '/_system/views/account/accountEdit.html?v=0.55.0', accessType: 'authenticatedRequired', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
Expand All @@ -43,11 +40,14 @@
.when('/_system/account/register', { title: 'Register', templateUrl: '/_system/views/account/register.html?v=0.55.0', accessType: 'unauthenticatedRequired', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/_system/account/resetPassword', { title: 'Reset Password', templateUrl: '/_system/views/account/resetPassword.html?v=0.55.0', accessType: 'unauthenticatedRequired', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })

/* CMRP Search */
.when('/_system/resourcePool/search', { title: 'CMRP Search', templateUrl: '/_system/views/resourcePool/resourcePoolSearch.html?v=0.57.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })

/* User */
.when('/:userName', { title: 'Profile', templateUrl: '/_system/views/account/profile.html?v=0.51.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName/new', { title: 'New CMRP', templateUrl: '/_system/views/resourcePool/resourcePoolManage.html?v=0.56.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName/:resourcePoolKey/edit', { title: 'Edit CMRP', templateUrl: '/_system/views/resourcePool/resourcePoolManage.html?v=0.56.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName/:resourcePoolKey', { title: 'View CMRP', templateUrl: '/_system/views/resourcePool/resourcePoolView.html?v=0.49.0', enableDisqus: true, resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName', { title: 'Profile', templateUrl: '/_system/views/account/profile.html?v=0.57.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName/new', { title: 'New CMRP', templateUrl: '/_system/views/resourcePool/resourcePoolManage.html?v=0.57.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName/:resourcePoolKey/edit', { title: 'Edit CMRP', templateUrl: '/_system/views/resourcePool/resourcePoolManage.html?v=0.57.0', resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })
.when('/:userName/:resourcePoolKey', { title: 'View CMRP', templateUrl: '/_system/views/resourcePool/resourcePoolView.html?v=0.57.0', enableDisqus: true, resolve: { validateAccess: ['dataContext', 'locationHistory', 'logger', '$location', '$q', '$route', validateAccess] } })

/* Otherwise */
.otherwise({ redirectTo: getNotFound })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
}
}],
controllerAs: 'vm',
templateUrl: '/_system/views/account/guestAccountInfo.html?v=0.55.0'
templateUrl: '/_system/views/account/guestAccountInfo.html?v=0.57.0'
});
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(function () {
'use strict';

var controllerId = 'ResourcePoolSearchController';
angular.module('main')
.controller(controllerId, ['dataContext', 'logger', 'resourcePoolFactory', '$location', '$rootScope', '$scope', ResourcePoolSearchController]);

function ResourcePoolSearchController(dataContext, logger, resourcePoolFactory, $location, $rootScope, $scope) {

// Logger
logger = logger.forSource(controllerId);

var vm = this;
vm.resourcePoolSet = [];
vm.searchKey = '';
vm.searchKeyChanged = searchKeyChanged;
vm.showResults = false;

_init();

function _init() {
}

function searchKeyChanged() {

if (vm.searchKey.length <= 2) {
vm.showResults = false;
return;
}

resourcePoolFactory.getResourcePoolSet(vm.searchKey)
.then(function (data) {
vm.resourcePoolSet = data;
vm.showResults = true;
});
}
}
})();
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

// TODO viewTitle was also set in route.js?
$rootScope.viewTitle = resourcePool.name();
$rootScope.viewTitle = resourcePool.Name;
});
}
}
Expand Down
5 changes: 0 additions & 5 deletions ngClient/_system/js/app/entities/ResourcePool.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@
return result.length > 0 ? result[0] : null;
}

function name() {
var name = self.Name;
return name;
}

// TODO Since this is a fixed value based on ResourcePoolRateCount & current user's rate,
// it could be calculated on server, check it later again / SH - 03 Aug. '15
function otherUsersResourcePoolRateCount() {
Expand Down
21 changes: 14 additions & 7 deletions ngClient/_system/js/app/factories/resourcePoolFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,20 +459,27 @@
}
}

function getResourcePoolSet() {
function getResourcePoolSet(searchKey) {
searchKey = typeof searchKey !== 'undefined' ? searchKey : '';

var query = breeze.EntityQuery
.from('ResourcePool')
.expand(['User']);

if (searchKey !== '') {
var resourcePoolNamePredicate = new breeze.Predicate('Name', 'contains', searchKey);
var userNamePredicate = new breeze.Predicate('User.UserName', 'contains', searchKey);
query = query.where(resourcePoolNamePredicate.or(userNamePredicate));
}

// Prepare the query
if (fetchFromServer) { // From remote
//if (fetchFromServer) { // From remote
query = query.using(breeze.FetchStrategy.FromServer);
fetchFromServer = false; // Do it only once per user
}
else { // From local
query = query.using(breeze.FetchStrategy.FromLocalCache);
}
// fetchFromServer = false; // Do it only once per user
//}
//else { // From local
//query = query.using(breeze.FetchStrategy.FromLocalCache);
//}

return dataContext.executeQuery(query)
.then(success).catch(failed);
Expand Down
10 changes: 6 additions & 4 deletions ngClient/_system/views/account/guestAccountInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ <h3 class="modal-title">Guest Account</h3>
</p>
</div>
<div class="col-md-6 text-center">
<p>
If you would like to keep this account, please update your email address.
<p class="g-mb-30">
Would like to keep this account?<br />
Please update your email address.
</p>
<p>
<a class="btn btn-primary btn-block" href="/_system/account/changeEmail" data-ng-click="vm.close()">Change email</a>
</p>
</div>
<div class="col-md-6 text-center">
<p>
If you have an existing account, please login.
<p class="g-mb-30">
Do you have an existing account?<br />
Please login with your credentials.
</p>
<p>
<a class="btn btn-primary btn-block" href="/_system/account/login" data-ng-click="vm.close()">Login</a>
Expand Down
Loading

0 comments on commit 7af02ca

Please sign in to comment.