PDA

View Full Version : Using only some parts of Sencha Touch



JeanLuc
5 Jul 2011, 12:40 AM
Hi all,

i want to use parts of Sencha Touch in an existing Web App without rewriting it from scratch.

In this case it is the UI-Element Ext.form.Slider (http://dev.sencha.com/deploy/touch/docs/?class=Ext.form.Slider).

So far i integrated it like this:


Ext.setup({
fullscreen: false,
onReady: function () {
var slider = new Ext.form.Slider({
renderTo: 'theslider',
value: 5,
minValue: 0,
maxValue: 10
});
}
});


with the following HTML-fragment.


<div id="theslider">
</div>


This is really simple and its works fine.

But Sencha Touch adds its css classes all over the entire HTML-Tree.

is there a way to use sencha touch only in small fragment of the HTML ?

Hanni Sullivan
5 Jul 2011, 12:50 AM
I think including the whole Sencha Touch framework to only use small parts of it is overkill, imho. In your case I would use something more lightweight. For example the jQuery UI Slider (http://docs.jquery.com/UI/Slider). You can configure jQuery UI to only include the slider and no other widgets. Check it out (http://jqueryui.com/download).

JeanLuc
5 Jul 2011, 3:24 AM
In your case I would use something more lightweight. For example the jQuery UI Slider (http://docs.jquery.com/UI/Slider).

I used the jQuery UI Slider before, but i abandoned it because of the missing Touchscreen Support.

But i found jQuery UI for iPhone, iPad and iPod Touch (http://code.google.com/p/jquery-ui-for-ipad-and-iphone/) and this works fine for iPhone and Android - so far :-)

So, Thanks!