Sencha CMD 5 – NOTES

There is no packager in Sencha CMD 5 anymore. They have shifted to phonegap and cordova.
http://stackoverflow.com/questions/26057757/sencha-cmd-5-no-such-command-app-package

 

Sencha CMD 4 uses the bootstrap.js file to launch the app. Run the sencha app refresh command to update the bootstrap.js file with the css properties defined in your app.json file.

http://stackoverflow.com/questions/19512751/sencha-cmd-4-and-sencha-touch-2-3-adding-css-in-app-json

“Cheatin’ uh?” Elegant Themes upload error

Open following two files from inside of your Elegant Themes theme:
/js/custom_uploader.js
/epanel/js/custom_uploader.js

To fix this problem find line in both:

tb_show('', 'media-upload.php?post_id='+post_id+'&type=image&TB_iframe=true');

and change it to:

tb_show('', 'media-upload.php?post_ID='+post_id+'&type=image&TB_iframe=true');

The difference is error causing “post_id” changed to “post_ID” (with upper case ID). This should solve the “Cheatin’ uh?” error.

Page not found error in Elegant Theme templates

“The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.”

Above error can be solved by commenting line:

if (get_option('estore_duplicate') == 'false') $args['post__not_in'] = $ids;

in home.php of any Elegant Themes theme directory

Chop text to size

text-overflow: ellipsis;

Renders an ellipsis (“…”) to represent clipped text

Embossed panel with webkit-box-shadow

-webkit-box-shadow: 
	inset rgba(0, 0, 0, 0.5) 0 0.1em 0, 	/*top line*/
	inset rgba(0, 0, 0, 0.5) 0 -0.1em 0,	/*bottom line*/
	inset rgba(0, 0, 0, 0.5) 0.1em 0 0,	/*left line*/
	inset rgba(0, 0, 0, 0.5) -0.1em 0 0, 	/*right line*/
	inset rgba(0, 0, 0, 0.5) 0 0.15em 0.4em; /*shadow*/

Templates

There are two ways how templates can be used. We can have a plain template that doesn’t loop any data. It would look like this:

data: {
	name: 'Anca',
	age: '22',
},
tpl: [
	"name: {name}",
	"age: {age}"
],

Or we could loop the records of store (or any object) in which case we would use

tpl: '<tpl for=".">{name} is {age}</tpl>"

We could generate the data like this:

var data = [];

store.each(function(rec) {
    data.push(rec.getData());
});