noodall-ui 0.5.0.pre.1 → 0.5.0.pre.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,18 @@ function setup_tooltips() {
42
42
  }
43
43
  }
44
44
 
45
+ function set_up_tags() {
46
+ $('span.tags a').click(function() {
47
+ target = $($(this).attr('href'));
48
+ if (target.val()) {
49
+ target.val(target.val() + ', ' + $(this).text());
50
+ } else {
51
+ target.val($(this).text());
52
+ }
53
+ return false;
54
+ });
55
+ }
56
+
45
57
  $(document).ready(function() {
46
58
 
47
59
  //video previews
@@ -130,7 +142,7 @@ $(document).ready(function() {
130
142
 
131
143
 
132
144
 
133
-
145
+ set_up_tags();
134
146
 
135
147
 
136
148
  $('body#assets.index .file').click(function() {
@@ -812,6 +812,16 @@ li.multi-file .file-detail img {clear:both;float:left;}
812
812
  margin: 0;
813
813
  }
814
814
 
815
+ /* -------------- Popular Tags -------------- */
816
+ span.tags {
817
+ font-size: 15px;
818
+ padding: 10px 0;
819
+ display: block;
820
+ line-height: 1.5;
821
+ }
822
+
823
+
824
+
815
825
  /* -------------- CLEARFIX -------------- */
816
826
 
817
827
  #header:after,
@@ -57,6 +57,12 @@ module Noodall
57
57
  end
58
58
  end
59
59
 
60
+ def popular_tags(limit = 10)
61
+ Noodall::Node.tag_cloud(:limit => limit).map do |tagging|
62
+ link_to tagging.name, '#node_keywords', :class => "count#{tagging.count}"
63
+ end.join(', ').html_safe
64
+ end
65
+
60
66
  def admin_nodes_column_headings
61
67
  html = Array.new
62
68
  html << sortable_table_header(:name => "Name", :sort => "admin_title", :class => 'sort')
@@ -1,4 +1,4 @@
1
- <% content_for :header, javascript_include_tag( 'tiny_mce/jquery.tinymce.js', 'admin/tiny_mce_config', 'admin/nodes', 'admin/assets' ) %>
1
+ <% content_for :header, javascript_include_tag( 'tiny_mce/jquery.tinymce', 'admin/tiny_mce_config', 'admin/nodes', 'admin/assets' ) %>
2
2
 
3
3
 
4
4
  <h1>Editing Content</h1>
@@ -31,7 +31,10 @@
31
31
  <p>
32
32
  <span class="tooltip" title="Enter a comma seperated list of keywords to describe this content.&quot;website,launch,event&quot;">&nbsp;</span>
33
33
  <%= f.label :keywords, "Keywords" %><br/>
34
- <span class="input-wrap"><%= f.text_field :keywords, :class => "keywords-completer" %></span>
34
+ <span class="input-wrap">
35
+ <%= f.text_field :keywords, :class => "keywords-completer" %><br/>
36
+ <span class="tags"><strong>Popular Tags: </strong><%= popular_tags %></span>
37
+ </span>
35
38
  </p>
36
39
 
37
40
  </div>
@@ -66,14 +69,14 @@
66
69
  %>
67
70
  <span class="input-wrap"><%= f.datetime_select :published_to, :include_blank => true %></span>
68
71
  </p>
69
-
72
+
70
73
  <div class="version_message_section advanced-block">
71
74
  <p>
72
75
  <%= f.label :version_message %><br />
73
76
  <span class="input-wrap"><%= f.text_field :version_message -%></span>
74
77
  </p>
75
78
  </div>
76
-
79
+
77
80
  </div>
78
81
 
79
82
  <% if current_user.admin? -%>
@@ -0,0 +1,17 @@
1
+ @javascript
2
+ Feature: Show popular tags
3
+ In order that I don't reuse tags as can see what other tags are
4
+ As a website editor
5
+ I want to see popular tags next to the tag input box
6
+
7
+ Scenario: Popular tags selector
8
+ Given the following page as exists:
9
+ | Title | Tag list |
10
+ | One | stuff, things, what, eh |
11
+ | Two | stuff, things, what |
12
+ | One | stuff, things |
13
+ | One | stuff |
14
+ And I am editing content
15
+ Then I should see the tags list
16
+ When I follow "stuff" within the tag list
17
+ Then the "Keywords" field should contain "stuff"
@@ -0,0 +1,9 @@
1
+ Then /^I should see the tags list$/ do
2
+ page.should have_content('stuff, things, what, eh')
3
+ end
4
+
5
+ When /^I follow "([^"]*)" within the tag list$/ do |tag|
6
+ within 'span.tags' do
7
+ click_link tag
8
+ end
9
+ end
@@ -1,5 +1,6 @@
1
1
  require 'factory_girl_rails'
2
2
  require 'faker'
3
+ require 'factory_girl/step_definitions'
3
4
 
4
5
  FactoryGirl.factories.each do |factory|
5
6
  factory.human_names.each do |human_name|
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module UI
3
- VERSION = "0.5.0.pre.1"
3
+ VERSION = "0.5.0.pre.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noodall-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre.1
4
+ version: 0.5.0.pre.2
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: 2011-10-04 00:00:00.000000000Z
12
+ date: 2011-10-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: noodall-core
16
- requirement: &19504440 !ruby/object:Gem::Requirement
16
+ requirement: &18391560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.7.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *19504440
24
+ version_requirements: *18391560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thoughtbot-sortable_table
27
- requirement: &19503960 !ruby/object:Gem::Requirement
27
+ requirement: &18391100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.0.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *19503960
35
+ version_requirements: *18391100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: will_paginate
38
- requirement: &19503480 !ruby/object:Gem::Requirement
38
+ requirement: &18390600 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '3.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *19503480
46
+ version_requirements: *18390600
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: dynamic_form
49
- requirement: &19503000 !ruby/object:Gem::Requirement
49
+ requirement: &18390120 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *19503000
57
+ version_requirements: *18390120
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &19502520 !ruby/object:Gem::Requirement
60
+ requirement: &18389660 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.0.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *19502520
68
+ version_requirements: *18389660
69
69
  description: Noodall Rails User Interface Engine. Requires Noodall Core
70
70
  email:
71
71
  - steve@wearebeef.co.uk
@@ -234,6 +234,7 @@ files:
234
234
  - features/manage_assets.feature
235
235
  - features/manage_content_tree.feature
236
236
  - features/node_filtering.feature
237
+ - features/popular_tags.feature
237
238
  - features/preview.feature
238
239
  - features/promo_component.feature
239
240
  - features/publish_content.feature
@@ -256,6 +257,7 @@ files:
256
257
  - features/step_definitions/search_steps.rb
257
258
  - features/step_definitions/sign_in_steps.rb
258
259
  - features/step_definitions/sorting_steps.rb
260
+ - features/step_definitions/tags_steps.rb
259
261
  - features/step_definitions/web_steps.rb
260
262
  - features/support/cucumber.css
261
263
  - features/support/env.rb
@@ -666,7 +668,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
666
668
  version: '0'
667
669
  segments:
668
670
  - 0
669
- hash: 4317634813251499206
671
+ hash: 600226257778950845
670
672
  required_rubygems_version: !ruby/object:Gem::Requirement
671
673
  none: false
672
674
  requirements: