Foundation 5 text box not responding - css

The text boxes load fine and look great, but you can't click and select text. You can click the textbox and the cursor moves to the first position, but nothing else. For some reason the mouse isn't working in the controls, but the keyboard is.
These are dynamically created text boxes based on the number of rows from the DB. Also, the user can click a spiffy + image to add additional rows. I'm using F5 and also a sortable plugin.
HTML:
<div class="row">
<div class="small-12 large-10 small-centered columns" id="Ingredients">
<ul id="sortable-with-handles" class="sortable list">
<li><div class='row'><div class='small-12 large-12 small-centered columns'><div class='row'>
<div class='small-3 large-1 columns'>Sort</div>
<div class='small-3 large-4 columns'>Ingredient</div>
<div class='small-2 large-2 columns'>Dept</div>
<div class='small-3 large-4 columns'>Shopping List</div>
<div class='small-1 large-1 columns'><img src='./images/green_add.png' id='add_row' height='25' width='25' title='Add Another Row' /></div>
</div></div></div></li>
<li data-id=1><div class='row'><div class='small-12 large-12 small-centered columns' id='ingredients1'><div class='row'>
<div class='small-3 large-1 columns'><img id='sort_1' class='handle' src='./images/sort-icon.png' /></div>
<div class='small-3 large-4 columns'><input type='text' id='ingr_1' name='ingr_1' value='1 (12 ounce) jar Franks Red Hot Buffalo Sauce' /></div>
<div class='small-2 large-2 columns'><select id='dept_1' name='dept_1' style='font-size:75%;' class='medium'>
<option value='0' style='font-size:8pt;'>Choose...</option>
<div class='small-3 large-4 columns'><input type='text' id='shop_1' name='shop_1' value='1 (12 ounce) jar Franks Red Hot Buffalo Sauce' /></div>
<div class='small-1 large-1 columns'><img src='./images/delete.png' id='delete_row_1' height='25' width='25' title='Remove Ingredient' /></div>
</div></div></div></li>
</ul>
</div>
</div>
I'm including a screenshot:

I had a similar problem and it was turned out to be malformed html - I believe in my case, I had a <div class="row"> that was nested improperly. Looking at your code, it appears you are missing a closing div on your dropdown.
<div class='small-2 large-2 columns'>
<select id='dept_1' name='dept_1' style='font-size:75%;' class='medium'>
<option value='0' style='font-size:8pt;'>Choose...</option>
<!-- missing closing div -->
<div class='small-3 large-4 columns'><input type='text' id='shop_1' name='shop_1' value='1 (12 ounce) jar Franks Red Hot Buffalo Sauce' />
</div>

Related

Dojo Design Elements in Modal Windows in XPages

I have created a modal and then put some design elements in it. Every components work great except Dojos. They are working but when i click on it to chose date the windows stays behind of modal. so I can not control it. I tried z-index or similar thinks but I could not succeeded. I could not get it front. This problem happens only in Modal. Otherwise All of Dojo elements works 100%. So I do now know Where to start digging :(
<!-- This codes below is the whole modal dialog codes.. -->
<xp:link escape="true" id="addUnvan" styleClass="text-primary list-icons-item"
rendered="#{javascript:document1.isEditable()}">
<xp:this.attrs>
<xp:attr name="type" value="button"></xp:attr>
<xp:attr name="data-target" value="#modal_theme_custom"></xp:attr>
<xp:attr name="data-toggle" value="modal"></xp:attr>
<xp:attr name="data-popup" value="popover"></xp:attr>
<xp:attr name="data-trigger" value="hover"></xp:attr>
<xp:attr name="data-content"
value="Çalışanın görevi değiştiyse onun eski görevini yeni görevinden bir gün önce bitecek şekilde kapatır. Yeni unvan eklerim.."></xp:attr>
<xp:attr name="data-original-title" value="Ne Mi Yaparım?"></xp:attr>
<xp:attr name="data-placement" value="right"></xp:attr>
</xp:this.attrs>
<i class="icon-stack-plus"></i>
</xp:link>
<!-- This codes below is the whole modal dialog codes.. -->
<div id="modal_theme_custom" class="modal fade" tabindex="-1"
style="display: none;" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<xp:div id="divUnvanContent" styleClass="card">
<div class="card-header header-elements-inline">
<h5 class="card-title">
<xp:text escape="true" id="computedField5" value="#{unvanDoc.AdSoyad}"
rendered="false">
</xp:text>
</h5>
<div class="header-elements">
<div class="list-icons">
</div>
</div>
</div>
<div class="card-body">
<div class="modal-body">
<xp:div styleClass="bootstrap-duallistbox-container row moveonselect">
<xp:div styleClass="col-lg-12 col-md-12">
<xp:div id="divGTarih" styleClass="form-group row">
<xp:label value="Geçerlilik Tarihi:" id="label2"
styleClass="col-form-label col-lg-3 col-md-3"></xp:label>
<xp:div styleClass="col-lg-9 col-md-9">
<xe:djDateTextBox styleClass="form-control pickadate picker__input"
id="BasTarih" value="#{document1.BasTarih}">
<xe:this.converter>
<xp:convertDateTime type="date"
dateStyle="short">
</xp:convertDateTime>
</xe:this.converter>
</xe:djDateTextBox>
<xe:djDateTextBox id="BitTarih" value="#{document1.BitTarih}"
styleClass="ml-6">
<xe:this.converter>
<xp:convertDateTime type="date"
dateStyle="short">
</xp:convertDateTime>
</xe:this.converter>
</xe:djDateTextBox>
</xp:div>
</xp:div>
</xp:div>
</xp:div>
</div>
</div>
</xp:div>
</div>
</div>
</div>
UPDATE
I could not find the correct z-index property of DojoComponent I mean correct class. Please find the picture of code. When click on it I see lots of classes. I have tried so many classes but I am tired of trying :((( is there any clue that i can follow..
Thanks in advance...

How to move label to left of input fields?

I'm working with input fields in PrimeNG and not really sure how to move labels to left of fields. Here's an image of what I'm trying to do:
Here's my working code:
PLUNKER
<div class="ui-g-12 ui-md-6 ui-lg-4">
<label>Set Date</label>
<input id="input" type="text" size="30" pInputText [(ngModel)]="text">
</div>
You can use a small column ui-grid-col4 for the labels and a bigger one ui-grid-col8 for the inputs :
<div class="ui-g ui-fluid">
<div class="ui-grid-col-4">
<span>Phone Ext</span>
</div>
<div class="ui-grid-col-8">
<p-inputMask mask="(999) 999-9999? x99999" [(ngModel)]="val5" placeholder="(999) 999-9999? x99999"></p-inputMask>
</div>
<br/><br/><br/>
<div class="ui-grid-col-4">
<span>Serial Number</span>
</div>
<div class="ui-grid-col-8">
<p-inputMask mask="a*-999-a999" [(ngModel)]="val6" placeholder="a*-999-a999"></p-inputMask>
</div>
</div>
See working Plunker
If you want more details about the grid, see the doc

Use watir web driver to click download icon

I am trying to use watir to download files from a web page. Trying to figure out how to click the 'download icon' and then save the file.
The files are in a table, and I want to download each file with the word 'done' in the column and then same it as the report name.
The HTML is below:
<div class="portlet" id="homeStatus">
<div class="portletHeader statusHeader">
Reports and Request Status
</div>
<div class="portletContent" id="statusContent">
<div class="status">
<div class="row-fluid boldText statusHeaderRow">
<div class="span3">Name</div>
<div class="span2">ID</div>
<div class="span3">Date</div>
<div class="span1">Status</div>
<div class="span3">Actions</div>
</div>
<div class="row-fluid statusResultsText">
<div class="span3 bold">
<span class="reportName">report2</span>
</div>
<div class="span2">429696109</div>
<div class="span3">2015-06-14 20:06:55</div>
<div class="span1">Done</div>
<div class="span3 statusResultsActions iconSize16 statusActionPad" id="374189255">
<i class="icon-download-alt mediumBlueIcon downloadIcon" id = "/decision_support/Status_retrieve_request.aspx?questionid=Q10201&applicationid=300&JobId=429696109&status=D&Extension=xls&filename=/Outbound06/q3bk06m_429696109_A14A90C6XB906X4F05X8539XDE448240CE97&reqname=report2,429696109" title="Download"></i>
</i>
<i class="icon-cog mediumBlueIcon modifydrequestIcon" id = "d_/decision_support/Report_Builder.aspx?country_cd=CA&qid=Q10201&exe_id=291&AppId=300&divid=1&JobId=429696109&reopen=true" title="Modify"></i>
</div>
</div>
<div class="row-fluid statusResultsText alternateBackground">
<div class="span3 bold">
<span class="reportName">Report Sun Jun 14 20:56:46 2015</span>
</div>
<div class="span2">429695641</div>
<div class="span3">2015-06-14 20:01:34</div>
<div class="span1">User Error</div>
<div class="span3 statusResultsActions iconSize16 statusActionPad" id="374188794">
</div>
</div>
</div>
</div>
</div>
# iterate through rows
Browser.divs.each do |row|
if row.div(:class => "span1").text == "Done"
report_name = row.span(:class => "reportName").text
row.divs.last.is.each do |i|
# move the mouse to <i> tag and click the <a> link, if <i> is an icon and <a> link is not present
Browser.driver.action.move_to(i.wd).click.perform
end
end
end

RactiveJS doesn't update all vars on set or update

I have this:
{{#config.buildings:building}}
<div class="building" id="building-item-{{building}}">
<div class="image-container">
<div class="thumbnail" style="background: transparent url({{staticUrl}}/game_images/town/buildings/{{building}}/{{building}}-1-thumbnail.png) no-repeat center center;"></div>
<div class="cover"></div>
<div class="undercover"></div>
<div class="level">{{village.buildings[building].level + alreadyInQueue(building)}}</div>
</div>
<div class="big_title">{{lang('buildings',building)}}</div>
<p class="{{buildingMaxed(building) ? 'maxed' : ''}}">{{lang('buildings',building+'_description')}}</p>
<div on-tap="upgradeBuilding:{{building}}" class="upgrade-button" tooltip="{{lang('general','upgrade_building')}}"></div>
<div on-tap="downgradeBuilding:{{building}}" class="downgrade-button disabled" tooltip="{{lang('general','downgrade_building')}}"></div>
<div class="resources">
<div class="resource">
<img class="thumbnail" src="{{staticUrl}}/game_images/resources/woodB.png">
<label class="res-count-wood">{{config.buildings[building][village.buildings[building].level].wood}}</label>
</div>
<div class="resource">
<img class="thumbnail" src="{{staticUrl}}/game_images/resources/ironB.png">
<label class="res-count-iron">{{config.buildings[building][village.buildings[building].level].clay}}</label>
</div>
<div class="resource">
<img class="thumbnail" src="{{staticUrl}}/game_images/resources/clayB.png">
<label class="res-count-stone">{{config.buildings[building][village.buildings[building].level].iron}}</label>
</div>
<div class="resource">
<img class="thumbnail" src="{{staticUrl}}/game_images/resources/workersB.png">
<label class="res-count-builders">{{config.buildings[building][village.buildings[building].level].people}}</label>
</div>
<div class="resource">
<img class="thumbnail" src="{{staticUrl}}/game_images/resources/timeB.png">
<label class="res-count-time">{{secsToString(config.buildings[building][village.buildings[building].level].time)}}</label>
</div>
</div>
<div class="hr"></div>
</div>
{{/config.buildings:building}}
When I'm using
contentTPL.set('village.buildings[1].level',4)
The only things that update are
<div class="level">{{village.buildings[building].level + alreadyInQueue(building)}}</div>
// and
<label class="res-count-time">{{secsToString(config.buildings[building][village.buildings[building].level].time)}}</label>
I don't seem to understand why the other values don't update on update() as they should. There's no error in the code and I'm using the edge version (same result with the lastest version from 8th of April, 0.4.0).
UPDATE
I have stripped all the unnecessary data, and added a console.log in the alreadyQueued function. It gets called on init, but, when i call contentTPL.update() it doesn't get called anymore. Nothing updates in the file, when pressing the startQueue button. There's another contentTPL.update() when the queue expires, which updates only the level and the time needed as stated above. I'm asking Rich or Marty to advise on this problem as I'm stuck here for about 4 hours and can't seem to understand wether it is my misuse of the library or it's a bug.
It turns out this was a bug, which is now fixed in dev.

Align checkboxes within modal popup

I'm using Twitter Bootstrap which has been mostly painless. However, I just ran into the following problem when using inline checkboxes in a modal popup:
The first row of the checkboxes are not aligned correctly.
Note that if I remove the inline property, this continues:
The offending code is as follows:
<div class="modal-body">
<form class="form-horizontal">
<div class="row-fluid">
<div class="span4">
<h4 style="display:inline !important;">Client: </h4>
</div>
<div class="span4">
<h4 style="display:inline !important;">Start Date: </h4>
</div>
<div class="span4">
<h4 style="display:inline !important;">End Date: </h4>
</div>
</div>
<br />
<div class="row-fluid">
<div class="span12">
<h4 style="display:inline !important;">Industry: </h4> TBA
</div>
</div>
<br />
<div class="row-fluid">
<h4>Role: </h4>
<label class="checkbox inline">
<input type="checkbox" value="2"> .NET Developer
</label>
<label class="checkbox inline">
<input type="checkbox" value="1"> Business Analyst
</label>
<label class="checkbox inline">
<input type="checkbox" value="14"> Change Manager
</label>
*SNIP*
</div>
<br />
<div class="row-fluid">
<div class="span12">
<h4>Scope of Work (max. 150 words): </h4>
<textarea class="bdBox" rows="3"></textarea>
</div>
</div>
<br />
<div class="row-fluid">
<div class="span12">
<h4>Deliverables (max. 150 words): </h4>
<textarea class="bdBox" rows="3"></textarea>
</div>
</div>
</form>
</div>
Shortened for brevity.
Does anyone have any ideas on this, or should I take it to the Bootstrap issue list?
Figured this out.
There are two lines in the bootstrap.css file:
.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
The bottom line only applies the margin-left to checkboxes other than the first, meaning the first was not pushed across messing up the line.
If I move margin-left:10px into the first checkbox selector everything lines up. Mac's CSS was perfect for lining my checkboxes up too:
Here is something that I have tried and I suppose that is what you wanted
http://jsfiddle.net/xgKP4/

Resources