moneyrail 0.1.2 → 0.1.4
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/VERSION +1 -1
- data/moneyrail.gemspec +2 -2
- data/public/javascripts/editor.js +21 -10
- data/public/stylesheets/editor.less +5 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/moneyrail.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{moneyrail}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Yutaka HARA"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-06}
|
13
13
|
s.description = %q{Household account book, written in Rails}
|
14
14
|
s.email = %q{yutaka.hara/at/gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -149,12 +149,22 @@ MoneyRail.create_item = function(input, after){
|
|
149
149
|
|
150
150
|
$j.post(MoneyRail.item_create_path, data, function(result){
|
151
151
|
if (result[0] == "ok"){
|
152
|
-
var object_id = result[1]
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
152
|
+
var object_id = result[1];
|
153
|
+
|
154
|
+
if (MoneyRail.is_moves_table(input)){
|
155
|
+
var tds = $j(input).closest("tr").children("td");
|
156
|
+
tds.attr("title", object_id);
|
157
|
+
}
|
158
|
+
else {
|
159
|
+
var td = $j(input).parent("td");
|
160
|
+
td.attr("title", object_id);
|
161
|
+
if (td.attr("class") == "title"){
|
162
|
+
td.next().attr("title", object_id);
|
163
|
+
}
|
164
|
+
else {
|
165
|
+
td.prev().attr("title", object_id);
|
166
|
+
}
|
167
|
+
}
|
158
168
|
|
159
169
|
after();
|
160
170
|
}
|
@@ -177,12 +187,13 @@ MoneyRail.on_input_changed = function(e){
|
|
177
187
|
var amount = $j("td[class='amount'][title='"+item_id+"'] input").val();
|
178
188
|
var from = $j("td[class='account_id_from'][title='"+item_id+"'] select").val();
|
179
189
|
var to = $j("td[class='account_id_to'][title='"+item_id+"'] select").val();
|
180
|
-
console.log(from, to);
|
181
190
|
|
182
191
|
var empty = /^(\s*)$/;
|
183
|
-
var none = /^
|
184
|
-
return empty.match(title) &&
|
185
|
-
|
192
|
+
var none = /^_none_$/;
|
193
|
+
return empty.match(title) &&
|
194
|
+
empty.match(amount) &&
|
195
|
+
(!from || none.match(from)) &&
|
196
|
+
(!to || none.match(to));
|
186
197
|
}
|
187
198
|
|
188
199
|
$j(input).css("background", "#ffff99");
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moneyrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka HARA
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-06 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|