oxymoron 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea3bf6d4abeecddd749b6fdc16fcc495d1770def
4
- data.tar.gz: 5f7f6a15045e37610b079c4696726c5ef22c58a6
3
+ metadata.gz: e1e9be0a717233626f89eaa6c8347009df6174a2
4
+ data.tar.gz: d492087f5988b4e828e024472b18d75a95270dc2
5
5
  SHA512:
6
- metadata.gz: 325d0f86ccec02962e354d8401669297eb0bafb7f346c70151d6336625a5c043229a21b584bdf369b701e7aa31ed027b1c8bec9764cb20b8372b544f3a20ac30
7
- data.tar.gz: 3eaebb25c1f585cb30a2606182ab4daa05a51ec64d8b63cb059eac11fd7758780e4396e7b98d9282f1aeb407e8adc1f3b750db1cc6a6a88e05999f649df3467b
6
+ metadata.gz: 5fa4ce4bd8253a640d3faff883df4702791b16b05f36d77eb065367c142a5ae80aedabc48ea8aad2c280826f8f39723fa1d0787f3f93cbc989f5afbf6a29f1e6
7
+ data.tar.gz: 3ecd158bff08e326e581dc79922f0c09090dd54093b73bc368232deabe1d5e37b5589ac2e58da6fd7b4605762fd9a6f71172bba1836fa6403f6a02f127783460
@@ -1,5 +1,5 @@
1
1
  angular.module("oxymoron.directives.fileupload", [])
2
- .directive('fileupload', ['$http', '$timeout', '$cookies', function ($http, $timeout, $cookies) {
2
+ .directive('fileupload', ['$http', '$timeout', '$cookies', 'ngNotify', function ($http, $timeout, $cookies, ngNotify) {
3
3
  return {
4
4
  scope: {
5
5
  fileupload: "=",
@@ -33,8 +33,9 @@ angular.module("oxymoron.directives.fileupload", [])
33
33
  };
34
34
 
35
35
  $scope.xhr.onload = function() {
36
- var res = JSON.parse(this.responseText)
37
-
36
+ var res = JSON.parse(this.responseText)
37
+
38
+ if (this.status == 200) {
38
39
  $scope.$apply(function() {
39
40
  if (!$scope.hash) {
40
41
  if (attrs.multiple) {
@@ -57,6 +58,9 @@ angular.module("oxymoron.directives.fileupload", [])
57
58
 
58
59
  $scope.percentCompleted = undefined;
59
60
  });
61
+ } else {
62
+ ngNotify.set(res.msg || "Uploading error", "error")
63
+ }
60
64
  };
61
65
 
62
66
 
@@ -1,3 +1,3 @@
1
1
  module Oxymoron
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oxymoron
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kononenko Paul
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-22 00:00:00.000000000 Z
11
+ date: 2017-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -960,7 +960,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
960
960
  version: '0'
961
961
  requirements: []
962
962
  rubyforge_project:
963
- rubygems_version: 2.5.1
963
+ rubygems_version: 2.6.1
964
964
  signing_key:
965
965
  specification_version: 4
966
966
  summary: It's using AngularJS and Rails >= 4.2