Remove duplicate suggestions

Remove duplicate result suggestions in nominatim (#805)
This commit is contained in:
jekkos
2016-08-29 08:49:29 +02:00
parent 775c0cebf2
commit 6e7b32cb1b
12 changed files with 18587 additions and 1827 deletions

View File

@@ -31,20 +31,6 @@ class Login extends CI_Controller
$login_info = $this->config->item('language') . ' | ' . $this->config->item('timezone') . ' | ' . $this->config->item('currency_symbol') . ' | ' . $this->config->item('theme') . ' | ' . $this->config->item('website') . ' | ' . $this->input->ip_address();
$this->tracking_lib->track_page('login', 'login', $login_info);
$footer = preg_replace('/\s+/', '', $footer);
if($footer != '-.')
{
$footer = $footer . ' | ' . $this->config->item('company') . ' | ' . $this->config->item('address') . ' | ' . $this->config->item('email') . ' | ' . $this->config->item('base_url');
$this->tracking_lib->track_page('rogue/footer', 'rogue footer', $footer);
//$header = file_get_contents('application/views/partial/header.php');
//$header = strip_tags($header);
//$header = preg_replace('/\s+/', '', $header);
//$this->tracking_lib->track_page('rogue/header', 'rogue header', $header);
}
}
redirect('home');

View File

@@ -38,7 +38,6 @@ class Secure_Controller extends CI_Controller
if(!strstr($this->lang->line('common_you_are_using_ospos'), "Open Source Point Of Sale") || $session_sha1 != $matches[1])
{
$this->load->library('tracking_lib');
$footer_tags = strip_tags($footer_tags);
$footer = $footer . ' | ' . $this->config->item('company') . ' | ' . $this->config->item('address') . ' | ' . $this->config->item('email') . ' | ' . $this->config->item('base_url');
$this->tracking_lib->track_page('rogue/footer', 'rogue footer', $footer);
@@ -49,7 +48,7 @@ class Secure_Controller extends CI_Controller
{
$this->tracking_lib->track_page('login', 'rogue login', $login_footer);
}
$this->tracking_lib->track_page('rogue/footer', 'rogue footer html', $footer_tags);
$this->tracking_lib->track_page('rogue/footer', 'rogue footer html', strip_tags($footer_tags));
}
}

View File

@@ -336,7 +336,7 @@ class GATracking
$clientAdapter = $this->clientAdapter;
$clientAdapter->setOptions($adapterOptions);
return $clientAdapter->send($this->apiEndpointUrl, $trackingCollection);
return $clientAdapter->send($this->apiEndpointUrl, $trackingCollection);
}
/**

View File

@@ -7,7 +7,7 @@
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<link rel="stylesheet" type="text/css" href="<?php echo 'dist/bootswatch/' . (empty($this->config->item('theme')) ? 'flatly' : $this->config->item('theme')) . '/bootstrap.min.css' ?>"/>
<!-- start css template tags -->
<link rel="stylesheet" type="text/css" href="dist/login.css"/>
<link rel="stylesheet" type="text/css" href="../../dist/login.css"/>
<!-- end css template tags -->
</head>

View File

@@ -20,15 +20,15 @@
<link rel="stylesheet" href="bower_components/chartist-plugin-tooltip/dist/chartist-plugin-tooltip.css" />
<!-- endbower -->
<!-- start css template tags -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.autocomplete.css"/>
<link rel="stylesheet" type="text/css" href="css/invoice.css"/>
<link rel="stylesheet" type="text/css" href="css/ospos.css"/>
<link rel="stylesheet" type="text/css" href="css/ospos_print.css"/>
<link rel="stylesheet" type="text/css" href="css/popupbox.css"/>
<link rel="stylesheet" type="text/css" href="css/receipt.css"/>
<link rel="stylesheet" type="text/css" href="css/register.css"/>
<link rel="stylesheet" type="text/css" href="css/reports.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.autocomplete.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/invoice.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/ospos.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/ospos_print.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/popupbox.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/receipt.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/register.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/reports.css"/>
<link rel="stylesheet" type="text/css" href="../../../css/style.css"/>
<!-- end css template tags -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
@@ -57,23 +57,24 @@
<script src="bower_components/remarkable-bootstrap-notify/bootstrap-notify.js"></script>
<script src="bower_components/js-cookie/src/js.cookie.js"></script>
<script src="bower_components/blockUI/jquery.blockUI.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<!-- endbower -->
<!-- start js template tags -->
<script type="text/javascript" src="js/imgpreview.full.jquery.js"></script>
<script type="text/javascript" src="js/manage_tables.js"></script>
<script type="text/javascript" src="js/nominatim.autocomplete.js"></script>
<script type="text/javascript" src="../../../js/imgpreview.full.jquery.js"></script>
<script type="text/javascript" src="../../../js/manage_tables.js"></script>
<script type="text/javascript" src="../../../js/nominatim.autocomplete.js"></script>
<!-- end js template tags -->
<?php else : ?>
<!--[if lte IE 8]>
<link rel="stylesheet" media="print" href="dist/print.css" type="text/css" />
<![endif]-->
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=3e479ff055"/>
<link rel="stylesheet" type="text/css" href="dist/style.css"/>
<link rel="stylesheet" type="text/css" href="../../../dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="../../../dist/opensourcepos.min.css?rel=3e479ff055"/>
<link rel="stylesheet" type="text/css" href="../../../dist/style.css"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=900ac71ed4"></script>
<script type="text/javascript" src="../../../dist/opensourcepos.min.js?rel=01b32c02e4"></script>
<!-- end minjs template tags -->
<?php endif; ?>
@@ -96,7 +97,7 @@
</div>
<div class="navbar-right" style="margin:0">
<?php echo $this->config->item('company') . " | $user_info->first_name $user_info->last_name | " . ($this->input->get("debug") == "true" ? $this->session->userdata('footer_sha1') : ""); ?>
<?php echo $this->config->item('company') . " | $user_info->first_name $user_info->last_name | " . ($this->input->get("debug") == "true" ? $this->session->userdata('session_sha1') : ""); ?>
<?php echo anchor("home/logout", $this->lang->line("common_logout")); ?>
</div>
</div>

View File

@@ -44,6 +44,6 @@
}
});
footer_sha1 = '<?php echo $this->session->userdata('footer_sha1'); ?>';
session_sha1 = '<?php echo $this->session->userdata('session_sha1'); ?>';
</script>

View File

@@ -42,7 +42,8 @@
"chartist-plugin-tooltip": "^0.0.13",
"remarkable-bootstrap-notify": "^3.1.3",
"js-cookie": "^2.1.2",
"blockUI": "*"
"blockUI": "*",
"lodash": "^4.15.0"
},
"overrides": {
"jquery-ui": {

20268
dist/opensourcepos.js vendored
View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -337,8 +337,9 @@
})(window.form_support = window.form_support || {}, jQuery);
$(document).ready(function() {
if (footer_sha1 != $("#footer strong").text().split("- ")[1])
{
var footer_text = $("#footer strong").text();
var footer_sha1 = footer_text.split("- ")[1];
if (session_sha1 != footer_sha1 || !footer_text.match(/Open Source Point Of Sale/)) {
$(window).block({ message: '' });
}
});

View File

@@ -35,6 +35,20 @@
});
return fields[0] + (fields[1] ? ' (' + fields[1] + ')' : '');
};
var unique = function(parsed) {
var filtered = []
$.each(parsed, function(index, element)
{
filtered = $.map(filtered, function(el, ind)
{
return el.label == element.label ? null : el;
});
filtered.push(element);
});
return filtered;
};
return function(data)
{
@@ -49,11 +63,12 @@
});
parsed[index] = {
label: row.join(", "),
results: row,
results: _.uniq(row),
value: address[field_name]
};
});
return parsed;
return _.uniq(parsed);
return unique(parsed);
};
};

View File

@@ -11,10 +11,6 @@
],
"homepage": "http://silviomoreto.github.io/bootstrap-select"
},
"bootstrap3-dialog@1.35.2": {
"licenses": "UNKNOWN",
"homepage": "http://nakupanda.github.io/bootstrap3-dialog/"
},
"bootswatch@3.3.7": {
"licenses": [
"MIT"
@@ -29,6 +25,10 @@
"licenses": "UNKNOWN",
"homepage": "https://github.com/gionkunz/chartist-js"
},
"bootstrap3-dialog@1.35.2": {
"licenses": "UNKNOWN",
"homepage": "http://nakupanda.github.io/bootstrap3-dialog/"
},
"chartist-plugin-axistitle@0.1.0": {
"licenses": [
"WTF*"
@@ -87,6 +87,13 @@
],
"homepage": "https://github.com/hhurz/tableExport.jquery.plugin"
},
"bootstrap-daterangepicker@2.1.24": {
"licenses": [
"MIT"
],
"homepage": "https://github.com/dangrossman/bootstrap-daterangepicker",
"repository": "git+https://github.com/dangrossman/bootstrap-daterangepicker"
},
"bootstrap@3.3.7": {
"licenses": [
"MIT"
@@ -94,12 +101,12 @@
"homepage": "http://getbootstrap.com",
"repository": "git+https://github.com/twbs/bootstrap"
},
"bootstrap-daterangepicker@2.1.24": {
"bootstrap-table@1.11.0": {
"licenses": [
"MIT"
],
"homepage": "https://github.com/dangrossman/bootstrap-daterangepicker",
"repository": "git+https://github.com/dangrossman/bootstrap-daterangepicker"
"homepage": "https://github.com/wenzhixin/bootstrap-table",
"repository": "git+https://github.com/wenzhixin/bootstrap-table"
},
"html2canvas@0.4.1": {
"licenses": [
@@ -116,12 +123,12 @@
"homepage": "https://github.com/jasny/bootstrap",
"repository": "git+https://github.com/jasny/bootstrap"
},
"bootstrap-table@1.11.0": {
"jspdf-autotable@2.0.14": {
"licenses": [
"MIT"
],
"homepage": "https://github.com/wenzhixin/bootstrap-table",
"repository": "git+https://github.com/wenzhixin/bootstrap-table"
"homepage": "https://github.com/simonbengtsson/jspdf-autotable",
"repository": "git+https://github.com/simonbengtsson/jsPDF-AutoTable"
},
"jquery-validation@1.13.1": {
"licenses": [
@@ -130,6 +137,12 @@
"repository": "https://github.com/jzaefferer/jquery-validation",
"homepage": "http://jqueryvalidation.org/"
},
"lodash@4.15.0": {
"licenses": [
"MIT"
],
"homepage": "https://github.com/lodash/lodash"
},
"remarkable-bootstrap-notify@3.1.3": {
"licenses": [
"MIT"
@@ -137,13 +150,6 @@
"homepage": "http://bootstrap-notify.remabledesigns.com/",
"repository": "https://github.com/mouse0270/bootstrap-notify"
},
"jspdf-autotable@2.0.14": {
"licenses": [
"MIT"
],
"homepage": "https://github.com/simonbengtsson/jspdf-autotable",
"repository": "git+https://github.com/simonbengtsson/jsPDF-AutoTable"
},
"smalot-bootstrap-datetimepicker@2.3.11": {
"licenses": [
"Apache 2.0",