noodall-ui 0.1.17 → 0.2.0

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.
@@ -0,0 +1,17 @@
1
+ <%= render 'menu' %>
2
+ <h2>Choose Image Size</h2>
3
+
4
+ <div id="image-choices">
5
+
6
+ <div class="choice small" title="Small">
7
+ <%= link_to image_tag( @asset.url('110x110', @asset.web_image_extension), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url('800x600', @asset.web_image_extension), :class => 'lightbox', :title => @asset.title %>
8
+ </div>
9
+
10
+ <div class="choice medium" title="Medium">
11
+ <%= link_to image_tag( @asset.url('220x220', @asset.web_image_extension), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url('800x600', @asset.web_image_extension), :class => 'lightbox', :title => @asset.title %>
12
+ </div>
13
+
14
+ <div class="choice large" title="Large">
15
+ <%= link_to image_tag( @asset.url('460x', @asset.web_image_extension), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url('800x600', @asset.web_image_extension), :class => 'lightbox', :title => @asset.title %>
16
+ </div>
17
+ </div>
@@ -1,10 +1,5 @@
1
1
  <% if @asset.image? %>
2
- <%= link_to image_tag( @asset.url('100x100#', @asset.web_image_extension), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url('800x600', @asset.web_image_extension), :class => 'lightbox', :title => @asset.title %>
3
- <% elsif @asset.video? %>
4
- <div class="video">
5
- <%= link_to image_tag( @asset.url('220x125#', @asset.web_image_extension), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url, :class => 'lightboxVideo', :title => @asset.title %>
6
- <strong><%= @asset.title %></strong>
7
- </div>
2
+ <%= render :partial => '/assets/image_choice' %>
8
3
  <% else -%>
9
- <%= link_to( @asset.title, @asset.url, :title => @asset.description, :id => "asset-#{@asset.id}" ) %>
4
+ <%= link_to( @asset.title, @asset.url, :title => @asset.description, :id => "asset-#{@asset.id}" ) %>
10
5
  <% end -%>
@@ -16,13 +16,14 @@ In order to allow easy access to documents whilst editing a website editor will
16
16
  When I am using the asset library
17
17
  Then I should be able to browse assets by content type
18
18
  And I should be able to browse assets by tags
19
-
19
+
20
20
  @javascript
21
21
  Scenario: Insert an asset
22
22
  Given files have been uploaded to the asset library
23
23
  When I am editing content
24
24
  And I click the editor "Insert Asset" button
25
25
  And follow "Images"
26
- And I click "Add" on an Asset
26
+ And I click "Add" on an Asset
27
+ And I click on the small icon
27
28
  Then the "Image" asset should appear in the content editor
28
29
 
@@ -61,6 +61,10 @@ When /^I click "([^"]*)" on an Asset$/ do |button_name|
61
61
  end
62
62
  end
63
63
 
64
+ When /^I click on the small icon$/ do
65
+ page.find('div.choice.small').click
66
+ end
67
+
64
68
  Then /^the "([^"]*)" asset should appear in the content editor$/ do |asset_type|
65
69
  within_frame('node_body_ifr') do
66
70
  page.should have_css("#tinymce img[src^='/media/']")
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module UI
3
- VERSION = "0.1.17"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ lite_tiny_mce_config = {
12
12
  //"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking",
13
13
  // Theme options
14
14
  theme_advanced_blockformats : "h2,h3,h4,p",
15
- theme_advanced_buttons1 : "bold,italic,underline,|,bullist,numlist,|,link,unlink,|,table,delete_table,col_before,col_after,row_before,row_after,delete_col,delete_row",
15
+ theme_advanced_buttons1 : "bold,italic,underline,|,bullist,numlist,|,link,unlink,|,table,delete_table,tablecontrols,col_before,col_after,row_before,row_after,delete_col,delete_row",
16
16
  theme_advanced_buttons2 : "",
17
17
  theme_advanced_buttons3 : "",
18
18
  theme_advanced_buttons4 : "",
@@ -36,7 +36,7 @@ tiny_mce_config = {};
36
36
  $.extend(tiny_mce_config, lite_tiny_mce_config, {
37
37
  editor_selector : "editor",
38
38
  theme_advanced_buttons1 : "bold,italic,underline,|,formatselect,removeformat ,|,bullist,numlist,|,link,unlink,anchor,|,outdent,indent,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull",
39
- theme_advanced_buttons2 : "table,delete_table,col_before,col_after,row_before,row_after,delete_col,delete_row,|,code,attribs,image,media, assetbrowser,nodebrowser",
39
+ theme_advanced_buttons2 : "table,delete_table,tablecontrols,col_before,col_after,row_before,row_after,delete_col,delete_row,|,code,attribs,image,media, assetbrowser,nodebrowser",
40
40
 
41
41
  setup : function(ed) {
42
42
  // Add a custom button
@@ -45,14 +45,29 @@ $.extend(tiny_mce_config, lite_tiny_mce_config, {
45
45
  image : '/images/admin/image_small.png',
46
46
  href: '#asset-browser',
47
47
  onclick : function() {
48
- Browser.before_close = function() {
49
- asset_id = Browser.assets_to_add[0];
48
+ Browser.do_action_and_close = function() {
49
+ asset_id = Browser.assets_to_add[0]
50
50
  if (asset_id) {
51
51
  add_url = $('#asset-' + asset_id).siblings('a.show').attr('href').split('?')[0] + '/add';
52
52
  $.get(add_url, { node_id: NoodallNode.id() }, function(data) {
53
- tinyMCE.activeEditor.focus();
54
- tinyMCE.activeEditor.selection.setContent(data);
55
- $.fancybox.close();
53
+ $('#asset-browser').html(data);
54
+
55
+ choices = $('#asset-browser .choice');
56
+ if (choices.length > 0) {
57
+ $.each(choices, function(i, choice){
58
+ $(choice).click(function(){
59
+ tinyMCE.activeEditor.focus();
60
+ tinyMCE.activeEditor.selection.setContent($(this).html());
61
+ Browser.close();
62
+ return false;
63
+ })
64
+ });
65
+ } else {
66
+ tinyMCE.activeEditor.focus();
67
+ tinyMCE.activeEditor.selection.setContent(data);
68
+ Browser.close();
69
+ return false;
70
+ }
56
71
  }, 'html');
57
72
  }
58
73
  return false;
@@ -4,7 +4,7 @@
4
4
  #tags,
5
5
  .multi-file-files ol li,
6
6
  .pagination,
7
- div.file-form{
7
+ div.file-forms{
8
8
  height: 1%;
9
9
  }
10
10
 
@@ -14,7 +14,17 @@ div.file-form{
14
14
  }
15
15
 
16
16
  .pagination span, .pagination a, th label {
17
- vertical-align: middle;
17
+ vertical-align: middle;
18
+ }
19
+
20
+ #tags, #pending {
21
+ clear:right;
22
+ float:right;
23
+ height: 405px;
24
+ margin-bottom: 20px;
25
+ overflow: auto;
26
+ padding: 9px;
27
+ width: 15%;
18
28
  }
19
29
 
20
30
  #tags a {
@@ -25,9 +35,18 @@ div.file-form{
25
35
  margin:10px 10px 0 0;
26
36
  }
27
37
 
28
- #fancybox-inner ul#browser-list {
29
- margin-top:50px;
30
- clear:both;
38
+ #browser-list {
39
+ margin-top:50px;
40
+ clear:both;
41
+ display: block;
42
+
43
+ }
44
+
45
+ #fancybox-inner #tags {
46
+ margin-top:30px;
47
+ clear:both;
48
+ display: block;
49
+
31
50
  }
32
51
 
33
52
  #fancybox-inner #asset-browser {
@@ -56,6 +75,11 @@ form#uploader {
56
75
  width:100%;
57
76
  }
58
77
 
78
+
79
+ #assets.pending #content{
80
+ padding-bottom: 100px;
81
+ }
82
+
59
83
  #assets ul.choices {
60
84
  margin:-60px 0 -50px;
61
85
  }
@@ -92,6 +116,11 @@ ol#slot-list li {
92
116
  padding:10px;
93
117
  }
94
118
 
119
+ .slot_tag {
120
+ margin-top: -37px;
121
+ }
122
+
123
+
95
124
  .multi-file-files ol li {
96
125
  min-height:100px;
97
126
  }
@@ -109,10 +138,37 @@ th .tooltip {
109
138
  display:block !important;
110
139
  }
111
140
 
112
- .pagination .next_page {
113
- margin:5px 0 0 0;
141
+ .pagination a, .pagination span, .pagination em{
142
+ float:left;
143
+ margin:0 20px 0 0;
144
+ display:block;
145
+ clear:none;
114
146
  }
115
147
 
116
148
  .multi-file-files ol li:first-child {
117
149
  height:500px;
118
150
  }
151
+
152
+
153
+ /*FORM BUILDER*/
154
+
155
+ .add.form-builder {
156
+ margin-top: 0px;
157
+ }
158
+ #form-fields fieldset p span.tooltip {
159
+ z-index:8888;
160
+ position: relative;
161
+ top: 20px;
162
+ }
163
+
164
+ #forms #content form p {
165
+ z-index:9999;
166
+ position: relative;
167
+ }
168
+
169
+ #forms #content form p#text_field,
170
+ #forms #content form p#select,
171
+ #forms #content form p#radio,
172
+ #forms #content form p#check_box {
173
+ z-index:1;
174
+ }
@@ -277,6 +277,28 @@ form#uploader {
277
277
  margin-bottom: 10px;
278
278
  }
279
279
 
280
+ #asset-browser #image-choices {
281
+ clear: both;
282
+ }
283
+
284
+ #asset-browser div.choice {
285
+ width: 195px;
286
+ height: 165px;
287
+ float: left;
288
+ margin: 95px 0 0 50px;
289
+ cursor: pointer;
290
+ background: url(/images/admin/image_choices.png)
291
+ }
292
+
293
+ #asset-browser div.medium {
294
+ background-position: -236px;
295
+ }
296
+ #asset-browser div.large {
297
+ background-position: -472px;
298
+ }
299
+ #asset-browser div.choice a {
300
+ display: none;
301
+ }
280
302
  /* PAGINATION */
281
303
 
282
304
  .pagination {
@@ -683,9 +683,6 @@ a:hover {
683
683
  color:#D4954C;
684
684
  }
685
685
 
686
-
687
-
688
-
689
686
  /*download button*/
690
687
  #content form input.download-button{
691
688
  background:url("/images/admin/nav.gif") no-repeat scroll 0 -88px transparent;
@@ -701,3 +698,7 @@ a:hover {
701
698
  background-position: -122px -88px;
702
699
  cursor:pointer;
703
700
  }
701
+
702
+ /*span liks*/
703
+ .link-node, .link-asset {color: #60A0BE;}
704
+ .link-node:hover, .link-asset:hover {color: #000; cursor: pointer;}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noodall-ui
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 17
10
- version: 0.1.17
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve England
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-15 00:00:00 +00:00
18
+ date: 2011-02-23 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -127,6 +127,7 @@ files:
127
127
  - app/helpers/noodall/nodes_helper.rb
128
128
  - app/models/asset.rb
129
129
  - app/models/home.rb
130
+ - app/views/assets/_image_choice.html.erb
130
131
  - app/views/layouts/noodall_admin.html.erb
131
132
  - app/views/nodes/home.html.erb
132
133
  - app/views/noodall/admin/assets/_browser.html.erb
@@ -276,6 +277,7 @@ files:
276
277
  - public/images/admin/edit.gif
277
278
  - public/images/admin/edit.png
278
279
  - public/images/admin/image.png
280
+ - public/images/admin/image_choices.png
279
281
  - public/images/admin/image_small.png
280
282
  - public/images/admin/info-white.png
281
283
  - public/images/admin/info.png