forked from alexrk/mercury-rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed haml, and adjusted object notation to support ruby 1.8.7 as well
- Loading branch information
Showing
38 changed files
with
643 additions
and
608 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
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,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<%= csrf_meta_tags %> | ||
<title>Mercury Editor</title> | ||
<link href="/assets/mercury.css" media="screen" rel="stylesheet" type="text/css" /> | ||
<script src="/assets/mercury.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
<script type="text/javascript"> | ||
new Mercury.PageEditor() | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
<%= semantic_form_for 'htmlEditor', { :html => { :id => 'mercury_htmlEditor', :style => 'width:650px' } } do |f| %> | ||
|
||
<textarea class="mercury-modal-pane-container" rows="5"></textarea> | ||
|
||
<div class="mercury-modal-controls"> | ||
<%= f.buttons do %> | ||
<%= f.commit_button 'Save and Replace' %> | ||
<% end %> | ||
</div> | ||
|
||
<% 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,40 @@ | ||
<%= semantic_form_for 'link', { :html => { :id => 'mercury_link', style: 'width:600px' } } do |f| %> | ||
|
||
<div class="mercury-modal-pane-container"> | ||
<div class="mercury-modal-pane"> | ||
<%= f.inputs :id => 'link_text_container' do %> | ||
<%= f.input :text, :required => false, :label => 'Link Content' %> | ||
<% end %> | ||
<%= f.inputs 'Standard Links' do %> | ||
<%= f.input :external_url, :required => false, :input_html => { :class => 'selectable' }, | ||
:label => '<input name="link_type" type="radio" value="external_url" checked="checked"/>URL'.html_safe %> | ||
<% end %> | ||
<%= f.inputs 'Index / Bookmark Links' do %> | ||
<%= f.input :existing_bookmark, :as => :select, :required => false, :input_html => { :class => 'selectable' }, :include_blank => false, | ||
:collection => [], | ||
:label => '<input name="link_type" type="radio" value="existing_bookmark"/>Existing Links'.html_safe %> | ||
<%= f.input :new_bookmark, :required => false, :input_html => { :class => 'selectable' }, | ||
:label => '<input name="link_type" type="radio" value="new_bookmark"/>Bookmark'.html_safe %> | ||
<% end %> | ||
<%= f.inputs 'Options' do %> | ||
<%= f.input :target, :as => :select, :required => false, :include_blank => 'Self (the same window or tab)', | ||
:collection => [['Blank (a new window or tab)', '_blank'], ['Top (removes any frames)', '_top'], ['Popup Window (javascript new window popup)', 'popup']], | ||
:label => 'Link Target' %> | ||
<div id="popup_options" class="link-target-options" style="display:none"> | ||
<%= f.input :popup_width, required: false, label: 'Popup Width' %> | ||
<%= f.input :popup_height, required: false, label: 'Popup Height' %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
|
||
<div class="mercury-modal-controls"> | ||
<%= f.buttons do %> | ||
<%= f.commit_button 'Insert Link' %> | ||
<% end %> | ||
</div> | ||
|
||
<% 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,43 @@ | ||
<%= semantic_form_for 'media', { :html => { :id => 'mercury_media', :style => 'width:600px' } } do |f| %> | ||
|
||
<div class="mercury-modal-pane-container"> | ||
<div class="mercury-modal-pane"> | ||
<%= f.inputs 'Images' do %> | ||
<%= f.input :image_url, :required => false, :input_html => { :class => 'selectable' }, | ||
:label => '<input name="media_type" type="radio" value="image_url" checked="checked"/>URL'.html_safe %> | ||
<% end %> | ||
<%= f.inputs 'Videos' do %> | ||
<%= f.input :youtube_url, :required => false, :input_html => { :class => 'selectable' }, | ||
:label => '<input name="media_type" type="radio" value="youtube_url"/>YouTube Share URL'.html_safe %> | ||
<%= f.input :vimeo_url, :required => false, :input_html => { :class => 'selectable' }, | ||
:label => '<input name="media_type" type="radio" value="vimeo_url"/>Vimeo URL'.html_safe %> | ||
<% end %> | ||
<%= f.inputs 'Options' do %> | ||
<div id="image_url" class="media-options"> | ||
<%= f.input :image_alignment, :as => :select, :required => false, :include_blank => 'None', | ||
:collection => [['Left', 'left'], ['Right', 'right'], ['Top', 'top'], ['Middle', 'middle'], ['Bottom', 'bottom'], ['Absolute Middle', 'absmiddle'], ['Absolute Bottom', 'absbottom']], | ||
:label => 'Alignment' %> | ||
</div> | ||
|
||
<div id="youtube_url" class="media-options" style="display:none"> | ||
<%= f.input :youtube_width, :required => false, :label => 'Width', :input_html => { :value => '560' } %> | ||
<%= f.input :youtube_height, :required => false, :label => 'Height', :input_html => { :value => '349' } %> | ||
</div> | ||
|
||
<div id="vimeo_url" class="media-options" style="display:none"> | ||
<%= f.input :vimeo_width, :required => false, :label => 'Width', :input_html => { :value => '400' } %> | ||
<%= f.input :vimeo_height, :required => false, :label => 'Height', :input_html => { :value => '225' } %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
|
||
<div class="mercury-modal-controls"> | ||
<%= f.buttons do %> | ||
<%= f.commit_button 'Insert Media' %> | ||
<% end %> | ||
</div> | ||
|
||
<% 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,5 @@ | ||
<div id="mercury_sanitizer" style="width:450px"> | ||
<div class="information">It looks like you've pasted directly from Microsoft Office!<br/><br/>Sadly though, your browser wasn't able to properly handle what you pasted. But that's ok, because I've sanitized it for you!</div> | ||
<textarea rows="20" wrap="off"></textarea> | ||
<strong>You can just copy and paste the sanitized content that appears above.</strong> | ||
</div> |
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,66 @@ | ||
<%= semantic_form_for 'table', { :html => { :id => 'mercury_table', :style => 'width:700px' } } do |f| %> | ||
|
||
<div class="mercury-modal-pane-container"> | ||
<div class="mercury-modal-pane"> | ||
|
||
<div id="table_display"> | ||
<table border="1" cellspacing="0"> | ||
<tr> | ||
<td> </td> | ||
<td> </td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td> </td> | ||
<td> </td> | ||
<td> </td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<div id="table_options"> | ||
<%= f.inputs do %> | ||
<li id="table_rows_input" class="select input optional"> | ||
<label for="table_rows">Rows</label> | ||
<input type="button" class="action" value="Add Before" name="insertRowBefore"/> | ||
<input type="button" class="action" value="Add After" name="insertRowAfter"/> | ||
<input type="button" class="action" value="Remove" name="deleteRow"/> | ||
</li> | ||
<li id="table_columns_input" class="select input optional"> | ||
<label for="table_rows">Rows</label> | ||
<input type="button" class="action" value="Add Before" name="insertColumnBefore"/> | ||
<input type="button" class="action" value="Add After" name="insertColumnAfter"/> | ||
<input type="button" class="action" value="Remove" name="deleteColumn"/> | ||
</li> | ||
<hr/> | ||
<li id="table_row_adjust_input" class="select input optional"> | ||
<label for="table_row_adjust">Row Span</label> | ||
<input type="button" class="action" value="+" name="increaseRowspan"/> | ||
<input type="button" class="action" value="-" name="decreaseRowspan"/> | ||
</li> | ||
<li id="table_column_adjust_input" class="select input optional"> | ||
<label for="table_column_adjust">Column Span</label> | ||
<input type="button" class="action" value="+" name="increaseColspan"/> | ||
<input type="button" class="action" value="-" name="decreaseColspan"/> | ||
</li> | ||
<% end %> | ||
<%= f.inputs 'Options' do %> | ||
<%= f.input :alignment, :as => :select, :required => false, :include_blank => 'None', | ||
:collection => [['Left', 'left'], ['Right', 'right']] %> | ||
<%= f.input :border, :required => false, :input_html => { :value => 1 } %> | ||
<%= f.input :spacing, :required => false, :input_html => { :value => 0 } %> | ||
<% end %> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="mercury-modal-controls"> | ||
<%= f.buttons do %> | ||
<%= f.commit_button 'Insert Table' %> | ||
<% end %> | ||
</div> | ||
|
||
<% end %> |
Oops, something went wrong.