Skip to content

Instantly share code, notes, and snippets.

@mahbub-shohag
Last active October 21, 2018 12:36
Show Gist options
  • Save mahbub-shohag/6bb4775b08417209f0de192afa8cb4f4 to your computer and use it in GitHub Desktop.
Save mahbub-shohag/6bb4775b08417209f0de192afa8cb4f4 to your computer and use it in GitHub Desktop.
in js : $(event.target).parent().addClass('selected_requisition');
in view : markAsSelected($event)
ng-class="{largeWidth: myVar == 'ok', smallWidth: myVar != 'ok'}"
$scope.markAsSelected = function(event){
console.log(event.target);
console.log($('tr.selected_requisition').parent());
$('tr.selected_requisition').parent().find('.selected_requisition').removeClass('selected_requisition');
if(event.target.type=='checkbox'){
$(event.target).parent().parent().addClass('selected_requisition');
}else{
$(event.target).parent().addClass('selected_requisition');
}
}
--Angularjs Dropdown--
<ui-select style="background: lightgray;margin-left: 8px;height: 30px;" ng-model="pog.SUPPLIER" theme="selectize" ng-disabled="disabled" title="Choose a Sullier">
<ui-select-match>{{$select.selected.SUPPLIER_NAME}}</ui-select-match>
<ui-select-choices repeat="supplier in supplierList | filter: {SUPPLIER_NAME:$select.search}">
<span ng-bind-html="supplier.SUPPLIER_NAME | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
<ui-select style="background: lightgray;margin-left: 8px;height: 25px;" ng-model="poa.P_FROM_STORE_NO" theme="selectize" ng-disabled="disabled" title="Choose a Sullier">
<ui-select-match>{{$select.selected.STORE_NAME}}</ui-select-match>
<ui-select-choices repeat="store in storeList | filter: {STORE_NAME:$select.search}">
<span ng-bind-html="store.STORE_NAME | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
css
#indentDideBar .selectize-input{padding: 3px 8px !important;border: solid 1px #3dadce !important;}
#indentDideBar .selectize-input{padding: 3px 8px;}
#indentDideBar .ui-select-container{ width: 201px; }
#indentDideBar .selectize-control.single .selectize-input{
border: solid 1px #0690b0;
}
#indentDideBar .selectize-input{width: 201px !important; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment