This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this is a little store wrapper. Pass in an existing store, a filter method, and optionally a query | |
//adaptor, and it will pass through all requests to the store, except the fetch, which it will perform and | |
//then pass through the filter before calling the callbacks. Example after the declare. Small console only | |
//demo currently located at: http://dmachi.dojotoolkit.org/filterstore.html | |
dojo.declare("FilteringStore", null, { | |
constructor: function(store, filter, query){ | |
this.store = store; | |
for (var i in this.store){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){function serializer(rootNode){if(!rootNode){throw new Error("Node to serialize required");}if (rootNode.nodeType==3){this.text=rootNode.nodeValue}else if(rootNode.tagName=="SCRIPT"||!rootNode.tagName){}else{this.tagName=rootNode.tagName;if(rootNode.style){ this.style=(rootNode.style.cssText+"").toLowerCase();}this.attributes={};dojo.forEach(rootNode.attributes,function(attr){if(attr.nodeValue){this.attributes[attr.nodeName]=attr.nodeValue;}},this);this.children=[];dojo.forEach(rootNode.childNodes,function(node){this.children.push(new serializer(node));},this);}}var obj = new serializer(dojo.body());var notice=document.createElement("div");dojo.style(notice,{left:0,top:0,height:"200px",width:"450px",position:"absolute",overflow:"auto",zIndex:1000,background:"#fff",border:"2px solid green"});notice.innerHTML=dojo.toJson(obj);document.body.appendChild(notice);dojo.connect(dojo.body(),"onkeydown",function(e){if(e.keyCode=='68'){dojo.destroy(notice)}})})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class({ | |
id: "MailingList", | |
properties: { | |
name: {optional: true}, | |
mboxFileName: {optional: true} | |
}, | |
prototype: { | |
getMailFolder: function(){ | |
this.messages =[]; | |
var mboxPath = "mstor:/path/to/mbox"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jsonTemplate: [{dojoType: dijit.layout.ContentPane, params: {}, attachPoint: "foo"}], | |
postCreate: function(){ | |
this.inherited(arguments); | |
dojo.forEach(this.jsonTemplate, this.instantiateChild, this); | |
} | |
instantiateChild: function(child){ | |
var w=new child.dojoType(child.params); | |
this.addChild(w); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dojo.require("dijit.Tree"); | |
dojo.extend(dijit.Tree, { | |
childWidgetType: "dijit._TreeNode", | |
_createTreeNode: function(args){ | |
if (typeof this.childWidgetType == 'string') { | |
this.childWidgetType = dojo.getObject(this.childWidgetType); | |
} | |
return new this.childWidgetType(args); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Pintura Startup</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
require=Titanium.CommonJS.require; | |
print = Titanium.API.info; | |
var pintura = require("pintura"); |
NewerOlder