RoadFlow2.1 临时演示

roadui.textarea.js 842B

12345678910111213141516171819202122232425
  1. //Text文本框
  2. ;RoadUI.Textarea = function ()
  3. {
  4. var instance = this;
  5. this.init = function ($texts)
  6. {
  7. initElement($texts, "text");
  8. $texts.each(function ()
  9. {
  10. var model = $(this).attr("model");
  11. var id = $(this).attr('id');
  12. var name = $(this).attr('name');
  13. var validate = $(this).attr('validate');
  14. var value = $(this).text();
  15. if ("html" == model)
  16. {
  17. var html = '<script isflow="1" type1="flow_html" id="' + id + '" name="' + name +
  18. '" type="text/plain" style="' + $(this).attr('style') + '" ' + (validate ? 'validate="' + validate + '"' : '') + '>' + value + '</script>';
  19. $(this).after(html).remove();
  20. UE.getEditor(id);
  21. }
  22. });
  23. };
  24. }