123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890 |
- /**
- * jsp引入此js实现国际化
- * 通过从cookie得到的language,再调用不同的messages
- * @author yingp
- */
- var language = getCookie("language");
- var basePath = (function() {
- var fullPath = window.document.location.href;
- var path = window.document.location.pathname;
- var subpos = fullPath.indexOf('//');
- var subpath = subpos > -1 ? fullPath.substring(0, subpos + 2) : '';
- if (subpos > -1)
- fullPath = fullPath.substring(subpos + 2);
- var pos = fullPath.indexOf(path), sname = path.substring(0, path.substr(1).indexOf('/') + 1);
- sname = (['/jsps','/workfloweditor','/resource'].indexOf(sname) > -1 ? '/' : sname);
- return subpath + fullPath.substring(0, pos) + sname + (sname == '/' ? '' : '/');
- })();
- var resourcePath = (function(){
- var scripts = document.getElementsByTagName('script'), src = null;
- for(var i in scripts) {
- src = scripts[i].src;
- if(src.indexOf("i18n.js") > 0) {
- return src.substring(0, src.indexOf("i18n"));
- }
- }
- return basePath + "resource/";
- })();
- var em_name = getCookie("em_name");
- var em_uu = getCookie("em_uu");
- var en_name = getCookie("en_name");
- var en_uu = getCookie("en_uu");
- var em_code = getCookie("em_code");
- var script = document.createElement("script");
- var extScript = document.createElement("script");
- script.type = "text/javascript";
- extScript.type = "text/javascript";
- language = language || 'zh_CN';
- Ext.Loader.injectScriptElement(resourcePath + "i18n/messages_" + language + ".js",function(){},function(){});
- Ext.Loader.injectScriptElement(resourcePath + "ext/ext-lang-" + language + ".js",function(){},function(){});
- /*if (language == "zh_TW") {
- script.src = resourcePath + "i18n/messages_zh_TW.js";
- extScript.src = resourcePath + "ext/ext-lang-zh_TW.js";
- } else {
- if (language == "en_US") {
- script.src = resourcePath + "i18n/messages_en_US.js";
- } else {
- script.src = resourcePath + "i18n/messages_zh_CN.js";
- extScript.src = resourcePath + "ext/ext-lang-zh_CN.js";
- }
- }*/
- document.getElementsByTagName("head").item(0).appendChild(script);
- document.getElementsByTagName("head").item(0).appendChild(extScript);
- if (Ext.isIE) {
- var cssLink = document.createElement("link");
- cssLink.rel = "stylesheet";
- cssLink.type = "text/css";
- cssLink.href = resourcePath + "ext/resources/css/ext-ie.css";
- document.getElementsByTagName("head").item(0).appendChild(cssLink);
- String.prototype.trim = function() {
- return this.replace(/(^\s*)|(\s*$)/g, "");
- };
- }
- // max number
- //Number.MAX_VALUE = 100000000000000;
- Ext.onReady(function(){
- // extend Ext.Object
- Ext.Object.equals = (function() {
- var check = function(o1, o2) {
- var key;
- for (key in o1) {
- if (o1.hasOwnProperty(key)) {
- if (o1[key] !== o2[key]) {
- return false;
- }
- }
- }
- return true;
- };
- return function(object1, object2) {
- if (object1 === object2) {
- return true;
- } if (object1 && object2) {
- return check(object1, object2) && check(object2, object1);
- } else if (!object1 && !object2) {
- return object1 === object2;
- } else {
- return false;
- }
- };
- })();
- // 控制同一请求(url及params完全一致)的间隔时间为0.5s
- var requestStack = {}, delay = 500;
- Ext.Ajax.on('beforerequest', function(me, options){
- var now = new Date(), last = requestStack[options.url];
- if(last && Ext.Object.equals(last.params, options.params) && now - last.time < delay) {
- return false;
- } else {
- requestStack[options.url] = {time: now, params: options.params};
- }
- });
- });
- //读取cookies函数
- function getCookie(name)
- {
- var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
- if(arr != null) return unescape(arr[2]); return null;
- }
- //两个参数,一个是cookie的名称,一个是值
- function SetCookie(name,value)
- {
- var Days = 30; //此 cookie 将被保存 30 天
- var exp = new Date(); //new Date("December 31, 9998");
- exp.setTime(exp.getTime() + Days*24*60*60*1000);
- document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
- }
- //删除cookie
- function delCookie(name)
- {
- var exp = new Date();
- exp.setTime(exp.getTime() - 1);
- var cval=getCookie(name);
- if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
- }
- //解析url,获得传递的参数
- function getUrlParam(name){
- var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)");
- var r=window.location.search.substr(1).match(reg);
- if (r!=null) return decodeURI(r[2]);
- return null;
- }
- function onUrlClick(url){
- Ext.Ajax.request({
- url: basePath + url,
- method: 'post',
- callback: function(options,success,response){
- Ext.Msg.alert('提示','确认成功!');
- }
- });
- }
- function saveRedoLog(options){
- if(options.params) options.params= unescape(escape(Ext.JSON.encode(options.params)));
- Ext.Ajax.request({
- url: basePath + 'ma/saveReDoLog.action',
- params:options,
- method: 'post',
- callback: function(options,success,response){
- }
- });
- }
- function showAll(val, title){
- if(!title){
- title='详细信息';
- }
- Ext.create('Ext.window.Window', {
- height: 200,
- title:'<h2>'+title+'</h2>',
- width: 400,
- layout: 'fit',
- html:'<p>'+val+'</p>'
- }).show();
- }
- /**
- * string:原始字符串
- * substr:子字符串
- * isIgnoreCase:忽略大小写
- */
- function contains(string, substr, isIgnoreCase){
- if (string == null || substr == null) return false;
- if (isIgnoreCase === undefined || isIgnoreCase === true) {
- string = string.toLowerCase();
- substr = substr.toLowerCase();
- }
- return string.indexOf(substr) > -1;
- }
- /**
- * WebContent/resource/i18n/i18n.js
- * 浮动div,显示错误信息,div会自动消失
- * @param err 错误信息
- */
- function showError(err, time, autoClose){
- if(err != null) {
- window.errmessage = err;
- autoClose = autoClose == null ? true : autoClose;
- if(err == 'ERR_NETWORK_SESSIONOUT'){//session丢失
- showLoginDiv(true);
- } else if(err == 'ERR_NETWORK_LOCKED') {//锁定
- alert('您的账号已被管理员锁定,无法在当前IP登录,请重新登录或切换账号!');
- showLoginDiv(true);
- } else {
- var isPowerErr = false,
- errCode = null;
- if(err.indexOf('ERR_POWER') != -1) {//权限问题
- errCode = err.substring(0, err.indexOf(':'));
- err = err.substr(err.indexOf(':') + 1);
- isPowerErr = true;
- }
- var main = parent.Ext.getCmp('content-panel');
- if(main){
- parent.Ext.create('erp.view.core.window.Msg', {
- title: $I18N.common.msg.title_warn,
- context: err,
- autoClose: autoClose,
- autoCloseTime: time
- });
- } else if(main = parent.parent.Ext.getCmp('content-panel')){
- if(main._mobile) {
- Ext.Msg.alert(err);
- } else {
- parent.parent.Ext.create('erp.view.core.window.Msg', {
- title: $I18N.common.msg.title_warn,
- context: err,
- autoClose: autoClose,
- autoCloseTime: time
- });
- }
- } else {
- Ext.create('erp.view.core.window.Msg', {
- title: $I18N.common.msg.title_warn,
- context: err,
- autoClose: autoClose,
- autoCloseTime: time
- });
- }
- if(isPowerErr) {
- if(errCode == 'ERR_POWER_026' || errCode == 'ERR_POWER_027' ||
- errCode == 'ERR_POWER_025') {//025查看列表,026查看单据,027查看他人单据---->这些情况下,界面直接关闭
- if(main) {
- main.getActiveTab().close();
- } else {
- window.close();
- }
- }
- }
- }
- }
- }
- /**
- * 右下角出现消息提示
- * @param title 消息标题
- * @param msg 显示的消息
- */
- function showMessage(title, msg, time){
- if (time == null || time > 3000) {
- window.errmessage = msg;
- }
- try{
- if(parent.Ext.version==Ext.version && parent.Ext.getCmp('content-panel')){
- parent.Ext.create('erp.view.core.window.Msg', {
- title: title,
- context: msg,
- isError: false,
- autoCloseTime: time
- });
- } else if(parent.parent.Ext.getCmp('content-panel')){
- parent.parent.Ext.create('erp.view.core.window.Msg', {
- title: title,
- context: msg,
- isError: false,
- autoCloseTime: time
- });
- } else {
- Ext.create('erp.view.core.window.Msg', {
- title: title,
- context: msg,
- isError: false,
- autoCloseTime: time
- });
- }
- }catch(e){
-
- }
- }
- //form分组展开收拢
- function collapse(id){
- var dom = document.getElementById("group" + id);
- if(dom.getAttribute('class') == 'x-form-group-label'){
- dom.setAttribute('class', 'x-form-group-label-close');
- dom.title = "展开";
- } else {
- dom.setAttribute('class', 'x-form-group-label');
- dom.title = "收拢";
- }
- Ext.each(Ext.getCmp('form').items.items, function(item){
- if(item.group && item.group == id){
- if(item.hidden == false){
- item.getEl().addCls('x-hide-display');
- item.hidden = true;
- } else {
- item.hidden = false;
- item.getEl().removeCls('x-hide-display');
- }
- }
- });
- }
- //messagebox
- /**
- * @param fn function
- */
- function warnMsg(msg, fn){
- Ext.MessageBox.show({
- title: $I18N.common.msg.title_prompt,
- msg: msg,
- buttons: Ext.Msg.YESNO,
- icon: Ext.Msg.WARNING,
- fn: fn
- });
- }
- function checkLogin(){
- Ext.Ajax.request({
- url : basePath + 'common/checkLogin.action',
- params: {
- id: id
- },
- method : 'post',
- callback : function(options,success,response){
- var localJson = new Ext.decode(response.responseText);
- if(localJson.exceptionInfo){
- showError(localJson.exceptionInfo);
- }
- if(localJson.success){
- printSuccess();
- }
- }
- });
- warnMsg('<br/><center><span style="color:blue">网络连接中断<span></center><hr/>可能原因:<br/>' +
- '<ul><li>[网络状况问题][会话过期][服务器关闭或重启]</li><li>...</li></ul><hr/>' +
- '<input type="button" value="重新登录»" style="height:25;width:70;cursor:pointer" onclick="showLoginDiv()">' +
- '<input type="button" value="取消»" style="height:25;width:60;cursor:pointer" onclick="closeMessage();">', function(){});
- }
- function showLoginDiv(isSessionOut){
- if(!Ext.getCmp('login')){
- var title = '重 新 登 录';
- if(isSessionOut){
- title = '会话过期,请重新登录';
- }
- Ext.create('erp.view.core.window.ReLogin', {
- isSessionOut: isSessionOut,
- title: title,
- id: 'login'
- });
- } else {
- Ext.getCmp('login').show();
- Ext.getCmp('login').refresh();
- }
- }
- function openUrl(url, newMaster ,winId){
- if(winId && Ext.getCmp(winId))Ext.getCmp(winId).close();
- var main = parent.Ext.getCmp("content-panel");
- if(!main && parent.parent.Ext) {
- main = parent.parent.Ext.getCmp("content-panel");
- }
- if(main) {
- var item = main.items.items[0];
- item.firstGrid=Ext.getCmp('task_grid');
- }
- url = url.toString().replace(/IS/g, '=');
- if(contains(url, 'formCondition')) {
- var fr = url.substr(url.indexOf('formCondition=') + 14);
- if(contains(fr, '&')) {
- fr = fr.substring(0, fr.indexOf('&'));
- }
- var keyField = fr.split('=')[0];
- var value = fr.split('=')[1];
- url = url.replace(keyField + '=' + value, keyField + '=\'' + value + '\'');
- }
- if(contains(url, 'gridCondition')) {
- var gr = url.substr(url.indexOf('gridCondition=') + 14);
- if(contains(gr, '&')) {
- gr = gr.substring(0, gr.indexOf('&'));
- }
- var gField = gr.split('=')[0];
- var gValue = gr.split('=')[1];
- url = url.replace(gField + '=' + gValue, gField + '=\'' + gValue + '\'');
- }
- if(newMaster){
- var currentMaster = parent.window.sob;
- if ( currentMaster && currentMaster != newMaster) {// 与当前账套不一致
- if (parent.Ext) {
- Ext.Ajax.request({
- url: basePath + 'common/changeMaster.action',
- params: {
- to: newMaster
- },
- callback: function(opt, s, r) {
- if (s) {
- var win = parent.Ext.create('Ext.Window', {
- width: '100%',
- height: '100%',
- draggable: false,
- closable: false,
- modal: true,
- title: '创建到账套' + newMaster + '的临时会话',
- html : '<iframe src="' + url + '" height="100%" width="100%" frameborder="0" style="border-width: 0px;padding: 0px;" scrolling="auto"></iframe>',
- buttonAlign: 'center',
- buttons: [{
- text: $I18N.common.button.erpCloseButton,
- cls: 'x-btn-blue',
- id: 'close',
- handler: function(b) {
- Ext.Ajax.request({
- url: basePath + 'common/changeMaster.action',
- params: {
- to: currentMaster
- },
- callback: function(opt, s, r) {
- if (s) {
- b.up('window').close();
- } else {
- alert('切换到原账套失败!');
- }
- }
- });
- }
- }]
- });
- win.show();
- } else {
- alert('无法创建到账套' + newMaster + '的临时会话!');
- }
- }
- });
- }
- return;
- }
- }
- var panel = Ext.getCmp(keyField + "=" + value);
- var main = parent.Ext.getCmp("content-panel") || parent.parent.Ext.getCmp("content-panel");
- if(!panel){
- var title = "";
- if (value&&value.toString().length>4) {
- title = value.toString().substring(value.toString().length-4);
- } else {
- title = value;
- }
- panel = {
- title : $I18N.common.msg.title_info + '(' + title + ')',
- tag : 'iframe',
- tabConfig: {tooltip:$I18N.common.msg.title_info + '(' + keyField + "=" + value + ')'},
- frame : true,
- border : false,
- layout : 'fit',
- iconCls : 'x-tree-icon-tab-tab',
- html : '<iframe id="iframe_maindetail_'+keyField+"_"+value+'" src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
- closable : true,
- listeners : {
- close : function(){
- main.setActiveTab(main.getActiveTab().id);
- }
- }
- };
- var p = main.add(panel);
- main.setActiveTab(p);
- }else{
- main.setActiveTab(panel);
- }
- }
- function openUrl2(url,title,keyField,value){
- var panel = Ext.getCmp(keyField + "=" + value);
- var main = parent.Ext.getCmp("content-panel");
- if(!panel){
- panel = {
- title : title,
- tag : 'iframe',
- tabConfig: {tooltip:title},
- frame : true,
- border : false,
- layout : 'fit',
- iconCls : 'x-tree-icon-tab-tab',
- html : '<iframe id="iframe_maindetail_'+keyField+"_"+value+'" src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
- closable : true,
- listeners : {
- close : function(){
- main.setActiveTab(main.getActiveTab().id);
- }
- }
- };
- var p = main.add(panel);
- main.setActiveTab(p);
- }else{
- main.setActiveTab(panel);
- }
- }
- function openFormUrl(value, keyField, url, title,newMaster,winId){
- if(contains(url,'?')){
- url =url+'&formCondition='+keyField+"="+value;
- }else url =url+'?formCondition='+keyField+"="+value;
- var panel = Ext.getCmp(keyField + "=" + value);
- var main = parent.Ext.getCmp("content-panel");
- var showtitle='';
- url = url.replace(/IS/g, "=\'").replace(/&/g, "\'&");
-
- if(winId){
- if (Ext.getCmp(winId))Ext.getCmp(winId).close();
- else if (contains(url,'jsps/common/jprocessDeal.jsp'))url=url+'&_do=1';
- }
-
- if(newMaster){
- var currentMaster = parent.window.sob;
- if ( currentMaster && currentMaster != newMaster) {// 与当前账套不一致
- if (parent.Ext) {
- Ext.Ajax.request({
- url: basePath + 'common/changeMaster.action',
- params: {
- to: newMaster
- },
- callback: function(opt, s, r) {
- if (s) {
- var win = parent.Ext.create('Ext.Window', {
- width: '100%',
- height: '100%',
- draggable: false,
- closable: false,
- modal: true,
- title: '创建到账套' + newMaster + '的临时会话',
- html : '<iframe src="' + url + '" height="100%" width="100%" frameborder="0" style="border-width: 0px;padding: 0px;" scrolling="auto"></iframe>',
- buttonAlign: 'center',
- buttons: [{
- text: $I18N.common.button.erpCloseButton,
- cls: 'x-btn-blue',
- id: 'close',
- handler: function(b) {
- Ext.Ajax.request({
- url: basePath + 'common/changeMaster.action',
- params: {
- to: currentMaster
- },
- callback: function(opt, s, r) {
- if (s) {
- b.up('window').close();
- } else {
- alert('切换到原账套失败!');
- }
- }
- });
- }
- }]
- });
- win.show();
- } else {
- alert('无法创建到账套' + newMaster + '的临时会话!');
- }
- }
- });
- }
- return;
- }
- }
- if(!panel){
- if (title && title.toString().length>4) {
- showtitle = title.toString().substring(0,4);
- }else if(title){
- showtitle=title;
- }
- panel = {
- title : showtitle,
- tag : 'iframe',
- tabConfig:{tooltip:title.toString() + '(' + keyField + "=" + value + ')'},
- frame : true,
- border : false,
- layout : 'fit',
- iconCls : 'x-tree-icon-tab-tab',
- html : '<iframe src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>',
- closable : true,
- listeners : {
- close : function(){
- main.setActiveTab(main.getActiveTab().id);
- }
- }
- };
- openTab(panel, keyField + "=" + value);
- }else{
- main.setActiveTab(panel);
- }
- }
- function openGridUrl(value, keyField, mainField, url, title){
- url = basePath + url + '?formCondition=' + keyField + "IS'" + value +"'"+
- '&gridCondition=' + mainField + "IS'" + value+"'";
- var panel = Ext.getCmp(keyField + "=" + value);
- var main = parent.Ext.getCmp("content-panel");
- var showtitle='';
- if(!panel){
- if (title && title.toString().length>4) {
- showtitle = title.toString().substring(0,5);
- }
- panel = {
- title : showtitle,
- tag : 'iframe',
- tabConfig:{tooltip:title + '(' + keyField + "=" + value + ')'},
- frame : true,
- border : false,
- layout : 'fit',
- iconCls : 'x-tree-icon-tab-tab',
- html : '<iframe id="iframe_maindetail_'+keyField+"_"+value+'" src="' + url + '" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>',
- closable : true,
- listeners : {
- close : function(){
- main.setActiveTab(main.getActiveTab().id);
- }
- }
- };
- openTab(panel, keyField + "=" + value);
- }else{
- main.setActiveTab(panel);
- }
- }
- function getSetting(type) {
- var result = false;
- Ext.Ajax.request({
- url : basePath + 'common/getFieldData.action',
- async: false,
- params: {
- caller: 'Setting',
- field: 'se_value',
- condition: 'se_what=\'' + type + '\''
- },
- method : 'post',
- callback : function(opt, s, res){
- var r = new Ext.decode(res.responseText);
- if(r.exceptionInfo){
- showError(r.exceptionInfo);return;
- } else if(r.success && r.data){
- result = r.data == 'true';
- }
- }
- });
- return result;
- }
- function openTable(title, url,caller){
- var panel = Ext.getCmp('datalist' + caller);
- var main = parent.Ext.getCmp("content-panel");
- if(!panel){
- panel = {
- title : title,
- tag : 'iframe',
- tabConfig:{tooltip: title},
- frame : true,
- border : false,
- layout : 'fit',
- iconCls : 'x-tree-icon-tab-tab',
- html : '<iframe id="iframe_maindetail_pageSet" src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
- closable : true,
- listeners : {
- close : function(){
- main.setActiveTab(main.getActiveTab().id);
- }
- }
- };
- var p = main.add(panel);
- main.setActiveTab(p);
- }else{
- main.setActiveTab(panel);
- }
- }
- function downLoadById(id){
- Ext.Ajax.request({
- method:'POST',
- params:{
- id:id
- },
- url:basePath+'common/downloadbyId.action',
- callback: function(options,success,response){
- }
-
- });
-
- }
- function openTab(panel,id){
- var o = (typeof panel == "string" ? panel : id || panel.id);
- var main = parent.Ext.getCmp("content-panel");
- /*var tab = main.getComponent(o); */
- if(!main) {
- main =parent.parent.Ext.getCmp("content-panel");
- }
- var tab = main.getComponent(o);
- if (tab) {
- main.setActiveTab(tab);
- } else if(typeof panel!="string"){
- panel.id = o;
- var p = main.add(panel);
- main.setActiveTab(p);
- }
- }
- function delSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_del, fn);
- }
- function delFailure(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.failure_del, fn);
- }
- function delFailure(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.failure_del);
- }
- function updateSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_update, fn);
- }
- function updateFailure(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_update, fn);
- }
- function updateFailure(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_update);
- }
- function addSuccess(fn){
-
- }
- function addSuccess(){
-
- }
- function closeFailure(msg, fn){
-
- }
- function closeFailure(msg){
-
- }
- function saveSuccess(fn){
- var box = Ext.create('Ext.window.MessageBox', {
- buttonAlign : 'center',
- buttons: [{
- text: '确定',
- handler: function(b) {
- var scope = b.ownerCt.ownerCt;
- scope.fireEvent('hide', scope, true);
- }
- },{
- text: '继续添加',
- handler: function(b) {
- var scope = b.ownerCt.ownerCt;
- scope.fireEvent('hide', scope, false);
- }
- }],
- listeners: {
- hide: function(w, ok) {
- w.close();
- if(typeof ok == 'boolean') {
- if(ok)
- fn && fn.call();
- else
- window.location.reload();
- } else
- fn && fn.call();
- }
- }
- });
- box.show({
- title : $I18N.common.msg.title_prompt,
- msg : $I18N.common.msg.success_save,
- icon : Ext.MessageBox.QUESTION
- });
- }
- function turnSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_turn, fn);
- }
- function saveFaliure(fn){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_save, fn);
- }
- function catchFailure(){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_catch);
- }
- function cleanFailure(){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_clean);
- }
- function saveFailure(){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_save);
- }
- function submitSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_submit, fn);
- }
- function resSubmitSuccess(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resSubmit);
- }
- function bannedSuccess(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_banned);
- }
- function resBannedSuccess(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resBanned);
- }
- function postSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_post, fn);
- }
- function resPostSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resPost, fn);
- }
- function turninSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_turnin, fn);
- }
- function submitFailure(fn){
-
- }
- function submitFailure(){
-
- }
- function printSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_print, fn);
- }
- function catchSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_catch, fn);
- }
- function cleanSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_clean, fn);
- }
- function printSuccess(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_print);
- }
- function turnBugSuccess(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_turnbug);
- }
- function turnBugFailure(){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_turnbug);
- }
- function auditSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_audit, fn || Ext.emptyFn);
- }
- function printFaliure(fn){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_print, fn);
- }
- function resAuditSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resAudit, fn || Ext.emptyFn);
- }
- function accountedSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_accounted, fn || Ext.emptyFn);
- }
- function resAccountedSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resAccounted, fn || Ext.emptyFn);
- }
- function printFailure(){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.print_save);
- }
- function endSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_end, fn);
- }
- function nullifySuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_nullify, fn);
- }
- function endFailure(){
- Ext.Msg.alert($I18N.common.msg.title_warn, $I18N.common.msg.failure_end);
- }
- function resEndSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resEnd, fn);
- }
- function importSuccess(){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_import);
- }
- function checkSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_check, fn || Ext.emptyFn);
- }
- function resCheckSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_resCheck, fn || Ext.emptyFn);
- }
- function endArSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_endar, fn || Ext.emptyFn);
- }
- function attendDataComSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_attendDataCom, fn || Ext.emptyFn);
- }
- function cardLogImpSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_cardlogimp, fn || Ext.emptyFn);
- }
- function unEndArSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_unendar, fn || Ext.emptyFn);
- }
- function turnGSSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_turnGs, fn || Ext.emptyFn);
- }
- function turnESSuccess(fn){
- Ext.Msg.alert($I18N.common.msg.title_prompt, $I18N.common.msg.success_turnEs, fn || Ext.emptyFn);
- }
|