oxymoron 1.0.4 → 1.0.5

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: ba2cfcac8057d43bfb870dd02aaa0924f6488d8c
4
- data.tar.gz: b3b9d2905e004ac1814eedc8d9ecfebc65493001
3
+ metadata.gz: b8c055cf8d6022a6ef95cde952de2edb6ecd48f4
4
+ data.tar.gz: 7e247ce65c0af4727f02a9c6bab469dd50d5f6ca
5
5
  SHA512:
6
- metadata.gz: a7a46692f762bb48385842735922fa99b93ca67d7b1e4e9660328413471edc299587223d0376967bb2e72b3138c3520ea1fa8ab588f7c8f07a737880511c3b24
7
- data.tar.gz: 1040515932287e6d02810f0a5e903b485d10fce8183d584369a4a082660113dfe577235c52e88ad9008abbd911c64e155870be020f37a3e5b585c8ba7f5100fb
6
+ metadata.gz: fcb1a9f0bca79762282e9fbb0968283adf9a830d14d341195019645f2ac6be10a5776dbd996cec52e121d8a881631d535a0e3c4b8d2907ec9270dfe59a082e03
7
+ data.tar.gz: f1264247051c55b07e171d7bdfded7faa600daebd34c26a959d40843f7509d2a52c6d543e99691b5e3666f7d1360665727ebbc251029d1d7bba488b53f741e80
@@ -45,11 +45,7 @@ angular.module("oxymoron.config.states", [])
45
45
  <% unless value[:cache] %>
46
46
  params['v']=(new Date()).getTime();
47
47
  <% end %>
48
- if ($stateProvider.oxymoron_location) {
49
- var query = _.omit($stateProvider.oxymoron_location.search(), _.keys(params));
50
- params = angular.extend(query, params);
51
- }
52
-
48
+
53
49
  return Routes['<%= key %>_path'](params);
54
50
  },
55
51
  reloadOnSearch: true,
@@ -2,4 +2,4 @@
2
2
  <%= render_oxymoron_assets "directives/fileupload.js"%>
3
3
  <%= render_oxymoron_assets "directives/click_outside.js"%>
4
4
 
5
- angular.module("oxymoron.directives", ['oxymoron.directives.fileupload', 'oxymoron.directives.contentFor', 'oxymoron.directives.checklistModel', 'oxymoron.directives.clickOutside'])
5
+ angular.module("oxymoron.directives", ['oxymoron.directives.fileupload', 'oxymoron.directives.contentFor', 'oxymoron.directives.clickOutside'])
@@ -1,5 +1,5 @@
1
1
  angular.module("oxymoron.notifier", [])
2
- .run(['$rootScope', 'ngNotify', 'Validate', '$state', '$http', '$location', function ($rootScope, ngNotify, Validate, $state, $http, $location) {
2
+ .run(['$rootScope', 'ngNotify', 'Validate', '$state', '$http', '$location', 'Notice', function ($rootScope, ngNotify, Validate, $state, $http, $location, Notice) {
3
3
  ngNotify.config({
4
4
  theme: 'pure',
5
5
  position: 'top',
@@ -7,10 +7,10 @@ angular.module("oxymoron.notifier", [])
7
7
  type: 'info'
8
8
  });
9
9
 
10
- $rootScope.notify_callback = function(type, res) {
10
+ var callback = function(type, res) {
11
11
  if (res.data && angular.isObject(res.data)) {
12
12
  if (res.data.msg || res.data.error) {
13
- ngNotify.set(res.data.msg || res.data.error, type);
13
+ Notice.callback(type, res);
14
14
  }
15
15
 
16
16
  if (res.data.errors) {
@@ -30,11 +30,11 @@ angular.module("oxymoron.notifier", [])
30
30
  }
31
31
 
32
32
  $rootScope.$on('loading:finish', function (h, res) {
33
- $rootScope.notify_callback('success', res)
33
+ callback('success', res)
34
34
  })
35
35
 
36
36
  $rootScope.$on('loading:error', function (h, res, p) {
37
- $rootScope.notify_callback('error', res)
37
+ callback('error', res)
38
38
  })
39
39
 
40
40
 
@@ -7,28 +7,22 @@ angular.module("oxymoron.services.sign", [])
7
7
  .success(function () {
8
8
  if (callback)
9
9
  callback()
10
- else
11
- window.location = "/";
12
10
  })
13
11
  }
14
12
 
15
- Sign.in = function (user, callback) {
16
- $http.post(Routes.user_session_path(), {user: user})
13
+ Sign.in = function (user_params, callback) {
14
+ $http.post(Routes.user_session_path(), {user: user_params})
17
15
  .success(function () {
18
16
  if (callback)
19
17
  callback();
20
- else
21
- window.location.reload();
22
18
  })
23
19
  }
24
20
 
25
- Sign.up = function (user, callback) {
26
- $http.post(Routes.user_registration_path(), {user: user})
21
+ Sign.up = function (user_params, callback) {
22
+ $http.post(Routes.user_registration_path(), {user: user_params})
27
23
  .success(function () {
28
24
  if (callback)
29
25
  callback();
30
- else
31
- window.location.reload();
32
26
  })
33
27
  }
34
28
  }])
@@ -2,5 +2,6 @@
2
2
  <%= render_oxymoron_assets "services/resources.js.erb"%>
3
3
  <%= render_oxymoron_assets "services/sign.js"%>
4
4
  <%= render_oxymoron_assets "services/validate.js"%>
5
+ <%= render_oxymoron_assets "services/notice.js"%>
5
6
 
6
- angular.module("oxymoron.services", ["oxymoron.services.interceptor", "oxymoron.services.resources", "oxymoron.services.sign", "oxymoron.services.validate"])
7
+ angular.module("oxymoron.services", ["oxymoron.services.interceptor", "oxymoron.services.notice", "oxymoron.services.resources", "oxymoron.services.sign", "oxymoron.services.validate"])
@@ -1,3 +1,3 @@
1
1
  module Oxymoron
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oxymoron
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kononenko Paul