xautlx / s2jh

A Java/J2EE development framework for enterprise system based on Struts/Spring/JPA/Hibernate and jquery/bootstrap
GNU Lesser General Public License v3.0
321 stars 242 forks source link

如何使用operations来添加一个操作按钮,点击按钮后加载一个新的jsp页面到右侧新的tab页签中 #59

Closed flanliulf closed 10 years ago

flanliulf commented 10 years ago

job里面有operations的相关定义,但是定义的按钮是confirm提示框,而不是将一个新的jsp页面打开在右侧新的tab中

xautlx commented 10 years ago

为a链接添加 data-toggle="dynamic-tab" 属性即可:

<li><a href="javascript:;" data-toggle="dynamic-tab" data-url="xyz"><i class="fa fa-plus-square"></i> 新增数据</a></li>
flanliulf commented 10 years ago

我这样尝试,报错: operations : function(items) { var $grid = $(this);

        var $resume = $('<li data-position="multi" data-toolbar="show" data-text="show">' +
                '<a class="tab-default" data-toggle="dynamic-tab" href="${base}/concrete/mix-proportion-detail!findByPage">' +
                '添加明细</a></li>');

        items.push($resume);
    }

麻烦把代码稍微写完整一些,谢谢

xautlx commented 10 years ago

请参考开发分支snapshot实现: http://git.oschina.net/xautlx/s2jh/blob/snapshot/common-service/src/main/resources/META-INF/resources/auth/privilege-urls.js, 效果可参考:http://115.29.107.110/s2jh/ 权限管理功能