Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
e8ceeb2
Merge pull request #13 from rwth-acis/reqbaz-dev
Aug 4, 2016
a026a04
Merge pull request #14 from rwth-acis/reqbaz-dev
Nov 10, 2016
08fdc3e
Merge pull request #16 from rwth-acis/reqbaz-dev
Nov 10, 2016
1a9f7f7
Merge pull request #17 from rwth-acis/release-1.2.1
Nov 11, 2016
89f5f63
Merge pull request #37 from rwth-acis/release-1.3.0
istvank Dec 7, 2016
68160e1
Changing paths to production.
istvank Jan 23, 2017
539aa0d
Merge pull request #47 from rwth-acis/development
istvank Jan 24, 2017
5957ec1
Merge pull request #48 from rwth-acis/release-1.4.0
istvank Jan 25, 2017
d8cb26d
Bumping version number.
istvank Feb 3, 2017
5d87585
Changing paths to production.
istvank Feb 3, 2017
81abbca
Merge pull request #53 from rwth-acis/release-1.4.1
istvank Feb 6, 2017
9b50c85
bumping version number
istvank May 4, 2017
1689194
Changing paths to production.
istvank May 4, 2017
4c4a8be
Changing paths to production.
istvank May 4, 2017
7e5fbf9
Merge branch 'master' into release-1.4.2
istvank May 9, 2017
6986ed1
Merge pull request #58 from rwth-acis/release-1.4.2
istvank May 9, 2017
4eeb34e
Changing paths to production in prepare for release.
istvank Jun 4, 2017
15c541f
Added "about" to localization files.
istvank Jun 6, 2017
ad71285
Merge branch 'master' into release-1.5.0
istvank Jun 12, 2017
0afc20b
Merge pull request #65 from rwth-acis/release-1.5.0
istvank Jun 12, 2017
1757f8f
Bumping version number to 1.5.1
istvank Jul 12, 2017
b81be56
Changing paths to production in preparation of the release.
istvank Jul 12, 2017
85ee006
Merge pull request #71 from rwth-acis/release-1.5.1
istvank Sep 13, 2017
9f06cd6
Changing paths to production in preparation of release 1.5.2
istvank Sep 25, 2017
a510247
Quick fix for adding qvs service
istvank Sep 25, 2017
946d3fa
Merge branch 'master' into release-1.5.2
istvank Sep 26, 2017
aaf820f
Merge pull request #79 from rwth-acis/release-1.5.2
istvank Sep 26, 2017
aed9ef9
Changing paths to production in preparation of release 1.5.3
istvank Oct 16, 2017
34a3a9a
Merge pull request #86 from rwth-acis/development
istvank Oct 16, 2017
8c175e0
Merge pull request #88 from rwth-acis/reset-currentpage
istvank Oct 16, 2017
456adb0
Merge pull request #89 from rwth-acis/release-1.5.3
istvank Oct 17, 2017
bb59876
Changing paths to production in preparation of release 1.5.4
istvank Oct 23, 2017
980d895
Merge branch 'master' into release-1.5.4
istvank Oct 25, 2017
5fb54fb
Merge pull request #99 from rwth-acis/release-1.5.4
istvank Oct 25, 2017
75e9a7c
Personalisation Element
Dec 24, 2019
57e939a
Projects List Personalisation
Dec 24, 2019
f7f227a
Requirements List Personalisation
Dec 24, 2019
ccb9685
add forceUpdate method returning promise obj.
Jan 14, 2020
892d889
Managed List Functionality
Jan 18, 2020
a4c69e1
ManagedList propagates data-changes locally
Jan 19, 2020
2510831
Support for „Type“ Filter
Jan 22, 2020
c94486f
activity-tracker filtering by origin functionality
Jan 22, 2020
d1ce59b
localization
Jan 22, 2020
6b9077d
Hide filters if not logged in & save last settings to with personalis…
Jan 22, 2020
eb132fc
removing console logs
Jan 23, 2020
8a1e2f6
Merge branch 'development' into feature/personalisation-element
Jan 24, 2020
4875699
Error during merging
Jan 24, 2020
573741c
Personalisation of category-list sorting & sort direction
Jan 24, 2020
91c1e8e
Project Filters, History Missing
Jan 13, 2020
2a0f643
Changed in backend
Jan 22, 2020
ff6b2b8
basic styling improvement, needs improvement
Jan 24, 2020
c713889
Support for „Type“ Filter
Jan 22, 2020
e8af3c0
activity-tracker filtering by origin functionality
Jan 22, 2020
af6b712
localization
Jan 22, 2020
64be8ff
Hide filters if not logged in & save last settings to with personalis…
Jan 22, 2020
6edba7d
Merge branch 'feature/activity-tracker-filtering' of https://github.c…
Jan 24, 2020
6543aed
Merge branch 'feature/activity-tracker-filtering' into personalisation
Jan 24, 2020
e1c6c44
remove unused event
Jan 24, 2020
383bf07
Merge branch 'feature/personalisation-element' into personalisation
Jan 25, 2020
c046525
Use additional-Requestparameters branch of activity-tracker
Jan 27, 2020
ae2394c
Prevent empty-sets from generating invalid requests.
Jan 27, 2020
fea8de1
Dashboard Initial Comit
Feb 4, 2020
33695a9
typo in projects-list
Feb 4, 2020
c5c5e76
Dashboard & Modules Debugged, Shared Behaviour for List, Improved Sty…
Feb 26, 2020
4641d56
Switch to new Version of Endpoint
Mar 4, 2020
09e5750
Dashboard bug fixes, functionality, etc.
Mar 4, 2020
3403fe8
Fix bug where localization doesn’t work for default value
Mar 4, 2020
27ec628
Merge remote-tracking branch 'origin/feature/dashboard' into personal…
Mar 7, 2020
0b51204
Contributed Filter & Bugfix
Mar 9, 2020
7796499
bugfix
Mar 9, 2020
7d81313
make sure to flush debouncer before leaving page
Mar 9, 2020
333c68b
width typo & missing scrolling in activity tracker
Mar 9, 2020
76f35bc
app drawer scroll bug
Mar 9, 2020
eac020a
typo in comments module
Mar 10, 2020
e2eb189
typo in default value
Mar 10, 2020
bbbebf3
debouncer setting
Mar 12, 2020
688c781
Comments & Dynamic Grid
Mar 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"polymer": "Polymer/polymer#^1.6.0",
"time-elements": "^0.6.0",
"openidconnect-signin": "rwth-acis/openidconnect-signin#update-signin",
"activity-tracker": "rwth-acis/activity-tracker#~1.2.0",
"activity-tracker": "rwth-acis/activity-tracker#additional-Requestparameters",
"paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.2.2",
"emoji-selector": "https://github.com/notwaldorf/emoji-selector.git#^1.1.1",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.3.1",
Expand Down
282 changes: 282 additions & 0 deletions elements/activity-tracker-wrapper.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../elements/personalisation-element.html">
<link rel="import" href="../bower_components/activity-tracker/activity-tracker.html">
<link rel="import" href="../bower_components/openidconnect-signin/openidconnect-signin.html">
<link rel="import" href="../src/config-behavior.html">

<dom-module id="activity-tracker-wrapper">
<template>

<style include="shared-styles">

.filters .viewDropdown, .filters .originDropdown{
width: 50%;
float: left;
--paper-input-container-label: {
font-size: 14px;
};
--paper-input-container-input: {
font-size: 15px;
};
}
.filters .originDropdown{
float: right;
clear-after: bottom;
}
#tracker{
-webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
-moz-box-flex: 1; /* OLD - Firefox 19- */
-webkit-flex: 1; /* Chrome */
-ms-flex: 1; /* IE 10 */
flex: 1; /* NEW, */
}

.flexWrapper{
height: 100%;
width: 100%;
overflow: auto;
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
-ms-flex-direction: column;
-moz-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
}
.filters{

}



</style>

<openidconnect-signin-aware is-authorized="{{authorized}}" on-openidconnect-signin-aware-success="_handleSigninSuccess" on-openidconnect-signin-aware-signed-out="_handleSignedOut"></openidconnect-signin-aware>

<personalisation-element
id="personalisationConnector"
keyid="activity-tracker"
keyversion="1"
exchange = "{{personalisationData}}">
</personalisation-element>

<iron-ajax id="entityOverview"
loading="{{loading}}"
content-type="application/json"
url="[[_apiBaseUrl]]users/me/entities"
headers="[[authHeader]]"
last-response="{{_userEntities}}"></iron-ajax>
<div class="flexWrapper">
<template is="dom-if" if="{{authorized}}">
<div class="filters" >
<paper-dropdown-menu label="[[localize('view')]]" class="viewDropdown">
<paper-listbox class="dropdown-content" attr-for-selected="value" selected="{{_typeFilter}}">
<template is="dom-repeat" items="{{ _localizedTypeDropdown(localize) }}" as="item">
<paper-item value="[[ item.value ]]">[[ item.label ]]</paper-item>
</template>
</paper-listbox>
</paper-dropdown-menu>
<paper-dropdown-menu label="[[localize('from')]]" class="originDropdown">
<paper-listbox class="dropdown-content" attr-for-selected="value" selected="{{_originFilter}}">
<template is="dom-repeat" items="{{ _localizedOriginDropdown(localize) }}" as="item">
<paper-item value="[[ item.value ]]">[[ item.label ]]</paper-item>
</template>
</paper-listbox>
</paper-dropdown-menu>
</div>
</template>
<activity-tracker id="tracker" request-parameters="[[_params]]" initial-limit="20" url="[[_activityTrackerBaseUrl]]" auto-update-interval="90" loading="{{loading}}" append-url-parameter="source=activityTracker"></activity-tracker>
</div>


</template>




<script>
Polymer({
is: 'activity-tracker-wrapper',

behaviors: [
ConfigBehavior
],

properties: {
keyid: {
type: String,
notify: true,
value: '',

},
personalisationData: {
type: Object,
notify: true,
},
loading: {
type: Boolean,
notify: true,
},
_typeFilter: {
type: String,
value: 'all',
},
_originFilter: {
type: String,
value: 'all',
observer: '_originFilterChanged',
},
_params:{
type: Object,
notify: true,
computed: '_computeParams(_typeFilter, _userEntities)',
},
_userEntities: {
type: Object,
},


},
observers: [
'_handlePersonalisationDataChangeSET(_typeFilter, _originFilter)',
'_handlePersonalisationDataChangeGET(personalisationData.data)',
'_handleAuthorizedChanged(authorized)',
],
_handlePersonalisationDataChangeSET: function() {
this.$.personalisationConnector.setData({
t: this._typeFilter,
o: this._originFilter,
});
},
_handlePersonalisationDataChangeGET: function() {
if(this.$.personalisationConnector.verifyGet()) {
this._typeFilter = this.personalisationData.data.t;
this._originFilter = this.personalisationData.data.o;
}
},
_handleAuthorizedChanged: function() {
this.debounce('_handleAuthorizedChanged-activitytracker', function() {
if(!this.authorized) {
this._typeFilter = 'all';
this._originFilter = 'all';
}
}, 300);
},
_localizedTypeDropdown: function(localize) {
return [{
value: 'all',
label: [[localize('all')]],
}, {
value: 'development',
label: [[localize('development')]],
}, {
value: 'feedback',
label: [[localize('feedback')]],
}, {
value: 'follow',
label: [[localize('following')]],
}, {
value: 'updates',
label: [[localize('updates')]],
}];
},
_localizedOriginDropdown: function(localize) {
return [{
value: 'all',
label: [[localize('all')]],
}, {
value: 'created',
label: [[localize('created-by-me')]],
}, {
value: 'following',
label: [[localize('following')]],
}, {
value: 'developing',
label: [[localize('developing')]],
}];
},

_originFilterChanged: function(filter) {
if(filter == 'all') {
this._userEntities = null;
}else{
this.$.entityOverview.params = {
'include': ['projects', 'categories', 'requirements'],
'filters': filter,
};
this.$.entityOverview.generateRequest();
}
},

_computeParams: function(type, _userEntities) {
var parameters = {};
var typeArray = this._typeFiltersToArray(type);
Object.assign(parameters,
(typeArray != null)?
{
'combinedFilter': typeArray,
}:{}
);
if(_userEntities != null) {
var additionalObjectCondition = this._userEntitiesToConditions(_userEntities);
if(additionalObjectCondition == '') additionalObjectCondition = '"$.project.id"=-1';
// Workaround to display empty set, TODO Display Error/Disable Option
Object.assign(parameters,
{
'additionalObject': additionalObjectCondition,
});
}
return parameters;
},


_userEntitiesToConditions: function(entities) {
var query = '';
var initial = true;
if(entities.hasOwnProperty('projects')
&& Array.isArray(entities.projects)
&& entities.projects.length) {
query = '"$.project.id"IN('+entities.projects.join(', ')+')';
initial = false;
}
if(entities.hasOwnProperty('categories')
&& Array.isArray(entities.categories)
&& entities.categories.length) {
if(!initial) query = query+'OR';
initial = false;
query = query +
'"$.category.id"IN('+entities.categories.join(', ')+')';
}
if(entities.hasOwnProperty('requirements')
&& Array.isArray(entities.requirements)
&& entities.requirements.length) {
if(!initial) query = query+'OR';
initial = false;
query = query +
'"$.requirement.id"IN('+entities.requirements.join(', ')+')';
}
return query;
},
_typeFiltersToArray: function(type) {
switch(type) {
case 'development':
return ['DEVELOP-*', 'UNDEVELOP-*', 'LEADDEVELOP-*', 'UNLEADDEVELOP-*', 'REALIZE-*', 'UNREALIZE-*'];
case 'feedback':
return ['CREATE-COMMENT', 'VOTE-*', 'UNVOTE-*', 'CREATE-REQUIREMENT'];
case 'follow':
return ['FOLLOW-*'];
case 'updates':
return ['CREATE-REQUIREMENT', 'CREATE-CATEGORY', 'UPDATE-*'];
default:
case 'all':
return null;
}
},


});
</script>

</dom-module>
Loading