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
/* | |
Old style. Problems: onmatch is slow. Leaks memory, because there's a reference from window to this node, and window exists forever, so that reference holds this DOM node out of the garbage once it's removed from the document. | |
*/ | |
$('.node').entwine({ | |
onmatch: function(){ | |
var self = this; | |
$(window).bind('load', function(){ self.initialise(); }); | |
}, |
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
$('.holder').entwine({ | |
MyProperty: 123, | |
myMethod: function() { ... }, | |
onmatch: function() { ... }, | |
'ul': $.entwine.nesting({ | |
onmatch: function() { ... }, |
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
$('selector').entwine({ | |
Editor: null, | |
createEditor: function(){ | |
return createTheEditorSomehow(); | |
}, | |
getEditor: function(){ | |
var val = this._super(); | |
if (!val) this.setEditor(val = this.createEditor()); |
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
--- | |
Name: core_routes | |
--- | |
Director: | |
Routes: | |
'$Controller//$Action/$ID/$OtherID': '*' | |
--- | |
Name: security_route | |
Except: | |
moduleexists: 'cms' |
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
--- | |
Name: cms_routes | |
Before: 'framework/routes#security_route' | |
--- | |
Director: | |
Routes: | |
'admin/cms//$Action/$ID/$OtherID': CMSMain | |
--- | |
Name: catchall_route | |
After: '*' |
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
<?php | |
Director::addRules(50, array( | |
'admin/cms//$Action/$ID/$OtherID' => 'CMSMain' | |
)); | |
Director::addRules(1, array( | |
'$URLSegment//$Action/$ID/$OtherID' => 'ModelAsController', | |
)); |
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
OurWebServiceClass: | |
base_url: | |
'localnet': 'http://sandbox.example-webservice.com/' | |
'*': 'http://live.example-webservice.com/' |
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
--- | |
Only: | |
Host: localnet | |
--- | |
OurWebServiceClass: | |
base_url: 'http://sandbox.example-webservice.com/' | |
--- | |
Except: | |
Host: localnet | |
--- |
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
$.concrete('namespace', function($){ | |
$('.selector').concrete({ | |
foo: $.concrete.internal(function(){ | |
}), | |
bar: function(){ | |
this.foo(); // Allowed | |
} | |
}) | |
}); |
NewerOlder