x.view.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. $(function()
  2. {
  3. $('.main-actions-holder').css('height', '0px');
  4. var xuanAction = "<div class='xuancard-actions fixed'>";
  5. $('.main-col div.main-actions .btn-toolbar a').each(function(){
  6. var $that = $(this);
  7. if($that.attr('id') == 'back') return true;
  8. var href = $that.attr('href');
  9. var title = $that.attr('title') == undefined ? '' : " title='" + $that.attr('title') + "'";
  10. var btnClass = " class='" + $that.attr('class') + "'";
  11. btnClass = btnClass.replace(/results/, '');
  12. btnClass = btnClass.replace(/runCase/, '');
  13. var action = $that.html();
  14. if(href.indexOf('create') >= 0 || href.indexOf('delete') >= 0) return true;
  15. if($that.hasClass('iframe'))
  16. {
  17. url = href;
  18. target = '';
  19. }
  20. else
  21. {
  22. url = 'xxc:openUrlInDialog/' + encodeURIComponent(sysurl + href);
  23. target = " target='_blank'";
  24. }
  25. xuanAction += "<a href='" + url + "'" + title + target + btnClass + '>' + action + "</a>";
  26. });
  27. xuanAction += '</div>';
  28. $('body').append(xuanAction);
  29. $('.xuancard-actions a.iframe').modalTrigger();
  30. })