Skip to content

Commit

Permalink
Merge pull request #541 from ScottLogic/dev
Browse files Browse the repository at this point in the history
Merge dev to master v9.1.0
  • Loading branch information
owennw committed Mar 4, 2016
2 parents 00a6824 + e0e1cc6 commit 6d3d932
Show file tree
Hide file tree
Showing 55 changed files with 137 additions and 185 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitflux-openfin",
"version": "9.0.0",
"version": "9.1.0",
"scripts": {
"test": "grunt ci",
"postinstall": "cd node_modules/BitFlux && npm i"
Expand Down
70 changes: 35 additions & 35 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
(function() {
'use strict';

angular.module('OpenFinD3FC', [
angular.module('StockFlux', [
'ngAnimate',
'openfin.main',
'openfin.showcase',
'openfin.toolbar',
'openfin.icon',
'openfin.search',
'openfin.favourites',
'openfin.sidebar',
'openfin.filters',
'openfin.star',
'openfin.tearout',
'openfin.minichart',
'openfin.scroll',
'openfin.closedWindows',
'openfin.closedCard',
'openfin.config',
'openfin.version'
'stockflux.main',
'stockflux.showcase',
'stockflux.toolbar',
'stockflux.icon',
'stockflux.search',
'stockflux.favourites',
'stockflux.sidebar',
'stockflux.filters',
'stockflux.star',
'stockflux.tearout',
'stockflux.minichart',
'stockflux.scroll',
'stockflux.closedWindows',
'stockflux.closedCard',
'stockflux.config',
'stockflux.version'
]);

angular.module('openfin.main', []);
angular.module('openfin.showcase', ['openfin.selection', 'openfin.quandl', 'openfin.config']);
angular.module('openfin.toolbar', ['openfin.currentWindow', 'openfin.closedWindows']);
angular.module('openfin.icon', []);
angular.module('openfin.search', ['openfin.quandl', 'openfin.selection', 'openfin.currentWindow']);
angular.module('openfin.favourites', ['openfin.quandl', 'openfin.selection', 'openfin.currentWindow']);
angular.module('openfin.sidebar', []);
angular.module('openfin.filters', []);
angular.module('openfin.star', ['openfin.selection']);
angular.module('openfin.tearout', ['openfin.geometry', 'openfin.hover', 'openfin.currentWindow', 'openfin.config']);
angular.module('openfin.minichart', ['openfin.quandl']);
angular.module('openfin.store', []);
angular.module('openfin.currentWindow', []);
angular.module('openfin.scroll', []);
angular.module('openfin.closedWindows', ['openfin.closedCard']);
angular.module('openfin.closedCard', []);
angular.module('openfin.config', []);
angular.module('openfin.version', ['openfin.currentWindow']);
angular.module('stockflux.main', []);
angular.module('stockflux.showcase', ['stockflux.selection', 'stockflux.quandl', 'stockflux.config']);
angular.module('stockflux.toolbar', ['stockflux.currentWindow', 'stockflux.closedWindows']);
angular.module('stockflux.icon', []);
angular.module('stockflux.search', ['stockflux.quandl', 'stockflux.selection', 'stockflux.currentWindow']);
angular.module('stockflux.favourites', ['stockflux.quandl', 'stockflux.selection', 'stockflux.currentWindow']);
angular.module('stockflux.sidebar', []);
angular.module('stockflux.filters', []);
angular.module('stockflux.star', ['stockflux.selection']);
angular.module('stockflux.tearout', ['stockflux.geometry', 'stockflux.hover', 'stockflux.currentWindow', 'stockflux.config']);
angular.module('stockflux.minichart', ['stockflux.quandl']);
angular.module('stockflux.store', []);
angular.module('stockflux.currentWindow', []);
angular.module('stockflux.scroll', []);
angular.module('stockflux.closedWindows', ['stockflux.closedCard']);
angular.module('stockflux.closedCard', []);
angular.module('stockflux.config', []);
angular.module('stockflux.version', ['stockflux.currentWindow']);
}());
Binary file removed src/assets/png/close_hover.png
Binary file not shown.
Binary file removed src/assets/png/closed_tabs_hover.png
Binary file not shown.
Binary file removed src/assets/png/closed_tabs_small_hover.png
Binary file not shown.
Binary file removed src/assets/png/compact_hover.png
Binary file not shown.
Binary file removed src/assets/png/full_view_hover.png
Binary file not shown.
Binary file removed src/assets/png/maximise_hover.png
Binary file not shown.
Binary file removed src/assets/png/minimise_hover.png
Binary file not shown.
Binary file removed src/assets/png/normal_size_hover.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/closedWindows/closedCard/closedCard-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
}
ClosedCardCtrl.$inject = [];

angular.module('openfin.closedCard')
angular.module('stockflux.closedCard')
.controller('ClosedCardCtrl', ClosedCardCtrl);
}());
2 changes: 1 addition & 1 deletion src/closedWindows/closedCard/closedCard-directive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

angular.module('openfin.closedCard')
angular.module('stockflux.closedCard')
.directive('closedCard', [() => {
return {
restrict: 'E',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
}
ClosedWindowListCtrl.$inject = [];

angular.module('openfin.closedWindows')
angular.module('stockflux.closedWindows')
.controller('ClosedWindowListCtrl', ClosedWindowListCtrl);
}());
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

angular.module('openfin.closedWindows')
angular.module('stockflux.closedWindows')
.directive('closedWindowList', [() => {
return {
restrict: 'E',
Expand Down
10 changes: 6 additions & 4 deletions src/config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

const RESIZE_NO_LIMIT = 50000;
const BITFLUX_STOCK_AMOUNT = 1200;
const BITFLUX_INITIAL_PROPORTION = 31 / BITFLUX_STOCK_AMOUNT;
const BITFLUX_INITIAL_PROPORTION = 16 * 7 / BITFLUX_STOCK_AMOUNT; // ~4 months
const TEAROUT_WINDOW_OFFSET = [268, 65];
const TEAROUT_WINDOW_OFFSET_COMPACT = [218, 47];

// Be very careful changing the line below. It is replaced with a string.replace in the grunt build
// to disable the right click menu in release.
Expand Down Expand Up @@ -75,8 +77,8 @@
};
}

getTopCardOffset() {
return [268, 65];
getTopCardOffset(compact) {
return compact ? TEAROUT_WINDOW_OFFSET_COMPACT : TEAROUT_WINDOW_OFFSET;
}

getInitialBitfluxProportion() {
Expand All @@ -89,7 +91,7 @@
}
ConfigService.$inject = [];

angular.module('openfin.config')
angular.module('stockflux.config')
.service('configService', ConfigService);

}());
71 changes: 11 additions & 60 deletions src/icon/icon-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,39 @@

constructor($scope) {
this.$scope = $scope;

this.setup();
}

setup() {
var name = this.$scope.name;

var dict = {},
_active = '_active',
_hovered = '_hovered';

dict[name + _active] = false;
dict[name + _hovered] = false;

function active(value) {
if (!arguments.length) {
return dict[name + _active];
}

dict[name + _active] = value;
}

function hovered(value) {
if (!arguments.length) {
return dict[name + _hovered];
}

dict[name + _hovered] = value;
}
this.active = false;

this.urls = {
inactive: name,
hover: name + '_hover',
active: name + '_active'
};

this.icon = {
active: active,
hovered: hovered
inactive: $scope.name,
active: $scope.name + '_active'
};
}

enter() {
this.icon.hovered(true);
this.active = true;
}

leave() {
this.icon.hovered(false);
this.icon.active(false);
this.active = false;
}

url() {
if (this.icon.active()) {
return this.urls.active;
} else if (this.icon.hovered()) {
return this.urls.hover;
} else {
return this.urls.inactive;
}
}

mouseDown(e, name) {
if (e.button !== 0) {
return;
}

this.icon.active(true);
return this.active ? this.urls.active : this.urls.inactive;
}

click(e, name) {
click(e) {
if (e.button !== 0) {
return;
}

this.icon.active(true);
this.$scope.iconClick();
this.icon.active(false);
this.icon.hovered(false);
this.active = false;

e.stopPropagation();
}
}
IconCtrl.$inject = ['$scope'];

angular.module('openfin.icon')
angular.module('stockflux.icon')
.controller('IconCtrl', IconCtrl);
}());
2 changes: 1 addition & 1 deletion src/icon/icon-directive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

angular.module('openfin.icon')
angular.module('stockflux.icon')
.directive('icon', [() => {
return {
restrict: 'E',
Expand Down
4 changes: 2 additions & 2 deletions src/icon/icon.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<img class="{{name + '-button'}}" ng-src="assets/png/{{iconCtrl.url()}}.png" ng-mousedown="iconCtrl.mouseDown($event)"
ng-click="iconCtrl.click($event); $event.stopPropagation();" ng-mouseenter="iconCtrl.enter()" ng-mouseleave="iconCtrl.leave()" />
<img class="{{name + '-button'}}" ng-src="assets/png/{{iconCtrl.url()}}.png" ng-click="iconCtrl.click($event);"
ng-mouseenter="iconCtrl.enter()" ng-mouseleave="iconCtrl.leave()" draggable="false"/>
4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE HTML>
<html lang="en" ng-app="OpenFinD3FC">
<html lang="en" ng-app="StockFlux">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenFin D3FC</title>
<title>StockFlux</title>
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/d3fc.min.css" rel="stylesheet">
<link href="assets/css/jquery.mCustomScrollbar.css" rel="stylesheet">
Expand Down
2 changes: 1 addition & 1 deletion src/main/main-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
}
MainCtrl.$inject = [];

angular.module('openfin.main')
angular.module('stockflux.main')
.controller('MainCtrl', MainCtrl);
}());
2 changes: 1 addition & 1 deletion src/main/main-directive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

angular.module('openfin.main')
angular.module('stockflux.main')
.directive('main', [() => {
return {
restrict: 'E',
Expand Down
4 changes: 2 additions & 2 deletions src/main/version/version-controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

const VERSION = { version: '9.0.0' };
const VERSION = { version: '9.1.0' };

class VersionCtrl {
constructor(currentWindowService) {
Expand All @@ -18,6 +18,6 @@
}
VersionCtrl.$inject = ['currentWindowService'];

angular.module('openfin.version')
angular.module('stockflux.version')
.controller('VersionCtrl', VersionCtrl);
}());
2 changes: 1 addition & 1 deletion src/main/version/version-directive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

angular.module('openfin.version')
angular.module('stockflux.version')
.directive('version', [() => {
return {
restrict: 'E',
Expand Down
2 changes: 1 addition & 1 deletion src/parent-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
}
ParentCtrl.$inject = ['$scope', 'storeService', 'windowCreationService'];

angular.module('openfin.parent')
angular.module('stockflux.parent')
.controller('ParentCtrl', ParentCtrl);
}());
2 changes: 1 addition & 1 deletion src/parent.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en" ng-app="OpenFinD3FCParent">
<html lang="en" ng-app="StockFluxParent">
<body ng-controller="ParentCtrl">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.mCustomScrollbar.js"></script>
Expand Down
14 changes: 7 additions & 7 deletions src/parentApp.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(function() {
'use strict';

angular.module('OpenFinD3FCParent', [
'openfin.parent'
angular.module('StockFluxParent', [
'stockflux.parent'
]);

angular.module('openfin.parent', ['openfin.store', 'openfin.window']);
angular.module('openfin.store', []);
angular.module('openfin.currentWindow', []);
angular.module('openfin.window', ['openfin.store', 'openfin.geometry', 'openfin.config']);
angular.module('openfin.config', []);
angular.module('stockflux.parent', ['stockflux.store', 'stockflux.window']);
angular.module('stockflux.store', []);
angular.module('stockflux.currentWindow', []);
angular.module('stockflux.window', ['stockflux.store', 'stockflux.geometry', 'stockflux.config']);
angular.module('stockflux.config', []);
}());
2 changes: 1 addition & 1 deletion src/services/currentWindow-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Abstraction layer for the OpenFin API.
* Also catches events dispatched from the parent window.
*/
angular.module('openfin.currentWindow')
angular.module('stockflux.currentWindow')
.factory('currentWindowService', ['$rootScope', ($rootScope) => {
function getCurrentWindow() {
return fin.desktop.Window.getCurrent();
Expand Down
2 changes: 1 addition & 1 deletion src/services/quandl-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@
}
QuandlService.$inject = ['$resource'];

angular.module('openfin.quandl', ['ngResource'])
angular.module('stockflux.quandl', ['ngResource'])
.service('quandlService', QuandlService);
}());
2 changes: 1 addition & 1 deletion src/services/selection-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
}
SelectionService.$inject = [];

angular.module('openfin.selection', [])
angular.module('stockflux.selection', [])
.service('selectionService', SelectionService);
}());
2 changes: 1 addition & 1 deletion src/showcase/showcase-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
ShowcaseCtrl.$inject = ['selectionService'];

// The quandl service is used in the directive.
angular.module('openfin.showcase', ['openfin.selection', 'openfin.quandl'])
angular.module('stockflux.showcase', ['stockflux.selection', 'stockflux.quandl'])
.controller('ShowcaseCtrl', ShowcaseCtrl);
}());
2 changes: 1 addition & 1 deletion src/showcase/showcase-directive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function(bitflux) {
'use strict';

angular.module('openfin.showcase')
angular.module('stockflux.showcase')
.directive('showcase', ['quandlService', 'configService', (quandlService, configService) => {
return {
restrict: 'E',
Expand Down
Loading

0 comments on commit 6d3d932

Please sign in to comment.