Skip to content

Commit

Permalink
code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
juniorvansuita authored and juniorvansuita committed Jun 13, 2020
1 parent 30c9270 commit 01d103b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 35 deletions.
16 changes: 5 additions & 11 deletions front/css/libs/jquery-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
width: 16px;
height: 16px;
}

.ui-widget-icon-block {
Expand All @@ -89,6 +91,9 @@
left: 0;
width: 100%;
height: 100%;
background: #aaaaaa;
opacity: .003;
filter: Alpha(Opacity=.3); /* support: IE8 */
}
.ui-accordion .ui-accordion-header {
display: block;
Expand Down Expand Up @@ -1059,11 +1064,6 @@ a.ui-button:active,
/* Icons
----------------------------------*/

/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_444444_256x240.png");
Expand Down Expand Up @@ -1301,12 +1301,6 @@ a.ui-button:active,
border-bottom-right-radius: 3px;
}

/* Overlays */
.ui-widget-overlay {
background: #aaaaaa;
opacity: .003;
filter: Alpha(Opacity=.3); /* support: IE8 */
}
.ui-widget-shadow {
-webkit-box-shadow: 0 0 5px #666666;
box-shadow: 0 0 5px #666666;
Expand Down
21 changes: 1 addition & 20 deletions front/js/control/customer/sale.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,6 @@ function printNFe(){
}
}

function copyTextFromElement(id) {
var range = document.createRange();
range.selectNode(document.getElementById(id));
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
document.execCommand("copy");
window.getSelection().removeAllRanges();
}

function showMenuMsg(holder, msg, type){
type == 'error' ? $(holder).children().attr('src','/img/error.png') : $(holder).children().attr('src','/img/checked.png');

$(holder).append($('<span>').addClass('msg-info').text(msg).delay(4000).queue(() => {
$('.msg-info').remove();
$(holder).children().attr('src','/img/dots.png');
}));
}

function bindClientSaleInfo(data){
$('.sale-client-name').text(data.client.name);
$('.sale-client-social-code').text(data.client.socialCode);
Expand Down Expand Up @@ -339,7 +321,6 @@ function bindSaleItens(data){
_post('/customer-sale-status-change',{ sale: data.oc, status: status, user: loggedUser, obs: obs }, (result) => {
if(result.sucess != null || result == true){
errorTooltip.hideDelay(3000).showSuccess('Status Alterado');
//showMenuMsg('.sale-header-dots','Status alterado', 'sucess');
}else{
helper.error();
errorTooltip.hideDelay(3000).showError('Erro ao cancelar NFe');
Expand All @@ -351,7 +332,7 @@ function bindSaleItens(data){
}
}

function bindSaleInfoViewer(data, callback){
function bindSaleInfoViewer(data){

bindDropdowns(data);

Expand Down
7 changes: 3 additions & 4 deletions front/js/control/product/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(document).ready(() => {
}
});

$('.print-local').click((e)=>{
$('.print-local').click(()=>{
if (lastSelected){
window.open('/product-print-locals?sku=' + lastSelected , '_blank');
}
Expand Down Expand Up @@ -84,7 +84,6 @@ function imageClickOpen(){
});
}

var skusCount = 0;

function requestProductChilds(){
requestProdutosFixes(() => {
Expand Down Expand Up @@ -188,10 +187,10 @@ function buildChildSku(product, child){
var active = child.situacao == 'A';

Dropdown.on($options)
.item('/img/barcode.png', 'Imprimir Etiqueta', (helper) =>{
.item('/img/barcode.png', 'Imprimir Etiqueta', () =>{
window.open('/barcode?sku=' + child.codigo, '_blank');
})
.item('/img/' + (active ? 'block' : 'checked') + '.png', active ? 'Inativar' : 'Ativar' , (helper) =>{
.item('/img/' + (active ? 'block' : 'checked') + '.png', active ? 'Inativar' : 'Ativar' , () =>{
showLoadingStatus();
_post('/product-active', {
sku: child.codigo,
Expand Down

0 comments on commit 01d103b

Please sign in to comment.