123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
-
- D_RenameReplace.F_Dialog_OnBeforeVisible = function()
- {
- var v_imgWarnning = this.F_GetDlgItem( "iWarning" );
- v_imgWarnning.src = webRoot+'/ps/portal/images/msg_warning.gif';
- var v_divNameExist = this.F_GetDlgItem( "dNameExist" );
- v_sTheNameMessage = G_ResManager.F_GetString("IDS_WIZARD_THE_NAME")+ " '" + this.m_sObjectName +"' " + G_ResManager.F_GetString("IDS_WIZARD_ALREADY_EXISTS") + G_ResManager.F_GetString("IDS_WIZARD_YOU_CAN_REPLACE");
- v_divNameExist.innerText = v_sTheNameMessage;
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- v_inputTextBox.value = this.m_sObjectName;
- };
-
- D_RenameReplace.F_Dialog_OnAfterVisible = function()
- {
- this.F_DisableOkSelectText();
- v_oCurrentActionRename = this.F_GetDlgItem( "iCurrentActionRename" );
-
- v_oCurrentActionRename.checked = true;
- }
- D_RenameReplace.F_DisableOkSelectText = function()
- {
- var v_oOKButton = this.F_GetDlgItem( "IDS_HAL_BTN_OK" );
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- v_inputTextBox.disabled = false;
- v_inputTextBox.focus();
- v_inputTextBox.select();
- v_oOKButton.disabled = true;
- v_oOKButton.style.color = 'LightGrey';
- }
- D_RenameReplace.F_DisableOk = function()
- {
- var v_oOKButton = this.F_GetDlgItem( "IDS_HAL_BTN_OK" );
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- v_inputTextBox.disabled = false;
- v_oOKButton.disabled = true;
- v_oOKButton.style.color = 'LightGrey';
- }
- D_RenameReplace.F_EnableOK = function()
- {
- var v_oOKButton = this.F_GetDlgItem( "IDS_HAL_BTN_OK" );
- v_oOKButton.disabled = false;
- v_oOKButton.style.color = 'black';
- }
- D_RenameReplace.F_Dialog_CheckEnableOK = function()
- {
-
- v_oCurrentActionReplace = this.F_GetDlgItem( "iCurrentActionReplace" );
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- if (v_oCurrentActionReplace.checked)
- {
- this.F_EnableOK();
- var v_oOKButton = this.F_GetDlgItem( "IDS_HAL_BTN_OK" );
- v_oOKButton.focus();
- v_inputTextBox.value = this.m_sObjectName;
- v_inputTextBox.disabled = true;
- }
- else if (this.m_sObjectName != v_inputTextBox.value.F_Trim() && v_inputTextBox.value.F_Trim() != '')
- {
- this.F_EnableOK();
- }
- else
- {
- this.F_DisableOk();
- }
- };
- D_RenameReplace.F_Dialog_CheckDisableOK = function()
- {
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- if (this.m_sObjectName == v_inputTextBox.value || v_inputTextBox.value.F_Trim() == '')
- {
- this.F_DisableOkSelectText();
- }
- };
- D_RenameReplace.F_Dialog_OnAfterHide = function()
- {
- delete this.m_oListener;
- delete this.m_nInfo;
- delete this.m_iHeight;
- delete this.m_iWidth;
-
- };
- D_RenameReplace.F_OnOK = function()
- {
-
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- if ( this.m_oListener)
- {
- v_oCurrentActionReplace = this.F_GetDlgItem( "iCurrentActionReplace" );
- var v_inputTextBox = this.F_GetDlgItem( "iTextBox" );
- var v_sCurrentAction = "";
- if (v_oCurrentActionReplace.checked)
- {
- v_sCurrentAction = "replace";
- }
- else
- {
- v_sCurrentAction = "rename";
- }
-
-
- if (v_sCurrentAction == "replace" || (this.m_sObjectName != v_inputTextBox.value.F_Trim() && v_inputTextBox.value.F_Trim() != ''))
- {
- this.m_oListener.F_D_RenameReplace_OnOK(this,v_sCurrentAction,v_inputTextBox.value);
- }
- else
- {
- this.F_DisableOkSelectText();
- }
- }
- else
- {
- this.M_fnSuper_OnOK();
- }
- };
- D_RenameReplace.F_OnCancel = function()
- {
- if ( this.m_oListener)
- {
- if (this.m_oListener)
- {
- this.m_oListener.F_D_RenameReplace_OnCancel(this);
- }
- }
- else
- {
- this.M_fnSuper_OnOK();
- }
- };
|