123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
-
- //****************************************************************************************//
- //**********************************EasyUI函数扩展****************************************//
- $.fn.extend({
- cmsPanel: function (obj) {
- var target = $(this);
- var newObj;
- if (typeof (obj) == "object" && obj.href) {
- newObj = $.extend({}, obj);
- var newUrl = ("/" + CMS_SystemConfig.VirtualDirectoryPath + obj.href.replace(CMS_SystemConfig.VirtualDirectoryPath, "")).replaceDoubleSlashesToSingle();
- newObj.href = newUrl;
- }
- else {
- newObj = obj;
- }
- return target.panel(newObj);
- },
- cmsDialog: function (obj) {
- var target = $(this);
- var newObj;
- if (typeof (obj) == "object" && obj.href) {
- newObj = $.extend({}, obj);
- var newUrl = ("/" + CMS_SystemConfig.VirtualDirectoryPath + obj.href.replace(CMS_SystemConfig.VirtualDirectoryPath, "")).replaceDoubleSlashesToSingle();
- newObj.href = newUrl;
- }
- else {
- newObj = obj;
- }
- return target.dialog(newObj);
- },
- getDataGridRowIndex: function (o) {
- var p = $(o);
- while (p && p.size() > 0) {
- if (p.attr("datagrid-row-index")) {
- return parseInt(p.attr("datagrid-row-index"));
- } else if (p.attr("node-id")) {
- return p.attr("node-id");
- }
- p = p.parent();
- }
- return -1;
- },
- disable: function () {//禁用控件,用法$(**).disable();
- this.each(function () {
- var _this = $(this);
- _this.attr({ "disabled": "disabled" });
- _this.addClass("disabled");
- _this.removeClass("validatebox-invalid");
- });
- },
- enable: function () {//启用控件,用法$(**).enable();
- this.each(function () {
- var _this = $(this);
- _this.removeAttr("disabled");
- _this.removeClass("disabled");
- });
- }
- });
- $.messager.CloseProgress = function () {
- /// <summary>
- /// 关闭$.messager.progress进度条
- /// </summary>
- var win = $("div.messager-progress").closest("div.messager-body");
- if (win.length) {
- win.window("close");
- }
- }
- //******************************************End******************************************//
- //***************************************************************************************//
|