Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 54EAF200B6A for ; Mon, 22 Aug 2016 15:37:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53FF8160A91; Mon, 22 Aug 2016 13:37:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BF7D4160AB3 for ; Mon, 22 Aug 2016 15:37:01 +0200 (CEST) Received: (qmail 90589 invoked by uid 500); 22 Aug 2016 13:37:00 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 87163 invoked by uid 99); 22 Aug 2016 13:36:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2016 13:36:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EB81AE03E8; Mon, 22 Aug 2016 13:36:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: oleewere@apache.org To: commits@ambari.apache.org Date: Mon, 22 Aug 2016 13:37:41 -0000 Message-Id: <2e604c3168374d6bbcc6dbc1ba2638f5@git.apache.org> In-Reply-To: <349079adae024981a7937339769ff969@git.apache.org> References: <349079adae024981a7937339769ff969@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [46/55] [abbrv] ambari git commit: AMBARI-18079. Update the date range picker with the latest version i.e 2.1.24 (Dharmesh Makwana via oleewere) archived-at: Mon, 22 Aug 2016 13:37:05 -0000 AMBARI-18079. Update the date range picker with the latest version i.e 2.1.24 (Dharmesh Makwana via oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74b1952f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74b1952f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74b1952f Branch: refs/heads/branch-dev-logsearch Commit: 74b1952fff351943d59307518b99c160eece2ed1 Parents: 650e6c4 Author: oleewere Authored: Thu Aug 18 13:17:30 2016 +0200 Committer: oleewere Committed: Mon Aug 22 12:56:02 2016 +0200 ---------------------------------------------------------------------- .../daterangepicker/css/daterangepicker.css | 555 +++++++++++-------- .../other/daterangepicker/js/daterangepicker.js | 552 +++++++++++++----- .../scripts/views/common/DatePickerLayout.js | 23 +- .../scripts/views/graphs/GraphLayoutView.js | 3 +- .../troubleshoot/TroubleShootLayoutView.js | 2 +- .../src/main/webapp/styles/style.css | 11 +- 6 files changed, 736 insertions(+), 410 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/74b1952f/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/css/daterangepicker.css ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/css/daterangepicker.css b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/css/daterangepicker.css index f2ff53d..7f1ef54 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/css/daterangepicker.css +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/css/daterangepicker.css @@ -1,336 +1,415 @@ -/** -* A stylesheet for use with Bootstrap 3.x -* @author: Dan Grossman http://www.dangrossman.info/ -* @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved. -* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php -* @website: https://www.improvely.com/ -*/ +.daterangepicker { + position: absolute; + color: inherit; + background: #fff; + border-radius: 4px; + width: 278px; + padding: 4px; + margin-top: 1px; + top: 100px; + left: 20px; + /* Calendars */ +} + +.daterangepicker:before, +.daterangepicker:after { + position: absolute; + display: inline-block; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} -/* Container Appearance */ +.daterangepicker:before { + top: -7px; + border-right: 7px solid transparent; + border-left: 7px solid transparent; + border-bottom: 7px solid #ccc; +} -.daterangepicker { - position: absolute; - background: #fff; - top: 100px; - left: 20px; - padding: 4px; - margin-top: 1px; - border-radius: 4px; +.daterangepicker:after { + top: -6px; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; } .daterangepicker.opensleft:before { - position: absolute; - top: -7px; - right: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; + right: 9px; } .daterangepicker.opensleft:after { - position: absolute; - top: -6px; - right: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #fff; - border-left: 6px solid transparent; - content: ''; + right: 10px; } .daterangepicker.openscenter:before { - position: absolute; - top: -7px; - left: 0; - right: 0; - width: 0; - margin-left: auto; - margin-right: auto; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; + left: 0; + right: 0; + width: 0; + margin-left: auto; + margin-right: auto; } .daterangepicker.openscenter:after { - position: absolute; - top: -6px; - left: 0; - right: 0; - width: 0; - margin-left: auto; - margin-right: auto; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #fff; - border-left: 6px solid transparent; - content: ''; + left: 0; + right: 0; + width: 0; + margin-left: auto; + margin-right: auto; } .daterangepicker.opensright:before { - position: absolute; - top: -7px; - left: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; + left: 9px; } .daterangepicker.opensright:after { - position: absolute; - top: -6px; - left: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #fff; - border-left: 6px solid transparent; - content: ''; + left: 10px; } -.daterangepicker.dropup{ - margin-top: -5px; -} -.daterangepicker.dropup:before{ - top: initial; - bottom:-7px; - border-bottom: initial; - border-top: 7px solid #ccc; -} -.daterangepicker.dropup:after{ - top: initial; - bottom:-6px; - border-bottom: initial; - border-top: 6px solid #fff; +.daterangepicker.dropup { + margin-top: -5px; } -.daterangepicker.dropdown-menu { - max-width: none; - z-index: 3000; +.daterangepicker.dropup:before { + top: initial; + bottom: -7px; + border-bottom: initial; + border-top: 7px solid #ccc; } -.daterangepicker .ranges, .daterangepicker .calendar { - float: left; +.daterangepicker.dropup:after { + top: initial; + bottom: -6px; + border-bottom: initial; + border-top: 6px solid #fff; } -.daterangepicker.single .ranges, .daterangepicker.single .calendar { - float: none; +.daterangepicker.dropdown-menu { + max-width: none; + z-index: 3001; } -.daterangepicker .ranges { - margin: 4px; - text-align: left; +.daterangepicker.single .ranges, +.daterangepicker.single .calendar { + float: none; } -.daterangepicker .calendar { - display: none; - max-width: 270px; +.daterangepicker.show-calendar .calendar { + display: block; } -.daterangepicker.show-calendar .calendar { - display: block; +.daterangepicker .calendar { + display: none; + max-width: 270px; + margin: 4px; } .daterangepicker .calendar.single .calendar-table { - border: none; + border: none; } -/* Calendars */ - -.daterangepicker .calendar th, .daterangepicker .calendar td { - white-space: nowrap; - text-align: center; - min-width: 32px; +.daterangepicker .calendar th, +.daterangepicker .calendar td { + white-space: nowrap; + text-align: center; + min-width: 32px; } .daterangepicker .calendar-table { - border: 1px solid #ddd; - padding: 4px; - border-radius: 4px; - background: #fff; -} - -.daterangepicker .calendar.left .calendar-table { - border-right: none; - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.daterangepicker .calendar.right .calendar-table { - border-left: none; - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -.daterangepicker .calendar.left { - margin: 4px 0 4px 4px; -} - -.daterangepicker .calendar.right { - margin: 4px 4px 4px 0; -} - -.daterangepicker .calendar.left .calendar-table { - padding-right: 12px; + border: 1px solid #fff; + padding: 4px; + border-radius: 4px; + background: #fff; } .daterangepicker table { - width: 100%; - margin: 0; + width: 100%; + margin: 0; } -.daterangepicker td, .daterangepicker th { - text-align: center; - width: 20px; - height: 20px; - border-radius: 4px; - white-space: nowrap; - cursor: pointer; +.daterangepicker td, +.daterangepicker th { + text-align: center; + width: 20px; + height: 20px; + border-radius: 4px; + border: 1px solid transparent; + white-space: nowrap; + cursor: pointer; } -.daterangepicker td.off { - color: #999; +.daterangepicker td.available:hover, +.daterangepicker th.available:hover { + background-color: #eee; + border-color: transparent; + color: inherit; } -.daterangepicker td.disabled, .daterangepicker option.disabled { - color: #999; +.daterangepicker td.week, +.daterangepicker th.week { + font-size: 80%; + color: #ccc; } -.daterangepicker td.available:hover, .daterangepicker th.available:hover { - background: #eee; +.daterangepicker td.off, +.daterangepicker td.off.in-range, +.daterangepicker td.off.start-date, +.daterangepicker td.off.end-date { + background-color: #fff; + border-color: transparent; + color: #999; } .daterangepicker td.in-range { - background: #ebf4f8; - border-radius: 0; + background-color: #ebf4f8; + border-color: transparent; + color: #000; + border-radius: 0; } .daterangepicker td.start-date { - border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; } .daterangepicker td.end-date { - border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .daterangepicker td.start-date.end-date { - border-radius: 4px; -} - -.daterangepicker td.active, .daterangepicker td.active:hover { - background-color: #357ebd; - border-color: #3071a9; - color: #fff; + border-radius: 4px; } -.daterangepicker td.week, .daterangepicker th.week { - font-size: 80%; - color: #ccc; +.daterangepicker td.active, +.daterangepicker td.active:hover { + background-color: #357ebd; + border-color: transparent; + color: #fff; } -.daterangepicker select.monthselect, .daterangepicker select.yearselect { - font-size: 12px; - padding: 1px; - height: auto; - margin: 0; - cursor: default; +.daterangepicker th.month { + width: auto; } -.daterangepicker select.monthselect { - margin-right: 2%; - width: 56%; +.daterangepicker td.disabled, +.daterangepicker option.disabled { + color: #999; + cursor: not-allowed; + text-decoration: line-through; } +.daterangepicker select.monthselect, .daterangepicker select.yearselect { - width: 40%; + font-size: 12px; + padding: 1px; + height: auto; + margin: 0; + cursor: default; } -.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect { - width: 50px; - margin-bottom: 0; +.daterangepicker select.monthselect { + margin-right: 2%; + width: 56%; } -.daterangepicker th.month { - width: auto; +.daterangepicker select.yearselect { + width: 40%; } -/* Text Input Above Each Calendar */ - -.daterangepicker .input-mini { - border: 1px solid #ccc; - border-radius: 4px; - color: #555; - display: block; - height: 30px; - line-height: 30px; - vertical-align: middle; - margin: 0 0 5px 0; - padding: 0 6px 0 28px; - width: 100%; +.daterangepicker select.hourselect, +.daterangepicker select.minuteselect, +.daterangepicker select.secondselect, +.daterangepicker select.ampmselect { + width: 50px; + margin-bottom: 0; } -.daterangepicker .daterangepicker_input i { - position: absolute; - left: 8px; - top: 8px; +.daterangepicker .input-mini { + border: 1px solid #ccc; + border-radius: 4px; + color: #555; + height: 30px; + line-height: 30px; + display: block; + vertical-align: middle; + margin: 0 0 5px 0; + padding: 0 6px 0 28px; + width: 100%; } -.daterangepicker .left .daterangepicker_input { - padding-right: 12px; +.daterangepicker .input-mini.active { + border: 1px solid #08c; + border-radius: 4px; } .daterangepicker .daterangepicker_input { - position: relative; -} - -/* Time Picker */ - -.daterangepicker .calendar-time { - text-align: center; - margin: 5px auto; - line-height: 30px; - position: relative; - padding-left: 28px; + position: relative; } -.daterangepicker .calendar-time select.disabled { - color: #ccc; - cursor: not-allowed; +.daterangepicker .daterangepicker_input i { + position: absolute; + left: 8px; + top: 8px; } -/* Predefined Ranges */ - -.daterangepicker .ranges { - font-size: 11px; +.daterangepicker.rtl .input-mini { + padding-right: 28px; + padding-left: 6px; } -.daterangepicker .ranges ul { - list-style: none; - margin: 0; - padding: 0; - width: 160px; +.daterangepicker.rtl .daterangepicker_input i { + left: auto; + right: 8px; } -.daterangepicker .ranges li { - font-size: 13px; - background: #f5f5f5; - border: 1px solid #f5f5f5; - color: #08c; - padding: 3px 12px; - margin-bottom: 8px; - border-radius: 5px; - cursor: pointer; +.daterangepicker .calendar-time { + text-align: center; + margin: 5px auto; + line-height: 30px; + position: relative; + padding-left: 28px; } -.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover { - background: #08c; - border: 1px solid #08c; - color: #fff; +.daterangepicker .calendar-time select.disabled { + color: #ccc; + cursor: not-allowed; +} + +.ranges { + font-size: 11px; + float: none; + margin: 4px; + text-align: left; +} + +.ranges ul { + list-style: none; + margin: 0 auto; + padding: 0; + width: 100%; +} + +.ranges li { + font-size: 13px; + background: #f5f5f5; + border: 1px solid #f5f5f5; + border-radius: 4px; + color: #08c; + padding: 3px 12px; + margin-bottom: 8px; + cursor: pointer; +} + +.ranges li:hover { + background: #08c; + border: 1px solid #08c; + color: #fff; +} + +.ranges li.active { + background: #08c; + border: 1px solid #08c; + color: #fff; +} + + +/* Larger Screen Styling */ + +@media (min-width: 564px) { + .daterangepicker { + width: auto; + } + .daterangepicker .ranges ul { + width: 160px; + } + .daterangepicker.single .ranges ul { + width: 100%; + } + .daterangepicker.single .calendar.left { + clear: none; + } + .daterangepicker.single.ltr .ranges, + .daterangepicker.single.ltr .calendar { + float: left; + } + .daterangepicker.single.rtl .ranges, + .daterangepicker.single.rtl .calendar { + float: right; + } + .daterangepicker.ltr { + direction: ltr; + text-align: left; + } + .daterangepicker.ltr .calendar.left { + clear: left; + margin-right: 0; + } + .daterangepicker.ltr .calendar.left .calendar-table { + border-right: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .daterangepicker.ltr .calendar.right { + margin-left: 0; + } + .daterangepicker.ltr .calendar.right .calendar-table { + border-left: none; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .daterangepicker.ltr .left .daterangepicker_input { + padding-right: 12px; + } + .daterangepicker.ltr .calendar.left .calendar-table { + padding-right: 12px; + } + .daterangepicker.ltr .ranges, + .daterangepicker.ltr .calendar { + float: left; + } + .daterangepicker.rtl { + direction: rtl; + text-align: right; + } + .daterangepicker.rtl .calendar.left { + clear: right; + margin-left: 0; + } + .daterangepicker.rtl .calendar.left .calendar-table { + border-left: none; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .daterangepicker.rtl .calendar.right { + margin-right: 0; + } + .daterangepicker.rtl .calendar.right .calendar-table { + border-right: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .daterangepicker.rtl .left .daterangepicker_input { + padding-left: 12px; + } + .daterangepicker.rtl .calendar.left .calendar-table { + padding-left: 12px; + } + .daterangepicker.rtl .ranges, + .daterangepicker.rtl .calendar { + text-align: right; + float: right; + } +} + +@media (min-width: 730px) { + .daterangepicker .ranges { + width: auto; + } + .daterangepicker.ltr .ranges { + float: left; + } + .daterangepicker.rtl .ranges { + float: right; + } + .daterangepicker .calendar.left { + clear: none !important; + } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/74b1952f/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/js/daterangepicker.js ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/js/daterangepicker.js b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/js/daterangepicker.js index 778af8d..04798c6 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/js/daterangepicker.js +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/daterangepicker/js/daterangepicker.js @@ -1,37 +1,31 @@ /** -* @version: 2.0 +* @version: 2.1.24 * @author: Dan Grossman http://www.dangrossman.info/ -* @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved. +* @copyright: Copyright (c) 2012-2016 Dan Grossman. All rights reserved. * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php * @website: https://www.improvely.com/ */ - -(function(root, factory) { - - if (typeof define === 'function' && define.amd) { - define(['moment', 'jquery', 'exports'], function(momentjs, $, exports) { - root.daterangepicker = factory(root, exports, momentjs, $); - }); - - } else if (typeof exports !== 'undefined') { - var momentjs = require('moment'); - var jQuery; - try { - jQuery = require('jquery'); - } catch (err) { - jQuery = window.jQuery; - if (!jQuery) throw new Error('jQuery dependnecy not found'); +// Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Make globaly available as well + define(['moment', 'jquery'], function (moment, jquery) { + return (root.daterangepicker = factory(moment, jquery)); + }); + } else if (typeof module === 'object' && module.exports) { + // Node / Browserify + //isomorphic issue + var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined; + if (!jQuery) { + jQuery = require('jquery'); + if (!jQuery.fn) jQuery.fn = {}; + } + module.exports = factory(require('moment'), jQuery); + } else { + // Browser globals + root.daterangepicker = factory(root.moment, root.jQuery); } - - factory(root, exports, momentjs, jQuery); - - // Finally, as a browser global. - } else { - root.daterangepicker = factory(root, {}, root.moment || moment, (root.jQuery || root.Zepto || root.ender || root.$)); - } - -}(this, function(root, daterangepicker, moment, $) { - +}(this, function(moment, $) { var DateRangePicker = function(element, options, cb) { //default settings for options @@ -39,7 +33,6 @@ this.element = $(element); this.startDate = moment().startOf('day'); this.endDate = moment().endOf('day'); - this.timeZone = moment().utcOffset(); this.minDate = false; this.maxDate = false; this.dateLimit = false; @@ -47,12 +40,16 @@ this.singleDatePicker = false; this.showDropdowns = false; this.showWeekNumbers = false; + this.showISOWeekNumbers = false; + this.showCustomRangeLabel = true; this.timePicker = false; this.timePicker24Hour = false; this.timePickerIncrement = 1; this.timePickerSeconds = false; + this.linkedCalendars = true; + this.autoUpdateInput = true; + this.alwaysShowCalendars = false; this.ranges = {}; - this.viewClass =""; this.opens = 'right'; if (this.element.hasClass('pull-right')) @@ -67,6 +64,7 @@ this.cancelClass = 'btn-default'; this.locale = { + direction: 'ltr', format: 'MM/DD/YYYY', separator: ' - ', applyLabel: 'Apply', @@ -75,7 +73,7 @@ customRangeLabel: 'Custom Range', daysOfWeek: moment.weekdaysMin(), monthNames: moment.monthsShort(), - firstDay: moment.localeData()._week.dow + firstDay: moment.localeData().firstDayOfWeek() }; this.callback = function() { }; @@ -94,13 +92,13 @@ options = $.extend(this.element.data(), options); //html template for the picker UI - if (typeof options.template !== 'string') - options.template = '