Plugin for Organize Tags - plugins

anyone know any plugin for any program (eg dreamweaver, notepad + +), which organizes the tags and aligns it all?
eg:
before:
<body>
<div>
         <ul>
                 <li> </ li>
                                 <li> </ li>
         <li> </ li>
</ ul>
                 </ div>
         </ body>
then:
<body>
         <div>
                 <ul>
                         <li> </ li>
                         <li> </ li>
                         <li> </ li>
                 </ ul>
         </ div>
</ body>
Thanks guys

One solution is to use Notepad++ plugin TextFX HTMLTidy.
Unfortunately in recent releases of Notepad++ this plugin is not set up correctly for some reason, but check the solution by Noah here: Notepad++ HTML Tidy for instructions on how to get it up and running:

Related

Selenium IDE DropDown

Can someone please help me. I'm trying to select an option from the drop down list using selenium IDE but not able to. Below is the HTML.I tried to use "Select"Command with xpath in target but not able to select from the options
<select id="age" class="default chzn-done"onfocus="javascript:setOmnitureFallout('birthdate');"name="ctl00$ContentPlaceHolder1$age" style="display: block; visibility: hidden;" tabindex="21">
<option value="0">0 - 11 months</option>
<option value="1">1 year</option>
<option value="2">2 years</option>
<option value="3">3 years</option>
</select>
<div id="age_chzn" class="chzn-container chzn-container-single chzn-container-active" style="width: 200px;" tabindex="21">
<a class="chzn-single" tabindex="-1">
<span style="background-color: transparent;">2 years</span>
<div>
<b/>
</div>
</a>
<div class="chzn-drop" style="left: -9000px; width: 198px; top: 41px;">
<div class="chzn-search" style="">
<ul class="chzn-results">
<li id="age_chzn_o_0" class="active-result" style="">Select one</li>
<li id="age_chzn_o_1" class="active-result" style="">0 - 11 months</li>
<li id="age_chzn_o_2" class="active-result" style="">1 year</li>
<li id="age_chzn_o_3" class="active-result result-selected" style="">2 years</li>
<li id="age_chzn_o_4" class="active-result" style="">3 years</li>
</ul>
This is how I would use a 'select' command in general:
Using select command
For the select element locator I would usually use it's xpath and for the option locator I would use label which can be specified as a regex. For example:
label=regexp:^This_Matches_the_Option_I_want_to_Select$
Hope this helps.
We can give you a more specific answer if you post the html code snipet of the page you are working on and the code you have already written.
Let me know in case you have any questions.

Summernote + jQuery UI Sortable cannot input text

When I use Summernote and jQuery UI Sortable, I can sort items but cannot input text into the textareas. How can I accomplish it?
HTML
<ul class="sortable-list">
<li>
<h2>Textarea 1</h2>
<textarea name="textarea_1" id="textarea_1" class="summernote">
</textarea>
</li>
<li>
<h2>Textarea 2</h2>
<textarea name="textarea_2" id="textarea_2" class="summernote">
</textarea>
</li>
<li>
<h2>Textarea 3</h2>
<textarea name="textarea_3" id="textarea_3" class="summernote">
</textarea>
</li>
</ul>
JavaScript
$('.summernote').summernote();
$('.sortable-list').sortable({
axis: 'y'
}).disableSelection();
Please see also jsfiddle:
http://jsfiddle.net/L4pq1fad/
I got the answer in GitHub issue.
https://github.com/summernote/summernote/issues/1174#issuecomment-115235983
The JS should be:
$('.summernote').summernote();
$('.sortable-list').sortable({
handle: "h2",
axis: 'y'
});
sanchezzzhak created jsfiddle: http://jsfiddle.net/sanchezzzhak/L4pq1fad/3/

Remove Different Texts When EVEN pace not notepad

excuse my English.
How do I remove at once the texts located within the divs?
example:
line1 - <div id = "test"> 12345 </ div>
line2 - <div id = "test"> 23564 </ div>
line3 - <div id = "test"> ABCFDS </ div>
line4 - <div id = "test"> CDFGH </ div>
line5 - <div id = "test"> 12S4G </ div>
Must be like this:
line1 - <div id = "test"> </ div>
line2 - <div id = "test"> </ div>
line3 - <div id = "test"> </ div>
line4 - <div id = "test"> </ div>
line5 - <div id = "test"> </ div>
How I do this by using the regular expression in notepad?
Find : (<\s*div[^>]*>).*?(<\s*/\s*div\s*>)
Replace : \1\2
DEMO

How to render a parent and child active in a menu if they have the same URI and using Zend_Navigation?

Hello I'm digging into this problem without finding a solution. It seems very simple but I turn around for a while.
I'm trying to highlight a parent and 1 child in a menu. Both have the same uri, but only the parent is getting the active class.
Here my xml:
<configData>
<apps>
<agenda>
<label>Agenda</label>
<uri>/apps/agenda</uri>
<pages>
<page1>
<label>Page 1</label>
<uri>/apps/agenda</uri>
</page1>
<page2>
<label>Page 2</label>
<uri>/apps/agenda/page2</uri>
</page2>
</pages>
</agenda>
</apps>
</configData>
here my .phtml:
<div>
<?php echo $this->navigation(Zend_Registry::get('Zend_NavigationApp'))->menu()
->renderMenu(null, array(
'minDepth' => null,
'maxDepth' => 1,
'ulClass' => 'navigation',
'onlyActiveBranch' => false));
?>
</div>
and here the generated html:
<div>
<ul class="navigation">
<li class="active">
Agenda
<ul>
<li> /*Here the expected active class*/
Page 1
</li>
<li>
Page 2
</li>
</ul>
</li>
</ul>
</div>
All that I want to do is to get the "li" parent and "li" child with an active class after I clicked the parent link.
Solution
Using MVC instead of URI style config xml file fixed all my problems.
Here my fixed xml:
<configData>
<apps>
<agenda>
<label>Agenda</label>
<module>module_1</module>
<controller>control_1</controller>
<action>action_1</action>
<route>agenda_1</route>
<pages>
<page1>
<label>Page 1</label>
<module>module_1</module>
<controller>control_1</controller>
<action>action_1</action>
<route>agenda_1</route>
</page1>
<page2>
<label>Page 2</label>
<module>module_2</module>
<controller>control_2</controller>
<action>action_2</action>
<route>agenda_2</route>
</page2>
</pages>
</agenda>
</apps>
</configData>
Note that I'm using route definition in my ini file.

enabling/disabling a gwt spanelement

how can i programatically enable/disable a com.google.gwt.dom.client.SpanElement
i need to have methods like setEnabled(boolean enabled) and isEnabled();
SpanElement does not expose those .
Also if some one can explain me the use of spanelement it would be great
<g:HTMLPanel ui:field="container">
<div class="{style.column}">
<g:CheckBox ui:field="pendingBillingCheckBox"></g:CheckBox><br clear="all" />
<span class="{baseCSS.getApplicationCSS.label}">Tech $:</span>
<span class="{baseCSS.getApplicationCSS.label}" ui:field="techCost"></span><br clear="all" />
<span class="{baseCSS.getApplicationCSS.label}">Prof $:</span>
<span class="{baseCSS.getApplicationCSS.label}" ui:field="prof"></span><br clear="all" />
<g:TextBox addStyleNames="{style.profText}"></g:TextBox>
</div>
</g:HTMLPanel>
i would like to enable/disable the techCost and prof UI fields
Thanks
Try:
spanElement.getStyle().setDisplay(Style.Display.NONE);