﻿ //保存,更新的进度条
      function saveOrUpdate()
      {
           Ext.MessageBox.show({
               //iconCls:'titleicon',
               progressText: '保存...',
               width:260,
               msg: '正在保存数据,请稍等...',
               //height:200,
               wait:true,
               waitConfig: {interval:100},
               icon:Ext.MessageBox.INFO//custom class in msg-box.htmlext-mb-download
           });
      }
      
      //保存成功 窗口的保持方法
      function  savedOrUpdated()
      {
          Ext.MessageBox.hide();
          Ext.MessageBox.show({
          title: '提示',
          msg: '数据保存成功!',
          //iconCls:'titleicon',
          width:260,
          buttons: Ext.MessageBox.OK
       });
       //一秒钟后自动关闭提示窗口
        setTimeout(function(){
        
            Ext.MessageBox.hide();
            //var window=document.getElementById('Window1');
            //window.hide();
           //var win=  Ext.get('Window1')
           //win.hide();
            Window1.hide();//窗口也随之关闭
           // w.hide();
           // #{Window1}.hide();
        }, 1000);
      }
      
      //保存不成功!
       function  savedOrUpdatedFail(strerror)
      {
          Ext.MessageBox.hide();//隐藏进度条
          Ext.MessageBox.show({
          title: '提示--保存失败',
          msg: strerror,
          width:260,
          buttons: Ext.MessageBox.OK,
          icon:Ext.MessageBox.Error
       });
       //一秒钟后自动关闭提示窗口
       // setTimeout(function(){
       //     Ext.MessageBox.hide();
            //Window1.hide();
      //  }, 1000);
      }
      
      function deleteData()
      {
           Ext.MessageBox.show({
               msg: '正在删除数据,请稍等...',
               progressText: '删除中...',
               width:260,
               wait:true,
               waitConfig: {interval:200},
               icon:Ext.MessageBox.INFO//custom class in msg-box.htmlext-mb-download
           });
      }
      function deleteOK()
      {
        Ext.MessageBox.hide();
      }
      
      
       //保存成功 面板的保存方法
      function  savedOrUpdatedPanel()
      {
          Ext.MessageBox.hide();
          Ext.MessageBox.show({
          title: '提示',
          msg: '数据保存成功!',
          width:260,
          buttons: Ext.MessageBox.OK
       });
       //一秒钟后自动关闭提示窗口
        setTimeout(function(){
            Ext.MessageBox.hide();
        }, 1000);
      }
      
      function info(str)
      {
        Ext.Msg.alert('提示',str);
        setTimeout(function(){
            Ext.MessageBox.hide();
        }, 3000);
      }
