footable_rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d32110446ca5accb71e10468b34c06297deb090f
4
+ data.tar.gz: 69f9a5e9d417c4906dc0d6ed638c26e7fe88e73a
5
+ SHA512:
6
+ metadata.gz: 38fe1a22605ecd171d69d9cc93bce76a10d30dc5c44144b55b74580b8dfa76f34e01c9da9b9c4648c32ac8e46e4760a29e248b3a9cf912de3559d583c9ca8032
7
+ data.tar.gz: a60f8c2029a1fed32186a4bade3e86815df37e81b1410876e852500ee336a742c52053f6d2c335172ce37be0b1c09930862515df67fb9962145de27e6215b1eb
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in footable_rails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 yuki104
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # FooTable on Rails
2
+
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'footable_rails'
9
+ ```
10
+
11
+ And then execute:
12
+
13
+ $ bundle install
14
+
15
+ ## Usage
16
+
17
+ ### application.scss
18
+
19
+ ```css
20
+ @import "footable.core";
21
+ @font-face {
22
+ font-family: 'footable';
23
+ font-weight: normal;
24
+ font-style: normal;
25
+ src: font-url('footable.eot');
26
+ src: font-url('footable.eot?#iefix') format('embedded-opentype'),
27
+ font-url('footable.ttf') format('truetype'),
28
+ font-url('footable.woff') format('woff'),
29
+ font-url('footable.svg#footable') format('svg');
30
+ }
31
+ ```
32
+
33
+ metro theme
34
+
35
+ ```css
36
+ @import "footable.metro";
37
+ ```
38
+
39
+ ### application.js
40
+
41
+ ```javascript
42
+ //= require footable
43
+ ```
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'footable_rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "footable_rails"
8
+ spec.version = FootableRails::Rails::VERSION
9
+ spec.authors = ["yuki104"]
10
+ spec.email = ["nt2929831@gmail.com"]
11
+
12
+ spec.summary = %q{FooTable on Rails}
13
+ spec.description = %q{FooTable on Rails}
14
+ spec.homepage = "https://github.com/yuki104/footable_rails"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", ">= 1.0"
23
+ spec.add_development_dependency "rake"
24
+ end
@@ -0,0 +1,12 @@
1
+ require "rails"
2
+ require "footable_rails/version"
3
+
4
+ module FootableRails
5
+ module Rails
6
+ if ::Rails.version < "3.1"
7
+ require "footable_rails/railtie"
8
+ else
9
+ require "footable_rails/engine"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,6 @@
1
+ module FootableRails
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module FootableRails
2
+ module Rails
3
+ class Railtie < ::Rails::Railtie; end
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module FootableRails
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
Binary file
@@ -0,0 +1,78 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>
5
+ This is a custom SVG font generated by IcoMoon.
6
+ <iconset grid="16"></iconset>
7
+ </metadata>
8
+ <defs>
9
+ <font id="footable" horiz-adv-x="512" >
10
+ <font-face units-per-em="512" ascent="480" descent="-32" />
11
+ <missing-glyph horiz-adv-x="512" />
12
+ <glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
13
+ <glyph unicode="&#xe000;" d="M 496,288L 320,288 L 320,464 c0,8.836-7.164,16-16,16l-96,0 c-8.836,0-16-7.164-16-16l0-176 L 16,288 c-8.836,0-16-7.164-16-16l0-96
14
+ c0-8.836, 7.164-16, 16-16l 176,0 l0-176 c0-8.836, 7.164-16, 16-16l 96,0 c 8.836,0, 16,7.164, 16,16L 320,160 l 176,0 c 8.836,0, 16,7.164, 16,16l0,96
15
+ C 512,280.836, 504.836,288, 496,288z" />
16
+ <glyph unicode="&#xe001;" d="M0,272l0-96 c0-8.836, 7.164-16, 16-16l 480,0 c 8.836,0, 16,7.164, 16,16l0,96 c0,8.836-7.164,16-16,16L 16,288 C 7.164,288,0,280.836,0,272z" />
17
+ <glyph unicode="&#xe002;" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 288,192l0-128 l-64,0 L 224,192 L 96,192 l0,64
18
+ l 128,0 L 224,384 l 64,0 l0-128 l 128,0 l0-64 L 288,192 z" />
19
+ <glyph unicode="&#xe003;" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 416,192L 96,192 l0,64 l 320,0 L 416,192 z" />
20
+ <glyph unicode="&#xe004;" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 256,32
21
+ c-106.039,0-192,85.961-192,192c0,106.039, 85.961,192, 192,192c 106.039,0, 192-85.961, 192-192C 448,117.961, 362.039,32, 256,32zM 384,192 L 288,192 L 288,96 L 224,96 L 224,192 L 128,192 L 128,256 L 224,256 L 224,352 L 288,352 L 288,256 L 384,256 Z" />
22
+ <glyph unicode="&#xe005;" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 256,32
23
+ c-106.039,0-192,85.961-192,192c0,106.039, 85.961,192, 192,192c 106.039,0, 192-85.961, 192-192C 448,117.961, 362.039,32, 256,32zM 128,256L 384,256L 384,192L 128,192z" />
24
+ <glyph unicode="&#xe006;" d="M 256,214.857l0-18.286 q0-4 -2.571-6.571t-6.571-2.571l-64,0 l0-64 q0-4 -2.571-6.571t-6.571-2.571l-18.286,0 q-4,0 -6.571,2.571t-2.571,6.571l0,64 l-64,0 q-4,0 -6.571,2.571t-2.571,6.571l0,18.286 q0,4 2.571,6.571t 6.571,2.571l 64,0 l0,64 q0,4 2.571,6.571t 6.571,2.571l 18.286,0 q 4,0 6.571-2.571t 2.571-6.571l0-64 l 64,0 q 4,0 6.571-2.571t 2.571-6.571zM 292.571,105.143l0,201.143 q0,11.429 -8,19.429t-19.429,8l-201.143,0 q-11.429,0 -19.429-8 t-8-19.429l0-201.143 q0-11.429 8-19.429t 19.429-8l 201.143,0 q 11.429,0 19.429,8t 8,19.429zM 329.143,306.286l0-201.143 q0-26.286 -18.714-45.143t-45.286-18.857l-201.143,0 q-26.571,0 -45.286,18.857t-18.714,45.143l0,201.143 q0,26.571 18.714,45.286t 45.286,18.714l 201.143,0 q 26.571,0 45.286-18.714t 18.714-45.286z" horiz-adv-x="329.143" />
25
+ <glyph unicode="&#xe007;" d="M 265.143,370.286q 26.571,0 45.286-18.714t 18.714-45.286l0-201.143 q0-26.286 -18.714-45.143t-45.286-18.857l-201.143,0 q-26.571,0 -45.286,18.857t-18.714,45.143l0,201.143 q0,26.571 18.714,45.286t 45.286,18.714l 201.143,0 zM 292.571,105.143l0,201.143 q0,11.429 -8,19.429t-19.429,8l-201.143,0 q-11.429,0 -19.429-8t-8-19.429l0-201.143 q0-11.429 8-19.429t 19.429-8l 201.143,0 q 11.429,0 19.429,8t 8,19.429z M 246.857,224q 4,0 6.571-2.571t 2.571-6.571l0-18.286 q0-4 -2.571-6.571t-6.571-2.571l-164.571,0 q-4,0 -6.571,2.571t-2.571,6.571l0,18.286 q0,4 2.571,6.571t 6.571,2.571l 164.571,0 z" horiz-adv-x="329.143" />
26
+ <glyph unicode="&#xe008;" d="M 365.714,205.714l0,36.571 q0,7.429 -5.429,12.857t-12.857,5.429l-91.429,0 l0,91.429 q0,7.429 -5.429,12.857t-12.857,5.429l-36.571,0 q-7.429,0 -12.857-5.429t-5.429-12.857l0-91.429 l-91.429,0 q-7.429,0 -12.857-5.429t-5.429-12.857l0-36.571 q0-7.429 5.429-12.857t 12.857-5.429l 91.429,0 l0-91.429 q0-7.429 5.429-12.857t 12.857-5.429l 36.571,0 q 7.429,0 12.857,5.429t 5.429,12.857l0,91.429 l 91.429,0 q 7.429,0 12.857,5.429t 5.429,12.857zM 438.857,361.143l0-274.286 q0-34 -24.143-58.143t-58.143-24.143l-274.286,0 q-34,0 -58.143,24.143t-24.143,58.143l0,274.286 q0,34 24.143,58.143t 58.143,24.143l 274.286,0 q 34,0 58.143-24.143t 24.143-58.143z" horiz-adv-x="438.857" />
27
+ <glyph unicode="&#xe009;" d="M 365.714,205.714l0,36.571 q0,7.429 -5.429,12.857t-12.857,5.429l-256,0 q-7.429,0 -12.857-5.429t-5.429-12.857l0-36.571 q0-7.429 5.429-12.857t 12.857-5.429l 256,0 q 7.429,0 12.857,5.429t 5.429,12.857zM 438.857,361.143l0-274.286 q0-34 -24.143-58.143t-58.143-24.143l-274.286,0 q-34,0 -58.143,24.143t-24.143,58.143l0,274.286 q0,34 24.143,58.143t 58.143,24.143l 274.286,0 q 34,0 58.143-24.143 t 24.143-58.143z" horiz-adv-x="438.857" />
28
+ <glyph unicode="&#xe00a;" d="M 512,224C 512,82.615, 397.385-32, 256-32s -256,114.615, -256,256s 114.615,256, 256,256S 512,365.385, 512,224z M 233.372,374.628
29
+ l -128-128.001C 99.124,240.379, 96,232.189, 96,224s 3.124-16.379 9.372-22.627c 12.497-12.497 32.759-12.497, 45.256,0L 224,274.745
30
+ L 224,96 c 0-17.673 14.327-32 32-32c 17.673,0, 32,14.327, 32,32l0,178.745 l 73.373-73.373c 12.497-12.497 32.758-12.497, 45.255,0
31
+ c 12.497,12.497, 12.497,32.758, 0,45.254l -128,128.001C 266.131,387.124, 245.869,387.124, 233.372,374.628z" />
32
+ <glyph unicode="&#xe00b;" d="M 512,224C 512,365.385, 397.385,480, 256,480s -256-114.615, -256-256s 114.615-256, 256-256S 512,82.615, 512,224z M 233.372,73.372
33
+ l -128,128.001C 99.124,207.621, 96,215.811, 96,224s 3.124,16.379 9.372,22.627c 12.497,12.497 32.759,12.497, 45.256,0L 224,173.255
34
+ L 224,352 c 0,17.673 14.327,32 32,32c 17.673,0, 32-14.327, 32-32l0-178.745 l 73.373,73.373c 12.497,12.497 32.758,12.497, 45.255,0
35
+ c 12.497-12.497, 12.497-32.758, 0-45.254l -128-128.001C 266.131,60.876, 245.869,60.876, 233.372,73.372z" />
36
+ <glyph unicode="&#xe00c;" d="M 256,480C 397.385,480, 512,365.385, 512,224s -114.615-256, -256-256s -256,114.615, -256,256S 114.615,480, 256,480z M 105.372,201.372
37
+ l 128.001-128C 239.621,67.124, 247.811,64, 256,64s 16.379,3.124 22.627,9.372c 12.497,12.497 12.497,32.759,0,45.256L 205.255,192
38
+ L 384,192 c 17.673,0 32,14.327 32,32c0,17.673, -14.327,32, -32,32l-178.745,0 l 73.373,73.373c 12.497,12.497 12.497,32.758,0,45.255
39
+ c -12.497,12.497, -32.758,12.497, -45.254,0l -128.001-128C 92.876,234.131, 92.876,213.869, 105.372,201.372z" />
40
+ <glyph unicode="&#xe00d;" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 406.628,201.372
41
+ l-128.001-128C 272.379,67.124, 264.189,64, 256,64s-16.379,3.124-22.627,9.372c-12.497,12.497-12.497,32.759,0,45.256L 306.745,192
42
+ L 128,192 c-17.673,0-32,14.327-32,32c0,17.673, 14.327,32, 32,32l 178.745,0 l-73.373,73.373c-12.497,12.497-12.497,32.758,0,45.255
43
+ c 12.497,12.497, 32.758,12.497, 45.254,0l 128.001-128C 419.124,234.131, 419.124,213.869, 406.628,201.372z" />
44
+ <glyph unicode="&#xe00e;" d="M0,160L 96,64L 256,224L 416,64L 512,160L 256.001,416 z" />
45
+ <glyph unicode="&#xe00f;" d="M 512,288L 416,384L 256,224L 96,384L0,288L 256,32.001 z" />
46
+ <glyph unicode="&#xe010;" d="M 320-32L 416,64L 256,224L 416,384L 320,480L 64,224 z" />
47
+ <glyph unicode="&#xe011;" d="M 192,480L 96,384L 256,224L 96,64L 192-32L 448,224 z" />
48
+ <glyph unicode="&#xe012;" d="M 292.571,132.571q0-7.429 -5.429-12.857t-12.857-5.429l-256,0 q-7.429,0 -12.857,5.429t-5.429,12.857t 5.429,12.857l 128,128q 5.429,5.429 12.857,5.429t 12.857-5.429l 128-128q 5.429-5.429 5.429-12.857z" horiz-adv-x="292.571" />
49
+ <glyph unicode="&#xe013;" d="M 292.571,278.857q0-7.429 -5.429-12.857l-128-128q-5.429-5.429 -12.857-5.429t-12.857,5.429l-128,128q-5.429,5.429 -5.429,12.857t 5.429,12.857t 12.857,5.429l 256,0 q 7.429,0 12.857-5.429t 5.429-12.857z" horiz-adv-x="292.571" />
50
+ <glyph unicode="&#xe014;" d="M 182.857,352l0-256 q0-7.429 -5.429-12.857t-12.857-5.429t-12.857,5.429l-128,128q-5.429,5.429 -5.429,12.857t 5.429,12.857l 128,128q 5.429,5.429 12.857,5.429t 12.857-5.429t 5.429-12.857z" horiz-adv-x="182.857" />
51
+ <glyph unicode="&#xe015;" d="M 164.571,224q0-7.429 -5.429-12.857l-128-128q-5.429-5.429 -12.857-5.429t-12.857,5.429t-5.429,12.857l0,256 q0,7.429 5.429,12.857t 12.857,5.429t 12.857-5.429l 128-128q 5.429-5.429 5.429-12.857z" horiz-adv-x="182.857" />
52
+ <glyph unicode="&#xe016;" d="M 256,480L 32-32L 256,64L 480-32 z" />
53
+ <glyph unicode="&#xe017;" d="M 256-32L 480,480L 256,384L 32,480 z" />
54
+ <glyph unicode="&#xe018;" d="M0,224L 512,0L 416,224L 512,448 z" />
55
+ <glyph unicode="&#xe019;" d="M 512,224L0,448L 96,224L0,0 z" />
56
+ <glyph unicode="&#xe01a;" d="M 512,224C 512,82.615, 397.385-32, 256-32s -256,114.615, -256,256s 114.615,256, 256,256S 512,365.385, 512,224z M 48,224
57
+ c 0-114.875 93.125-208 208-208S 464,109.125, 464,224s -93.125,208, -208,208S 48,338.875, 48,224zM 278.627,374.628l 128-128.001c 12.497-12.496 12.497-32.757 0-45.254c -12.497-12.497 -32.758-12.497,-45.255,0L 288,274.745
58
+ L 288,96 c 0-17.673 -14.327-32 -32-32c-17.673,0, -32,14.327, -32,32l0,178.745 l -73.372-73.373c -12.497-12.497 -32.759-12.497,-45.256,0
59
+ C 99.124,207.621, 96,215.811, 96,224s 3.124,16.379, 9.372,22.627l 128,128.001C 245.869,387.124, 266.131,387.124, 278.627,374.628z" />
60
+ <glyph unicode="&#xe01b;" d="M 512,224C 512,365.385, 397.385,480, 256,480s -256-114.615, -256-256s 114.615-256, 256-256S 512,82.615, 512,224z M 48,224
61
+ c 0,114.875 93.125,208 208,208S 464,338.875, 464,224s -93.125-208, -208-208S 48,109.125, 48,224zM 278.627,73.372l 128,128.001c 12.497,12.496 12.497,32.757 0,45.254c -12.497,12.497 -32.758,12.497,-45.255,0L 288,173.255
62
+ L 288,352 c 0,17.673 -14.327,32 -32,32c-17.673,0, -32-14.327, -32-32l0-178.745 l -73.372,73.373c -12.497,12.497 -32.759,12.497,-45.256,0
63
+ C 99.124,240.379, 96,232.189, 96,224s 3.124-16.379, 9.372-22.627l 128-128.001C 245.869,60.876, 266.131,60.876, 278.627,73.372z" />
64
+ <glyph unicode="&#xe01c;" d="M 256,480C 397.385,480, 512,365.385, 512,224s -114.615-256, -256-256s -256,114.615, -256,256S 114.615,480, 256,480z M 256,16
65
+ c 114.875,0 208,93.125 208,208S 370.875,432, 256,432s -208-93.125, -208-208S 141.125,16, 256,16zM 105.372,246.627l 128.001,128c 12.496,12.497 32.757,12.497 45.254,0c 12.497-12.497 12.497-32.758,0-45.255L 205.255,256
66
+ L 384,256 c 17.673,0 32-14.327 32-32c0-17.673, -14.327-32, -32-32l-178.745,0 l 73.373-73.372c 12.497-12.497 12.497-32.759,0-45.256
67
+ C 272.379,67.124, 264.189,64, 256,64s -16.379,3.124, -22.627,9.372l -128.001,128C 92.876,213.869, 92.876,234.131, 105.372,246.627z" />
68
+ <glyph unicode="&#xe01d;" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 256,16
69
+ c-114.875,0-208,93.125-208,208S 141.125,432, 256,432s 208-93.125, 208-208S 370.875,16, 256,16zM 406.628,246.627l-128.001,128c-12.496,12.497-32.757,12.497-45.254,0c-12.497-12.497-12.497-32.758,0-45.255L 306.745,256
70
+ L 128,256 c-17.673,0-32-14.327-32-32c0-17.673, 14.327-32, 32-32l 178.745,0 l-73.373-73.372c-12.497-12.497-12.497-32.759,0-45.256
71
+ C 239.621,67.124, 247.811,64, 256,64s 16.379,3.124, 22.627,9.372l 128.001,128C 419.124,213.869, 419.124,234.131, 406.628,246.627z" />
72
+ <glyph unicode="&#xe01e;" d="M 307.143,141.714q0-3.714 -2.857-6.571l-14.286-14.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-112.286,112.286l-112.286-112.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-14.286,14.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 133.143,133.143q 2.857,2.857 6.571,2.857t 6.571-2.857l 133.143-133.143q 2.857-2.857 2.857-6.571z" horiz-adv-x="329.143" />
73
+ <glyph unicode="&#xe01f;" d="M 307.143,269.714q0-3.714 -2.857-6.571l-133.143-133.143q-2.857-2.857 -6.571-2.857t-6.571,2.857l-133.143,133.143q-2.857,2.857 -2.857,6.571t 2.857,6.571l 14.286,14.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 112.286-112.286l 112.286,112.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 14.286-14.286q 2.857-2.857 2.857-6.571z" horiz-adv-x="329.143" />
74
+ <glyph unicode="&#xe020;" d="M 179.143,324.571q0-3.714 -2.857-6.571l-112.286-112.286l 112.286-112.286q 2.857-2.857 2.857-6.571t-2.857-6.571l-14.286-14.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-133.143,133.143q-2.857,2.857 -2.857,6.571t 2.857,6.571l 133.143,133.143q 2.857,2.857 6.571,2.857t 6.571-2.857l 14.286-14.286q 2.857-2.857 2.857-6.571z" horiz-adv-x="182.857" />
75
+ <glyph unicode="&#xe021;" d="M 170,205.714q0-3.714 -2.857-6.571l-133.143-133.143q-2.857-2.857 -6.571-2.857t-6.571,2.857l-14.286,14.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 112.286,112.286l-112.286,112.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 14.286,14.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 133.143-133.143q 2.857-2.857 2.857-6.571z" horiz-adv-x="182.857" />
76
+ <glyph unicode="&#xe022;" d="M 292.571,169.143q0-7.429 -5.429-12.857l-128-128q-5.429-5.429 -12.857-5.429t-12.857,5.429l-128,128q-5.429,5.429 -5.429,12.857t 5.429,12.857t 12.857,5.429l 256,0 q 7.429,0 12.857-5.429t 5.429-12.857zM 292.571,278.857q0-7.429 -5.429-12.857t-12.857-5.429l-256,0 q-7.429,0 -12.857,5.429t-5.429,12.857t 5.429,12.857l 128,128q 5.429,5.429 12.857,5.429t 12.857-5.429l 128-128q 5.429-5.429 5.429-12.857z" horiz-adv-x="292.571" />
77
+ <glyph unicode="&#x20;" horiz-adv-x="256" />
78
+ </font></defs></svg>
Binary file
Binary file
@@ -0,0 +1,170 @@
1
+ (function ($, w, undefined) {
2
+ if (w.footable === undefined || w.foobox === null)
3
+ throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');
4
+
5
+ var defaults = {
6
+ bookmarkable: {
7
+ enabled: false
8
+ }
9
+ };
10
+
11
+ // see http://www.onlineaspect.com/2009/06/10/reading-get-variables-with-javascript/
12
+ function $_HASH(q,s) {
13
+ s = s ? s : location.hash;
14
+ var re = new RegExp('&'+q+'(?:=([^&]*))?(?=&|$)','i');
15
+ return (s=s.replace(/^\#/,'&').match(re)) ? (typeof s[1] == 'undefined' ? '' : decodeURIComponent(s[1])) : undefined;
16
+ }
17
+
18
+ function addFootableStatusData(ft, event) {
19
+ var tbl_total = $(ft.table).find("tbody").find("tr:not(.footable-row-detail, .footable-filtered)").length;
20
+ $(ft.table).data("status_num_total", tbl_total);
21
+
22
+ var tbl_num = $(ft.table).find("tbody").find("tr:not(.footable-row-detail)").filter(":visible").length;
23
+ $(ft.table).data("status_num_shown", tbl_num);
24
+
25
+ var sort_colnum = $(ft.table).data("sorted");
26
+ var sort_col = $(ft.table).find("th")[sort_colnum];
27
+ var descending = $(sort_col).hasClass("footable-sorted-desc");
28
+ $(ft.table).data("status_descending", descending);
29
+
30
+ if (ft.pageInfo) {
31
+ var pagenum = ft.pageInfo.currentPage;
32
+ $(ft.table).data("status_pagenum", pagenum);
33
+ }
34
+
35
+ var filter_val = '';
36
+ var filter_field_id = $(ft.table).data('filter');
37
+ if ( $(filter_field_id).length ) {
38
+ filter_val = $(filter_field_id).val();
39
+ }
40
+
41
+ $(ft.table).data("status_filter_val", filter_val);
42
+
43
+ // manage expanded or collapsed rows:
44
+ var row, rowlist, expanded_rows;
45
+ if (event.type == 'footable_row_expanded') {
46
+ row = event.row;
47
+ if (row) {
48
+ rowlist = $(ft.table).data('expanded_rows');
49
+ expanded_rows = [];
50
+ if (rowlist) {
51
+ expanded_rows = rowlist.split(',');
52
+ }
53
+ expanded_rows.push(row.rowIndex);
54
+ $(ft.table).data('expanded_rows', expanded_rows.join(','));
55
+ }
56
+ }
57
+ if (event.type == 'footable_row_collapsed') {
58
+ row = event.row;
59
+ if (row) {
60
+ rowlist = $(ft.table).data('expanded_rows');
61
+ expanded_rows = [];
62
+ if (rowlist) {
63
+ expanded_rows = rowlist.split(',');
64
+ }
65
+ var new_expanded_rows = [];
66
+ for (var i in expanded_rows) {
67
+ if (expanded_rows[i] == row.rowIndex) {
68
+ new_expanded_rows = expanded_rows.splice(i, 1);
69
+ break;
70
+ }
71
+ }
72
+ $(ft.table).data('expanded_rows', new_expanded_rows.join(','));
73
+ }
74
+ }
75
+ }
76
+
77
+ function Bookmarkable() {
78
+ var p = this;
79
+ p.name = 'Footable LucidBookmarkable';
80
+ p.init = function(ft) {
81
+ if (ft.options.bookmarkable.enabled) {
82
+
83
+ $(ft.table).bind({
84
+ 'footable_initialized': function(){
85
+ var tbl_id = ft.table.id;
86
+ var q_filter = $_HASH(tbl_id + '_f');
87
+ var q_page_num = $_HASH(tbl_id + '_p');
88
+ var q_sorted = $_HASH(tbl_id + '_s');
89
+ var q_desc = $_HASH(tbl_id + '_d');
90
+ var q_expanded = $_HASH(tbl_id + '_e');
91
+
92
+ if (q_filter) {
93
+ var filter_field_id = $(ft.table).data('filter');
94
+ $(filter_field_id).val(q_filter);
95
+ $(ft.table).trigger('footable_filter', {filter: q_filter});
96
+ }
97
+ if (q_page_num) {
98
+ $(ft.table).data('currentPage', q_page_num);
99
+ // we'll check for sort before triggering pagination, since
100
+ // sorting triggers pagination.
101
+ }
102
+ if (typeof q_sorted !== 'undefined') {
103
+ var footableSort = $(ft.table).data('footable-sort');
104
+ var ascending = true;
105
+ if (q_desc == 'true') {
106
+ ascending = false;
107
+ }
108
+ footableSort.doSort(q_sorted, ascending);
109
+ }
110
+ else {
111
+ $(ft.table).trigger('footable_setup_paging');
112
+ }
113
+ if (q_expanded) {
114
+ var expanded_rows = q_expanded.split(',');
115
+ for (var i in expanded_rows) {
116
+ var row = $(ft.table.rows[expanded_rows[i]]);
117
+ row.find('> td:first').trigger('footable_toggle_row');
118
+ }
119
+ }
120
+ ft.lucid_bookmark_read = true;
121
+ },
122
+ 'footable_page_filled footable_redrawn footable_filtered footable_sorted footable_row_expanded footable_row_collapsed': function(e) {
123
+ addFootableStatusData(ft, e);
124
+
125
+ // update the URL hash
126
+ // lucid_bookmark_read guards against running this logic before
127
+ // the "first read" of the location bookmark hash.
128
+ if (ft.lucid_bookmark_read) {
129
+ var tbl_id = ft.table.id;
130
+ var filter = tbl_id + '_f';
131
+ var page_num = tbl_id + '_p';
132
+ var sorted = tbl_id + '_s';
133
+ var descending = tbl_id + '_d';
134
+ var expanded = tbl_id + '_e';
135
+
136
+ var hash = location.hash.replace(/^\#/, '&');
137
+ var hashkeys = [filter, page_num, sorted, descending, expanded];
138
+ // trim existing elements out of the hash.
139
+ for (var i in hashkeys) {
140
+ var re = new RegExp('&' + hashkeys[i]+'=([^&]*)', 'g');
141
+ hash = hash.replace(re, '');
142
+ }
143
+
144
+ var foostate = {};
145
+ foostate[filter] = $(ft.table).data('status_filter_val');
146
+ foostate[page_num] = $(ft.table).data('status_pagenum');
147
+ foostate[sorted] = $(ft.table).data('sorted');
148
+ foostate[descending] = $(ft.table).data('status_descending');
149
+ foostate[expanded] = $(ft.table).data('expanded_rows');
150
+
151
+ var pairs = [];
152
+ for (var elt in foostate) {
153
+ if (foostate[elt] !== undefined) {
154
+ pairs.push(elt + '=' + encodeURIComponent(foostate[elt]));
155
+ }
156
+ }
157
+ if (hash.length) {
158
+ pairs.push(hash);
159
+ }
160
+ location.hash = pairs.join('&');
161
+ }
162
+ }
163
+ });
164
+ }
165
+ };
166
+ }
167
+
168
+ w.footable.plugins.register(Bookmarkable, defaults);
169
+
170
+ })(jQuery, window);
@@ -0,0 +1,143 @@
1
+ (function ($, w, undefined) {
2
+ if (w.footable === undefined || w.footable === null)
3
+ throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');
4
+
5
+ var defaults = {
6
+ filter: {
7
+ enabled: true,
8
+ input: '.footable-filter',
9
+ timeout: 300,
10
+ minimum: 2,
11
+ disableEnter: false,
12
+ filterFunction: function(index) {
13
+ var $t = $(this),
14
+ $table = $t.parents('table:first'),
15
+ filter = $table.data('current-filter').toUpperCase(),
16
+ text = $t.find('td').text();
17
+ if (!$table.data('filter-text-only')) {
18
+ $t.find('td[data-value]').each(function () {
19
+ text += $(this).data('value');
20
+ });
21
+ }
22
+ return text.toUpperCase().indexOf(filter) >= 0;
23
+ }
24
+ }
25
+ };
26
+
27
+ function Filter() {
28
+ var p = this;
29
+ p.name = 'Footable Filter';
30
+ p.init = function (ft) {
31
+ p.footable = ft;
32
+ if (ft.options.filter.enabled === true) {
33
+ if ($(ft.table).data('filter') === false) return;
34
+ ft.timers.register('filter');
35
+ $(ft.table)
36
+ .unbind('.filtering')
37
+ .bind({
38
+ 'footable_initialized.filtering': function (e) {
39
+ var $table = $(ft.table);
40
+ var data = {
41
+ 'input': $table.data('filter') || ft.options.filter.input,
42
+ 'timeout': $table.data('filter-timeout') || ft.options.filter.timeout,
43
+ 'minimum': $table.data('filter-minimum') || ft.options.filter.minimum,
44
+ 'disableEnter': $table.data('filter-disable-enter') || ft.options.filter.disableEnter
45
+ };
46
+ if (data.disableEnter) {
47
+ $(data.input).keypress(function (event) {
48
+ if (window.event)
49
+ return (window.event.keyCode !== 13);
50
+ else
51
+ return (event.which !== 13);
52
+ });
53
+ }
54
+ $table.bind('footable_clear_filter', function () {
55
+ $(data.input).val('');
56
+ p.clearFilter();
57
+ });
58
+ $table.bind('footable_filter', function (event, args) {
59
+ p.filter(args.filter);
60
+ });
61
+ $(data.input).keyup(function (eve) {
62
+ ft.timers.filter.stop();
63
+ if (eve.which === 27) {
64
+ $(data.input).val('');
65
+ }
66
+ ft.timers.filter.start(function () {
67
+ var val = $(data.input).val() || '';
68
+ p.filter(val);
69
+ }, data.timeout);
70
+ });
71
+ },
72
+ 'footable_redrawn.filtering': function (e) {
73
+ var $table = $(ft.table),
74
+ filter = $table.data('filter-string');
75
+ if (filter) {
76
+ p.filter(filter);
77
+ }
78
+ }
79
+ })
80
+ //save the filter object onto the table so we can access it later
81
+ .data('footable-filter', p);
82
+ }
83
+ };
84
+
85
+ p.filter = function (filterString) {
86
+ var ft = p.footable,
87
+ $table = $(ft.table),
88
+ minimum = $table.data('filter-minimum') || ft.options.filter.minimum,
89
+ clear = !filterString;
90
+
91
+ //raise a pre-filter event so that we can cancel the filtering if needed
92
+ var event = ft.raise('footable_filtering', { filter: filterString, clear: clear });
93
+ if (event && event.result === false) return;
94
+ if (event.filter && event.filter.length < minimum) {
95
+ return; //if we do not have the minimum chars then do nothing
96
+ }
97
+
98
+ if (event.clear) {
99
+ p.clearFilter();
100
+ } else {
101
+ var filters = event.filter.split(' ');
102
+
103
+ $table.find('> tbody > tr').hide().addClass('footable-filtered');
104
+ var rows = $table.find('> tbody > tr:not(.footable-row-detail)');
105
+ $.each(filters, function (i, f) {
106
+ if (f && f.length > 0) {
107
+ $table.data('current-filter', f);
108
+ rows = rows.filter(ft.options.filter.filterFunction);
109
+ }
110
+ });
111
+ rows.each(function () {
112
+ p.showRow(this, ft);
113
+ $(this).removeClass('footable-filtered');
114
+ });
115
+ $table.data('filter-string', event.filter);
116
+ ft.raise('footable_filtered', { filter: event.filter, clear: false });
117
+ }
118
+ };
119
+
120
+ p.clearFilter = function () {
121
+ var ft = p.footable,
122
+ $table = $(ft.table);
123
+
124
+ $table.find('> tbody > tr:not(.footable-row-detail)').removeClass('footable-filtered').each(function () {
125
+ p.showRow(this, ft);
126
+ });
127
+ $table.removeData('filter-string');
128
+ ft.raise('footable_filtered', { clear: true });
129
+ };
130
+
131
+ p.showRow = function (row, ft) {
132
+ var $row = $(row), $next = $row.next(), $table = $(ft.table);
133
+ if ($table.hasClass('breakpoint') && $row.hasClass('footable-detail-show') && $next.hasClass('footable-row-detail')) {
134
+ $row.add($next).show();
135
+ ft.createOrUpdateDetailRow(row);
136
+ }
137
+ else $row.show();
138
+ };
139
+ }
140
+
141
+ w.footable.plugins.register(Filter, defaults);
142
+
143
+ })(jQuery, window);