Upload file in extjs - extjs

I have to upload a file using browse dialogue. Please help me.. Then what will have to write inside handler()?
Ext.create('Ext.ux.tab.Toolbar', {
width: 120,
id:'document-inner-right-tabs',
items: [{
id:'resumeUpButton',
tooltip:'Upload',
disabled:true,
handler:function(){}
}]
});
Anyone to help me?

Just use the fileuploadfield object as described here in the docs. It consists of a field and a button, when clicking the button it will open a file browsing window to allow selection.
If you want, there is also a config to hide the field so it is only a button, you could then save the file location in a variable or something.

Related

Custom icon on static google maps

I know there is a lot of topic about this but i can't find answer. My custom icon won't display. Here is my link http://maps.googleapis.com/maps/api/staticmap?zoom=15&size=640x200&scale=2&markers=icon:http%3A%2F%2Fwww.ide-imprimerie.com%2Fdata%2FnewTemplate%2Fpin.png|45.7472473,-0.6246753000000353
But the map is working well as you can see here : http://maps.googleapis.com/maps/api/staticmap?zoom=15&size=640x200&scale=2&markers=45.7472473,-0.6246753000000353
also the icon here : http://www.ide-imprimerie.com/data/newTemplate/pin.png
I encoded the URL, tried 32x32/64x64 icon, different icon and I still don't understand why this custom icon won't show up, thank you for reading and helping !
EDIT: Didn't find the issue but shortened url works so thread closed.
I believe this will works for you..
var marker = new google.maps.Marker({
position: map.getCenter(),
icon: 'http://www.ide-imprimerie.com/data/newTemplate/pin.png'
map: map
});

How to add Display Text on Ext.Img in extjs4.1.3?

I am trying to add a display text on Ext.Img....
But their is no such functionality mentioned in sencha docs.
Anybody have some solution for the same.... ?
new Ext.Img({
src: "images/blue_arrow.png",
id:'demoImgCmp',
title:'Demo Display Text',
text:'Demo Display Text',
html:'<b>Demo Display Text</b>'
})
above code is not working for me....

What's with this ghostly tooltip in the Grid dropdowns? (image included)

This appears on all of the columns in my grid:
Chrome 28.0.1500.72 m:
Firefox 21.0:
All of the columns in my table look something like this:
{
text: 'Audit Type',
width: 100,
sortable: true,
dataIndex: 'requestType'
},
I have no idea what's causing this. The javascript console shows no errors about missing images either.
Any help that could point me in the right direction would be greatly appreciated
More info
I'm using Chrome Version 28.0.1500.72 m and Extjs 4.2.1.883
My app is run on my own computer... so a local server. I'm using Play Framework with Scala on my backend.
Oh what silliness.
I did this earlier:
.x-panel {margin: 8em;}
This ended up moving the entire grid except for the menu shadows.
Giving the grid an id property in its definition and having this instead in my stylesheet solves the problem:
#grid {margin: 8em;}

How to programmatically open dojox mobile combobox

I'm using a dojox/mobile/ComboBox widget and would like to programmatically open it.
Tried to use require("dijit/registry").byId("").openDropDown();
but the source comment says... "To be called only when this.dropDown has been created and is ready to display (that is, its data is loaded).", which it doesn't seem to be :(
Calling the _onClick doesn't help either.
Any assistance would be highly appreciated.
Guy
I had the same issue as you.
The dojox.mobile.ComboBox was causing the android keyboard to display.
My work around was to create the combobox programmatically like this:
var myCombo = new ComboBox({
store: registry.byId('your data list'),
value: ''
},"theDomInput");
myCombo.startup();
then in my index.html I had a field with the readonly set like this:
<input id="theDomInput" type="text" readonly/>
The startup function needs to be called before the click event of the combobox.
This works for me. Let me know if you come up with something better.

user or profile tab icon is not visible

I am new to sencha touch and want to have three tabs icons i.e. Home, Profile/User and Camera. The home icon is currently visible but Profile/User is not. How can I add icon of profile/user and camera to tab in sencha touch?
here is my code for Profile.js
Ext.define('find.view.Profile' , {
extend: 'Ext.Panel',
xtype: 'profile',
config: {
title: 'Profile',
iconCls: 'user',
layout: 'fit',
scrollable: true,
styleHtmlContent: true,
styleHtmlCls: 'profilepage',
html: ['<h1>Profile</h1>'].join('')
}
});
You need to make use of pictos. Before that you need to install Ruby, as well as Sass and Compass. Follow this tutorial to adding new icon mask:
http://www.netmagazine.com/tutorials/styling-user-interface-sencha-touch-application
All the icons you can use in your ST app are located into the directory
resources/themes/images/default/pictos
However, not all are included by default in your application theme.
In order to include those additional icons you need to include the line
#include pictos-iconmask(<YOUR_ICON>);
In your app.scss file and then compile the theme using COMPASS.
If you are not familiar at all with Sencha Touch, I strongly suggest you to take a look at the following video from SenchaCon 2011 on how to style ST apps.
http://docs.sencha.com/touch/2-1/#!/video/theming
PS: Please notice that the "pictos-iconmask" mixin works only on ST < 2.2.0.alpha because from this version, it has been deprecated because of the integration of the Pictos Font.
Camera is not available as iconCls. The following icons are supported (seen here):
action
add
arrow_down
arrow_left
arrow_right
arrow_up
bookmarks
compose
delete
download
favorites
home
info
locate
maps
more
organize
refresh
reply
search
settings
star
team
time
trash
user
For styling your own icon look at #Andrea Cammarata and #user1479606 answers
if you want to add custom icon(which are not listed in pictos ) use this css in place of somename name use your name for icon
.x-tab .x-button-icon.somename,.x-button .x-button-icon.x-icon-mask.somename{-webkit-mask-image:url('path-to-image/facebook-icon.png')}
and use it as
iconCls: 'somename',

Resources