问题
I'm redoing a question I made earlier, I want to ask it in a different way focusing more on the concept rather then my specific problem.
I'm looking at Saki's Form Examples, specifically, Displaying Form Submit Errors. I'm running Ext-JS 3.3.0, and I'm looking for pretty much the same functionality in my design (mine would be inline however, and the tips would appear as the user defocuses from the textbox).
My Question is: what are the minimum REQ files that I need to include in my HTML to get Quicktips up and running like Saki's. Now before you say did you look at Saki's example, I have...a lot. He's using an older version of Ext-JS and I am having trouble determining what files are important and which ones are not in his HTML... specified below:
<link rel="stylesheet" type="text/css" href="./ext/resources/css/ext-all.css" />
<link id="theme" rel="stylesheet" type="text/css" href="./css/empty.css" />
<link rel="stylesheet" type="text/css" href="./css/icons.css" />
<link rel="stylesheet" type="text/css" href="./css/formerrors.css" />
<link rel="shortcut icon" href="./img/extjs.ico" />
<script type="text/javascript" src="./ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="./ext/ext-all-debug.js"></script>
<script type="text/javascript" src="./js/Ext.ux.form.XCheckbox.js"></script>
<script type="text/javascript" src="./formerrors.js"></script>
Empty.css, icons.css, extjs.ico, and Ext.us.form.XCheckbox.js are the ones I'm unsure where he got.
I'm researching how CSS Specificity works, so I won't need help fixing the overall style of it (hopefully). I just want to know what I need to make sure I include in my HTML so that I KNOW its my fault js wise that the tooltip isn't appearing and look correct. As it stands right now the style of the tooltip looks like this:
To utllize msgTarget='side' do I need to have it enclosed within a form? Or could I do it to a xtype:'textarea'?
回答1:
Assuming you just want the standard Ext tips, all you need are
- ext-all.css
- ext-base.js
- ext-all.js (don't use -debug in production)
回答2:
Have you called the init method for tooltips?
Ext.QuickTips.init();
Also, are you sure that your styles defined in other CSS file or even in the html file is not messing up with extjs define classes for the tooltip?
来源:https://stackoverflow.com/questions/5508820/what-are-the-bare-minimum-reqs-to-implement-ext-quicktips-fully