-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b440af4
commit 37cf62c
Showing
17 changed files
with
73 additions
and
25 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/assets/stylesheets/new_contents.css.scss → ...sets/stylesheets/iframe_contents.css.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// Place all the styles related to the New_Contents controller here. | ||
// Place all the styles related to the IframeContents controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class IframeContentsController < ApplicationController | ||
layout 'iframe_application' | ||
def new | ||
@content = Content.new | ||
@con = [] | ||
end | ||
|
||
def create | ||
@content = Content.new(content_params_input) | ||
@content.image_file_name = @content.title | ||
|
||
if @content.save | ||
ImageWorker.perform_async(@content.id.to_s) | ||
respond_to do |format| | ||
format.html {redirect_to contents_path} | ||
end | ||
else | ||
respond_to do |format| | ||
format.html { render action: 'new' } | ||
end | ||
end | ||
end | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module IframeContentsHelper | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
- content_for :indexpg do | ||
= stylesheet_link_tag :blu | ||
%button.close#cancel{type: "button"} | ||
%span{"aria-hidden" => "true"} × | ||
%span.sr-only Close | ||
.container-fluid{:style => "opacity:1;"} | ||
.col-md-8 | ||
= simple_form_for(@content, wrapper: :horizontal, :html=>{:class => 'form-horizontal', :id=>"newform"}) do |f| | ||
= f.error_notification | ||
= f.input :url, :label =>'URL', :placeholder => "Url" | ||
= f.input :title, :label =>'Title', :placeholder => "Title" | ||
= f.input :rates, :label =>'Rates' | ||
= f.input :user_id, :label =>'UserId', :placeholder => "UserId" | ||
= f.input :tags, :label =>'Tags', :input_html => {"data-pre" => @content.tag_map.to_json, :id => "contentTags"} | ||
= f.button :submit ,'Create', :class => 'btn btn-primary', :id => "create" | ||
:javascript | ||
$('#cancel').on ('click',function(){parent.window.postMessage("removetheiframe", "*");}) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
- model_class = Content | ||
= render :partial => 'new_content2' |
9 changes: 4 additions & 5 deletions
9
app/views/layouts/modal.html → app/views/layouts/iframe_application.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Screamout</title> | ||
<title>Latest----------------Screamout</title> | ||
|
||
<%= stylesheet_link_tag "application", "token-input-facebook.css" %> | ||
<%= stylesheet_link_tag "screamout", "token-input-facebook.css" %> | ||
|
||
<%= stylesheet_link_tag media: 'all', 'data-turbolinks-track' => true %> | ||
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> | ||
|
||
|
||
<%= csrf_meta_tags %> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
</head> | ||
<body > | ||
|
||
<%= yield %> | ||
|
||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Rails.application.config.assets.precompile += [ 'jquery.tokeninput.js','token-input-facebook.css','token-input.css', 'contents.js.coffee','screamout.js.coffee'] | ||
Rails.application.config.assets.precompile += [ 'jquery.tokeninput.js','token-input-facebook.css','token-input.css', 'contents.js.coffee','screamout.js.coffee','screamout.css'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require 'spec_helper' | ||
|
||
describe IframeContentsController do | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
spec/helpers/new_contents_helper_spec.rb → spec/helpers/iframe_contents_helper_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
# Specs in this file have access to a helper object that includes | ||
# the NewContentsHelper. For example: | ||
# the IframeContentsHelper. For example: | ||
# | ||
# describe NewContentsHelper do | ||
# describe IframeContentsHelper do | ||
# describe "string concat" do | ||
# it "concats two strings with spaces" do | ||
# expect(helper.concat_strings("this","that")).to eq("this that") | ||
# end | ||
# end | ||
# end | ||
describe NewContentsHelper do | ||
describe IframeContentsHelper do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |