diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index 629286f21..ad2bf3070 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -848,6 +848,8 @@ class TicketZoomRef extends App.ControllerContent startDate: new Date().toLocaleDateString("en-US") # returns 9/25/2015 container: @$('.js-datepicker').parent() + @$('.js-timepicker').timepicker() + # for testing purposes the highlights get stored in localStorage loadHighlights: -> if highlights = localStorage['highlights'] diff --git a/app/assets/javascripts/app/controllers/widget/notify.coffee b/app/assets/javascripts/app/controllers/widget/notify.coffee index 3942bb6d4..cecaeb8b4 100644 --- a/app/assets/javascripts/app/controllers/widget/notify.coffee +++ b/app/assets/javascripts/app/controllers/widget/notify.coffee @@ -36,27 +36,14 @@ class App.Notify extends App.ControllerWidgetPermanent $.noty.closeAll() if data.link data.msg = '' + data.msg + '' - $('#notify').noty( - { - dismissQueue: true - text: data.msg - layout: 'top' - type: data.type - theme: 'noty_theme_twitter' - animateOpen: { - height: 'toggle' - opacity: 0.85, - }, - animateClose: { - opacity: 0.25 - }, - speed: 450 - timeout: data.timeout || 3800 - closeButton: false - closeOnSelfClick: true - closeOnSelfOver: false - } - ) + $('#notify').noty + text: data.msg + type: data.type + animation: + open: 'animated fadeInDown' + close: 'animated fadeOutDown' + timeout: data.timeout || 3800 + closeWith: ['click'] destroy: (e) -> e.preventDefault() diff --git a/app/assets/javascripts/app/lib/base/jquery.noty.js b/app/assets/javascripts/app/lib/base/jquery.noty.js index 05b7b4ba0..0c00f422e 100644 --- a/app/assets/javascripts/app/lib/base/jquery.noty.js +++ b/app/assets/javascripts/app/lib/base/jquery.noty.js @@ -1,220 +1,1051 @@ -/** -* jQuery Noty Plugin v1.1.1 -* Authors: Nedim Arabacı (http://ned.im), Muhittin Özer (http://muhittinozer.com) -* -* Examples and Documentation - http://needim.github.com/noty/ -* -* Licensed under the MIT licenses: -* http://www.opensource.org/licenses/mit-license.php -* -**/ -(function($) { - $.noty = function(options, customContainer) { +!function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof exports === 'object') { + module.exports = factory(require('jquery')); + } else { + factory(root.jQuery); + } +}(this, function($) { - var base = this; - var $noty = null; - var isCustom = false; +/*! + @package noty - jQuery Notification Plugin + @version version: 2.3.7 + @contributors https://github.com/needim/noty/graphs/contributors - base.init = function(options) { - base.options = $.extend({}, $.noty.defaultOptions, options); - base.options.type = base.options.cssPrefix+base.options.type; - base.options.id = base.options.type+'_'+new Date().getTime(); - base.options.layout = base.options.cssPrefix+'layout_'+base.options.layout; + @documentation Examples and Documentation - http://needim.github.com/noty/ - if (base.options.custom.container) customContainer = base.options.custom.container; - isCustom = ($.type(customContainer) === 'object') ? true : false; + @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php + */ - return base.addQueue(); - }; + if(typeof Object.create !== 'function') { + Object.create = function(o) { + function F() { + } - // Push notification to queue - base.addQueue = function() { - var isGrowl = ($.inArray(base.options.layout, $.noty.growls) == -1) ? false : true; - if (!isGrowl) (base.options.force) ? $.noty.queue.unshift({options: base.options}) : $.noty.queue.push({options: base.options}); - return base.render(isGrowl); - }; + F.prototype = o; + return new F(); + }; + } - // Render the noty - base.render = function(isGrowl) { + var NotyObject = { - // Layout spesific container settings - var container = (isCustom) ? customContainer.addClass(base.options.theme+' '+base.options.layout+' noty_custom_container') : $('body'); - if (isGrowl) { - if ($('ul.noty_cont.' + base.options.layout).length == 0) - container.prepend($('