Permalink
Browse files

merge

  • Loading branch information...
2 parents 711c840 + 921059b commit f039451c35d0764839dbc516a97cf840d1e00912 Gerry Gleason committed Apr 22, 2012
Showing with 32 additions and 56 deletions.
  1. +1 −1 app/assets/javascripts/wagn.js.coffee
  2. +6 −8 app/assets/stylesheets/defaults.css
  3. +2 −1 features/hello_wagn.feature
  4. +2 −2 features/step_definitions/wagn_steps.rb
  5. +7 −10 lib/packs/default/rich_html_pack.rb
  6. +1 −1 lib/packs/self/account_links_pack.rb
  7. +6 −7 lib/wagn/renderer.rb
  8. +0 −17 lib/wagn/set/type/image.rb
  9. +0 −2 lib/wagn/set/type/phrase.rb
  10. +1 −1 ...-all-cc38272065ce87e38dcbe0e1997c357f.css → application-all-8f2237da776eb45387f3218d8b89796e.css}
  11. BIN public/assets/application-all-8f2237da776eb45387f3218d8b89796e.css.gz
  12. BIN public/assets/application-all-cc38272065ce87e38dcbe0e1997c357f.css.gz
  13. +1 −1 public/assets/application-all.css
  14. BIN public/assets/application-all.css.gz
  15. +1 −1 ...pplication-e2703f9d8059a358ec7bec68210f356e.js → application-e63af233043624a05cb75da5ad1da95f.js}
  16. BIN ...tion-e2703f9d8059a358ec7bec68210f356e.js.gz → application-e63af233043624a05cb75da5ad1da95f.js.gz}
  17. BIN public/assets/application-print-ba4b3800af83e6fdd04c7cef9638fd92.css.gz
  18. BIN public/assets/application-print.css.gz
  19. +1 −1 public/assets/application.js
  20. BIN public/assets/application.js.gz
  21. +2 −2 public/assets/manifest.yml
  22. BIN public/assets/tinymce/jquery-tinymce-eb8c5b5261ce68887ce9bf9769ae61f2.js.gz
  23. BIN public/assets/tinymce/jquery-tinymce.js.gz
  24. BIN public/assets/tinymce/preinit-f82938e8d4595b10e8eb62fe2e7e7ae2.js.gz
  25. BIN public/assets/tinymce/preinit.js.gz
  26. BIN public/assets/tinymce/tiny_mce-fb1cddc8ba6bca541c517c95099c8e34.js.gz
  27. BIN public/assets/tinymce/tiny_mce.js.gz
  28. BIN public/assets/tinymce/tiny_mce_jquery-06e0e44bde34159bfb07bfbf9058fcf1.js.gz
  29. BIN public/assets/tinymce/tiny_mce_jquery.js.gz
  30. +1 −1 spec/lib/wagn/renderer_spec.rb
@@ -14,7 +14,7 @@ wagn.prepUrl = (url, slot)->
item = slot.attr 'item'
xtra['home_view'] = home_view if home_view?
xtra['item'] = item if item?
- xtra['is_main'] = true if slot.isMain
+ xtra['is_main'] = true if slot.isMain()
url + ( (if url.match /\?/ then '&' else '?') + $.param(xtra) )
jQuery.fn.extend {
@@ -77,15 +77,16 @@ select {
border: 1px solid #aaa;
border-top: 2px solid #666;
border-left: 2px solid #666;
- font-size: 12px;
- color: #555;
- background: #ffc;
+ background: #f9f9ed;
+}
+body#tinymce {
+ background: #f9f9ed;
}
input:focus,
select:focus,
textarea:focus,
-div:focus#tinymce {
- background: #ffe;
+body#tinymce:focus {
+ background: #ffffee;
}
input[type=submit]:focus,
input[type=button]:focus {
@@ -94,9 +95,6 @@ input[type=button]:focus {
textarea {
width: 98%;
}
-#tinymce {
- background: #ffe;
-}
body.mceContentBody {
margin: 4px;
}
@@ -10,7 +10,8 @@ Feature: Seeing a card
Scenario: Home page visit
When I go to the homepage
Then I should see "Home"
- And I should see "My Card: Joe User"
+ And I should see "Joe User"
+ And I should see "Sign out"
And In the main card header I should see "Edit"
Then In the main card header I click "close Home"
And In the main card header I should not see "Edit"
@@ -10,13 +10,13 @@
fill_in("login", :with=> user_object.email )
fill_in("password", :with=> user_object.login.split("_")[0]+"_pass")
click_button("Sign me in")
- page.should have_content("My Card: #{user_card_name}")
+ page.should have_content(user_card_name)
end
Given /^I log out/ do
visit "/"
click_link("Sign out")
- page.should_not have_content("My Card")
+ page.should have_content("Sign in")
end
Given /^the card (.*) contains "([^\"]*)"$/ do |cardname, content|
@@ -10,23 +10,21 @@ class Wagn::Renderer::Html
end
define_view :layout do |args|
- if @main_content = args.delete(:main_content)
+ if @main_content = args.delete( :main_content )
@card = Card.fetch_or_new '*placeholder'
- else
- @main_card = card
end
- layout_content = get_layout_content(args)
+ layout_content = get_layout_content args
- args[:params] = params
+ args[:params] = params # EXPLAIN why this is needed
process_content layout_content, args
end
define_view :content do |args|
- c = _render_core(args)
- c = "<span class=\"faint\">--</span>" if c.size < 10 && strip_tags(c).blank?
- wrap(:content, args) { wrap_content(:content, c) }
+ wrap :content, args do
+ wrap_content :content, _render_core(args)
+ end
end
define_view :titled do |args|
@@ -86,7 +84,7 @@ class Wagn::Renderer::Html
else
%{
<h1 class="page-header">
- New #{ card.type_id == Card::DefaultTypeID && '' || card.typename } Card
+ New #{ card.type_id == Card::DefaultTypeID ? 'Card' : card.typename }
</h1>
#{ new_instruction }
#{ new_content :cancel_href=>Card.path_setting('/*previous'), :cancel_class=>'redirecter' }
@@ -713,7 +711,6 @@ def new_content(args)
<div class="edit-area">
<div class="card-editor editor">#{ edit_slot args }</div>
-
<div class="edit-button-area">
#{ submit_tag 'Submit', :class=>'create-submit-button' }
#{ button_tag 'Cancel', :type=>'button', :class=>"create-cancel-button #{args[:cancel_class]}", :href=>args[:cancel_href] }
@@ -5,7 +5,7 @@ class Wagn::Renderer
%{<span id="logging">#{
if Card.logged_in?
ucard = Card.user_card
- link_to( "My Card: #{ucard.name}", "#{Wagn::Conf[:root_path]}/#{ucard.cardname.to_url_key}", :id=>'my-card-link') +
+ link_to( ucard.name, "#{Wagn::Conf[:root_path]}/#{ucard.cardname.to_url_key}", :id=>'my-card-link') +
(Card['*account'].ok?(:create) ? link_to('Invite a Friend', "#{prefix}/invite", :id=>'invite-a-friend-link') : '') +
link_to('Sign out', "#{prefix}/signout", :id=>'signout-link')
else
View
@@ -119,7 +119,7 @@ def get_view_key view, opts
attr_reader :card, :root, :showname #should be able to factor out showname
- attr_accessor :form, :main_content, :main_card
+ attr_accessor :form, :main_content
def render view = :view, args={}
method = "render_#{canonicalize_view view}"
@@ -195,7 +195,7 @@ def initialize_subrenderer subcard, opts
@card = subcard
@char_count = 0
@depth += 1
- @item_view = @main_content = @main_card = @showname = nil
+ @item_view = @main_content = @showname = nil
opts.each { |key, value| instance_variable_set "@#{key}", value }
self
end
@@ -276,17 +276,16 @@ def expand_inclusion opts
end
def expand_main opts
- return wrap_main( @root.main_content ) if @root.main_content
+ return wrap_main( @main_content ) if @main_content
[:item, :view, :size].each do |key|
if val=params[key] and val.to_s.present?
opts[key] = val.to_sym
end
end
- opts[:tname] = @root.main_card.cardname # is this used?
opts[:view] = @main_view || opts[:view] || :open
- opts[:showname] = @root.main_card.name
- with_inclusion_mode(:main) do
- wrap_main process_inclusion(@root.main_card, opts)
+ opts[:showname] = root.card.name
+ with_inclusion_mode :main do
+ wrap_main process_inclusion( root.card, opts )
end
end
View
@@ -1,17 +0,0 @@
-module Wagn::Set::Type::Image
- def legacy_source(tag, size=nil)
- source = tag.match(/src=\"([^\"]+)/)[1]
- size ? resize_legacy_image_content(source, size) : source
- end
-
- def legacy_content
- (rr = _render_raw) && rr =~ /^\s*\</ && rr
- end
-
- def resize_legacy_image_content(content, size)
- return content if !size || size.blank?
- size = (size.to_s == "full" ? "" : "_#{size}")
- content.gsub(/_medium(\.\w+\")/,"#{size}"+'\1')
- end
-
-end
@@ -1,2 +0,0 @@
-module Wagn::Set::Type::Phrase
-end
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
@@ -30,8 +30,8 @@ smoothness/ui-icons_888888_256x240.png: smoothness/ui-icons_888888_256x240-83461
smoothness/ui-icons_cd0a0a_256x240.png: smoothness/ui-icons_cd0a0a_256x240-5e404740e7b81db33ff68615256381c7.png
wait.gif: wait-518ef9dbbf39d973cedb817982126c75.gif
wait_lg.gif: wait_lg-953dd3b0ef31f00ee6256e47c289b9d8.gif
-application.js: application-e2703f9d8059a358ec7bec68210f356e.js
-application-all.css: application-all-cc38272065ce87e38dcbe0e1997c357f.css
+application.js: application-e63af233043624a05cb75da5ad1da95f.js
+application-all.css: application-all-8f2237da776eb45387f3218d8b89796e.css
application-print.css: application-print-ba4b3800af83e6fdd04c7cef9638fd92.css
tinymce/jquery-tinymce.js: tinymce/jquery-tinymce-eb8c5b5261ce68887ce9bf9769ae61f2.js
tinymce/tiny_mce.js: tinymce/tiny_mce-fb1cddc8ba6bca541c517c95099c8e34.js
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -508,7 +508,7 @@
it "should have a 'my card' link" do
Card.as :joe_user do
assert_view_select render_card(:raw, :name=>'*account links'), 'span[id="logging"]' do
- assert_select 'a[id="my-card-link"]', :text => 'My Card: Joe User'
+ assert_select 'a[id="my-card-link"]', :text => 'Joe User'
end
end
end

0 comments on commit f039451

Please sign in to comment.