| Bogggdan | Отредактировал Bogggdan - Среда, 05 Мая 2010, 02:09 Дата: 05 Мая 2010, 02:09 | Сообщение # 2 | ● ● ● ● ● 408 сообщений Статус: Offline | 1. Берешь u.js, копируешь. 2. http://webcodes.ru/, Тип данных JS, Обработка кода 3. У тебя u.js в читабельном виде Code function _uWnd(b, g, c, h, a, f, e, d) { if (b && b.length > 0) { var i = _uWnd.getbyname(b); if (i) { if (a && a.attachobj) { i.attachTo(a.attachobj, a.attachtype, a.attachdx, a.attachdy) } if (i.props.reloadonnew) { i.reload(f) } else { i.show() } return false } } this.constructor = _uWnd; this.desktop = this.opts && this.opts.desktop || _uWnd.defdesktop; this.props = $.extend({ parent: null, popup: 0, alert: 0, closeonesc: a.popup ? 1 : 0, nohide: 0, reloadonnew: a.attachobj ? 0 : 1, x: "auto", y: "auto", attachobj: null, attachdx: 0, attachdy: 0, attachtype: null, initstate: null, headerh: 0, headerc: null, hideheader: 1, footerh: 0, footerc: null, hidefooter: 1, contentsizeprio: a.footerh > 0 || a.headerh > 0 ? 1 : 0, nomove: a.attachobj ? 1 : 0, hideonmove: 1, center: a.modal ? 1 : 0, session: null, hidden: 0, modal: 0, toolwindow: 0, resize: a.toolwindow || a.attachobj ? 0 : 1, fixed: _uWnd.defdesktop || a.desktop ? 0 : 1, minh: 50, minw: 0, maxh: 0, maxw: 0, autosize: a.toolwindow || a.attachobj ? 0 : 1, autosizewidth: 0, autosizeonimages: 0, waitimages: 0, hideonresize: 0, attachicon: null, attachicontype: "", attachicondelta: 2, attachiconact: "hide", icon: "", header: g ? 1 : 0, min: this.desktop && !(a.notaskbar || a.parent || a.toolwindow || a.alert || a.modal || a.attachobj) ? 1 : 0, max: this.desktop && !a.modal && !a.attachobj ? 1 : 0, close: 1, customButtons: null, notaskbar: a.parent || a.toolwindow || a.alert || a.modal || a.attachobj ? 1 : 0, align: "center", shadow: a.toolwindow ? 0 : 1, design: "std", fadetype: a.toolwindow || a.modal || a.attachobj ? 0 : 1, fadespeed: 800, fadeclosetype: a.toolwindow || a.modal || a.attachobj ? 0 : 1, fadeclosespeed: 250, havemenu: e ? 1 : 0, menuopts: null, trayicon: null, traymenu: null, actlayer: 0, markload: '<div align="left"><div class="myWinLoad"></div></div>', havegrid: 0, markwaitcont: '<div class="myWinLoad"></div>', markwaitclass: "myWinGrid", oninit: null, oncontent: null, onposchange: null, onactivate: null, ondeactivate: null, onerror: null, onbeforeclose: null, onclose: null, desktop: null, notabdestroy: 0 }, a || {}); if (this.props.modal || this.props.toolwindow) { this.props.min = 0 } if (this.props.toolwindow) { this.props.max = 0 } if (this.props.session) { this.props.x = this.props.session.x; this.props.y = this.props.session.y } $.extend(this, { name: b, title: g ? g: "", letsize: 1, width: c && Math.abs(c) > 10 ? c: -300, height: h && Math.abs(h) > 10 ? h: -200, headerh: this.props.headerc && this.props.headerh >= 0 ? this.props.headerh: 0, footerh: this.props.footerc && this.props.footerh >= 0 ? this.props.footerh: 0, decor: { w: 0, h: 0, th: 0 }, _content: f, state: { visible: false, prevvisible: false, minimized: false, maximized: false, loaded: false, init: false, disabled: false, grided: false, noshadow: false, resizing: false, destroyed: false, focused: false }, grid: null, frame: null, sh: null, sh_sz: [4, 2], xpos: 0, ypos: 0, zpos: this.props.modal || this.props.alert ? _uWnd.getModalTopZ() : _uWnd.getTopZ(), _drag: new _uDraggable(this, this._ondragmousemove, null, this.onstartdrag, this.onstopdrag), _resize: new _uDraggable(this, this._onrsmousemove, null, this.onstartrs, this.onstoprs), restRect: null, minheight: this.props.minh, minwidth: this.props.minw, maxheight: this.props.maxh, maxwidth: this.props.maxw, pend_show: null, autosz: { active: false }, imgloader: { timer: null, active: false }, menu: null, app: d || null, childs: [], nchilds: 0, tabctrl: null, attachicon: "", sesupdate: 0 }); this.design = this.props.design && _uWnd.designs[this.props.design] || _uWnd.designs.std; this.idx = _uWnd.nextidx++; _uWnd.all[this.idx] = this; this._focus = new _uFocus({ type: 0, owner: this, thispar: this, parent: this.props.parent && this.props.toolwindow ? this.props.parent._focus: (this.app ? this.app._focus: null), onkeydown: this._onkeydown, onkeypress: this._onkeypress, onactivate: this._onactivate, ondeactivate: this._ondeactivate, canactivate: this._canactivate }); if (!_uWnd.globalset) { _uWnd.globalset = true; $(document).bind("mousedown", _uWnd.closepopup); $(window).bind("scroll", _uWnd._onscroll); $(window).bind("resize", _uWnd._onresize); _uWnd.sysmenu = new _uMENU("", { align: "D" }, { hidden: 1, withmarks: 1, onitem: _uWnd._onsysmenuitem }, _uWnd.sysmenuitems) } this.init(e) } _uWnd.all = {}; _uWnd.nextidx = 1; _uWnd.zchilds = []; _uWnd.lastz = 0; _uWnd.zstep = 2; _uWnd.minz = 10000; _uWnd.maxz = 20000; _uWnd.lastmodalz = 0; _uWnd.minmodalz = 21000; _uWnd.maxmodalz = 25000; _uWnd.globalset = false; _uWnd.defdesktop = null; _uWnd.ignoreclick = null; _uWnd.findactive = function () { var a = _uFocus.current; while (a) { if (a.owner && a.owner.constructor == _uWnd) { return a } a = a._parent } return null }; Code _uWnd.alert = function (e, k, a, c) { a = $.extend({ w: 150, h: 100, tm: 5000, close: 1, align: "center", icon: "", name: "", pad: null }, a || {}); if (a.pad) { e = '<div style="padding:' + a.pad + '">' + e + "</div>" } var h, j, i, g, b, f; if (! (h = _uWnd.defdesktop)) { h = _uWnd.getdims(); j = h.clientW - a.w - 5; g = h.clientH - a.h - 5; b = _uWnd.alerts; f = 0; h = null } else { j = h.width - h.calcexclude(1) - a.w - 5; g = h.height - h.calcexclude(3) - a.h - 5; b = h.alerts; f = h.calcexclude(2) } i = g; if (b) { if (b.y - (a.h + 5) >= 0) { i = b.y - (a.h + 5) } while (b) { if (b.y > f) { f = b.y } b = b.prev } if (f > 0 && g - f >= a.h + 5) { i = g } } var l = new _uWnd(a.name, k, a.w, a.h, { close: a.close, min: 0, max: 0, icon: a.icon, align: a.align, x: j, y: i, alert: 1, autosize: 0, fixed: 1, shadow: 0, resize: 0, nomove: 1, hidden: 0, notaskbar: 1, fadetype: 2, fadespeed: 500, fadeclosetype: 2, fadeclosespeed: 500, onclose: function (m, d) { _uWnd.rmalert(m, d) } }, e, null, c); if (!h) { _uWnd.alerts = { prev: _uWnd.alerts, wnd: l, y: i } } else { h.alerts = { prev: h.alerts, wnd: l, y: i } } if (a.tm > 0) { setTimeout("var w=_uWnd.all[" + l.idx + "];if(w)w.close();", a.tm) } return l }; | | |
|