Skip to content

Commit bd31bf1

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 6d246bc + 3c27269 commit bd31bf1

File tree

96 files changed

+7079
-2703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+7079
-2703
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
/bower_components
55
/target
66
/build
7-
7+
.idea/

README.md

-35
Original file line numberDiff line numberDiff line change
@@ -63,41 +63,6 @@ mvn clean install
6363

6464
The build process should start and will create a `.war` file in the `target/` directory.
6565

66-
### Glassfish
67-
68-
Glassfish is the web server hosting Streamflow, located
69-
[here](https://test-sfwc.jayway.com:4848). Account details can be found
70-
[here](https://confluence.jayway.com/display/streamsource/Windows+server+tips+and+tricks).
71-
72-
Do the following to finish deployment:
73-
74-
* Click **Applications** in the sidebar.
75-
76-
* Select the checkbox next to the existing deployed application and then click
77-
**Undeploy**.
78-
79-
* Click **Deploy** and select the new application `.war` file.
80-
81-
* Remote desktop to:
82-
83-
```bash
84-
test-sfwc.jayway.com
85-
```
86-
87-
* Edit `WEB-INF/web.xml`. Comment out:
88-
89-
```bash
90-
<param-value>http://localhost/streamflow</param-value>`
91-
```
92-
93-
* and then uncomment:
94-
95-
```bash
96-
<param-value>http://test-sf.jayway.com/streamflow</param-value>`
97-
```
98-
99-
* Go back to Glassfish and **Reload** the deployed application.
100-
10166
## Coding Conventions
10267

10368
Good looking code is important. Keep `jshint` happy, and try to follow these

app/app.js

100644100755
+17-1
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,34 @@ angular.module('sf', [
2121
'ngResource',
2222
'ngAnimate',
2323
'angular-growl',
24+
'ui.select',
2425
'ngSanitize',
2526
'angularFileUpload',
2627
'sf.config',
2728
'angular.filter',
28-
'localytics.directives'
29+
'localytics.directives',
30+
'uiGmapgoogle-maps',
31+
'infinite-scroll'
2932
])
33+
.config(function(uiGmapGoogleMapApiProvider) {
34+
uiGmapGoogleMapApiProvider.configure({
35+
key: 'AIzaSyCqH4sFJMZXvVTaBm4JYk2v089WlarlBtw',
36+
v: '3.17',
37+
libraries: 'places,drawing',
38+
language: 'sv'
39+
});
40+
})
3041
.run(function ($rootScope, $http, httpService, $location, $routeParams, tokenService) {
3142

3243
$rootScope.hasToken = tokenService.hasToken;
3344
$rootScope.isLoggedIn = $rootScope.hasToken();
3445
$rootScope.logout = tokenService.clear;
3546

47+
if (window.isFormWindow) {
48+
$rootScope.isFormWindow = true;
49+
} else {
50+
$rootScope.isFormWindow = false;
51+
}
3652

3753
//Add current project type to rootScope to let toolbar update accordingly in index.html
3854
$rootScope.$on('$routeChangeSuccess', function(e, current, pre) {

app/components/banner/banner.html

+21-6
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,31 @@
2020
<div class="header cf" role="banner">
2121
<div class="header-body cf">
2222
<div class="client-name">
23-
<div class="user-area">
24-
<a href="#/logout" class="btn btn-xs">Logga ut</a>
25-
<a href="#/profile" class="icon-user logged-in">{{profile[0].name}}</a>
26-
</div>
27-
<!-- /user-area -->
2823
<h1>Streamflow Web Client Beta 1</h1>
2924
</div>
30-
3125
<!-- /client-name -->
26+
3227
<search class="main-search"></search>
28+
29+
<div class="user-area">
30+
<a href="" class="logged-in" data-ng-click="toggleUserActions()">
31+
<i class="icon-user"></i>{{profile[0].name}}
32+
</a>
33+
<div class="user-actions" data-ng-show="showUserActions">
34+
<ul>
35+
<li>
36+
<a href="#/profile" class="" data-ng-click="toggleUserActions()">Profil</a>
37+
</li>
38+
<li>
39+
<a href="#/logout" class="" data-ng-click="toggleUserActions()">Logga ut</a>
40+
</li>
41+
<li>
42+
<a href="#/about" class="" data-ng-click="toggleUserActions()">Om Streamflow</a>
43+
</li>
44+
</ul>
45+
</div>
46+
</div>
47+
<!-- /user-area -->
3348
</div>
3449
<!-- /header-body -->
3550

app/components/banner/bannerdirective.js

+16-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ angular.module('sf').directive('banner', function ($rootScope, $q, profileServic
2727
// directive.
2828
profile: '=?'
2929
},
30-
link: function(scope){
30+
link: function(scope) {
31+
scope.showUserActions = false;
3132
var profile = profileService.getCurrent();
3233

3334
$q.all([profile.promise])
@@ -41,6 +42,20 @@ angular.module('sf').directive('banner', function ($rootScope, $q, profileServic
4142
scope.profile.invalidate();
4243
scope.profile.resolve();
4344
});
45+
46+
scope.toggleUserActions = function (bool) {
47+
if (bool !== undefined) {
48+
scope.showUserActions = bool;
49+
} else {
50+
scope.showUserActions = !scope.showUserActions;
51+
}
52+
};
53+
54+
scope.$on('dialogCloseEvent', function (e, data) {
55+
if (data.dialog === 'showUserActions') {
56+
scope.toggleUserActions(false);
57+
}
58+
});
4459
}
4560
};
4661
});

app/components/breadcrumb-banner/breadcrumb-banner-directive.js

+1-11
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,8 @@ angular.module('sf')
3535
});
3636

3737
$rootScope.$on('breadcrumb-updated', function (event, breadcrumbList) {
38-
scope.breadcrumbList = getBreadcrumbItems(breadcrumbList);
38+
scope.breadcrumbList = breadcrumbList;
3939
});
40-
41-
var getBreadcrumbItems = function (breadcrumbList) {
42-
var bcList = [];
43-
_.each(breadcrumbList, function (breadcrumbItem) {
44-
_.each(breadcrumbItem, function (val) {
45-
bcList.push(val);
46-
});
47-
});
48-
return bcList;
49-
};
5040
}
5141
};
5242
});

app/components/breadcrumb-banner/breadcrumb-banner.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
<div class="issue-banner">
2020
<h2>
2121
<span data-ng-repeat="bread in breadcrumbList track by $index">
22-
{{ bread | translate }} <span ng-hide="$last === true">&rarr;&nbsp; </span>
22+
<a href="{{bread.url}}" data-ng-show="bread.url">
23+
{{ bread.title | translate }}
24+
</a>
25+
<span data-ng-hide="bread.url">
26+
{{ bread.title | translate }}
27+
</span>
28+
<span ng-hide="$last === true">&rarr;&nbsp; </span>
2329
</span>
2430
</h2>
2531
</div>

app/components/contextmenu/contextmenu.html

+18-10
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,28 @@
22
<a href="" ng-show="canCreateCase()" data-ng-click="createCase()" class="add-new-issue"><i class="icon-plus"></i><span class="struct">Lägg till nytt ärende</span></a>
33
<div class="functions-menu" data-ng-class="{open: showSidebar}">
44
<div class="functions-header cf">
5-
<h2><a href="#/perspectives">Funktioner</a></h2>
5+
<!--h2><a href="#/perspectives">Funktioner</a></h2-->
6+
<h2><a href="#/perspectives">Funktioner</a>
7+
<div class="container">
8+
<input type="text" class="filter" placeholder="Filtrera" data-ng-model="functionSearch.$">
9+
</div>
10+
</h2>
11+
612
<a href="" class="icon-menu open-toolbar" data-ng-click="toggleSidebar($event)">
713
<span class="struct">Visa/dölj funktionsmeny</span>
814
</a>
915
</div>
10-
<div class="sub-category" data-ng-repeat="project in projects">
11-
<h3>{{project.text}}</h3>
12-
<ul>
13-
<li data-ng-repeat="type in project.types">
14-
<a ng-href="#/{{type.href}}" sf-active-link data-ng-click="navigateTo(type.href, $event)">
15-
<span>{{type.caseCount}}</span><span class="struct">meddelanden i </span> {{type.name | translate }}
16-
</a>
17-
</li>
18-
</ul>
16+
<div class="sub-categories">
17+
<div class="sub-category" data-ng-repeat="project in projects | filter: functionSearch">
18+
<h3>{{project.text}}</h3>
19+
<ul>
20+
<li data-ng-repeat="type in project.types">
21+
<a ng-href="#/{{type.href}}" sf-active-link data-ng-click="navigateTo(type.href, project.text, type.caseCount, $event)">
22+
<span>{{type.caseCount}}</span><span class="struct">meddelanden i </span> {{type.name | translate }}
23+
</a>
24+
</li>
25+
</ul>
26+
</div>
1927
</div>
2028
</div>
2129
</div> <!-- navigation -->

app/components/contextmenu/contextmenudirective.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ angular.module('sf').directive('contextmenu', function (projectService, navigati
2828

2929
scope.projects = projectService.getAll();
3030

31-
scope.navigateTo = function (href, $event){
31+
scope.navigateTo = function (href, projectName, caseCount, $event){
3232
$event.preventDefault();
3333
scope.toggleSidebar($event);
3434
navigationService.linkTo(href);
35+
$rootScope.projectName = projectName;
36+
$rootScope.caseCount = caseCount;
3537
};
3638

3739
scope.toggleSidebar = function ($event) {
@@ -43,10 +45,7 @@ angular.module('sf').directive('contextmenu', function (projectService, navigati
4345
if(!scope.params){
4446
return false;
4547
}
46-
if (scope.params.projectType === 'inbox') {
47-
return false;
48-
}
49-
if (!scope.params.projectType) {
48+
if (!scope.params.projectType && $rootScope.location.$$path.indexOf('cases') < 0) {
5049
return false;
5150
}
5251
return true;
@@ -56,15 +55,16 @@ angular.module('sf').directive('contextmenu', function (projectService, navigati
5655
if(!scope.canCreateCase()){
5756
return;
5857
}
58+
var projectId = navigationService.projectId();
59+
60+
//Add cases possible only with that type
61+
var projectType = 'assignments';
5962

60-
projectService.createCase(scope.params.projectId, scope.params.projectType).then(function(response){
61-
//NOTE: Why is caseId defined here?
63+
projectService.createCase(projectId, projectType).then(function(response){
6264
var caseId = response.data.events[1].entity;
63-
var href = navigationService.caseHrefSimple(caseId);
64-
65+
var href = navigationService.caseHrefSimple(caseId)+'/new';
6566
$rootScope.$broadcast('case-created');
66-
67-
window.location.replace(href + '/edit');
67+
window.open(href);
6868
});
6969
};
7070

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div class="maps">
2+
<div class="row">
3+
<ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" control="map.control" options="map.options">
4+
<ui-gmap-drawing-manager options="drawingManagerOptions" control="drawingManagerControl"
5+
events="drawingManagerOptions.events"></ui-gmap-drawing-manager>
6+
7+
<ui-gmap-marker idkey="marker.id" coords="marker.coords" options="marker.options"
8+
events="marker.events" control="map.markersControl"></ui-gmap-marker>
9+
</ui-gmap-google-map>
10+
</div>
11+
12+
<div class="row">
13+
<label>{{addressLabel}}</label>
14+
</div>
15+
16+
<div class="lookup">
17+
<input type="text" id="map-search-input" class="" data-ng-model="searchValue">
18+
<button class="btn" type="button" data-ng-click="search($event)">Sök</button>
19+
<button class="btn" type="button" data-ng-click="findMe($event)"><i class="icon-target"></i>&nbsp;Min position</button>
20+
<div id="mapErrorMsg">{{searchError}}</div>
21+
<ul class="search-results">
22+
<li data-ng-repeat="result in searchResults"><a href="" data-ng-click="selectAddress($event, result.location)">{{result.address}}</a></li>
23+
</ul>
24+
</div>
25+
</div>

0 commit comments

Comments
 (0)