netzke / netzke-core

Framework for Sencha Ext JS + Ruby on Rails client-server components
http://netzke.org
Other
263 stars 77 forks source link

0 6 #31

Closed dmytro closed 12 years ago

dmytro commented 12 years ago

Some icons sets use dashes in file names, like for example Fugue icons (http://p.yusukekamiyamane.com/). With such icons I always have to do:

   :icon => "ui-check-boxes".to_sym

Patch will allow use of strings same way as Symbols used now:

  :icon => "ui-check-boxes"

Only for strings without .png extension, i.e. if string is not full file name.

mxgrn commented 12 years ago

If I'm not mistaken, using strings was reserved for specifying full paths to images.

dmytro commented 12 years ago

Yes, I kinda understand that. But using Symbols only work for files without dashes :cancel, etc.

I wanted to have somthing for files like excel-read.png. Symbols won't work in this case (:excel-read).

That's why I've added check for .png extension, maybe there are some other checks (no "/" in file name)?

mxgrn commented 12 years ago

Yes, I understand your suggestion, but didn't know how to make it backward compatible. Just checking for .png is certainly not enough (what about .gif etc?) I think checking (only) for "/" makes more sense - let's use it as an indicator of a full path. Can you do that? Thanks!

dmytro commented 12 years ago

Yes, sure. Will change to check for !~ /^\//

dmytro commented 12 years ago

Hi, I've made changes. Could you pull this patch, please. Thanks.