browse.zentaobiz.html.hook.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <div id="mainMenu" class="clearfix hide">
  2. <div class="btn-toolbar pull-right">
  3. <?php common::printLink('screen', 'create', "dimensionID=$dimension", "<i class='icon icon-plus'></i> " . $lang->screen->create, '', "class='btn btn-primary iframe' data-width='600'" , '', true);?>
  4. </div>
  5. </div>
  6. <div id="dropdown" class='hide'>
  7. <?php if(common::hasPriv('screen', 'edit') || common::hasPriv('screen', 'design') || common::hasPriv('screen', 'delete')):?>
  8. <div class="actions" style="visibility: visible;">
  9. <div class="dropdown">
  10. <a href="javascript:;" data-toggle="context-dropdown" class="btn btn-link"><i class="icon icon-ellipsis-v"></i></a>
  11. <ul class="dropdown-menu">
  12. <li>
  13. <?php common::printLink('screen', 'design', 'screenID=%s', "<i class='icon icon-design'></i>" . $lang->screen->design, '', "", '');?>
  14. <?php common::printLink('screen', 'edit', 'screenID=%s', "<i class='icon icon-edit'></i>" . $lang->screen->edit , '', "class='iframe' data-width='600'", '', true);?>
  15. <?php common::printLink('screen', 'delete', 'screenID=%s', "<i class='icon icon-trash'></i>" . $lang->screen->delete, '', "target='hiddenwin'");?>
  16. </li>
  17. </ul>
  18. </div>
  19. </div>
  20. <?php endif;?>
  21. </div>
  22. <div id="draftLabel" class='hide'>
  23. <label class='label label-badge label-draft'><?php echo $lang->screen->draft;?></label>
  24. </div>
  25. <script>
  26. $('#mainContent').before($('#mainMenu').prop('outerHTML'));
  27. $('#main #mainMenu').show();
  28. $('.screen-title').each(function()
  29. {
  30. $(this).prop('outerHTML', "<div class='bottom-top'>" + $(this).prop('outerHTML') + '</div>');
  31. })
  32. $('.screen .bottom[data-status=draft] .screen-title').after($('#draftLabel').html());
  33. $('.screen .bottom[data-builtin=0]').prepend($('#dropdown').html());
  34. $('.screen .dropdown a').each(function()
  35. {
  36. id = $(this).closest('.col-md-3').data('id');
  37. $(this).attr('href', $(this).attr('href').replace('%s', id));
  38. })
  39. /* Hide contextmenu when page scroll */
  40. $(window).on('scroll', function()
  41. {
  42. $.zui.ContextMenu.hide();
  43. });
  44. </script>
  45. <style>
  46. .screen .bottom {height: 80px;}
  47. .screen .bottom .actions {position: absolute; right: 5px; top: 185px;}
  48. .screen .bottom .bottom-top {display: flex; margin-right: 20px;}
  49. .screen .bottom .label-draft {background: #8166ee1f !important; color: #8166ee !important; min-width: 40px; margin-left: 12px;}
  50. </style>