Re: FarCry 7 bugs
Jeff Coughlin <[email protected]> Sun, 6 Apr 2014 23:48:02 -0400
| Newsgroups | gmane.comp.cms.farcry.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_529FECF1-E51E-4E9D-A32A-F0FC99F18D12 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1 Justin, Hmm... well, it definitely breaks the way FarCry works. But now that I thi= nk about it, I like that you can override it in the formtool property. Thi= s will allow me to load different css files for different scenarios (like a= different css file for the sidebar) - this is something I've wanted for a = long time, but never thought of a good way to handle it. So it's definitel= y a good thing. The way it stands now, it might confuse some people to kno= w that they can't load the custom css file(s) the way the RTE normally allo= ws you to. Here's a thought. Maybe keep it the new way, but make a visible note about= it in the TinyMCE config screen with a link to more info (docs) on how to = use it. Thoughts? One other thing that can improve that process... I'd still like to be able = to set a global one and a FarCry config value would work perfectly for that= . The default could be the one you're already using (and maybe set it to t= he ftHint in case people want to reset it), but allow people to override it= . Then they can still override for certain scenarios using the property ta= g for those areas where needed. This way for the majority of cases (basica= lly the body area of most pages and custom types), people won't have to set= it to the same css file each and every time in the property tag - and more= importantly they won't have to override dmHTML.cfc for every single projec= t just to do the same thing as setting a global custom css in a FarCry conf= ig. =20 Thoughts? Jeff btw, I've been doing quite a lot with the new TinyMCE 4 configs and there i= s quite a lot you can do with it for your FC projects. It's very powerful = (once you get past the poor/lacking documentation - I had to crawl through = some of their js to find out a few things you can do). Maybe someday soon = I'll write up a good how-to in the FarCry docs for customizing the configs = for your projects. On Apr 6, 2014, at 9:03 PM, Justin Carter <[email protected]> wrote= : > Hmmm, I don't think I can make this change right now... >=20 > For a global content_css value you can extend richtext.cfc and set a defa= ult value for the ftContentCSS attribute, and this will apply to all rich t= ext areas (this is generally what you want). But you can also override ftCo= ntentCSS on individual formtool properties in your content types (same goes= for width and height). >=20 > If I move the global configJS to the bottom, then it will break any formt= ool properties that have css/width/height specified individually (if they a= re also present in the global config). So any changes that you want to make= "globally" for those 3 properties probably need to be done by extending ri= chtext.cfc, rather than via the config. >=20 > To allow them to be defaulted in the config (rather than extending richte= xt.cfc), and also overridable in each formtool property, I think we'd need = to do some smarter splitting/parsing of the JS config, or break those parti= cular properties out into separate fields in the config (probably the bette= r option). >=20 > cheers, > Justin >=20 >=20 > On Saturday, April 5, 2014 6:08:03 PM UTC+11, Jeff Coughlin wrote: > I'm just lazy to do the pull request at the moment (and it's 3am). I'll = do it in the morning if you prefer. Otherwise the code is below (it's just= relocating three lines of code down a few lines). >=20 > In core/packages/formtools/richtext.cfc the output of #configJS# should b= e last. Currently it is being loaded *before* FarCry's overrides. Instead= we should be allowed to override even FarCry's overrides. I spent a coupl= e hours trying to figure out why my custom content_css wasn't loading (yeah= , I'm an idiot. A simple "view html source" finally clued me in that it was= in fact loading, but then FarCry was overriding it with it's own css file)= . You can either swap it yourself or use the code block below (I provided = the entire <script></script> block for easier reference). If you move the = #configJS# variable yourself (with it's conditional block), just keep in mi= nd that the comma switches to the front of the variable. >=20 >=20 > <script language=3D"javascript" type=3D"text/javascript"> > $j(function() { > tinymce.init({ > selector: '###arguments.fieldname#', >=20 > script_url : '#application.url.webtop#/thirdparty/tiny_mce/tinymce.m= in.js', >=20 > farcryrelatedtypes: #serializeJSON(aRelatedTypes)#, > optionsURL: "#getAjaxURL(typename=3Darguments.typename,stObject=3Dar= guments.stObject,stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fi= eldname,combined=3Dfalse)#&action=3Dtemplateoptions", > previewURL: "#getAjaxURL(typename=3Darguments.typename,stObject=3Dar= guments.stObject,stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fi= eldname,combined=3Dfalse)#&action=3Dtemplatehtml", > image_list : "#getAjaxURL(typename=3Darguments.typename,stObject=3Da= rguments.stObject,stMetadata=3Darguments.stMetadata,fieldname=3Darguments.f= ieldname,combined=3Dfalse)#&action=3Dimageoptions&relatedTypename=3D#argume= nts.stMetadata.ftImageListFilterTypename#&relatedProperty=3D#arguments.stMe= tadata.ftImageListFilterProperty#", > link_list : "#getAjaxURL(typename=3Darguments.typename,stObject=3Dar= guments.stObject,stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fi= eldname,combined=3Dfalse)#&action=3Dlinkoptions&relatedTypename=3D#argument= s.stMetadata.ftLinkListFilterTypenames#" > <cfif len(imageUploadField)> > , imageUploadField : #serializeJSON(imageUploadField)# > , imageUploadType : #serializeJSON(arguments.stMetadata.ftImageList= FilterTypename)# > </cfif> > <cfif len(arguments.stMetadata.ftWidth)> > ,width : "#arguments.stMetadata.ftWidth#" > </cfif> > <cfif len(arguments.stMetadata.ftHeight)> > ,height : "#arguments.stMetadata.ftHeight#" > </cfif>=09 > <cfif len(arguments.stMetadata.ftContentCSS)> > ,content_css : "#arguments.stMetadata.ftContentCSS#" > </cfif> =09 > <cfif len(configJS)> > ,#configJS# > </cfif> > =09 > }); > }); > </script> >=20 >=20 >=20 >=20 > Jeff >=20 > On Apr 5, 2014, at 2:58 AM, Justin Carter <[email protected]> wrote: >=20 >> Yeah which ever is easiest for you, I don't mind copy and pasting or acc= epting a pull request :) >>=20 >> On 05/04/2014 5:45 PM, "Jeff Coughlin" <[email protected]> wrote: >> I'll have to wait until it happens again. It can sometimes go a hundred= saves without a problem. I'll let you know. >>=20 >> btw, can I just mention a bug fix here for a TinyMCE fix (unrelated), or= should I submit a pull request? It's just moving three lines of code down= a few lines (it's in the wrong spot). >>=20 >> Jeff >=20 >=20 > --=20 > You received this message cos you are subscribed to "farcry-dev" Google g= roup. > To post, email: farcry-dev-/[email protected] > To unsubscribe, email: farcry-dev+unsubscribe-/[email protected] > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > ---=20 > You received this message because you are subscribed to the Google Groups= "farcry-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > For more options, visit https://groups.google.com/d/optout. --=20 You received this message cos you are subscribed to "farcry-dev" Google gro= up. To post, email: farcry-dev-/[email protected] To unsubscribe, email: farcry-dev+unsubscribe-/[email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry ---=20 You received this message because you are subscribed to the Google Groups "= farcry-dev" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout. --Apple-Mail=_529FECF1-E51E-4E9D-A32A-F0FC99F18D12 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset= =3Dus-ascii"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode= : space; -webkit-line-break: after-white-space;"><div>Justin,</div><div><br= ></div>Hmm... well, it definitely breaks the way FarCry works. But no= w that I think about it, I like that you can override it in the formtool pr= operty. This will allow me to load different css files for different = scenarios (like a different css file for the sidebar) - this is something I= 've wanted for a long time, but never thought of a good way to handle it. &= nbsp;So it's definitely a good thing. The way it stands now, it might= confuse some people to know that they can't load the custom css file(s) th= e way the RTE normally allows you to.<div><br></div><div>Here's a thought. = Maybe keep it the new way, but make a visible note about it in the Ti= nyMCE config screen with a link to more info (docs) on how to use it.  = ;Thoughts?<div><br></div><div>One other thing that can improve that process= ... I'd still like to be able to set a global one and a FarCry config value= would work perfectly for that. The default could be the one you're a= lready using (and maybe set it to the ftHint in case people want to reset i= t), but allow people to override it. Then they can still override for= certain scenarios using the property tag for those areas where needed. &nb= sp;This way for the majority of cases (basically the body area of most page= s and custom types), people won't have to set it to the same css file each = and every time in the property tag - and more importantly they won't have t= o override dmHTML.cfc for every single project just to do the same thing as= setting a global custom css in a FarCry config. </div><div><br></div= ><div>Thoughts?</div><div><br></div><div>Jeff</div><div><br></div><div>btw,= I've been doing quite a lot with the new TinyMCE 4 configs and there is qu= ite a lot you can do with it for your FC projects. It's very powerful= (once you get past the poor/lacking documentation - I had to crawl through= some of their js to find out a few things you can do). Maybe someday= soon I'll write up a good how-to in the FarCry docs for customizing the co= nfigs for your projects.</div><div><br><div><div>On Apr 6, 2014, at 9:03 PM= , Justin Carter <<a href=3D"mailto:[email protected]">justin.w.c= [email protected]</a>> wrote:</div><br class=3D"Apple-interchange-newline"= ><blockquote type=3D"cite"><div style=3D"font-family: Helvetica; font-size:= 14px; font-style: normal; font-variant: normal; font-weight: normal; lette= r-spacing: normal; line-height: normal; orphans: auto; text-align: start; t= ext-indent: 0px; text-transform: none; white-space: normal; widows: auto; w= ord-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir=3D"ltr">Hmmm, I= don't think I can make this change right now...<div><br></div><div>For a g= lobal content_css value you can extend richtext.cfc and set a default value= for the ftContentCSS attribute, and this will apply to all rich text areas= (this is generally what you want). But you can also override ftConten= tCSS on individual formtool properties in your content types (same goe= s for width and height).</div><div><br></div><div>If I move the global conf= igJS to the bottom, then it will break any formtool properties that have cs= s/width/height specified individually (if they are also present in the glob= al config). So any changes that you want to make "globally" for those 3 pro= perties probably need to be done by extending richtext.cfc, rather than via= the config.<div><br></div><div>To allow them to be defaulted in the config= (rather than extending richtext.cfc), and also overridable in each formtoo= l property, I think we'd need to do some smarter splitting/parsing of the J= S config, or break those particular properties out into separate fields in = the config (probably the better option).</div><div><br></div><div>cheers,</= div><div>Justin</div><div><br><br>On Saturday, April 5, 2014 6:08:03 PM UTC= +11, Jeff Coughlin wrote:<blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204= , 204); border-left-style: solid; padding-left: 1ex;"><div style=3D"word-wr= ap: break-word;"><div>I'm just lazy to do the pull request at the moment (a= nd it's 3am). I'll do it in the morning if you prefer. Otherwis= e the code is below (it's just relocating three lines of code down a few li= nes).</div><div><br></div><div>In core/packages/formtools/<wbr>richtext.cfc= the output of #configJS# should be last. Currently it is being loade= d *before* FarCry's overrides. Instead we should be allowed to overri= de even FarCry's overrides. I spent a couple hours trying to figure o= ut why my custom content_css wasn't loading (yeah, I'm an idiot. A simple "= view html source" finally clued me in that it was in fact loading, but then= FarCry was overriding it with it's own css file). You can either swa= p it yourself or use the code block below (I provided the entire <script= ></script> block for easier reference). If you move the #con= figJS# variable yourself (with it's conditional block), just keep in mind t= hat the comma switches to the front of the variable.</div><div><br></div><d= iv><br></div><div><div><span style=3D"white-space: pre;"> </span><scr= ipt language=3D"javascript" type=3D"text/javascript"></div><div><span st= yle=3D"white-space: pre;"> </span>$j(function() {</div><div><span style= =3D"white-space: pre;"> </span>tinymce.init({</div><div><span style=3D"= white-space: pre;"> </span>selector: '###arguments.fieldname#',</div><d= iv><br></div><div><span style=3D"white-space: pre;"> </span>script_url = : '#application.url.webtop#/<wbr>thirdparty/tiny_mce/tinymce.<wbr>min.js',<= /div><div><br></div><div><span style=3D"white-space: pre;"> </span>farc= ryrelatedtypes: #serializeJSON(aRelatedTypes)#<wbr>,</div><div><span style= =3D"white-space: pre;"> </span>optionsURL: "#getAjaxURL(typename=3D<wbr= >arguments.typename,stObject=3D<wbr>arguments.stObject,stMetadata=3D<wbr>ar= guments.stMetadata,<wbr>fieldname=3Darguments.fieldname,<wbr>combined=3Dfal= se)#&action=3D<wbr>templateoptions",</div><div><span style=3D"white-spa= ce: pre;"> </span>previewURL: "#getAjaxURL(typename=3D<wbr>arguments.ty= pename,stObject=3D<wbr>arguments.stObject,stMetadata=3D<wbr>arguments.stMet= adata,<wbr>fieldname=3Darguments.fieldname,<wbr>combined=3Dfalse)#&acti= on=3D<wbr>templatehtml",</div><div><span style=3D"white-space: pre;"> <= /span>image_list : "#getAjaxURL(typename=3D<wbr>arguments.typename,stObject= =3D<wbr>arguments.stObject,stMetadata=3D<wbr>arguments.stMetadata,<wbr>fiel= dname=3Darguments.fieldname,<wbr>combined=3Dfalse)#&action=3D<wbr>image= options&relatedTypename=3D#<wbr>arguments.stMetadata.<wbr>ftImageListFi= lterTypename#&<wbr>relatedProperty=3D#arguments.<wbr>stMetadata.<wbr>ft= ImageListFilterProperty#",</div><div><span style=3D"white-space: pre;"> = </span>link_list : "#getAjaxURL(typename=3D<wbr>arguments.typename,stObjec= t=3D<wbr>arguments.stObject,stMetadata=3D<wbr>arguments.stMetadata,<wbr>fie= ldname=3Darguments.fieldname,<wbr>combined=3Dfalse)#&action=3D<wbr>link= options&relatedTypename=3D#<wbr>arguments.stMetadata.<wbr>ftLinkListFil= terTypenames#"</div><div><span style=3D"white-space: pre;"> </span><= cfif len(imageUploadField)></div><div><span style=3D"white-space: pre;">= </span>, imageUploadField : #serializeJSON(<wbr>imageUploadField)#</d= iv><div><span style=3D"white-space: pre;"> </span>, imageUploadType : = #serializeJSON(arguments.<wbr>stMetadata.<wbr>ftImageListFilterTypename)#</= div><div><span style=3D"white-space: pre;"> </span></cfif></div><= div><span style=3D"white-space: pre;"> </span><cfif len(arguments.st= Metadata.<wbr>ftWidth)></div><div><span style=3D"white-space: pre;"> = </span>,width : "#arguments.stMetadata.<wbr>ftWidth#"</div><div><span sty= le=3D"white-space: pre;"> </span></cfif></div><div><span style=3D= "white-space: pre;"> </span><cfif len(arguments.stMetadata.<wbr>ftHe= ight)></div><div><span style=3D"white-space: pre;"> </span>,height = : "#arguments.stMetadata.<wbr>ftHeight#"</div><div><span style=3D"white-spa= ce: pre;"> </span></cfif><span style=3D"white-space: pre;"> </spa= n></div><div><span style=3D"white-space: pre;"> </span><cfif len(arg= uments.stMetadata.<wbr>ftContentCSS)></div><div><span style=3D"white-spa= ce: pre;"> </span>,content_css : "#arguments.stMetadata.<wbr>ftContent= CSS#"</div><div><span style=3D"white-space: pre;"> </span></cfif>= <span style=3D"white-space: pre;"> </span></div><div><span style=3D"white= -space: pre;"> </span><cfif len(configJS)></div><div><span style= =3D"white-space: pre;"> </span>,#configJS#</div><div><span style=3D"wh= ite-space: pre;"> </span></cfif></div><div><span style=3D"white-s= pace: pre;"> </span></div><div><span style=3D"white-space: pre;"> <= /span>});</div><div><span style=3D"white-space: pre;"> </span>});</div><= div><span style=3D"white-space: pre;"> </span></script></div><div>= <br></div></div><div><br></div><div><br></div><div><br></div><div>Jeff</div= ><br><div><div>On Apr 5, 2014, at 2:58 AM, Justin Carter <<a target=3D"_= blank" gdf-obfuscated-mailto=3D"cbMyeHL9HxEJ">justin....@</a><a href=3D"htt= p://gmail.com/">gmail.com</a>> wrote:</div><br><blockquote type=3D"cite"= ><p dir=3D"ltr">Yeah which ever is easiest for you, I don't mind copy and p= asting or accepting a pull request :)</p><div class=3D"gmail_quote">On 05/0= 4/2014 5:45 PM, "Jeff Coughlin" <<a target=3D"_blank" gdf-obfuscated-mai= lto=3D"cbMyeHL9HxEJ">je...@</a><a href=3D"http://jeffcoughlin.com/">jeffcou= ghlin.com</a>> wrote:<br type=3D"attribution"><blockquote class=3D"gmail= _quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-= left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex= ;"><div style=3D"word-wrap: break-word;"><div>I'll have to wait until it ha= ppens again. It can sometimes go a hundred saves without a problem. &= nbsp;I'll let you know.</div><div><br></div><div>btw, can I just mention a = bug fix here for a TinyMCE fix (unrelated), or should I submit a pull reque= st? It's just moving three lines of code down a few lines (it's in th= e wrong spot).</div><div><br></div>Jeff</div></blockquote></div></blockquot= e></div></div></blockquote></div></div></div><div><br class=3D"webkit-block= -placeholder"></div>--<span class=3D"Apple-converted-space"> </span><b= r>You received this message cos you are subscribed to "farcry-dev" Google g= roup.<br>To post, email: <a href=3D"mailto:farcry-dev-/[email protected]">far= cry-dev-/[email protected]</a><br>To unsubscribe, email: <a href=3D"mailto:fa= rcry-dev+unsubscribe-/[email protected]">farcry-dev+unsubscribe@googlegroups.= com</a><br>For more options:<span class=3D"Apple-converted-space"> </s= pan><a href=3D"http://groups.google.com/group/farcry-dev">http://groups.goo= gle.com/group/farcry-dev</a><br>--------------------------------<br>Follow = us on Twitter:<span class=3D"Apple-converted-space"> </span><a href=3D= "http://twitter.com/farcry">http://twitter.com/farcry</a><br>---<span class= =3D"Apple-converted-space"> </span><br>You received this message becau= se you are subscribed to the Google Groups "farcry-dev" group.<br>To unsubs= cribe from this group and stop receiving emails from it, send an email to<s= pan class=3D"Apple-converted-space"> </span><a href=3D"mailto:farcry-d= ev+unsubscribe-/[email protected]">farcry-dev+unsubscribe-/[email protected]</a= >.<br>For more options, visit<span class=3D"Apple-converted-space"> </= span><a href=3D"https://groups.google.com/d/optout">https://groups.google.c= om/d/optout</a>.</div></blockquote></div><br></div></div></body></html> <p></p> -- <br /> You received this message cos you are subscribed to "farcry-dev" = Google group.<br /> To post, email: farcry-dev-/[email protected]<br /> To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]<br /> For more options: <a href=3D"http://groups.google.com/group/farcry-dev">htt= p://groups.google.com/group/farcry-dev</a><br /> --------------------------------<br /> Follow us on Twitter: <a href=3D"http://twitter.com/farcry">http://twitter.= com/farcry</a><br /> --- <br /> You received this message because you are subscribed to the Google Groups &= quot;farcry-dev" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:farcry-dev+unsubscribe-/[email protected]">farcry-d= ev+unsubscribe-/[email protected]</a>.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> --Apple-Mail=_529FECF1-E51E-4E9D-A32A-F0FC99F18D12--