Skip to content

Commit

Permalink
Release v2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasK committed Mar 28, 2015
1 parent 16abdcc commit ee61530
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-flow",
"version": "2.6.0",
"version": "2.6.1",
"ignore": [
"**/.*",
"test",
Expand Down
8 changes: 7 additions & 1 deletion dist/ng-flow-standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ angular.module('flow.init', ['flow.provider'])
// use existing flow object or create a new one
var flow = $scope.$eval($attrs.flowObject) || flowFactory.create(options);

flow.on('catchAll', function (eventName) {
var catchAllHandler = function(eventName){
var args = Array.prototype.slice.call(arguments);
args.shift();
var event = $scope.$broadcast.apply($scope, ['flow::' + eventName, flow].concat(args));
Expand All @@ -1643,9 +1643,15 @@ angular.module('flow.init', ['flow.provider'])
if (event.defaultPrevented) {
return false;
}
};

flow.on('catchAll', catchAllHandler);
$scope.$on('$destroy', function(){
flow.off('catchAll', catchAllHandler);
});

$scope.$flow = flow;

if ($attrs.hasOwnProperty('flowName')) {
$parse($attrs.flowName).assign($scope, flow);
$scope.$on('$destroy', function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-flow-standalone.min.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion dist/ng-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ angular.module('flow.init', ['flow.provider'])
// use existing flow object or create a new one
var flow = $scope.$eval($attrs.flowObject) || flowFactory.create(options);

flow.on('catchAll', function (eventName) {
var catchAllHandler = function(eventName){
var args = Array.prototype.slice.call(arguments);
args.shift();
var event = $scope.$broadcast.apply($scope, ['flow::' + eventName, flow].concat(args));
Expand All @@ -81,9 +81,15 @@ angular.module('flow.init', ['flow.provider'])
if (event.defaultPrevented) {
return false;
}
};

flow.on('catchAll', catchAllHandler);
$scope.$on('$destroy', function(){
flow.off('catchAll', catchAllHandler);
});

$scope.$flow = flow;

if ($attrs.hasOwnProperty('flowName')) {
$parse($attrs.flowName).assign($scope, flow);
$scope.$on('$destroy', function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-flow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-flow",
"version": "2.6.0",
"version": "2.6.1",
"description": "Flow.js html5 file upload extension on angular.js framework",
"scripts": {
"test": "grunt test"
Expand Down

0 comments on commit ee61530

Please sign in to comment.