This file contains 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
// Backbone.Events | |
// --------------- | |
// A module that can be mixed in to *any object* in order to provide it with | |
// custom events. You may bind with `on` or remove with `off` callback | |
// functions to an event; `trigger`-ing an event fires all callbacks in | |
// succession. | |
// | |
// var object = {}; | |
// _.extend(object, Backbone.Events); |
This file contains 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
_.mixin({ | |
singleton:function(Constructor, scope) { | |
var instance; | |
return function(settings) { | |
var args = _.toArray(arguments); | |
var wrapper = function(f, params) { | |
var params = [f]; | |
params = params.concat(args); | |
return f.bind.apply(f, params); | |
}; |
This file contains 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
App.Data = Backbone.Model.extend({ | |
}) | |
// on the server when the page loads | |
$(function(){ | |
require('App',function(){ | |
App.Data.set({ | |
BroModel:{greeting:'BRAAAAHHHHH!!!'} | |
}) |
This file contains 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
/*for this line in this file | |
https://github.com/sigurdga/django-jquery-file-upload/blob/master/fileupload/static/js/jquery.fileupload.js#L421 | |
replace that ONE line with | |
*/ | |
$.each(input.prop('files'),function(file){ | |
if (file) { |
This file contains 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
mint.ui.onWidgetsRendered(function(){ | |
$(".retail.pricing-label").css("text-decoration","line-through"); | |
}); |
This file contains 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
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function(){ | |
jQuery('#tabModule').tabs(); | |
if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) === 7 | |
|| jQuery.browser.msie && parseInt(jQuery.browser.version, 10) === 8) { | |
jQuery('#tabModule ul li:first-child').css('margin-left', '0'); | |
} | |
}); | |
//]]> |
This file contains 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
<!-- | |
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" |
This file contains 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
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: |
This file contains 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
<<<<<<< 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); |
This file contains 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
efefeeefefe |