(function () {
dorado.widget.Action = $extend(dorado.widget.Component, {$className:"dorado.widget.Action", ATTRIBUTES:{caption:{}, icon:{}, iconClass:{}, tip:{}, disabled:{}, parameter:{}, returnValue:{readOnly:true}, async:{}, hotkey:{writeBeforeReady:true, setter:function (p, hotkey) {
this._hotkey = hotkey;
var self = this;
if (hotkey) {
jQuery(document).bind("keydown", hotkey, function () {
self.execute();
});
}
}}, confirmMessage:{}, executingMessage:{}, successMessage:{}}, EVENTS:{beforeExecute:{}, onExecute:{}, onSuccess:{}, onFailure:{}}, constructor:function () {
this._bindingObjects = new dorado.ObjectGroup();
$invokeSuper.call(this, arguments);
this.addListener("onAttributeChange", function (self, arg) {
dorado.Toolkits.setDelayedAction(self, "$actionStateChangeTimerId", function () {
var attr = arg.attribute, value = arg.value;
if ((attr == "icon") || (attr == "iconClass")) {
self._bindingObjects.set(attr, value, {skipUnknownAttribute:true});
} else {
self._bindingObjects.invoke("onActionStateChange");
}
}, 20);
});
}, doExecuteSync:dorado._NULL_FUNCTION, doExecuteAsync:dorado._NULL_FUNCTION, execute:function (callback) {
var self = this, retval = true;
function realCall(callback) {
var eventArg = {processDefault:true};
if (self._async) {
var taskId;
if (self._executingMessage) {
taskId = dorado.util.TaskIndicator.showTaskIndicator(self._executingMessage);
}
self.doExecuteAsync({callback:function (success, result) {
if (taskId) {
dorado.util.TaskIndicator.hideTaskIndicator(taskId);
}
self._returnValue = result;
$callback(callback, success, result, {scope:self._view});
eventArg.success = success;
eventArg[success ? "result" : "error"] = result;
self.fireEvent("onExecute", eventArg);
self.fireEvent((success) ? "onSuccess" : "onFailure", self, eventArg);
if (success && eventArg.processDefault && self._successMessage) {
dorado.MessageBox.alert(self._successMessage);
}
}});
} else {
var success = false, result;
try {
self._returnValue = result = self.doExecuteSync();
success = true;
$callback(callback, true, result, {scope:self._view});
}
catch (e) {
self._returnValue = result = e;
}
eventArg.success = success;
eventArg[success ? "result" : "error"] = result;
self.fireEvent("onExecute", self, eventArg);
self.fireEvent((success) ? "onSuccess" : "onFailure", self, eventArg);
if (success && eventArg.processDefault && self._successMessage) {
dorado.MessageBox.alert(self._successMessage);
}
return result;
}
}
var eventArg = {processDefault:true};
self.fireEvent("beforeExecute", self, eventArg);
if (eventArg.processDefault) {
if (this._confirmMessage) {
var self = this;
dorado.MessageBox.confirm(this._confirmMessage, function () {
realCall.call(self, callback);
});
} else {
retval = realCall.call(this, callback);
}
}
return retval;
}});
var listenedAttrs = ["caption", "icon", "iconClass", "tip", "disabled"];
dorado.widget.ActionSupport = $class({$className:"dorado.widget.ActionSupport", ATTRIBUTES:{action:{componentReference:true, setter:function (p, action) {
if (this._action instanceof dorado.widget.Action) {
this._action._bindingObjects.objects.remove(this);
}
if (action && !(action instanceof dorado.widget.Action)) {
var ref = action;
action = ref.view.id(ref.component);
}
this._action = action;
if (action) {
action._bindingObjects.objects.push(this);
}
}}}, onActionStateChange:function () {
if (this.refresh) {
this.refresh(true);
}
}, destroy:function () {
if (this._destroyed) {
return;
}
this.set("action", null);
$invokeSuper.call(this, arguments);
}});
})();
(function () {
var VALIDATION_RESULT_CODE = {ok:0, invalid:1, executing:2};
dorado.widget.AjaxAction = $extend(dorado.widget.Action, {$className:"dorado.widget.AjaxAction", ATTRIBUTES:{async:{defaultValue:true}, service:{}, supportsEntity:{defaultValue:true}}, getAjaxOptions:function () {
var jsonData = {action:"remote-service", service:this._service, parameter:dorado.JSON.evaluate(this._parameter), context:(this._view ? this._view.get("context") : null)};
if (this._supportsEntity) {
jsonData.loadedDataTypes = this.get("dataTypeRepository").getLoadedDataTypes();
}
return dorado.Object.apply({jsonData:jsonData}, $setting["ajax.remoteServiceOptions"]);
}, doExecuteSync:function () {
var ajaxOptions = this.getAjaxOptions(), ajax = dorado.Toolkits.getAjax(ajaxOptions);
var result = ajax.requestSync(ajaxOptions);
if (result.success) {
var result = result.getJsonData(), dataTypeRepository = this.get("dataTypeRepository");
if (result && (result.$dataTypeDefinitions || result.$context)) {
result = result.data;
if (result.$dataTypeDefinitions) {
dataTypeRepository.parseJsonData(result.$dataTypeDefinitions);
}
if (result.$context && this._view) {
this._view.set("context", json.$context);
}
}
if (result && this._supportsEntity) {
result = dorado.DataUtil.convertIfNecessary(result, dataTypeRepository);
}
return result;
} else {
throw result.error;
}
}, doExecuteAsync:function (callback) {
var ajaxOptions = this.getAjaxOptions(), ajax = dorado.Toolkits.getAjax(ajaxOptions);
ajax.request(ajaxOptions, {scope:this, callback:function (success, result) {
if (success) {
result = result.getJsonData(), dataTypeRepository = this.get("dataTypeRepository");
if (result && (result.$dataTypeDefinitions || result.$context)) {
result = result.data;
if (result.$dataTypeDefinitions) {
dataTypeRepository.parseJsonData(result.$dataTypeDefinitions);
}
if (result.$context && this._view) {
this._view.set("context", json.$context);
}
}
if (result && this._supportsEntity) {
result = dorado.DataUtil.convertIfNecessary(result, dataTypeRepository);
}
$callback(callback, true, result);
} else {
$callback(callback, false, result.error);
}
}});
}});
dorado.DataPath.registerInterceptor("CASCADE_DIRTY", function (data) {
function isDirty(entity) {
var dirty = (entity.state != dorado.Entity.STATE_NONE);
if (!dirty) {
var data = entity._data;
for (var p in data) {
var v = data[p];
if (v
没有合适的资源?快使用搜索试试~ 我知道了~
dorado7离线中文文档.7z
共730个文件
js:573个
gif:119个
css:24个
需积分: 50 12 下载量 98 浏览量
2019-09-09
17:36:55
上传
评论
收藏 956KB 7Z 举报
温馨提示
在dorado开发中,都需要使用到的jsdoc,该下载就是一份dorado7.5官方离线文档
资源推荐
资源详情
资源评论
收起资源包目录
dorado7离线中文文档.7z (730个子文件)
base-widget.css 59KB
base-widget.min.css 47KB
shCore.min.css 14KB
grid.css 7KB
shCore.css 7KB
shThemeDefault.min.css 7KB
grid.min.css 6KB
common.css 5KB
common.min.css 4KB
shThemeDefault.css 3KB
jsdoc.css 3KB
block-view.css 3KB
block-view.min.css 2KB
jsdoc.min.css 2KB
list.css 2KB
tree.css 2KB
debugger.css 1KB
tree.min.css 1KB
list.min.css 1KB
debugger.min.css 1KB
widget.css 494B
widget.min.css 342B
portal.css 243B
portal.min.css 204B
icons.gif 27KB
loading.gif 9KB
dock-layout-1.gif 5KB
layout-region.gif 4KB
anchor-layout-1.gif 4KB
anchor-layout-3.gif 4KB
form-layout-1.gif 4KB
anchor-layout-2.gif 3KB
refresh-button.gif 3KB
button-bg.gif 2KB
tab-buttons.gif 2KB
waiting.gif 2KB
icon-question.gif 2KB
icon-info.gif 2KB
expanding.gif 2KB
toolbar-button-bg.gif 2KB
checkbox-radiobox.gif 2KB
dialog-buttons.gif 2KB
icon-error.gif 2KB
icon-warning.gif 1KB
date-picker-bg.gif 1KB
tab-bottom-all.gif 1KB
spinner-button.gif 1KB
tab-top-all.gif 1KB
dropdown-trigger-bg.gif 1KB
tool-button-bg.gif 1KB
method.gif 933B
slider-thumb.gif 875B
dropdown-trigger.gif 865B
split-panel-collapse.gif 858B
preparing-indicator-bg.gif 852B
menu-subitem-indicator.gif 848B
dialog-hori-bg.gif 763B
toolbar-more-button.gif 743B
progressbar-bg.gif 695B
global.gif 668B
tip-clr.gif 660B
menu-item-checkbox.gif 649B
object.gif 646B
component.gif 643B
message-ok.gif 634B
message-info.gif 630B
class.gif 630B
decorator-current-corners.gif 629B
class-abstract.gif 628B
tree-buttons.gif 626B
welcome.gif 625B
message-error.gif 619B
search.gif 608B
jquery.gif 601B
message-warn.gif 597B
namespace.gif 596B
event.gif 580B
section-caption-bar-bg.gif 556B
section-caption-bar-bg.gif 553B
accept.gif 541B
float-filter-panel.gif 532B
slider-v-thumb.gif 526B
ym-picker-current-cell.gif 520B
tip-corners.gif 513B
panel-corners.gif 513B
dragging-content.gif 505B
decorator-bg.gif 500B
text-area-trigger-panel.gif 495B
groupbox-button.gif 466B
goto-page.gif 466B
menu-item-icon-top-hover-bg.gif 436B
date-picker-current-cell.gif 427B
decorator-corners.gif 416B
decorator-current-bg.gif 404B
filter-bg.gif 392B
groupbox-bg.gif 384B
current-row.gif 356B
ym-picker-hover-cell.gif 347B
toolbar-bg.gif 327B
caption-bar-bg.gif 318B
共 730 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
迪迪的男票子
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功