From: <cos...@us...> - 2011-01-21 00:56:13
|
Revision: 5024 http://jaffa.svn.sourceforge.net/jaffa/?rev=5024&view=rev Author: cosbor11 Date: 2011-01-21 00:56:07 +0000 (Fri, 21 Jan 2011) Log Message: ----------- bug 16671 The security was implemented wrong, I changed it to enable/disable the buttons based on the service response rather than the business-function.xml/roles.xml Modified Paths: -------------- branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/DetailPanel.js branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/main.jsp Modified: branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/DetailPanel.js =================================================================== --- branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/DetailPanel.js 2011-01-21 00:22:46 UTC (rev 5023) +++ branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/DetailPanel.js 2011-01-21 00:56:07 UTC (rev 5024) @@ -1,9 +1,29 @@ Jaffa.Transaction.DetailPanel = { xtype: 'form', id: 'transactionDetailPanel', + metaClass: 'TransactionGraph', title: Labels.get('label.Jaffa.Transaction.TransactionMaintenance.DetailTab'), //Details - plugins:[{ptype: 'panelloadsave'}], - metaClass: 'TransactionGraph', + plugins:[ + { + ptype: 'panelloadsave' + }, + { + init: function(p) { + p.getTopToolbar().getComponent('deleteBtn').scope = p; + p.getTopToolbar().getComponent('retryBtn').scope = p; + Jaffa.Transaction.controller.on('load', function(controller) { + (new Jaffa.data.DWRProxy({ + query: Jaffa_Transaction_TransactionService.hasAdminAccess + })).load(controller.model.itemAt(0).type, null, function(response) { + var delBtn = this.getTopToolbar().getComponent('deleteBtn'); + var retBtn = this.getTopToolbar().getComponent('retryBtn'); + delBtn.setDisabled(!response); + retBtn.setDisabled(!response); + },p); + },p); + } + } + ], tbar: [ { iconCls: 'delete', Modified: branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/main.jsp =================================================================== --- branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/main.jsp 2011-01-21 00:22:46 UTC (rev 5023) +++ branches/JAFFA_5_7_RELEASE/JaffaConsole/source/html/jaffa/transaction/transactionmaintenance/main.jsp 2011-01-21 00:56:07 UTC (rev 5024) @@ -59,8 +59,7 @@ }; var security = { - hasHelpDataDicDetails: <%= SecurityManager.checkFunctionAccess("Help.DataDic.Details") %>, - hasTransactionMaintenance: <%= SecurityManager.checkFunctionAccess("Jaffa.Transaction.Transaction.Maintenance") %> + hasHelpDataDicDetails: <%= SecurityManager.checkFunctionAccess("Help.DataDic.Details") %> }; <jsp:include page="/js/extjs/jaffa/metadata/classMetaData.jsp" flush="true"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |