richtext.tpl 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <div id="tv-wprops-form{$tv|default}"></div>
  2. {literal}
  3. <script type="text/javascript">
  4. // <![CDATA[
  5. var params = {
  6. {/literal}{foreach from=$params key=k item=v name='p'}
  7. '{$k}': '{$v|escape:"javascript"}'{if NOT $smarty.foreach.p.last},{/if}
  8. {/foreach}{literal}
  9. };
  10. var oc = {'change':{fn:function(){Ext.getCmp('modx-panel-tv').markDirty();},scope:this}};
  11. MODx.load({
  12. xtype: 'panel'
  13. ,layout: 'form'
  14. ,autoHeight: true
  15. ,labelAlign: 'top'
  16. ,cls: 'form-with-labels'
  17. ,border: false
  18. ,items: [{
  19. xtype: 'textfield'
  20. ,fieldLabel: _('width')
  21. ,name: 'prop_w'
  22. ,id: 'prop_w{/literal}{$tv|default}{literal}'
  23. ,value: params['w'] || '100%'
  24. ,listeners: oc
  25. ,anchor: '100%'
  26. },{
  27. xtype: 'textfield'
  28. ,fieldLabel: _('height')
  29. ,name: 'prop_h'
  30. ,id: 'prop_h{/literal}{$tv|default}{literal}'
  31. ,value: params['h'] || '300px'
  32. ,listeners: oc
  33. ,anchor: '100%'
  34. }]
  35. ,renderTo: 'tv-wprops-form{/literal}{$tv|default}{literal}'
  36. });
  37. // ]]>
  38. </script>
  39. {/literal}