Skip to content

Instantly share code, notes, and snippets.

masterObj = {}
_.extend( masterObj, Backbone.events);
masterObj.registry = {
models:[]
register:function(name,model){
this.models[name] = model;
},
get:function(name){
if(this.models[name]) return this.models[name];
return false;
Array
(
[0] => Array
(
[content] => Array
(
[0] => Array
(
[class_name] => app\dto\customer\OrderHistory
function iprl5() {
var d = document,
z = d.createElement('script'),
b = d.body,
l = d.location;
try {
if (!b){throw (0)};
d.title = '(Saving...) '
d.title;
z.setAttribute('src', l.protocol + '//localhost:8000/site_media/static/bf/js/bookmarklet.js?u=' + encodeURIComponent(l.href) + '&t=' + (new Date().getTime()));
<a href="javascript:function iprl5(){var d=document,z=d.createElement('script'),b=d.body,l=d.location;try{if(!b){throw(0)};d.title='(Saving...) '
d.title;z.setAttribute('src',l.protocol+'//localhost:8000/site_media/static/bf/js/bookmarklet.js?u='+encodeURIComponent(l.href)+'&t='+(new Date().getTime()));b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}}
iprl5();void(0);" name="test poop">testy Poop</a>​
jQuery1520930524219525978_1332969478478({
"class_name": "app\\dto\\order\\Cart",
"class_id": "50cbf4ca63f94f7eaf0f91fd939ce781",
"store_id": "5",
"id": "6580267",
"customer_id": "1919476",
"sub_total": "310.00",
"shipping_total": "0.00",
"shipping_carrier": "freeshipping",
"shipping_method": "freeshipping",
// homemint/assets/js/models/model.ProductImage.js
mint.model.register({
name:"ProductImage",
inherits:"ProductImage", // inherits functionality from the mintjs product image model
Class:{
defaults:{
// the image name that represents which properties
// the contstructor the main image attribute. this
// can be passed into the constructor from whichever
// view/collection uses this model
<<<<<<< HEAD
// recurse through dependencies object
// to count total number objects
loading = _.reduce(deps, function(total, val) {
var count =
_.isFunction(val) ? 1 :
_.isArray(val) ? val.length :
_.isObject(val) ? _.keys(val).length : 0;
return count + total;
}, 0);
proposed module structure
1. widgets are modules
2. widgets have resources(models/views/controllers) that are owned by the widget (other modules cant access because they are declared privately)
3. widgets can share resources when they are declared and registered via a "manager" (mint.widget,mint.model). shared resources are declared outside of the scope of the module
4. dependency management can include modules which include their resources and their resources dependencies
5. at the mint level, each store has a directory which holds widget overrides for a widget, or a widget resource.
proposed structure:
<!--
After talking to drew, we decided that we would need more precision in creating widgets. Making so many resources private poses the problem of interchangeability. I propose we allow variables in our dependency code to determine which level of resource use when we create the widget. for example -->
<script type="text/mint-customer-something">
{
dependencies:{
model:{
Base: "$mint/src/models/model.Base.js",
Address: "$global/src/model/model.Base.js",
CustomerSomething: "$module/model/model.CustomerSomething.js"