#61
Posted 30 January 2012 - 05:12 AM
There are more differences than mouseover/mouseenter (I was using native js-event instead of jQuery), so your fix might well work on all browsers. What I don't understand is why it has broken now? Maybe browser cache with all of us or something like that...?
EDIT: I tested this and it works nice. Thanks Soma for the fix. I merged it in and also removed one unnecessary debug message I had forgotten there.
#62
Posted 30 January 2012 - 06:20 AM
TO my understanding, it wasn't working cause you check for "hover" event in the live method, and then e.type will never return "mouseenter". It's unlike the .hover method which binds mouseenter,mouseleave. Dunno why exactly it is like this, but I guess it should work all well.
I haven't tried but maybe it would require to write .live("mouseenter mouseleave", function ... ) { if (e.type=="mouseenter") .. to make it work with those events.
@somartist | modules created | support me, flattr my work flattr.com
#63
Posted 01 February 2012 - 04:21 AM
In Chrome and Safari (OS X) this line works:
if( e.type === 'mouseover')but this line (in the latest commit) doesn't:
if( e.type === 'mouseenter')
I can't test this is Firefox 9 because I can't even log into PW with it.
Regards
Marty
#65
Posted 01 February 2012 - 12:17 PM
Hi,
In Chrome and Safari (OS X) this line works:if( e.type === 'mouseover')but this line (in the latest commit) doesn't:if( e.type === 'mouseenter')
I can't test this is Firefox 9 because I can't even log into PW with it.
Regards
Marty
Marty, there shouldn't be any mouseenter left (https://github.com/a...eldCropImage.js). Are you sure that isn't coming from browser cache?
#66
Posted 01 February 2012 - 04:08 PM
Scratch that. It appears to be work now. I was at this for an hour yesterday. All's good now.
@ryan I reinstalled it (now to FF10) and it works fine now. No idea why it stopped me logging in even after FF's numerous updates recently.
Regards
Martin
#68
Posted 28 February 2012 - 05:14 PM
I was thinking of trying to re-jig the code I did to allow crops to be tied to specific templates to something like this:
big_thumbnail,300,200,news:first,article small_thumbnail,160,100,news:!first,article
So in the code above, for the news template a colon separates the template name from a keyword - first - so the big thumbnail is only available as an option for the first image in the list. In the second config row for the small thumbnail, it is !first, with the exclamation mark meaning NOT (as it does in PHP).
Both crops are available for all images in the article template as no image-specific setting is specified for that template.
I did quickly look into this a few weeks ago and it looked a bit more complicated than the previous code change I did, but I don't think it's impossible.
The only concern I can see here is that as soon as you re-order the images, the first image in a list might be further down the list, so I'm not sure what to do there. Maybe I should just assume that people would click Save once they've re-ordered the page and then they can re-select their crops as normal? I think that that would be a small price to pay for the additional functionality - especially since not a lot of people may find it useful, but I hope others might see the benefits and have some usage scenarios in mind too
Anyway, it's not high up my list of priorities, but I thought I'd see who else is interested in this.
#69
Posted 28 February 2012 - 07:02 PM
I haven't played with the repeater field yet so I might be talking nonsense.
#70
Posted 29 February 2012 - 03:59 AM
#71
Posted 08 March 2012 - 03:01 PM
I was thinking of trying to re-jig the code I did to allow crops to be tied to specific templates to something like this:
big_thumbnail,300,200,news:first,article small_thumbnail,160,100,news:!first,article
I think that would be better to set up a a thumbnail by the form field. Configuration would be more flexible.
I have cases where a template has multiple images in different sizes.
In the current approach. I set a thumbnail based on the template. For each field, I get three dimensions.
Maybe it would be better in this way:
// article_tpl template thumb_100x100,100,100,field_name_img1 thumb_300x300,300,300,field_name_img2 thumb_500x500,500,500,field_name_img3 // and in the news_tpl thumb_150x150,150,150,field_news_img1 thumb_350x350,350,350,field_news_img2,other_field_name_img2 thumb_550x550,550,550,field_news_img3
Or in this way:
// article template thumb_100x100,100,100,template_name[field_name_img1] thumb_300x300,300,300,template_name[field_name_img2],template2_name[field_name2_img2] thumb_500x500,500,500,template_name[field_name_img3]
It may even be better to move the configuration to the form field settings?
#72
Posted 09 March 2012 - 02:15 AM
Now that PW has per-field settings for the same field on different templates I can see how something like that could work - I just have no idea how to code it
#73
Posted 09 March 2012 - 02:33 AM
#74
Posted 09 March 2012 - 03:49 PM
Limiting scope to the template is still possible.
thumb,100,200,basic-page is still possible.
Here is fork https://github.com/PawelGIX/Thumbnails
#75
Posted 09 March 2012 - 04:01 PM
PS: This is module is becoming pretty nice community effort: three different developers + one sponsoring. And also using one third party open source tool, jCrop.
#76
Posted 09 March 2012 - 07:53 PM
In this way, we could provide more options for the site administrator. But the configuration becomes more difficult :/
[
{
"name": "my new thumb",
"template": [ "basic-page", "home" ],
"aspectRatio": 1,
"minSize": [100,100],
"maxSize": [ 200,200 ]
},
{
"name": "small thumb",
"aspectRatio": null
},
{
"name": "thumbnail2",
"width": 100,
"height": 200
}
]
What do you think about this?
#77
Posted 10 March 2012 - 03:23 AM
I'll have a think about config later and see if I can come up with a suggestion.
#78
Posted 10 March 2012 - 05:52 AM
This is something else.I do like the idea of Min and max size as it is currently possible to create a small crop that is actually enlarged on the site.
jCrop Documentation
jCrop allows you to specify the dimensions of graphics that you cut.
You can allow for example 100x200px MIN or 100x500px MAX for images in siebar. This way you can cut the picture of a different height but fixed width 100px.
#79
Posted 10 March 2012 - 09:17 AM
If accidentally uploading images that are smaller than the crop the crop box could just scale down so it uses up as much of the image as possible or something.
Just an idea - it all works fine as it is and I'm looking forward to playing with the per-field settings later today/tomorrow
#80
Posted 10 March 2012 - 05:01 PM
I think we should have "Min Image Dimensions" as we have "Max ImageDimensions". You should get a message that the image is too small.If accidentally uploading images that are smaller than the crop the crop box could just scale down so it uses up as much of the image as possible or something.
I looked at these new features and I do not think it was possible for now.Just an idea - it all works fine as it is and I'm looking forward to playing with the per-field settings later today/tomorrow
Just out of interest, to the per-field settings work in the new per-template settings that ryan introduced recently for things like naming the same field differently for different templates? Being able to have just one "images" field and set the settings for that field in the many templates I use it in would be awesome
I do not know how to add a field to be visible in chosen context. Maybe Ryan knows how :].
But you can do this right now in this way:
thumbnail,200,200,basic-page,home big_thumbnail,500,500,other_template_name medium_thumbnail,300,300,post_template
Also tagged with one or more of these keywords: Module
Community Support →
Modules/Plugins →
Module: TemplateHasTagsStarted by MichaMichaMicha, Yesterday, 09:31 AM |
|
|
||
Community Support →
Modules/Plugins →
Release: LocalAudioFiles MP3-DBStarted by horst, 19 May 2013 |
|
|
||
Community Support →
Modules/Plugins →
Inline EditorStarted by Sinmok, 10 May 2013 |
|
|
||
Community Support →
Modules/Plugins →
Module: Site indexerStarted by Alessio Dal Bianco, 08 May 2013 |
|
|
||
Community Support →
Modules/Plugins →
Form Builder - Form with more than 1 formbuilderfile inputStarted by theGC, 07 May 2013 |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













