From: yasushiito Date: Tue, 12 May 2015 00:07:26 +0000 (+0900) Subject: fix: X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=commitdiff_plain;h=1fd948fbf48d6f1b2f5c34241f0491febf0ba579 fix: --- diff --git a/app/assets/images/home.gif b/app/assets/images/home.gif new file mode 100644 index 00000000..65557d61 Binary files /dev/null and b/app/assets/images/home.gif differ diff --git a/app/assets/javascripts/locmare/form.js.coffee b/app/assets/javascripts/locmare/form.js.coffee index c294c1f5..90a69584 100644 --- a/app/assets/javascripts/locmare/form.js.coffee +++ b/app/assets/javascripts/locmare/form.js.coffee @@ -242,11 +242,12 @@ class Locmare.ExtendForm extends Locmare.FormBase render: () -> this.$el.html('') - this.$el.append(@label.render().el) if not @label.hidden() - @div_fields = new Locmare.FormModule.Fields({ - fields: @fields - }) - this.$el.append(@div_fields.render().el) + if !@is_hidden() + this.$el.append(@label.render().el) if not @label.hidden() + @div_fields = new Locmare.FormModule.Fields({ + fields: @fields + }) + this.$el.append(@div_fields.render().el) this refresh: () -> @@ -267,6 +268,9 @@ class Locmare.ExtendForm extends Locmare.FormBase val: () -> JSON.stringify(@item.attributes) + is_hidden: () -> + _.isEmpty(@manifest.field_names) + init_fields: () -> _.each @manifest.field_names, (field_name) => field_manifest = @manifest.fields[field_name] diff --git a/app/assets/javascripts/locmare/form/field/helper/tail_angle.js.coffee b/app/assets/javascripts/locmare/form/field/helper/tail_angle.js.coffee index b06b7983..8dc5163a 100644 --- a/app/assets/javascripts/locmare/form/field/helper/tail_angle.js.coffee +++ b/app/assets/javascripts/locmare/form/field/helper/tail_angle.js.coffee @@ -13,7 +13,7 @@ class Locmare.FormModule.FieldModule.HelperModule.TailAngle extends Locmare.Form render: () -> @attr = { - style: 'display: block' + #style: 'display: block' # row break? } this.$el.attr(@attr) this.$el.html('') diff --git a/app/assets/javascripts/locmare/form/field/tag/number.js.coffee b/app/assets/javascripts/locmare/form/field/tag/number.js.coffee index a707cef0..914f051f 100644 --- a/app/assets/javascripts/locmare/form/field/tag/number.js.coffee +++ b/app/assets/javascripts/locmare/form/field/tag/number.js.coffee @@ -8,11 +8,15 @@ class Locmare.FormModule.FieldModule.TagModule.NumberTag extends Locmare.FormMod render: () -> this.$el.html('') + sz = @options()['size'] @attr = { type: 'number', name: @form_field_name(), - value: @value() + value: @value(), + } + if sz + @attr['style'] = Pettanr.to_style({width: Pettanr.to_s(sz) + 'em'}) _.extend(@attr, @options()) this.$el.attr(@attr) this diff --git a/app/assets/javascripts/views/history.js.coffee b/app/assets/javascripts/views/history.js.coffee index 9e1d8933..5a07ce66 100644 --- a/app/assets/javascripts/views/history.js.coffee +++ b/app/assets/javascripts/views/history.js.coffee @@ -25,6 +25,7 @@ class Pettanr.Views.History extends Backbone.View @render() # push history + # options: str:page title push: (params, options) -> return if !@power @list.push(params, options) @@ -49,6 +50,7 @@ class Pettanr.Views.History.List extends Backbone.View this.$el.append(button.render().el) this + # options: str:page title push: (params, options) -> _.last(@buttons).release() if !_.isEmpty(@buttons) if @buttons.length > @max_logs @@ -81,7 +83,7 @@ class Pettanr.Views.History.List.Log extends Backbone.View @model = Manifest.manifest().models[@action.item_name].classify() icon = new Pettanr.Image.Icon({item: @model, title: @options, half: true}) @button = new Tag.A({ - attr: {href: '#'}, + attr: {href: '/' + @action.url(@params)}, content: icon.render().el }) @listenTo(@button, 'click', @click) @@ -116,7 +118,7 @@ class Pettanr.Views.History.Root extends Backbone.View initialize: (options) -> icon = new Pettanr.Views.Common.RootIcon() @button = new Tag.A({ - attr: {href: '#'}, + attr: {href: '/'}, content: icon.render().el }) @listenTo(@button, 'click', @click) diff --git a/app/assets/javascripts/work/forms.js.coffee.erb b/app/assets/javascripts/work/forms.js.coffee.erb index 9f05e940..03766ac6 100644 --- a/app/assets/javascripts/work/forms.js.coffee.erb +++ b/app/assets/javascripts/work/forms.js.coffee.erb @@ -94,6 +94,11 @@ }, tag: { type: 'text', + args: { + options: { + size: 80, + }, + }, }, row_break: true, }, @@ -190,6 +195,11 @@ }, tag: { type: 'text', + args: { + options: { + size: 80, + }, + }, }, row_break: true, }, @@ -286,6 +296,11 @@ }, tag: { type: 'text', + args: { + options: { + size: 80, + }, + }, }, row_break: true, }, @@ -388,6 +403,11 @@ }, tag: { type: 'text', + args: { + options: { + size: 80, + }, + }, }, row_break: true, }, @@ -505,6 +525,11 @@ caption: { tag: { type: 'text', + args: { + options: { + size: 40, + }, + }, }, row_break: true, }, @@ -563,12 +588,6 @@ uses: { default: { fields: { - caption: { - tag: { - type: 'text', - }, - row_break: true, - }, x: { tag: { type: 'number', @@ -661,7 +680,6 @@ }, }, field_names: [ - 'caption', 'x', 'y', 'width', @@ -679,6 +697,11 @@ caption: { tag: { type: 'text', + args: { + options: { + size: 40, + }, + }, }, row_break: true, }, @@ -717,12 +740,6 @@ type: 'hidden', }, }, - caption: { - tag: { - type: 'text', - }, - row_break: true, - }, z: { label: { type: 'none', @@ -752,7 +769,6 @@ }, }, field_names: [ - 'caption', 'id', 'panel_id', 'speech_balloon_template_id', @@ -767,6 +783,11 @@ caption: { tag: { type: 'text', + args: { + options: { + size: 40, + }, + }, }, row_break: true, }, @@ -837,7 +858,6 @@ tag: { type: 'number', }, - row_break: true, }, width: { tag: { @@ -960,12 +980,6 @@ type: 'select', }, }, - quotes: { - tag: { - type: 'text', - }, - row_break: true, - }, content: { label: { args: { @@ -996,6 +1010,7 @@ }, }, }, + row_break: true, }, speech_balloon_template_module_name: { label: { @@ -1021,7 +1036,6 @@ 'writing_format_id', 'font_size', 'text_align', - 'quotes', 'content', 'fore_color', 'id', @@ -1095,12 +1109,6 @@ type: 'hidden', }, }, - caption: { - tag: { - type: 'text', - }, - row_break: true, - }, repeat: { tag: { type: 'select', @@ -1140,7 +1148,6 @@ }, }, field_names: [ - 'caption', 'repeat', 'x', 'y', @@ -1156,6 +1163,11 @@ caption: { tag: { type: 'text', + args: { + options: { + size: 40, + }, + }, }, row_break: true, }, @@ -1186,12 +1198,6 @@ type: 'hidden', }, }, - caption: { - tag: { - type: 'text', - }, - row_break: true, - }, code: { label: { args: { @@ -1248,7 +1254,6 @@ field_names: [ 'id', 'panel_id', - 'caption', 'code', 'orientation', 'xy', @@ -1262,6 +1267,11 @@ caption: { tag: { type: 'text', + args: { + options: { + size: 40, + }, + }, }, row_break: true, }, diff --git a/public/images/home.gif b/public/images/home.gif new file mode 100644 index 00000000..65557d61 Binary files /dev/null and b/public/images/home.gif differ diff --git a/public/local_manifest.json b/public/local_manifest.json index 1e8cdd31..8adabae1 100644 --- a/public/local_manifest.json +++ b/public/local_manifest.json @@ -2131,7 +2131,12 @@ } }, "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 80 + } + } }, "row_break": true }, @@ -2227,7 +2232,12 @@ } }, "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 80 + } + } }, "row_break": true }, @@ -2323,7 +2333,12 @@ } }, "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 80 + } + } }, "row_break": true }, @@ -2425,7 +2440,12 @@ } }, "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 80 + } + } }, "row_break": true }, @@ -2542,7 +2562,12 @@ "fields": { "caption": { "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 40 + } + } }, "row_break": true }, @@ -2601,12 +2626,6 @@ "uses": { "default": { "fields": { - "caption": { - "tag": { - "type": "text" - }, - "row_break": true - }, "x": { "tag": { "type": "number" @@ -2699,7 +2718,6 @@ } }, "field_names": [ - "caption", "x", "y", "width", @@ -2716,7 +2734,12 @@ "fields": { "caption": { "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 40 + } + } }, "row_break": true } @@ -2755,12 +2778,6 @@ "type": "hidden" } }, - "caption": { - "tag": { - "type": "text" - }, - "row_break": true - }, "z": { "label": { "type": "none" @@ -2790,7 +2807,6 @@ } }, "field_names": [ - "caption", "id", "panel_id", "speech_balloon_template_id", @@ -2804,7 +2820,12 @@ "fields": { "caption": { "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 40 + } + } }, "row_break": true } @@ -2872,8 +2893,7 @@ "label": {}, "tag": { "type": "number" - }, - "row_break": true + } }, "width": { "tag": { @@ -2994,12 +3014,6 @@ "type": "select" } }, - "quotes": { - "tag": { - "type": "text" - }, - "row_break": true - }, "content": { "label": { "args": { @@ -3055,7 +3069,6 @@ "writing_format_id", "font_size", "text_align", - "quotes", "content", "fore_color", "id", @@ -3129,12 +3142,6 @@ "type": "hidden" } }, - "caption": { - "tag": { - "type": "text" - }, - "row_break": true - }, "repeat": { "tag": { "type": "select", @@ -3174,7 +3181,6 @@ } }, "field_names": [ - "caption", "repeat", "x", "y", @@ -3189,7 +3195,12 @@ "fields": { "caption": { "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 40 + } + } }, "row_break": true } @@ -3220,12 +3231,6 @@ "type": "hidden" } }, - "caption": { - "tag": { - "type": "text" - }, - "row_break": true - }, "code": { "label": { "args": { @@ -3282,7 +3287,6 @@ "field_names": [ "id", "panel_id", - "caption", "code", "orientation", "xy", @@ -3295,7 +3299,12 @@ "fields": { "caption": { "tag": { - "type": "text" + "type": "text", + "args": { + "options": { + "size": 40 + } + } }, "row_break": true }