List Info

Thread: Re: svn commit: r551554 - in /lenya/trunk/src/modules: fckeditor/usecases/insertAsset.jx tinymce/




Re: svn commit: r551554 - in /lenya/trunk/src/modules: fckeditor/usecases/insertAsset.jx tinymce/
country flaguser name
Switzerland
2007-06-28 09:07:04
Hi Richard,

rfrovarpapache.org schrieb:
> Author: rfrovarp
> Date: Thu Jun 28 06:44:26 2007
> New Revision: 551554
> 
> URL: 
http://svn.apache.org/viewvc?view=rev&rev=551554
> Log:
> Apply Proxy fixes for TinyMCE and FCKeditor insertAsset
functionality - updates from r551545

thanks for this!

Maybe we can find a way to use the same code for BXE and
FCKeditor,
maybe by extracting some parts of the file to a separate JX
template?

-- Andreas

> 
> Modified:
>    
lenya/trunk/src/modules/fckeditor/usecases/insertAsset.jx
>    
lenya/trunk/src/modules/tinymce/usecases/insertAsset.jx
> 
> Modified:
lenya/trunk/src/modules/fckeditor/usecases/insertAsset.jx
> URL: http://svn.apache.org/viewvc/leny
a/trunk/src/modules/fckeditor/usecases/insertAsset.jx?view=d
iff&rev=551554&r1=551553&r2=551554
>
============================================================
==================
> ---
lenya/trunk/src/modules/fckeditor/usecases/insertAsset.jx
(original)
> +++
lenya/trunk/src/modules/fckeditor/usecases/insertAsset.jx
Thu Jun 28 06:44:26 2007
>  -48,15 +48,13 
>                <th style="background:
none;"><i18n:text>Dimension (w x
h)</i18n:text></th>
>                <th style="background:
none;"><i18n:text>Creation
Date</i18n:text></th>
>              </tr>
> +            <jx:set var="asset2proxyUrl"
value="${usecase.getParameter('asset2proxyUrl')}"/
>
>              <jx:forEach var="asset"
items="${usecase.getParameter('assets')}">
> -              <jx:set var="originalUrl"
value="${asset.getCanonicalWebappURL()}"/>
> -              <jx:set var="lastDotIndex"
value="${originalUrl.lastIndexOf('.')}"/>
> -              <jx:set var="extension"
value="${asset.getMetaData('http://
apache.org/lenya/metadata/document/1.0').getFirstValue('
extension')}"/>
> -              <jx:set var="url"
value="${originalUrl.substring(0,
lastDotIndex).concat('.').concat(extension)}"/>
> +              <jx:set var="url"
value="${asset2proxyUrl.get(asset)}"/>
>                <tr>
>                  <td>
>                    <input type="radio"
name="asset" value="${asset.getPath()}"

> -                   
onClick="javascript:insertData('$',
'${asset.getMetaData('http://purl.org/dc/e
lements/1.1/').getFirstValue('title')}',
'${asset.getMimeType()}', '${asset.getContentLength() /
1000}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('height
')}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('width'
)}')"/> 
> +                    onClick="insertData('$',
'${asset.getMetaData('http://purl.org/dc/e
lements/1.1/').getFirstValue('title')}',
'${asset.getMimeType()}', '${asset.getContentLength() /
1000}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('height
')}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('width'
)}')"/> 
>                  </td>
>                  <td><jx:out
value="${asset.getPath()}"/></td>
>                  <td>
> 
> Modified:
lenya/trunk/src/modules/tinymce/usecases/insertAsset.jx
> URL: http://svn.apache.org/viewvc/lenya/
trunk/src/modules/tinymce/usecases/insertAsset.jx?view=diff&
amp;rev=551554&r1=551553&r2=551554
>
============================================================
==================
> ---
lenya/trunk/src/modules/tinymce/usecases/insertAsset.jx
(original)
> +++
lenya/trunk/src/modules/tinymce/usecases/insertAsset.jx Thu
Jun 28 06:44:26 2007
>  -48,15 +48,13 
>                <th style="background:
none;"><i18n:text>Dimension (w x
h)</i18n:text></th>
>                <th style="background:
none;"><i18n:text>Creation
Date</i18n:text></th>
>              </tr>
> +           <jx:set var="asset2proxyUrl"
value="${usecase.getParameter('asset2proxyUrl')}"/
>
>              <jx:forEach var="asset"
items="${usecase.getParameter('assets')}">
> -              <jx:set var="originalUrl"
value="${asset.getCanonicalWebappURL()}"/>
> -              <jx:set var="lastDotIndex"
value="${originalUrl.lastIndexOf('.')}"/>
> -              <jx:set var="extension"
value="${asset.getMetaData('http://
apache.org/lenya/metadata/document/1.0').getFirstValue('
extension')}"/>
> -              <jx:set var="url"
value="${originalUrl.substring(0,
lastDotIndex).concat('.').concat(extension)}"/>
> +              <jx:set var="url"
value="${asset2proxyUrl.get(asset)}"/>
>                <tr>
>                  <td>
>                    <input type="radio"
name="asset" value="${asset.getPath()}"

> -                   
onClick="javascript:insertData('$',
'${asset.getMetaData('http://purl.org/dc/e
lements/1.1/').getFirstValue('title')}',
'${asset.getMimeType()}', '${asset.getContentLength() /
1000}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('height
')}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('width'
)}')"/> 
> +                    onClick="insertData('$',
'${asset.getMetaData('http://purl.org/dc/e
lements/1.1/').getFirstValue('title')}',
'${asset.getMimeType()}', '${asset.getContentLength() /
1000}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('height
')}', '${asset.getMetaData('http://apa
che.org/lenya/metadata/media/1.0').getFirstValue('width'
)}')"/> 
>                  </td>
>                  <td><jx:out
value="${asset.getPath()}"/></td>
>                  <td>


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: svn commit: r551554 - in /lenya/trunk/src/modules: fckeditor/usecases/insertAsset.jx tinymce/u
country flaguser name
United States
2007-06-28 13:00:48
Andreas Hartmann wrote:
> Hi Richard,
>
> rfrovarpapache.org schrieb:
>   
>> Author: rfrovarp
>> Date: Thu Jun 28 06:44:26 2007
>> New Revision: 551554
>>
>> URL: 
http://svn.apache.org/viewvc?view=rev&rev=551554
>> Log:
>> Apply Proxy fixes for TinyMCE and FCKeditor
insertAsset functionality - updates from r551545
>>     
>
> thanks for this!
>
> Maybe we can find a way to use the same code for BXE
and FCKeditor,
> maybe by extracting some parts of the file to a
separate JX template?
>
> -- Andreas
>   

Yeah, this should be done. All three are identical except
for three 
lines that contain the editor's name. I think I see how it
can be done 
relatively easily. Is there a way to get the usecase module
inside of a 
jx template? I could do a substring on usecase.getName. Just
looking to 
see if there is a shortcut and I don't see anything grepping
through the 
code or looking at the Usecase interface. Or maybe that is
something to 
be added to the Usecase interface?

Richard

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: svn commit: r551554 - in /lenya/trunk/src/modules: fckeditor/usecases/insertAsset.jx tinymce/use
country flaguser name
United States
2007-06-29 03:04:06

Richard Frovarp wrote:
>>> Maybe we can find a way to use the same code
for BXE and FCKeditor,
>>> maybe by extracting some parts of the file to a
separate JX template?
>>>
>>> -- Andreas
>>>   
>>
>> Yeah, this should be done. All three are identical
except for three 
>> lines that contain the editor's name. I think I see
how it can be done 
>> relatively easily. Is there a way to get the
usecase module inside of 
>> a jx template? I could do a substring on
usecase.getName. Just looking 
>> to see if there is a shortcut and I don't see
anything grepping 
>> through the code or looking at the Usecase
interface. Or maybe that is 
>> something to be added to the Usecase interface?
>>
>> Richard
>
>I've figured out how to do this. The question is do we
want 
>usecase.getModule? Otherwise what is needed is this:
>
>usecase.getName().substring(0,usecase.getName().indexOf(
'.'))

Why don't we just pass a parameter to the usecase?

<component-instance name="bxe.edit">
  ...
  <parameter name="editor"
value="bxe"/>
  ...
</component-instance>


<jx:out
value="${usecase.getParameter('editor')}"/>


-- Andreas



-- 
View this message in context: http://www.nabble.com/Re%3A-svn-commit%3A-r551554---in--l
enya-trunk-src-modules%3A---fckeditor-usecases-insertAsset.j
x-tinymce-usecases-insertAsset.jx-tf3994822.html#a11356616
Sent from the Lenya - Dev mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: svn commit: r551554 - in /lenya/trunk/src/modules: fckeditor/usecases/insertAsset.jx tinymce/u
country flaguser name
United States
2007-06-29 11:28:15
nobby wrote:
> Richard Frovarp wrote:
>   
>>>> Maybe we can find a way to use the same
code for BXE and FCKeditor,
>>>> maybe by extracting some parts of the file
to a separate JX template?
>>>>
>>>> -- Andreas
>>>>   
>>>>         
>>> Yeah, this should be done. All three are
identical except for three 
>>> lines that contain the editor's name. I think I
see how it can be done 
>>> relatively easily. Is there a way to get the
usecase module inside of 
>>> a jx template? I could do a substring on
usecase.getName. Just looking 
>>> to see if there is a shortcut and I don't see
anything grepping 
>>> through the code or looking at the Usecase
interface. Or maybe that is 
>>> something to be added to the Usecase
interface?
>>>
>>> Richard
>>>       
>> I've figured out how to do this. The question is do
we want 
>> usecase.getModule? Otherwise what is needed is
this:
>>
>>
usecase.getName().substring(0,usecase.getName().indexOf('.')
)
>>     
>
> Why don't we just pass a parameter to the usecase?
>
> <component-instance name="bxe.edit">
>   ...
>   <parameter name="editor"
value="bxe"/>
>   ...
> </component-instance>
>
>
> <jx:out
value="${usecase.getParameter('editor')}"/>
>
>
> -- Andreas
>
>   
Didn't think of that. That is what I've done.

Thanks,
Richard

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )