noodall-ui 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -5,6 +5,7 @@ doc/api
5
5
  doc/app
6
6
  rerun.txt
7
7
  .sass-cache
8
+ .bundle
8
9
 
9
10
  ## MAC OS
10
11
  .DS_Store
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- noodall-ui (0.0.14)
4
+ noodall-ui (0.0.15)
5
5
  dynamic_form
6
6
  noodall-core
7
7
  thoughtbot-sortable_table (= 0.0.6)
@@ -18,6 +18,7 @@ In order to control when content is available on the website a website administr
18
18
  When today is "5th August 2010"
19
19
  Then the content should not be visible on the website
20
20
 
21
+ @wip
21
22
  Scenario: Publish content for set period
22
23
  Given today is "5th August 2010"
23
24
  And published content exists with publish to date: "30th July 2010"
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module UI
3
- VERSION = "0.0.14"
3
+ VERSION = "0.0.15"
4
4
  end
5
5
  end
@@ -210,19 +210,19 @@ function get_preview_html(e) {
210
210
  preview_form.appendTo("body");
211
211
  preview_form.submit();
212
212
  preview_form.remove();
213
- };
213
+ }
214
214
 
215
215
  function initComponentTable() {
216
216
  // Mark slots that have content as filled
217
217
  $('table.component-table td a').each(function(i, link) {
218
218
  target = '#' + this.href.split('#').pop();
219
- if ($(target + ' .component_form_detail').text().replace(/[\s\t]/g, '') != "") {
219
+ if ($(target + ' .component_form_detail').text().replace(/[\s\t]/g, '') !== "") {
220
220
  $(this).addClass('filled');
221
221
  }
222
222
  });
223
223
  }
224
224
 
225
- var Node = {
225
+ var NoodallNode = {
226
226
  id: function() {
227
227
  return $('form#node-form').attr('action').split('/').pop();
228
228
  }
@@ -300,7 +300,9 @@ var Browser = {
300
300
  mode: 'single', // Single or Multi
301
301
  set_opener: function(opening_tag) {
302
302
  Browser.opener = opening_tag;
303
- types_text = Browser.opener.siblings('.types').text();
303
+ // use the HTML5 data attribute data-file-types if it exists of look for an element
304
+ // with the class "types" for backwards compatibility with legacy projects
305
+ var types_text = Browser.opener.attr('data-file-types') || Browser.opener.siblings('.types').text();
304
306
  if (types_text && types_text.length > 0) {
305
307
  Browser.allowed_types = types_text.toLowerCase().split(', ');
306
308
  } else {
@@ -401,7 +403,7 @@ function open_component_form(e) {
401
403
 
402
404
  table_cell = $("table.component-table td a[href$='" + Component.slot_form_id + "']");
403
405
 
404
- if (Component.last_component_type == '') {
406
+ if (Component.last_component_type === '') {
405
407
  $('#' + Component.last_slot_type + '_slot_' + Component.last_slot_index + '_tag').html('');
406
408
  // Mark table cell as filled
407
409
  table_cell.removeClass('filled');
@@ -421,7 +423,7 @@ function open_component_form(e) {
421
423
  Component.slot_form.find('li.multi-file').last().hide();
422
424
  Component.slot_form.find('textarea.lite-editor').tinymce(lite_tiny_mce_config);
423
425
  });
424
- };
426
+ }
425
427
 
426
428
  function clear_component_form(e) {
427
429
  slot_form = $(e.target).closest('div.component_form');
@@ -573,9 +575,9 @@ $('span.link-asset').live('click', {readonly:true}, function(event) {
573
575
  Component.link_input = $(this).siblings('input').first();
574
576
  Component.allowed_types = [];
575
577
  Browser.action = function() {
576
- asset_id = Browser.assets_to_add[0]
578
+ asset_id = Browser.assets_to_add[0];
577
579
  Component.link_input.val($('#asset-' + asset_id).siblings('a.add').attr('href'));
578
- }
580
+ };
579
581
  Browser.after_close = Component.reopen_slot;
580
582
  Browser.open();
581
583
 
@@ -46,7 +46,7 @@ $.extend(tiny_mce_config, lite_tiny_mce_config, {
46
46
  asset_id = Browser.assets_to_add[0];
47
47
  if (asset_id) {
48
48
  add_url = $('#asset-' + asset_id).siblings('a.show').attr('href').split('?')[0] + '/add';
49
- $.get(add_url, { node_id: Node.id() }, function(data) {
49
+ $.get(add_url, { node_id: NoodallNode.id() }, function(data) {
50
50
  tinyMCE.activeEditor.focus();
51
51
  tinyMCE.activeEditor.selection.setContent(data);
52
52
  $.fancybox.close();
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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 14
10
- version: 0.0.14
9
+ - 15
10
+ version: 0.0.15
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: 2010-12-03 00:00:00 +00:00
18
+ date: 2010-12-10 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -54,7 +54,7 @@ dependencies:
54
54
  requirements:
55
55
  - - ~>
56
56
  - !ruby/object:Gem::Version
57
- hash: 270495401
57
+ hash: -1876988247
58
58
  segments:
59
59
  - 3
60
60
  - 0
@@ -639,8 +639,6 @@ files:
639
639
  - spec/files/beef.png
640
640
  - spec/files/get_video.flv
641
641
  - spec/files/test.pdf
642
- - spec/noodall-ui_spec.rb
643
- - spec/spec_helper.rb
644
642
  - tmp/.gitignore
645
643
  has_rdoc: true
646
644
  homepage: http://github.com/beef/noodall-ui
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Noodall::UI do
4
- it "should return the defaut admin menu" do
5
- Noodall::UI.menu_items.should have(2).things
6
-
7
- Noodall::UI.menu_items['Contents'].should == :noodall_admin_nodes_path
8
- end
9
- end
data/spec/spec_helper.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'noodall-ui'
2
-
3
- Rspec.configure do |config|
4
- end