#set ($demand_table_item_type = $CommonFunctions.displayTermFromResourceBundle($currentUserId,"Demand","demandtable.itemType")) #set ($demand_table_item_name = $CommonFunctions.displayTermFromResourceBundle($currentUserId,"Demand","demandtable.itemName")) #set ($demand_table_artifact_summary = $CommonFunctions.displayTermFromResourceBundle($currentUserId,"Demand","demandtable.itemArtifactSummary")) #set ($demand_table_item_description = $CommonFunctions.displayTermFromResourceBundle($currentUserId,"Demand","demandtable.item.description")) #set ($save_button = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Demand", "demandtable.save")) #set ($cancel_button = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Demand", "demandtable.cancel")) #set ($project_notset = $CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Demand", "demand.notset")) var projectDialog = { demandId : null, artifactId : null, name: null, description: null, typeId: null, typeName: null, projectId: null, projectName: null, projectTypeId: null, init : function(){ Ext.QuickTips.init(); projectDialog.projectTypeComboDS = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: 'ajax2/Gemini?action=project.web.ajax.GetProjectTypeAction' }), reader: new Ext.data.JsonReader( {}, [ {name: 'projectTypeId'}, {name: 'projectType'} ]) }); //For CR# 2748: add 'Not Set' as a type option and display only not set when users don't have the policy to view type values var notset_record= Ext.data.Record.create([ {name: 'projectTypeId'}, {name: 'projectType'} ]); var NOT_SET = new notset_record({ projectTypeId: '_NOTSET_', projectType: '$project_notset' }); projectDialog.projectTypeComboDS.load({ callback: function() { projectDialog.projectTypeComboDS.insert(0, NOT_SET); } }); projectDialog.projectTypeCombo = new Ext.form.ComboBox({ hiddenName:'projectType', hiddenId:'projectTypeId', store: projectDialog.projectTypeComboDS, fieldLabel : '$demand_table_item_type', valueField: 'projectTypeId', displayField: 'projectType', typeAhead: true, mode: 'local', listClass: 'x-combo-list-small', triggerAction: 'all', editable: false, selectOnFocus: true, grow: false, resizable: false, forceSelection : true, allowBlank: false }); projectDialog.projectNameField = new Ext.form.TextField({ xtype:'textfield', id: 'projectNameId', fieldLabel: '$demand_table_item_name', name: 'projectName', //maxLength: $DemandMetaInfo.getColumnWidth("Name"), //TODO implement this width: 4, allowBlank: false }); projectDialog.descriptionField = new Ext.form.HtmlEditor({ id:'projectDescId', name: 'projectDesc', fieldLabel: '$demand_table_item_description', hideLabel: false, enableFontSize: false, enableLists: false, enableSourceEdit: false, cleanHtml: function (html) { // The tag is not supported in the grid control, but the tag is supported for BOLD. html = html.replace(//g, ""); html = html.replace(/<\/STRONG>/g, "<\/B>"); // The tag is not supported in the grid control, but the tag is supported for Italics. html = html.replace(//g, ""); html = html.replace(/<\/EM>/g, "<\/I>"); // This Forces a new window to popup when hyperlink is added. html = html.replace(/