first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,134 @@
YUI.add('button-plugin', function (Y, NAME) {
/**
* A Button Plugin
*
* @module button-plugin
* @since 3.5.0
*/
/**
* @class Button
* @param config {Object} Configuration object
* @extends ButtonCore
* @constructor
* @namespace Plugin
*/
function ButtonPlugin() {
ButtonPlugin.superclass.constructor.apply(this, arguments);
}
Y.extend(ButtonPlugin, Y.ButtonCore, {
/**
* @method _afterNodeGet
* @param name {string}
* @private
*/
_afterNodeGet: function (name) {
// TODO: point to method (_uiSetLabel, etc) instead of getter/setter
var ATTRS = this.constructor.ATTRS,
fn = ATTRS[name] && ATTRS[name].getter && this[ATTRS[name].getter];
if (fn) {
return new Y.Do.AlterReturn('get ' + name, fn.call(this));
}
},
/**
* @method _afterNodeSet
* @param name {String}
* @param val {String}
* @private
*/
_afterNodeSet: function (name, val) {
var ATTRS = this.constructor.ATTRS,
fn = ATTRS[name] && ATTRS[name].setter && this[ATTRS[name].setter];
if (fn) {
fn.call(this, val);
}
},
/**
* @method _initNode
* @param config {Object}
* @private
*/
_initNode: function(config) {
var node = config.host;
this._host = node;
Y.Do.after(this._afterNodeGet, node, 'get', this);
Y.Do.after(this._afterNodeSet, node, 'set', this);
},
/**
* @method destroy
* @private
*/
destroy: function(){
// Nothing to do, but things are happier with it here
}
}, {
/**
* Attribute configuration.
*
* @property ATTRS
* @type {Object}
* @private
* @static
*/
ATTRS: Y.merge(Y.ButtonCore.ATTRS),
/**
* Name of this component.
*
* @property NAME
* @type String
* @static
*/
NAME: 'buttonPlugin',
/**
* Namespace of this component.
*
* @property NS
* @type String
* @static
*/
NS: 'button'
});
/**
* @method createNode
* @description A factory that plugs a Y.Node instance with Y.Plugin.Button
* @param node {Object}
* @param config {Object}
* @return {Object} A plugged Y.Node instance
* @public
*/
ButtonPlugin.createNode = function(node, config) {
var template;
if (node && !config) {
if (! (node.nodeType || node.getDOMNode || typeof node === 'string')) {
config = node;
node = config.srcNode;
}
}
config = config || {};
template = config.template || Y.Plugin.Button.prototype.TEMPLATE;
node = node || config.srcNode || Y.DOM.create(template);
return Y.one(node).plug(Y.Plugin.Button, config);
};
Y.namespace('Plugin').Button = ButtonPlugin;
}, '3.18.1', {"requires": ["button-core", "cssbutton", "node-pluginhost"]});
+1
View File
@@ -0,0 +1 @@
YUI.add("button-plugin",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.extend(n,e.ButtonCore,{_afterNodeGet:function(t){var n=this.constructor.ATTRS,r=n[t]&&n[t].getter&&this[n[t].getter];if(r)return new e.Do.AlterReturn("get "+t,r.call(this))},_afterNodeSet:function(e,t){var n=this.constructor.ATTRS,r=n[e]&&n[e].setter&&this[n[e].setter];r&&r.call(this,t)},_initNode:function(t){var n=t.host;this._host=n,e.Do.after(this._afterNodeGet,n,"get",this),e.Do.after(this._afterNodeSet,n,"set",this)},destroy:function(){}},{ATTRS:e.merge(e.ButtonCore.ATTRS),NAME:"buttonPlugin",NS:"button"}),n.createNode=function(t,n){var r;return t&&!n&&!t.nodeType&&!t.getDOMNode&&typeof t!="string"&&(n=t,t=n.srcNode),n=n||{},r=n.template||e.Plugin.Button.prototype.TEMPLATE,t=t||n.srcNode||e.DOM.create(r),e.one(t).plug(e.Plugin.Button,n)},e.namespace("Plugin").Button=n},"3.18.1",{requires:["button-core","cssbutton","node-pluginhost"]});
@@ -0,0 +1,134 @@
YUI.add('button-plugin', function (Y, NAME) {
/**
* A Button Plugin
*
* @module button-plugin
* @since 3.5.0
*/
/**
* @class Button
* @param config {Object} Configuration object
* @extends ButtonCore
* @constructor
* @namespace Plugin
*/
function ButtonPlugin() {
ButtonPlugin.superclass.constructor.apply(this, arguments);
}
Y.extend(ButtonPlugin, Y.ButtonCore, {
/**
* @method _afterNodeGet
* @param name {string}
* @private
*/
_afterNodeGet: function (name) {
// TODO: point to method (_uiSetLabel, etc) instead of getter/setter
var ATTRS = this.constructor.ATTRS,
fn = ATTRS[name] && ATTRS[name].getter && this[ATTRS[name].getter];
if (fn) {
return new Y.Do.AlterReturn('get ' + name, fn.call(this));
}
},
/**
* @method _afterNodeSet
* @param name {String}
* @param val {String}
* @private
*/
_afterNodeSet: function (name, val) {
var ATTRS = this.constructor.ATTRS,
fn = ATTRS[name] && ATTRS[name].setter && this[ATTRS[name].setter];
if (fn) {
fn.call(this, val);
}
},
/**
* @method _initNode
* @param config {Object}
* @private
*/
_initNode: function(config) {
var node = config.host;
this._host = node;
Y.Do.after(this._afterNodeGet, node, 'get', this);
Y.Do.after(this._afterNodeSet, node, 'set', this);
},
/**
* @method destroy
* @private
*/
destroy: function(){
// Nothing to do, but things are happier with it here
}
}, {
/**
* Attribute configuration.
*
* @property ATTRS
* @type {Object}
* @private
* @static
*/
ATTRS: Y.merge(Y.ButtonCore.ATTRS),
/**
* Name of this component.
*
* @property NAME
* @type String
* @static
*/
NAME: 'buttonPlugin',
/**
* Namespace of this component.
*
* @property NS
* @type String
* @static
*/
NS: 'button'
});
/**
* @method createNode
* @description A factory that plugs a Y.Node instance with Y.Plugin.Button
* @param node {Object}
* @param config {Object}
* @return {Object} A plugged Y.Node instance
* @public
*/
ButtonPlugin.createNode = function(node, config) {
var template;
if (node && !config) {
if (! (node.nodeType || node.getDOMNode || typeof node === 'string')) {
config = node;
node = config.srcNode;
}
}
config = config || {};
template = config.template || Y.Plugin.Button.prototype.TEMPLATE;
node = node || config.srcNode || Y.DOM.create(template);
return Y.one(node).plug(Y.Plugin.Button, config);
};
Y.namespace('Plugin').Button = ButtonPlugin;
}, '3.18.1', {"requires": ["button-core", "cssbutton", "node-pluginhost"]});