YUI({
//Last Gallery Build of this module
gallery: 'gallery-2013.02.07-15-27'
}).use('gallery-zui-attribute', function(Y) {
// Add ZUI attribute support to one instance
Y.mix(myInstance, Y.zui.Attribute.prototype);
// enable revert() on 'testAttr2'
myInstance._revertList = {testAttr2: true};
// Or, enable revert() on all attributes
myInstance._doRevert = true;
// Now, set an attribute
myInstance.set('testAttr', 3);
// And you can revert the attribute
myInstance.revert('testAttr');
// Sync an attribute from another object
// Everytime objterObject.get('testAttr') changed, set() the value to myInstance
myInstance.sync('testAttr', otherObject);
// Sync an attribute from another object, specify a different attribute name
// Everytime objterObject.get('Attr2') changed, set() the value to myInstance
myInstance.sync('testAttr', otherObject, 'Attr2');
// Stop to monitering the attribute change
myInstance.unsync('testAttr', otherObject);
// Or, add ZUI attribute support to a class (before creating any instance)
Y.mix(myClass.prototype, Y.zui.Attribute.prototype);
// Now, all myClass instances support revert(), toggle(), etc ...
var testInstance = new myClass();
testInstance.toggle('testAttr');
// Add ZUI attribute support for all Attribute object
Y.mix(Y.Attribute.prototype, Y.zui.Attribute.prototype, true);
// Add ZUI attribute support for all Base object
Y.mix(Y.Base.prototype, Y.zui.Attribute.prototype, true);
});/home/y/libexec/ant/bin/ant all
Buildfile: build.xml
[echo] Starting Build For gallery-zui-attribute
clean:
init:
[mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp
[echo] Starting Build For gallery-zui-attribute
-lint-server:
[echo] Starting Build For gallery-zui-attribute
-node:
[echo] For faster builds, install Node.js.
-concatdebug:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp/ant
[delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp/ant
-registerdebug:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp
-prependdebug:
-appenddebug:
builddebug:
-createcore:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp
-loggerregex:
buildcore:
-rollupjs:
-concatskins:
-buildskins:
-rollupcss:
buildskins:
-buildlangs:
-rolluplangs:
buildlangs:
build:
minify:
[yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp/gallery-zui-attribute.js
[yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp/gallery-zui-attribute-min.js
lint:
[echo] Using Rhino. Install nodejs to improve jslint speed, or skip with -Dlint.skip=true
[java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-zui-attribute/build_tmp/gallery-zui-attribute.js
[java] - OK
local:
deploybuild:
[copy] Copying 3 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-zui-attribute
deployassets:
deployskins:
deploylang:
deploydocs:
deploy:
all:
BUILD SUCCESSFUL
Total time: 2 seconds
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info