omniauth-centro 0.0.1 → 0.0.2

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.
@@ -35,24 +35,23 @@ module OmniAuth
35
35
 
36
36
  def request_phase
37
37
  form = OmniAuth::Form.new(:title => "Centro Developer Login", :url => callback_path, :header_info => <<-HTML)
38
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
39
- <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
38
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
39
+ <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
40
40
 
41
- <link href="http://wwwendt.de/tech/dynatree/src/skin/ui.dynatree.css" rel="stylesheet" type="text/css">
42
- <script src="http://wwwendt.de/tech/dynatree/src/jquery.dynatree.js" type="text/javascript"></script>
41
+ <link href="http://wwwendt.de/tech/dynatree/src/skin/ui.dynatree.css" rel="stylesheet" type="text/css">
42
+ <script src="http://wwwendt.de/tech/dynatree/src/jquery.dynatree.js" type="text/javascript"></script>
43
43
  <script type="text/javascript">
44
44
  var updateRawInfoJsonFromTree = function(tree){
45
45
  var rawInfo = {organizations: [], features: []};
46
- organizationNames = [];
47
46
  $.each(tree.getSelectedNodes(), function(index, node){
48
- if(node.data.key.organization_name){
49
- rawInfo.organizations.push({id: node.data.key.organization_id, name: node.data.key.organization_name});
50
- }else if(node.data.key.feature_name){
51
- rawInfo.features.push({organization_id: organizationNames.indexOf(node.data.key.organization_name)+1, name: node.data.key.feature_name});
47
+ // This is a "Feature" node
48
+ if(node.data.key.feature_name){
49
+ rawInfo.features.push({organization_id: node.data.key.organization_id, name: node.data.key.feature_name});
50
+ // OTherwise if it has an ID it's an organization
51
+ }else if(node.data.id){
52
+ rawInfo.organizations.push({id: node.data.id, name: node.data.title});
52
53
  }
53
54
  });
54
- $.each(organizationNames, function(index, name){
55
- });
56
55
  $('#raw_info_json')[0].value = JSON.stringify(rawInfo);
57
56
  }
58
57
  $(function(){
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Centro
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-centro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-25 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth
@@ -81,4 +81,3 @@ signing_key:
81
81
  specification_version: 3
82
82
  summary: OmniAuth strategy for Centro
83
83
  test_files: []
84
- has_rdoc: