Joe Auty joeauty

View gist:1085507
1 2 3 4 5 6 7
if (typeof webkit.localjsloaded == "undefined") {
// local JS hasn't loaded yet, wait until it has
webkit.Y.Global.on('localjs:init', function() {
webkit.loadContent(page)
});
return;
}
View gist:1085498
1 2 3 4 5 6 7 8 9 10
// for controlling YUI lazy loading caching
var moduleRevision = 1;
 
var configObj = {
modules: {
'webkit': {
fullpath: '/nm_webkit/libs/webkit.js?wk=' + moduleRevision
},
'prototype': {
fullpath: 'https://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js?wk=' + moduleRevision
View gist:1020395
1 2 3 4 5 6 7 8 9 10
this.cacheset = function(owner, datarequest, object) {
// assigns object to webkitcache
YUI().use('cache', 'node', function(Y) {
if (!webkit.wkcache) {
webkit.wkcache = new Y.Cache({max:10});
}
if (Y.one('#' + object)) {
// cache request sent as dom ID rather than node object
object = Y.one('#' + object);
View gist:1020388
1 2 3 4 5 6 7 8 9 10
var webkitcache = $H();
 
this.cacheset = function(owner, datarequest, object) {
// assigns object to webkitcache global hash
 
if ($(object)) {
// part of DOM, create clone
webkitcache.set(owner + '_' + datarequest, object.cloneNode(true));
}
else {
View gist:1020386
1 2 3 4 5 6 7 8 9 10
this.cacheset = function(owner, datarequest, object) {
// assigns object to webkitcache
YUI().use('cache', function(Y) {
if (!webkit.wkcache) {
webkit.wkcache = new Y.Cache({max:10});
}
 
if (webkit.Y.one('#' + object)) {
YUI().log('set cache based on domID');
// part of DOM, create clone
View gist:806829
1 2 3 4 5 6 7 8 9 10
#progressbars {
width:300px;
}
 
.yui3-progressbar {
margin-bottom:3px;
border: 2px solid #c4c4c4;
border-radius:5px;
-moz-border-radius: 5px;
-webkit-border-radius:5px;
View gist:743088
1 2 3 4 5 6 7 8 9 10
YUI.add('photogallery', function(Y){
Y.Photogallery = Y.Base.create('photogallery', Y.Widget, [], {
 
initCollectionObservers : function() {
Y.all('#collectionsul .collectionli .buttonWrapper').each(function(o) {
this.set('cid', o.get('id').replace(/^collection_/,''));
var attrs = this.getAttrs();
webkit.setupButton(o.get('id'), Y.bind(this.gotoCollection, this), attrs);
},this);
View gist:732555
1 2 3 4 5 6 7 8 9 10
var newimage = new Image();
newimage.src = thumbpic;
Y.one('#photoswrapperproxyinner').append('<div class="photo newimage"><img src = "' + newimage.src + '" /></div>');
var imagewait = setInterval(function() {
if (parseInt(Y.one('#photoswrapperproxyinner .newimage').getComputedStyle('width')) == newimage.width && parseInt(Y.one('#photoswrapperproxyinner .newimage').getComputedStyle('height')) == newimage.height) {
Y.one('#photoswrapperproxyinner .newimage').removeClass('newimage');
clearInterval(imagewait);
var photogallery = new Y.Photogallery();
photogallery.resizeSpace();
}
View gist:731505
1 2 3 4 5 6 7 8 9 10
Y.Photogallery = Y.Base.create('photogallery', Y.Widget, [], {
maxwidth : 500,
initSpace : function() {
this.setInitialSpace();
},
setInitialSpace : function() {
Y.log(Y.Photogallery.maxwidth);
},
Something went wrong with that request. Please try again.