This repository has been archived by the owner on Jan 30, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RJS + iframe magic
- Loading branch information
Showing
5 changed files
with
42 additions
and
20 deletions.
There are no files selected for viewing
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
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,9 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
<meta content='text/html;charset=utf-8' http-equiv='content-type' /> | ||
</head> | ||
<body> | ||
<%= javascript_tag("window.top.eval('#{escape_javascript(@code)}')") %> | ||
</body> | ||
</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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if @insert_element.nil? | ||
position = :bottom | ||
location = 'slots' | ||
else | ||
position = @insert_before ? :before : :after | ||
location = @insert_element | ||
end | ||
|
||
page.insert_widget dom_id(@upload), position, location, | ||
:partial => 'pages/slot', | ||
:object => @slot, | ||
:locals => { :page => @page, :project => @current_project } | ||
|
||
page.call "InsertionBar.clearWidgetForm" | ||
page.reload_page_sort |
This file was deleted.
Oops, something went wrong.
93e8069
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the iframe upload demonstrated here was broken in Firefox and fixed in f8279ff