'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
- new Pettanr.Image.SymbolPicture({\r
+ klass = if true # thumbnail\r
+ Pettanr.Image.SymbolPicture\r
+ new klass({\r
attr: {\r
src: @r_url()\r
},\r
else
100
r = if wr < hr
- [w*wr/100, h*wr/100]
+ [Math.floor(w*wr/100), Math.floor(h*wr/100)]
else
- [w*hr/100, h*hr/100]
+ [Math.floor(w*hr/100), Math.floor(h*hr/100)]
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
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
\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
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
"#{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
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