From 79042a4877f144705d7559f712ee1aa16097d068 Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Fri, 4 Feb 2011 15:57:06 +0000 Subject: [PATCH] (new menubar for Case Open View) first one fix --- gulliver/js/ext/pmos-common.js | 38 ++ workflow/engine/templates/cases/open.js | 676 ++++++++++++++++++++++++ 2 files changed, 714 insertions(+) create mode 100755 workflow/engine/templates/cases/open.js diff --git a/gulliver/js/ext/pmos-common.js b/gulliver/js/ext/pmos-common.js index 7b01f229e..9fd3b4700 100755 --- a/gulliver/js/ext/pmos-common.js +++ b/gulliver/js/ext/pmos-common.js @@ -116,3 +116,41 @@ function _(ID_LABEL) } return trn; } + +var getBrowserInf = function(){ + var aBrowFull = new Array("opera", "msie", "firefox", "opera", "safari"); + var sInfo = navigator.userAgent.toLowerCase(); + var sBrowser = ""; + var screen; + + var wSize = [0, 0]; + if (typeof window.innerWidth != 'undefined'){ + wSize = [ + window.innerWidth, + window.innerHeight + ]; + } else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0){ + wSize = [ + document.documentElement.clientWidth, + document.documentElement.clientHeight + ]; + } else { + wSize = [ + document.getElementsByTagName('body')[0].clientWidth, + document.getElementsByTagName('body')[0].clientHeight + ]; + } + + screen = {width:wSize[0], height:wSize[1]}; + + for (var i = 0; i < aBrowFull.length; i++){ + if ((sBrowser == "") && (sInfo.indexOf(aBrowFull[i]) != -1)){ + sBrowser = aBrowFull[i]; + sVersion = String(parseFloat(sInfo.substr(sInfo.indexOf(aBrowFull[i]) + aBrowFull[i].length + 1))); + return {name:sBrowser, version:sVersion, screen: screen} + } + } + + return {name:'unknow', version:'', screen: screen} +}; +var _BROWSER = getBrowserInf(); \ No newline at end of file diff --git a/workflow/engine/templates/cases/open.js b/workflow/engine/templates/cases/open.js new file mode 100755 index 000000000..4e1c9f693 --- /dev/null +++ b/workflow/engine/templates/cases/open.js @@ -0,0 +1,676 @@ +/*new Ext.KeyMap(document, { + key: Ext.EventObject.F5, + fn: function(keycode, e) { + if (! e.ctrlKey) { + if (Ext.isIE) { + e.browserEvent.keyCode = 8; + } + e.stopEvent(); + updateCasesTree(); + } + else + Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5'); + } +});*/ + +var Actions = {}; +var showCaseNavigatorPanel; +var hideCaseNavigatorPanel; +var informationMenu; +var caseMenuOpen = false; +var menuSelectedTitle = Array(); + +var _ENV_CURRENT_DATE; + + +Ext.onReady(function(){ + Ext.QuickTips.init(); + + showCaseNavigatorPanel = function(steps, information, action) { + + if( caseMenuOpen ) + return false; + else + caseMenuOpen = true; + + //alert(steps+' '+information+' '+action); + + //getting the case Information availables options + Ext.Ajax.request({ + url : 'ajaxListener' , + params : { action : 'getInformationOptions' }, + success: function ( result, request ) { + var data = Ext.util.JSON.decode(result.responseText); + var informationMenu = Ext.getCmp('informationMenu'); + //tb = Ext.getCmp('navPanelNorth').getTopToolbar(); + informationMenu.menu.removeAll(); + for(i=0; i