Load mask for panel in ExtJS 3 - mask

I want to add a loading mask for a specific item/panel. I do some research abaout this. In ExtJS 4 there is a function for all component which is setLoading(). Is there any equivalent for ExtJS 3?
I want do smt like this: http://jsfiddle.net/molecule/pKq8X/

This may be too late for you, but after playing around with Rock123's suggestion I was able to get a loading mask with this code.
myPanel.getEl().mask("Please wait...","x-mask-loading");
And to unmask it
myPanel.getEl().unmask();

var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
myMask.show();
refer: http://extjs.cachefly.net/ext-3.4.0/docs/
LoadMask

if ur formpanel name is panel then ur code goes like this
panel.getForm().load({url:'dummyurl', waitMsg:'Loading'});
Refer the following for more clarification...
http://dev.sencha.com/deploy/ext-3.4.0/examples/form/xml-form.html

In addition of
Lookup an existing component by ID works fine for me
Ext.getCmp('hr-graph-east').getEl().mask("Please wait...","x-mask-loading");
Ext.getCmp('hr-graph-east').getEl().unmask();
{xtype: 'hr_htmlpanel',
id: 'hr-graph-east',
height: 330,
width: 500,
etc..

Related

How to implement SplashScreen in SAPUI5

Does anybody here knows how to implement a Splash Screen in SAPUI5? I have tried creating a page so that it would be the default page once the application is loaded, but there was an issue as to how to make it the default page even if another page is bookmarked. So what we did was use an image as the Splash Screen. Now the problem is the size of the image based on the device used.
Do you have any idea how we can implement this? Any idea would be of great help. Thank you so much! :)
Maybe Dialog control will fit your need?
Here is an example:
var oButton = new sap.m.Button({
text: "Hit Me To See Splashscreen",
press: function(){
var oDialog = new sap.m.Dialog({
stretch: true,
content:[
new sap.m.Text({text:"This is Splashscreen! Click Anywhere To Close the Splashscreen."})
]
}).attachBrowserEvent("click", function(){oDialog.destroy();});
oDialog.open();
}
}).placeAt("content");
And here is a working JSBIN example: LINK
I guess what you are looking for is a loading Animation on startup while loading libraries or backend-data: checkout this one, perfect guide! http://openui5.blogspot.com/2014/04/splash-screen.html
Thank you for your responses. I highly appreciate it. :)
Anyways, i didn't use an image nor a separate page. I just added a separate div in index.html which contains the image and the text. I added a script that will hide the div once the DOM Content is loaded.
document.addEventListener("DOMContentLoaded", function(){
document.getElementById("splashScreen").style.display = "none";
document.getElementById("content").style.display = "block";
});

Changing the field appearance after making enable = "false" to that field?

I am trying to make enabled="false" to one form field in my flex application. But the appearance of the field after disabling it
is looking furious. I want to change the look of the field after disabling it in my way. So can i change the look and feel of a field after disabling it ?
Thanks in advance...
I think you have to write a skin for your component.
Every skin has different states for skinning. In your case, you have to write skin for disabled state.
To get started, this tutorial might be useful - http://www.adobe.com/devnet/flex/articles/flex4_skinning.html
For detailed information on skinning, please visit http://help.adobe.com/en_US/flex/using/WSC8DB0C28-F7A6-48ff-9899-7957415A0A49.html
Yes.
Concept: -
Use constraint based layout concept.
If you are using actionscript use move()
Ex: -
button.move(100,100);
if(button.visible)
{
button1.move(button.x + button.height + 5,button.y);
}
so on....
Please add some code so that we can suggest what exactly you are looking for.

adding text into iframe with jquery

I have an HtmlEditor from asp controltoolkit.
That creates an iframe with a couple things i need (bold letter, etc).
I need to add text to that iframe with jquery.
so long i have this.
$('#<%= tbDescripcionInsert.ClientID %>').contents().text(textoMercancia.substring(15, textoMercancia.length));
My problem is that the things im using from the editor (bold letter etc) disappear when i add the text from jquery.
What can it be?
What is the best way to add text into an iframe with jquery?
Thank you very much.
If you want to handle markup, not just text, use html() instead of text().
the problem is that
.text('blahblah')
replaces the text so you must use
.append('blahblah')
or some similar command
EDIT
seeing your post this might be more effective
$('#<%= tbDescripcionInsert.ClientID %>').contents().find('body').append('blahblah')
Try something like:
var d = $("#someFrame")[0].contentWindow.document; // contentWindow works in IE7 and FF
d.open(); d.close(); // must open and
close document object to start using
it!
// now start doing normal jQuery:
$("body", d).append("ABC");
Thank you all for your help.
I found a way to solve this:
$('#<%= tbDescripcionInsert.ClientID %>_ctl02_ctl00').contents().children().children('body').html(textoMercancia.substring(15, textoMercancia.length));
this way i can access the exact part of the iframe where the information is supossed to be loaded.
hope this help someone in the future.

How to change the state in Adobe Flex, using ActionScript?

I`m really new to Flex and ActionScript so please be patient with me.
I want to implement this script: tinyurl.com/yafqrqb
...that is doing this "magic" : tinyurl.com/y9qg32r
...but I want to tweak it a little on InfoWindowTabbedComponent. To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.
You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.
What I`m trying to do is to change this:
var adobeURL:URLRequest = new URLRequest("http://www.microsoft.com" );
navigateToURL(adobeURL, "_self");
Into something that change the current state.
Can you please help me?
Here`s my custom InfoWindowTabbedComponent: http://pastebin.com/f387bc3b9
I'm not sure I understand what you want to do. If you just want to set the selected Tab, instead of calling navigateToURL() set myTabNavigator.selectedIndex (or selectedChild)
If you really want to change the state, each component has a currentState property, but then you would have to define the states first (via the tag)
And if you really want to navigateToURL() you could navigate to javascript:somefunction() and then set the application state via ExternalInterface, but that would be horribly circumstantial.
Cheers,
Jörg

MvcConrib Grid's Sortable property don't seems to to do any effect

I need a way to generate the header texts in the grid as sortalbe link.
Do I need to use custom renderer to get this behavior?
You need to use GridSortOptions and call the .Sort(YourModel.GridSortOptions) method on the grid and then handle the OrderBy in your controller action.
See this link: http://www.jeremyskinner.co.uk/2010/03/14/mvccontrib-grid-part-6-sorting/
Thanks,
Hal

Resources