From aaf2178f5a4070b9f2fe0fc673f4d0c14510be95 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 22 Nov 2017 08:45:49 +0100 Subject: [PATCH] www: merge ticker.js into opnsense_legacy.js --- plist | 1 - src/www/head.inc | 3 -- src/www/javascript/opnsense_legacy.js | 58 +++++++++++++++++---------- src/www/javascript/ticker.js | 39 ------------------ 4 files changed, 36 insertions(+), 65 deletions(-) delete mode 100644 src/www/javascript/ticker.js diff --git a/plist b/plist index 2b9b0f35a..ecee69a1e 100644 --- a/plist +++ b/plist @@ -1028,7 +1028,6 @@ /usr/local/www/interfaces_wireless.php /usr/local/www/interfaces_wireless_edit.php /usr/local/www/javascript/opnsense_legacy.js -/usr/local/www/javascript/ticker.js /usr/local/www/javascript/wizard/autosuggest.js /usr/local/www/javascript/wizard/disablekeys.js /usr/local/www/javascript/wizard/suggestions.js diff --git a/src/www/head.inc b/src/www/head.inc index 751129449..863e719a0 100644 --- a/src/www/head.inc +++ b/src/www/head.inc @@ -101,9 +101,6 @@ $pagetitle .= html_safe(sprintf(' | %s.%s', $config['system']['hostname'], $conf - - - diff --git a/src/www/javascript/opnsense_legacy.js b/src/www/javascript/opnsense_legacy.js index c91b57369..8770d3336 100644 --- a/src/www/javascript/opnsense_legacy.js +++ b/src/www/javascript/opnsense_legacy.js @@ -1,33 +1,47 @@ -/** - * Copyright (C) 2015 Deciso B.V. +/* + * Copyright (C) 2015 Deciso B.V. + * Copyright (C) 2012 Marcello Coutinho + * Copyright (C) 2012 Carlos Cesario + * Copyright (C) 2003-2004 Manuel Kasper + * All rights reserved. * - * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * shared components to use with legacy pages */ +function notice_action(action,msgid) { + jQuery.ajax({ + type: 'post', + cache: false, + url: 'index.php', + data: {closenotice: msgid}, + success: function(response) { + jQuery('#menu_messages').html(response); + } + }); +} + /** * hook on change events to network inputs, to maximize the subnet to 24 on ipv4 addresses * @param classname: classname to hook on to, select list of netmasks diff --git a/src/www/javascript/ticker.js b/src/www/javascript/ticker.js deleted file mode 100644 index 66d165a3c..000000000 --- a/src/www/javascript/ticker.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2012 Marcello Coutinho - Copyright (C) 2012 Carlos Cesario - Copyright (C) 2003-2004 Manuel Kasper . - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -function notice_action(action,msgid) { - jQuery.ajax({ - type: 'post', - cache: false, - url: 'index.php', - data: {closenotice: msgid}, - success: function(response) { - jQuery('#menu_messages').html(response); - } - }); -}