Skip to content

Instantly share code, notes, and snippets.

View ppcano's full-sized avatar

Pepe Cano ppcano

View GitHub Profile
@ppcano
ppcano / app_gesture_manager.js
Created January 11, 2012 17:01
Views could have assigned its applicacion context
Em.AppGestureManager = Em.Object.extend({
_isBlocked: false,
_blockerView: null,
isBlocked: Em.computed(function(){
return this.get('_isBlocked');
}).property('_isBlocked'),
@ppcano
ppcano / scroll_mixin.js
Created January 12, 2012 16:58
View get notified when its childviews has been inserted.
ScrollMixin = Em.Mixin.create({
didInsertElementEnd: function() {
this._setup_dimensions();
this._super();
}
..........
});
@ppcano
ppcano / carousel_view.js
Created January 13, 2012 13:01
Ember Touch ScrollView without iScroll, and using movejs for transfomations.
{{#view Luh.Ui.TabMainView currentView="pane1"}}
{{#view Luh.Ui.TabPaneView id="pane1" class="content" viewName="pane1"}}
{{/view}}
{{#view Luh.Ui.TabPaneView id="pane2" class="content" viewName="pane2"}}
{{/view}}
(function(exports) {
window.DS = SC.Namespace.create();
})({});
(function(exports) {
DS.Adapter = SC.Object.extend({
commit: function(store, commitDetails) {
@ppcano
ppcano / Assetfile
Created January 16, 2012 06:43 — forked from ebryn/Assetfile
input "app"
output "public"
@ppcano
ppcano / Makefile
Created January 19, 2012 11:35
assetfile
update:
rm -rf packages/*; \
cp -pr ~/Git/forks/ember.js/packages/* ./packages; \
cp -pr ~/Git/forks/sproutcore-touch/packages/ember-touch ./packages; \
cp -pr ~/Git/emberjs/ember-mk/packages/ember-mk ./packages
@ppcano
ppcano / brand_categories.js
Created January 26, 2012 12:41
example ember view
App.BrandCategoriesView = Em.CollectionView.extend({
elementId: 'brand_categories',
content: App.brandCategoriesController,
selectedCategoryBinding: Em.Binding.oneWay('App.selectedCategoryController.content'),
tagName: 'ul',
itemViewClass: Em.View.extend( App.bTap, {
classNameBindings: ['selected'],
Editor.Element = Em.Object.extend({
x: 0,
y:0,
witdth: 0,
height: 0
});
// don't forget to use set / get for access the properties of the model
Editor.elements = Em.ArrayController.create({
@ppcano
ppcano / tab_view.js
Created February 3, 2012 11:13
new tab view
require('app/app');
var get = Ember.get , set = Ember.set, setPath = Ember.setPath, getPath = Ember.getPath;
// Tab View was created because a general Tab did not
// work because the flip animation
// with z-index opacity feature won't work, because it shows the hidden z-index panels
App.TabMainView = Ember.Mixin.create({