fredit 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/views/fredit/show.html.erb +27 -2
- data/app/views/layouts/fredit.html.erb +2 -64
- data/lib/fredit/engine.rb +3 -1
- metadata +5 -5
@@ -1,9 +1,34 @@
|
|
1
|
+
<% content_for :head do %>
|
2
|
+
<%= javascript_include_tag '/ace/ace.js' %>
|
3
|
+
<script src="/ace/theme-twilight.js" type="text/javascript" charset="utf-8"></script>
|
4
|
+
<script src="/ace/mode-html.js" type="text/javascript" charset="utf-8"></script>
|
5
|
+
<script>
|
6
|
+
var aceEditor;
|
7
|
+
$(function() {
|
8
|
+
aceEditor = ace.edit('sourceEditBox');
|
9
|
+
aceEditor.setTheme("ace/theme/twilight");
|
10
|
+
var JavaScriptMode = require("ace/mode/javascript").Mode;
|
11
|
+
aceEditor.getSession().setMode(new JavaScriptMode());
|
12
|
+
aceEditor.renderer.setShowPrintMargin(false);
|
13
|
+
aceEditor.getSession().setTabSize(2);
|
14
|
+
aceEditor.getSession().setUseSoftTabs(true);
|
15
|
+
aceEditor.getSession().setUseWrapMode(false);
|
1
16
|
|
2
|
-
|
17
|
+
$('#sourceEditor').bind('submit', function() {
|
18
|
+
var source = aceEditor.getSession().getValue();
|
19
|
+
var sourceInput = $("<input>").attr("type", "hidden").attr("name", "source").val(source);
|
20
|
+
$('#sourceEditor').append($(sourceInput));
|
21
|
+
});
|
22
|
+
});;
|
23
|
+
</script>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<form id="sourceEditor" action="<%= fredit_path %>" method="post">
|
3
27
|
<input name="_method" type="hidden" value="put" />
|
4
28
|
<input name="utf8" type="hidden" value="✓" />
|
5
29
|
<input type="hidden" name="file" value="<%=@path%>"/>
|
6
|
-
|
30
|
+
|
31
|
+
<div id='sourceEditBox' name='source'><%= @source %></div>
|
7
32
|
|
8
33
|
<table>
|
9
34
|
<tr>
|
@@ -3,70 +3,8 @@
|
|
3
3
|
<head>
|
4
4
|
<title><%=@path%></title>
|
5
5
|
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' %>
|
6
|
-
|
7
|
-
|
8
|
-
body {
|
9
|
-
padding-top:0;
|
10
|
-
padding-bottom: 30px;
|
11
|
-
font-family: Verdana, Helvetica, sans;
|
12
|
-
font-size: 12px;
|
13
|
-
margin-left: 40px;
|
14
|
-
width: 92%;
|
15
|
-
background-color: #EDEDED;
|
16
|
-
}
|
17
|
-
h1#appName {
|
18
|
-
margin:0;
|
19
|
-
padding:0;
|
20
|
-
display: inline;
|
21
|
-
}
|
22
|
-
h1#appName em {
|
23
|
-
font-size: smaller;
|
24
|
-
}
|
25
|
-
section#editor {
|
26
|
-
float: left;
|
27
|
-
width: 74%;
|
28
|
-
}
|
29
|
-
section#git {
|
30
|
-
float: left;
|
31
|
-
width: 23%;
|
32
|
-
padding-left: 2%;
|
33
|
-
}
|
34
|
-
section#git h3 {
|
35
|
-
margin-top: 0;
|
36
|
-
margin-bottom: 0.7em;
|
37
|
-
}
|
38
|
-
section#git ul {
|
39
|
-
padding-left: 0;
|
40
|
-
list-style-type: none;
|
41
|
-
}
|
42
|
-
|
43
|
-
textarea {
|
44
|
-
width: 100%;
|
45
|
-
height: 500px;
|
46
|
-
font-family: monospace;
|
47
|
-
}
|
48
|
-
#notice {
|
49
|
-
background-color: yellow;
|
50
|
-
}
|
51
|
-
input#deleteBtn {
|
52
|
-
float:right;
|
53
|
-
}
|
54
|
-
input[type=text] {
|
55
|
-
width: 100%;
|
56
|
-
}
|
57
|
-
table {
|
58
|
-
width: 100%
|
59
|
-
}
|
60
|
-
form#fileSelector {
|
61
|
-
float:right;
|
62
|
-
}
|
63
|
-
form#createFileForm {
|
64
|
-
border-top: 1px solid #CCC;
|
65
|
-
margin-top: 10px;
|
66
|
-
padding-top: 10px;
|
67
|
-
}
|
68
|
-
|
69
|
-
</style>
|
6
|
+
<%= yield :head %>
|
7
|
+
<%= stylesheet_link_tag '/assets/fredit.css' %>
|
70
8
|
</head>
|
71
9
|
<body>
|
72
10
|
|
data/lib/fredit/engine.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fredit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-27 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: git
|
16
|
-
requirement: &
|
16
|
+
requirement: &70700520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70700520
|
25
25
|
description: Edit the front end of Rails apps through the browser.
|
26
26
|
email:
|
27
27
|
- dhchoi@gmail.com
|
@@ -56,7 +56,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
56
|
version: '0'
|
57
57
|
segments:
|
58
58
|
- 0
|
59
|
-
hash:
|
59
|
+
hash: 941660225
|
60
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
segments:
|
67
67
|
- 0
|
68
|
-
hash:
|
68
|
+
hash: 941660225
|
69
69
|
requirements: []
|
70
70
|
rubyforge_project:
|
71
71
|
rubygems_version: 1.8.11
|