OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
68192c6
)
fix:balloon edit
author
yasushiito
<yas@pen-chan.jp>
Tue, 28 Apr 2015 22:28:28 +0000
(07:28 +0900)
committer
yasushiito
<yas@pen-chan.jp>
Tue, 28 Apr 2015 22:28:28 +0000
(07:28 +0900)
app/assets/javascripts/models/resource_picture.js.coffee
patch
|
blob
|
history
app/assets/javascripts/pettanr/pettan_imager.js.coffee
patch
|
blob
|
history
app/assets/javascripts/views/balloons/element.js.coffee
patch
|
blob
|
history
app/controllers/panels_controller.rb
patch
|
blob
|
history
app/models/resource_picture.rb
patch
|
blob
|
history
lib/manifest/manifest.rb
patch
|
blob
|
history
diff --git
a/app/assets/javascripts/models/resource_picture.js.coffee
b/app/assets/javascripts/models/resource_picture.js.coffee
index
1b5de0e
..
f54e87c
100644
(file)
--- a/
app/assets/javascripts/models/resource_picture.js.coffee
+++ b/
app/assets/javascripts/models/resource_picture.js.coffee
@@
-30,14
+30,16
@@
class Pettanr.ResourcePicture extends Peta.Content
'image/' + @get('ext')
\r
\r
r_url: (subdir = null) ->
\r
'image/' + @get('ext')
\r
\r
r_url: (subdir = null) ->
\r
- opt = if
Pettanr.to_s(@subdir).empty
\r
+ opt = if
_.isEmpty(subdir)
\r
''
\r
else
\r
'?subdir=' + Pettanr.to_s(subdir)
\r
'/resource_pictures/' + @filename() + opt
\r
\r
tmb_opt_img_tag: () ->
\r
''
\r
else
\r
'?subdir=' + Pettanr.to_s(subdir)
\r
'/resource_pictures/' + @filename() + opt
\r
\r
tmb_opt_img_tag: () ->
\r
- new Pettanr.Image.SymbolPicture({
\r
+ klass = if true # thumbnail
\r
+ Pettanr.Image.SymbolPicture
\r
+ new klass({
\r
attr: {
\r
src: @r_url()
\r
},
\r
attr: {
\r
src: @r_url()
\r
},
\r
diff --git
a/app/assets/javascripts/pettanr/pettan_imager.js.coffee
b/app/assets/javascripts/pettanr/pettan_imager.js.coffee
index
8eacb89
..
bb4d938
100644
(file)
--- a/
app/assets/javascripts/pettanr/pettan_imager.js.coffee
+++ b/
app/assets/javascripts/pettanr/pettan_imager.js.coffee
@@
-14,8
+14,8
@@
class Pettanr.Imager
else
100
r = if wr < hr
else
100
r = if wr < hr
- [
w*wr/100, h*wr/100
]
+ [
Math.floor(w*wr/100), Math.floor(h*wr/100)
]
else
else
- [
w*hr/100, h*hr/100
]
+ [
Math.floor(w*hr/100), Math.floor(h*hr/100)
]
r
r
diff --git
a/app/assets/javascripts/views/balloons/element.js.coffee
b/app/assets/javascripts/views/balloons/element.js.coffee
index
89cc58d
..
ce492b7
100644
(file)
--- a/
app/assets/javascripts/views/balloons/element.js.coffee
+++ b/
app/assets/javascripts/views/balloons/element.js.coffee
@@
-57,7
+57,7
@@
class Pettanr.Views.Balloon.Element.Edit extends Pettanr.Views.Balloon.Element
\r
resize_div.css('top', '0px')
\r
resize_div.css('left', '0px')
\r
\r
resize_div.css('top', '0px')
\r
resize_div.css('left', '0px')
\r
- resize_div.css('z-index', 1)
\r
+
#
resize_div.css('z-index', 1)
\r
width = ui.size.width
\r
height = ui.size.height
\r
top = speech_balloon_div.position().top
\r
width = ui.size.width
\r
height = ui.size.height
\r
top = speech_balloon_div.position().top
\r
@@
-79,9
+79,6
@@
class Pettanr.Views.Balloon.Element.Edit extends Pettanr.Views.Balloon.Element
height: height
\r
}, {silent: true})
\r
elm.trigger('resize')
\r
height: height
\r
}, {silent: true})
\r
elm.trigger('resize')
\r
- resize: (event, ui) ->
\r
- resize_div = $(@)
\r
- speech_balloon_div = resize_div.parent()
\r
handles: 'all',
\r
autoHide: true
\r
}
\r
handles: 'all',
\r
autoHide: true
\r
}
\r
@@
-89,6
+86,8
@@
class Pettanr.Views.Balloon.Element.Edit extends Pettanr.Views.Balloon.Element
\r
style: () ->
\r
{
\r
\r
style: () ->
\r
{
\r
+ top: '0px',
\r
+ left: '0px',
\r
width: Pettanr.to_s(@element.get('width')) + 'px',
\r
height: Pettanr.to_s(@element.get('height')) + 'px',
\r
'z-index': 1 # play case
\r
width: Pettanr.to_s(@element.get('width')) + 'px',
\r
height: Pettanr.to_s(@element.get('height')) + 'px',
\r
'z-index': 1 # play case
\r
diff --git
a/app/controllers/panels_controller.rb
b/app/controllers/panels_controller.rb
index
926acda
..
ad67b3e
100644
(file)
--- a/
app/controllers/panels_controller.rb
+++ b/
app/controllers/panels_controller.rb
@@
-142,7
+142,6
@@
class PanelsController < ApplicationController
updated_html_format format
updated_json_format format
else
updated_html_format format
updated_json_format format
else
- p @item.errors
format.html {
flash[:notice] = I18n.t('flash.notice.not_updated', :model => @my_model_class.model_name.human)
@editor = Editor::PanelEditor.new @item, @operators
format.html {
flash[:notice] = I18n.t('flash.notice.not_updated', :model => @my_model_class.model_name.human)
@editor = Editor::PanelEditor.new @item, @operators
diff --git
a/app/models/resource_picture.rb
b/app/models/resource_picture.rb
index
36d57e5
..
7a08169
100644
(file)
--- a/
app/models/resource_picture.rb
+++ b/
app/models/resource_picture.rb
@@
-230,4
+230,13
@@
class ResourcePicture < Peta::Content
"#{self.license_group_module_name.tableize}/attributes/full_credit"
end
"#{self.license_group_module_name.tableize}/attributes/full_credit"
end
+ def self.remake_all
+ ResourcePicture.find(:all).each do |resource_picture|
+ resource_picture.boosts 'post'
+ full = resource_picture.restore 'full'
+ imager = PettanImager.load full
+ resource_picture.store_picture_with_gif(imager)
+ end
+ end
+
end
end
diff --git
a/lib/manifest/manifest.rb
b/lib/manifest/manifest.rb
index
bc56116
..
ce33eea
100644
(file)
--- a/
lib/manifest/manifest.rb
+++ b/
lib/manifest/manifest.rb
@@
-32,6
+32,8
@@
module Manifest
def init_after_load_manifest
@system_resources.init
def init_after_load_manifest
@system_resources.init
+ PettanImager.tmb_w = @magic_numbers['thumbnail_width']
+ PettanImager.tmb_h = @magic_numbers['thumbnail_height']
end
def replace_action_alias
end
def replace_action_alias