X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fweb%2Froot%2Fsrc%2Fmain%2Fresources%2Fjs%2Ffuelux%2Fpillbox.js;fp=opendaylight%2Fweb%2Froot%2Fsrc%2Fmain%2Fresources%2Fjs%2Ffuelux%2Fpillbox.js;h=0000000000000000000000000000000000000000;hp=d61f60bbe983d92a71e7da8fb06dfdde7f7bfe03;hb=42c32160bfd41de57189bb246fec5ffb48ed8e9e;hpb=edf5bfcee83c750853253ccfd991ba7000f5f65b;ds=sidebyside diff --git a/opendaylight/web/root/src/main/resources/js/fuelux/pillbox.js b/opendaylight/web/root/src/main/resources/js/fuelux/pillbox.js deleted file mode 100755 index d61f60bbe9..0000000000 --- a/opendaylight/web/root/src/main/resources/js/fuelux/pillbox.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Fuel UX Pillbox - * https://github.com/ExactTarget/fuelux - * - * Copyright (c) 2012 ExactTarget - * Licensed under the MIT license. - */ - -define(['require','jquery'],function(require) { - - var $ = require('jquery'); - - - // PILLBOX CONSTRUCTOR AND PROTOTYPE - - var Pillbox = function (element, options) { - this.$element = $(element); - this.options = $.extend({}, $.fn.pillbox.defaults, options); - this.$element.on('click', 'li', $.proxy(this.itemclicked, this)); - }; - - Pillbox.prototype = { - constructor: Pillbox, - - items: function() { - return this.$element.find('li').map(function() { - var $this = $(this); - return $.extend({ text: $this.text() }, $this.data()); - }).get(); - }, - - itemclicked: function (e) { - $(e.currentTarget).remove(); - e.preventDefault(); - } - }; - - - // PILLBOX PLUGIN DEFINITION - - $.fn.pillbox = function (option) { - var methodReturn; - - var $set = this.each(function () { - var $this = $(this); - var data = $this.data('pillbox'); - var options = typeof option === 'object' && option; - - if (!data) $this.data('pillbox', (data = new Pillbox(this, options))); - if (typeof option === 'string') methodReturn = data[option](); - }); - - return (methodReturn === undefined) ? $set : methodReturn; - }; - - $.fn.pillbox.defaults = {}; - - $.fn.pillbox.Constructor = Pillbox; - - - // PILLBOX DATA-API - - $(function () { - $('body').on('mousedown.pillbox.data-api', '.pillbox', function (e) { - var $this = $(this); - if ($this.data('pillbox')) return; - $this.pillbox($this.data()); - }); - }); - -}); -