-
13 Jan 2012 8:22 AM #1
Answered: Image after List like left menu at kitchensink?!
Answered: Image after List like left menu at kitchensink?!
Hello folks,
im new at sencha and .js...
i try to learn with the kitchensink. in the left card of the dem you see the little Kitchensink logo. how can i place a logo after a list? i try me out with the mondrian toutorial, this is my list code:
This is the viewportCode:var menuList = viewport.menuList = new Ext.List({ store: this.stores.pages, itemTpl: '{title}', allowDeselect: false, singleSelect: true, plugins: [{ ptype: 'pullrefresh', autoPaging: true, }] });
Code:var menu = viewport.menu = new Ext.Panel({ items: [menuList], layout: 'fit', width: 250, dock: 'left', border: true, });
what must i write in the css to create a image AFTER the list?
I Hope you understand my question
-
Best Answer Posted by mitchellsimoens
Use Chrome dev tools or Safari web inspector. There is an Element tab that you can see the DOM.
The issue is the CSS selector is only being used on the nested list:
the .x-nested-list is controlling this... try to change it to x-list for both x-nested-list instances there.Code:.x-tablet .x-fullscreen > .x-nested-list .x-list-item:last-child:after, .x-desktop .x-fullscreen > .x-nested-list .x-list-item:last-child:after
-
13 Jan 2012 11:12 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
This is the CSS that adds it:
Code:.x-tablet .x-fullscreen > .x-nested-list .x-list-item:last-child:after, .x-desktop .x-fullscreen > .x-nested-list .x-list-item:last-child:after { content: "\00a0"; position: absolute; bottom: -80px; margin-bottom: 20px; left: 110px; width: 30px; height: 43px; background-image: url(../img/sencha_small.png); }Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Jan 2012 11:41 AM #3
Hey Mitchell,
i have allready try this. I have add this in my custom.css, but it issnt showing up in my list...
do you need more sourcecode?
thank you for your help!
-
13 Jan 2012 11:48 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Are you using it in a nested list not just a regular list? Is the CSS classes selecting the right element?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Jan 2012 12:06 PM #5
is use a normal list.
how can i see if i select the right css element?
Sorry i'm new at css and .js
where can i see which element uses with css class?
-
13 Jan 2012 12:17 PM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Use Chrome dev tools or Safari web inspector. There is an Element tab that you can see the DOM.
The issue is the CSS selector is only being used on the nested list:
the .x-nested-list is controlling this... try to change it to x-list for both x-nested-list instances there.Code:.x-tablet .x-fullscreen > .x-nested-list .x-list-item:last-child:after, .x-desktop .x-fullscreen > .x-nested-list .x-list-item:last-child:after
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Jan 2012 12:36 PM #7
ok, its WORK! Thank you, this was the right question.
i have found the class with the safari developer mode.
For other User, this add a Image under your List:
@Mittchel, a question at the site: I Have a Card Layout, in the left frame i have the list, if i touch a link in this list, the content change on the right side.Code:.x-list .x-list-item:last-child:after, .x-desktop .x-fullscreen > .x-list .x-list-item:last-child:after { content: "\00a0"; position: absolute; bottom: -80px; margin-bottom: 20px; left: 110px; width: 30px; height: 43px; background-image: url(./button.png); }
how can i animate this? i have try all, but its only slide or flip on the iphone if the menu is disapear... on the ipad where the menu and the car on one scree, i cant animate it. (i hope you understand my English
)
-
13 Jan 2012 12:45 PM #8Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
If you have two items in a card layout, you can use the cardSwitchAnimation config on the container that has the card layout. Or if you use setActiveItem the 2nd argument you can pass in would be an anim config.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Jan 2012 1:33 PM #9
i have try the following, it wont work :/
Code:var page = viewport.page = new Ext.Panel({ cls: 'page', layout: 'card', cardSwitchAnimation: 'slide', cover: true, styleHtmlContent: true, tpl: '<h2>{title}</h2>{content}', scroll: 'vertical', });
-
13 Jan 2012 1:37 PM #10Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Try adding the fullscreen config to true. Once that component is created, fullscreen will make it appear with 100% height and width.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote