小号工作 发表于 2013-4-2 16:57:25

关于V3测试版,用户不能选角色,简单修正..

本帖最后由 小号工作 于 2013-4-8 10:58 编辑

说明,这个问题导致大家想要浏览基本功能出现了障碍,但是论坛提供的在线演示版里是好的,也就是说新版V3发布后,没有这个问题,我看到大家都在改jar包,想要了解结构专门修改jar包的略过,仅想跳过这个BUG正常选角色看功能的,我这有个简单的jsp页面调整方法:
找到 webpage/system/user/user.jsp 页面
在角色choose标签那里 换上这个代码:
<a href="#" class="easyui-linkbutton" plain="true" icon="icon-choose">选择</a>
<a href="#" class="easyui-linkbutton" plain="true" icon="icon-redo">清空</a>

并且增加js方法:
   <script type="text/javascript">
             function openDialog(){
                     $.dialog({content: 'url:userController.do?roles',zIndex: 9999,title: '角色列表',lock : true,width :400,height :350,left :'85%',top :'65%',opacity : 0.4,button : [ {name : '确认',callback : function() {iframe = this.iframe.contentWindow;var roleName=iframe.getroleListSelections('roleName');      $('#roleName').val(roleName);var id =iframe.getroleListSelections('id');if (id!== undefined &&id!=""){$('#roleid').val(id);}},focus : true}, {name : '取消',callback : function() {}} ]});
      }

             function clearAll(){$('#roleName').val("");$('#roleid').val("");}
   </script>

看到有朋友还是不出来,我不知道为什么,我把我的user.jsp页面发上来,然后大家随意折腾吧




lyric 发表于 2013-4-4 14:34:06

好吧,试试看

无可 发表于 2013-4-7 10:51:57

试 了,好像不行

小号工作 发表于 2013-4-7 10:57:47

本帖最后由 小号工作 于 2013-4-7 11:00 编辑

无可 发表于 2013-4-7 10:51 static/image/common/back.gif
试 了,好像不行
不行就是你没弄对吧,我在群里还发过实现后的截图


孤风无痕 发表于 2013-4-7 22:01:24

就替换下代码,加上js就可以了吗?我的也没反应啊

liqi_888 发表于 2013-4-8 13:22:27

我的解决办法是去演示系统里查看源文件然后用<a href="#" class="easyui-linkbutton" plain="true" icon="icon-choose" onClick="choose()">选择</a><a href="#" class="easyui-linkbutton" plain="true" icon="icon-redo" onClick="clearAll();">清空</a><script type="text/javascript">function choose(){$.dialog({content: 'url:userController.do?roles',zIndex: 1997,title: '角色列表',lock : true,width :400,height :350,left :'85%',top :'65%',opacity : 0.4,button : [ {name : '确认',callback : function() {iframe = this.iframe.contentWindow;var roleName=iframe.getroleListSelections('roleName');        $('#roleName').val(roleName);var id =iframe.getroleListSelections('id');if (id!== undefined &&id!=""){$('#roleid').val(id);}},focus : true}, {name : '取消',callback : function() {}} ]});}function clearAll(){$('#roleName').val("");$('#roleid').val("");}</script>替换
<t:choose hiddenName="roleid" hiddenid="id" url="userController.do?roles" name="roleList" icon="icon-choose" title="角色列表" textname="roleName" isclear="true"></t:choose>
      就OK了

小号工作 发表于 2013-4-8 14:24:53

liqi_888 发表于 2013-4-8 13:22 static/image/common/back.gif
我的解决办法是去演示系统里查看源文件然后用选择清空function choose(){$.dialog({content: 'url:userCont ...

其实就是js方法有点问题,演示版是没有这个问题的,所以我觉得这个demo版能看看功能了解一下架构足矣,不需要去大改什么,先等正式版出来,然后如果有问题咱在试着真正的修正
页: [1]
查看完整版本: 关于V3测试版,用户不能选角色,简单修正..