url.tpl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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: _('url_display_text')
  21. ,name: 'prop_text'
  22. ,value: params['text'] || ''
  23. ,listeners: oc
  24. ,anchor: '100%'
  25. },{
  26. xtype: 'textfield'
  27. ,fieldLabel: _('title')
  28. ,name: 'prop_title'
  29. ,value: params['title'] || ''
  30. ,listeners: oc
  31. ,anchor: '100%'
  32. },{
  33. xtype: 'textfield'
  34. ,fieldLabel: _('class')
  35. ,name: 'prop_class'
  36. ,value: params['class'] || ''
  37. ,listeners: oc
  38. ,anchor: '100%'
  39. },{
  40. xtype: 'textfield'
  41. ,fieldLabel: _('style')
  42. ,name: 'prop_style'
  43. ,value: params['style'] || ''
  44. ,listeners: oc
  45. ,anchor: '100%'
  46. },{
  47. xtype: 'textfield'
  48. ,fieldLabel: _('target')
  49. ,name: 'prop_target'
  50. ,value: params['target'] || ''
  51. ,listeners: oc
  52. ,anchor: '100%'
  53. },{
  54. xtype: 'textfield'
  55. ,fieldLabel: _('attributes')
  56. ,name: 'prop_attrib'
  57. ,value: params['attrib'] || ''
  58. ,listeners: oc
  59. ,anchor: '100%'
  60. }]
  61. ,renderTo: 'tv-wprops-form{/literal}{$tv|default}{literal}'
  62. });
  63. // ]]>
  64. </script>
  65. {/literal}