contour 1.0.0.beta → 1.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@
4
4
  //= require jquery
5
5
  //= require jquery_ujs
6
6
  //= require twitter/bootstrap
7
+ //= require twitter-bootstrap/bootstrap-collapse.js
7
8
  //= require twitter-bootstrap/bootstrap-dropdown.js
8
9
  //= require twitter-bootstrap/bootstrap-modal.js
9
10
  //= require twitter-bootstrap/bootstrap-tab.js
@@ -10,4 +10,7 @@
10
10
  $.each(elements, (index, value) ->
11
11
  element = $(value)
12
12
  element.fadeIn(2000)
13
- )
13
+ )
14
+
15
+ jQuery ->
16
+ $(".collapse").collapse()
@@ -0,0 +1,157 @@
1
+ /* =============================================================
2
+ * bootstrap-collapse.js v2.0.3
3
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* COLLAPSE PUBLIC CLASS DEFINITION
27
+ * ================================ */
28
+
29
+ var Collapse = function (element, options) {
30
+ this.$element = $(element)
31
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
32
+
33
+ if (this.options.parent) {
34
+ this.$parent = $(this.options.parent)
35
+ }
36
+
37
+ this.options.toggle && this.toggle()
38
+ }
39
+
40
+ Collapse.prototype = {
41
+
42
+ constructor: Collapse
43
+
44
+ , dimension: function () {
45
+ var hasWidth = this.$element.hasClass('width')
46
+ return hasWidth ? 'width' : 'height'
47
+ }
48
+
49
+ , show: function () {
50
+ var dimension
51
+ , scroll
52
+ , actives
53
+ , hasData
54
+
55
+ if (this.transitioning) return
56
+
57
+ dimension = this.dimension()
58
+ scroll = $.camelCase(['scroll', dimension].join('-'))
59
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60
+
61
+ if (actives && actives.length) {
62
+ hasData = actives.data('collapse')
63
+ if (hasData && hasData.transitioning) return
64
+ actives.collapse('hide')
65
+ hasData || actives.data('collapse', null)
66
+ }
67
+
68
+ this.$element[dimension](0)
69
+ this.transition('addClass', $.Event('show'), 'shown')
70
+ this.$element[dimension](this.$element[0][scroll])
71
+ }
72
+
73
+ , hide: function () {
74
+ var dimension
75
+ if (this.transitioning) return
76
+ dimension = this.dimension()
77
+ this.reset(this.$element[dimension]())
78
+ this.transition('removeClass', $.Event('hide'), 'hidden')
79
+ this.$element[dimension](0)
80
+ }
81
+
82
+ , reset: function (size) {
83
+ var dimension = this.dimension()
84
+
85
+ this.$element
86
+ .removeClass('collapse')
87
+ [dimension](size || 'auto')
88
+ [0].offsetWidth
89
+
90
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
91
+
92
+ return this
93
+ }
94
+
95
+ , transition: function (method, startEvent, completeEvent) {
96
+ var that = this
97
+ , complete = function () {
98
+ if (startEvent.type == 'show') that.reset()
99
+ that.transitioning = 0
100
+ that.$element.trigger(completeEvent)
101
+ }
102
+
103
+ this.$element.trigger(startEvent)
104
+
105
+ if (startEvent.isDefaultPrevented()) return
106
+
107
+ this.transitioning = 1
108
+
109
+ this.$element[method]('in')
110
+
111
+ $.support.transition && this.$element.hasClass('collapse') ?
112
+ this.$element.one($.support.transition.end, complete) :
113
+ complete()
114
+ }
115
+
116
+ , toggle: function () {
117
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
118
+ }
119
+
120
+ }
121
+
122
+
123
+ /* COLLAPSIBLE PLUGIN DEFINITION
124
+ * ============================== */
125
+
126
+ $.fn.collapse = function (option) {
127
+ return this.each(function () {
128
+ var $this = $(this)
129
+ , data = $this.data('collapse')
130
+ , options = typeof option == 'object' && option
131
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
132
+ if (typeof option == 'string') data[option]()
133
+ })
134
+ }
135
+
136
+ $.fn.collapse.defaults = {
137
+ toggle: true
138
+ }
139
+
140
+ $.fn.collapse.Constructor = Collapse
141
+
142
+
143
+ /* COLLAPSIBLE DATA-API
144
+ * ==================== */
145
+
146
+ $(function () {
147
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
148
+ var $this = $(this), href
149
+ , target = $this.attr('data-target')
150
+ || e.preventDefault()
151
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
153
+ $(target).collapse(option)
154
+ })
155
+ })
156
+
157
+ }(window.jQuery);
@@ -27,3 +27,16 @@ body { padding-top: 60px; }
27
27
  //
28
28
  // Example:
29
29
  // @linkColor: #ff0000;
30
+
31
+ dt, dd {
32
+ display: block;
33
+ float: left;
34
+ margin-top: 20px;
35
+ }
36
+
37
+ dt { clear: both; }
38
+ dl { overflow: hidden; }
39
+
40
+ .dl-horizontal dd {
41
+ margin-left: 30px;
42
+ }
@@ -0,0 +1,18 @@
1
+ # From Twitter-Bootstrap-Rails
2
+ module ContourHelper
3
+ def flash_block
4
+ output = ''
5
+ flash.each do |type, message|
6
+ output += flash_container(type, message)
7
+ end
8
+
9
+ raw(output)
10
+ end
11
+
12
+ def flash_container(type, message)
13
+ raw(content_tag(:div, :class => "alert alert-#{type}") do
14
+ content_tag(:a, raw("×"),:class => 'close', :data => {:dismiss => 'alert'}) +
15
+ message
16
+ end)
17
+ end
18
+ end
@@ -38,6 +38,10 @@
38
38
  </div>
39
39
  <% end %>
40
40
 
41
+ <div class="container">
42
+ <%= flash_block %>
43
+ </div>
44
+
41
45
  <div class="navbar navbar-fixed-top">
42
46
  <%= render partial: 'contour/layouts/menu' %>
43
47
  </div>
data/contour.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
  s.add_dependency 'omniauth', '~> 1.0.3'
31
31
  s.add_dependency 'omniauth-openid', '~> 1.0.1'
32
32
  s.add_dependency 'omniauth-ldap', '~> 1.0.2'
33
- s.add_dependency 'omniauth-twitter', '~> 0.0.10'
33
+ s.add_dependency 'omniauth-twitter', '~> 0.0.11'
34
34
  s.add_dependency 'omniauth-facebook', '~> 1.2.0'
35
35
  s.add_dependency 'omniauth-linkedin', '~> 0.0.6'
36
36
  s.add_dependency 'omniauth-cas', '~> 0.0.6'
@@ -3,7 +3,7 @@ module Contour
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
5
  TINY = 0
6
- BUILD = "beta" # nil, "pre", "rc", "rc2"
6
+ BUILD = "beta2" # nil, "pre", "rc", "rc2"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contour
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta
4
+ version: 1.0.0.beta2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-26 00:00:00.000000000 Z
12
+ date: 2012-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70198996780040 !ruby/object:Gem::Requirement
16
+ requirement: &70203892515100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70198996780040
24
+ version_requirements: *70203892515100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: twitter-bootstrap-rails
27
- requirement: &70198993112700 !ruby/object:Gem::Requirement
27
+ requirement: &70203892514600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70198993112700
35
+ version_requirements: *70203892514600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jquery-rails
38
- requirement: &70198993112000 !ruby/object:Gem::Requirement
38
+ requirement: &70203892514140 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.0.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70198993112000
46
+ version_requirements: *70203892514140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: devise
49
- requirement: &70198993110820 !ruby/object:Gem::Requirement
49
+ requirement: &70203892513680 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.0.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70198993110820
57
+ version_requirements: *70203892513680
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: omniauth
60
- requirement: &70198993109500 !ruby/object:Gem::Requirement
60
+ requirement: &70203892513220 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.0.3
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70198993109500
68
+ version_requirements: *70203892513220
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: omniauth-openid
71
- requirement: &70198993108400 !ruby/object:Gem::Requirement
71
+ requirement: &70203892512760 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.1
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70198993108400
79
+ version_requirements: *70203892512760
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: omniauth-ldap
82
- requirement: &70198993107520 !ruby/object:Gem::Requirement
82
+ requirement: &70203892512300 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,21 +87,21 @@ dependencies:
87
87
  version: 1.0.2
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70198993107520
90
+ version_requirements: *70203892512300
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: omniauth-twitter
93
- requirement: &70198993106200 !ruby/object:Gem::Requirement
93
+ requirement: &70203892511840 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
97
97
  - !ruby/object:Gem::Version
98
- version: 0.0.10
98
+ version: 0.0.11
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70198993106200
101
+ version_requirements: *70203892511840
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: omniauth-facebook
104
- requirement: &70198993921440 !ruby/object:Gem::Requirement
104
+ requirement: &70203892511380 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 1.2.0
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70198993921440
112
+ version_requirements: *70203892511380
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: omniauth-linkedin
115
- requirement: &70198993920980 !ruby/object:Gem::Requirement
115
+ requirement: &70203892510920 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.0.6
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70198993920980
123
+ version_requirements: *70203892510920
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: omniauth-cas
126
- requirement: &70198993920520 !ruby/object:Gem::Requirement
126
+ requirement: &70203892510460 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.0.6
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70198993920520
134
+ version_requirements: *70203892510460
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: sqlite3
137
- requirement: &70198993920140 !ruby/object:Gem::Requirement
137
+ requirement: &70203892510080 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,7 +142,7 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *70198993920140
145
+ version_requirements: *70203892510080
146
146
  description: Basic Rails Framework files and assets for layout and authentication
147
147
  email: remosm@gmail.com
148
148
  executables: []
@@ -431,6 +431,7 @@ files:
431
431
  - app/assets/javascripts/external/jquery-ui-1.8.10.custom.min.js
432
432
  - app/assets/javascripts/external/jquery.qtip.min.js
433
433
  - app/assets/javascripts/external/waypoints.js
434
+ - app/assets/javascripts/twitter-bootstrap/bootstrap-collapse.js
434
435
  - app/assets/javascripts/twitter-bootstrap/bootstrap-dropdown.js
435
436
  - app/assets/javascripts/twitter-bootstrap/bootstrap-modal.js
436
437
  - app/assets/javascripts/twitter-bootstrap/bootstrap-tab.js
@@ -445,6 +446,7 @@ files:
445
446
  - app/controllers/contour/registrations_controller.rb
446
447
  - app/controllers/contour/samples_controller.rb
447
448
  - app/controllers/contour/sessions_controller.rb
449
+ - app/helpers/contour_helper.rb
448
450
  - app/models/authentication.rb
449
451
  - app/views/contour/authentications/_index.html.erb
450
452
  - app/views/contour/authentications/_menu.html.erb