erd 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +9 -11
  4. data/README.rdoc +1 -1
  5. data/app/controllers/erd/erd_controller.rb +100 -65
  6. data/app/views/erd/erd/_column.html.erb +8 -4
  7. data/app/views/erd/erd/_model.html.erb +23 -17
  8. data/app/views/erd/erd/edit.html.erb +87 -0
  9. data/app/views/erd/erd/erd.html.erb +1 -1
  10. data/app/views/erd/erd/index.html.erb +12 -81
  11. data/app/views/layouts/erd/application.html.erb +3 -2
  12. data/config/routes.rb +1 -0
  13. data/erd.gemspec +1 -1
  14. data/gemfiles/rails_32.gemfile +1 -1
  15. data/gemfiles/rails_40.gemfile +1 -0
  16. data/gemfiles/rails_41.gemfile +1 -0
  17. data/gemfiles/rails_42.gemfile +1 -0
  18. data/gemfiles/rails_50.gemfile +1 -0
  19. data/gemfiles/rails_51.gemfile +1 -0
  20. data/gemfiles/rails_52.gemfile +1 -0
  21. data/gemfiles/rails_60.gemfile +9 -0
  22. data/gemfiles/rails_edge.gemfile +1 -0
  23. data/lib/erd.rb +7 -1
  24. data/lib/erd/engine.rb +12 -0
  25. data/lib/erd/migrator.rb +3 -1
  26. data/lib/erd/version.rb +1 -1
  27. data/{vendor/assets/images → public}/erd/angle-left.png +0 -0
  28. data/{vendor/assets/images → public}/erd/angle-right.png +0 -0
  29. data/{vendor/assets/images → public}/erd/animated-overlay.gif +0 -0
  30. data/{vendor/assets/images → public}/erd/background.png +0 -0
  31. data/{vendor/assets/images → public}/erd/cancel.png +0 -0
  32. data/{vendor/assets/images → public}/erd/close.png +0 -0
  33. data/public/erd/erd.css +598 -0
  34. data/{app/assets/javascripts/erd/erd.js.js → public/erd/erd.js} +14 -3
  35. data/{app → src}/assets/stylesheets/erd/erd.css.scss +7 -7
  36. data/test/test_helper.rb +2 -0
  37. metadata +20 -21
  38. data/app/assets/javascripts/erd/application.js +0 -14
  39. data/app/assets/stylesheets/erd/application.css +0 -13
  40. data/lib/erd/railtie.rb +0 -21
  41. data/vendor/assets/javascripts/raphael-min.js +0 -12
@@ -3,11 +3,12 @@
3
3
  <head>
4
4
  <meta charset='utf-8'>
5
5
  <title>ERD - <%= Rails.application.class.parent.name %></title>
6
- <%= stylesheet_link_tag 'erd/application', :media => 'all' %>
6
+ <%= stylesheet_link_tag '/erd/erd', :media => 'all' %>
7
7
  <%= stylesheet_link_tag 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css', :media => 'all' %>
8
8
  <%= javascript_include_tag 'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js' %>
9
9
  <%= javascript_include_tag 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js' %>
10
- <%= javascript_include_tag 'erd/application' %>
10
+ <%= javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js' %>
11
+ <%= javascript_include_tag '/erd/erd' %>
11
12
  <%= csrf_meta_tags %>
12
13
  </head>
13
14
  <body>
@@ -2,6 +2,7 @@
2
2
 
3
3
  Erd::Engine.routes.draw do
4
4
  get '/' => 'erd#index'
5
+ get 'edit' => 'erd#edit'
5
6
  put '/' => 'erd#update'
6
7
  put '/migrate' => 'erd#migrate', :as => 'migrate'
7
8
  root :to => 'erd#index'
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ['lib']
19
19
  gem.version = Erd::VERSION
20
20
 
21
- gem.add_runtime_dependency 'rails-erd', ['>= 0.4.5']
21
+ gem.add_runtime_dependency 'ruby-graphviz'
22
22
  gem.add_runtime_dependency 'nokogiri'
23
23
 
24
24
  gem.add_development_dependency 'rails', '>= 3.2'
@@ -11,4 +11,4 @@ gem 'rubyzip', '0.9.9' if RUBY_VERSION < '1.9'
11
11
 
12
12
  gem 'test-unit-rails', '1.0.2'
13
13
  gem 'test-unit', '< 3.1'
14
- gem 'rails-erd', '< 1.2'
14
+ gem 'sqlite3', '< 1.4'
@@ -6,3 +6,4 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'rails', '~> 4.0.0'
8
8
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
9
+ gem 'sqlite3', '< 1.4'
@@ -6,3 +6,4 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'rails', '~> 4.1.0'
8
8
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
9
+ gem 'sqlite3', '< 1.4'
@@ -6,3 +6,4 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'rails', '~> 4.2.0'
8
8
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
9
+ gem 'sqlite3', '< 1.4'
@@ -5,3 +5,4 @@ source 'https://rubygems.org'
5
5
  gemspec :path => '../'
6
6
 
7
7
  gem 'rails', '~> 5.0.0'
8
+ gem 'sqlite3', '< 1.4'
@@ -5,3 +5,4 @@ source 'https://rubygems.org'
5
5
  gemspec :path => '../'
6
6
 
7
7
  gem 'rails', '~> 5.1.0'
8
+ gem 'sqlite3', '< 1.4'
@@ -6,3 +6,4 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'rails', '~> 5.2.0'
8
8
  gem 'puma'
9
+ gem 'sqlite3', '< 1.4'
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec :path => '../'
6
+
7
+ gem 'rails', '~> 6.0.0'
8
+ gem 'puma'
9
+ gem 'sqlite3'
@@ -6,3 +6,4 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'rails', git: 'https://github.com/rails/rails'
8
8
  gem 'puma'
9
+ gem 'sqlite3'
data/lib/erd.rb CHANGED
@@ -1,4 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'erd/version'
4
- require 'erd/railtie'
4
+ require 'rails'
5
+ require 'erd/engine'
6
+
7
+ module Erd
8
+ autoload :Migrator, 'erd/migrator'
9
+ autoload :GenaratorRunner, 'erd/generator_runner'
10
+ end
@@ -3,5 +3,17 @@
3
3
  module Erd
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace Erd
6
+
7
+ initializer 'erd' do |app|
8
+ if Rails.env.development?
9
+ ActiveSupport.on_load :after_initialize do
10
+ Rails.application.routes.prepend do
11
+ mount Erd::Engine, :at => '/erd'
12
+ end
13
+ end
14
+
15
+ app.middleware.insert_before ::ActionDispatch::Static, ::ActionDispatch::Static, root.join('public').to_s
16
+ end
17
+ end
6
18
  end
7
19
  end
@@ -8,9 +8,11 @@ module Erd
8
8
  class Migrator
9
9
  class << self
10
10
  def status
11
+ migrations = []
11
12
  migration_table_name = defined?(ActiveRecord::SchemaMigration) ? ActiveRecord::SchemaMigration.table_name : ActiveRecord::Migrator.schema_migrations_table_name
13
+ return migrations unless ActiveRecord::Base.connection.table_exists? migration_table_name
14
+
12
15
  migrated_versions = ActiveRecord::Base.connection.select_values("SELECT version FROM #{migration_table_name}").map {|v| '%.3d' % v}
13
- migrations = []
14
16
  ActiveRecord::Migrator.migrations_paths.each do |path|
15
17
  Dir.foreach(Rails.root.join(path)) do |file|
16
18
  if (version_and_name = /^(\d{3,})_(.+)\.rb$/.match(file))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Erd
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
@@ -0,0 +1,598 @@
1
+ html, body, p, ul, ol, dl, p, li, dt, dd, tr, td, form {
2
+ margin: 0;
3
+ padding: 0; }
4
+
5
+ li {
6
+ list-style-type: none; }
7
+
8
+ .cancel {
9
+ display: block;
10
+ margin: 0.4em auto 0;
11
+ background: rgba(0, 0, 0, 0.4);
12
+ font-size: 12px;
13
+ width: 70px;
14
+ -webkit-border-radius: 4px;
15
+ -moz-border-radius: 4px;
16
+ -ms-border-radius: 4px;
17
+ -o-border-radius: 4px;
18
+ border-radius: 4px;
19
+ text-decoration: none;
20
+ line-height: 1.8;
21
+ text-align: center;
22
+ color: white;
23
+ position: relative;
24
+ padding: 2px 0 0 8px;
25
+ text-shadow: none; }
26
+ .cancel:hover {
27
+ background: rgba(0, 0, 0, 0.6); }
28
+ .cancel:before {
29
+ content: "";
30
+ display: block;
31
+ height: 10px;
32
+ width: 10px;
33
+ position: absolute;
34
+ left: 8px;
35
+ top: 6px;
36
+ background-image: image_url("erd/cancel.png");
37
+ background-size: 10px 10px;
38
+ background-position: center center; }
39
+
40
+ #erd_box {
41
+ display: -webkit-box;
42
+ display: -moz-box;
43
+ display: -ms-box;
44
+ display: -o-box;
45
+ display: box; }
46
+
47
+ #erd_container {
48
+ -webkit-box-flex: 1;
49
+ -moz-box-flex: 1;
50
+ -ms-box-flex: 1;
51
+ -o-box-flex: 1;
52
+ box-flex: 1; }
53
+
54
+ #open_migration,
55
+ #close_migration {
56
+ position: fixed;
57
+ top: 0;
58
+ background: rgba(0, 0, 0, 0.6);
59
+ width: 80px;
60
+ text-align: center;
61
+ color: white;
62
+ cursor: pointer;
63
+ z-index: 5; }
64
+ #open_migration:hover,
65
+ #close_migration:hover {
66
+ background: rgba(0, 0, 0, 0.8); }
67
+ #open_migration img,
68
+ #close_migration img {
69
+ width: 16px;
70
+ height: 27px;
71
+ display: block;
72
+ margin: 16px auto; }
73
+
74
+ #open_migration {
75
+ right: 15px; }
76
+
77
+ #migrate_form {
78
+ position: relative; }
79
+ #migrate_form #open_buttons {
80
+ position: absolute;
81
+ right: 0;
82
+ top: 0; }
83
+ #migrate_form #open_buttons li {
84
+ display: -moz-inline-stack;
85
+ display: inline-block;
86
+ vertical-align: middle;
87
+ *vertical-align: auto;
88
+ zoom: 1;
89
+ *display: inline; }
90
+
91
+ #migration {
92
+ padding: 10px 10px;
93
+ min-width: 500px;
94
+ overflow-x: auto;
95
+ -webkit-box-sizing: content-box;
96
+ -moz-box-sizing: content-box;
97
+ -ms-box-sizing: content-box;
98
+ -o-box-sizing: content-box;
99
+ box-sizing: content-box;
100
+ position: relative;
101
+ display: none; }
102
+ #migration table,
103
+ #migration th,
104
+ #migration td {
105
+ border: 1px #444444 solid;
106
+ border-collapse: collapse; }
107
+ #migration table {
108
+ width: 100%;
109
+ margin: 0 0 0.6em; }
110
+ #migration table caption {
111
+ font-weight: bold;
112
+ margin: 0 0 0.5em; }
113
+ #migration table thead td {
114
+ text-align: center; }
115
+ #migration table thead td button {
116
+ padding: 3px 30px; }
117
+ #migration table td {
118
+ font-size: 12px;
119
+ padding: 2px 0.8em;
120
+ line-height: 1.4; }
121
+ #migration table td.migrations {
122
+ background: #444444;
123
+ color: white; }
124
+ #migration table td.migration_file_name {
125
+ white-space: normal !important;
126
+ word-break: break-all;
127
+ -ms-word-wrap: break-word;
128
+ max-width: 200px; }
129
+ #migration table th {
130
+ background: -webkit-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
131
+ background: -moz-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
132
+ background: -ms-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
133
+ background: -o-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
134
+ background: linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
135
+ font-size: 13px;
136
+ font-weight: bold;
137
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
138
+ line-height: 2.2;
139
+ padding: 0 0.8em; }
140
+ #migration table th.status {
141
+ width: 60px; }
142
+ #migration table th.version {
143
+ width: 140px; }
144
+ #migration #changes_form {
145
+ margin: 0 0 20px; }
146
+
147
+ #migration_status {
148
+ width: 386px; }
149
+ #migration_status td.migration_file_name {
150
+ word-break: break-all; }
151
+ #migration_status td label {
152
+ white-space: nowrap; }
153
+ #migration_status tr.up, #migration_status tr.down {
154
+ font-size: 0;
155
+ height: 2px;
156
+ overflow: hidden; }
157
+ #migration_status tr.up *, #migration_status tr.down * {
158
+ font-size: 0;
159
+ overflow: hidden; }
160
+ #migration_status tr.up input, #migration_status tr.down input {
161
+ display: none; }
162
+ #migration_status tr.up:hover, #migration_status tr.up.active, #migration_status tr.up.open, #migration_status tr.down:hover, #migration_status tr.down.active, #migration_status tr.down.open {
163
+ height: auto;
164
+ background: white; }
165
+ #migration_status tr.up:hover *, #migration_status tr.up.active *, #migration_status tr.up.open *, #migration_status tr.down:hover *, #migration_status tr.down.active *, #migration_status tr.down.open * {
166
+ font-size: small;
167
+ height: auto;
168
+ overflow: auto; }
169
+ #migration_status tr.up:hover td, #migration_status tr.up.active td, #migration_status tr.up.open td, #migration_status tr.down:hover td, #migration_status tr.down.active td, #migration_status tr.down.open td {
170
+ padding: 4px 0.8em; }
171
+ #migration_status tr.up:hover input, #migration_status tr.up.active input, #migration_status tr.up.open input, #migration_status tr.down:hover input, #migration_status tr.down.active input, #migration_status tr.down.open input {
172
+ display: -moz-inline-stack;
173
+ display: inline-block;
174
+ vertical-align: middle;
175
+ *vertical-align: auto;
176
+ zoom: 1;
177
+ *display: inline; }
178
+ #migration_status tr.up.active, #migration_status tr.down.active {
179
+ background: #fffebe; }
180
+ #migration_status.show_all_migrations .up,
181
+ #migration_status.show_all_migrations .down {
182
+ height: auto;
183
+ background: white; }
184
+ #migration_status.show_all_migrations .up *,
185
+ #migration_status.show_all_migrations .down * {
186
+ font-size: small;
187
+ height: auto;
188
+ overflow: auto; }
189
+ #migration_status.show_all_migrations .up td,
190
+ #migration_status.show_all_migrations .down td {
191
+ padding: 4px 0.8em; }
192
+ #migration_status.show_all_migrations .up input,
193
+ #migration_status.show_all_migrations .down input {
194
+ display: -moz-inline-stack;
195
+ display: inline-block;
196
+ vertical-align: middle;
197
+ *vertical-align: auto;
198
+ zoom: 1;
199
+ *display: inline; }
200
+
201
+ #erd {
202
+ overflow: auto;
203
+ position: relative;
204
+ background-color: #3aade3;
205
+ background-image: image_url("/erd/background.png"); }
206
+ #erd form {
207
+ display: none; }
208
+ #erd .model {
209
+ background-color: white;
210
+ position: absolute;
211
+ border: 1px #444444 solid;
212
+ cursor: move;
213
+ z-index: 1; }
214
+ #erd .model:hover {
215
+ -webkit-box-shadow: rgba(0, 0, 0, 0.7) 0 2px 2px;
216
+ -moz-box-shadow: rgba(0, 0, 0, 0.7) 0 2px 2px;
217
+ -ms-box-shadow: rgba(0, 0, 0, 0.7) 0 2px 2px;
218
+ -o-box-shadow: rgba(0, 0, 0, 0.7) 0 2px 2px;
219
+ box-shadow: rgba(0, 0, 0, 0.7) 0 2px 2px; }
220
+ #erd .model .model_name {
221
+ border-bottom: 1px #444444 solid;
222
+ margin: 1px 5px 0 5px auto; }
223
+ #erd .model .model_name.edit {
224
+ cursor: pointer; }
225
+ #erd .model .model_name .model_name_text {
226
+ text-align: center;
227
+ display: block;
228
+ background: -webkit-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
229
+ background: -moz-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
230
+ background: -ms-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
231
+ background: -o-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
232
+ background: linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
233
+ font-size: 15px;
234
+ font-weight: bold;
235
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
236
+ line-height: 1.6;
237
+ padding: 0 0.8em; }
238
+ #erd .model .model_name .model_name_text.unsaved {
239
+ background: #fffebe;
240
+ position: relative;
241
+ background: #fffebe;
242
+ position: relative; }
243
+ #erd .model .model_name .model_name_text.unsaved:before {
244
+ content: "!";
245
+ display: block;
246
+ position: absolute;
247
+ width: 18px;
248
+ height: 18px;
249
+ background: #ec7500;
250
+ left: -14px;
251
+ top: 6px;
252
+ text-align: center;
253
+ line-height: 18px;
254
+ color: white;
255
+ -webkit-border-radius: 100px;
256
+ -moz-border-radius: 100px;
257
+ -ms-border-radius: 100px;
258
+ -o-border-radius: 100px;
259
+ border-radius: 100px;
260
+ -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
261
+ -moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
262
+ -ms-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
263
+ -o-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
264
+ box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
265
+ font-size: 12px;
266
+ font-family: Arial, sans-serif; }
267
+ #erd .model .model_name .model_name_text.unsaved:hover {
268
+ background: #f9f8b8; }
269
+ #erd .model .model_name form {
270
+ background: -webkit-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
271
+ background: -moz-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
272
+ background: -ms-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
273
+ background: -o-linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
274
+ background: linear-gradient(top, #eeeeee 0%, #d0d0d0 88%);
275
+ font-size: 13px;
276
+ font-weight: bold;
277
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
278
+ line-height: 2.2;
279
+ padding: 0 0.8em;
280
+ padding: 8px; }
281
+ #erd .model .model_name > div.model_name_text:hover {
282
+ background: -webkit-linear-gradient(top, #b9e0f5 0%, #9bc2d7 88%);
283
+ background: -moz-linear-gradient(top, #b9e0f5 0%, #9bc2d7 88%);
284
+ background: -ms-linear-gradient(top, #b9e0f5 0%, #9bc2d7 88%);
285
+ background: -o-linear-gradient(top, #b9e0f5 0%, #9bc2d7 88%);
286
+ background: linear-gradient(top, #b9e0f5 0%, #9bc2d7 88%); }
287
+ #erd .model a.close {
288
+ position: absolute;
289
+ top: -6px;
290
+ right: -6px;
291
+ z-index: 2;
292
+ background-color: #444444;
293
+ border: 1px solid #444444;
294
+ display: block;
295
+ width: 16px;
296
+ height: 13px;
297
+ text-align: center;
298
+ -webkit-border-radius: 9px;
299
+ -moz-border-radius: 9px;
300
+ -ms-border-radius: 9px;
301
+ -o-border-radius: 9px;
302
+ border-radius: 9px;
303
+ padding: 3px 0 0; }
304
+ #erd .model a.close:hover {
305
+ background: #767676; }
306
+ #erd .model a.close img {
307
+ width: 10px;
308
+ height: 10px;
309
+ display: block;
310
+ margin: 0 auto; }
311
+
312
+ .add_column_box {
313
+ text-align: center; }
314
+ .add_column_box a.add_column {
315
+ font-size: small;
316
+ display: block;
317
+ padding: 0 5px;
318
+ line-height: 1.6;
319
+ background: #444444;
320
+ color: white;
321
+ text-decoration: none; }
322
+ .add_column_box a.add_column:hover {
323
+ background: #3a3a3a; }
324
+
325
+ .add_column_form {
326
+ background: #444444;
327
+ color: white;
328
+ padding: 8px; }
329
+
330
+ .columns .column {
331
+ border-bottom: dotted 1px #cccccc;
332
+ padding: 0 0.5em;
333
+ clear: both;
334
+ line-height: 20px;
335
+ font-size: 14px; }
336
+ .columns .column table {
337
+ width: 100%; }
338
+ .columns .column:nth-child(even) {
339
+ background: #f9f9f9; }
340
+ .columns .column:last-child {
341
+ border-bottom: none; }
342
+ .columns .column .column_name_text.edit,
343
+ .columns .column .column_type_text.edit {
344
+ cursor: pointer; }
345
+ .columns .column .column_name_text {
346
+ margin: 0 1.4em 0 0; }
347
+ .columns .column .column_name_text.edit:hover {
348
+ text-decoration: underline; }
349
+ .columns .column.unsaved {
350
+ background: #fffebe;
351
+ position: relative; }
352
+ .columns .column.unsaved:before {
353
+ content: "!";
354
+ display: block;
355
+ position: absolute;
356
+ width: 18px;
357
+ height: 18px;
358
+ background: #ec7500;
359
+ left: -14px;
360
+ top: 6px;
361
+ text-align: center;
362
+ line-height: 18px;
363
+ color: white;
364
+ -webkit-border-radius: 100px;
365
+ -moz-border-radius: 100px;
366
+ -ms-border-radius: 100px;
367
+ -o-border-radius: 100px;
368
+ border-radius: 100px;
369
+ -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
370
+ -moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
371
+ -ms-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
372
+ -o-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
373
+ box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 1px;
374
+ font-size: 12px;
375
+ font-family: Arial, sans-serif; }
376
+ .columns .column.unsaved:hover {
377
+ background: #f9f8b8; }
378
+ .columns .column .rename_column_form {
379
+ padding: 8px; }
380
+ .columns .column .column_type_text {
381
+ font-size: 13px;
382
+ float: right;
383
+ display: block;
384
+ line-height: 16px;
385
+ margin: 1px 0 0;
386
+ -webkit-border-radius: 4px;
387
+ -moz-border-radius: 4px;
388
+ -ms-border-radius: 4px;
389
+ -o-border-radius: 4px;
390
+ border-radius: 4px;
391
+ border-width: 1px;
392
+ border-style: solid;
393
+ width: 70px;
394
+ text-align: center;
395
+ border-color: #e98c60;
396
+ background: #f9eee9;
397
+ color: #444444;
398
+ border-style: solid; }
399
+ .columns .column .column_type_text.edit:hover {
400
+ border-color: #e36c33;
401
+ background: #edd0c2; }
402
+ .columns .column .column_type_text.date, .columns .column .column_type_text.time, .columns .column .column_type_text.timestamp, .columns .column .column_type_text.datetime {
403
+ border-color: #da6272;
404
+ background: #f3e2e4;
405
+ color: #444444;
406
+ border-style: solid; }
407
+ .columns .column .column_type_text.edit.date:hover, .columns .column .column_type_text.edit.time:hover, .columns .column .column_type_text.edit.timestamp:hover, .columns .column .column_type_text.edit.datetime:hover {
408
+ border-color: #d0394d;
409
+ background: #e4bec3; }
410
+ .columns .column .column_type_text.boolean {
411
+ border-color: #45a1cf;
412
+ background: #c7dce6;
413
+ color: #444444;
414
+ border-style: solid; }
415
+ .columns .column .column_type_text.edit.boolean:hover {
416
+ border-color: #2e87b3;
417
+ background: #a3c6d7; }
418
+ .columns .column .column_type_text.text {
419
+ border-color: #dab24f;
420
+ background: #efe7d3;
421
+ color: #444444;
422
+ border-style: solid; }
423
+ .columns .column .column_type_text.edit.text:hover {
424
+ border-color: #cb9d2b;
425
+ background: #e1d2ae; }
426
+ .columns .column .column_type_text.decimal {
427
+ border-color: #8e8e08;
428
+ background: #dfdf50;
429
+ color: #444444;
430
+ border-style: solid; }
431
+ .columns .column .column_type_text.edit.decimal:hover {
432
+ border-color: #5e5e05;
433
+ background: #d5d527; }
434
+ .columns .column .column_type_text.float {
435
+ border-color: #85616b;
436
+ background: silver;
437
+ color: #444444;
438
+ border-style: solid; }
439
+ .columns .column .column_type_text.edit.float:hover {
440
+ border-color: #684b53;
441
+ background: #a6a6a6; }
442
+ .columns .column .column_type_text.integer {
443
+ border-color: #7c80aa;
444
+ background: #dfdfe0;
445
+ color: #444444;
446
+ border-style: solid; }
447
+ .columns .column .column_type_text.edit.integer:hover {
448
+ border-color: #606493;
449
+ background: #c5c5c7; }
450
+ .columns .column .column_type_text.primary_key {
451
+ border-color: #ea9a5d;
452
+ background: #f9efe7;
453
+ color: #444444;
454
+ border-style: solid; }
455
+ .columns .column .column_type_text.edit.primary_key:hover {
456
+ border-color: #e47e30;
457
+ background: #eed3bf; }
458
+ .columns .column .column_type_text.string {
459
+ border-color: #a4c520;
460
+ background: #d3e09e;
461
+ color: #444444;
462
+ border-style: solid; }
463
+ .columns .column .column_type_text.edit.string:hover {
464
+ border-color: #7f9919;
465
+ background: #c1d477; }
466
+ .columns .column .column_type_text.unsaved {
467
+ border-color: #a55d00;
468
+ background: #eca952;
469
+ color: #444444;
470
+ border-style: solid; }
471
+ .columns .column .column_type_text.unsaved:hover {
472
+ border-color: #724000;
473
+ background: #e79224; }
474
+ .columns .column .alter_column_form {
475
+ padding: 8px; }
476
+ .columns .column:hover {
477
+ background-color: #ebebeb; }
478
+
479
+ #executed, #failed {
480
+ padding: 7px;
481
+ padding-bottom: 0;
482
+ margin-bottom: 20px;
483
+ background-color: #f0f0f0; }
484
+ #executed h2, #failed h2 {
485
+ text-align: left;
486
+ font-weight: bold;
487
+ padding: 5px 5px 5px 15px;
488
+ font-size: 12px;
489
+ margin: -7px;
490
+ margin-bottom: 0px;
491
+ color: white; }
492
+ #executed h3, #failed h3 {
493
+ font-size: 12px;
494
+ margin: 0;
495
+ padding: 0; }
496
+ #executed ul li, #failed ul li {
497
+ margin-left: 25px;
498
+ font-size: 12px;
499
+ list-style: square; }
500
+
501
+ #executed {
502
+ border: 2px lime solid; }
503
+ #executed h2 {
504
+ background-color: #00cc00; }
505
+
506
+ #failed {
507
+ border: 2px red solid; }
508
+ #failed h2 {
509
+ background-color: #cc0000; }
510
+
511
+ #model_name_changes, #column_name_changes {
512
+ display: none; }
513
+
514
+ #drawer_switch {
515
+ display: none; }
516
+ #drawer_switch:checked ~ #buttons {
517
+ right: -400px; }
518
+ #drawer_switch:checked ~ #drawer_hide_label {
519
+ visibility: hidden; }
520
+ #drawer_switch:checked ~ #drawer_show_label {
521
+ visibility: visible; }
522
+
523
+ #buttons {
524
+ position: fixed;
525
+ top: 70px;
526
+ right: 15px;
527
+ -webkit-transition: all 0.5s;
528
+ transition: all 0.5s; }
529
+
530
+ .drawer_switch_label {
531
+ position: fixed;
532
+ right: 15px;
533
+ top: 10px;
534
+ background: rgba(0, 0, 0, 0.6);
535
+ padding: 12px 20px;
536
+ color: white;
537
+ cursor: pointer;
538
+ text-decoration: none;
539
+ font-size: 13px; }
540
+ .drawer_switch_label:hover {
541
+ background: rgba(0, 0, 0, 0.8); }
542
+ #drawer_show_label {
543
+ visibility: hidden; }
544
+
545
+ .menu_button {
546
+ position: relative;
547
+ right: 0;
548
+ background: rgba(0, 0, 0, 0.6);
549
+ padding: 12px 20px;
550
+ color: white;
551
+ text-decoration: none;
552
+ font-size: 13px; }
553
+ .menu_button:hover {
554
+ background: rgba(0, 0, 0, 0.8); }
555
+ #save_position_changes {
556
+ visibility: hidden;
557
+ top: 70px;
558
+ background: rgba(191, 0, 0, 0.6); }
559
+ #save_position_changes:hover {
560
+ background: rgba(191, 0, 0, 0.8); }
561
+
562
+ #open_create_model_dialog {
563
+ position: fixed;
564
+ right: 15px;
565
+ top: 70px;
566
+ background: rgba(0, 0, 0, 0.6);
567
+ padding: 12px 20px;
568
+ color: white;
569
+ text-decoration: none;
570
+ font-size: 13px; }
571
+ #open_create_model_dialog:hover {
572
+ background: rgba(0, 0, 0, 0.8); }
573
+
574
+ #create_model_form {
575
+ font-size: 14px; }
576
+
577
+ #create_model_table {
578
+ margin: 12px auto;
579
+ border-spacing: 0;
580
+ width: 100%; }
581
+ #create_model_table tr:nth-child(odd) td {
582
+ background: #f8f8f8; }
583
+ #create_model_table tr:nth-child(even) td {
584
+ background: #eee; }
585
+ #create_model_table tr td {
586
+ padding: 6px 12px; }
587
+ #create_model_table tr td input {
588
+ width: 100%;
589
+ box-sizing: border-box; }
590
+ #create_model_table tr td.separator {
591
+ padding: 6px 0; }
592
+
593
+ #new_model_add_column {
594
+ margin: 10px auto 0;
595
+ display: block;
596
+ width: 160px;
597
+ padding: 2px 10px;
598
+ text-decoration: none; }