I need to select this input ...
(name="BtnNext" value="İLERİ" class="NavigationButtonNextLightBox ")
... with xpath after this modal popup. I cant use .FindByClass because there are same classes in the main page, but I need open which in (id="__LIGHTBOX__") modal;
<div style="overflow: visible; padding: 0px; width: auto; min-height: 143px; max-height: none; height: auto;" class="ui-dialog-content ui-widget-content" id="__LIGHTBOX__">
<div class="__BOX__">
<input name="BtnClose" class="BoxButtonClose" type="button">
<div>
<img src="/Content/themes/base/images/popup-bg-top.png">
</div>
<div class="popupCapsule clearFix">
<form action="/BillPayment/TransferInfo" method="post">
<div class="banner clearFix">
<h1 class="pageTitle">Fatura Ödeme</h1>
</div>
<div class="relatedPeopleContainer clearFix">
<div class="topDiv">
</div>
<div class="relatedPeople clearFix">
<table>
<tbody>
<tr>
<td class="t1">
<img src="Content/banks/bank205.png">
</td>
<td class="t2 SenderReceiverSubmit" rowspan="2" style="cursor: pointer;">
<div class="arrow">
</div>
</td>
<td class="t3">
<img src="Content/company/Turkcell.png">
</td>
</tr>
<tr>
<td class="t4">
<div class="info right">
<h2 class="NavigationButtonIndex" style="cursor: pointer;" title="Hesabınızı değiştirmek için tıklayınız.">HESABIM
<img src="/Content/themes/base/images/change-account.png" alt="" style="height: 20px; vertical-align: text-bottom;">
</h2>
<p class="first">
Beşyüzevler Şube
</p>
<p>
Cari Hesap
</p>
<p>
10136046-1
</p>
<p>
1.256,51 TL
</p>
</div>
</td>
<td class="t6">
<div class="info left">
<h2>TURKCELL
</h2>
<p class="first">
1774862559
</p>
<p>
5303003816
</p>
<p>
23,40 TL
</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bottomDiv">
</div>
</div>
<div class="amountEntry clearFix">
<table class="moneyEditorTable ">
<tbody>
<tr>
<td>
<input class="integerinput " data-val="true" data-val-regex="The field Integer must match the regular expression '[0-9.,]{1,11}'." data-val-regex-pattern="[0-9.,]{1,11}" datavalrequired="" disabled="disabled" id="IntegerInput" name="Amount.Integer" onkeyup=";" value="23" type="text"></td>
<td class="spanTd">
<span class="currency ">,</span>
</td>
<td>
<input maxlength="2" class="decimalinput " data-val="true" data-val-range="The field Decimal must be between 0 and 99." data-val-range-max="99" data-val-range-min="0" datavalrequired="" disabled="disabled" id="DecimalInput" name="Amount.Decimal" onkeypress="return BOA.Web.Validation.NumericControl(event);" onkeyup=";BOA.Web.Validation.DecimalPoint(event, $(this));" onpaste="BOA.Web.Validation.NumericEditorPaste(event, $(this));" value="40" type="text"></td>
<td class="spanTd">
<span class="currency ">TL</span>
</td>
</tr>
</tbody>
</table>
<input id="Amount_FECCode" name="Amount.FECCode" value="TL" type="hidden">
<div class="Error clearFix">
<span class="field-validation-valid" data-valmsg-for="Amount" data-valmsg-replace="true"></span>
</div>
</div>
<table class="popupButtonArea">
<tbody>
<tr>
<td class="left">
<input name="BtnPrev" value="GERİ" class="NavigationButtonPrev " type="button">
</td>
<td class="right">
<input name="BtnNext" value="İLERİ" class="NavigationButtonNextLightBox " type="button">
<input name="FromStep" value="TransferInfo" type="hidden">
</td>
</tr>
</tbody>
</table>
<input name="__RequestVerificationToken" value="jzI4c0v-PPC60xzaY8B2FDiCLYmHwCCtQsYv7UbBIMgnBWFeEpJoLLMDgf4LGl24WxhfizGlsqEJdjhywzgNHT785XHRzmwcU2qDyaQfSh6SajD8WKCAEq2L8CejPMJ65QL45A2" type="hidden">
</form>
</div>
<div>
<img src="/Content/themes/base/images/popup-bg-sub.png">
</div>
</div>
</div>
You can try to find the element by the following xpath :
//div[contains(#id, 'LIGHTBOX')]//input[#name='BtnNext' and contains(#class, 'NavigationButtonNextLightBox')]
Above xpath attempt to find a <div> having id contains LIGHTBOX, then from within that <div> get <input> element having name attribute equals BtnNext and class attribute contains NavigationButtonNextLightBox
Not sure am i missing somehting here, but whats stopping you from selecting by name?
WebElement btnNext = driver().findElement(By.name("BtnNext"));
Related
I have made text boxes for my website using Angular, users have an option to add more information by clicking a button that gives them another group of text boxes to fill in. However, when this happens the new text boxes appear with the previous information I filled in. I want the additional text boxes to be blank as they were with the first set, but I am not sure how to achieve this.
<button type="button" class="close" ng-click="$ctrl.closeInfoModel()">×</button>
<h5 class="title">Add Details</h5>
</div>
<div class="modal-body">
<ng-form name="detailsForm">
<div class="row">
<div class="col-sm-12">
<h5 class="modal-title">Client Details:
<a data-ng-show="!$ctrl.isEditingDetails && !$ctrl.addingAnotherSetOfDetails"
data-ng-click="$ctrl.addingAnotherSetOfDetails = true"><i class="tools-plus fa fa-plus" aria-hidden="true"></i></a>
<span data-ng-show="$ctrl.isEditingDetails || $ctrl.addingAnotherSetOfDetails">
<a title="Save" data-ng-click="$ctrl.saveDetails(detailsForm.$valid)" ><i class="tools-plus fa fa-floppy-o" aria-hidden="true"></i></a>
<a title="Saving" ng-if="$ctrl.isSavingDetails"><i class="tools-plus fa fa-spinner fa-spin" aria-hidden="true"></i></a>
<a title="Cancel" data-ng-click="$ctrl.stopEditingOrAdding()"><i class="tools-plus fa fa-times" aria-hidden="true"></i></a>
</span></h5>
<br>
<br>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<table class="table" ng-if="$ctrl.clientDetails.length == 0">
<thead>
<tr>
<td><b>Desired Amount</b></td>
<td><b>Credit Limit</b></td>
</tr>
</thead>
<tbody>
<tr>
<td ng-if="$ctrl.isEditingDetails && !ctrl.addingAnotherSetOfDetails">
<input name="desiredAmount" ng-model="$ctrl.inputDesiredAmount" type="text" class="form-control"
yl-account-address-text ng-minlength="3" ng-maxlength="30">
<div data-ng-click="$ctrl.deletedesiredAmount()"></div></td>
<td ng-if="$ctrl.isEditingDetails && !ctrl.addingAnotherSetOfDetails">
<input name="creditLimit" ng-model="$ctrl.inputCreditLimit" type="text" class="form-control"
yl-account-address-text ng-minlength="3" ng-maxlength="30">
<div data-ng-click="$ctrl.deleteCreditLimit()"></div></td>
</tr>
</tbody>
</table>
<table class="table" ng-if="$ctrl.clientDetails.length > 0">
<thead>
<tr>
<td><b>Desired Amount</b></td>
<td><b>Credit Limit</b></td>
</tr>
</thead>
<tbody>
<tr ng-repeat="criteria in $ctrl.clientDetails">
<td ng-if="!$ctrl.isEditingDetails">{{criteria.desiredAmount}}</td>
<td ng-if="$ctrl.isEditingDetails && !ctrl.addingAnotherSetOfDetails">
<input name="desiredAmount" ng-model="$ctrl.inputdesiredAmount" type="text" class="form-control"
yl-account-address-text ng-minlength="3" ng-maxlength="30">
<div data-ng-click="$ctrl.deletedesiredAmount()"></div></td>
<td ng-if="!$ctrl.isEditingDetails">{{criteria.CreditLimitLimit}}</td>
<td ng-if="$ctrl.isEditingDetails && !ctrl.addingAnotherSetOfDetails">
<input name="creditLimit" ng-model="$ctrl.inputCreditLimit" type="text" class="form-control"
yl-account-address-text ng-minlength="3" ng-maxlength="30">
<div data-ng-click="$ctrl.deleteCreditLimit()"></div></td>
</tr>
</tbody>
</table>
<table class="table" ng-if="$ctrl.addingAnotherSetOfDetails">
<thead>
</thead>
<tbody>
<tr>
<td>
<input name="desiredAmount" ng-model="$ctrl.inputdesiredAmount" type="text" class="form-control"
yl-account-address-text ng-minlength="3" ng-maxlength="30">
<div data-ng-click="$ctrl.deletedesiredAmount()"></div></td>
<td>
<input name="creditLimit" ng-model="$ctrl.inputCreditLimit" type="text" class="form-control"
yl-account-address-text ng-minlength="3" ng-maxlength="30">
<div data-ng-click="$ctrl.deleteCreditLimit()"></div></td>
</tr>
</tbody>
</table>
</div>
</div>
Component file
All references to the function that adds text boxes are below, I set addingAnotherSetOfDetails to false in the component controller
public stopEditingOrAdding(): void {
this.isEditingDetails = false;
this.addingAnotherSetOfDetails = false;
}
public saveDetailsForClients(isFormValid: boolean): void {
if (!isFormValid) {
return;
}
let clientDetails = new app.domain.detailsCriteriaModel(this.inputDesiredAmount, this.inputCreditLimit);
this.detailsCriteria.push(clientDetails);
this.isEditingDetails = false;
this.addingAnotherSetOfDetails = false;
}
We are using PayPal Express to quick checkout on the cart level. We would like to add "another" button that says PayPal Credit but has the same target with the original PayPal Express button. Extending clickable area of the first button would resolve the issue. Or could it be possible to make the 2nd button have the same target?
<script type="text/javascript">
lang.InvalidQuantity = "%%LNG_InvalidQuantity%%";
lang.Calculating = "%%LNG_Calculating%%"
lang.CalculateShipping = "%%LNG_CalculateShipping%%"
lang.ChooseShippingMethod = "%%LNG_ChooseShippingMethod%%"
lang.CartRemoveConfirm = '%%LNG_CartRemoveConfirm%%';
lang.ConfirmRemoveGiftWrapping = '%%LNG_ConfirmRemoveGiftWrapping%%';
lang.SelectCountry = '%%LNG_ChooseShippingCountry%%';
lang.SelectState = '%%LNG_ChooseShippingState%%';
lang.EnterZip = '%%LNG_EnterShippingZip%%';
</script>
<script src="%%GLOBAL_CdnAppPath%%/javascript/jquery/plugins/imodal/imodal.js?%%GLOBAL_JSCacheToken%%" type="text/javascript"></script>
<div class="Block Moveable Panel" id="CartContent_modified">
<div class="BlockContent">
<div style="display: %%GLOBAL_HideShoppingCartGrid%%" id="CartFormContainer">
<form enctype="multipart/form-data" onsubmit="return Cart.ValidateQuantityForm(this);" action="/cart.php" name="cartForm" id="cartForm" method="post">
<input type="hidden" name="action" value="update" />
<table class="CartContents Stylize General" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th class="HL-CartItems" colspan="2">%%LNG_CartItems%%</th>
<th class="HL-Qty">%%LNG_Qty%%</th>
<th class="HL-Remove"> </th>
<th class="HL-ItemPrice">%%LNG_ItemPrice%%</th>
<th class="HL-Total">%%LNG_HC_total%%</th>
</tr>
</thead>
<tfoot>
<tr class="SubTotal">
<td colspan="6"><div>%%LNG_Subtotal%% <em class="ProductPrice">%%GLOBAL_CartItemTotal%%</em></div></td>
</tr>
<tr class="SubTotal" style="%%GLOBAL_HideGiftWrappingTotal%%">
<td colspan="6"><div>%%LNG_GiftWrapping%% <em class="ProductPrice">%%GLOBAL_GiftWrappingTotal%%</em></div></td>
</tr>
%%SNIPPET_NormalCoupons%%
<tr class="SubTotal" style="%%GLOBAL_HideDiscountAmount%%">
<td colspan="6"><div>%%LNG_Discount%% <em class="ProductPrice">%%GLOBAL_DiscountAmount%%</em></div></td>
</tr>
<tr class="SubTotal" style="display:none;">
<td colspan="6" class="HL-ShoppingCartShippingEstimator">
<div>
<em>%%LNG_CalculateShippingHandling%%</em>
<div class="EstimateShipping" style="display: none;">
<div class="EstimatedShippingMethods" style="display: none;">
<div class="ShippingMethodList">
</div>
</div>
<dl class="hideThis">
<dt><span class="Required">*</span> %%LNG_Country%%:</dt>
<dd>
<select name="shippingZoneCountry" id="shippingZoneCountry" onchange="Cart.ToggleShippingEstimateCountry();">
%%GLOBAL_ShippingCountryList%%
</select>
</dd>
<dt><span class="Required" id="shippingZoneStateRequired">*</span> %%LNG_StateProvince%%:</dt>
<dd>
<select style="display: %%GLOBAL_ShippingHideStateList%%" name="shippingZoneState" id="shippingZoneState">
%%GLOBAL_ShippingStateList%%
</select>
<input style="display: %%GLOBAL_ShippingHideStateBox%%" type="text" class="Textbox" name="shippingZoneStateName" id="shippingZoneStateName" value="%%GLOBAL_AddressState%%" />
</dd>
<dt><span class="Required">*</span> %%LNG_ZipPostcode%%:</dt>
<dd><input type="text" class="Textbox" name="shippingZoneZip" id="shippingZoneZip" value="%%GLOBAL_ShippingZip%%" /></dd>
<!--dd class="Submit EstimateShippingButtons">
<input type="button" onclick="Cart.EstimateShipping();" value="%%LNG_CalculateShipping%%" class="btn alt" />
<div>%%LNG_Cancel%%</div>
</dd-->
</dl>
<p class="Submit EstimateShippingButtons">
<span>%%LNG_Cancel%% %%LNG_or%% </span><input type="button" onclick="Cart.EstimateShipping();" value="%%LNG_CalculateShipping%%" />
</p>
</div>
</div>
</td>
</tr>
<tr style="display:%%GLOBAL_HideShoppingCartShippingCost%%" class="SubTotal ShippingRow">
<td colspan="6"><div>%%LNG_Shipping%% (%%GLOBAL_ShippingProvider%%) <em class="ProductPrice">%%GLOBAL_ShippingCost%%</em></div></td>
</tr>
%%SNIPPET_FreeShippingCoupons%%
<tr style="display: %%GLOBAL_HideShoppingCartHandlingCost%%" class="SubTotal">
<td colspan="6"><div>%%LNG_Handling%% <em class="ProductPrice">%%GLOBAL_HandlingCost%%</em></div></td>
</tr>
%%GLOBAL_Taxes%%
%%SNIPPET_GiftCertificates%%
<tr class="SubTotal gtotal">
<td colspan="6"><div>%%LNG_GrandTotal%% <em class="ProductPrice">%%GLOBAL_CartTotal%%</em></div></td>
</tr>
%%GLOBAL_InclusiveTaxes%%
</tfoot>
<tbody>
%%SNIPPET_CartItems%%
</tbody>
</table>
<div class="KeepShopping">
Continue shopping
</div>
<div class="updateCart">
<input class="btn" type="submit" value="Update Cart" title="%%LNG_Update%%" />
</div>
</form>
<div class="ProceedToCheckout">
<!--div class="CheckoutButton" style="%%GLOBAL_HideCheckoutButton%%">
<a class="btn" href="%%GLOBAL_CheckoutLink%%" onclick="" title="%%LNG_CheckoutButtonTitle%%">%%LNG_HC_proceedcheckout%%</a>
</div-->
<div class="CheckoutButton" style="%%GLOBAL_HideCheckoutButton%%">
<a href="%%GLOBAL_CheckoutLink%%" onclick="%%GLOBAL_OptimizerLinkFunction%%" title="%%LNG_CheckoutButtonTitle%%">
%%GLOBAL_CartCheckoutButtonOptimizerScriptTag%%
<img src="https://cdn2.bigcommerce.com/server5400/vpslo31z/templates/__custom/images/blue/checkout.gif" alt="" />
%%GLOBAL_CartCheckoutButtonOptimizerNoScriptTag%%
</a>
</div>
<div class="AlternativeCheckout" style="%%GLOBAL_HideMultipleAddressShipping%%">
<p class="PTB20"><span style="%%GLOBAL_HideMultipleAddressShippingOr%%">-- %%LNG_or%% --</span><strong>%%LNG_CheckoutWithMultipleAddresses%%</strong></p>
</div>
%%GLOBAL_AdditionalCheckoutButtons%%
<div class="AlternativeCheckout">
<img src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/ppcredit_MD_BNPOT_1x.png" alt="PayPal Credit" /> </div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div style="display: %%GLOBAL_HideShoppingCartEmptyMessage%%">
<p class="InfoMessage">
%%LNG_NoItemsInCart%%
</p>
%%LNG_EmptyCartInfo%%
<br>
%%LNG_ContinueShopping%% %%LNG_OnThe%% %%GLOBAL_StoreName%% %%LNG_EmptyHomePage%%
</div>
</div>
</div>
<script type="text/javascript">
if (location.pathname !== '/checkout.php'){
$('.EstimateShippingLink').click();
$('#shippingZoneCountry').val(226);
$('#shippingZoneState').val(51);
$('#shippingZoneZip').val(19132);
/*
$('#shippingZoneCountry').change(function() {
$('#shippingZoneState').val(51);
$('#shippingZoneState').change(function(){
$('#shippingZoneZip').val(19132);
});
});*/
$('.Submit.EstimateShippingButtons > input').click();
$('.hideThis').hide();
$('.Submit.EstimateShippingButtons').hide();
}
$(document).ready(function(){
//var labelForFixedShipping= $("div.shippingquote label").filter(function() { return ($(this).text().trim() === "Fixed Shipping") });
//$("#shippingLabel").text($("#shippingLabel").text().replace("Fixed Shipping", "Your Shipping Cost"));
//alert($('#shippingLabel').html());
//alert(labelForFixedShipping);
//alert("Text");
//alert(labelForFixedShipping.text());
//labelForFixedShipping.text("Your Shipping Cost");
var ht = $("label[for = shippingLabel]").text();
//alert(ht);
});
</script>
<script type="text/javascript">
$(function() {
var cartSubtotal = parseFloat("%%GLOBAL_CartItemTotal%%".replace(/[$,]/g, ''));
if (cartSubtotal > 50) {
$("<a href='http:/yourdomain.com/cart.php?action=add&product_id=8122'></a>").click();
}
});
</script>
<script>
if (location.pathname !== '/checkout.php'){
$(document).ajaxComplete(function(){
sessionStorage.setItem('totals', $('table.CartContents>tfoot').html());
});
}
</script>
i have one issue can anyone help me please...
i have a table in that table i have four users. and i have two icons(one is for expanding and another is for collapsing table rows data at time(all)) above table when i clicked on expand icon the data in table expanded and collapsed. so until this fine to me . now am going to expand particular row of table by clicking arrow(actually present in tr) it expanded particular row and collapsed that particular row. then this time if a clicked expand and collapse icons(expand all and collapse all). then expanding and collapsing are not working.
Here am using ng-repeat-start and ng-repeat-end.
<div class="comprehensiveINDiv" ng-show="visibleCarConferenceList">
<div class="top-bg-expand" >
<div class="col-md-5 color-blue">
<h1 class="main-heading1 ">Care Conference
<span class="expand-btns">
<a><i class="fa fa-compress color-blue" aria-hidden="true" ng-click="expanded = true"></i></a>
|
<a><i class="fa fa-expand" aria-hidden="true" ng-click="loadAllcareplans(); expanded = !expanded"></i></a>
</span>
</h1>
</div>
<div class="col-md-3 select-pan1 select-inner-pan1 careconfhed">
<label>Status: </label>
<select ng-model="filterOpt.opt"
ng-options="item.name for item in filterOpts.options"
ng-change="getCareConferenceList();resetPage();">
</select>
</div>
<div class="col-md-4 ">
<sm-range-picker-input class="margn0" fname="Range" label="Range"
form="test" ng-model="vm.rangeSelected" flex="100"
format="DD-MMM-YYYY" divider="To" week-start-day="Monday"
on-range-select="rangeSelected(range)"
ng-change="getCareConferenceList();">
</sm-range-picker-input>
</div>
</div>
<div ng-show="noConfData" class="margnL15">NO RECORDS FOUND</div>
<div>
<button type="button" class="btn btn-info btn-sm margnL15"
id="addnew_btn" ng-click="addNewconference();">ADD NEW</button>
</div>
<div ng-show="confGrid">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-data3 tablestyle" id="tbl1">
<thead>
<tr>
<th></th>
<th> Date / Time </th>
<th>Reason</th>
<th>Status </th>
<th>Action</th>
<!--<th>time</th>-->
</tr>
</thead>
<tbody>
<tr ng-show="noConfData"><td colspan="4" >NO RECORDS FOUND</td></tr>
<tr ng-repeat-start="careconf in residentCareConferenceList" class="md-table-content-row class_{{careconf.CareConferenceID}}">
<td><a ng-click="expanded = !expanded"><i class="fa fa-angle-right" aria-hidden="true"></i></a></td>
<td ng-class="customClass[h.field]" class="md-table-content">{{careconf.CareConferenceDate | date:'dd/MM/yyyy hh:mm a'}}</td>
<td ng-class="customClass[h.field]" class="md-table-content">{{careconf.ReasonDescription}}</td>
<td ng-class="customClass[h.field]" class="md-table-content">{{careconf.careconferencestatus.CareConferenceStatusDescription}}</td>
<td><span class="fa fa-pencil" ng-click="EditCareConference(careconf.CareConferenceID);$event.stopPropagation();"></span></td>
<!--<td ng-class="customClass[h.field]" class="md-table-content">{{careconf.TotalTime}}</td>-->
</tr>
<tr ng-repeat-end ng-class="{'hide' : expanded}">
<td colspan="5" style="width: 100%; border:none !important; padding-left:20px;">
<div class="col-md-12 scrolldata">
<div class="col-md-12 ">
<div class="col-md-12 residance-data-text">
<p>Facility :{{careconf.facilitybase.FacilityName }}</p>
<p> Resident : {{currentResident.personbase.FullName}}</p>
<p> Admitted :{{currentResidentDetails.AdmitReAdmiDischDate | date:'dd/MM/yyyy hh:mm a'}}</p>
<p> Physician : {{residentprovider}}</p>
</div>
</div>
<div class="col-md-12" id="table">
<div class="col-md-12">
<!-- Table one -->
<p> Interdisciplinary team members involved in this Resident's Care Planning since last Care Conference ({{careconf.LastCareConferenceDate | date:'dd/MM/yyyy hh:mm a'}}) :</p>
<div class="tablestyledit">
<table class="table">
<tr>
<th width="50%" class="bdr-table">Name </th>
<th width="50%" class="bdr-table">Credentials </th>
</tr>
<tr ng-repeat="teamMember in careconf.teamMembers">
<td class="bdr-table">{{teamMember.ParticipantName}}</td>
<td class="bdr-table">{{teamMember.ParticipantRole}}</td>
</tr>
</table>
</div>
<div class="col-md-12" style="padding-top:0px;">
<div class="row">
<div class="md-form">
<p style="margin:0px;">Care Conference Summary</p>
<div class="empty-text">{{careconf.CareConferenceSummary}}</div>
</div>
</div>
</div>
<!--- /Table one -->
<!-- Table two -->
<div class="col-md-12" style="padding:0px;">
<p style="margin:0px; padding-top:10px;">Care Conference Participants :</p>
<div class="tablestyledit">
<table class="table ">
<tr>
<th width="50%" class="bdr-table">IDT Participant Name</th>
<th width="25%" class="bdr-table">Credentials</th>
<th width="25%" class="bdr-table">In Person</th>
</tr>
<tr ng-repeat="participant in careconf.participants">
<td class="bdr-table">{{participant.ParticipantName}}</td>
<td class="bdr-table">{{participant.ParticipantRole}}</td>
<td class="bdr-table">
<fieldset class="form-group">
<input type="checkbox" data-ng-model="participant.IsInPerson" disabled>
</fieldset>
</td>
</tr>
</table>
</div>
</div>
<!--/ Table two -->
<!-- Table three -->
<div class="col-md-12" style="padding:0px;">
<p style="margin:0px; padding-top:10px;">Family/Resident Attendance : </p>
<div class="tablestyledit">
<table class="table table-data-sub ">
<tr>
<th class="bdr-table">Name of person Invited</th>
<th class="bdr-table">Relationship</th>
<th class="bdr-table">Attended</th>
<th class="bdr-table">In Person</th>
</tr>
<tr ng-repeat="familyMember in careconf.familyMembers">
<td class="bdr-table">{{familyMember.ParticipantName}}</td>
<td class="bdr-table">{{familyMember.Relationship}}</td>
<td class="bdr-table">
<fieldset class="form-group">
<input type="checkbox" data-ng-model="familyMember.HasAttended" disabled>
</fieldset>
</td>
<td class="bdr-table">
<fieldset class="form-group">
<input type="checkbox" data-ng-model="familyMember.IsInPerson" disabled>
</fieldset>
</td>
</tr>
</table>
</div>
</div>
<div class="col-md-12" style="margin-left:-15px;margin-bottom:8px;">
<p> Care Conference Date : {{careconf.CareConferenceDate | date:'dd/MM/yyyy hh:mm a'}}</p>
<p>Signed by:</p>
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<div flex layout="column" class="pagi-nation">
<div ng-show="confTotal > 1" flex layout="column">
<section layout="row" layout-padding="">
<div class="col-md-5 col-xs-12">Showing Page <strong>{{confPage}}</strong></div>
<div class="col-md-7 col-xs-12">
<cl-paging id="confPage" flex cl-pages="confTotal" , cl-steps="3" , cl-page-changed="loadConfPages.onPageChanged()" , cl-align="center center"
, cl-current-page="Paging.currentPage"></cl-paging>
</section>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-show="visibleCarConferenceAdd">
<div ng-include="'views/doctor/addCareConference.html'"></div>
</div>
</div>
and my controller code
$scope.loadAllcareplans = function () {
$scope.expanded = true;
}
and finally am so sorry for my stupid english. and check my functinality (expanded, $scope.loadAllcareplans() and icons at careconference foe expanding and collapsing all table data )
Check this fiddle
The content is not what you provided.
But the logic will be this
https://jsfiddle.net/athulnair/wkz5oq9z/
$scope.collapseAll = function() {
$scope.data.forEach(function(item) {
item.isCollapsed = false;
})
}
Rather than using the above ng-click function in the tag you could go with javascript and adding/removing classes dynamically.I have used ui-bootstrap and glyphicon. Follow the below code.
HTML:
<a data-toggle="collapse" data-target="#test"><i class="test_icon glyphicon glyphicon-collapse-down"></i><h4 class="header"> Test Class </h4></a>
JavaScript
$('#test').on('hidden.bs.collapse', function () {
$(".test_icon").removeClass("glyphicon-collapse-down").addClass("glyphicon-collapse-up");
});
$('#test').on('shown.bs.collapse', function () {
$(".test_icon").removeClass("glyphicon-collapse-up").addClass("glyphicon-collapse-down");
});
Here is my page content
<div class="entry-content">
<div class="gv-grid">
<div class="gv-grid-col-1-1 gv-left">
<form class="gv-widget-search gv-search-vertical" method="get" action="https://www.mypage.com/test/">
<div class="gv-search-box">
<div class="gv-search">
<label for="gv_search_11">Tìm kiếm</label>
<p><input name="gv_search" id="gv_search_11" value="" type="text"></p>
</div>
</div> <div class="gv-search-box gv-search-box-submit">
<input name="mode" value="all" type="hidden">
<input class="button gv-search-button" id="gv_search_button_11" value="Search" type="submit">
</div>
</form>
</div>
<div class="gv-grid-col-1-2 gv-left">
</div>
<div class="gv-grid-col-1-2 gv-right">
</div>
</div>
<div class="gv-table-container gv-container">
<table class="gv-table-view">
<thead>
<tr>
<th id="gv-field-1-2" class="gv-field-1-2" style=""><span class="gv-field-label"> Cần mua hộ</span></th>
<th id="gv-field-1-6" class="gv-field-1-6" style=""><span class="gv-field-label"> Tiền công</span></th>
<th id="gv-field-1-15" class="gv-field-1-15" style=""><span class="gv-field-label"> Nơi mua</span></th>
<th id="gv-field-1-5" class="gv-field-1-5" style=""><span class="gv-field-label"> Nơi giao</span></th>
<th id="gv-field-1-4" class="gv-field-1-4" style=""><span class="gv-field-label"> Giao đồ trước</span></th>
<th id="gv-field-1-entry_link" class="gv-field-1-entry_link" style=""><span class="gv-field-label">Link</span></th>
</tr>
</thead>
<tbody>
<tr class="alt">
<td id="gv-field-1-2" class="gv-field-1-2">CEZANNE Lasting Lip Color N 402</td>
<td id="gv-field-1-6" class="gv-field-1-6">80 000</td>
<td id="gv-field-1-15" class="gv-field-1-15">Nhật Bản</td>
<td id="gv-field-1-5" class="gv-field-1-5">Hà Nội</td>
<td id="gv-field-1-4" class="gv-field-1-4">14/04/2016</td>
<td id="gv-field-1-entry_link" class="gv-field-1-entry_link">Chi tiết</td>
</tr>
</tbody>
<tfoot>
<tr>
<th id="gv-field-1-2" class="gv-field-1-2"><span class="gv-field-label"> Cần mua hộ</span></th>
<th id="gv-field-1-6" class="gv-field-1-6"><span class="gv-field-label"> Tiền công</span></th>
<th id="gv-field-1-15" class="gv-field-1-15"><span class="gv-field-label"> Nơi mua</span></th>
<th id="gv-field-1-5" class="gv-field-1-5"><span class="gv-field-label"> Nơi giao</span></th>
<th id="gv-field-1-4" class="gv-field-1-4"><span class="gv-field-label"> Giao đồ trước</span></th>
<th id="gv-field-1-entry_link" class="gv-field-1-entry_link"><span class="gv-field-label">Link</span></th>
</tr>
</tfoot>
</table>
</div><!-- end .gv-table-container -->
<div class="gv-grid">
<div class="gv-grid-col-1-1 gv-left">
</div>
<div class="gv-grid-col-1-2 gv-left">
</div>
<div class="gv-grid-col-1-2 gv-right">
</div>
</div>
<input class="gravityview-view-id" value="11" type="hidden">
<div class="gv-grid">
<div class="gv-grid-col-1-1 gv-left">
<form class="gv-widget-search gv-search-vertical" method="get" action="https://www.mypage.com/test/">
<div class="gv-search-box">
<div class="gv-search">
<label for="gv_search_7770">Tìm kiếm</label>
<p><input name="gv_search" id="gv_search_7770" value="" type="text"></p>
</div>
</div> <div class="gv-search-box gv-search-box-submit">
<input name="mode" value="all" type="hidden">
<input class="button gv-search-button" id="gv_search_button_7770" value="Search" type="submit">
</div>
</form>
</div>
<div class="gv-grid-col-1-2 gv-left">
</div>
<div class="gv-grid-col-1-2 gv-right">
</div>
</div>
<div class="gv-list-container gv-container">
<div id="gv_list_30" class="gv-list-view">
<div class="gv-list-view-title">
<h3 id="gv-field-1-custom" class="gv-field-1-custom"><b>Ga Cong Nghiep</b> cần mua <b>Giày zara kid size 37</b> bán tại <b>Tây Ban Nha</b></h3>
</div>
<div class="gv-grid gv-list-view-content">
<div class="gv-grid-col-1-3 gv-list-view-content-image"><div id="gv-field-1-14" class="gv-image gv-field-1-14"><a rel="gv-field-1-14-30" class="thickbox" target="_blank" href="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/1050103050_2_3_1.jpg"><img scale="0" src="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/1050103050_2_3_1.jpg" alt="Ảnh" class="gv-image gv-field-id-14" width="250"></a></div></div><div class="gv-grid-col-2-3 gv-list-view-content-description">
<div id="gv-field-1-custom" class="gv-field-1-custom">
<h4><span class="gv-field-label"></span></h4><p>
Nơi giao hàng: Lạng Sơn<br>
Tiền hàng: 25.95 EUR<br>
Tiền công : 150,000 VND<br>
(Có thể mặc cả tiền công)
</p>
<p>
<button>Chi tiết</button>
</p>
</div>
</div>
</div>
</div>
<div id="gv_list_23" class="gv-list-view">
<div class="gv-list-view-title">
<h3 id="gv-field-1-custom" class="gv-field-1-custom"><b>Nguyễn Yên</b> cần mua <b>3 hộp kem đánh răng</b> bán tại <b>Nhật Bản</b></h3>
</div>
<div class="gv-grid gv-list-view-content">
<div class="gv-grid-col-1-3 gv-list-view-content-image"><div id="gv-field-1-14" class="gv-image gv-field-1-14"><a rel="gv-field-1-14-23" class="thickbox" target="_blank" href="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/kem-danh-rang.jpg"><img scale="0" src="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/kem-danh-rang.jpg" alt="Ảnh" class="gv-image gv-field-id-14" width="250"></a></div></div><div class="gv-grid-col-2-3 gv-list-view-content-description">
<div id="gv-field-1-custom" class="gv-field-1-custom">
<h4><span class="gv-field-label"></span></h4><p>
Nơi giao hàng: Hà Nội<br>
Tiền hàng: 513 JPY<br>
Tiền công : 85,000 VND<br>
(Có thể mặc cả tiền công)
</p>
<p>
<button>Chi tiết</button>
</p>
</div>
</div>
</div>
</div>
<div id="gv_list_25" class="gv-list-view">
<div class="gv-list-view-title">
<h3 id="gv-field-1-custom" class="gv-field-1-custom"><b>Trường Hải Minh</b> cần mua <b>Đồng hồ Casio WAVECEPTOR WVQ-M410DE-2A2JF</b> bán tại <b>Nhật Bản</b></h3>
</div>
<div class="gv-grid gv-list-view-content">
<div class="gv-grid-col-1-3 gv-list-view-content-image"><div id="gv-field-1-14" class="gv-image gv-field-1-14"><ul class="gv-field-file-uploads gv-field-1-14"><li><a rel="gv-field-1-14-25" class="thickbox" target="_blank" href="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/51Pj4cBrBpL.jpg"><img scale="0" src="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/51Pj4cBrBpL.jpg" alt="Ảnh" class="gv-image gv-field-id-14" width="250"></a></li><li><a rel="gv-field-1-14-25" class="thickbox" target="_blank" href="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/81xcVWtGDyL._UL1500.jpg"><img scale="0" src="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/81xcVWtGDyL._UL1500.jpg" alt="Ảnh" class="gv-image gv-field-id-14" width="250"></a></li></ul></div></div><div class="gv-grid-col-2-3 gv-list-view-content-description">
<div id="gv-field-1-custom" class="gv-field-1-custom">
<h4><span class="gv-field-label"></span></h4><p>
Nơi giao hàng: Hà Nội<br>
Tiền hàng: 15,370 JPY<br>
Tiền công : 200,000 VND<br>
(Có thể mặc cả tiền công)
</p>
<p>
<button>Chi tiết</button>
</p>
</div>
</div>
</div>
</div>
<div id="gv_list_21" class="gv-list-view">
<div class="gv-list-view-title">
<h3 id="gv-field-1-custom" class="gv-field-1-custom"><b>Nguyễn Hương</b> cần mua <b>CEZANNE Lasting Lip Color N 402</b> bán tại <b>Nhật Bản</b></h3>
</div>
<div class="gv-grid gv-list-view-content">
<div class="gv-grid-col-1-3 gv-list-view-content-image"><div id="gv-field-1-14" class="gv-image gv-field-1-14"><a rel="gv-field-1-14-21" class="thickbox" target="_blank" href="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/N402.jpg"><img scale="0" src="https://www.mypage.com/wp-content/uploads/gravity_forms/1-f9c2348184f1140e486c01fab8f03460/2016/03/N402.jpg" alt="Ảnh" class="gv-image gv-field-id-14" width="250"></a></div></div><div class="gv-grid-col-2-3 gv-list-view-content-description">
<div id="gv-field-1-custom" class="gv-field-1-custom">
<h4><span class="gv-field-label"></span></h4><p>
Nơi giao hàng: Hà Nội<br>
Tiền hàng: 518 JPY<br>
Tiền công : 80,000 VND<br>
(Có thể mặc cả tiền công)
</p>
<p>
<button>Chi tiết</button>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="gv-grid">
<div class="gv-grid-col-1-1 gv-left">
</div>
<div class="gv-grid-col-1-2 gv-left">
</div>
<div class="gv-grid-col-1-2 gv-right">
</div>
</div>
<input class="gravityview-view-id" value="7770" type="hidden">
I want to use css to hide the first two div of .entry-content.
How can I do it?
You can do following way using :first-child css:
.entry-content div:first-child, .entry-content div:first-child + div {
display:none;
}
<div class="entry-content">
<div class="gv-grid">1</div>
<div class="gv-table-container gv-container">2</div>
<div class="gv-grid">3</div>
<div class="gv-table-container gv-container">4</div>
</div>
Edit:
As per you html structure use css like following:
.entry-content > div:first-child, .entry-content > div:first-child + div {
display:none;
}
Try using the nth-child selector:
.entry-content div:nth-child(-n+2){
display:none;
}
<div class="entry-content">
<div class="gv-grid">1st</div>
<div class="gv-table-container gv-container">2nd</div>
<div class="gv-grid">3rd</div>
<div class="gv-table-container gv-container">4th</div>
</div>
<div class="entry-content">
<div class="gv-grid" style="display: none;">...</div> //HIDE THIS
<div class=gv-table-container gv-container" style="display: none;">...</div> //HIDE THIS
<div class="gv-grid">...</div>
<div class=gv-table-container gv-container">...</div>
</div>
style tag is embedded CSS.
Simple CSS2.1 version of this uses the sibling selector.
.gv-grid, .gv-table-container {
display: none;
}
.gv-grid ~ .gv-grid, .gv-table-container ~ .gv-table-container {
display: block;
}
The way the sibling selector works is that is will fire if an element has an earlier sibling that matches.
So the first rule applies to all .gv-grid and .gv-table-container elements within a shared parent; the subsequent rule will override it for later .gv-grid and .gv-table-container elements.
I have an accordion menu, which works fine. However, I would like to have a single wrapping tag to denote the entire accordion content.
Accordion presents a single question (in its tap) and User's response in the accordion content.
Here's what I have:
<div class="questions"> <!-- this div open accordion tab-->
<!-- If I place a tag here, before "QBlock" - accordion stops working -->
<div id="QBlock"> <!-- This is where accordion content begins -->
<table id="QTable">
<tr>
<td width="45" align="left" valign="top" scope="row">
<div id="QNumber">4.2</div>
</td>
<td width="100%" align="left" valign="top">
<div id="QText">text</div>
</td>
</tr></table>
</div>
<div>
<table id="RTable">
<tr>
<td width="100%" align="left" valign="top" style="padding-right:20px">
<div id="Guidance"><p>content</p></div>
</td>
<td width="550" align="left" valign="baseline">
<div id="Response" class="Response">
<label><input type="radio" name="Radio402" value="Y" id="Radio_402Y" onchange='radioChange(this, "402")'>Yes</label>
<label><input type="radio" name="Radio402" value="N" id="Radio_402N" onChange='radioChange(this, "402")'>No</label>
</div>
<span id="responseDetails">
<div id="Observation">
<label for="observation">Observation:</label>
<textarea name="observation" id="Obs402" rows="6" disabled style="width: 530px;" placeholder="Enter text of observation here ..."></textarea></div>
<div id="DueDate">
<label for="DueDate">Due date:<br></label>
<input name="DueDate" type="date" id="DueDate402"/>
</div>
<div id="proposedActions">
<label for="porposedActions">Proposed actions:</label>
<textarea name="proposedActions" id="pa402" rows="6" style="width: 530px;"></textarea>
</div>
</span>
</td>
</tr>
</table>
</div>
</div> <!-- this div closes the accordion tab -->
What I would like to do is to have a structure allowing me to wrap this whole question and place an id to it, something like
<section id="Q001"> ... </section>
which starts right ABOVE "QBlock" and ends before the final tag but accordion seems not to allow any other wrapping . Thanks in advance.