Sencha: Top & Bottom Bar Template
May 11, 2011 | Leave a Comment
Here’s a template for the top bar:
// top bar
new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'left'
},
items: [],
dockedItems: [{
dock: "top",
xtype: 'toolbar',
title: "HEADLINE"
},]
});
And bottom bar:
// bottom bar
new Ext.TabPanel({
tabBarDock: 'bottom',
fullscreen: true,
layout: {
pack: 'center'
},
items: [{
title: 'menu_1',
html: '1',
cls: 'card1',
iconMask: true,
iconCls: 'shop1',
badgeText: '8'
},
[[[more items]]]
]
});
Sencha: tabPosition: ‘bottom’ not working
May 10, 2011 | Leave a Comment
If you find that tabPosition: ‘bottom’ is not returning the results you expected, a quick glance in sencha-touch-debug.js will show you this that this has been replaced with tabBarDock: ‘bottom’
With access to a terminal, give www-data ownership of the wordpress directory:
sudo chown -R www-data:www-data /path/to/wordpress
*** Project description file hasn’t been set
April 8, 2011 | Leave a Comment
If you get these errors when running: git push origin master
*** Project description file hasn't been set error: hooks/update exited with error code 1 error: hook declined to update refs/heads/master
You might want to go into your repository machine and make sure hooks/update does not have x permissions. Sudo chmod -x update.
If you are trying to git push origin master and receive this error: fatal: Unable to create temporary file: Permission denied
You might need to sudo chown -R git /repository on the repository machine.
How to Install Asterisk & Adhearsion on Ubuntu
March 25, 2011 | Leave a Comment
sudo apt-get install asterisk
Country code (for USA):
1
And run:
/usr/sbin/asterisk
Then Adhearsion:
sudo gem install adhearsion
And create an application:
sudo ahn create adhearsion_app
Reprocess Carrierwave Images
March 25, 2011 | Leave a Comment
Change your width and height settings in your uploaders file:
class ImageUploader < CarrierWave::Uploader::Base
version :thumb do
process :resize_to_limit => [320, 320]
end
end
And then you can run this from rails console production:
Asset.all.each do |a| a.image.recreate_versions! end
Getting JQuery Mobile and Rails Redirects to Play Nice
March 23, 2011 | Leave a Comment
JQuery Mobile is an awesome little tool that makes UI designs for mobile phones quick and easy. To make the transitions smooth, all links are AJAX requests which is great for the user but not so great for a Rails backend that may have some redirects. For example, I was having trouble with something like this:
1. User navigates to Baskets#new and fills out a form.
2. Baskets#new redirects to Fruit#new so that the user can select which fruit she likes.
On the second step, the Rails server console correctly displays that the redirect happened successfully but JQuery Mobile hangs. To solve this, I added rel=”external” to my link to the Baskets#new to, unfortunately, leave JQuery Mobile for this process. I was hoping to attach rel=”external” to the redirect but could not successfully bypass JQuery Mobile hanging on the user end.
Fetching source index for http://rubygems.org/ hangs
March 23, 2011 | Leave a Comment
Go grab a beer. It’ll be a while. But, Bundler’s worth it compared to the alternatives.
Authlogic & Rails 3: DEPRECATION WARNING: save(false) is deprecated, please give save(:validate => false) instead. (called from _callback_before_
March 23, 2011 | Leave a Comment
def save_record(alternate_record = nil) r = alternate_record || record r.save_without_session_maintenance(false) if r && r.changed? && !r.readonly? end
to this:
def save_record(alternate_record = nil) r = alternate_record || record r.save_without_session_maintenance(:validate => false) if r && r.changed? && !r.readonly? end