aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-05-25 15:48:47 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-05-25 15:48:47 +0200
commit5163ffe071dde87008acf403efe9519f96234b0d (patch)
tree1b7332fa4b3815a9467360be415d37885b726c5a /app/assets
parente82857cf387143bd7415f48298b77caa33154b6a (diff)
downloadrefinerycms-pc_banners-5163ffe071dde87008acf403efe9519f96234b0d.tar.gz
refinerycms-pc_banners-5163ffe071dde87008acf403efe9519f96234b0d.tar.bz2
refinerycms-pc_banners-5163ffe071dde87008acf403efe9519f96234b0d.zip
Remove unused javascripts.
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/banners/banners.js25
-rw-r--r--app/assets/javascripts/banners/jquery.tristate.js94
2 files changed, 0 insertions, 119 deletions
diff --git a/app/assets/javascripts/banners/banners.js b/app/assets/javascripts/banners/banners.js
deleted file mode 100644
index 9fcea06..0000000
--- a/app/assets/javascripts/banners/banners.js
+++ /dev/null
@@ -1,25 +0,0 @@
-$(function() {
- $(document).ready(function() {
- $(".tree ul:first > li:first").addClass("branch_start");
- $('.tree ul').find('li:last').addClass("branch_end");
- $('ul.tristate').tristate();
-
- $('.tree').delegate('.toggle','click', function(e) {
- e.preventDefault();
-
- var $li = $(this).parents('li:first');
- var $icon = $li.find('.icon.toggle');
- var $nested = $li.find('.nested');
-
- if ($icon.hasClass('expanded')) {
- $icon.removeClass('expanded');
- $nested.slideUp();
- }
- else {
- $icon.addClass('expanded');
- $nested.slideDown();
- }
-
- });
- });
-});
diff --git a/app/assets/javascripts/banners/jquery.tristate.js b/app/assets/javascripts/banners/jquery.tristate.js
deleted file mode 100644
index 2d2903d..0000000
--- a/app/assets/javascripts/banners/jquery.tristate.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/**********************************************************************************
- **
- ** jQuery Tristate Checkbox Plugin
- ** version: 1.0
- **
- ** Dual licensed under the MIT and GPL licenses:
- ** http://www.opensource.org/licenses/mit-license.php
- ** http://www.gnu.org/licenses/gpl.html
- **
- ** author: Jeff Leombruno
- ** creation date: 09.20.2011
- ** dependencies: jQuery v1.6 or higher
- **
- ** This file contains the functionality for implementing 3 state checkboxes.
- ** Inspired by:
- ** http://code.google.com/p/jquery-tristate-checkbox/
- ** http://css-tricks.com/13467-indeterminate-checkboxes/
- **
- **********************************************************************************/
-
-(function($){
- $.fn.tristate = function(options){
-
- var config = {
- selector: $(this).selector,
- checked: null,
- container: null,
- siblings: null
- };
- var opts = $.extend(config, options);
-
- return this.each(function(){
- var obj = $(this);
-
- var triState = function() {
-
- var pub = {};
-
- pub.init = function(){
- $('input[type="checkbox"]', obj).change(function(e) {
- config.checked = $(this).prop("checked")
- config.container = $(this).parent()
- config.siblings = config.container.siblings();
-
- config.container.find('input[type="checkbox"]').prop({
- indeterminate: false,
- checked: config.checked
- });
-
- pub.checkSiblings(config.container);
- });
- // run checkSiblings for every checked checkbox when the page loads
- $('input[type=checkbox]:checked', obj).each( function() {
- pub.checkSiblings($(this).parent());
- });
- };
-
- pub.checkSiblings = function(el) {
- var parent = el.parent().parent();
- var all = true;
-
- el.siblings().each(function() {
- return all = ($(this).children('input[type="checkbox"]').prop("checked") === config.checked);
- });
-
- if (all && config.checked) {
- parent.children('input[type="checkbox"]').prop({
- indeterminate: false,
- checked: config.checked
- });
- pub.checkSiblings(parent);
- } else if (all && !config.checked) {
- parent.children('input[type="checkbox"]').prop("checked", config.checked);
- parent.children('input[type="checkbox"]').prop("indeterminate", (parent.find('input[type="checkbox"]:checked').length > 0));
- pub.checkSiblings(parent);
- } else {
- el.parents("li").children('input[type="checkbox"]').prop({
- indeterminate: true,
- checked: false
- });
- }
- };
-
- return pub;
-
- }();
-
- triState.init();
- triState.checkSiblings(obj);
-
-
- });
- };
-})(jQuery);