Re: FarCry 7 bugs
Justin Carter <[email protected]> Sun, 6 Apr 2014 18:03:11 -0700 (PDT)
| Newsgroups | gmane.comp.cms.farcry.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_1961_555497.1396832591192
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hmmm, I don't think I can make this change right now...
For a global content_css value you can extend richtext.cfc and set a=20
default value for the ftContentCSS attribute, and this will apply to all=20
rich text areas (this is generally what you want). But you can also=20
override ftContentCSS on individual formtool properties in your content=20
types (same goes for width and height).
If I move the global configJS to the bottom, then it will break any=20
formtool properties that have css/width/height specified individually (if=
=20
they are also present in the global config). So any changes that you want=
=20
to make "globally" for those 3 properties probably need to be done by=20
extending richtext.cfc, rather than via the config.
To allow them to be defaulted in the config (rather than extending=20
richtext.cfc), and also overridable in each formtool property, I think we'd=
=20
need to do some smarter splitting/parsing of the JS config, or break those=
=20
particular properties out into separate fields in the config (probably the=
=20
better option).
cheers,
Justin
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=
=20
> do it in the morning if you prefer. Otherwise the code is below (it's ju=
st=20
> relocating three lines of code down a few lines).
>
> In core/packages/formtools/richtext.cfc the output of #configJS# should b=
e=20
> last. Currently it is being loaded *before* FarCry's overrides. Instead=
=20
> we should be allowed to override even FarCry's overrides. I spent a coup=
le=20
> hours trying to figure out why my custom content_css wasn't loading (yeah=
,=20
> I'm an idiot. A simple "view html source" finally clued me in that it was=
=20
> in fact loading, but then FarCry was overriding it with it's own css file=
).=20
> You can either swap it yourself or use the code block below (I provided=
=20
> the entire <script></script> block for easier reference). If you move th=
e=20
> #configJS# variable yourself (with it's conditional block), just keep in=
=20
> mind that the comma switches to the front of the variable.
>
>
> <script language=3D"javascript" type=3D"text/javascript">
> $j(function() {
> tinymce.init({
> selector: '###arguments.fieldname#',
>
> script_url : '#application.url.webtop#/thirdparty/tiny_mce/tinymce.min.js=
',
>
> farcryrelatedtypes: #serializeJSON(aRelatedTypes)#,
> optionsURL:=20
> "#getAjaxURL(typename=3Darguments.typename,stObject=3Darguments.stObject,=
stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fieldname,combined=
=3Dfalse)#&action=3Dtemplateoptions",
> previewURL:=20
> "#getAjaxURL(typename=3Darguments.typename,stObject=3Darguments.stObject,=
stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fieldname,combined=
=3Dfalse)#&action=3Dtemplatehtml",
> image_list :=20
> "#getAjaxURL(typename=3Darguments.typename,stObject=3Darguments.stObject,=
stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fieldname,combined=
=3Dfalse)#&action=3Dimageoptions&relatedTypename=3D#arguments.stMetadata.ft=
ImageListFilterTypename#&relatedProperty=3D#arguments.stMetadata.ftImageLis=
tFilterProperty#",
> link_list :=20
> "#getAjaxURL(typename=3Darguments.typename,stObject=3Darguments.stObject,=
stMetadata=3Darguments.stMetadata,fieldname=3Darguments.fieldname,combined=
=3Dfalse)#&action=3Dlinkoptions&relatedTypename=3D#arguments.stMetadata.ftL=
inkListFilterTypenames#"
> <cfif len(imageUploadField)>
> , imageUploadField : #serializeJSON(imageUploadField)#
> , imageUploadType :=20
> #serializeJSON(arguments.stMetadata.ftImageListFilterTypename)#
> </cfif>
> <cfif len(arguments.stMetadata.ftWidth)>
> ,width : "#arguments.stMetadata.ftWidth#"
> </cfif>
> <cfif len(arguments.stMetadata.ftHeight)>
> ,height : "#arguments.stMetadata.ftHeight#"
> </cfif>=20
> <cfif len(arguments.stMetadata.ftContentCSS)>
> ,content_css : "#arguments.stMetadata.ftContentCSS#"
> </cfif>=20
> <cfif len(configJS)>
> ,#configJS#
> </cfif>
> });
> });
> </script>
>
>
>
>
> Jeff
>
> On Apr 5, 2014, at 2:58 AM, Justin Carter <[email protected]<javascrip=
t:>>=20
> wrote:
>
> Yeah which ever is easiest for you, I don't mind copy and pasting or=20
> accepting a pull request :)
> On 05/04/2014 5:45 PM, "Jeff Coughlin" <[email protected]<javascript=
:>>=20
> wrote:
>
>> I'll have to wait until it happens again. It can sometimes go a hundred=
=20
>> saves without a problem. I'll let you know.
>>
>> btw, can I just mention a bug fix here for a TinyMCE fix (unrelated), or=
=20
>> should I submit a pull request? It's just moving three lines of code do=
wn=20
>> a few lines (it's in the wrong spot).
>>
>> Jeff
>>
>
--=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.
------=_Part_1961_555497.1396832591192
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hmmm, I don't think I can make this change right now...<di=
v><br></div><div>For a global content_css value you can extend richtext.cfc=
and set a default value for the ftContentCSS attribute, and this will appl=
y to all rich text areas (this is generally what you want). But you can als=
o override ftContentCSS on individual formtool properties in your=
content types (same goes for width and height).</div><div><br></div><div>I=
f I move the global configJS to the bottom, then it will break any formtool=
properties that have css/width/height specified individually (if they are =
also present in the global config). So any changes that you want to make "g=
lobally" for those 3 properties probably need to be done by extending richt=
ext.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 ove=
rridable in each formtool property, I think we'd need to do some smarter sp=
litting/parsing of the JS 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, Apri=
l 5, 2014 6:08:03 PM UTC+11, Jeff Coughlin wrote:<blockquote class=3D"gmail=
_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;p=
adding-left: 1ex;"><div style=3D"word-wrap:break-word"><div>I'm just lazy t=
o 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 reloca=
ting three lines of code down a few lines).</div><div><br></div><div>In cor=
e/packages/formtools/<wbr>richtext.cfc the output of #configJS# should be l=
ast. Currently it is being loaded *before* FarCry's overrides. =
Instead we should be allowed to override even FarCry's overrides. I s=
pent a couple hours trying to figure out why my custom content_css wasn't l=
oading (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 o=
wn css file). You can either swap it yourself or use the code block b=
elow (I provided the entire <script></script> block for easier =
reference). If you move the #configJS# variable yourself (with it's c=
onditional block), just keep in mind that the comma switches to the front o=
f the variable.</div><div><br></div><div><br></div><div><div><div><span sty=
le=3D"white-space:pre"> </span><script language=3D"javascript" type=
=3D"text/javascript"></div><div><span style=3D"white-space:pre"> </sp=
an>$j(function() {</div><div><span style=3D"white-space:pre"> </span>ti=
nymce.init({</div><div><span style=3D"white-space:pre"> </span>selector=
: '###arguments.fieldname#',</div><div><br></div><div><span style=3D"white-=
space:pre"> </span>script_url : '#application.url.webtop#/<wbr>thirdpar=
ty/tiny_mce/tinymce.<wbr>min.js',</div><div><br></div><div><span style=3D"w=
hite-space:pre"> </span>farcryrelatedtypes: #serializeJSON(aRelatedType=
s)#<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>arguments.stMetadata,<wbr>fieldname=3Darguments.=
fieldname,<wbr>combined=3Dfalse)#&action=3D<wbr>templateoptions",</div>=
<div><span style=3D"white-space:pre"> </span>previewURL: "#getAjaxURL(t=
ypename=3D<wbr>arguments.typename,stObject=3D<wbr>arguments.stObject,stMeta=
data=3D<wbr>arguments.stMetadata,<wbr>fieldname=3Darguments.fieldname,<wbr>=
combined=3Dfalse)#&action=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>arg=
uments.stMetadata,<wbr>fieldname=3Darguments.fieldname,<wbr>combined=3Dfals=
e)#&action=3D<wbr>imageoptions&relatedTypename=3D#<wbr>arguments.st=
Metadata.<wbr>ftImageListFilterTypename#&<wbr>relatedProperty=3D#argume=
nts.<wbr>stMetadata.<wbr>ftImageListFilterProperty#",</div><div><span style=
=3D"white-space:pre"> </span>link_list : "#getAjaxURL(typename=3D<wbr>a=
rguments.typename,stObject=3D<wbr>arguments.stObject,stMetadata=3D<wbr>argu=
ments.stMetadata,<wbr>fieldname=3Darguments.fieldname,<wbr>combined=3Dfalse=
)#&action=3D<wbr>linkoptions&relatedTypename=3D#<wbr>arguments.stMe=
tadata.<wbr>ftLinkListFilterTypenames#"</div><div><span style=3D"white-spac=
e:pre"> </span><cfif len(imageUploadField)></div><div><span style=
=3D"white-space:pre"> </span>, imageUploadField : #serializeJSON(<wbr>=
imageUploadField)#</div><div><span style=3D"white-space:pre"> </span>,=
imageUploadType : #serializeJSON(arguments.<wbr>stMetadata.<wbr>ftImageLis=
tFilterTypename)#</div><div><span style=3D"white-space:pre"> </span><=
;/cfif></div><div><span style=3D"white-space:pre"> </span><cfif l=
en(arguments.stMetadata.<wbr>ftWidth)></div><div><span style=3D"white-sp=
ace:pre"> </span>,width : "#arguments.stMetadata.<wbr>ftWidth#"</div><=
div><span style=3D"white-space:pre"> </span></cfif></div><div><sp=
an style=3D"white-space:pre"> </span><cfif len(arguments.stMetadata.=
<wbr>ftHeight)></div><div><span style=3D"white-space:pre"> </span>,=
height : "#arguments.stMetadata.<wbr>ftHeight#"</div><div><span style=3D"wh=
ite-space:pre"> </span></cfif><span style=3D"white-space:pre"> </=
span></div><div><span style=3D"white-space:pre"> </span><cfif len(ar=
guments.stMetadata.<wbr>ftContentCSS)></div><div><span style=3D"white-sp=
ace:pre"> </span>,content_css : "#arguments.stMetadata.<wbr>ftContentC=
SS#"</div><div><span style=3D"white-space:pre"> </span></cfif><sp=
an style=3D"white-space:pre"> </span></div><div><span style=3D"white-spac=
e:pre"> </span><cfif len(configJS)></div><div><span style=3D"whit=
e-space:pre"> </span>,#configJS#</div><div><span style=3D"white-space:=
pre"> </span></cfif></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>});</div><div><span style=3D=
"white-space:pre"> </span></script></div><div><br></div></div></di=
v><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 href=3D"java=
script:" target=3D"_blank" gdf-obfuscated-mailto=3D"cbMyeHL9HxEJ" onmousedo=
wn=3D"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'javas=
cript:';return true;">[email protected]</a>> wrote:</div><br><blockqu=
ote type=3D"cite"><p dir=3D"ltr">Yeah which ever is easiest for you, I don'=
t mind copy and pasting or accepting a pull request :)</p>
<div class=3D"gmail_quote">On 05/04/2014 5:45 PM, "Jeff Coughlin" <<a hr=
ef=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"cbMyeHL9HxEJ"=
onmousedown=3D"this.href=3D'javascript:';return true;" onclick=3D"this.hre=
f=3D'javascript:';return true;">[email protected]</a>> wrote:<br ty=
pe=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style=3D"word-wrap:break-word"><div>I'll have to wait until it happens=
again. It can sometimes go a hundred saves without a problem. =
I'll let you know.</div><div><br></div><div>btw, can I just mention a bug f=
ix here for a TinyMCE fix (unrelated), or should I submit a pull request? &=
nbsp;It's just moving three lines of code down a few lines (it's in the wro=
ng spot).</div>
<div><br></div>Jeff</div></blockquote></div></blockquote></div></div></bloc=
kquote></div></div></div>
<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 />
------=_Part_1961_555497.1396832591192--