angular-ujs 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9014c8edfa2d4616d44cbbb6fdcdba1976162af
4
- data.tar.gz: 632a69340d981c4608cfe98caed708efb0c889c3
3
+ metadata.gz: df08b02a129d62a7828b4af8cfca2c2c7ab5c9ef
4
+ data.tar.gz: 7c6887d88d1012323024cce11cd57171cc8afab3
5
5
  SHA512:
6
- metadata.gz: 76085a5211cac4a39f5a355825bb85d2ded9cf54af6c7d8d737b84ecff11d6348db80ee04e13396dd810917c6cfa9362d6e6f6c3ed8ee03e5bd660206cfc8d46
7
- data.tar.gz: 29e42cb163e97b4069bb56aa88e4c83018802d648de91850ee6343bb9207d26f2ee805b04d159dcd48b97f8983f2c610e5d548eafba208c73199a19b99039ee4
6
+ metadata.gz: 1e5f86a4bb4bcd6cf2cbd8fc04921fc4892a68590378e460b609c2a6d673989f1b8c8be13c75110e0230be2ad95fd3f2bb22a8153edfdbfd8a415db1cd388e96
7
+ data.tar.gz: b95eb3d4c6e4b6f06437de5ed6665ea9383a2f037f07b717727a095b6f3086155a643f4ab19e3e712c40f92d7117012dc4fad81cdcd20a5172dde5344f80ceb4
data/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # angular-ujs
2
+ > Distributed via
2
3
 
3
- [![Gem Version](https://badge.fury.io/rb/angular-ujs.png)](http://badge.fury.io/rb/angular-ujs) [![NPM version](https://badge.fury.io/js/angular-ujs.png)](http://badge.fury.io/js/angular-ujs) [![Build Status](https://secure.travis-ci.org/tomchentw/angular-ujs.png)](http://travis-ci.org/tomchentw/angular-ujs) [![Coverage Status](https://coveralls.io/repos/tomchentw/angular-ujs/badge.png?branch=master)](https://coveralls.io/r/tomchentw/angular-ujs?branch=master) [![Code Climate](https://codeclimate.com/github/tomchentw/angular-ujs.png)](https://codeclimate.com/github/tomchentw/angular-ujs) [![Dependency Status](https://gemnasium.com/tomchentw/angular-ujs.png)](https://gemnasium.com/tomchentw/angular-ujs)
4
+ [![Gem Version](https://badge.fury.io/rb/angular-ujs.png)](http://badge.fury.io/rb/angular-ujs) [![NPM version](https://badge.fury.io/js/angular-ujs.png)](http://badge.fury.io/js/angular-ujs)
4
5
 
6
+ > Unobtrusive scripting for AngularJS ( without jQuery dependency )
7
+
8
+ [![Build Status](https://secure.travis-ci.org/tomchentw/angular-ujs.png)](http://travis-ci.org/tomchentw/angular-ujs) [![Coverage Status](https://coveralls.io/repos/tomchentw/angular-ujs/badge.png?branch=master)](https://coveralls.io/r/tomchentw/angular-ujs?branch=master) [![Code Climate](https://codeclimate.com/github/tomchentw/angular-ujs.png)](https://codeclimate.com/github/tomchentw/angular-ujs) [![Dependency Status](https://gemnasium.com/tomchentw/angular-ujs.png)](https://gemnasium.com/tomchentw/angular-ujs)
5
9
 
6
10
  ## Project philosophy
7
11
 
@@ -99,7 +103,7 @@ For `angularjs` apps, **ONLY** those items with `ng-model` will be submitted wit
99
103
 
100
104
  ## Contributing
101
105
 
102
- [![devDependency Status](https://david-dm.org/tomchentw/angular-ujs/dev-status.png?branch=master)](https://david-dm.org/tomchentw/angular-ujs#info=devDependencies)
106
+ [![devDependency Status](https://david-dm.org/tomchentw/angular-ujs/dev-status.png?branch=master)](https://david-dm.org/tomchentw/angular-ujs#info=devDependencies) [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/tomchentw/angular-ujs/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
103
107
 
104
108
  1. Fork it ( http://github.com/tomchentw/angular-ujs/fork )
105
109
  2. Create your feature branch (`git checkout -b my-new-feature`)
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-ujs",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Unobtrusive scripting for AngularJS ( without jQuery dependency )",
5
5
  "longDescription": "Ruby on Rails replacement for unobtrusive scripting library `jquery_ujs` implemented in AngularJS without jQuery dependency",
6
6
  "main": "angular-ujs.js",
@@ -38,21 +38,21 @@
38
38
  "devDependencies": {
39
39
  "LiveScript": "~1.2.0",
40
40
  "event-stream": "~3.1.0",
41
- "gulp": "~3.3.4",
42
- "gulp-livescript": "0.0.12",
41
+ "gulp": "~3.5.2",
42
+ "gulp-livescript": "0.1.1",
43
43
  "gulp-header": "~1.0.2",
44
- "gulp-uglify": "~0.1.0",
45
- "gulp-rename": "~0.2.2",
46
- "gulp-bump": "~0.1.0",
47
- "gulp-exec": "~1.0.3",
48
- "gulp-conventional-changelog": "0.0.8",
44
+ "gulp-uglify": "~0.2.1",
45
+ "gulp-rename": "~1.0.0",
46
+ "gulp-bump": "~0.1.4",
47
+ "gulp-exec": "~1.0.4",
48
+ "gulp-conventional-changelog": "0.1.1",
49
49
  "karma-script-launcher": "~0.1.0",
50
50
  "karma-chrome-launcher": "~0.1.2",
51
51
  "karma-firefox-launcher": "~0.1.3",
52
52
  "karma-jasmine": "~0.1.5",
53
- "karma-phantomjs-launcher": "~0.1.1",
54
- "karma-coverage": "~0.1.4",
53
+ "karma-phantomjs-launcher": "~0.1.2",
54
+ "karma-coverage": "~0.1.5",
55
55
  "karma": "~0.10.9",
56
- "coveralls": "~2.6.1"
56
+ "coveralls": "~2.7.1"
57
57
  }
58
58
  }
@@ -1,4 +1,4 @@
1
- /*! angular-ujs - v 0.4.7 - Sat Jan 25 2014 23:06:35 GMT+0800 (CST)
1
+ /*! angular-ujs - v 0.4.8 - Tue Feb 11 2014 13:09:37 GMT+0800 (CST)
2
2
  * https://github.com/tomchentw/angular-ujs
3
3
  * Copyright (c) 2014 [tomchentw](https://github.com/tomchentw/);
4
4
  * Licensed [MIT](http://tomchentw.mit-license.org/)
@@ -78,14 +78,14 @@
78
78
  return $http(config).then(successCallback, errorCallback);
79
79
  };
80
80
  })).directive('confirm', function(){
81
- function onClickHandler(event){
82
- if (!this.allowAction()) {
83
- this.denyDefaultAction(event);
81
+ function onClickHandler(confirmCtrl, event){
82
+ if (!confirmCtrl.allowAction()) {
83
+ confirmCtrl.denyDefaultAction(event);
84
84
  }
85
85
  }
86
86
  function postLinkFn($scope, $element, $attrs, $ctrls){
87
87
  var callback;
88
- callback = angular.bind($ctrls[0], onClickHandler);
88
+ callback = angular.bind(void 8, onClickHandler, $ctrls[0]);
89
89
  $element.on('click', callback);
90
90
  $scope.$on('$destroy', function(){
91
91
  $element.off('click', callback);
@@ -105,18 +105,20 @@
105
105
  }
106
106
  };
107
107
  }).directive('remote', ['$controller'].concat(function($controller){
108
- function onSubmitHandler($element, event){
109
- this[1].denyDefaultAction(event);
110
- if (this[1].allowAction()) {
111
- this[0].submit($element);
108
+ function onSubmitHandler($element, $ctrls, event){
109
+ $ctrls[1].denyDefaultAction(event);
110
+ if ($ctrls[1].allowAction()) {
111
+ $ctrls[0].submit($element);
112
112
  }
113
113
  }
114
114
  function postLinkFn($scope, $element, $attrs, $ctrls){
115
115
  var callback;
116
- $ctrls[1] || ($ctrls[1] = $controller('noopRailsConfirmCtrl', {
117
- $scope: $scope
118
- }));
119
- callback = angular.bind($ctrls, onSubmitHandler, $element);
116
+ if (!$ctrls[1]) {
117
+ $ctrls[1] = $controller('noopRailsConfirmCtrl', {
118
+ $scope: $scope
119
+ });
120
+ }
121
+ callback = angular.bind(void 8, onSubmitHandler, $element, $ctrls);
120
122
  $element.on('submit', callback);
121
123
  $scope.$on('$destroy', function(){
122
124
  $element.off('submit', callback);
@@ -134,10 +136,10 @@
134
136
  }
135
137
  };
136
138
  })).directive('method', ['$controller', '$compile', '$document', '$getRailsCSRF'].concat(function($controller, $compile, $document, $getRailsCSRF){
137
- function onClickHandler($scope, $attrs, event){
139
+ function onClickHandler($scope, $attrs, $ctrls, event){
138
140
  var metaTags, childScope, $form;
139
- if (this[0].allowAction()) {
140
- this[0].denyDefaultAction(event);
141
+ if ($ctrls[0].allowAction()) {
142
+ $ctrls[0].denyDefaultAction(event);
141
143
  }
142
144
  metaTags = $getRailsCSRF();
143
145
  childScope = $scope.$new();
@@ -146,7 +148,7 @@
146
148
  childScope.$apply(function(){
147
149
  childScope._method = $attrs.method;
148
150
  });
149
- this[1].submit($form).then(function(){
151
+ $ctrls[1].submit($form).then(function(){
150
152
  childScope.$destroy();
151
153
  $form.remove();
152
154
  });
@@ -157,9 +159,13 @@
157
159
  $scope: $scope,
158
160
  $attrs: $attrs
159
161
  };
160
- $ctrls[0] || ($ctrls[0] = $controller('noopRailsConfirmCtrl', controllerArgs));
161
- $ctrls[1] || ($ctrls[1] = $controller('noopRailsRemoteFormCtrl', controllerArgs));
162
- callback = angular.bind($ctrls, onClickHandler, $scope, $attrs);
162
+ if (!$ctrls[0]) {
163
+ $ctrls[0] = $controller('noopRailsConfirmCtrl', controllerArgs);
164
+ }
165
+ if (!$ctrls[1]) {
166
+ $ctrls[1] = $controller('noopRailsRemoteFormCtrl', controllerArgs);
167
+ }
168
+ callback = angular.bind($ctrls, onClickHandler, $scope, $attrs, $ctrls);
163
169
  $element.on('click', callback);
164
170
  $scope.$on('$destroy', function(){
165
171
  $element.off('click', callback);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angular-ujs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomchentw
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-25 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler