smalruby-editor 0.1.19-x86-mingw32 → 0.1.20-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of smalruby-editor might be problematic. Click here for more details.

Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/application.js +1 -1
  3. data/app/assets/javascripts/blocks/control.js.coffee.erb +14 -4
  4. data/app/assets/javascripts/blocks/events.js.coffee.erb +1 -1
  5. data/app/assets/javascripts/blocks/hardware.js.coffee.erb +24 -18
  6. data/app/assets/javascripts/blocks/looks.js.coffee.erb +1 -1
  7. data/app/assets/javascripts/blocks/motion.js.coffee.erb +1 -1
  8. data/app/assets/javascripts/blocks/operators.js.coffee.erb +1 -1
  9. data/app/assets/javascripts/blocks/sensing.js.coffee.erb +1 -1
  10. data/app/assets/javascripts/blocks/sound.js.coffee.erb +1 -1
  11. data/app/assets/javascripts/fix_blockly.js +12 -0
  12. data/app/assets/javascripts/generators/ruby.js.coffee.erb +1 -1
  13. data/app/assets/javascripts/smalruby.js.coffee +12 -0
  14. data/app/assets/javascripts/views/main_menu_view.js.coffee +5 -1
  15. data/app/assets/javascripts/views/reset_modal_view.js.coffee +11 -0
  16. data/app/assets/stylesheets/toolbox.css.scss.erb +29 -19
  17. data/app/controllers/source_codes_controller.rb +26 -20
  18. data/app/helpers/application_helper.rb +3 -0
  19. data/app/models/concerns/ruby_to_block/block/motion_turn_xy.rb +2 -1
  20. data/app/views/editor/_block_tab.html.haml +0 -1
  21. data/app/views/editor/_character_modal.html.haml +1 -1
  22. data/app/views/editor/_load_modal.html.haml +1 -1
  23. data/app/views/editor/_reset_modal.html.haml +15 -0
  24. data/app/views/editor/_signin_modal.html.haml +1 -1
  25. data/app/views/editor/_toolbox.html.haml +264 -257
  26. data/app/views/editor/index.html.haml +4 -2
  27. data/lib/smalruby_editor/version.rb +3 -3
  28. data/public/assets/{application-acf953339e4b5c31b5d6060375b13a44.js → application-c8991557a0789ac1bc9220f409e7f1c1.js} +175 -110
  29. data/public/assets/{application-acf953339e4b5c31b5d6060375b13a44.js.gz → application-c8991557a0789ac1bc9220f409e7f1c1.js.gz} +0 -0
  30. data/public/assets/{application-e9d089df8f23954c49647ab7af8481dc.css → application-d4fe6c0f970efe8eab9267fd08718d96.css} +182 -104
  31. data/public/assets/application-d4fe6c0f970efe8eab9267fd08718d96.css.gz +0 -0
  32. data/public/assets/manifest-332a5a1668194028b55103e0ea45c054.json +1 -1
  33. data/smalruby-editor.gemspec +1 -1
  34. data/spec/acceptance/base.feature +59 -0
  35. data/spec/acceptance/block_mode/blocks/control/await.feature +49 -2
  36. data/spec/acceptance/block_mode/blocks/control/await_until.feature +67 -6
  37. data/spec/acceptance/block_mode/blocks/control/break.feature +0 -3
  38. data/spec/acceptance/block_mode/blocks/control/next.feature +0 -3
  39. data/spec/acceptance/block_mode/blocks/control/redo.feature +0 -3
  40. data/spec/acceptance/standalone/signin.feature +12 -10
  41. data/spec/steps/base_steps.rb +13 -0
  42. data/spec/steps/global_variable.rb +11 -0
  43. metadata +10 -8
  44. data/public/assets/application-e9d089df8f23954c49647ab7af8481dc.css.gz +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd073e87535e3c426e220b939494f6a065446002
4
- data.tar.gz: 2fb97e28167e79ecab14f519b225faac9f74d9e6
3
+ metadata.gz: bda05df6c4fa25d55be6f5f3f171bc3cd6409688
4
+ data.tar.gz: 46b3054ee3a77ea34e7ba1ccc0b482cf3949e661
5
5
  SHA512:
6
- metadata.gz: 6b14bc1ae322621c950550c4e2a8a684276bb20d227f4e5c7ccd63ea061920fc38a8b1da71daa19f53b2c3f96bf79011e259665a183a27937fb82b7b8d254024
7
- data.tar.gz: 70e3e275be4ffff8c4c99f5d8ae4b839e75795e66227bac547a579855d2f0f8c949fb4503003164ba192a654fe4a8fbd0814f6d6847ce98ea24ff43d474bf8c2
6
+ metadata.gz: f7999752ad0bc11db21be6b4b8ad77a2c839cd5c6dfe64698b8634e86852cbb6d84ee69e87380865e8d35196fb682981bba7d25c537a06a9f0a336b11dda7fd4
7
+ data.tar.gz: 91129d5c6dce1d15992c99743ed5fd1cbab0a6062b72f5bec1e55dadb8f4fb267f7ef036dfe135aa2a6941250ffedc841cc992737f0aff5ce1b00452bcd85422
@@ -22,9 +22,9 @@
22
22
  //= require bootstrap.js
23
23
  //= require jquery-fileupload/basic
24
24
  //= require blockly/blockly_compressed
25
- //= require fix_blockly.js
26
25
  //= require blockly/blocks_compressed
27
26
  //= require blockly/msg/js/ja
27
+ //= require fix_blockly.js
28
28
  //= require underscore
29
29
  //= require backbone
30
30
  //= require smalruby
@@ -62,7 +62,10 @@ Blockly.Blocks['<%= n %>'] =
62
62
  @setTooltip('')
63
63
 
64
64
  Blockly.Ruby['<%= n %>'] = (block) ->
65
- '<%= suffix %>\n'
65
+ if Blockly.Ruby.receiver() == 'main'
66
+ ''
67
+ else
68
+ '<%= suffix %>\n'
66
69
  <% end %>
67
70
 
68
71
  # もし< >なら
@@ -141,8 +144,12 @@ Blockly.Blocks['<%= n %>'] =
141
144
  @setTooltip('')
142
145
 
143
146
  Blockly.Ruby['<%= n %>'] = (block) ->
144
- cond = Blockly.Ruby.valueToCode(@, 'COND', Blockly.Ruby.ORDER_CONDITIONAL) || 'true'
145
- "await until #{cond}\n"
147
+ if Blockly.Ruby.receiver() == 'main'
148
+ ''
149
+ else
150
+ await = Blockly.Ruby.characterMethodCallInput_('await')[0]
151
+ cond = Blockly.Ruby.valueToCode(@, 'COND', Blockly.Ruby.ORDER_CONDITIONAL) || 'true'
152
+ "#{await} until #{cond}\n"
146
153
 
147
154
  # < >まで繰り返す
148
155
  <% n = "#{category}_until" %>
@@ -180,4 +187,7 @@ Blockly.Blocks['<%= n %>'] =
180
187
  @setTooltip('')
181
188
 
182
189
  Blockly.Ruby['<%= n %>'] = (block) ->
183
- 'await\n'
190
+ if Blockly.Ruby.receiver() == 'main'
191
+ ''
192
+ else
193
+ Blockly.Ruby.characterMethodCall_('await')
@@ -12,7 +12,7 @@ Blockly.Blocks['<%= n %>'] =
12
12
  @setHelpUrl('')
13
13
  @setColour(<%= color %>)
14
14
  @appendDummyInput()
15
- .appendField('まずは')
15
+ .appendField('実行ボタンがクリックされたとき')
16
16
  @appendStatementInput('DO')
17
17
  @setPreviousStatement(true)
18
18
  @setNextStatement(true)
@@ -2,7 +2,13 @@
2
2
 
3
3
  <%
4
4
  category = 'hardware'
5
- color = 208
5
+ colors = {
6
+ motion: 208,
7
+ looks: 270,
8
+ events: 33,
9
+ sensing: 190,
10
+ etc: 340,
11
+ }
6
12
  %>
7
13
 
8
14
  # ハードウェアの環境設定
@@ -36,7 +42,7 @@ twoWDPinDropdown = (["D#{n}", "D#{n}"] for n in [2..10])
36
42
  Blockly.Blocks['<%= n %>'] =
37
43
  init: ()->
38
44
  @setHelpUrl('')
39
- @setColour(<%= color %>)
45
+ @setColour(<%= colors[:etc] %>)
40
46
  @appendDummyInput().appendField('ハードウェアを準備する')
41
47
  @setTooltip('')
42
48
 
@@ -59,7 +65,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
59
65
  Blockly.Blocks['<%= n %>'] =
60
66
  init: ()->
61
67
  @setHelpUrl('')
62
- @setColour(<%= color %>)
68
+ @setColour(<%= colors[:looks] %>)
63
69
  @appendDummyInput()
64
70
  .appendField('LED')
65
71
  .appendField(new Blockly.FieldDropdown(dioPinDropdown), 'PIN')
@@ -82,7 +88,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
82
88
  Blockly.Blocks['<%= n %>'] =
83
89
  init: ()->
84
90
  @setHelpUrl('')
85
- @setColour(<%= color %>)
91
+ @setColour(<%= colors[:looks] %>)
86
92
  @appendDummyInput()
87
93
  .appendField('RGB LED')
88
94
  .appendField(new Blockly.FieldDropdown(acDropdown), 'AC')
@@ -110,7 +116,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
110
116
  Blockly.Blocks['<%= n %>'] =
111
117
  init: ()->
112
118
  @setHelpUrl('')
113
- @setColour(<%= color %>)
119
+ @setColour(<%= colors[:looks] %>)
114
120
  @appendDummyInput()
115
121
  .appendField('RGB LED')
116
122
  .appendField(new Blockly.FieldDropdown(acDropdown), 'AC')
@@ -135,7 +141,7 @@ Blockly.Blocks['<%= n %>'] =
135
141
  dropdown = ([String(n), String(n)] for n in [0..9])
136
142
 
137
143
  @setHelpUrl('')
138
- @setColour(<%= color %>)
144
+ @setColour(<%= colors[:looks] %>)
139
145
  @appendDummyInput()
140
146
  .appendField('7セグディスプレイに')
141
147
  .appendField(new Blockly.FieldDropdown(dropdown), 'NUM')
@@ -153,7 +159,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
153
159
  Blockly.Blocks['<%= n %>'] =
154
160
  init: ()->
155
161
  @setHelpUrl('')
156
- @setColour(<%= color %>)
162
+ @setColour(<%= colors[:looks] %>)
157
163
  @appendDummyInput()
158
164
  .appendField('7セグディスプレイをオフにする')
159
165
  @setPreviousStatement(true)
@@ -170,7 +176,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
170
176
  Blockly.Blocks['<%= n %>'] =
171
177
  init: ()->
172
178
  @setHelpUrl('')
173
- @setColour(<%= color %>)
179
+ @setColour(<%= colors[:looks] %>)
174
180
  @appendValueInput('TEXT')
175
181
  .appendField('LCDに')
176
182
  .setCheck('String')
@@ -190,7 +196,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
190
196
  Blockly.Blocks['<%= n %>'] =
191
197
  init: ()->
192
198
  @setHelpUrl('')
193
- @setColour(<%= color %>)
199
+ @setColour(<%= colors[:looks] %>)
194
200
  @appendDummyInput()
195
201
  .appendField('LCDをクリアする')
196
202
  @setPreviousStatement(true)
@@ -205,7 +211,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
205
211
  Blockly.Blocks['<%= n %>'] =
206
212
  init: ()->
207
213
  @setHelpUrl('')
208
- @setColour(<%= color %>)
214
+ @setColour(<%= colors[:looks] %>)
209
215
  @appendDummyInput()
210
216
  .appendField('7セグディスプレイをオフにする')
211
217
  @setPreviousStatement(true)
@@ -222,7 +228,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
222
228
  Blockly.Blocks['<%= n %>'] =
223
229
  init: ()->
224
230
  @setHelpUrl('')
225
- @setColour(<%= color %>)
231
+ @setColour(<%= colors[:motion] %>)
226
232
  @appendDummyInput()
227
233
  .appendField('サーボ')
228
234
  .appendField(new Blockly.FieldDropdown(pwmPinDropdown), 'PIN')
@@ -266,7 +272,7 @@ Blockly.Blocks['<%= n %>'] =
266
272
  dropdown = (["D#{n}", "D#{n}"] for n in [2..10])
267
273
 
268
274
  @setHelpUrl('')
269
- @setColour(<%= color %>)
275
+ @setColour(<%= colors[:motion] %>)
270
276
  @appendDummyInput()
271
277
  .appendField('2WD車')
272
278
  .appendField(new Blockly.FieldDropdown(twoWDPinDropdown), 'PIN')
@@ -287,7 +293,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
287
293
  Blockly.Blocks['<%= n %>'] =
288
294
  init: ()->
289
295
  @setHelpUrl('')
290
- @setColour(<%= color %>)
296
+ @setColour(<%= colors[:motion] %>)
291
297
  @appendDummyInput()
292
298
  .appendField('2WD車')
293
299
  .appendField(new Blockly.FieldDropdown(twoWDPinDropdown), 'PIN')
@@ -321,7 +327,7 @@ Blockly.Blocks['<%= n %>'] =
321
327
  ['止める', 'stop'],
322
328
  ]
323
329
  @setHelpUrl('')
324
- @setColour(<%= color %>)
330
+ @setColour(<%= colors[:motion] %>)
325
331
  @appendDummyInput()
326
332
  .appendField(new Blockly.FieldDropdown(commands), 'COMMAND')
327
333
  @setOutput(true, 'String')
@@ -346,7 +352,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
346
352
  Blockly.Blocks['<%= n %>'] =
347
353
  init: ()->
348
354
  @setHelpUrl('')
349
- @setColour(<%= color %>)
355
+ @setColour(<%= colors[:sensing] %>)
350
356
  @appendDummyInput()
351
357
  .appendField('ボタン')
352
358
  .appendField(new Blockly.FieldDropdown(dioPinDropdown), 'PIN')
@@ -372,7 +378,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
372
378
  Blockly.Blocks['<%= n %>'] =
373
379
  init: ()->
374
380
  @setHelpUrl('')
375
- @setColour(<%= color %>)
381
+ @setColour(<%= colors[:events] %>)
376
382
  @appendDummyInput()
377
383
  .appendField('ボタン')
378
384
  .appendField(new Blockly.FieldDropdown(dioPinDropdown), 'PIN')
@@ -404,7 +410,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
404
410
  Blockly.Blocks['<%= n %>'] =
405
411
  init: ()->
406
412
  @setHelpUrl('')
407
- @setColour(<%= color %>)
413
+ @setColour(<%= colors[:sensing] %>)
408
414
  @appendDummyInput()
409
415
  .appendField('センサー')
410
416
  .appendField(new Blockly.FieldDropdown(aiPinDropdown), 'PIN')
@@ -420,7 +426,7 @@ Blockly.Ruby['<%= n %>'] = (block) ->
420
426
  Blockly.Blocks['<%= n %>'] =
421
427
  init: ()->
422
428
  @setHelpUrl('')
423
- @setColour(<%= color %>)
429
+ @setColour(<%= colors[:events] %>)
424
430
  @appendDummyInput()
425
431
  .appendField('センサー')
426
432
  .appendField(new Blockly.FieldDropdown(aiPinDropdown), 'PIN')
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%
4
4
  category = 'looks'
5
- color = 264
5
+ color = 270
6
6
  %>
7
7
 
8
8
  # [ ]と( )秒言う
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%
4
4
  category = 'motion'
5
- color = 225
5
+ color = 208
6
6
  %>
7
7
 
8
8
  # ( )歩動かす
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%
4
4
  category = 'operators'
5
- color = 93
5
+ color = 100
6
6
  %>
7
7
 
8
8
  # 変数:( ) + ( )
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%
4
4
  category = 'sensing'
5
- color = 200
5
+ color = 190
6
6
  %>
7
7
 
8
8
  # 調べるの環境設定
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%
4
4
  category = 'sound'
5
- color = 296
5
+ color = 300
6
6
  %>
7
7
 
8
8
  # [▼プリセット音声]
@@ -14,3 +14,15 @@ Blockly.Names.prototype.safeName_ = function(name) {
14
14
  }
15
15
  return name;
16
16
  };
17
+
18
+ var originalBlocksMathNumberInit = Blockly.Blocks['math_number'].init;
19
+ Blockly.Blocks['math_number'].init = function() {
20
+ originalBlocksMathNumberInit.call(this);
21
+ this.setColour(100);
22
+ };
23
+
24
+ var originalBlocksTextInit = Blockly.Blocks['text'].init;
25
+ Blockly.Blocks['text'].init = function() {
26
+ originalBlocksTextInit.call(this);
27
+ this.setColour(100);
28
+ };
@@ -108,7 +108,7 @@ Blockly.Ruby.characterMethodCallInput_ = (method, args, options = {}) ->
108
108
 
109
109
  Blockly.Ruby.characterSetVariable_ = (name, val, operator = '=') ->
110
110
  if @c_()
111
- "#{@rn_({ dropSelf: false})}#{name} #{operator} #{val}\n"
111
+ "#{@rn_({ dropSelf: false })}#{name} #{operator} #{val}\n"
112
112
  else
113
113
  ''
114
114
 
@@ -66,6 +66,8 @@ window.Smalruby =
66
66
  el: $('#character-modal')
67
67
  @Views.LoadModalView = new Smalruby.LoadModalView
68
68
  el: $('#load-modal')
69
+ @Views.ResetModalView = new Smalruby.ResetModalView
70
+ el: $('#reset-modal')
69
71
 
70
72
  Smalruby.downloading = false
71
73
  window.onbeforeunload = (event) ->
@@ -162,5 +164,15 @@ window.Smalruby =
162
164
  else
163
165
  true
164
166
 
167
+ # リセットする
168
+ reset: ->
169
+ @blocklyLoading = true
170
+ Blockly.mainWorkspace.clear()
171
+ @Collections.CharacterSet.reset()
172
+ $('#filename').val('')
173
+ window.textEditor.getSession().getDocument().setValue('')
174
+ window.textEditor.moveCursorTo(0, 0)
175
+ window.changed = false
176
+
165
177
  $(document).ready ->
166
178
  Smalruby.initialize()
@@ -272,7 +272,11 @@ Smalruby.MainMenuView = Backbone.View.extend
272
272
  onReset: (e) ->
273
273
  e.preventDefault()
274
274
 
275
- location.reload()
275
+ if window.changed
276
+ Smalruby.Views.ResetModalView.render()
277
+ else
278
+ Smalruby.reset()
279
+ true
276
280
 
277
281
  onSignin: (e) ->
278
282
  e.preventDefault()
@@ -0,0 +1,11 @@
1
+ # リセット確認ダイアログを表現するビュー
2
+ Smalruby.ResetModalView = Backbone.View.extend
3
+ events:
4
+ 'click #reset-modal-ok-button': 'onOk'
5
+
6
+ render: ->
7
+ @$el.modal('show')
8
+
9
+ onOk: (e) ->
10
+ Smalruby.reset()
11
+ @$el.modal('hide')
@@ -24,27 +24,28 @@
24
24
  end
25
25
 
26
26
  hues = %w(
27
- 225
28
- 225
29
- 264
30
- 296
27
+ 208
28
+ 208
29
+ 208
30
+ 208
31
+ 270
32
+ 300
31
33
  160
34
+ 330
35
+ 330
32
36
  33
33
37
  43
34
38
  43
35
39
  43
36
- 200
37
- 93
38
- 93
39
- 93
40
- 330
40
+ 43
41
+ 190
42
+ 100
43
+ 100
44
+ 100
45
+ 100
46
+ 340
47
+ 340
41
48
  340
42
- 208
43
- 208
44
- 208
45
- 208
46
- 208
47
- 208
48
49
  ).map(&:to_i)
49
50
 
50
51
  colors = hues.map { |h|
@@ -57,16 +58,25 @@
57
58
 
58
59
  #\:<%= ids[index] %> {
59
60
  .blocklyTreeRow {
60
- padding-top: 0.25em;
61
- padding-bottom: 0.25em;
62
- border-left: 0.75em solid #<%= color %>;
61
+ margin-bottom: 1px;
62
+ padding-top: 1px;
63
+ padding-bottom: 1px;
64
+ color: white;
65
+ background-color: #<%= color %> !important;
66
+
67
+ span.blocklyTreeIcon, span.blocklyTreeLabel {
68
+ font-size: 14px;
69
+ }
63
70
  }
64
71
 
65
72
  .blocklyTreeRow.blocklyTreeSelected {
66
- color: white;
67
73
  font-weight: bold;
68
74
  background-color: #<%= active_color %> !important;
69
75
  }
70
76
  }
71
77
 
72
78
  <% end %>
79
+
80
+ div.blocklyTreeRoot {
81
+ padding: 0;
82
+ }
@@ -4,6 +4,31 @@ require 'nkf'
4
4
  class SourceCodesController < ApplicationController
5
5
  before_filter :check_whether_standalone, only: [:write, :run, :load_local]
6
6
 
7
+ # デモプログラム
8
+ DEMO_PROGRAMS =
9
+ [
10
+ {
11
+ title: '車のおいかけっこ',
12
+ filename: 'car_chase.rb',
13
+ imageUrl: '/smalruby/assets/car2.png',
14
+ },
15
+ {
16
+ title: 'クリックスターだにゃ~',
17
+ filename: 'star.rb',
18
+ imageUrl: '/smalruby/assets/cat1.png',
19
+ },
20
+ {
21
+ title: 'ピンポンゲーム',
22
+ filename: 'pong.rb',
23
+ imageUrl: '/smalruby/assets/cat2.png',
24
+ },
25
+ {
26
+ title: 'ライトをぴかっとさせるでよ',
27
+ filename: 'hardware_led.rb',
28
+ imageUrl: '/smalruby/assets/frog1.png',
29
+ },
30
+ ]
31
+
7
32
  def index
8
33
  res = {
9
34
  localPrograms: [],
@@ -22,26 +47,7 @@ class SourceCodesController < ApplicationController
22
47
  end
23
48
 
24
49
  # TODO: XMLから情報を抽出する
25
- res[:demoPrograms] << {
26
- title: '車のおいかけっこ',
27
- filename: 'car_chase.rb',
28
- imageUrl: '/smalruby/assets/car2.png',
29
- }
30
- res[:demoPrograms] << {
31
- title: 'クリックスターだにゃ~',
32
- filename: 'star.rb',
33
- imageUrl: '/smalruby/assets/cat1.png',
34
- }
35
- res[:demoPrograms] << {
36
- title: 'ピンポンゲーム',
37
- filename: 'pong.rb',
38
- imageUrl: '/smalruby/assets/cat2.png',
39
- }
40
- res[:demoPrograms] << {
41
- title: 'ライトをぴかっとさせるでよ',
42
- filename: 'hardware_led.rb',
43
- imageUrl: '/smalruby/assets/frog1.png',
44
- }
50
+ res[:demoPrograms] = DEMO_PROGRAMS
45
51
 
46
52
  render json: res
47
53
  end
@@ -1,3 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  module ApplicationHelper
3
+ def modal_css_class
4
+ "modal hide#{raspberrypi? ? '' : ' fade'}"
5
+ end
3
6
  end
@@ -6,7 +6,8 @@ module RubyToBlock
6
6
 
7
7
  def self.process_match_data(md, context)
8
8
  md2 = regexp.match(md[type])
9
- add_character_method_call_block(context, md2[1], new(fields: { XY: md2[2] }))
9
+ add_character_method_call_block(context, md2[1],
10
+ new(fields: { XY: md2[2] }))
10
11
  true
11
12
  end
12
13
  end
@@ -31,7 +31,6 @@
31
31
  %div
32
32
 
33
33
  = render 'character_modal'
34
- = render 'load_modal'
35
34
 
36
35
  %script#character-selector-template{:type => 'text/template'}
37
36
  .item
@@ -1,4 +1,4 @@
1
- #character-modal{:class => 'modal hide fade', :tabindex => '-1',
1
+ #character-modal{:class => "#{modal_css_class}", :tabindex => '-1',
2
2
  :role => 'dialog', :'aria-hidden' => 'true'}
3
3
  .modal-body
4
4
  #character-modal-right-pane{:class => 'right-pane'}
@@ -1,4 +1,4 @@
1
- #load-modal{:class => "modal hide fade", :tabindex => "-1",
1
+ #load-modal{:class => "#{modal_css_class}", :tabindex => "-1",
2
2
  :role => "dialog", :"aria-hidden" => "true"}
3
3
  .modal-body
4
4
  %ul.thumbnails{:id => "load-modal-local-programs",
@@ -0,0 +1,15 @@
1
+ #reset-modal{class: "#{modal_css_class}", tabindex: "-1",
2
+ role: "dialog", :"aria-hidden" => "true"}
3
+ .modal-header
4
+ %h3
5
+ 本当にリセットしますか?
6
+ .modal-body
7
+ %p
8
+ 作成中のプログラムが消えてしまうよ!
9
+ .modal-footer
10
+ %button#reset-modal-cancel-button.btn{:"data-dismiss" => "modal", :"aria-hidden" => "true"}<
11
+ %i.icon-remove
12
+ やめる
13
+ %button#reset-modal-ok-button.btn{class: "btn-primary"}<
14
+ %i.icon-off
15
+ リセット
@@ -1,4 +1,4 @@
1
- #signin-modal{class: "modal hide fade", tabindex: "-1",
1
+ #signin-modal{class: "#{modal_css_class}", tabindex: "-1",
2
2
  role: "dialog", :"aria-hidden" => "true"}
3
3
  .modal-body
4
4
  %h4