123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- Namespace.register("U.Dk.HP");
- U.Dk.HP.WPWJPX = function (UTF, UCB, userid) {
- var i, j, _UFT,
- _UGE = U.Dk.DiskOperatingSwitch(userid),
- _UDE = _UGE[1][1] ? _$(_UGE[0]).Select({ "UserDirectoryParentID": _UGE[1][1] }) : _UGE[1][5].concat(), _UDOD = $("#" + (_UGE[2] ? "UD_SYWOCRC" : "UD_SYWRZ"), _UGE.pdiv)[0], _UDAD = $(_UDOD).Child(), _UL = _UDAD.length, _UDFD = $$("frag");
- if (_UDAD.length) {
- for (i = 0; i < _UL; i++) {
- if (_UDAD[i].id.indexOf(_UDE[i]["UserDirectoryID"]) == -1) {
- _UFT = true; break;
- }
- };
- if (!_UFT) {
- if (UTF) {
- U.M.Sequence(_UDE, UTF, UCB, UTF === "UserDirectoryAddTime" ? -1 : 1);
- }
- else if (UCB) {
- _UDE = UCB(_UDE);
- }
- }
- for (i = 0; i < _UL; i++) {
- _UDFD.appendChild(_UDAD[(j = _UDAD.objIndexOf({ "id": "R" + _UDE[i]["UserDirectoryID"] }))]);
- _UDAD.splice(j, 1)[0];
- };
- _UDOD.appendChild(_UDFD);
- }
- }
- U.Dk.HP.WPWJPXLX = function (UTF, UDE) {
- var i, _UTP, _UAE = {};
- for (i = 0; i < UDE.length; i++) {
- _UTP = UDE[i][UTF];
- (!_UAE[_UTP]) && (_UAE[_UTP] = []);
- _UAE[_UTP].push(UDE[i]);
- }
- return _$(_UAE).Merger();
-
- if (!UTM) {
- if (_UDTD && $(_UDTD).Parent().id.indexOf(_UGE[1][1]) > -1) {
- _UDTD.onclick();
- }
- else {
- U.Dk.LE.RecordNav([[U.Dk.LE.OpenFileDirectory, [_UGE[1][1] ? _$(_UGE[0]).Select({ "UserDirectoryID": _UGE[1][1] })[0] : _UGE[1][5], userid]]]);
- }
- }
- else {
- _UDPD.style.width = "";
- }
- }
- U.Dk.HP.WPWJNPX = function (UDE) {
- _$(UDE).sort("UserDirectoryName", 1); return UDE;
- }
- U.Dk.HP.XWPDYQH = function (UDOD, UTF, userid, UTM) {
- var i, _UDSD,
- _UGE = U.Dk.DiskOperatingSwitch(userid),
- _UDTD = U.D.SY.ET["Disk"]["SY"]["DJ"],
- _UDAD = $($(UDOD).Parent()).Child(),
- _UDPD = $("#" + (_UGE[2] ? "UD_SYWOCRC" : "UD_SYWRZ"), _UGE.pdiv)[0],
- _UDE = UTF ? ["UD_SYWRKZOP UD_SYWRKZOPI", "UD_SYWRKZOS"] : ["UD_SYWRKZOP", "UD_SYWRKZOS UD_SYWRKZOSI"];
- if (_UGE[1][1] || _UGE[1][5].length) {
- _UGE[1][4] = UTF ? "Details" : "Normal"; for (i = 0; i < _UDE.length; i++) { _UDAD[_UDAD.length - 1 - i].className = "UD_SYWRKZOI UD_SYID " + _UDE[i]; }
- (_UDSD = $("#UD_SYWRM" + (_UGE[2] ? "O" : ""), _UGE.pdiv))[0].style.display = UTF ? "block" : "none"; _UDSD.find("input")[0];
- if (_UGE[1][5].length) { _UDPD.style.height = $(_UDPD).Parent(2).offsetHeight - _UDPD.offsetTop - 2 + "px"; }
- if (!UTM) {
- if (_UDTD && (_UDTD = $(_UDTD).Parent()).id.indexOf(_UGE[1][1]) > -1) {
- $(_UDTD).Child()[0].onclick();
- }
- else {
- U.Dk.LE.RecordNav([[U.Dk.LE.OpenFileDirectory, [_UGE[1][1] ? _$(_UGE[0]).Select({ "UserDirectoryID": _UGE[1][1] })[0] : _UGE[1][5], userid]]]);
- }
- }
- else { _UDPD.style.width = ""; }
- }
- else { U.Alert("本区域没有视图模式"); }
- }
- U.Dk.HP.DXSTSY = function (UDOD, UDTD, UDE, UTF) {
- var i, j, k, _UCE, _UDSD,
- _UDID = UDE[1][1],
- _UW = $(UDOD).width(),
- _UDAD = $(UDOD).Child(),
- _USE = [[UDOD], $(UDTD).Child()],
- _UDFD = $$("frag"),
- _UAE = [0.1, 0.2, 0.1, 0.15, 0.15, 0.15, 0.14];
- UTF = UTF || (_UDAD[0].style.width ? 1 : 0);
- if (UDE[1][4] == "Details" && (_UDID && UDE[1][5].length) && ((UTF && (_UDID ? _$(UDE[0]).Select({ "UserDirectoryParentID": _UDID }).length : UDE[1][5].length)) || !UTF)) {
- for (i = UTF || 0; i < _USE.length; i++) {
- for (j = 0; j < _USE[i].length; j++) {
- _UDSD = $(_USE[i][j]).Child();
- for (k = 0; k < _UAE.length; k++) {
- _UDSD[k * (-(i - 2))].style.width = UTF ? _UDAD[k * 2].style.width : (_UW * _UAE[k] + (i - 2) + "px");
- }
- }
- }
- UDTD.style.width = UDOD.style.width;
- UDTD.style.minWidth = UDOD.style.minWidth;
- }
- }
- U.Dk.HP.WPZTJD = function (UDOD) {
- var i,
- _UDID = $("input", UDOD),
- _UE = U.M.GetMousep(),
- _UTF = UDOD.componentFromPoint(_UE["MX"], _UE["MY"]);
- for (i = 0; i < _UDID.length; i++) {
- _UDID[i].blur();
- }
- }
- U.Dk.HP.ZDQXWPHQ = function (dirid, diskinfo) {
- var i, _permi,
- _fileinfo = diskinfo[4][dirid],
- _dirs = [],
- _returns = [];
-
- if (_fileinfo) {
-
- _dirs = U.Dk.HP.GetAncestors(_fileinfo, diskinfo);
- _returns.push(_dirs);
- for (i = 0; i < _dirs.length; i++) {
- _permi = _dirs[i].UserDirectoryEncrypt;
- if (_permi == "1" || _permi == "2") {
- _returns.push(_permi); break;
- }
- }
- }
- return _returns;
- }
- U.Dk.HP.WPCZQXHQ = function (dirid, diskinfo, fileinfo) {
- diskinfo = diskinfo || US.Disk.UserDisk;
- var _isupload,
- _isdownload,
- _tempdir,
- _isfileuser;
-
- if (!dirid) {
- dirid = diskinfo[1][1];
- }
- var _userid = US.userInfo.userid,
- _permis = U.Dk.HP.ZDQXWPHQ(dirid, diskinfo);
-
- if (_permis[0]) {
- var _dirinfo = _permis[0][_permis[0].length - 1];
-
- if (_dirinfo) {
-
- _isupload = (diskinfo[1][2] == _userid) || (_dirinfo.UserDirectoryID == US.FG && _permis[1] != "2");
-
- _isdownload = (_userid == diskinfo[1][2]) || (_permis[1] != "1");
-
- _tempdir = U.Dk.HP.LSWJCL(diskinfo);
- if (fileinfo) {
-
- _isfileuser = (fileinfo.UserId != _userid) && (_userid != diskinfo[1][2]) && _$(US.Friend[2]).Select({ "GroupManageID": _dirinfo.UserDirectoryID })[0].GroupManageCreateUserID == _userid;
- }
- return [_isupload, _isdownload, _permis, _tempdir, _isfileuser];
- }
- }
-
- return [false, false, false, false, false];
- }
- U.Dk.HP.MLWJSY = function (UDE, UGE) {
- var i, j,
- _UME = [0],
- _UCE = _$(UDE).Select({ "filetype": 1 }),
- _USE = _$(UDE).Select({ "filetype": 0 });
- UGE = UGE || US.Disk.UserDisk[0];
- for (i = 0; i < _USE.length; i++) {
- for (j = 0; j < UGE.length; j++) {
- if (UGE[j].UserDirectoryParentID == _USE[i].UserDirectoryID) {
- (UGE[j].filetype == 1 ? (_UME[0] += UGE[j].UserDirectorySize, _UCE) : _USE).push(UGE[j]);
- }
- }
- }
- _UME.unshift(_UCE); _UME.push(_USE); return _UME;
- }
- U.Dk.HP.LSWJCL = function (diskinfo) {
- var _userinfo = diskinfo[1][0];
- return _userinfo.DHID + "," + _userinfo.BHID + "," + (_userinfo.UserDiskND || []).join(",");
- }
- U.Dk.HP.GetAncestors = function (fileinfo, diskinfo) {
- var _ancestors = [],
- _dirid = fileinfo.UserDirectoryID
- ;
-
- while (diskinfo[4][_dirid]) {
- _ancestors.push(diskinfo[4][_dirid]);
- _dirid = diskinfo[4][_dirid].UserDirectoryParentID;
- }
- return _ancestors;
- }
- U.Dk.HP.DGHQML = function (userid, UDID) {
- var _UGE = U.Dk.DiskOperatingSwitch(userid);
- }
- U.Dk.HP.WPTDSY = function (UDOD, UCB) {
- U.D.DragAb(UDOD, { scb: UCB });
- }
- U.Dk.HP.FileSwitch = function (UDID, UTF, UDE, UP) {
- var _UXY = U.M.GetMousep(),
- _UGE = U.Dk.DiskOperatingSwitch(US.userInfo.userid),
- _UME = $("body").GetElementInfo(),
- _UDOD = $$("div", { "className": "UD_SYQZOCC" }),
- _UDTD = $$("div", { "className": "UD_SYQZOCCL", "style": { "border": "0"} }, _UDOD),
- _UDSD = $$("div", { "className": "UD_SYQZOCCLH" }, _UDTD);
- _UDSD.onmousedown = U.M.apply(_UDSD, [[U.Dk.UP.SCXWPOP, [_UDSD, { "GS": "UP", "FCP": UDE.FCP, "URL": "http://main.1473.cn/USupfile.ashx?iframename=UseStudioEditor", "ID": Guid.newGuid() }, US.userInfo.userid, true]]]);
- $$("span", { "innerHTML": "↑" }, _UDSD);
- $$("span", { "className": "UD_SYQZOCCLO", "innerHTML": "本地上传" }, _UDSD);
- if (_UGE) {
- _UDTD = $$("div", { "className": "UD_SYQZOCCL", "id": "UD_SYQZOCCL" }, _UDOD);
- $$("div", { "className": "UD_SYQZOCCLI UD_SYWLCT UD_SYID" }, _UDTD);
- $$("span", { "className": "UD_SYQZOCCLO", "innerHTML": "云盘添加", "onclick": [[U.Dk.VW.CCWPXZK, [UDID, { onclick: UDE.CB }, UTF]]] }, _UDTD);
- }
-
- U.UI.Form({ draw: false, min: false, max: false, right: "true", attr: { "onmousedown": U.M.StopBubble }, del: "remove",
- style: { width: _UGE ? "261px" : "130px", height: "85px", top: _UXY["Y"] + (UP ? 10 : -100) / (_UGE ? 1 : 2) + _UME["ST"] + "px", left: _UXY["X"] - 130 + _UME["SL"] + "px" }, content: _UDOD, title: "文件选择",
- hst: { style: { "padding": "0 0 0 10px"} }, bst: { "style": { overflow: "hidden"} }
- });
- _UDSD.onmousedown();
- }
- U.Dk.HP.GetIcon = function (extendtype) {
- var i,
- _application = US.Disk.ApplicationTypes;
-
- for (i in _application) {
-
- if (_application[i].types.indexOf(extendtype) > -1) {
- return _application[i];
- }
- }
- return _application["unknownfile"];
- }
|