Skip to content

Commit

Permalink
Bitch moan, the page is reloading
Browse files Browse the repository at this point in the history
No more whining. close #719
  • Loading branch information
wilpig committed Jan 24, 2016
1 parent fa4c6b9 commit 40d5dc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions cabnavigator.php
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,6 @@ function bindworkorder(obj){
// move the chassis position to the opposite side, this looks dumb
if($(target).find('div:not(.label):not(.label > div)').length>0){
style=style.replace('right','left');
console.log(style);
}

// Make a point for us to click to add to this nonsense
Expand All @@ -753,9 +752,12 @@ function bindworkorder(obj){
span.on('click', function(){
sneaky.sneak();
flippyfloppy();
console.log(workOrder.items().length);
// reload the page to show the workorder button if it isn't showing
if($('a[href="workorder.php"]').length==0){
location.reload();
if(workOrder.items().length>1){
$('a[href="workorder.php"]').removeClass('hide');
}else{
$('a[href="workorder.php"]').addClass('hide');
}
});

Expand Down
5 changes: 2 additions & 3 deletions misc.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,8 @@ function buildnavmenu($ma,&$tl){
$rmenu[]='<a href="reports.php"><span>'.__("Reports").'</span></a>';

if($config->ParameterArray["WorkOrderBuilder"]){
if(isset($_COOKIE['workOrder']) && $_COOKIE['workOrder']!='[0]'){
array_unshift($rmenu , '<a href="workorder.php"><span>'.__("Work Order").'</span></a>');
}
$class=(isset($_COOKIE['workOrder']) && $_COOKIE['workOrder']!='[0]')?'':'hide';
array_unshift($rmenu , '<a class="'.$class.'" href="workorder.php"><span>'.__("Work Order").'</span></a>');
}

if ( $config->ParameterArray["RackRequests"] == "enabled" && $person->RackRequest ) {
Expand Down

0 comments on commit 40d5dc6

Please sign in to comment.