summaryrefslogtreecommitdiff
path: root/chef-server-webui
diff options
context:
space:
mode:
authorLogan Lowell <fractaloop@thefrontside.net>2012-04-05 07:45:08 -0500
committerBryan McLellan <btm@opscode.com>2012-08-03 11:43:31 -0700
commit2a22b95c0f22ad1cebea42a2edde85b4dc94b92d (patch)
tree9d957c982115b17be55b847ec9100d0902790e3e /chef-server-webui
parent85d56cfef6eaf964cb76d9815c8cfba7654cf88d (diff)
downloadchef-2a22b95c0f22ad1cebea42a2edde85b4dc94b92d.tar.gz
Use the Asset pipeline for the server
Diffstat (limited to 'chef-server-webui')
-rw-r--r--chef-server-webui/app/assets/images/avatar.pngbin0 -> 3214 bytes
-rw-r--r--chef-server-webui/app/assets/images/black_big.pngbin0 -> 2734 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/b.pngbin0 -> 84 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/bl.pngbin0 -> 124 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/br.pngbin0 -> 124 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/closelabel.gifbin0 -> 979 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/loading.gifbin0 -> 2767 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/tl.pngbin0 -> 132 bytes
-rw-r--r--chef-server-webui/app/assets/images/facebox/tr.pngbin0 -> 125 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_diagonals-small_0_aaaaaa_40x40.pngbin0 -> 128 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_diagonals-thick_15_444444_40x40.pngbin0 -> 253 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_glass_100_f0f0f0_1x400.pngbin0 -> 106 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_glass_50_99c2ff_1x400.pngbin0 -> 123 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_glass_55_fbf5d0_1x400.pngbin0 -> 153 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_glass_80_e6e6e6_1x400.pngbin0 -> 113 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_glass_95_fef1ec_1x400.pngbin0 -> 119 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_highlight-hard_100_f9f9f9_1x100.pngbin0 -> 86 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-bg_highlight-soft_100_e7eef3_1x100.pngbin0 -> 149 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_222222_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_2694e8_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_2e83ff_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_72a7cf_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_888888_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_cd0a0a_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/images/ui-icons_ffffff_256x240.pngbin0 -> 4379 bytes
-rw-r--r--chef-server-webui/app/assets/images/indicator.gifbin0 -> 1553 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/add2.pngbin0 -> 643 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/build-button.pngbin0 -> 749 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/bullet.gifbin0 -> 62 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/bullet_orange.pngbin0 -> 283 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/cross.pngbin0 -> 655 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/delete.pngbin0 -> 696 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/deleted.pngbin0 -> 820 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/json.jpgbin0 -> 1485 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/label.gifbin0 -> 181 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/minus.gifbin0 -> 87 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/pixel.gifbin0 -> 44 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/plus.gifbin0 -> 89 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/saved.pngbin0 -> 421 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/table_refresh.pngbin0 -> 752 bytes
-rw-r--r--chef-server-webui/app/assets/images/jsonedit/value.gifbin0 -> 182 bytes
-rw-r--r--chef-server-webui/app/assets/images/merb.jpgbin0 -> 5815 bytes
-rw-r--r--chef-server-webui/app/assets/images/toggle-collapse-dark.pngbin0 -> 2886 bytes
-rw-r--r--chef-server-webui/app/assets/images/toggle-collapse-light.pngbin0 -> 2864 bytes
-rw-r--r--chef-server-webui/app/assets/images/toggle-collapse.gifbin0 -> 176 bytes
-rw-r--r--chef-server-webui/app/assets/images/toggle-expand-dark.pngbin0 -> 2894 bytes
-rw-r--r--chef-server-webui/app/assets/images/toggle-expand-light.pngbin0 -> 2863 bytes
-rw-r--r--chef-server-webui/app/assets/images/toggle-expand.gifbin0 -> 181 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/Thumbs.dbbin0 -> 20480 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/doc.gifbin0 -> 993 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/docNode.gifbin0 -> 147 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/docNodeLast.gifbin0 -> 142 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/docNodeLastFirst.gifbin0 -> 107 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folder.gifbin0 -> 974 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNode.gifbin0 -> 133 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeFirst.gifbin0 -> 878 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLast.gifbin0 -> 130 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLastFirst.gifbin0 -> 872 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpen.gifbin0 -> 129 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenFirst.gifbin0 -> 868 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLast.gifbin0 -> 125 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLastFirst.gifbin0 -> 863 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/folderOpen.gifbin0 -> 254 bytes
-rw-r--r--chef-server-webui/app/assets/images/treeBuilderImages/vertLine.gifbin0 -> 140 bytes
-rw-r--r--chef-server-webui/app/assets/javascripts/chef.js315
-rw-r--r--chef-server-webui/app/assets/javascripts/cookbook_constraint_ctrl.js191
-rw-r--r--chef-server-webui/app/assets/javascripts/cookbook_versions.js75
-rw-r--r--chef-server-webui/app/assets/javascripts/drop_down_menu.js22
-rw-r--r--chef-server-webui/app/assets/javascripts/facebox/facebox.js319
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery-1.5.2.min.js16
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery-ui-1.7.1.custom.min.js65
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.editinline.js108
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.jeditable.mini.js30
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.localscroll.js104
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.scrollTo.js150
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.suggest.js250
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.tools.min.js17
-rw-r--r--chef-server-webui/app/assets/javascripts/jquery.treeTable.min.js165
-rw-r--r--chef-server-webui/app/assets/javascripts/json.js153
-rw-r--r--chef-server-webui/app/assets/javascripts/jsonedit_main.js701
-rw-r--r--chef-server-webui/app/assets/javascripts/yetii-min.js1
-rw-r--r--chef-server-webui/app/assets/stylesheets/base.css342
-rw-r--r--chef-server-webui/app/assets/stylesheets/chef.css344
-rw-r--r--chef-server-webui/app/assets/stylesheets/facebox/facebox.css95
-rw-r--r--chef-server-webui/app/assets/stylesheets/jquery-ui-1.7.1.custom.css404
-rw-r--r--chef-server-webui/app/assets/stylesheets/jquery.suggest.css28
-rw-r--r--chef-server-webui/app/assets/stylesheets/jquery.treeTable.css43
-rw-r--r--chef-server-webui/app/assets/stylesheets/jsonedit_main.css296
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/bec-green/style.css290
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/bec/style.css301
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/blue/style.css280
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/default/style.css267
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/djime-cerulean/style.css311
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/kathleene/style.css272
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/orange/style.css263
-rw-r--r--chef-server-webui/app/assets/stylesheets/themes/reidb-greenish/style.css301
96 files changed, 6519 insertions, 0 deletions
diff --git a/chef-server-webui/app/assets/images/avatar.png b/chef-server-webui/app/assets/images/avatar.png
new file mode 100644
index 0000000000..66488481ae
--- /dev/null
+++ b/chef-server-webui/app/assets/images/avatar.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/black_big.png b/chef-server-webui/app/assets/images/black_big.png
new file mode 100644
index 0000000000..9cfe72609c
--- /dev/null
+++ b/chef-server-webui/app/assets/images/black_big.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/b.png b/chef-server-webui/app/assets/images/facebox/b.png
new file mode 100644
index 0000000000..f184e6269b
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/b.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/bl.png b/chef-server-webui/app/assets/images/facebox/bl.png
new file mode 100644
index 0000000000..f6271859d5
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/bl.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/br.png b/chef-server-webui/app/assets/images/facebox/br.png
new file mode 100644
index 0000000000..31f204fc45
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/br.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/closelabel.gif b/chef-server-webui/app/assets/images/facebox/closelabel.gif
new file mode 100644
index 0000000000..87b4f8bd69
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/closelabel.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/loading.gif b/chef-server-webui/app/assets/images/facebox/loading.gif
new file mode 100644
index 0000000000..f864d5fd38
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/loading.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/tl.png b/chef-server-webui/app/assets/images/facebox/tl.png
new file mode 100644
index 0000000000..d99c8f6c6e
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/tl.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/facebox/tr.png b/chef-server-webui/app/assets/images/facebox/tr.png
new file mode 100644
index 0000000000..e99b6ec831
--- /dev/null
+++ b/chef-server-webui/app/assets/images/facebox/tr.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png b/chef-server-webui/app/assets/images/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png
new file mode 100644
index 0000000000..d5359734ad
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_diagonals-thick_15_444444_40x40.png b/chef-server-webui/app/assets/images/images/ui-bg_diagonals-thick_15_444444_40x40.png
new file mode 100644
index 0000000000..88e46a6d36
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_diagonals-thick_15_444444_40x40.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_glass_100_f0f0f0_1x400.png b/chef-server-webui/app/assets/images/images/ui-bg_glass_100_f0f0f0_1x400.png
new file mode 100644
index 0000000000..33896e710c
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_glass_100_f0f0f0_1x400.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_glass_50_99c2ff_1x400.png b/chef-server-webui/app/assets/images/images/ui-bg_glass_50_99c2ff_1x400.png
new file mode 100644
index 0000000000..8249158b01
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_glass_50_99c2ff_1x400.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_glass_55_fbf5d0_1x400.png b/chef-server-webui/app/assets/images/images/ui-bg_glass_55_fbf5d0_1x400.png
new file mode 100644
index 0000000000..f25dd91065
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_glass_55_fbf5d0_1x400.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_glass_80_e6e6e6_1x400.png b/chef-server-webui/app/assets/images/images/ui-bg_glass_80_e6e6e6_1x400.png
new file mode 100644
index 0000000000..abaa23f001
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_glass_80_e6e6e6_1x400.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_glass_95_fef1ec_1x400.png b/chef-server-webui/app/assets/images/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 0000000000..4443fdc1a1
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png b/chef-server-webui/app/assets/images/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png
new file mode 100644
index 0000000000..2cb80364bb
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-bg_highlight-soft_100_e7eef3_1x100.png b/chef-server-webui/app/assets/images/images/ui-bg_highlight-soft_100_e7eef3_1x100.png
new file mode 100644
index 0000000000..d39c182270
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-bg_highlight-soft_100_e7eef3_1x100.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_222222_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_222222_256x240.png
new file mode 100644
index 0000000000..67560da9be
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_222222_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_2694e8_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_2694e8_256x240.png
new file mode 100644
index 0000000000..dbd78b68ad
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_2694e8_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_2e83ff_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 0000000000..b425c446d2
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_72a7cf_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_72a7cf_256x240.png
new file mode 100644
index 0000000000..58aed4074e
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_72a7cf_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_888888_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_888888_256x240.png
new file mode 100644
index 0000000000..2e5180e473
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_888888_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_cd0a0a_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 0000000000..2db88b796a
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/images/ui-icons_ffffff_256x240.png b/chef-server-webui/app/assets/images/images/ui-icons_ffffff_256x240.png
new file mode 100644
index 0000000000..746e6fa257
--- /dev/null
+++ b/chef-server-webui/app/assets/images/images/ui-icons_ffffff_256x240.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/indicator.gif b/chef-server-webui/app/assets/images/indicator.gif
new file mode 100644
index 0000000000..085ccaecaf
--- /dev/null
+++ b/chef-server-webui/app/assets/images/indicator.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/add2.png b/chef-server-webui/app/assets/images/jsonedit/add2.png
new file mode 100644
index 0000000000..ffe3eda789
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/add2.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/build-button.png b/chef-server-webui/app/assets/images/jsonedit/build-button.png
new file mode 100644
index 0000000000..2b032f24d1
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/build-button.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/bullet.gif b/chef-server-webui/app/assets/images/jsonedit/bullet.gif
new file mode 100644
index 0000000000..6305baea0d
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/bullet.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/bullet_orange.png b/chef-server-webui/app/assets/images/jsonedit/bullet_orange.png
new file mode 100644
index 0000000000..fa63024e55
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/bullet_orange.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/cross.png b/chef-server-webui/app/assets/images/jsonedit/cross.png
new file mode 100644
index 0000000000..1514d51a3c
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/cross.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/delete.png b/chef-server-webui/app/assets/images/jsonedit/delete.png
new file mode 100644
index 0000000000..2b4ffc9609
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/delete.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/deleted.png b/chef-server-webui/app/assets/images/jsonedit/deleted.png
new file mode 100644
index 0000000000..016c8e6184
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/deleted.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/json.jpg b/chef-server-webui/app/assets/images/jsonedit/json.jpg
new file mode 100644
index 0000000000..b73d5fe49f
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/json.jpg
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/label.gif b/chef-server-webui/app/assets/images/jsonedit/label.gif
new file mode 100644
index 0000000000..2d70d56935
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/label.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/minus.gif b/chef-server-webui/app/assets/images/jsonedit/minus.gif
new file mode 100644
index 0000000000..154e45a5ee
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/minus.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/pixel.gif b/chef-server-webui/app/assets/images/jsonedit/pixel.gif
new file mode 100644
index 0000000000..efb6026aff
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/pixel.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/plus.gif b/chef-server-webui/app/assets/images/jsonedit/plus.gif
new file mode 100644
index 0000000000..93d2ade3d4
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/plus.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/saved.png b/chef-server-webui/app/assets/images/jsonedit/saved.png
new file mode 100644
index 0000000000..19d00b103f
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/saved.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/table_refresh.png b/chef-server-webui/app/assets/images/jsonedit/table_refresh.png
new file mode 100644
index 0000000000..d2ec4b5a5f
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/table_refresh.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/jsonedit/value.gif b/chef-server-webui/app/assets/images/jsonedit/value.gif
new file mode 100644
index 0000000000..7381eeb8df
--- /dev/null
+++ b/chef-server-webui/app/assets/images/jsonedit/value.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/merb.jpg b/chef-server-webui/app/assets/images/merb.jpg
new file mode 100644
index 0000000000..a19dcf4048
--- /dev/null
+++ b/chef-server-webui/app/assets/images/merb.jpg
Binary files differ
diff --git a/chef-server-webui/app/assets/images/toggle-collapse-dark.png b/chef-server-webui/app/assets/images/toggle-collapse-dark.png
new file mode 100644
index 0000000000..76577a57a2
--- /dev/null
+++ b/chef-server-webui/app/assets/images/toggle-collapse-dark.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/toggle-collapse-light.png b/chef-server-webui/app/assets/images/toggle-collapse-light.png
new file mode 100644
index 0000000000..ed1612fd9b
--- /dev/null
+++ b/chef-server-webui/app/assets/images/toggle-collapse-light.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/toggle-collapse.gif b/chef-server-webui/app/assets/images/toggle-collapse.gif
new file mode 100644
index 0000000000..f0979304ac
--- /dev/null
+++ b/chef-server-webui/app/assets/images/toggle-collapse.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/toggle-expand-dark.png b/chef-server-webui/app/assets/images/toggle-expand-dark.png
new file mode 100644
index 0000000000..cfb42a4512
--- /dev/null
+++ b/chef-server-webui/app/assets/images/toggle-expand-dark.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/toggle-expand-light.png b/chef-server-webui/app/assets/images/toggle-expand-light.png
new file mode 100644
index 0000000000..27b52344dc
--- /dev/null
+++ b/chef-server-webui/app/assets/images/toggle-expand-light.png
Binary files differ
diff --git a/chef-server-webui/app/assets/images/toggle-expand.gif b/chef-server-webui/app/assets/images/toggle-expand.gif
new file mode 100644
index 0000000000..03fa8360dd
--- /dev/null
+++ b/chef-server-webui/app/assets/images/toggle-expand.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/Thumbs.db b/chef-server-webui/app/assets/images/treeBuilderImages/Thumbs.db
new file mode 100644
index 0000000000..934ed17cb5
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/Thumbs.db
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/doc.gif b/chef-server-webui/app/assets/images/treeBuilderImages/doc.gif
new file mode 100644
index 0000000000..a0f4dd5dfb
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/doc.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/docNode.gif b/chef-server-webui/app/assets/images/treeBuilderImages/docNode.gif
new file mode 100644
index 0000000000..40167db1a5
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/docNode.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/docNodeLast.gif b/chef-server-webui/app/assets/images/treeBuilderImages/docNodeLast.gif
new file mode 100644
index 0000000000..b7b3e55cd0
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/docNodeLast.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/docNodeLastFirst.gif b/chef-server-webui/app/assets/images/treeBuilderImages/docNodeLastFirst.gif
new file mode 100644
index 0000000000..2cbb765d7c
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/docNodeLastFirst.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folder.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folder.gif
new file mode 100644
index 0000000000..3952b3d234
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folder.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNode.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNode.gif
new file mode 100644
index 0000000000..5b680136ee
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNode.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeFirst.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeFirst.gif
new file mode 100644
index 0000000000..9039327677
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeFirst.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLast.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLast.gif
new file mode 100644
index 0000000000..b87f003154
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLast.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLastFirst.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLastFirst.gif
new file mode 100644
index 0000000000..64c4d7ae07
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeLastFirst.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpen.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpen.gif
new file mode 100644
index 0000000000..b43ce87bf7
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpen.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenFirst.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenFirst.gif
new file mode 100644
index 0000000000..d8ee1fc1b1
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenFirst.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLast.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLast.gif
new file mode 100644
index 0000000000..11ae43a5ae
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLast.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLastFirst.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLastFirst.gif
new file mode 100644
index 0000000000..ba5c0d168d
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderNodeOpenLastFirst.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/folderOpen.gif b/chef-server-webui/app/assets/images/treeBuilderImages/folderOpen.gif
new file mode 100644
index 0000000000..7df8d32261
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/folderOpen.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/images/treeBuilderImages/vertLine.gif b/chef-server-webui/app/assets/images/treeBuilderImages/vertLine.gif
new file mode 100644
index 0000000000..63ee93a0f3
--- /dev/null
+++ b/chef-server-webui/app/assets/images/treeBuilderImages/vertLine.gif
Binary files differ
diff --git a/chef-server-webui/app/assets/javascripts/chef.js b/chef-server-webui/app/assets/javascripts/chef.js
new file mode 100644
index 0000000000..a9b689c209
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/chef.js
@@ -0,0 +1,315 @@
+//
+// Author:: Adam Jacob (<adam@opscode.com>)
+// Author:: AJ Christensen (<aj@junglist.gen.nz>)
+// Copyright:: Copyright (c) 2008 Opscode, Inc.
+// License:: Apache License, Version 2.0
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+
+$(document).ready(function(){
+
+ var buildHiddenFormFromDragDrop = function(form, runListSet) {
+ runListSet.each(function(i, envRunListUl) {
+ runListItemList = $(envRunListUl).find('li.runListItem')
+ if(runListItemList.length == 0){
+ activeRunListUl = envRunListUl.getAttribute("class").split(" ").indexOf('active')
+ if(activeRunListUl >= 0){
+ form.append('<input type="hidden" name="env_run_lists[' + envRunListUl.id + ']"/>');
+ }
+ }
+ else{
+ runListItemList.each(function(i, field) {
+ form.append('<input type="hidden" name="env_run_lists[' + envRunListUl.id + '][]" value="' + field.id + '"/>');
+ });
+ }
+ });
+ };
+
+ var buildHiddenFormFromJSONEditor = function(form) {
+ form.append('<input type="hidden" id="default_attributes" name="default_attributes"/>');
+ $('input#default_attributes').attr('value', BCJTEP.save('json["defaults"]'));
+ form.append('<input type="hidden" id="override_attributes" name="override_attributes"/>');
+ $('input#override_attributes').attr('value', BCJTEP.save('json["overrides"]'));
+ };
+
+ $('a#debugFormBuild').click(function(event) {buildHiddenFormFromDragDrop(event)});
+
+
+ $('form.roleForm').submit(function(event) {
+ buildHiddenFormFromDragDrop($(this), $('ul.runListItemList'));
+ buildHiddenFormFromJSONEditor($(this));
+ });
+
+ $('form#edit_environment, form#create_environment').submit(function(event) {
+ buildHiddenFormFromJSONEditor($(this));
+ });
+
+ $('form#edit_node, form#create_node').submit(function(event) {
+ var form = $(this);
+ var to_node = $('ul#for_node').sortable('toArray');
+ if (form.attr('id') === 'edit_node') {
+ form.append('<input type="hidden" name="_method" value="put">');
+ }
+ form.append($('input#node_name')).css('display', 'none');
+ form.append('<input type="hidden" id="attributes" name="attributes"/>');
+ $('input#attributes').attr('value', BCJTEP.save());
+ jQuery.each(to_node, function(i, field) {
+ form.append('<input type="hidden" name="for_node[]" value="' + field + '"/>');
+ });
+ });
+
+ $('form#edit_databag_item, form#create_databag_item').submit(function(event) {
+ var form = $(this);
+ if (form.attr('id') === 'edit_databag_item') {
+ form.append('<input type="hidden" name="_method" value="put">');
+ }
+ form.append('<input type="hidden" id="json_data" name="json_data"/>');
+ form.append($('input#json_data').attr('value', BCJTEP.save()));
+ });
+
+ $('form#edit_databag, form#create_databag').submit(function(event) {
+ var form = $(this);
+ if (form.attr('id') === 'edit_databag') {
+ form.append('<input type="hidden" name="_method" value="put">');
+ }
+ form.append($('input#databag_name')).css('display', 'none');
+ });
+
+ $('form#edit_client, form#create_client').submit(function(event) {
+ var form = $(this);
+ if (form.attr('id') === 'edit_client') {
+ form.append('<input type="hidden" name="_method" value="put">');
+ }
+ form.append($('input#client_name')).css('display', 'none');
+ form.append($('input#client_admin')).css('display', 'none');
+ form.append($('input#client_private_key')).css('display', 'none');
+ form.append($('input#regen_private_key')).css('display', 'none');
+
+ });
+
+
+ $('form#edit_user, form#login').submit(function(event) {
+ var form = $(this);
+ if (form.attr('id') === 'edit_user') {
+ form.append('<input type="hidden" name="_method" value="put">');
+ form.append($('input#user_new_password')).css('display', 'none');
+ form.append($('input#user_admin')).css('display', 'none');
+ form.append($('input#user_confirm_new_password')).css('display', 'none');
+ form.append($('input#openid')).css('display', 'none');
+ }
+ if (form.attr('id') === 'login') {
+ form.append($('input#user_name')).css('display', 'none');
+ form.append($('input#password')).css('display', 'none');
+ }
+ });
+
+ // livequery hidden form for link_to ajax magic
+ $(document.body).delegate('a[method]', 'click', function(event){
+ var $this = $(this);
+ var message = $this.attr('confirm'), method = $this.attr('method');
+
+ if (!method && !message) {
+ return;
+ }
+
+ if (message && !confirm(message)) {
+ event.preventDefault();
+ return;
+ }
+
+ if (method === 'post' || method === 'put' || method === 'delete') {
+ event.preventDefault();
+ var form = $("<form/>").attr('method', 'post').attr('action', this.href).attr('style', 'display: none');
+ if (method !== "post") {
+ form.append($('<input type="hidden" name="_method"/>').attr('value', method));
+ }
+ form.insertAfter(this).submit();
+ }
+ });
+
+ // accordion for the cookbooks show view
+ $('.accordion .head').click(function() {
+ $(this).next().toggle('slow');
+ return false;
+ }).next().hide();
+
+ // global facebox callback
+ $('a[rel*=facebox]').facebox();
+
+
+ var enableDragDropBehavior = function() {
+ $('.connectedSortable').sortable({
+ placeholder: 'ui-state-highlight',
+ connectWith: $('.connectedSortable')
+ }).disableSelection();
+ };
+
+ var disableDragDropBehavior = function() {
+ $('.connectedSortable').sortable("destroy");
+ };
+
+ enableDragDropBehavior();
+
+ // The table tree!
+ $('table.tree').treeTable({ expandable: true });
+ $('span.expander').click(function() { $('tr#' + $(this).attr('toggle')).toggleBranch(); });
+
+ // Tooltips
+ $("div.tooltip").tooltip({
+ position: ['center', 'right'],
+ offset: [-5, 10],
+ effect: 'toggle',
+ opacity: 0.7
+ });
+
+ // Show the sidebars if they have text in them!
+ var sidebar_block_notice_children = $("#sidebar_block_notice").children().length;
+ var sidebar_block_children = $("#sidebar_block").children().length;
+
+ if (sidebar_block_notice_children > 0) {
+ $("#sidebar_block_notice").fadeIn();
+ }
+
+ if (sidebar_block_children > 0) {
+ $("#sidebar_block").fadeIn();
+ }
+
+ // Run list editor with per-env run lists for roles
+
+ var populateAvailableRecipesForEnv = function(currentEnvironment, callback) {
+ $.getJSON('/environments/' + currentEnvironment + '/recipes', function(data) {
+ $('div#available_recipes_container .spinner').hide();
+ for (var i=0; i < data['recipes'].length; i++) {
+ var recipe = data['recipes'][i];
+ $('ul.availableRecipes').append('<li id="recipe[' + recipe + ']" class="ui-state-default runListItem">' + recipe + '</li>');
+ }
+ });
+ if (callback) { callback(); }
+ };
+
+ var depopulateAvailableRecipesForEnv = function() {
+ $('ul.availableRecipes li').remove();
+ $('div#available_recipes_container .spinner').show();
+ };
+
+ // If the attribute 'data-initial-env' exists on this element, use it to load
+ // the recipes for that environment via ajax.
+ var initialEnvironment = $('div#environmentRunListSelector').data('initial-env');
+ if (initialEnvironment) {
+ populateAvailableRecipesForEnv(initialEnvironment);
+ }
+
+ var resetAvailableRoleList = function() {
+ $('ul#availableRoles li').remove();
+ var allRoles = $('ul#availableRoles').data('role-list');
+ for (var i=0; i < allRoles.length; i++) {
+ var role = allRoles[i];
+ $('ul#availableRoles').append('<li id="role[' + role + ']" class="ui-state-highlight runListItem">' + role + '</li>');
+ }
+
+ };
+
+ var clearRunListFor = function(environment) {
+ $('ul.runListItemList#' + environment).children().remove();
+ };
+
+ var removeEnvironmentFromCloneControls = function(environment) {
+ $('select.environmentToClone option[value="' + environment + '"]').remove();
+ };
+
+ var addEnvironmentToCloneControls = function(environment) {
+ $('select.environmentToClone').append('<option value="' + environment + '">' + environment + '</option>');
+ };
+
+ var deleteEnvRunList = function(environment) {
+ clearRunListFor(environment);
+ $('ul.runListItemList#' + environment).removeClass('active').addClass('inactive');
+ $('div.emptyRunListControlsContainer#' + environment).removeClass('inactive').addClass('active');
+ $('div.runListAdditionalControls#' + environment + " a").remove();
+ removeEnvironmentFromCloneControls(environment);
+ };
+
+ var createRunListDeleteLinkFor = function(environment) {
+ // remove any existing link
+ $('a.deleteEnvRunList#' + environment).remove();
+ var containerDiv = $('div.runListAdditionalControls#' + environment);
+ var link = '<a href="javascript:void(0);" class="deleteEnvRunList" id="' + environment + '">Remove environment specific run list for ' + environment + '</a>';
+ containerDiv.append(link);
+ containerDiv.find('a').click(function(j) {deleteEnvRunList(environment);});
+ };
+
+ $('a.createEmptyRunListControl').each(function(i) {
+ var environment = $(this).attr('id');
+ $(this).click(function(event) {
+ $('div.emptyRunListControlsContainer#' + environment).removeClass('active').addClass('inactive');
+ var runListContainerForEnv = $('div.runListContainer#' + environment + 'RunListContainer');
+ $('ul.runListItemList#' + environment).removeClass('inactive').addClass('active');
+ // remove all previous drag/drop events/behavior/whatever, then re-add it for the new run list container
+ disableDragDropBehavior();
+ enableDragDropBehavior();
+ createRunListDeleteLinkFor(environment);
+ addEnvironmentToCloneControls(environment);
+ });
+ });
+
+ var setActiveRunListLabelFor = function(environment) {
+ var labelElement = $('span#selectedRunListEditorLabel');
+ if (environment === '_default') {
+ labelElement.html('Default Run List');
+ }
+ else {
+ labelElement.html('Run List for ' + environment);
+ }
+ };
+
+ $('a.deleteEnvRunList').each(function(i) {
+ var environment = $(this).attr('id');
+ $(this).click(function(j) {deleteEnvRunList(environment);});
+ });
+
+ $('select#activeEnvironment').change(function() {
+ // set the active run list editor
+ var newActiveEnvironment = $(this).val();
+ if (newActiveEnvironment !== 'noop') {
+ $('div.runListWithControlsContainer.active').removeClass('active').addClass('inactive');
+ $('div.runListWithControlsContainer#' + newActiveEnvironment).addClass('active', 10000).removeClass('inactive');
+ setActiveRunListLabelFor(newActiveEnvironment);
+ depopulateAvailableRecipesForEnv();
+ var selector = $(this);
+ populateAvailableRecipesForEnv(newActiveEnvironment, function() { selector.val('noop');});
+ resetAvailableRoleList();
+ }
+ });
+
+ $('select.environmentToClone').change(function() {
+ var environmentToClone = $(this).val();
+ var targetEnvironment = $(this).attr('id');
+ var targetRunList = $('ul.runListItemList#' + targetEnvironment);
+ clearRunListFor(targetEnvironment); // be sure we start with a clean slate
+ $('ul.runListItemList#' + environmentToClone).children().clone().appendTo(targetRunList);
+ $('ul.runListItemList#' + targetEnvironment).removeClass('inactive').addClass('active');
+ $('div.emptyRunListControlsContainer#' + targetEnvironment).removeClass('active').addClass('inactive');
+ createRunListDeleteLinkFor(targetEnvironment);
+ addEnvironmentToCloneControls(targetEnvironment);
+ });
+
+ $('select#nodeEnvironment').change(function() {
+ // set the active run list editor
+ var newNodeEnvironment = $(this).val();
+ depopulateAvailableRecipesForEnv();
+ populateAvailableRecipesForEnv(newNodeEnvironment);
+ });
+
+});
diff --git a/chef-server-webui/app/assets/javascripts/cookbook_constraint_ctrl.js b/chef-server-webui/app/assets/javascripts/cookbook_constraint_ctrl.js
new file mode 100644
index 0000000000..57de3dc005
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/cookbook_constraint_ctrl.js
@@ -0,0 +1,191 @@
+$(document).ready(function() {
+ // add version constraints, sorted by cookbook name
+ var cookbook, versions, constraints = [], i = 0, max, row;
+ if (document.getElementById('edit') != null) {
+ versions = cookbook_versions();
+ for (cookbook in versions) {
+ constraints.push([cookbook, versions[cookbook]["op"],
+ versions[cookbook]["version"]]);
+ }
+ constraints.sort();
+ for (i = constraints.length - 1; i >= 0; i--) {
+ row = constraints[i];
+ addTableRow(row[0], row[1], row[2]);
+ }
+ }
+})
+
+function jQuerySuggest(timestamp){
+ $(".ac_results").remove(); // FIXME issue w/ jquery suggest
+ var cb_name = retrieveCbName(timestamp);
+ populateVersionBoxContent(timestamp, cb_name);
+ $("#cookbook_version_" + timestamp)[0].value = "0.0.0";
+}
+
+function populateVersionBoxContent(timestamp, cb_name){
+ // Ignore environments when editing the environments constraints
+ $.getJSON('/cookbooks/'+cb_name+'?num_versions=all&ignore_environments=true',
+ function(result){
+ var versions = $.map(result[cb_name],
+ function(item, i) {
+ return item["version"];
+ });
+ jQuery('#cookbook_version_' + timestamp).suggest(versions);
+ });
+}
+
+function clearVersionBox(box, timestamp){
+ populateVersionBoxContent(timestamp, retrieveCbName(timestamp));
+ $('#invalid_version_error_' + timestamp).remove();
+}
+
+function validVersion(version) {
+ var xyz_match = version.match(/^\d+\.\d+\.\d+$/);
+ var xy_match = version.match(/^\d+\.\d+$/);
+ return (xyz_match || xy_match);
+}
+
+function do_validateVersionBoxValue(box, timestamp) {
+ var msg_class = 'invalid_version_error';
+ var msg_id = 'invalid_version_error_' + timestamp;
+ if (!validVersion(box.value)) {
+ if (box.value.length != 0 && $('.' + msg_class).length == 0) {
+ var error_msg = $('<div/>')
+ .addClass(msg_class)
+ .attr('id', msg_id).text("Version must be x.y.z or x.y");
+ $(box).parent().append(error_msg);
+ }
+ if (box.value.length == 0) {
+ box.value = "0.0.0";
+ }
+ return false;
+ }
+ return true;
+}
+
+function validateVersionBoxValue(box, timestamp) {
+ // a short delay prevents validation from firing
+ // when user clicks on one of the suggestions.
+ setTimeout(function() {
+ return do_validateVersionBoxValue(box, timestamp);
+ }, 100);
+}
+
+function appendOperatorsOptions(default_operator, obj) {
+ var ops = ["~>", ">=", ">", "=", "<", "<="];
+ for (i in ops) {
+ var op = ops[i]
+ var option = $('<option/>').attr("value", op).text(op);
+ if (default_operator == op) {
+ option.attr("selected", "true");
+ }
+ obj.append(option);
+ }
+}
+
+function retrieveCbName(timestamp) {
+ var cb_name_item = $('#cookbook_name_' + timestamp)[0];
+ if (cb_name_item && cb_name_item.value) {
+ return cb_name_item.value;
+ }
+ return "";
+}
+
+function constraint_exists(cookbook) {
+ var cookbooks = $('.hidden_cookbook_name').map(
+ function(i, x) { return x.value });
+ return $.inArray(cookbook, cookbooks) > -1;
+}
+
+function validateUniqueConstraint(cookbook) {
+ var msg_class = 'invalid_version_error';
+ var msg_id = 'duplicate_cookbook_error';
+ if (constraint_exists(cookbook)) {
+ var error_msg = $('<div/>')
+ .addClass(msg_class)
+ .attr('id', msg_id).text("constraint already exists for " + cookbook);
+ $('#cookbook_name_0000').parent().append(error_msg);
+ return false;
+ }
+ return true;
+}
+
+function clearCookbookError() {
+ $('#duplicate_cookbook_error').remove();
+}
+
+function validTableRow(default_cookbook, default_version) {
+ if (default_cookbook == "") return false;
+ if (!validateUniqueConstraint(default_cookbook)) return false;
+ if (!validVersion(default_version)) return false;
+ return true;
+}
+
+function addTableRow(default_cookbook, default_operator, default_version){
+ if (!validTableRow(default_cookbook, default_version)) return;
+ var timestamp = new Date().getTime();
+ var row = $('<tr/>');
+ var td_name = make_td_name(default_cookbook, timestamp);
+ var td_op = make_td_op(default_operator, timestamp);
+ var td_version = make_td_version(default_version, timestamp);
+ var td_rm = make_td_remove(row);
+ row.append(td_name).append(td_op).append(td_version).append(td_rm);
+ $("#cbVerAddRow").parent().after(row);
+ validateVersionBoxValue(document.getElementById("cookbook_version_" + timestamp));
+ clearConstraintEditor();
+}
+
+function clearConstraintEditor() {
+ $("#cookbook_name_0000")[0].value = "";
+ $("#cookbook_operator_selector")[0].selectedIndex = 0;
+ $("#cookbook_version_0000")[0].value = "0.0.0";
+}
+
+function addTableRow0000() {
+ var cookbook = $("#cookbook_name_0000")[0].value;
+ var operator = $("#cookbook_operator_selector")[0].value;
+ var version = $("#cookbook_version_0000")[0].value;
+ addTableRow(cookbook, operator, version);
+}
+
+function make_td_name(default_cookbook, timestamp) {
+ var td_name = $('<td/>').text(default_cookbook)
+ var name_hidden = $('<input>')
+ .addClass("hidden_cookbook_name")
+ .attr("id", "cookbook_name_" + timestamp)
+ .attr("type", "hidden")
+ .attr("name", "cookbook_name_" + timestamp)
+ .attr("value", default_cookbook);
+ td_name.append(name_hidden);
+ return td_name;
+}
+
+function make_td_version(default_version, timestamp) {
+ var version_box = $('<input>')
+ .addClass("text")
+ .attr("name", "cookbook_version_" + timestamp)
+ .attr("id", "cookbook_version_" + timestamp)
+ .attr("type", "text")
+ .attr("value", default_version)
+ .focus(function() { clearVersionBox(this, timestamp) })
+ .blur(function() { validateVersionBoxValue(this, timestamp) })
+ return $('<td/>').append(version_box);
+}
+
+function make_td_op(default_operator, timestamp) {
+ var select_op = $('<select/>').attr('name', "operator_" + timestamp);
+ appendOperatorsOptions(default_operator, select_op);
+ return $('<td/>').append(select_op);
+}
+
+function make_td_remove(row) {
+ return $('<td/>').append($('<a/>')
+ .text("remove")
+ .attr("href", "javascript:void(0)")
+ .click(function() { row.remove() }));
+}
+
+function removeTableRow(row){
+ row.remove();
+}
+
diff --git a/chef-server-webui/app/assets/javascripts/cookbook_versions.js b/chef-server-webui/app/assets/javascripts/cookbook_versions.js
new file mode 100644
index 0000000000..7e57fa369a
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/cookbook_versions.js
@@ -0,0 +1,75 @@
+function cookbook_versions_show_more() {
+ var cookbook = $(this).attr("data");
+ var version_list = $("#" + cookbook + "_versions");
+ if (version_list.children().length == 1) {
+ return;
+ }
+ version_list.children('.other_version').show();
+ $("#" + cookbook + "_show_all").show();
+ $(this).unbind("click");
+ // en-dash == &#8211;
+ $(this).html("&#8211;").attr("title", "hide other versions of " + cookbook);
+ $(this).click(cookbook_versions_show_less);
+}
+
+function cookbook_versions_show_less() {
+ var cookbook = $(this).attr("data");
+ var version_list = $("#" + cookbook + "_versions");
+ version_list.children('.other_version').hide();
+ version_list.children('.all_version').hide();
+ $("#" + cookbook + "_show_all").hide();
+ $(this).unbind("click");
+ $(this).text("+").attr("title", "show other versions of " + cookbook);
+ $(this).click(cookbook_versions_show_more);
+}
+
+function cookbook_versions_show_all() {
+ var self = $(this);
+ var cookbook = self.attr("data");
+ var version_list = $("#" + cookbook + "_versions");
+ var all_versions = version_list.children('.all_version');
+ if (all_versions.length > 0) {
+ all_versions.show();
+ self.hide();
+ return;
+ }
+ var spinner = $('<img/>')
+ .attr("src", "/images/indicator.gif")
+ .attr("id", "show_all_versions_spinner");
+ self.after(spinner);
+ self.hide();
+ var callback = function(data, textStatus, jqXHR) {
+ var all_versions = $('<ol/>');
+ for (var i in data[cookbook]) {
+ var v = data[cookbook][i];
+ klass = "all_version";
+ if (i == 0) {
+ klass = "latest_version";
+ }
+ else if (i < 5) {
+ klass = "other_version";
+ }
+ var link = $('<a/>').attr("href", v.url).text(v.version);
+ var item = $('<li/>').addClass(klass).append(link);
+ all_versions.append(item);
+ }
+ version_list.html(all_versions.html());
+ spinner.remove();
+ }
+ $.ajax({
+ url : "/cookbooks/" + cookbook + "?num_versions=all",
+ dataType: "json",
+ success : callback,
+ error : function(jqXHR, textStatus, errorThrown) {
+ spinner.remove();
+ self.show();
+ }
+ })
+}
+
+$(document).ready(function() {
+ $('td.show_more a').click(cookbook_versions_show_more);
+ $('td.show_more a').each(cookbook_versions_show_less);
+ $('a.show_all').click(cookbook_versions_show_all);
+})
+
diff --git a/chef-server-webui/app/assets/javascripts/drop_down_menu.js b/chef-server-webui/app/assets/javascripts/drop_down_menu.js
new file mode 100644
index 0000000000..ccfe85543f
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/drop_down_menu.js
@@ -0,0 +1,22 @@
+// Javascript generated and modified from the tool on http://www.echoecho.com/tooldropdown.htm
+function land(ref, target)
+{
+lowtarget=target.toLowerCase();
+if (lowtarget=="_self") {window.location=loc;}
+else {if (lowtarget=="_top") {top.location=loc;}
+else {if (lowtarget=="_blank") {window.open(loc);}
+else {if (lowtarget=="_parent") {parent.location=loc;}
+else {parent.frames[target].location=loc;};
+}}}
+}
+function jump(menu)
+{
+ref=menu.options[menu.selectedIndex].value;
+splitc=ref.lastIndexOf("*");
+target="";
+if (splitc!=-1)
+{loc=ref.substring(0,splitc);
+target=ref.substring(splitc+1,1000);}
+else {loc=ref; target="_self";};
+if (ref != "") {land(loc,target);}
+}
diff --git a/chef-server-webui/app/assets/javascripts/facebox/facebox.js b/chef-server-webui/app/assets/javascripts/facebox/facebox.js
new file mode 100644
index 0000000000..be62ff0fe3
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/facebox/facebox.js
@@ -0,0 +1,319 @@
+/*
+ * Facebox (for jQuery)
+ * version: 1.2 (05/05/2008)
+ * @requires jQuery v1.2 or later
+ *
+ * Examples at http://famspam.com/facebox/
+ *
+ * Licensed under the MIT:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ]
+ *
+ * Usage:
+ *
+ * jQuery(document).ready(function() {
+ * jQuery('a[rel*=facebox]').facebox()
+ * })
+ *
+ * <a href="#terms" rel="facebox">Terms</a>
+ * Loads the #terms div in the box
+ *
+ * <a href="terms.html" rel="facebox">Terms</a>
+ * Loads the terms.html page in the box
+ *
+ * <a href="terms.png" rel="facebox">Terms</a>
+ * Loads the terms.png image in the box
+ *
+ *
+ * You can also use it programmatically:
+ *
+ * jQuery.facebox('some html')
+ *
+ * The above will open a facebox with "some html" as the content.
+ *
+ * jQuery.facebox(function($) {
+ * $.get('blah.html', function(data) { $.facebox(data) })
+ * })
+ *
+ * The above will show a loading screen before the passed function is called,
+ * allowing for a better ajaxy experience.
+ *
+ * The facebox function can also display an ajax page or image:
+ *
+ * jQuery.facebox({ ajax: 'remote.html' })
+ * jQuery.facebox({ image: 'dude.jpg' })
+ *
+ * Want to close the facebox? Trigger the 'close.facebox' document event:
+ *
+ * jQuery(document).trigger('close.facebox')
+ *
+ * Facebox also has a bunch of other hooks:
+ *
+ * loading.facebox
+ * beforeReveal.facebox
+ * reveal.facebox (aliased as 'afterReveal.facebox')
+ * init.facebox
+ *
+ * Simply bind a function to any of these hooks:
+ *
+ * $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... })
+ *
+ */
+(function($) {
+ $.facebox = function(data, klass) {
+ $.facebox.loading()
+
+ if (data.ajax) fillFaceboxFromAjax(data.ajax)
+ else if (data.image) fillFaceboxFromImage(data.image)
+ else if (data.div) fillFaceboxFromHref(data.div)
+ else if ($.isFunction(data)) data.call($)
+ else $.facebox.reveal(data, klass)
+ }
+
+ /*
+ * Public, $.facebox methods
+ */
+
+ $.extend($.facebox, {
+ settings: {
+ opacity : 0,
+ overlay : true,
+ loadingImage : '/assets/facebox/loading.gif',
+ closeImage : '/assets/facebox/closelabel.gif',
+ imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ],
+ faceboxHtml : '\
+ <div id="facebox" style="display:none;"> \
+ <div class="popup"> \
+ <table> \
+ <tbody> \
+ <tr> \
+ <td class="tl"/><td class="b"/><td class="tr"/> \
+ </tr> \
+ <tr> \
+ <td class="b"/> \
+ <td class="body"> \
+ <div class="content"> \
+ </div> \
+ <div class="footer"> \
+ <a href="#" class="close"> \
+ <img src="/assets/facebox/closelabel.gif" title="close" class="close_image" /> \
+ </a> \
+ </div> \
+ </td> \
+ <td class="b"/> \
+ </tr> \
+ <tr> \
+ <td class="bl"/><td class="b"/><td class="br"/> \
+ </tr> \
+ </tbody> \
+ </table> \
+ </div> \
+ </div>'
+ },
+
+ loading: function() {
+ init()
+ if ($('#facebox .loading').length == 1) return true
+ showOverlay()
+
+ $('#facebox .content').empty()
+ $('#facebox .body').children().hide().end().
+ append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')
+
+ $('#facebox').css({
+ top: getPageScroll()[1] + (getPageHeight() / 10),
+ left: 385.5
+ }).show()
+
+ $(document).bind('keydown.facebox', function(e) {
+ if (e.keyCode == 27) $.facebox.close()
+ return true
+ })
+ $(document).trigger('loading.facebox')
+ },
+
+ reveal: function(data, klass) {
+ $(document).trigger('beforeReveal.facebox')
+ if (klass) $('#facebox .content').addClass(klass)
+ $('#facebox .content').append(data)
+ $('#facebox .loading').remove()
+ $('#facebox .body').children().fadeIn('normal')
+ $('#facebox').css('left', $(window).width() / 2 - ($('#facebox table').width() / 2))
+ $(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
+ },
+
+ close: function() {
+ $(document).trigger('close.facebox')
+ return false
+ }
+ })
+
+ /*
+ * Public, $.fn methods
+ */
+
+ $.fn.facebox = function(settings) {
+ init(settings)
+
+ function clickHandler() {
+ $.facebox.loading(true)
+
+ // support for rel="facebox.inline_popup" syntax, to add a class
+ // also supports deprecated "facebox[.inline_popup]" syntax
+ var klass = this.rel.match(/facebox\[?\.(\w+)\]?/)
+ if (klass) klass = klass[1]
+
+ fillFaceboxFromHref(this.href, klass)
+ return false
+ }
+
+ return this.click(clickHandler)
+ }
+
+ /*
+ * Private methods
+ */
+
+ // called one time to setup facebox on this page
+ function init(settings) {
+ if ($.facebox.settings.inited) return true
+ else $.facebox.settings.inited = true
+
+ $(document).trigger('init.facebox')
+ makeCompatible()
+
+ var imageTypes = $.facebox.settings.imageTypes.join('|')
+ $.facebox.settings.imageTypesRegexp = new RegExp('\.' + imageTypes + '$', 'i')
+
+ if (settings) $.extend($.facebox.settings, settings)
+ $('body').append($.facebox.settings.faceboxHtml)
+
+ var preload = [ new Image(), new Image() ]
+ preload[0].src = $.facebox.settings.closeImage
+ preload[1].src = $.facebox.settings.loadingImage
+
+ $('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function() {
+ preload.push(new Image())
+ preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1')
+ })
+
+ $('#facebox .close').click($.facebox.close)
+ $('#facebox .close_image').attr('src', $.facebox.settings.closeImage)
+ }
+
+ // getPageScroll() by quirksmode.com
+ function getPageScroll() {
+ var xScroll, yScroll;
+ if (self.pageYOffset) {
+ yScroll = self.pageYOffset;
+ xScroll = self.pageXOffset;
+ } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
+ yScroll = document.documentElement.scrollTop;
+ xScroll = document.documentElement.scrollLeft;
+ } else if (document.body) {// all other Explorers
+ yScroll = document.body.scrollTop;
+ xScroll = document.body.scrollLeft;
+ }
+ return new Array(xScroll,yScroll)
+ }
+
+ // Adapted from getPageSize() by quirksmode.com
+ function getPageHeight() {
+ var windowHeight
+ if (self.innerHeight) { // all except Explorer
+ windowHeight = self.innerHeight;
+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+ windowHeight = document.documentElement.clientHeight;
+ } else if (document.body) { // other Explorers
+ windowHeight = document.body.clientHeight;
+ }
+ return windowHeight
+ }
+
+ // Backwards compatibility
+ function makeCompatible() {
+ var $s = $.facebox.settings
+
+ $s.loadingImage = $s.loading_image || $s.loadingImage
+ $s.closeImage = $s.close_image || $s.closeImage
+ $s.imageTypes = $s.image_types || $s.imageTypes
+ $s.faceboxHtml = $s.facebox_html || $s.faceboxHtml
+ }
+
+ // Figures out what you want to display and displays it
+ // formats are:
+ // div: #id
+ // image: blah.extension
+ // ajax: anything else
+ function fillFaceboxFromHref(href, klass) {
+ // div
+ if (href.match(/#/)) {
+ var url = window.location.href.split('#')[0]
+ var target = href.replace(url,'')
+ $.facebox.reveal($(target).clone().show(), klass)
+
+ // image
+ } else if (href.match($.facebox.settings.imageTypesRegexp)) {
+ fillFaceboxFromImage(href, klass)
+ // ajax
+ } else {
+ fillFaceboxFromAjax(href, klass)
+ }
+ }
+
+ function fillFaceboxFromImage(href, klass) {
+ var image = new Image()
+ image.onload = function() {
+ $.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass)
+ }
+ image.src = href
+ }
+
+ function fillFaceboxFromAjax(href, klass) {
+ $.get(href, function(data) { $.facebox.reveal(data, klass) })
+ }
+
+ function skipOverlay() {
+ return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
+ }
+
+ function showOverlay() {
+ if (skipOverlay()) return
+
+ if ($('facebox_overlay').length == 0)
+ $("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
+
+ $('#facebox_overlay').hide().addClass("facebox_overlayBG")
+ .css('opacity', $.facebox.settings.opacity)
+ .click(function() { $(document).trigger('close.facebox') })
+ .fadeIn(200)
+ return false
+ }
+
+ function hideOverlay() {
+ if (skipOverlay()) return
+
+ $('#facebox_overlay').fadeOut(200, function(){
+ $("#facebox_overlay").removeClass("facebox_overlayBG")
+ $("#facebox_overlay").addClass("facebox_hide")
+ $("#facebox_overlay").remove()
+ })
+
+ return false
+ }
+
+ /*
+ * Bindings
+ */
+
+ $(document).bind('close.facebox', function() {
+ $(document).unbind('keydown.facebox')
+ $('#facebox').fadeOut(function() {
+ $('#facebox .content').removeClass().addClass('content')
+ hideOverlay()
+ $('#facebox .loading').remove()
+ })
+ })
+
+})(jQuery);
diff --git a/chef-server-webui/app/assets/javascripts/jquery-1.5.2.min.js b/chef-server-webui/app/assets/javascripts/jquery-1.5.2.min.js
new file mode 100644
index 0000000000..f78f96a12f
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery-1.5.2.min.js
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.5.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Mar 31 15:28:23 2011 -0400
+ */
+(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bR(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bQ(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bs.test(a)?e(a,f):bQ(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bQ(a+"["+f+"]",b[f],c,e)}function bP(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bJ,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bP(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bP(a,c,d,e,"*",g));return l}function bO(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bD),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bq(a,b,c){var e=b==="width"?bk:bl,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function bc(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bb(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function ba(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function _(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function $(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Q(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(L.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(r,"")===a.type?q.push(g.selector):t.splice(i--,1);f=d(a.target).closest(q,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){f=p[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:D?function(a){return a==null?"":D.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?B.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){F["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),E&&(d.inArray=function(a,b){return E.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?y=function(){c.removeEventListener("DOMContentLoaded",y,!1),d.ready()}:c.attachEvent&&(y=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",y),d.ready())});return d}(),e="then done fail isResolved isRejected promise".split(" "),f=[].slice;d.extend({_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),f;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(f)return f;f=a={}}var c=e.length;while(c--)a[e[c]]=b[e[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;c<e;c++)b[c]&&d.isFunction(b[c].promise)?b[c].promise().then(i(c),h.reject):--g;g||h.resolveWith(h,b)}else h!==a&&h.resolveWith(h,e?[a]:[]);return h.promise()}}),function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i<j;i++)g=f[i].name,g.indexOf("data-")===0&&(g=g.substr(5),h(this[0],g,e[g]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=h(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var j=/[\n\t\r]/g,k=/\s+/,l=/\r/g,m=/^(?:href|src|style)$/,n=/^(?:button|input)$/i,o=/^(?:button|input|object|select|textarea)$/i,p=/^a(?:rea)?$/i,q=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(k);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(k);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(j," ");for(var i=0,l=c.length;i<l;i++)h=h.replace(" "+c[i]+" "," ");g.className=d.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),i=b,j=a.split(k);while(f=j[g++])i=e?i:!h.hasClass(f),h[i?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(j," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j<k;j++){var m=h[j];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(q.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(l,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&q.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,H(a.origType,a.selector),d.extend({},a,{handler:G,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,H(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?y:x):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=y;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y,this.stopPropagation()},isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x};var z=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},A=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?A:z,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?A:z)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&E("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&E("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var B,C=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var F={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=r.exec(h),k="",j&&(k=j[0],h=h.replace(r,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(F[h]+k),h=h+k):h=(F[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)d.event.add(n[p],"live."+H(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+H(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var I=/Until$/,J=/^(?:parents|prevUntil|prevAll)/,K=/,/,L=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,N=d.expr.match.POS,O={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(Q(this,a,!1),"not",a)},filter:function(a){return this.pushStack(Q(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/<tbody/i,W=/<|&#?\w+;/,X=/<(?:script|object|embed|option|style)/i,Y=/checked\s*(?:[^=]|=\s*.checked.)/i,Z={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.length?this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&Y.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?$(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,bc)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!X.test(a[0])&&(d.support.checkClone||!Y.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1></$2>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bC=/^(?:select|textarea)/i,bD=/\s+/,bE=/([?&])_=[^&]*/,bF=/(^|\-)([a-z])/g,bG=function(a,b,c){return b+c.toUpperCase()},bH=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bI=d.fn.load,bJ={},bK={},bL,bM;try{bL=c.location.href}catch(bN){bL=c.createElement("a"),bL.href="",bL=bL.href}bM=bH.exec(bL.toLowerCase())||[],d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bI)return bI.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("<div>").append(c.replace(bB,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bC.test(this.nodeName)||bw.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bt,"\r\n")}}):{name:b.name,value:c.replace(bt,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bL,isLocal:bx.test(bM[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bO(bJ),ajaxTransport:bO(bK),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bR(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bS(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bF,bG)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bv.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bu,"").replace(bz,bM[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bD),e.crossDomain==null&&(q=bH.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bM[1]||q[2]!=bM[2]||(q[3]||(q[1]==="http:"?80:443))!=(bM[3]||(bM[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bP(bJ,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!by.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(bA.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bE,"$1_="+w);e.url=x+(x===e.url?(bA.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bP(bK,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bQ(g,a[g],c,f);return e.join("&").replace(br,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bT=d.now(),bU=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bT++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bU.test(b.url)||f&&bU.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bU,l),b.url===j&&(f&&(k=k.replace(bU,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bV=d.now(),bW,bX;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bZ()||b$()}:bZ,bX=d.ajaxSettings.xhr(),d.support.ajax=!!bX,d.support.cors=bX&&"withCredentials"in bX,bX=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bW[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bW||(bW={},bY()),h=bV++,g.onreadystatechange=bW[h]=c):c()},abort:function(){c&&c(0,1)}}}});var b_={},ca=/^(?:toggle|show|hide)$/,cb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cc,cd=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(ce("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",cf(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ce("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(ce("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=cf(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(ca.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=cb.exec(e),j=f.cur();if(i){var k=parseFloat(i[2]),l=i[3]||(d.cssNumber[c]?"":"px");l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:ce("show",1),slideUp:ce("hide",1),slideToggle:ce("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!cc&&(cc=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(cc),cc=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var cg=/^t(?:able|d|h)$/i,ch=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=ci(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!cg.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=(e==="absolute"||e==="fixed")&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=ch.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!ch.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=ci(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=ci(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window); \ No newline at end of file
diff --git a/chef-server-webui/app/assets/javascripts/jquery-ui-1.7.1.custom.min.js b/chef-server-webui/app/assets/javascripts/jquery-ui-1.7.1.custom.min.js
new file mode 100644
index 0000000000..2ea9f4cd52
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery-ui-1.7.1.custom.min.js
@@ -0,0 +1,65 @@
+/*
+ * jQuery UI 1.7.1
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */ jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
+ * jQuery UI Draggable 1.7.1
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * ui.core.js
+ */ (function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.1",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
+ * jQuery UI Droppable 1.7.1
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ */ (function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.1",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
+ * jQuery UI Resizable 1.7.1
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * ui.core.js
+ */ (function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.1",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
+ * jQuery UI Selectable 1.7.1
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * ui.core.js
+ */ (function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.1",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
+ * jQuery UI Sortable 1.7.1
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * ui.core.js
+ */ (function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.1",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);; \ No newline at end of file
diff --git a/chef-server-webui/app/assets/javascripts/jquery.editinline.js b/chef-server-webui/app/assets/javascripts/jquery.editinline.js
new file mode 100644
index 0000000000..e97abe1d15
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.editinline.js
@@ -0,0 +1,108 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+(function($) {
+
+ function startEditing(elem, options) {
+ var editable = $(elem);
+ var origHtml = editable.html();
+ var origText = options.populate($.trim(editable.text()));
+
+ if (!options.begin.apply(elem, [origText])) {
+ return;
+ }
+
+ var input = options.createInput.apply(elem, [origText])
+ .addClass("editinline").val(origText)
+ .dblclick(function() { return false; })
+ .keydown(function(evt) {
+ switch (evt.keyCode) {
+ case 13: { // return
+ if (!input.is("textarea")) applyChange(evt.keyCode);
+ break;
+ }
+ case 27: { // escape
+ cancelChange(evt.keyCode);
+ break;
+ }
+ case 9: { // tab
+ if (!input.is("textarea")) {
+ applyChange(evt.keyCode);
+ return false;
+ }
+ }
+ }
+ });
+
+ function applyChange(keyCode) {
+ var newText = input.val();
+ if (newText == origText) {
+ cancelChange(keyCode);
+ return true;
+ }
+ if ((!options.allowEmpty && !newText.length) ||
+ !options.validate.apply(elem, [newText])) {
+ input.addClass("invalid");
+ return false;
+ }
+ input.remove();
+ tools.remove();
+ options.accept.apply(elem, [newText, origText]);
+ editable.removeClass("editinline-container");
+ options.end.apply(elem, [keyCode]);
+ return true;
+ }
+
+ function cancelChange(keyCode) {
+ options.cancel.apply(elem, [origText]);
+ editable.html(origHtml).removeClass("editinline-container");
+ options.end.apply(elem, [keyCode]);
+ }
+
+ var tools = $("<span class='editinline-tools'></span>");
+ $("<button type='button' class='apply'></button>")
+ .text(options.acceptLabel).click(applyChange).appendTo(tools);
+ $("<button type='button' class='cancel'></button>")
+ .text(options.cancelLabel).click(cancelChange).appendTo(tools)
+
+ editable.html("").append(tools).append(input)
+ .addClass("editinline-container");
+ options.prepareInput.apply(elem, [input[0]]);
+ input.each(function() { this.focus(); this.select(); });
+ }
+
+ $.fn.makeEditable = function(options) {
+ options = $.extend({
+ allowEmpty: true,
+ acceptLabel: "",
+ cancelLabel: "",
+ toolTip: "Double click to edit",
+
+ // callbacks
+ begin: function() { return true },
+ accept: function(newValue, oldValue) {},
+ cancel: function(oldValue) {},
+ createInput: function(value) { return $("<input type='text'>") },
+ prepareInput: function(input) {},
+ end: function(keyCode) {},
+ populate: function(value) { return value },
+ validate: function() { return true }
+ }, options || {});
+
+ return this.each(function() {
+ $(this).attr("title", options.toolTip).dblclick(function() {
+ startEditing(this, options);
+ });
+ });
+ }
+
+})(jQuery);
diff --git a/chef-server-webui/app/assets/javascripts/jquery.jeditable.mini.js b/chef-server-webui/app/assets/javascripts/jquery.jeditable.mini.js
new file mode 100644
index 0000000000..fdc46ff456
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.jeditable.mini.js
@@ -0,0 +1,30 @@
+
+(function($){$.fn.editable=function(target,options){var settings={target:target,name:'value',id:'id',type:'text',width:'auto',height:'auto',event:'click',onblur:'cancel',loadtype:'GET',loadtext:'Loading...',placeholder:'Click to edit',loaddata:{},submitdata:{}};if(options){$.extend(settings,options);}
+var plugin=$.editable.types[settings.type].plugin||function(){};var submit=$.editable.types[settings.type].submit||function(){};var buttons=$.editable.types[settings.type].buttons||$.editable.types['defaults'].buttons;var content=$.editable.types[settings.type].content||$.editable.types['defaults'].content;var element=$.editable.types[settings.type].element||$.editable.types['defaults'].element;var reset=$.editable.types[settings.type].reset||$.editable.types['defaults'].reset;var callback=settings.callback||function(){};if(!$.isFunction($(this)[settings.event])){$.fn[settings.event]=function(fn){return fn?this.bind(settings.event,fn):this.trigger(settings.event);}}
+$(this).attr('title',settings.tooltip);settings.autowidth='auto'==settings.width;settings.autoheight='auto'==settings.height;return this.each(function(){var self=this;var savedwidth=$(self).width();var savedheight=$(self).height();if(!$.trim($(this).html())){$(this).html(settings.placeholder);}
+$(this)[settings.event](function(e){if(self.editing){return;}
+if(0==$(self).width()){settings.width=savedwidth;settings.height=savedheight;}else{if(settings.width!='none'){settings.width=settings.autowidth?$(self).width():settings.width;}
+if(settings.height!='none'){settings.height=settings.autoheight?$(self).height():settings.height;}}
+if($(this).html().toLowerCase().replace(/;/,'')==settings.placeholder.toLowerCase().replace(/;/,'')){$(this).html('');}
+self.editing=true;self.revert=$(self).html();$(self).html('');var form=$('<form/>');if(settings.cssclass){if('inherit'==settings.cssclass){form.attr('class',$(self).attr('class'));}else{form.attr('class',settings.cssclass);}}
+if(settings.style){if('inherit'==settings.style){form.attr('style',$(self).attr('style'));form.css('display',$(self).css('display'));}else{form.attr('style',settings.style);}}
+var input=element.apply(form,[settings,self]);var input_content;if(settings.loadurl){var t=setTimeout(function(){input.disabled=true;content.apply(form,[settings.loadtext,settings,self]);},100);var loaddata={};loaddata[settings.id]=self.id;if($.isFunction(settings.loaddata)){$.extend(loaddata,settings.loaddata.apply(self,[self.revert,settings]));}else{$.extend(loaddata,settings.loaddata);}
+$.ajax({type:settings.loadtype,url:settings.loadurl,data:loaddata,async:false,success:function(result){window.clearTimeout(t);input_content=result;input.disabled=false;}});}else if(settings.data){input_content=settings.data;if($.isFunction(settings.data)){input_content=settings.data.apply(self,[self.revert,settings]);}}else{input_content=self.revert;}
+content.apply(form,[input_content,settings,self]);input.attr('name',settings.name);buttons.apply(form,[settings,self]);$(self).append(form);plugin.apply(form,[settings,self]);$(':input:visible:enabled:first',form).focus();if(settings.select){input.select();}
+input.keydown(function(e){if(e.keyCode==27){e.preventDefault();reset.apply(form,[settings,self]);}});var t;if('cancel'==settings.onblur){input.blur(function(e){t=setTimeout(function(){reset.apply(form,[settings,self]);},500);});}else if('submit'==settings.onblur){input.blur(function(e){form.submit();});}else if($.isFunction(settings.onblur)){input.blur(function(e){settings.onblur.apply(self,[input.val(),settings]);});}else{input.blur(function(e){});}
+form.submit(function(e){if(t){clearTimeout(t);}
+e.preventDefault();if(false!==submit.apply(form,[settings,self])){if($.isFunction(settings.target)){var str=settings.target.apply(self,[input.val(),settings]);$(self).html(str);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder);}}else{var submitdata={};submitdata[settings.name]=input.val();submitdata[settings.id]=self.id;if($.isFunction(settings.submitdata)){$.extend(submitdata,settings.submitdata.apply(self,[self.revert,settings]));}else{$.extend(submitdata,settings.submitdata);}
+if('PUT'==settings.method){submitdata['_method']='put';}
+$(self).html(settings.indicator);$.post(settings.target,submitdata,function(str){$(self).html(str);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder);}});}}
+return false;});});this.reset=function(){$(self).html(self.revert);self.editing=false;if(!$.trim($(self).html())){$(self).html(settings.placeholder);}}});};$.editable={types:{defaults:{element:function(settings,original){var input=$('<input type="hidden">');$(this).append(input);return(input);},content:function(string,settings,original){$(':input:first',this).val(string);},reset:function(settings,original){original.reset();},buttons:function(settings,original){var form=this;if(settings.submit){if(settings.submit.match(/>$/)){var submit=$(settings.submit).click(function(){if(submit.attr("type")!="submit"){form.submit();}});}else{var submit=$('<button type="submit">');submit.html(settings.submit);}
+$(this).append(submit);}
+if(settings.cancel){if(settings.cancel.match(/>$/)){var cancel=$(settings.cancel);}else{var cancel=$('<button type="cancel">');cancel.html(settings.cancel);}
+$(this).append(cancel);$(cancel).click(function(event){if($.isFunction($.editable.types[settings.type].reset)){var reset=$.editable.types[settings.type].reset;}else{var reset=$.editable.types['defaults'].reset;}
+reset.apply(form,[settings,original]);return false;});}}},text:{element:function(settings,original){var input=$('<input>');if(settings.width!='none'){input.width(settings.width);}
+if(settings.height!='none'){input.height(settings.height);}
+input.attr('autocomplete','off');$(this).append(input);return(input);}},textarea:{element:function(settings,original){var textarea=$('<textarea>');if(settings.rows){textarea.attr('rows',settings.rows);}else{textarea.height(settings.height);}
+if(settings.cols){textarea.attr('cols',settings.cols);}else{textarea.width(settings.width);}
+$(this).append(textarea);return(textarea);}},select:{element:function(settings,original){var select=$('<select>');$(this).append(select);return(select);},content:function(string,settings,original){if(String==string.constructor){eval('var json = '+string);for(var key in json){if(!json.hasOwnProperty(key)){continue;}
+if('selected'==key){continue;}
+var option=$('<option>').val(key).append(json[key]);$('select',this).append(option);}}
+$('select',this).children().each(function(){if($(this).val()==json['selected']||$(this).text()==original.revert){$(this).attr('selected','selected');};});}}},addInputType:function(name,input){$.editable.types[name]=input;}};})(jQuery); \ No newline at end of file
diff --git a/chef-server-webui/app/assets/javascripts/jquery.localscroll.js b/chef-server-webui/app/assets/javascripts/jquery.localscroll.js
new file mode 100644
index 0000000000..596e1ba200
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.localscroll.js
@@ -0,0 +1,104 @@
+/**
+ * jQuery.LocalScroll
+ * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Dual licensed under MIT and GPL.
+ * Date: 6/3/2008
+ *
+ * @projectDescription Animated scrolling navigation, using anchors.
+ * http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html
+ * @author Ariel Flesler
+ * @version 1.2.6
+ *
+ * @id jQuery.fn.localScroll
+ * @param {Object} settings Hash of settings, it is passed in to jQuery.ScrollTo, none is required.
+ * @return {jQuery} Returns the same jQuery object, for chaining.
+ *
+ * @example $('ul.links').localScroll();
+ *
+ * @example $('ul.links').localScroll({ filter:'.animated', duration:400, axis:'x' });
+ *
+ * @example $.localScroll({ target:'#pane', axis:'xy', queue:true, event:'mouseover' });
+ *
+ * Notes:
+ * - The plugin requires jQuery.ScrollTo.
+ * - The hash of settings, is passed to jQuery.ScrollTo, so the settings are valid for that plugin as well.
+ * - jQuery.localScroll can be used if the desired links, are all over the document, it accepts the same settings.
+ * - If the setting 'lazy' is set to true, then the binding will still work for later added anchors.
+ * - The setting 'speed' is deprecated, use 'duration' instead.
+ * - If onBefore returns false, the event is ignored.
+ **/
+;(function( $ ){
+ var URI = location.href.replace(/#.*/,'');//local url without hash
+
+ var $localScroll = $.localScroll = function( settings ){
+ $('body').localScroll( settings );
+ };
+
+ //Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option.
+ //@see http://www.freewebs.com/flesler/jQuery.ScrollTo/
+ $localScroll.defaults = {//the defaults are public and can be overriden.
+ duration:1000, //how long to animate.
+ axis:'y',//which of top and left should be modified.
+ event:'click',//on which event to react.
+ stop:true//avoid queuing animations
+ /*
+ lock:false,//ignore events if already animating
+ lazy:false,//if true, links can be added later, and will still work.
+ target:null, //what to scroll (selector or element). Keep it null if want to scroll the whole window.
+ filter:null, //filter some anchors out of the matched elements.
+ hash: false//if true, the hash of the selected link, will appear on the address bar.
+ */
+ };
+
+ //if the URL contains a hash, it will scroll to the pointed element
+ $localScroll.hash = function( settings ){
+ settings = $.extend( {}, $localScroll.defaults, settings );
+ settings.hash = false;//can't be true
+ if( location.hash )
+ setTimeout(function(){ scroll( 0, location, settings ); }, 0 );//better wrapped with a setTimeout
+ };
+
+ $.fn.localScroll = function( settings ){
+ settings = $.extend( {}, $localScroll.defaults, settings );
+
+ return ( settings.persistent || settings.lazy )
+ ? this.bind( settings.event, function( e ){//use event delegation, more links can be added later.
+ var a = $([e.target, e.target.parentNode]).filter(filter)[0];//if a valid link was clicked.
+ a && scroll( e, a, settings );//do scroll.
+ })
+ : this.find('a,area')//bind concretely, to each matching link
+ .filter( filter ).bind( settings.event, function(e){
+ scroll( e, this, settings );
+ }).end()
+ .end();
+
+ function filter(){//is this a link that points to an anchor and passes a possible filter ? href is checked to avoid a bug in FF.
+ return !!this.href && !!this.hash && this.href.replace(this.hash,'') == URI && (!settings.filter || $(this).is( settings.filter ));
+ };
+ };
+
+ function scroll( e, link, settings ){
+ var id = link.hash.slice(1),
+ elem = document.getElementById(id) || document.getElementsByName(id)[0];
+ if ( elem ){
+ e && e.preventDefault();
+ var $target = $( settings.target || $.scrollTo.window() );//if none specified, then the window.
+
+ if( settings.lock && $target.is(':animated') ||
+ settings.onBefore && settings.onBefore.call(link, e, elem, $target) === false ) return;
+
+ if( settings.stop )
+ $target.queue('fx',[]).stop();//remove all its animations
+ $target
+ .scrollTo( elem, settings )//do scroll
+ .trigger('notify.serialScroll',[elem]);//notify serialScroll about this change
+ if( settings.hash )
+ $target.queue(function(){
+ location = link.hash;
+ // make sure this function is released
+ $(this).dequeue();
+ });
+ }
+ };
+
+})( jQuery ); \ No newline at end of file
diff --git a/chef-server-webui/app/assets/javascripts/jquery.scrollTo.js b/chef-server-webui/app/assets/javascripts/jquery.scrollTo.js
new file mode 100644
index 0000000000..688d58e55d
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.scrollTo.js
@@ -0,0 +1,150 @@
+/**
+ * jQuery.ScrollTo
+ * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Dual licensed under MIT and GPL.
+ * Date: 2/19/2008
+ *
+ * @projectDescription Easy element scrolling using jQuery.
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
+ * Tested with jQuery 1.2.1. On FF 2.0.0.11, IE 6, Opera 9.22 and Safari 3 beta. on Windows.
+ *
+ * @author Ariel Flesler
+ * @version 1.3.3
+ *
+ * @id jQuery.scrollTo
+ * @id jQuery.fn.scrollTo
+ * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
+ * The different options for target are:
+ * - A number position (will be applied to all axes).
+ * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
+ * - A jQuery/DOM element ( logically, child of the element to scroll )
+ * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
+ * - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
+ * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
+ * @param {Object} settings Hash of settings, optional.
+ * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
+ * @option {Number} duration The OVERALL length of the animation.
+ * @option {String} easing The easing method for the animation.
+ * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
+ * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
+ * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
+ * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
+ * @option {Function} onAfter Function to be called after the scrolling ends.
+ * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
+ * @return {jQuery} Returns the same jQuery object, for chaining.
+ *
+ * @example $('div').scrollTo( 340 );
+ *
+ * @example $('div').scrollTo( '+=340px', { axis:'y' } );
+ *
+ * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
+ *
+ * @example var second_child = document.getElementById('container').firstChild.nextSibling;
+ * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
+ * alert('scrolled!!');
+ * }});
+ *
+ * @example $('div').scrollTo( { top: 300, left:'+=200' }, { offset:-20 } );
+ *
+ * Notes:
+ * - jQuery.scrollTo will make the whole window scroll, it accepts the same arguments as jQuery.fn.scrollTo.
+ * - If you are interested in animated anchor navigation, check http://jquery.com/plugins/project/LocalScroll.
+ * - The options margin, offset and over are ignored, if the target is not a jQuery object or a DOM element.
+ * - The option 'queue' won't be taken into account, if only 1 axis is given.
+ */
+;(function( $ ){
+
+ var $scrollTo = $.scrollTo = function( target, duration, settings ){
+ $scrollTo.window().scrollTo( target, duration, settings );
+ };
+
+ $scrollTo.defaults = {
+ axis:'y',
+ duration:1
+ };
+
+ //returns the element that needs to be animated to scroll the window
+ $scrollTo.window = function(){
+ return $( $.browser.safari ? 'body' : 'html' );
+ };
+
+ $.fn.scrollTo = function( target, duration, settings ){
+ if( typeof duration == 'object' ){
+ settings = duration;
+ duration = 0;
+ }
+ settings = $.extend( {}, $scrollTo.defaults, settings );
+ duration = duration || settings.speed || settings.duration;//speed is still recognized for backwards compatibility
+ settings.queue = settings.queue && settings.axis.length > 1;//make sure the settings are given right
+ if( settings.queue )
+ duration /= 2;//let's keep the overall speed, the same.
+ settings.offset = both( settings.offset );
+ settings.over = both( settings.over );
+
+ return this.each(function(){
+ var elem = this, $elem = $(elem),
+ t = target, toff, attr = {},
+ win = $elem.is('html,body');
+ switch( typeof t ){
+ case 'number'://will pass the regex
+ case 'string':
+ if( /^([+-]=)?\d+(px)?$/.test(t) ){
+ t = both( t );
+ break;//we are done
+ }
+ t = $(t,this);// relative selector, no break!
+ case 'object':
+ if( t.is || t.style )//DOM/jQuery
+ toff = (t = $(t)).offset();//get the real position of the target
+ }
+ $.each( settings.axis.split(''), function( i, axis ){
+ var Pos = axis == 'x' ? 'Left' : 'Top',
+ pos = Pos.toLowerCase(),
+ key = 'scroll' + Pos,
+ act = elem[key],
+ Dim = axis == 'x' ? 'Width' : 'Height',
+ dim = Dim.toLowerCase();
+
+ if( toff ){//jQuery/DOM
+ attr[key] = toff[pos] + ( win ? 0 : act - $elem.offset()[pos] );
+
+ if( settings.margin ){//if it's a dom element, reduce the margin
+ attr[key] -= parseInt(t.css('margin'+Pos)) || 0;
+ attr[key] -= parseInt(t.css('border'+Pos+'Width')) || 0;
+ }
+
+ attr[key] += settings.offset[pos] || 0;//add/deduct the offset
+
+ if( settings.over[pos] )//scroll to a fraction of its width/height
+ attr[key] += t[dim]() * settings.over[pos];
+ }else
+ attr[key] = t[pos];//remove the unnecesary 'px'
+
+ if( /^\d+$/.test(attr[key]) )//number or 'number'
+ attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) );//check the limits
+
+ if( !i && settings.queue ){//queueing each axis is required
+ if( act != attr[key] )//don't waste time animating, if there's no need.
+ animate( settings.onAfterFirst );//intermediate animation
+ delete attr[key];//don't animate this axis again in the next iteration.
+ }
+ });
+ animate( settings.onAfter );
+
+ function animate( callback ){
+ $elem.animate( attr, duration, settings.easing, callback && function(){
+ callback.call(this, target);
+ });
+ };
+ function max( Dim ){
+ var el = win ? $.browser.opera ? document.body : document.documentElement : elem;
+ return el['scroll'+Dim] - el['client'+Dim];
+ };
+ });
+ };
+
+ function both( val ){
+ return typeof val == 'object' ? val : { top:val, left:val };
+ };
+
+})( jQuery ); \ No newline at end of file
diff --git a/chef-server-webui/app/assets/javascripts/jquery.suggest.js b/chef-server-webui/app/assets/javascripts/jquery.suggest.js
new file mode 100644
index 0000000000..b5ff63460b
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.suggest.js
@@ -0,0 +1,250 @@
+
+/*
+ * jquery.suggest 1.1 - 2007-08-06
+ *
+ * Uses code and techniques from following libraries:
+ * 1. http://www.dyve.net/jquery/?autocomplete
+ * 2. http://dev.jquery.com/browser/trunk/plugins/interface/iautocompleter.js
+ *
+ * All the new stuff written by Peter Vulgaris (www.vulgarisoip.com)
+ * Feel free to do whatever you want with this file
+ *
+ */
+
+(function($) {
+
+ $.suggest = function(input, options) {
+ var $input = $(input).attr("autocomplete", "off");
+ var $results = $(document.createElement("ul"));
+
+ var timeout = false; // hold timeout ID for suggestion results to appear
+ var prevLength = 0; // last recorded length of $input.val()
+ var cache = []; // cache MRU list
+ var cacheSize = 0; // size of cache in chars (bytes?)
+
+ $results.addClass(options.resultsClass).appendTo('body');
+
+ resetPosition();
+ $(window)
+ .load(resetPosition) // just in case user is changing size of page while loading
+ .resize(resetPosition);
+
+ //Show suggestion drop down list when on focus.
+ $input.focus(function() {
+ suggest();
+ });
+
+ $input.blur(function() {
+ setTimeout(function() { $results.hide() }, 200);
+ });
+
+ // help IE users if possible
+ try {
+ $results.bgiframe();
+ } catch(e) { }
+
+ // I really hate browser detection, but I don't see any other way
+ if ($.browser.mozilla)
+ $input.keypress(processKey); // onkeypress repeats arrow keys in Mozilla/Opera
+ else
+ $input.keydown(processKey); // onkeydown repeats arrow keys in IE/Safari
+
+ function resetPosition() {
+ // requires jquery.dimension plugin
+ var offset = $input.offset();
+ $results.css({
+ top: (offset.top + input.offsetHeight) + 'px',
+ left: offset.left + 'px'
+ });
+ }
+
+ function processKey(e) {
+ // handling up/down/escape requires results to be visible
+ // handling enter/tab requires that AND a result to be selected
+ if ((/27$|38$|40$/.test(e.keyCode) && $results.is(':visible')) ||
+ (/^13$|^9$/.test(e.keyCode) && getCurrentResult())) {
+
+ if (e.preventDefault)
+ e.preventDefault();
+ if (e.stopPropagation)
+ e.stopPropagation();
+
+ e.cancelBubble = true;
+ e.returnValue = false;
+
+ switch(e.keyCode) {
+ case 38: // up
+ prevResult();
+ break;
+ case 40: // down
+ nextResult();
+ break;
+ case 9: // tab
+ case 13: // return
+ selectCurrentResult();
+ break;
+ case 27: // escape
+ $results.hide();
+ break;
+ }
+ } else {
+ if (timeout)
+ clearTimeout(timeout);
+ timeout = setTimeout(suggest, options.delay);
+ prevLength = $input.val().length;
+ }
+ }
+
+ function suggest() {
+ var q = $.trim($input.val()).replace(/\s/g, '');
+ if (q.length >= options.minchars) {
+ var filter = new RegExp(q);
+ var filtered_list = [];
+ if (q != '0.0.0'){
+ for (item in options.list) {
+ var item_string = options.list[item];
+ if (filter.test(item_string.replace(/\s/g,''))){
+ filtered_list.push(item_string);
+ }
+ }
+ } else {
+ filtered_list = options.list;
+ }
+ displayItems(filtered_list);
+ } else {
+ $results.hide();
+ }
+ }
+
+ function checkCache(q) {
+ for (var i = 0; i < cache.length; i++)
+ if (cache[i]['q'] == q) {
+ cache.unshift(cache.splice(i, 1)[0]);
+ return cache[0];
+ }
+ return false;
+ }
+
+ function addToCache(q, items, size) {
+ while (cache.length && (cacheSize + size > options.maxCacheSize)) {
+ var cached = cache.pop();
+ cacheSize -= cached['size'];
+ }
+ cache.push({
+ q: q,
+ size: size,
+ items: items
+ });
+ cacheSize += size;
+ }
+
+ function displayItems(items) {
+ if (!items)
+ return;
+
+ if (!items.length) {
+ $results.hide();
+ return;
+ }
+
+ var html = '';
+ for (var i = 0; i < items.length; i++)
+ html += '<li>' + items[i] + '</li>';
+ $results.html(html).show();
+
+ $results
+ .children('li')
+ .mouseover(function() {
+ $results.children('li').removeClass(options.selectClass);
+ $(this).addClass(options.selectClass);
+ })
+ .click(function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ selectCurrentResult();
+ });
+ }
+
+ function parseTxt(txt, q) {
+ var items = [];
+ var tokens = txt.split(options.delimiter);
+
+ // parse returned data for non-empty items
+ for (var i = 0; i < tokens.length; i++) {
+ var token = $.trim(tokens[i]);
+ if (token) {
+ token = token.replace(
+ new RegExp(q, 'ig'),
+ function(q) { return '<span class="' + options.matchClass + '">' + q + '</span>' }
+ );
+ items[items.length] = token;
+ }
+ }
+ return items;
+ }
+
+ function getCurrentResult() {
+ if (!$results.is(':visible'))
+ return false;
+ var $currentResult = $results.children('li.' + options.selectClass);
+ if (!$currentResult.length)
+ $currentResult = false;
+ return $currentResult;
+ }
+
+ function selectCurrentResult() {
+ $currentResult = getCurrentResult();
+ if ($currentResult) {
+ $input.val($currentResult.text());
+ $results.hide();
+ if (options.onSelect)
+ options.onSelect.apply($input[0]);
+ }
+ }
+
+ function nextResult() {
+ $currentResult = getCurrentResult();
+ if ($currentResult)
+ $currentResult
+ .removeClass(options.selectClass)
+ .next()
+ .addClass(options.selectClass);
+ else
+ $results.children('li:first-child').addClass(options.selectClass);
+ }
+
+ function prevResult() {
+ $currentResult = getCurrentResult();
+ if ($currentResult)
+ $currentResult
+ .removeClass(options.selectClass)
+ .prev()
+ .addClass(options.selectClass);
+ else
+ $results.children('li:last-child').addClass(options.selectClass);
+ }
+ }
+
+ $.fn.suggest = function(list, options) {
+ //if (!source)
+ // return;
+ options = options || {};
+ //options.source = source;
+ options.delay = options.delay || 100;
+ options.resultsClass = options.resultsClass || 'ac_results';
+ options.selectClass = options.selectClass || 'ac_over';
+ options.matchClass = options.matchClass || 'ac_match';
+ options.minchars = options.minchars || 0;
+ options.delimiter = options.delimiter || '\n';
+ options.onSelect = options.onSelect || false;
+ options.maxCacheSize = options.maxCacheSize || 65536;
+ options.list = list;
+
+ this.each(function() {
+ new $.suggest(this, options);
+ });
+
+ return this;
+ };
+
+})(jQuery);
diff --git a/chef-server-webui/app/assets/javascripts/jquery.tools.min.js b/chef-server-webui/app/assets/javascripts/jquery.tools.min.js
new file mode 100644
index 0000000000..4133a43498
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.tools.min.js
@@ -0,0 +1,17 @@
+/*
+ * jquery.tools 1.0.0 - The missing UI library
+ *
+ * [tools.tooltip-1.0.0, tools.expose-1.0.2]
+ *
+ * Copyright (c) 2009 Tero Piirainen
+ * http://flowplayer.org/tools/
+ *
+ * Dual licensed under MIT and GPL 2+ licenses
+ * http://www.opensource.org/licenses
+ *
+ * -----
+ *
+ * Build: Wed Jun 03 19:51:51 GMT+00:00 2009
+ */
+(function(c){c.tools=c.tools||{version:{}};c.tools.version.tooltip="1.0.0";var b={toggle:[function(){this.getTip().show()},function(){this.getTip().hide()}]};c.tools.addTipEffect=function(d,f,e){b[d]=[f,e]};c.tools.addTipEffect("slideup",function(){var d=this.getConf();var e=d.slideOffset||10;this.getTip().css({opacity:0}).animate({top:"-="+e,opacity:d.opacity},d.slideInSpeed||200).show()},function(){var d=this.getConf();var e=d.slideOffset||10;this.getTip().animate({top:"-="+e,opacity:0},d.slideOutSpeed||200,function(){c(this).hide().animate({top:"+="+(e*2)},0)})});function a(g,e){var d=this;function i(j,k){c(d).bind(j,function(m,l){if(k&&k.call(this)===false&&l){l.proceed=false}});return d}c.each(e,function(j,k){if(c.isFunction(k)){i(j,k)}});var f=e.triggers?c(e.triggers):g.prev(e.trigger);if(!f.length){throw"cannot find trigges for tip: "+g.selector}f.bind(f.is("input")?"focus":"mouseover",function(j){d.show(j);g.hover(function(){d.show()},function(){d.hide()})});f.bind(f.is("input")?"blur":"mouseout",function(){d.hide()});g.css("opacity",e.opacity);var h=0;c.extend(d,{show:function(o){if(o){f=c(o.target)}clearTimeout(h);if(g.is(":animated")||g.is(":visible")){return d}var n={proceed:true};c(d).trigger("onBeforeShow",n);if(!n.proceed){return d}var m=f.position().top-g.outerHeight();var j=g.outerHeight()+f.outerHeight();var q=e.position[0];if(q=="center"){m+=j/2}if(q=="bottom"){m+=j}var k=f.outerWidth()+g.outerWidth();var l=f.position().left+f.outerWidth();q=e.position[1];if(q=="center"){l-=k/2}if(q=="left"){l-=k}m+=e.offset[0];l+=e.offset[1];g.css({position:"absolute",top:m,left:l});b[e.effect][0].call(d);c(d).trigger("onShow");return d},hide:function(){clearTimeout(h);h=setTimeout(function(){if(g.is(":animated")||!g.is(":visible")){return d}var j={proceed:true};c(d).trigger("onBeforeHide",j);if(!j.proceed){return d}b[e.effect][1].call(d);c(d).trigger("onHide")},e.delay||1);return d},isShown:function(){return g.is(":visible, :animated")},getConf:function(){return e},getTip:function(){return g},getTrigger:function(){return f},onBeforeShow:function(j){return i("onBeforeShow",j)},onShow:function(j){return i("onShow",j)},onBeforeHide:function(j){return i("onBeforeHide",j)},onHide:function(j){return i("onHide",j)}})}c.prototype.tooltip=function(d){var e=this.eq(typeof d=="number"?d:0).data("tooltip");if(e){return e}var f={trigger:null,triggers:null,effect:"slideup",delay:30,opacity:1,position:["top","center"],offset:[0,0],api:false};if(c.isFunction(d)){d={onBeforeShow:d}}c.extend(f,d);this.each(function(){e=new a(c(this),f);c(this).data("tooltip",e)});return f.api?e:this}})(jQuery);
+(function(b){b.tools=b.tools||{version:{}};b.tools.version.expose="1.0.2";function a(){var e=b(window).width();if(b.browser.mozilla){return e}var d;if(window.innerHeight&&window.scrollMaxY){d=window.innerWidth+window.scrollMaxX}else{if(document.body.scrollHeight>document.body.offsetHeight){d=document.body.scrollWidth}else{d=document.body.offsetWidth}}return d<e?d+20:e}function c(g,h){var e=this,d=null,f=false,i=0;function j(k,l){b(e).bind(k,function(n,m){if(l&&l.call(this)===false&&m){m.proceed=false}});return e}b.each(h,function(k,l){if(b.isFunction(l)){j(k,l)}});b(window).bind("resize.expose",function(){if(d){d.css({width:a(),height:b(document).height()})}});b.extend(this,{getMask:function(){return d},getExposed:function(){return g},getConf:function(){return h},isLoaded:function(){return f},load:function(){if(f){return e}i=g.eq(0).css("zIndex");if(h.maskId){d=b("#"+h.maskId)}if(!d||!d.length){d=b("<div/>").css({position:"absolute",top:0,left:0,width:a(),height:b(document).height(),display:"none",opacity:0,zIndex:h.zIndex});if(h.maskId){d.attr("id",h.maskId)}b("body").append(d);var k=d.css("backgroundColor");if(!k||k=="transparent"||k=="rgba(0, 0, 0, 0)"){d.css("backgroundColor",h.color)}if(h.closeOnEsc){b(document).bind("keydown.unexpose",function(n){if(n.keyCode==27){e.close()}})}if(h.closeOnClick){d.bind("click.unexpose",function(){e.close()})}}var m={proceed:true};b(e).trigger("onBeforeLoad",m);if(!m.proceed){return e}b.each(g,function(){var n=b(this);if(!/relative|absolute/i.test(n.css("position"))){n.css("position","relative")}});g.css({zIndex:h.zIndex+1});var l=d.height();if(!this.isLoaded()){d.css({opacity:0,display:"block"}).fadeTo(h.loadSpeed,h.opacity,function(){if(d.height()!=l){d.css("height",l)}b(e).trigger("onLoad")})}f=true;return e},close:function(){if(!f){return e}var k={proceed:true};b(e).trigger("onBeforeClose",k);if(k.proceed===false){return e}d.fadeOut(h.closeSpeed,function(){b(e).trigger("onClose");g.css({zIndex:b.browser.msie?i:null})});f=false;return e},onBeforeLoad:function(k){return j("onBeforeLoad",k)},onLoad:function(k){return j("onLoad",k)},onBeforeClose:function(k){return j("onBeforeClose",k)},onClose:function(k){return j("onClose",k)}})}b.fn.expose=function(d){var e=this.eq(typeof d=="number"?d:0).data("expose");if(e){return e}var f={maskId:null,loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,color:"#456",api:false};if(typeof d=="string"){d={color:d}}b.extend(f,d);this.each(function(){e=new c(b(this),f);b(this).data("expose",e)});return f.api?e:this}})(jQuery);
diff --git a/chef-server-webui/app/assets/javascripts/jquery.treeTable.min.js b/chef-server-webui/app/assets/javascripts/jquery.treeTable.min.js
new file mode 100644
index 0000000000..be94663a80
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jquery.treeTable.min.js
@@ -0,0 +1,165 @@
+/* jQuery treeTable Plugin 2.2.1 - http://ludo.cubicphuse.nl/jquery-plugins/treeTable/ */
+(function($) {
+ // Helps to make options available to all functions
+ // TODO: This gives problems when there are both expandable and non-expandable
+ // trees on a page. The options shouldn't be global to all these instances!
+ var options;
+
+ $.fn.treeTable = function(opts) {
+ options = $.extend({}, $.fn.treeTable.defaults, opts);
+
+ return this.each(function() {
+ $(this).addClass("treeTable").find("tbody tr").each(function() {
+ // Initialize root nodes only whenever possible
+ if(!options.expandable || $(this)[0].className.search("child-of-") == -1) {
+ initialize($(this));
+ }
+ });
+ });
+ };
+
+ $.fn.treeTable.defaults = {
+ childPrefix: "child-of-",
+ expandable: true,
+ indent: 19,
+ initialState: "collapsed",
+ treeColumn: 0
+ };
+
+ // Recursively hide all node's children in a tree
+ $.fn.collapse = function() {
+ $(this).addClass("collapsed");
+
+ childrenOf($(this)).each(function() {
+ initialize($(this));
+
+ if(!$(this).hasClass("collapsed")) {
+ $(this).collapse();
+ }
+
+ $(this).hide();
+ });
+
+ return this;
+ };
+
+ // Recursively show all node's children in a tree
+ $.fn.expand = function() {
+ $(this).removeClass("collapsed").addClass("expanded");
+
+ childrenOf($(this)).each(function() {
+ initialize($(this));
+
+ if($(this).is(".expanded.parent")) {
+ $(this).expand();
+ }
+
+ $(this).show();
+ });
+
+ return this;
+ };
+
+ // Add an entire branch to +destination+
+ $.fn.appendBranchTo = function(destination) {
+ var node = $(this);
+ var parent = parentOf(node);
+
+ var ancestorNames = $.map(ancestorsOf($(destination)), function(a) { return a.id; });
+
+ // Conditions:
+ // 1: +node+ should not be inserted in a location in a branch if this would
+ // result in +node+ being an ancestor of itself.
+ // 2: +node+ should not have a parent OR the destination should not be the
+ // same as +node+'s current parent (this last condition prevents +node+
+ // from being moved to the same location where it already is).
+ // 3: +node+ should not be inserted as a child of +node+ itself.
+ if($.inArray(node[0].id, ancestorNames) == -1 && (!parent || (destination.id != parent[0].id)) && destination.id != node[0].id) {
+ indent(node, ancestorsOf(node).length * options.indent * -1); // Remove indentation
+
+ if(parent) { node.removeClass(options.childPrefix + parent[0].id); }
+
+ node.addClass(options.childPrefix + destination.id);
+ move(node, destination); // Recursively move nodes to new location
+ indent(node, ancestorsOf(node).length * options.indent);
+ }
+
+ return this;
+ };
+
+ // Add reverse() function from JS Arrays
+ $.fn.reverse = function() {
+ return this.pushStack(this.get().reverse(), arguments);
+ };
+
+ // Toggle an entire branch
+ $.fn.toggleBranch = function() {
+ if($(this).hasClass("collapsed")) {
+ $(this).expand();
+ } else {
+ $(this).removeClass("expanded").collapse();
+ }
+
+ return this;
+ };
+
+ // === Private functions
+
+ function ancestorsOf(node) {
+ var ancestors = [];
+ while(node = parentOf(node)) {
+ ancestors[ancestors.length] = node[0];
+ }
+ return ancestors;
+ };
+
+ function childrenOf(node) {
+ return $("table.treeTable tbody tr." + options.childPrefix + node[0].id);
+ };
+
+ function indent(node, value) {
+ var cell = $(node.children("td")[options.treeColumn]);
+ var padding = parseInt(cell.css("padding-left"), 10) + value;
+
+ cell.css("padding-left", + padding + "px");
+
+ childrenOf(node).each(function() {
+ indent($(this), value);
+ });
+ };
+
+ function initialize(node) {
+ if(!node.hasClass("initialized")) {
+ node.addClass("initialized");
+
+ var childNodes = childrenOf(node);
+
+ if(node.hasClass("parent")) {
+ var cell = $(node.children("td")[options.treeColumn]);
+ var padding = parseInt(cell.css("padding-left"), 10) + options.indent;
+
+ childNodes.each(function() {
+ $($(this).children("td")[options.treeColumn]).css("padding-left", padding + "px");
+ });
+
+ $(cell[0].firstChild).css({ "margin-left": '-' + options.indent + 'px', "padding-left": options.indent + 'px' });
+ }
+ }
+ };
+
+ function move(node, destination) {
+ node.insertAfter(destination);
+ childrenOf(node).reverse().each(function() { move($(this), node[0]); });
+ };
+
+ function parentOf(node) {
+ var classNames = node[0].className.split(' ');
+
+ for(key in classNames) {
+ if(classNames[key].match("child-of-")) {
+ return $("#" + classNames[key].substring(9));
+ }
+ }
+ };
+})(jQuery);
+
diff --git a/chef-server-webui/app/assets/javascripts/json.js b/chef-server-webui/app/assets/javascripts/json.js
new file mode 100644
index 0000000000..b1cb616acc
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/json.js
@@ -0,0 +1,153 @@
+/*
+ Do NOT use this version as it was slightly modified to accomodate editing and returning of functions!
+ use this version instead: http://www.JSON.org/json2.js
+*/
+
+if (!this.JSON) {
+ JSON = function () {
+ function f(n) {return n < 10 ? '0' + n : n;}
+ Date.prototype.toJSON = function () {
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+ var meta = {
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ escapeable = /["\\\x00-\x1f\x7f-\x9f]/g;
+
+ function quote(string) {
+ return escapeable.test(string) ?
+ '"' + string.replace(escapeable, function (a) {
+ var c = meta[a];
+ if (typeof c === 'string') {
+ return c;
+ }
+ c = a.charCodeAt();
+ return '\\u00' + Math.floor(c / 16).toString(16) +
+ (c % 16).toString(16);
+ }) + '"' :
+ '"' + string + '"';
+ }
+
+ function stringify(key, holder, replacer) {
+ var i,
+ k,
+ v,
+ length,
+ partial,
+ value = holder[key];
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+ if (typeof replacer === 'function') {
+ value = replacer.call(holder, key, value);
+ }
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ /* added for the BC Json Editor to enable editing of functions */
+ case 'function':
+ return value;
+
+ case 'number':
+ return isFinite(value) ? String(value) : 'null';
+ case 'boolean':
+ case 'null':
+ return String(value);
+ case 'object':
+ if (!value) {
+ return 'null';
+ }
+ partial = [];
+ if (typeof value.length === 'number' &&
+ !(value.propertyIsEnumerable('length'))) {
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = stringify(i, value, replacer) || 'null';
+ }
+ return '[' + partial.join(',') + ']';
+ }
+ if (typeof replacer === 'object') {
+ length = replacer.length;
+ for (i = 0; i < length; i += 1) {
+ k = replacer[i];
+ if (typeof k === 'string') {
+ v = stringify(k, value, replacer);
+ if (v) {
+ partial.push(quote(k) + ':' + v);
+ }
+ }
+ }
+ } else {
+ for (k in value) {
+ v = stringify(k, value, replacer);
+ if (v) {
+ partial.push(quote(k) + ':' + v);
+ }
+ }
+ }
+ return '{' + partial.join(',') + '}';
+ }
+ }
+ return {
+ stringify: function (value, replacer) {
+ if (typeof replacer !== 'function') {
+ if (!replacer) {
+ replacer = function (key, value) {
+ if (!Object.hasOwnProperty.call(this, key)) {
+ return undefined;
+ }
+ return value;
+ };
+ } else if (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number') {
+ throw new Error('JSON.stringify');
+ }
+ }
+ return stringify('', {'': value}, replacer);
+ },
+
+ parse: function (text, reviver) {
+ var j;
+ function walk(holder, key) {
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+ if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+ j = eval('(' + text + ')');
+ return typeof reviver === 'function' ?
+ walk({'': j}, '') : j;
+ }
+ throw new SyntaxError('JSON.parse');
+ },
+ info:{"version":"","www":"http://www.json.org/","date":"2008-03-22","description":"Open source code of a JSON parser and JSON stringifier. [Douglas Crockford]"},
+ quote: quote
+ };
+ }();
+}
diff --git a/chef-server-webui/app/assets/javascripts/jsonedit_main.js b/chef-server-webui/app/assets/javascripts/jsonedit_main.js
new file mode 100644
index 0000000000..70e00e9cb7
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/jsonedit_main.js
@@ -0,0 +1,701 @@
+/*
+ "version": "1.1.1", "www": "http://braincast.nl", "date": "jul 2010", "description": "Braincast Json Tree object." },
+*/
+var BCJT = function() {
+ return {
+ info: { "version": "1.1.1", "www": "http://braincast.nl", "date": "jul 2010", "description": "Braincast Json Tree object." },
+ util: function() {
+ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }; } }
+ function addEvent(obj, type, fn) { if (obj.attachEvent) { obj['e' + type + fn] = fn; obj[type + fn] = function() { obj['e' + type + fn](window.event); }; obj.attachEvent('on' + type, obj[type + fn]); } else { obj.addEventListener(type, fn, false); } }
+ function getElementById(strid) { return document.getElementById(strid); }
+ return { addLoadEvent: addLoadEvent, addEvent: addEvent, $$: getElementById };
+ } (),
+ tree: function() {
+ var treeIndex = 0;
+ var li = 0;
+ function TreeUtil() {
+ var oldA;
+ function makeUrl(jsonpath, text, li, index, clickable) { return (clickable) ? "<a id=\"a" + li + "\" onclick=\"BCJT.tree.forest[" + index + "].getNodeValue('" + escape(jsonpath) + "', this);return false\">" + text + "</a>" : text; }
+ function isTypeOf(thing) { return (thing !== null) ? thing.constructor : thing; }
+ function strIsTypeOf(con) { switch (con) { case Array: return 'array'; case Object: return 'object'; case Function: return 'function'; case String: return 'string'; case Number: return 'number'; case Boolean: return 'boolean'; case null: return 'null'; default: return 'undeterimable type'; } }
+ function getParentLi(item) {
+ /* not used */
+ return (item.nodeName == "LI") ? item.id : getParentLi(item.parentNode);
+ }
+ return {
+ strIsTypeOf: strIsTypeOf,
+ isTypeOf: isTypeOf,
+ getNodeValue: function(jsonPath, aobj) {
+ if (aobj) {
+ if (isTypeOf(aobj) == String) {
+ aobj = document.getElementById(aobj);
+ }
+ if (oldA) { oldA.className = "au"; } aobj.className = "as"; oldA = aobj;
+ }
+ this.cp = "BCJT.tree.forest[" + this.index + "]." + unescape(jsonPath);
+ this.ca = aobj;
+ this.cli = document.getElementById("li" + aobj.id.substr(1));
+ var params = { "jsonPath": "", "jsonValue": "", "jsonType": null, "a": {}, li: {} };
+ try {
+ var jsval = eval("BCJT.tree.forest[" + this.index + "]." + BCJTEP.escapeslashes(unescape(jsonPath)));
+ var typ = isTypeOf(jsval);
+ var txt;
+ if (typ == Function) {
+ txt = (jsval.toSource) ? jsval.toSource() : txt = jsval;
+ } else if (typ == String) {
+ txt = JSON.stringify(jsval).replace(/(^")|("$)/g, "");
+ } else {
+ txt = JSON.stringify(jsval);
+ }
+ params.jsonPath = jsonPath;
+ params.jsonValue = txt;
+ params.jsonType = strIsTypeOf(typ);
+ params.a = this.ca;
+ params.li = this.cli;
+ $$("autodetect").checked = false;
+ this.nodeclick(params);
+ } catch (e) {
+ BCJT.tree.error = "Could not get value!<br />" + e;
+ $$("log").innerHTML = BCJT.tree.error;
+ $$("console").style.display = "block";
+ }
+ },
+ makeTree: function(content, dots, inside) {
+ var out = ""; var t;
+ if (content === null) {
+ if (!inside) { out += "<ul><li><s>null</s></li></ul>"; }
+ } else if (isTypeOf(content) == Array) {
+ out += "<ul>";
+ for (var i = 0; i < content.length; i++) {
+ dots += "[" + i + "]";
+ t = this.makeTree(content[i], dots, false);
+ dots = dots.substr(0, dots.length - ("" + i).length - 2);
+ li++;
+ out += "<li id=\"li" + li + "\">" + makeUrl(dots + "[" + i + "]", i + " (index)", li, this.index, this.clickable) + " " + t;
+ }
+ out += "</ul>";
+ } else if (isTypeOf(content) == Object) {
+ out += "<ul>";
+ for (var j in content) {
+ dots += "['" + j + "']";
+ t = this.makeTree(content[j], dots, true);
+ dots = dots.substr(0, dots.length - j.length - 4);
+ li++;
+ out += "<li id=\"li" + li + "\">" + makeUrl(dots + "['" + j + "']", j, li, this.index, this.clickable) + " " + t;
+ }
+ out += "</ul>";
+ } else if (isTypeOf(content) == String) {
+ out += "</li>";
+ } else { out += "</li>"; }
+ return out;
+ },
+ reloadTree: function() {
+ li = 0;
+ if (this.clickable) {
+ if (this.rootLink === "") { this.rootLink = "BCJT.tree.forest[" + this.index + "].getNodeValue('json', this);return false"; }
+ this.el.innerHTML = "<ul id=\"tree" + this.index + "\" class=\"mktree\"><li><a id=\"a0\" onclick=\"" + this.rootLink + "\">" + this.rootNode + "</a><ul>" + this.makeTree(this.json, "json", false).substr(4) + "</ul></li></ul>";
+ } else { this.el.innerHTML = "<ul id=\"tree" + this.index + "\" class=\"mktree\"><li>" + this.rootNode + "<ul>" + this.makeTree(this.json, "json", false).substr(4) + "</ul></li></ul>"; }
+ if (this.mktree) { BCJT.mktree.processList(document.getElementById("tree" + this.index)); }
+ }
+ };
+ }
+ function Tree(json, div, params) {
+ if (!params) { params = {}; }
+ var options = { "json": json, "nodeclick": function() { }, "mktree": true, "clickable": true, "index": treeIndex, "el": document.getElementById(div), "cp": null, "ca": null, "cli": null, rootNode: "json", rootLink: "", "newtree": true };
+ for (var key in options) { this[key] = (params[key] !== undefined) ? params[key] : options[key]; }
+ if (this.newtree) {
+ if (this.clickable) {
+ if (this.rootLink === "") { this.rootLink = "BCJT.tree.forest[" + this.index + "].getNodeValue('json', this);return false"; }
+ this.el.innerHTML = "<ul id=\"tree" + treeIndex + "\" class=\"mktree\"><li><a id=\"a0\" onclick=\"" + this.rootLink + "\">" + this.rootNode + "</a><ul>" + this.makeTree(json, "json", false).substr(4) + "</ul></li></ul>";
+ } else { this.el.innerHTML = "<ul id=\"tree" + treeIndex + "\" class=\"mktree\"><li>" + this.rootNode + "<ul>" + this.makeTree(json, "json", false).substr(4) + "</ul></li></ul>"; }
+ BCJT.tree.forest.push(this);
+ treeIndex++;
+ } else {
+ if (this.clickable) {
+ if (this.rootLink === "") { this.rootLink = "BCJT.tree.forest[" + this.index + "].getNodeValue('json', this);return false"; }
+ this.el.innerHTML = "<ul id=\"tree" + this.index + "\" class=\"mktree\"><li><a id=\"a0\" onclick=\"" + this.rootLink + "\">" + this.rootNode + "</a><ul>" + this.makeTree(json, "json", false).substr(4) + "</ul></li></ul>";
+ } else { this.el.innerHTML = "<ul id=\"tree" + this.index + "\" class=\"mktree\"><li>" + this.rootNode + "<ul>" + this.makeTree(json, "json", false).substr(4) + "</ul></li></ul>"; }
+ li = 0;
+ BCJT.tree.forest[this.index] = this;
+ }
+ if (this.mktree) { BCJT.mktree.processList(document.getElementById("tree" + this.index)); }
+ return this;
+ }
+ Tree.prototype = new TreeUtil();
+ return {
+ forest: [],
+ _tree: Tree, /* expose the internal Tree object for prototype purposes */
+ init: function(json, div, params) {
+ try {
+ var j = (json.constructor === Object) ? json : eval('(' +json+ ')');
+ new Tree(j, div, params);
+ return true;
+ } catch (e) {
+ BCJT.tree.error = "Build tree failed!<br />" + e;
+ return false;
+ }
+ },
+ error: ""
+ };
+ } (),
+ mktree: function() {
+ /* All below code was obtained from: http://www.javascripttoolbox.com/lib/mktree/
+ the autor is: Matt Kruse (http://www.mattkruse.com/)
+ (The code below was slightly modified!)
+ */
+ var nodeClosedClass = "liClosed", nodeOpenClass = "liOpen", nodeBulletClass = "liBullet", nodeLinkClass = "bullet";
+
+ /* the two below functions will prevent memory leaks in IE */
+ function treeNodeOnclick() { this.parentNode.className = (this.parentNode.className == nodeOpenClass) ? nodeClosedClass : nodeOpenClass; return false; }
+ function retFalse() { return false; }
+ function processList(ul) {
+ if (!ul.childNodes || ul.childNodes.length === 0) { return; }
+ var childNodesLength = ul.childNodes.length;
+ var folders = [];
+ var items = []
+ for (var itemi = 0; itemi < childNodesLength; itemi++) {
+ var item = ul.childNodes[itemi];
+ if (item.nodeName == "LI") {
+ var subLists = false;
+ var itemChildNodesLength = item.childNodes.length;
+ for (var sitemi = 0; sitemi < itemChildNodesLength; sitemi++) {
+ var sitem = item.childNodes[sitemi];
+ if (sitem.nodeName == "UL") { subLists = true; processList(sitem); }
+ }
+ var s = document.createElement("SPAN");
+ var t = '\u00A0';
+ s.className = nodeLinkClass;
+ if (subLists) {
+ if (item.className === null || item.className === "") { item.className = nodeClosedClass; }
+ if (item.firstChild.nodeName == "#text") { t = t + item.firstChild.nodeValue; item.removeChild(item.firstChild); }
+ s.onclick = treeNodeOnclick;
+ folders.push(item);
+ } else {
+ item.className = nodeBulletClass;
+ s.onclick = retFalse;
+ items.push(item);
+ }
+ s.appendChild(document.createTextNode(t));
+ item.insertBefore(s, item.firstChild);
+ }
+ }
+ // sort
+ var sortNodes = function(a, b)
+ {
+ var ta = jQuery(a).text();
+ var tb = jQuery(b).text();
+ if (ta == tb) return 0;
+ return (ta < tb) ? -1 : 1;
+ };
+ folders.sort(sortNodes);
+ items.sort(sortNodes);
+ for (var i = 0; i < items.length; i++)
+ {
+ folders.push(items[i]);
+ }
+ items = null;
+ for (var i = 0; i < folders.length; i++)
+ {
+ ul.appendChild(folders[i]);
+ }
+ }
+ // Performs 3 functions:
+ // a) Expand all nodes
+ // b) Collapse all nodes
+ // c) Expand all nodes to reach a certain ID
+ function expandCollapseList(ul, nodeOpenClass, itemId) {
+ if (!ul.childNodes || ul.childNodes.length === 0) { return false; }
+ for (var itemi = 0; itemi < ul.childNodes.length; itemi++) {
+ var item = ul.childNodes[itemi];
+ if (itemId !== null && item.id == itemId) { return itemId; }
+ if (item.nodeName == "LI") {
+ var subLists = false;
+ for (var sitemi = 0; sitemi < item.childNodes.length; sitemi++) {
+ var sitem = item.childNodes[sitemi];
+ if (sitem.nodeName == "UL") {
+ subLists = true;
+ var ret = expandCollapseList(sitem, nodeOpenClass, itemId);
+ if (itemId !== null && ret) { item.className = nodeOpenClass; return itemId; }
+ }
+ }
+ if (subLists && itemId === null) { item.className = nodeOpenClass; }
+ }
+ }
+ }
+ // Full expands a tree with a given ID
+ function expandTree(treeId) {
+ var ul = document.getElementById(treeId);
+ if (ul === null) { return false; }
+ expandCollapseList(ul, nodeOpenClass);
+ }
+
+ // Fully collapses a tree with a given ID
+ function collapseTree(treeId) {
+ var ul = document.getElementById(treeId);
+ if (ul === null) { return false; }
+ expandCollapseList(ul, nodeClosedClass);
+ }
+
+ // Expands enough nodes to expose an LI with a given ID
+ function expandToItem(treeId, itemId) {
+ var ul = document.getElementById(treeId);
+ if (ul === null) { return false; }
+ var ret = expandCollapseList(ul, nodeOpenClass, itemId);
+ if (ret) {
+ var o = document.getElementById(itemId);
+ if (o.scrollIntoView) {
+ o.scrollIntoView(false);
+ }
+ }
+ }
+ return {
+ processList: processList,
+ expandCollapseList: expandCollapseList,
+ expandTree: expandTree,
+ collapseTree: collapseTree,
+ expandToItem: expandToItem
+ };
+ } ()
+ };
+} ();
+if ( typeof $$ == "undefined" ) var $$ = BCJT.util.$$;
+var addE = BCJT.util.addEvent;
+
+var BCJTE = function(){
+ if (!BCJT){
+ throw new Error("BCJTE needs the BCJT object!");
+ }
+ var tp = BCJT.tree._tree;
+ tp.prototype.deleteNode = function(){
+ if (this.cp !== null){
+ var del = this.cp.substring(this.cp.lastIndexOf("[")+2,this.cp.lastIndexOf("]")-1);
+ var pp = this.cp.substring(0, this.cp.lastIndexOf("["));
+ var parent = eval(BCJTEP.escapeslashes(pp));
+ var no = {};
+ for(var i in parent){if (i !== del){no[i] = parent[i];}}
+ eval(pp +"="+ JSON.stringify(no));
+ var pn = this.cli.parentNode.parentNode.id;
+ this.cli.parentNode.removeChild(this.cli);
+ this.reloadTree();
+
+ //clear boxes
+ if (this.mktree){
+ this.ca = null;
+ this.cp = null;
+ this.cli = null;
+
+ //clear boxes
+ $$("jsonname").value = "";
+ $$("jsonvalue").value = "";
+ $$("jsonpath").innerHTML = "";
+ $$("jsontypes").selectedIndex= 0;
+ $$("jsonnameinput").style.display = "none";
+ $$("addbutton").style.display = "none";
+ $$("savebutton").style.display = "inline";
+ $$("savedstatus").style.display = "none";
+ $$("deletedstatus").style.display = "block";
+ }
+
+ /* expanding fails because the tree is being reindexed during reload... the old id probably doens't exist anymore */
+ BCJT.mktree.expandToItem("tree"+this.index, pn);
+ //alert(this.index +"\n"+ pn);
+
+ }
+ };
+ tp.prototype.addNode = function(nn, nv, t){
+ if (this.cp !== null){
+ var obj = eval(BCJTEP.escapeslashes(this.cp));
+ var objJSON = JSON.stringify(obj);
+ var objType = this.strIsTypeOf(this.isTypeOf(obj));
+ var cid = this.cli ? this.cli.id : null;
+ var nObj = null;
+ try {
+ $$("jsonmode").innerHTML = "Mode: " + ($$("autodetect").checked ? "Automatic" : "Standard");
+ $$("jsonname").readonly=null;
+
+ //what type are we creating?
+ if (t === undefined){ t = this.strIsTypeOf(this.isTypeOf(nv));}
+ switch(t){
+ case 'string': nObj = nv; break;
+ case 'object': case 'boolean': case 'function': case 'number': nObj = JSON.parse(nv); break;
+ case 'array': nObj = JSON.parse(""+Array(nv)); break;
+ default: nObj = null; break;
+ }
+ //what is the current type?
+ switch (objType) {
+ case 'object':
+ obj[nn] = nObj;
+ break;
+ case 'array':
+ obj.push(nObj);
+ break;
+ default: throw "Unable to add a child to type: " + objType;
+ }
+ } catch (e) {
+ $$("log").innerHTML = e;
+ $$("console").style.display = "block";
+ }
+ this.reloadTree();
+ if (this.mktree){
+ var liid = BCJT.mktree.expandCollapseList(document.getElementById("tree"+this.index), this.cli.id);
+ this.ca = null;
+ this.cp = null;
+ this.cli = null;
+
+ //clear boxes
+ $$("jsonname").value = "";
+ $$("jsonvalue").value = "";
+ $$("jsontypes").selectedIndex= 0;
+ $$("jsonpath").innerHTML = "";
+ $$("jsonmode").innerHTML = "";
+ $$("jsonnameinput").style.display = "none";
+ $$("addbutton").style.display = "none";
+ $$("savebutton").style.display = "inline";
+ $$("savedstatus").style.display = "block";
+ $$("deletedstatus").style.display = "none";
+ }
+
+ /* expanding fails because the tree is being reindexed during reload... the old id probably doens't exist anymore */
+ BCJT.mktree.expandToItem("tree"+this.index, cid);
+
+ }
+ };
+ tp.prototype.save = function(nv,t){
+ if (this.cp !== null){
+ var obj = eval(BCJTEP.escapeslashes(this.cp));
+ var pp = this.cp.substring(0, this.cp.lastIndexOf("["));
+ var parent = eval(BCJTEP.escapeslashes(pp));
+ var pt = this.strIsTypeOf(this.isTypeOf(parent));
+ var nn = "";
+ if (pt == 'array') {
+ nn = this.cp.substring(this.cp.lastIndexOf("[")+1,this.cp.lastIndexOf("]"));
+
+ } else {
+ nn = this.cp.substring(this.cp.lastIndexOf("[")+2,this.cp.lastIndexOf("]")-1);
+ }
+ var nObj = null;
+ if (t === undefined){ t = this.strIsTypeOf(this.isTypeOf(nv));}
+ try{
+ switch(t){
+ case 'string':
+ nObj = nv;
+ break;
+ case 'object': case 'boolean': case 'function': case 'number':
+ nObj = JSON.parse(nv);
+ break;
+ case 'array':
+ nObj = JSON.parse(nv);
+ break;
+ case 'null':
+ nObj = null;
+ break;
+ default: return t;
+ }
+ parent[nn] = nObj;
+
+ if (t == "object" || t == "array"){
+ if (window.confirm("New value's have been saved.\nDo you want to rebuild the tree?")){
+ this.reloadTree();
+ if (this.mktree){
+ var liid = BCJT.mktree.expandCollapseList(document.getElementById("tree"+this.index), this.cli.id);
+ this.ca = null;
+ this.cp = null;
+ this.cli = null;
+ }
+ //clear boxes
+ $$("jsonname").value = "";
+ $$("jsonvalue").value = "";
+ $$("jsontypes").selectedIndex= 0;
+ $$("jsonpath").innerHTML = "";
+ $$("jsonnameinput").style.display = "none";
+ $$("addbutton").style.display = "none";
+ $$("savebutton").style.display = "inline";
+ }
+ }
+ $$("savedstatus").style.display = "block";
+ }catch(e){
+ $$("log").innerHTML = "There's an error in your value!<br />" + e;
+ $$("console").style.display = "block";
+ }
+ }
+ };
+
+ function searchJson(tree, keyword){
+ var results = [];
+ var li = 0;
+ function searchKeyword(input,word){if (input===null){return -1;}return input.toString().search(new RegExp(word,"gi"));}
+ function searchTree(content,index,dots,inside,keyword){
+ if (tree.isTypeOf(content) == Array){
+ for (var i=0; i<content.length; i++){
+ dots+="["+i+"]";
+ searchTree(content[i], i, dots, false,keyword);
+ li++;
+ dots=dots.substr(0, dots.length - (""+i).length-2);
+ }
+ }else if(tree.isTypeOf(content) == Object){
+ for(var i in content){
+ dots+="['"+i+"']";
+ searchTree(content[i], -1, dots,true,keyword);
+ li++;
+ if (searchKeyword(i,keyword) > -1 && tree.isTypeOf(i)!==Object){makeList(dots, i, li, "label");}
+ if (searchKeyword(content[i],keyword) > -1 && tree.isTypeOf(content[i])!==Object){makeList(dots, i, li, "value");}
+ dots=dots.substr(0, dots.length - i.length - 4);
+ }
+ }
+ }
+ function makeList(dots, where, id, val){results.push({"a":"a"+id,"li":"li"+id,"path":escape(dots),"value":where,"where":val});}
+ return function(){
+ li =0;
+ results.length = 0;
+ searchTree(tree.json, -1, "json", false, keyword);
+ return results;
+ }();
+ }
+ tp.prototype.search = function(keyword){
+ return searchJson(this, keyword);
+ };
+ return{
+ addOptions: function(object, oValue, oText){object.options[object.length] = new Option(oText, oValue, false, false);},
+ objectTypes: ['array','object','function','string','number','boolean','null','undeterimable type'],
+ info: {"version": "1.2", "www": "http://braincast.nl", "date": "april 2008", "description": "Editor extension object for the Braincast Json Tree object."}
+ };
+}();
+
+
+var BCJTEP = function(){
+ if (!BCJT && !BCJTE){
+ throw new Error("BCJTEP needs the BCJT object and the BCJTE object!");
+ }
+ function selectType(object, type){
+ var l = object.options.length;
+ for (var i=0;i<l;i++){
+ if (object.options[i].text == type){
+ object.selectedIndex= i;
+ break;
+ }
+ }
+ }
+ function escapeslashes(str){
+ str = str.replace(/\\\\/g, '\\\\\\\\');
+ return str;
+ }
+ function stripslashes(str){
+ str = str.replace(/\\'/g, '\'');
+ str = str.replace(/\\"/g, '"');
+ str = str.replace(/\\\\/g, '\\');
+ //str = str.replace(/\\0/g, '\0');
+ str = str.replace(/\\0/g, '0');
+ return str;
+ }
+ function determineUserType(a){
+ try{var y = eval(a);
+ }catch(e){
+ try{y = eval('('+a+')');
+ }catch(f){return 'string';}
+ }
+ var x = typeof y;
+ if (x == 'object'){
+ try{
+ x = y.constructor;
+ if (x === Array){return 'array';}
+ else if (x === Object){return 'object';}
+ }catch(g){return 'null';}
+ }else if (x == 'undefined'){return 'object';}
+ else{return x;}
+ }
+ return{
+ save: function(jsonPath){
+ if (jsonPath) {
+ var jsval = eval("BCJT.tree.forest[0]." + BCJTEP.escapeslashes(jsonPath));
+ return JSON.stringify(jsval);
+ } else {
+ return JSON.stringify(BCJT.tree.forest[0].json);
+ }
+ },
+ build: function(){
+ var jsonstr = $$("jsonstr").value;
+ if (jsonstr == "") return false;
+ var r = BCJT.tree.init(jsonstr, "div1", {"rootNode": "json", "index": 0,"newtree":false, "nodeclick": function(p){
+ //make sure the add dialogs are not shown
+ $$("jsonname").value = "";
+ $$("jsonvalue").value = "";
+ $$("jsonpath").innerHTML = "";
+ $$("jsonmode").innerHTML = "";
+ $$("jsontypes").selectedIndex= 0;
+ $$("jsonnameinput").style.display = "none";
+ $$("addbutton").style.display = "none";
+ $$("savebutton").style.display = "inline";
+ $$("savedstatus").style.display = "none";
+ $$("deletedstatus").style.display = "none";
+
+ if ("json" == unescape(p.jsonPath)){
+ tabber1.show(3);
+ $$("jsonstr").value = p.jsonValue;
+ }else{
+ if ($$("tab2").style.display != "block"){tabber1.show(2);}
+ /*
+ alert("type: " + p.jsonType + "\n" +
+ "value: " + p.jsonValue + "\n" +
+ "path: " + p.jsonPath + "\n" +
+ "li: " + p.li
+ );*/
+ var jsonmode = "Standard";
+ if (p.jsonType == 'object' || p.jsonType == 'array') {
+ $$("jsonvalue").value = p.jsonValue;
+ jsonmode = "<b>NATIVE JSON</b>";
+ } else {
+ $$("jsonvalue").value = BCJTEP.stripslashes(p.jsonValue);
+ }
+ $$("jsonpath").innerHTML = "Path: " + unescape(p.jsonPath);
+ $$("jsonmode").innerHTML = "Mode: " + jsonmode;
+ selectType($$("jsontypes"),p.jsonType);
+ }
+ }});
+ if (r){return r;
+ }else{
+ $$("log").innerHTML = BCJT.tree.error;
+ $$("console").style.display = "block";
+ return false;
+ }
+ },
+ escapeslashes: escapeslashes,
+ stripslashes: stripslashes,
+ uType: determineUserType,
+ selectType: selectType,
+ writeResults: function(){
+ var results = BCJT.tree.forest[0].search($$("keyword").value);
+ var res = $$("results");
+ res.innerHTML = "";
+ var strtable = "<table width=\"100%\"><tbody>";
+ for (var i=0; i< results.length; i++){
+ strtable += "<tr><td width=\"15\"><img src=\"/assets/jsonedit/" + results[i].where + ".gif\" title=\"Result found in the "+results[i].where+"\" border=\"0\" /></td>";
+ strtable += "<td><a href=\"#\" onclick=\"BCJT.mktree.expandToItem('tree0', '"+results[i].li+"');BCJT.tree.forest[0].getNodeValue('"+results[i].path+"', '"+results[i].a+"');tabber1.show(2);return false\">" + results[i].value + "</td>";
+ strtable += "<td class=\"path\">" + unescape(results[i].path) + "</td></tr>";
+ }
+ strtable += "</tbody></table>";
+ res.innerHTML = strtable;
+ },
+ info: {"version": "1.3", "www": "http://braincast.nl", "date": "april 2008", "description": "Braincast Json Tree Presentation object."}
+ };
+}();
+
+BCJTEP.prototype = function(){
+ BCJT.util.addLoadEvent(function(){
+ tabber1 = new Yetii({id: 'tab-container-1'});
+ tabber2 = new Yetii({id: 'tab-container-2',tabclass: 'tabn'});
+ addE($$("buildbutton"), "click", function(){
+ if (BCJTEP.build()){
+ $$("results").innerHTML = "&nbsp;";
+ $$("sourcetab").className = "show";
+ $$("editortab").className = "show";
+ $$("searchtab").className = "show";
+ }
+ })
+
+ var jsontypes = $$("jsontypes");
+ var j = BCJTE.objectTypes.length;
+ for (var i = 0; i<j; i++){BCJTE.addOptions(jsontypes, i ,BCJTE.objectTypes[i]);}
+
+ addE($$("savebutton"), "click", function(){
+ if ($$("autodetect").checked){
+ BCJTEP.selectType( $$("jsontypes"), BCJTEP.uType($$("jsonvalue").value) );
+ }
+ var obj = BCJT.tree.forest[0];
+ var listtype = $$("jsontypes").options[$$("jsontypes").selectedIndex].text;
+ obj.save($$("jsonvalue").value,listtype);
+ });
+
+ addE($$("addbutton"), "click", function(){
+ if ($$("autodetect").checked){
+ BCJTEP.selectType( $$("jsontypes"), BCJTEP.uType($$("jsonvalue").value) );
+ }
+
+ var obj = BCJT.tree.forest[0];
+ var listtype = $$("jsontypes").options[$$("jsontypes").selectedIndex].text;
+
+ obj.addNode($$("jsonname").value,$$("jsonvalue").value,listtype);
+ });
+ /*
+ addE($("jsonvalue"), "keydown", function(e){
+ if (e.keyCode == 83 && e.ctrlKey){
+ e.preventDefault();
+ alert("Save");
+ }
+ });*/
+
+ addE($$("refresh"), "mousedown", function(){
+ $$("refresh").className = "button buttondown";
+ $$("refresh").style.backgroundPosition = "right bottom";
+ if (BCJT.tree.forest[0]) BCJT.tree.forest[0].getNodeValue('json', 'a0');
+ });
+ addE($$("refresh"), "mouseup", function(){
+ $$("refresh").className = "button";
+ $$("refresh").style.backgroundPosition = "center center";
+ });
+
+
+ addE($$("add"), "mousedown", function(){
+ $$("add").className = "button buttondown";
+ $$("add").style.backgroundPosition = "right bottom";
+ $$("savebutton").style.display = "none";
+ $$("addbutton").style.display = "inline";
+ $$("jsonnameinput").style.display = "inline";
+ $$("jsonvalue").value = "";
+ $$("jsontypes").selectedIndex = 0;
+
+ var objTree = BCJT.tree.forest[0];
+ var obj = eval(BCJTEP.escapeslashes(objTree.cp));
+ var objType = objTree.strIsTypeOf(objTree.isTypeOf(obj));
+
+ var jsonmode = "Automatic";
+ $$("autodetect").checked = true;
+ $$("jsonmode").innerHTML = "Mode: " + jsonmode;
+
+ if (objType == "array") {
+ $$("jsonname").value = "Array Index";
+ $$("jsonname").disabled = true;
+ } else {
+ $$("jsonname").value = "";
+ $$("jsonname").disabled = false;
+ }
+
+ });
+ addE($$("add"), "mouseup", function(){
+ $$("add").className = "button";
+ $$("add").style.backgroundPosition = "center center";
+ });
+
+ addE($$("jsontypes"), "change", function(){
+ var listtype = $$("jsontypes").options[$$("jsontypes").selectedIndex].text;
+ var jsonmode = $$("autodetect").checked ? "Automatic" : "Standard";
+ if (listtype == "object" || listtype == "array") {
+ jsonmode = "<b>NATIVE JSON</b>";
+ }
+ $$("jsonmode").innerHTML = "Mode: " + jsonmode;
+
+ });
+
+ addE($$("delete"), "mousedown", function(){
+ $$("delete").className = "button buttondown";
+ $$("delete").style.backgroundPosition = "right bottom";
+ if (confirm("Are you sure you want to delete this attribute?")) BCJT.tree.forest[0].deleteNode();
+ });
+ addE($$("delete"), "mouseup", function(){
+ $$("delete").className = "button";
+ $$("delete").style.backgroundPosition = "center center";
+ });
+
+ addE($$("search"), "click", function(){
+ BCJTEP.writeResults();
+ });
+ addE($$("keyword"), "keydown", function(e){
+ if (e.keyCode == 13){
+ BCJTEP.writeResults();
+ }
+ });
+ addE($$("consolebar"), "click", function(){
+ $$("console").style.display = "none";
+ return false;
+ });
+ });
+}();
diff --git a/chef-server-webui/app/assets/javascripts/yetii-min.js b/chef-server-webui/app/assets/javascripts/yetii-min.js
new file mode 100644
index 0000000000..59b1433866
--- /dev/null
+++ b/chef-server-webui/app/assets/javascripts/yetii-min.js
@@ -0,0 +1 @@
+/*Yetii - Yet (E)Another Tab Interface Implementation,http://www.kminek.pl/lab/yetii/,Copyright (c) 2007 Grzegorz Wojcik,Code licensed under the BSD License: http://www.kminek.pl/bsdlicense.txt*/function Yetii(){this.defaults={id:null,active:1,timeout:null,interval:null,tabclass:'tab',activeclass:'active'};for(var n in arguments[0]){this.defaults[n]=arguments[0][n]};this.getTabs=function(){var a=[];var b=document.getElementById(this.defaults.id).getElementsByTagName('*');var c=new RegExp("(^|\\s)"+this.defaults.tabclass.replace(/\-/g,"\\-")+"(\\s|$)");for(var i=0;i<b.length;i++){if(c.test(b[i].className))a.push(b[i])}return a};this.links=document.getElementById(this.defaults.id+'-nav').getElementsByTagName('a');this.show=function(a){for(var i=0;i<this.tabs.length;i++){this.tabs[i].style.display=((i+1)==a)?'block':'none';this.links[i].className=((i+1)==a)?this.defaults.activeclass:''}};this.rotate=function(a){this.show(this.defaults.active);this.defaults.active++;if(this.defaults.active>this.tabs.length)this.defaults.active=1;var b=this;this.defaults.timeout=setTimeout(function(){b.rotate(a)},a*1000)};this.tabs=this.getTabs();this.show(this.defaults.active);var d=this;for(var i=0;i<this.links.length;i++){this.links[i].customindex=i+1;this.links[i].onclick=function(){if(d.defaults.timeout)clearTimeout(d.defaults.timeout);d.show(this.customindex);return false}}if(this.defaults.interval)this.rotate(this.defaults.interval)}; \ No newline at end of file
diff --git a/chef-server-webui/app/assets/stylesheets/base.css b/chef-server-webui/app/assets/stylesheets/base.css
new file mode 100644
index 0000000000..2391f7b685
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/base.css
@@ -0,0 +1,342 @@
+* {margin:0;padding:0}
+.clear { clear: both; height: 0; }
+
+h1 { margin: 15px 0; font-size: 22px; font-weight: normal; }
+h2 { font-size: 22px; margin: 15px 0; font-weight: normal;}
+h3 { font-size: 18px; margin: 10px 0; font-weight: normal;}
+h4 { font-size: 16px; margin: 10px 0; font-weight: normal;}
+hr {height: 1px; border: 0; }
+p { margin: 15px 0;}
+a img { border: none; }
+
+body {
+ font-size: 12px;
+ font-family: sans-serif;
+}
+
+#container {
+ min-width: 960px;
+}
+
+#header, #wrapper {
+ padding: 0 20px;
+}
+
+#header {
+ position: relative;
+ padding-top: 1px;
+}
+
+#header h1 {
+ margin: 0;
+ padding: 10px 0;
+ font-size: 30px;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ text-decoration: none;
+}
+
+#main {
+ width: 100%;
+ float: left;
+}
+
+#main.loginPage {
+ width: 80%;
+}
+
+.actions-bar {
+ padding: 10px 1px;
+}
+
+.actions-bar .actions {
+ float: left;
+}
+
+
+.actions-bar .pagination {
+ float: right;
+ padding: 1px 0;
+}
+
+#sidebar {
+ width: 15%;
+ float: right;
+}
+
+#sidebar h3 {
+ padding: 10px 15px;
+ margin: 0;
+ font-size: 13px;
+}
+
+#sidebar .block {
+ margin-bottom: 20px;
+ padding-bottom: 10px;
+}
+
+#sidebar .block .content {
+ padding: 0 15px;
+}
+
+#sidebar ul.navigation li a:link, #sidebar ul.navigation li a:visited {
+ display: block;
+ padding: 10px 15px;
+}
+
+#sidebar .block .sidebar-block, #sidebar .notice {
+ padding:10px;
+}
+
+#wrapper {
+ padding-top: 20px;
+ background: #F4F4F6;
+}
+
+#main .block {
+ margin-bottom: 20px;
+ padding-top: 1px;
+}
+
+#main .block .content .inner {
+ padding: 0 15px 15px;
+}
+
+#main .main p.first {
+ margin-top: 0;
+}
+
+#user-navigation {
+ position: absolute;
+ top: 0px;
+ right: 20px;
+}
+
+#main-navigation {
+ width: 100%;
+}
+
+#user-navigation ul, #main-navigation ul, .secondary-navigation ul, #sidebar ul.navigation {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
+#user-navigation ul li, #main-navigation ul li, .secondary-navigation ul li {
+ float: left;
+ padding-top: 0;
+}
+
+#main-navigation ul li {
+ margin-right: 5px;
+}
+
+#user-navigation ul li {
+ padding: 60px 10px;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+}
+
+#main-navigation ul li a {
+ font-size: 15px;
+ display: block;
+ padding: 8px 15px;
+}
+
+.secondary-navigation {
+ font-size: 13px;
+ border-bottom-width: 10px;
+ border-bottom-style: solid;
+}
+
+.secondary-navigation ul li a {
+ display: block;
+ padding: 10px 15px;
+}
+
+#footer {
+ padding-bottom: 20px;
+}
+
+/* pagination */
+
+.pagination a, .pagination span {
+ padding: 2px 5px;
+ margin-right: 5px;
+ display: block;
+ float: left;
+ border-style: solid;
+ border-width: 1px;
+}
+
+.pagination span.current {
+ font-weight: bold;
+}
+
+.pagination a {
+ text-decoration: none;
+}
+
+/* tables */
+.table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-bottom: 15px;
+}
+
+.table th {
+ padding: 10px;
+ font-weight: bold;
+ text-align: left;
+}
+
+.table th.first {
+ width: 30px;
+}
+
+.table th.last {
+ width: 200px;
+}
+
+.table .checkbox {
+ margin-left: 10px;
+}
+
+.table td {
+ padding: 10px;
+}
+
+.table td.last {
+ text-align: right;
+}
+
+/* forms */
+
+input.checkbox {
+ margin: 0;
+ padding: 0;
+}
+
+.form .group {
+ margin-bottom: 15px;
+}
+
+.form div.left {
+ width: 20%;
+ float: left;
+}
+
+.form div.right {
+ width: 75%;
+ float: right;
+}
+
+.form .columns .column {
+ width: 48%;
+}
+
+.form .columns .left {
+ float: left;
+}
+
+.form .columns .right {
+ float: right;
+}
+
+.form label.label, .form input.text_field, .form textarea.text_area {
+ font-size: 1.2em;
+ padding: 1px 0;
+ margin: 0;
+}
+
+.form label.right {
+ text-align: right;
+}
+
+.form input.checkbox, .form input.radio {
+ margin-right: 5px;
+}
+
+.form label.checkbox, .form label.radio {
+ line-height: 1.5em;
+}
+
+.form label.label {
+ display: inline-block;
+ padding-bottom: 2px;
+ font-weight: bold;
+}
+
+.form div.fieldWithErrors label.label {
+ display: inline;
+}
+
+.form .fieldWithErrors .error {
+ color: red;
+}
+
+.form input.text_field, .form textarea.text_area {
+ width: 100%;
+ border-width: 1px;
+ border-style: solid;
+}
+
+/* lists */
+
+ul.list {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+
+ul.list li {
+ clear: left;
+ padding-bottom: 5px;
+}
+
+ul.list li .left {
+ float: left;
+}
+
+ul.list li .left .avatar {
+ width: 50px;
+ height: 50px;
+}
+
+ul.list li .item {
+ margin-left: 80px;
+}
+
+ul.list li .item .avatar {
+ float: left;
+ margin: 0 5px 5px 0;
+ width: 30px;
+ height: 30px;
+}
+
+/* box */
+
+#box {
+ width: 500px;
+ margin: 50px auto;
+}
+
+#box .block {
+ margin-bottom: 20px;
+}
+
+#box .block h2 {
+ padding: 10px 15px;
+ margin: 0;
+}
+
+#box .block .content {
+ padding: 10px 20px;
+}
+
+
diff --git a/chef-server-webui/app/assets/stylesheets/chef.css b/chef-server-webui/app/assets/stylesheets/chef.css
new file mode 100644
index 0000000000..030ffd4db9
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/chef.css
@@ -0,0 +1,344 @@
+.ruby .normal {}
+.ruby .comment { color: #005; font-style: italic; }
+.ruby .keyword { color: #A00; font-weight: bold; }
+.ruby .method { color: #077; }
+.ruby .class { color: #074; }
+.ruby .module { color: #050; }
+.ruby .punct { color: #447; font-weight: bold; }
+.ruby .symbol { color: #099; }
+.ruby .string { color: #944; background: #FFE; }
+.ruby .char { color: #F07; }
+.ruby .ident { color: #004; }
+.ruby .constant { color: #07F; }
+.ruby .regex { color: #B66; background: #FEF; }
+.ruby .number { color: #F99; }
+.ruby .attribute { color: #7BB; }
+.ruby .global { color: #7FB; }
+.ruby .expr { color: #227; }
+.ruby .escape { color: #277; }
+
+.todo{
+ color:red;
+}
+
+.files {
+ padding-left: 20px;
+}
+
+.code {
+ overflow: auto;
+ font-size: 0.8em;
+}
+
+.search td {
+ font-size: 0.8em;
+}
+
+dl dt { font-weight: bold; }
+.content td dl { margin: 0; padding: 0; }
+.content td dt {
+ background: transparent url(/assets/toggle-collapse.gif) 0 3px no-repeat;
+ clear: left; color: #333; cursor: pointer; line-height: 1em;
+ margin-left: -12px; padding-left: 14px;
+}
+.content td dd { margin: 0;
+ padding: 0 0 0 1em;
+}
+.content td dt.collapsed {
+ background-image: url(/assets/toggle-expand.gif);
+}
+.content td dt.inline { background-image: none; cursor: default;
+ float: left; margin-left: 0; padding-left: 2px; padding-right: .5em;
+ padding-top: 2px;
+}
+
+div.roleFormContainer, div.nodeFormContainer, div.environmentFormContainer{
+ padding: 0 15px 15px;
+ min-width:1050px;
+}
+
+div#run_list_editor_container {
+ min-height:450px;
+ min-width:1050px;
+}
+
+div.runListEditorColumn {
+ float:left;
+ margin-top: 20px;
+}
+
+div#current_run_list_display_container{
+ margin-left:20px;
+}
+
+span#cookbook_constraints_picker{
+ float:left;
+ margin-left:10px;
+}
+
+span#cookbook_constraints_picker select{
+ size: 15;
+ margin-right:50px;
+}
+
+span#environment_run_list_selection_control{
+ float:right;
+ margin-right:10px;
+}
+
+div.runListEditorLabel, div#activeRunListName{
+ font-size: 1.2em;
+ font-weight: bold;
+}
+
+div.runListEditorLabel{
+ padding: 3px 0 5px 0;
+ margin: 0;
+ color:white;
+ background:#005573;
+ background: -moz-linear-gradient(top, #007BA7, #005573);
+ background:-webkit-gradient(linear, left top, left bottom, from(#007BA7), to(#005573));
+ text-shadow: #005573 0px -1px 0px;
+ display: block;
+ text-align:center;
+}
+
+div.activeRunListLabel{
+ padding-right:15px;
+ padding-left:15px;
+}
+
+div#activeRunListName{
+ padding:2px;
+ text-align:center;
+}
+
+div.runListItemListContainer{
+ border: 1px solid #999;
+ margin-top:5px;
+ margin-right: 10px;
+ box-shadow:2px 2px 2px #dfdfdf;
+ /* Safari 5 has a weird problem where these divs increase in width by 15px after updating contents with ajax.
+ Problem doesn't occur in webkit nightlies. setting max-width works around.*/
+ max-width:360px;
+}
+
+div.emptyRunListControlsContainer{
+ padding:10px;
+}
+
+div.runListAvailableItemContainer, div.runListContainer {
+ width: 360px;
+ overflow-y: scroll;
+ background: #eee;
+}
+
+div.runListAvailableItemContainer{
+ height: 200px;
+}
+
+div.runListAvailableItemContainer .spinner{
+ position: relative;
+ top: 100px;
+ left: 0;
+ z-index: 1000;
+ text-align: center;
+}
+
+div.runListContainer{
+ height: 407px;
+}
+
+div.runListContainerForNode{
+ height:432px;
+}
+
+div.inactive, ul.inactive{
+ display:none;
+}
+
+ul.runListAvailableItemList, ul.runListItemList {
+ padding:5px 0px 0px 0px;
+ min-height:185px;
+ width:100%;
+ list-style-type: none;
+ margin: 0px;
+}
+
+ul.runListItemList{
+ min-height:405.5px;
+}
+
+ul#for_node.runListItemList{
+ min-height:420.5px;
+}
+
+li.runListItem{
+ margin: 0px 5px 5px 5px;
+ padding: 5px;
+ width: 93%;
+ overflow:hidden;
+ cursor:pointer;
+}
+
+li.displayRunListItem{
+ padding: 5px 5px 5px 5px;
+ margin: 0px 5px 0px 5px;
+ width: 93%;
+ border-bottom:1px solid #eee;
+}
+
+div.cloneRunListOption{
+ padding: 5px 5px 5px 5px;
+ margin: 0px 5px 0px 5px;
+ width: 93%;
+}
+
+div.runListAdditionalControls{
+ min-height:15px;
+ padding:5px;
+ color:#fff;
+ background:#005573;
+ background:-webkit-gradient(linear, left top, left bottom, from(#006589), to(#005573));
+}
+div.runListAdditionalControls a{
+ color:#fff;
+}
+
+div.clear {
+ clear: left;
+}
+
+table.form th {
+ font-weight: bold;
+ text-align: right;
+ padding-right: 10px;
+}
+
+div.help {
+ padding: 10px;
+ text-align: left;
+ vertical-align: top;
+}
+
+table.form td {
+ text-align: left;
+}
+
+table.sortable td {
+ vertical-align: top;
+}
+
+table.sortable ul {
+ background: #ff00ff;
+ margin: 5px;
+ padding: 5px;
+}
+
+td.table-key {
+ font-weight: bold;
+}
+
+div.json-attr {
+ overflow: auto;
+ max-width: 400px;
+}
+
+td.position {
+ font-weight: bold;
+}
+
+div#tree {
+ float: left;
+}
+
+div#jform {
+ float: left;
+ margin-left: 50px;
+}
+
+div.editor {
+ border: 1px solid black;
+}
+
+div.attrEditor{
+ clear:both;
+}
+
+div.attrEditor #treecontainer, div.attrEditor #tabcontainer{
+ float:left;
+}
+
+div.attrEditor #tabcontainer{
+ position:relative;
+ top:0px;
+}
+
+#sidebar_block {
+ display: none;
+}
+
+#sidebar_block_notice {
+ display: none;
+}
+
+div.tooltip {
+ background-color: #000;
+ outline: 1px solid #669;
+ border: 2px solid #fff;
+ padding: 10px 15px;
+ /* width: 200px; */
+ display: none;
+ color: #fff;
+ text-align: left;
+ font-size: 12px;
+ outline-radius: 4px;
+ -moz-outline-radius: 4px;
+ -webkit-outline-radius: 4px;
+}
+
+table.tooltip {
+ width: 190px;
+}
+
+h1 a, h1 label, h1 .title-select {
+ display: inline-block;
+ vertical-align: middle;
+}
+
+h1 label {
+ font-size: 12px;
+ color: #F7F7F8;
+ padding-left: 10px;
+}
+
+.cookbook_version_constraints_cb_name{
+ width:80%;
+}
+
+a.cookbook_version_toggle{
+ text-decoration:none;
+ font-weight:bold;
+ font-size: 24px;
+}
+
+ul.cookbook_versions{
+ list-style-type:none;
+}
+
+#cookbook_version_table{
+ width: auto;
+}
+
+tbody.cookbook_versions td {
+ vertical-align:top;
+}
+
+.invalid_version_error {
+ color: red;
+ font-weight: bold;
+}
+
+#cbVerAddRow td {
+ background: #c1c8d2;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/facebox/facebox.css b/chef-server-webui/app/assets/stylesheets/facebox/facebox.css
new file mode 100644
index 0000000000..cc484263cd
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/facebox/facebox.css
@@ -0,0 +1,95 @@
+#facebox .b {
+ background:url(/assets/facebox/b.png);
+}
+
+#facebox .tl {
+ background:url(/assets/facebox/tl.png);
+}
+
+#facebox .tr {
+ background:url(/assets/facebox/tr.png);
+}
+
+#facebox .bl {
+ background:url(/assets/facebox/bl.png);
+}
+
+#facebox .br {
+ background:url(/assets/facebox/br.png);
+}
+
+#facebox {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 100;
+ text-align: left;
+}
+
+#facebox .popup {
+ position: relative;
+}
+
+#facebox table {
+ border-collapse: collapse;
+}
+
+#facebox td {
+ border-bottom: 0;
+ padding: 0;
+}
+
+#facebox .body {
+ padding: 10px;
+ background: #fff;
+ width: 370px;
+}
+
+#facebox .loading {
+ text-align: center;
+}
+
+#facebox .image {
+ text-align: center;
+}
+
+#facebox img {
+ border: 0;
+ margin: 0;
+}
+
+#facebox .footer {
+ border-top: 1px solid #DDDDDD;
+ padding-top: 5px;
+ margin-top: 10px;
+ text-align: right;
+}
+
+#facebox .tl, #facebox .tr, #facebox .bl, #facebox .br {
+ height: 10px;
+ width: 10px;
+ overflow: hidden;
+ padding: 0;
+}
+
+#facebox_overlay {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ height:100%;
+ width:100%;
+}
+
+.facebox_hide {
+ z-index:-100;
+}
+
+.facebox_overlayBG {
+ background-color: #000;
+ z-index: 99;
+}
+
+* html #facebox_overlay { /* ie6 hack */
+ position: absolute;
+ height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
+}
diff --git a/chef-server-webui/app/assets/stylesheets/jquery-ui-1.7.1.custom.css b/chef-server-webui/app/assets/stylesheets/jquery-ui-1.7.1.custom.css
new file mode 100644
index 0000000000..af0e1fb509
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/jquery-ui-1.7.1.custom.css
@@ -0,0 +1,404 @@
+/*
+* jQuery UI CSS Framework
+* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+*/
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+/*
+* jQuery UI CSS Framework
+* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=3px&bgColorHeader=e7eef3&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=b2c7d7&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f9f9f9&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=cccccc&fcDefault=444444&iconColorDefault=888888&bgColorHover=f0f0f0&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=b2c7d7&fcHover=0b5b98&iconColorHover=2694e8&bgColorActive=99c2ff&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=000000&iconColorActive=ffffff&bgColorHighlight=fbf5d0&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=444444&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=15&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=07_diagonals_small.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=0px&offsetTopShadow=4px&offsetLeftShadow=4px&cornerRadiusShadow=4px
+*/
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #dddddd; background: #f9f9f9 url(/assets/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png) 50% top repeat-x; color: #362b36; }
+.ui-widget-content a { color: #362b36; }
+.ui-widget-header { border: 1px solid #b2c7d7; background: #e7eef3 url(/assets/images/ui-bg_highlight-soft_100_e7eef3_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #e6e6e6 url(/assets/images/ui-bg_glass_80_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #444444; outline: none; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #444444; text-decoration: none; outline: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #b2c7d7; background: #f0f0f0 url(/assets/images/ui-bg_glass_100_f0f0f0_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #0b5b98; outline: none; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #0b5b98; text-decoration: none; outline: none; }
+.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #2694e8; background: #99c2ff url(/assets/images/ui-bg_glass_50_99c2ff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #000000; outline: none; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #000000; outline: none; text-decoration: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #f9dd34; background: #fbf5d0 url(/assets/images/ui-bg_glass_55_fbf5d0_1x400.png) 50% 50% repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(/assets/images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
+.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(/assets/images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(/assets/images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(/assets/images/ui-icons_72a7cf_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(/assets/images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(/assets/images/ui-icons_2694e8_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(/assets/images/ui-icons_ffffff_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(/assets/images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(/assets/images/ui-icons_cd0a0a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; }
+.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; }
+.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; }
+.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; }
+.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; }
+.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; }
+.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #444444 url(/assets/images/ui-bg_diagonals-thick_15_444444_40x40.png) 50% 50% repeat; opacity: .30;filter:Alpha(Opacity=30); }
+.ui-widget-shadow { margin: 4px 0 0 4px; padding: 0px; background: #aaaaaa url(/assets/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png) 50% 50% repeat; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 4px; -webkit-border-radius: 4px; }/* Accordion
+----------------------------------*/
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
+.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
+----------------------------------*/
+.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/* Dialog
+----------------------------------*/
+.ui-dialog { position: relative; padding: .2em; width: 300px; }
+.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/* Progressbar
+----------------------------------*/
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
+----------------------------------*/
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
+----------------------------------*/
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
+----------------------------------*/
+.ui-tabs { padding: .2em; zoom: 1; }
+.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
+.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
diff --git a/chef-server-webui/app/assets/stylesheets/jquery.suggest.css b/chef-server-webui/app/assets/stylesheets/jquery.suggest.css
new file mode 100644
index 0000000000..8ddee6c0d4
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/jquery.suggest.css
@@ -0,0 +1,28 @@
+.ac_results {
+ width: 152px;
+ border: 1px solid gray;
+ background-color: white;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ position: absolute;
+ z-index: 10000;
+ display: none;
+}
+
+.ac_results li {
+ padding: 2px 5px;
+ white-space: nowrap;
+ color: #101010;
+ text-align: left;
+}
+
+.ac_over {
+ cursor: pointer;
+ background-color: #F0F0B8;
+}
+
+.ac_match {
+ text-decoration: underline;
+ color: black;
+} \ No newline at end of file
diff --git a/chef-server-webui/app/assets/stylesheets/jquery.treeTable.css b/chef-server-webui/app/assets/stylesheets/jquery.treeTable.css
new file mode 100644
index 0000000000..f76c7256b6
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/jquery.treeTable.css
@@ -0,0 +1,43 @@
+/* jQuery TreeTable Core 2.0 stylesheet
+ *
+ * This file contains styles that are used to display the tree table. Each tree
+ * table is assigned the +treeTable+ class.
+ * ========================================================================= */
+
+/* jquery.treeTable.collapsible
+ * ------------------------------------------------------------------------- */
+.treeTable tr td .expander {
+ background-position: left center;
+ background-repeat: no-repeat;
+ cursor: pointer;
+ padding: 0;
+ zoom: 1; /* IE7 Hack */
+}
+
+.treeTable tr.collapsed td .expander {
+ background-image: url(/assets/toggle-expand-dark.png);
+}
+
+.treeTable tr.expanded td .expander {
+ background-image: url(/assets/toggle-collapse-dark.png);
+}
+
+/* jquery.treeTable.sortable
+ * ------------------------------------------------------------------------- */
+.treeTable tr.selected, .treeTable tr.accept {
+ background-color: #3875d7;
+ color: #fff;
+}
+
+.treeTable tr.collapsed.selected td .expander, .treeTable tr.collapsed.accept td .expander {
+ background-image: url(/assets/toggle-expand-light.png);
+}
+
+.treeTable tr.expanded.selected td .expander, .treeTable tr.expanded.accept td .expander {
+ background-image: url(/assets/toggle-collapse-light.png);
+}
+
+.treeTable .ui-draggable-dragging {
+ color: #000;
+ z-index: 1;
+} \ No newline at end of file
diff --git a/chef-server-webui/app/assets/stylesheets/jsonedit_main.css b/chef-server-webui/app/assets/stylesheets/jsonedit_main.css
new file mode 100644
index 0000000000..f154f20af4
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/jsonedit_main.css
@@ -0,0 +1,296 @@
+/* Put this inside a @media qualifier so Netscape 4 ignores it */
+@media screen, print {
+ /* Turn off list bullets */
+ ul.mktree li { list-style: none; }
+
+ ul.mktree {margin: 0px; margin-left: -10px !important; margin-top: 3px;}
+ /* Control how "spaced out" the tree is */
+ ul.mktree, ul.mktree ul , ul.mktree li { margin-left:10px; padding:0px; white-space: nowrap}
+ /* Provide space for our own "bullet" inside the LI */
+ ul.mktree li .bullet { padding-left: 15px;}
+ /* Show "bullets" in the links, depending on the class of the LI that the link's in */
+ ul.mktree li.liOpen .bullet { cursor: pointer; background: url(/assets/jsonedit/minus.gif) center left no-repeat; }
+ ul.mktree li.liClosed .bullet { cursor: pointer; background: url(/assets/jsonedit/plus.gif) center left no-repeat; }
+ ul.mktree li.liBullet .bullet { cursor: default; background: url(/assets/jsonedit/bullet.gif) center left no-repeat; }
+ /* Sublists are visible or not based on class of parent LI */
+ ul.mktree li.liOpen ul { display: block; border-left:1px solid #f5f5f5; border-top:1px solid #f5f5f5;}
+ ul.mktree li.liClosed ul { display: none; }
+
+
+ ul.mktree li { line-height: 16px }
+ /* Format menu items differently depending on what level of the tree they are in */
+ /* Uncomment this if you want your fonts to decrease in size the deeper they are in the tree */
+/*
+ ul.mktree li ul li { font-size: 90% }
+*/
+
+}
+
+#jsoneditor {
+ height: 350px;
+}
+
+#treecontainer{
+ border:1px solid #ccc;
+ position: absolute;
+ width:300px;
+ height: 350px;
+ overflow: auto;
+ margin-right:4px;
+}
+#treecontainer div, #treecontainer a{
+ color: #000000;
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+ text-decoration: none;
+ padding-left: 2px;
+ padding-right: 2px;
+ cursor:pointer;
+}
+#treecontainer .au{background-color: #ffffff; color: #000000} /* A tag unselected*/
+#treecontainer .as{background-color: #0a246a; color: #ffffff } /* A tag selected*/
+
+#tabcontainer{
+ position: absolute;
+ left: 310px;
+ top: 19px;
+ overflow: hidden;
+}
+#tabcontainer #console{
+ margin-top:4px;
+ border: 1px solid #ccc;
+ width:498px;
+ display: none;
+}
+#tabcontainer #console #log{
+ color:#FF0000;
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+ padding:2px;
+}
+#tabcontainer #console #bar{
+ background-image:url(/assets/jsonedit/cross.png);
+ _background-image:url(/assets/jsonedit/cross.gif);
+ background-position: right;
+ background-repeat:no-repeat;
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+ padding:2px;
+ background-color:#F0F0F0;
+}
+#tabcontainer #console #bar a{
+ display: block
+}
+#tabcontainer .noshow{display:none}
+#tabcontainer .show{display:block}
+div.tablayout {
+ width: 500px;
+ margin: 0 0 0px 0;
+}
+div.nested{
+ width: 480px;
+ margin: 0 0 0px 0;
+}
+ul.tablayout {
+ list-style-type: none;
+ width: 100%;
+ float: left;
+ background: url(/assets/jsonedit/pixel.gif) bottom left repeat-x;
+ margin:0pt;
+ padding:0pt;
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+}
+ul.tablayout li {
+ margin: 0 2px 0 0;
+ float: left;
+}
+ul.tablayout a {
+ float: left;
+ display: block;
+ padding: 2px 8px;
+ border: 1px solid #ccc;
+ border-bottom: 0;
+ color: #666;
+ background: #eee;
+ text-decoration: none;
+ font-weight: bold;
+ outline:0;
+}
+ul.tablayout a:hover {background: #fff;}
+ul.tablayout a.active {
+ background: #fff;
+ padding-bottom: 3px;
+ cursor: default;
+ color: red;
+}
+#tab-container-2-nav a {
+ padding: 0px 8px;
+ background-color:#CCCCCC;
+}
+#tab-container-2-nav a.active{
+ background-color:#f0f0f0;
+}
+#tab-container-2-nav li{
+
+}
+.xmlchoice{
+ height:24px;
+ text-align:left !important;
+}
+.xmlchoice input{
+ margin-top:0px;
+ vertical-align:middle;
+}
+.tab{
+ clear: left;
+ border: 1px solid #ccc;
+ border-top: 0;
+ padding: 8px 8px 0 8px;
+}
+.tab{
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+}
+.tabn{
+ clear: left;
+ border: 1px solid #ccc;
+ border-top: 0;
+ padding: 8px 8px 0 8px;
+ margin-bottom:8px;
+ background-color:#f0f0f0;
+}
+.tabn{
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+}
+
+
+.tab h2{margin: 0 0 20px 0;}
+
+.tab .button{
+ border:1px solid white;
+ float:left;
+ height:20px;
+ width:20px;
+ background-repeat:no-repeat;
+ background-position: center center;
+ cursor: pointer;
+}
+.tabn .button{
+ border:1px solid #f0f0f0;
+ float:left;
+ height:20px;
+ width:20px;
+ background-repeat:no-repeat;
+ background-position: center center;
+ cursor: pointer;
+}
+.tab .button:hover{border:1px outset;}
+.buttondown{border:1px inset !important}
+.tab #addbutton {
+ display: none;
+ background:#EEEEEE none repeat scroll 0 0;
+ border:1px solid #001C26;
+ color:#001C26;
+ cursor:pointer;
+ padding:2px 5px;
+ -moz-border-radius-bottomleft:4px;
+ -moz-border-radius-bottomright:4px;
+ -moz-border-radius-topleft:4px;
+ -moz-border-radius-topright:4px;
+}
+.tab #savebutton {
+ background:#EEEEEE none repeat scroll 0 0;
+ border:1px solid #001C26;
+ color:#001C26;
+ cursor:pointer;
+ padding:2px 5px;
+ -moz-border-radius-bottomleft:4px;
+ -moz-border-radius-bottomright:4px;
+ -moz-border-radius-topleft:4px;
+ -moz-border-radius-topright:4px;
+}
+.tab #search {
+ background:#EEEEEE none repeat scroll 0 0;
+ border:1px solid #001C26;
+ color:#001C26;
+ cursor:pointer;
+ padding:2px 5px;
+ -moz-border-radius-bottomleft:4px;
+ -moz-border-radius-bottomright:4px;
+ -moz-border-radius-topleft:4px;
+ -moz-border-radius-topright:4px;
+}
+.tab #refresh{
+ background-image:url(/assets/jsonedit/table_refresh.png);
+ _background-image:url(/assets/jsonedit/table_refresh.gif);
+}
+.tab #buildbutton{
+ background-image:url(/assets/jsonedit/build-button.png);
+}
+.tab #add{
+ background-image:url(/assets/jsonedit/add2.png);
+}
+
+.tab #delete{
+ background-image:url(/assets/jsonedit/delete.png);
+ _background-image:url(/assets/jsonedit/delete.gif);
+}
+
+.tab #jsonnameinput{
+ display: none;
+}
+
+.tab textarea{
+ /*border: 1px solid;*/
+ width: 99%;
+ font-size:13px;
+ font-family:"Consolas","Lucida Console",Courier,monospace;
+}
+.tab select{
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+}
+.tab .icanhastable td{text-align: right;}
+.tab .icanhastable{
+ border: 0px;
+ width: 100%;
+ padding-bottom:6px;
+}
+.tab .icanhastable td #autodetect{
+ vertical-align:middle;
+}
+
+#tab2 #jsonpath{
+ text-align: left;
+ margin-left: 4px;
+ font-size: 12px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+ letter-spacing:1px;
+}
+#tab2 #jsonmode{
+ text-align: left;
+ margin-left: 4px;
+ font-size: 11px;
+ font-family:"Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+ letter-spacing:1px;
+}
+#tab1 .icanhastable td{text-align: left;}
+#tab1 .icanhastable #results{
+ border: 1px solid #CCCCCC;
+ max-height:283px;
+ overflow:auto;
+}
+#tab1 .icanhastable #results table td{
+ background-color: #ffffcc;
+}
+#tab1 .icanhastable #results table td a{
+ color: #0000cc;
+}
+#tab1 .icanhastable #results table td a:hover{
+ text-decoration: underline;
+}
+#tab1 .icanhastable #results table .path{
+ font-size: 10px;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/bec-green/style.css b/chef-server-webui/app/assets/stylesheets/themes/bec-green/style.css
new file mode 100644
index 0000000000..225b6d4e35
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/bec-green/style.css
@@ -0,0 +1,290 @@
+a:link, a:visited, a:hover, a:active { color: #33f; }
+h1, h2, h3 {color:#444}
+
+body {
+ color: #222;
+ background: #e5e5e5;
+ font-family: "Bitstream Vera Sans", verdana, sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+}
+
+p {
+ font-size: 14px;
+ line-height: 20px;
+}
+
+input.checkbox {
+ vertical-align:middle;
+}
+
+#header h1 {
+ font-size: 28px;
+ padding: 5px 0;
+ margin: 5px 0;
+}
+
+.hightlight {
+ background-color: #ffc;
+}
+.small {
+ font-size: 11px;
+}
+.gray {
+ color: #999;
+}
+#header {
+ background: #48625B;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#main {
+ background: #e5e5e5;
+ width: 69%;
+}
+
+#main .block {
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ padding: 0;
+ margin-bottom:20px;
+ padding-bottom: 20px;
+ background: #fff;
+}
+
+#main .block h2.title {
+ margin: 0 0 20px 0;
+ background-color: #E9FAE6;
+ padding: 5px 5px 5px 15px;
+ font-size:18px;
+}
+
+.main_container {
+ padding:10px;
+}
+
+/* #sidebar .block { background: #FFF; padding-bottom:0px; } */
+
+#sidebar .notice {
+ background-color: #ffc;
+ padding: 0 10px;
+ border-bottom:1px solid #ddd;
+ border-right:1px solid #ddd;
+ border-top:1px solid #fff;
+ border-left:1px solid #fff;
+}
+#sidebar .notice h2 {
+ font-size:16px;
+ margin: 5px 0;
+ border-bottom:1px solid #aaa;
+}
+#sidebar .notice p {
+ font-size:12px;
+}
+
+#sidebar .block {
+ padding-bottom: 0;
+}
+
+#sidebar .block .content {
+ padding: 0 10px;
+}
+
+
+#sidebar h3 {
+ background: #c7d8d8;
+ border-bottom:1px solid #999;
+ padding: 5px 10px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ font-size:14px;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #E9FAE6;
+ color: #444;
+ font-size:14px;
+ text-decoration:underline;
+}
+#sidebar ul.navigation li.last a {
+ border-bottom: none;
+}
+
+#sidebar ul.navigation li a:link,#sidebar ul.navigation li a:visited {
+ padding: 5px 10px;
+ color:#444;
+ text-decoration: none;
+}
+#sidebar ul.navigation li a:hover {
+ text-decoration:underline;
+}
+#sidebar .block .sidebar-block h4 {
+ border-bottom: 1px solid #bbb;
+}
+#main-navigation ul li {
+ background: #30423E;
+}
+
+#main-navigation ul li:hover {
+ background: #23302D;
+}
+
+#main-navigation ul li.active {
+ background: #e5e5e5;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+#main-navigation ul li a {
+ font-size: 14px;
+ padding: 4px 10px;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #333;
+}
+#user-navigation ul li a:hover {
+ text-decoration: underline;
+}
+.secondary-navigation {
+ background: #48625B;
+ border-bottom-color: #30423e;
+ border-bottom: 5px solid #30423e;
+}
+
+.secondary-navigation ul li.active {
+ background-color: #30423e;
+}
+
+.secondary-navigation ul li:hover {
+ background-color: #23302d;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #30423e;
+ color: #FFF;
+ border: 1px solid #30423e;
+ -moz-border-radius:5px;
+}
+
+.pagination a {
+ color: #364B69;
+ border: 1px solid #ddd;
+ -moz-border-radius:5px;
+}
+
+.pagination a:hover {
+ color: #444;
+ background: #E9FAE6;
+}
+
+/* tables */
+
+.table th {
+ background: #48625B;
+ color: #FFF;
+ font-weight:normal;
+ padding:3px;
+}
+
+.table th a.toggle {
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: transparent url('images/tick.png') center no-repeat;
+ text-indent: -9999px;
+ -moz-outline: none;
+}
+
+.table th.first {
+ width: 30px;
+ text-align: center;
+}
+
+.table td {
+ border-bottom: 1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text, .form textarea.textarea {
+ border: 1px solid #ddd;
+ padding: 5px;
+ width: 95%;
+}
+
+.form .navform {
+ padding:10px;
+ background-color: #E9FAE6;
+ font-size:14px;
+ border-bottom:1px solid #ddd;
+ border-right:1px solid #ddd;
+ border-top:1px solid #eee;
+ border-left:1px solid #eee;
+}
+.form .navform input {
+ font-size:14px;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin:0 auto 5px;
+ width:80%;
+}
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #ddf;
+ background-color: #eef;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ margin: 3px 10px 0 0;
+}
+
+ul.list li .left {
+ padding: 5px 5px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #48625B;
+ color: #FFF;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/bec/style.css b/chef-server-webui/app/assets/stylesheets/themes/bec/style.css
new file mode 100644
index 0000000000..c94474866a
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/bec/style.css
@@ -0,0 +1,301 @@
+a:link, a:visited, a:hover, a:active { color: #33f; }
+h1, h2, h3 {color:#444}
+
+body {
+ color: #333;
+ background: #e5e5e5;
+ font-family: Verdana, Arial, "Bitstream Vera Sans", sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+}
+
+p {
+ font-size: 12px;
+ line-height: 20px;
+}
+
+input.checkbox {
+ vertical-align:middle;
+}
+
+#header h1 {
+ font-size: 28px;
+ padding: 5px 0;
+ margin: 5px 0;
+}
+
+.hightlight {
+ background-color: #ffc;
+}
+.small {
+ font-size: 11px;
+}
+.gray {
+ color: #999;
+}
+#header {
+ background: #006666;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#main {
+ background: #e5e5e5;
+ width: 73%;
+}
+
+#main .block {
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ padding: 0;
+ margin-bottom:20px;
+ padding-bottom: 20px;
+ background: #fff;
+}
+
+#main .block h2.title {
+ margin: 0 0 20px 0;
+ background-color: #E6FAFA;
+ padding: 5px 5px 5px 15px;
+ font-size:18px;
+}
+
+.main_container {
+ padding:10px;
+}
+
+#footer .block p {
+ color:#aaa;
+ font-size:11px;
+}
+
+/* #sidebar .block { background: #FFF; padding-bottom:0px; } */
+
+#sidebar .notice {
+ background-color: #ffc;
+ padding: 0 10px;
+ border-bottom:1px solid #ddd;
+ border-right:1px solid #ddd;
+ border-top:1px solid #fff;
+ border-left:1px solid #fff;
+}
+#sidebar .notice h2 {
+ font-size:16px;
+ margin: 5px 0;
+ border-bottom:1px solid #aaa;
+}
+#sidebar .notice p {
+ font-size:12px;
+}
+
+#sidebar .block {
+ padding-bottom: 0;
+}
+
+#sidebar .block .content {
+ padding: 0 10px;
+}
+
+
+#sidebar h3 {
+ background: #c7d8d8;
+ border-bottom:1px solid #999;
+ padding: 5px 10px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ font-size:12px;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #e1efef;
+ color: #444;
+ font-size:12px;
+ text-decoration:underline;
+}
+#sidebar ul.navigation li.last a {
+ border-bottom: none;
+}
+
+#sidebar ul.navigation li a:link,#sidebar ul.navigation li a:visited {
+ padding: 5px 10px;
+ color:#444;
+ text-decoration: none;
+}
+#sidebar ul.navigation li a:hover {
+ text-decoration:underline;
+}
+#sidebar .block .sidebar-block h4 {
+ border-bottom: 1px solid #bbb;
+}
+#main-navigation ul li {
+ background: #008c8c;
+}
+
+#main-navigation ul li:hover {
+ background: #00b2b2;
+}
+
+#main-navigation ul li.active {
+ background: #f0f0ee;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+#main-navigation ul li a {
+ font-size: 12px;
+ padding: 4px 10px;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #364b69;
+}
+#user-navigation ul li a:hover {
+ text-decoration: underline;
+}
+.secondary-navigation {
+ background: #006666;
+ border-bottom-color: #008c8c;
+ border-bottom: 5px solid #008c8c;
+}
+
+.secondary-navigation ul li.active {
+ background-color: #008c8c;
+}
+
+.secondary-navigation ul li:hover {
+ background-color: #00b2b2;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #008c8c;
+ color: #FFF;
+ border: 1px solid #008c8c;
+ -moz-border-radius:5px;
+}
+
+.pagination a {
+ color: #364B69;
+ border: 1px solid #ddd;
+ -moz-border-radius:5px;
+ font-size:11px;
+}
+
+.pagination a:hover {
+ color: #444;
+ background: #E6FAFA;
+}
+
+/* tables */
+
+.table th {
+ background: #006666;
+ color: #FFF;
+ font-weight:normal;
+ padding:3px;
+}
+
+.table th a.toggle {
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: transparent url('images/tick.png') center no-repeat;
+ text-indent: -9999px;
+ -moz-outline: none;
+}
+
+.table th.first {
+ width: 30px;
+ text-align: center;
+}
+
+.table td {
+ border-bottom: 1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text, .form textarea.textarea {
+ border: 1px solid #ddd;
+ padding: 5px;
+ width:99%;
+}
+
+.form .navform {
+ padding:10px;
+ background-color: #f1f8f8;
+ font-size:14px;
+ border-bottom:1px solid #ddd;
+ border-right:1px solid #ddd;
+ border-top:1px solid #eee;
+ border-left:1px solid #eee;
+}
+.form .navform input {
+ font-size:14px;
+}
+
+.description {
+ color:#aaa;
+ font-family:Georgia, serif;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin:0 auto 5px;
+ width:80%;
+}
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #ddf;
+ background-color: #eef;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ margin: 3px 10px 0 0;
+}
+
+ul.list li .left {
+ padding: 5px 5px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #006666;
+ color: #FFF;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/blue/style.css b/chef-server-webui/app/assets/stylesheets/themes/blue/style.css
new file mode 100644
index 0000000000..d7169d3f37
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/blue/style.css
@@ -0,0 +1,280 @@
+.small { font-size:12px; }
+.gray { color:#999999; }
+.hightlight { background-color:#FFFFCC; }
+
+a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #2F427A; }
+a { -moz-outline: none; }
+
+body {
+ color: #222;
+ background: #f0f0ee;
+ font-family: helvetica, arial, sans-serif;
+ font-size: 14px;
+}
+
+hr {
+ background: #f0f0ee;
+ color: #f0f0ee;
+}
+
+#header {
+ background: #2F427A;
+}
+
+#header h1 {
+ padding: 20px 0;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#user-navigation {
+ top: auto;
+ bottom: 5px;
+ right: 25px;
+}
+
+#main .block .content {
+ background: #FFF;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+#sidebar .block {
+ background: #FFF;
+}
+
+#sidebar .notice {
+ background: #FFFFCC;
+}
+
+#sidebar h3 {
+ background: #2F427A;
+ color: #FFF;
+ border-bottom: 10px solid #262626;
+ font-size: 15px;
+}
+
+#main-navigation ul li {
+ padding-left: 15px;
+}
+
+#main-navigation ul li a {
+ padding: 8px 0;
+}
+
+#main-navigation ul li.active {
+ padding: 0;
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active {
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active a {
+ padding: 8px 15px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ background: #FFF;
+ border-bottom: 1px solid #F0F0EE;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #316291;
+ color: #FFF;
+}
+
+#main-navigation {
+ background: #262626;
+}
+
+#main-navigation ul li {
+ background: #262626;
+ margin-right: 0;
+}
+
+#main-navigation ul li.active {
+ background: #f0f0ee;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+.secondary-navigation li a:hover {
+ background: #5C637A;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #262626;
+}
+
+.secondary-navigation {
+ background: #2F427A;
+ border-bottom-color: #262626;
+ font-size: 15px;
+}
+
+.secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
+ background-color: #262626;
+}
+
+#footer .block {
+ color: #FFF;
+ background: #262626;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 10px;
+}
+
+/* pagination */
+
+.pagination span, .pagination a {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ padding-top: 4px;
+}
+
+.pagination span.current {
+ background: #262626;
+ color: #FFF;
+ border-color: #262626;
+}
+
+.pagination a {
+ color: #262626;
+ border-color: #262626;
+}
+
+.pagination a:hover {
+ color: #FFF;
+ background: #262626;
+}
+
+/* tables */
+
+.table th {
+ background: #262626;
+ color: #FFF;
+}
+
+.table td {
+ border-bottom:1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text_field, .form textarea.text_area {
+ width: 100%;
+ border: 1px solid #262626;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #262626;
+ padding: 2px 5px;
+ border: 1px solid #262626;
+ cursor: pointer;
+}
+
+.form .description {
+ font-style: italic;
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin: 0 auto 15px;
+
+}
+
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #1FDF00;
+ background-color: #BBFFB6;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #2F427A;
+ color: #FFF;
+}
+
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
+#footer .block, .form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/default/style.css b/chef-server-webui/app/assets/stylesheets/themes/default/style.css
new file mode 100644
index 0000000000..552321745f
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/default/style.css
@@ -0,0 +1,267 @@
+.small { font-size:11px; }
+.gray { color:#999999; }
+.hightlight { background-color:#FFFFCC; }
+
+a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #7A1818; }
+a { -moz-outline: none; }
+
+body {
+ color: #222;
+ background: #f0f0ee;
+ font-family: helvetica, arial, sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+ color: #f0f0ee;
+}
+
+#header {
+ background: #7A1818;
+}
+
+#header h1 {
+ padding: 20px 0;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#user-navigation {
+ top: auto;
+ bottom: 5px;
+ right: 25px;
+}
+
+#main .block .content {
+ background: #FFF;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+#sidebar .block {
+ background: #FFF;
+}
+
+#sidebar h3 {
+ background: #7A1818;
+ color: #FFF;
+ border-bottom: 10px solid #262626;
+}
+
+#main-navigation ul li {
+ padding-left: 15px;
+}
+
+#main-navigation ul li a {
+ padding: 8px 0;
+}
+
+#main-navigation ul li.active {
+ padding: 0;
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active {
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active a {
+ padding: 8px 15px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ background: #FFF;
+ border-bottom: 1px solid #F0F0EE;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #470E0E;
+ color: #FFF;
+}
+
+#main-navigation {
+ background: #262626;
+}
+
+#main-navigation ul li {
+ background: #262626;
+ margin-right: 0;
+}
+
+#main-navigation ul li.active {
+ background: #f0f0ee;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+.secondary-navigation li a:hover {
+ background: #470E0E;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #262626;
+}
+
+.secondary-navigation {
+ background: #7A1818;
+ border-bottom-color: #262626;
+}
+
+.secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
+ background-color: #262626;
+}
+
+#footer .block {
+ color: #FFF;
+ background: #262626;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 10px;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #262626;
+ color: #FFF;
+ border-color: #262626;
+}
+
+.pagination a {
+ color: #262626;
+ border-color: #262626;
+}
+
+.pagination a:hover {
+ color: #FFF;
+ background: #262626;
+}
+
+/* tables */
+
+.table th {
+ background: #262626;
+ color: #FFF;
+}
+
+.table td {
+ border-bottom:1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text_field, .form textarea.text_area {
+ width: 100%;
+ border: 1px solid #262626;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #262626;
+ padding: 2px 5px;
+ border: 1px solid #262626;
+ cursor: pointer;
+}
+
+.form .description {
+ font-style: italic;
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin: 0 auto 15px;
+
+}
+
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #1FDF00;
+ background-color: #BBFFB6;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #7A1818;
+ color: #FFF;
+}
+
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
+#footer .block, .form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/djime-cerulean/style.css b/chef-server-webui/app/assets/stylesheets/themes/djime-cerulean/style.css
new file mode 100644
index 0000000000..351a894a99
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/djime-cerulean/style.css
@@ -0,0 +1,311 @@
+/**
+ * Cerulean web-app-theme made for Djime: http://github.com/mikl/djime/
+ *
+ * Please note that we're using CSSEdit's @group comment syntax.
+ *
+ * Colour sheme:
+ * Cerulean: #007BA7
+ * Bright blue: #01B8DE
+ * Near-white: #F7F7F8
+ * Silver grey: #C2C8D1
+ * Dark blue: #001C26
+ *
+ * http://www.colourlovers.com/palette/646252/Cerulean_touch
+ */
+
+/* @group General styles */
+
+.small { font-size:11px; }
+.gray { color:#999; }
+.hightlight { background-color:#ffc; }
+
+a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #007BA7; }
+
+body {
+ color: #222;
+ background: #F4F4F6;
+ font-family: "Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
+}
+
+hr {
+ background: #EEF0F0;
+ color: #EEF0F0;
+}
+
+/* @end */
+
+/* @group Header */
+
+#header {
+ background: #007BA7;
+}
+
+#header h1 {
+ padding: 20px 0;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #F7F7F8;
+}
+
+/* @end */
+
+#main .block .content {
+ background: #F7F7F8;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+
+
+/* @group Main navigation */
+
+#main-navigation ul li {
+ padding-left: 0;
+}
+
+#main-navigation ul li a {
+ padding: 8px 0;
+}
+
+#main-navigation ul li a {
+ padding: 8px 15px;
+}
+
+#main-navigation {
+ background-color: #005573;
+}
+
+#main-navigation ul li a:hover {
+ background-color: #102E41;
+}
+
+#main-navigation ul li.active a, #main-navigation ul li.active a:visited {
+ background: #F4F4F6;
+ color: #102E41;
+ font-weight: bold;
+}
+
+/* @end */
+
+/* @group Secondary navigation */
+
+.secondary-navigation li a:hover {
+ background: #005573;
+}
+
+.secondary-navigation {
+ background: #007BA7;
+ border-bottom-width: 7px;
+ border-bottom-color: #005573;
+}
+
+.secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
+ background-color: #005573;
+}
+
+/* @end */
+
+/* @group Sidebar */
+
+#sidebar .block {
+ background: #F7F7F8;
+}
+
+#sidebar h3 {
+ background: #007BA7;
+ color: #F7F7F8;
+ border-bottom: 7px solid #005573;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ background: #F7F7F8;
+ border-bottom: 1px solid #EEF0F0;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #005573;
+ color: #F7F7F8;
+}
+
+/* @end */
+
+#main-navigation ul li a:visited, #main-navigation ul li a:hover,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #F7F7F8;
+}
+
+
+#footer .block {
+ color: #F7F7F8;
+ background: #005573;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 10px;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #005573;
+ color: #F7F7F8;
+ border-color: #005573;
+}
+
+.pagination a,
+.pagination span {
+ color: #001C26;
+ border-color: #005573;
+}
+
+.pagination a:hover {
+ color: #F7F7F8;
+ background: #005573;
+}
+
+/* tables */
+
+.table th {
+ background: #C2C8D1;
+ color: #001C26;
+}
+
+.table td {
+ border-bottom:1px solid #EEF0F0;
+}
+
+/* forms */
+
+.form input.text_field, .form textarea.text_area {
+ width: 100%;
+ border: 1px solid #001C26;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #001C26;
+ padding: 2px 5px;
+ border: 1px solid #001C26;
+ cursor: pointer;
+}
+
+.form .description {
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+.form .inline_error_message {
+ color: #FF0000;
+ font-weight: bold;
+ padding-left:5px;
+}
+
+/* @group Flash messages */
+
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin: 0 auto 15px;
+}
+
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #e0d300;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #8ec4df;
+ background-color: #dffaff;
+}
+
+/* @end */
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #EEF0F0;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #EEF0F0;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #F7F7F8;
+}
+
+#box .block h2 {
+ background: #005573;
+ color: #F7F7F8;
+}
+
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li, #main-navigation li a, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
+#footer .block, .form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.first#CookbookVersionConstraints{
+ width:30%;
+}
+
+.table th.operator#CookbookVersionConstraints{
+ width:15%;
+}
+
+.table th.version#CookbookVersionConstraints{
+ width:20%;
+}
+
+.table th.last#CookbookVersionConstraints{
+ width:40%;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/kathleene/style.css b/chef-server-webui/app/assets/stylesheets/themes/kathleene/style.css
new file mode 100644
index 0000000000..e68a545431
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/kathleene/style.css
@@ -0,0 +1,272 @@
+.small { font-size:11px; }
+.gray { color:#999999; }
+.hightlight { background-color:#FFFFCC; }
+
+a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #AF0000; }
+a { -moz-outline: none; }
+
+body {
+ color: #222;
+ background: #f0f0ee;
+ font-family: helvetica, arial, sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+ color: #f0f0ee;
+}
+
+#header {
+ background: #AF0000;
+}
+
+#header h1 {
+ padding: 20px 0;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#user-navigation {
+ top: auto;
+ bottom: 5px;
+ right: 25px;
+}
+
+#main .block .content {
+ background: #FFF;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+#sidebar .block {
+ background: #FFF;
+}
+
+#sidebar h3 {
+ background: #AF0000;
+ color: #FFF;
+ border-bottom: 5px solid #2a0000;
+}
+
+#main-navigation ul li {
+ padding-left: 15px;
+}
+
+#main-navigation ul li a {
+ padding: 8px 0;
+}
+
+#main-navigation ul li.active {
+ padding: 0;
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active {
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active a {
+ padding: 8px 15px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ background: #FFF;
+ border-bottom: 1px solid #F0F0EE;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #470E0E;
+ color: #FFF;
+}
+
+#main-navigation {
+ background: #2a0000;
+}
+
+#main-navigation ul li {
+ background: #2a0000;
+ margin-right: 0;
+}
+
+#main-navigation ul li.active {
+ background: #f0f0ee;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+.secondary-navigation li a:hover {
+ background: #470E0E;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #2a0000;
+}
+
+.secondary-navigation {
+ background: #AF0000;
+ border-bottom-color: #2a0000;
+}
+
+.secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
+ background-color: #2a0000;
+}
+
+#footer .block {
+ color: #FFF;
+ background: #2a0000;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 10px;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #2a0000;
+ color: #FFF;
+ border-color: #2a0000;
+}
+
+.pagination a {
+ color: #2a0000;
+ border-color: #2a0000;
+}
+
+.pagination a:hover {
+ color: #FFF;
+ background: #2a0000;
+}
+
+/* tables */
+
+.table th {
+ background: #100000;
+ border-bottom: 3px solid #700000;
+ color: #FFF;
+}
+
+.table td {
+ border-bottom:1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text_field, .form textarea.text_area {
+ width: 100%;
+ border: 1px solid #2a0000;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #2a0000;
+ padding: 2px 5px;
+ border: 1px solid #2a0000;
+ cursor: pointer;
+}
+
+.form .description {
+ font-style: italic;
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin: 0 auto 15px;
+
+}
+
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #1FDF00;
+ background-color: #BBFFB6;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #AF0000;
+ color: #FFF;
+}
+
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
+#footer .block, .form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
+
+.secondary-navigation {
+ border-bottom-width: 5px;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/orange/style.css b/chef-server-webui/app/assets/stylesheets/themes/orange/style.css
new file mode 100644
index 0000000000..e7d51f51dc
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/orange/style.css
@@ -0,0 +1,263 @@
+.small { font-size:11px; }
+.gray { color:#999999; }
+.hightlight { background-color:#FFFFCC; }
+
+a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #ff7900; }
+a { -moz-outline: none; }
+
+body {
+ color: #222;
+ background: #f0f0ee;
+ font-family: helvetica, arial, sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+ color: #f0f0ee;
+}
+
+#header {
+ background: #ff7900;
+}
+
+#header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
+ color: #FFF;
+}
+
+#user-navigation {
+ top: auto;
+ bottom: 5px;
+ right: 25px;
+}
+
+#main .block .content {
+ background: #FFF;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+#sidebar .block {
+ background: #FFF;
+}
+
+#sidebar h3 {
+ background: #ff7900;
+ color: #FFF;
+ border-bottom: 10px solid #262626;
+}
+
+#main-navigation ul li {
+ padding-left: 15px;
+}
+
+#main-navigation ul li a {
+ padding: 8px 0;
+}
+
+#main-navigation ul li.active {
+ padding: 0;
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active {
+ margin-left: 15px;
+}
+
+#main-navigation ul li.active a {
+ padding: 8px 15px;
+}
+
+#sidebar ul li a:link, #sidebar ul li a:visited {
+ background: #FFF;
+ border-bottom: 1px solid #F0F0EE;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover, #sidebar ul li a:active {
+ background: #863800;
+ color: #FFF;
+}
+
+#main-navigation {
+ background: #262626;
+}
+
+#main-navigation ul li {
+ background: #262626;
+ margin-right: 0;
+}
+
+#main-navigation ul li.active {
+ background: #f0f0ee;
+}
+
+#main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
+#user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+.secondary-navigation li a:hover {
+ background: #863800;
+}
+
+#main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
+ color: #262626;
+}
+
+.secondary-navigation {
+ background: #ff7900;
+ border-bottom-color: #262626;
+}
+
+.secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
+ background-color: #262626;
+}
+
+#footer .block {
+ color: #FFF;
+ background: #262626;
+ width: 70%;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 10px;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #262626;
+ color: #FFF;
+ border-color: #262626;
+}
+
+.pagination a {
+ color: #262626;
+ border-color: #262626;
+}
+
+.pagination a:hover {
+ color: #FFF;
+ background: #262626;
+}
+
+/* tables */
+
+.table th {
+ background: #262626;
+ color: #FFF;
+}
+
+.table td {
+ border-bottom:1px solid #F0F0EE;
+}
+
+/* forms */
+
+.form input.text, .form textarea {
+ width: 100%;
+ border: 1px solid #262626;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #262626;
+ padding: 2px 5px;
+ border: 1px solid #262626;
+ cursor: pointer;
+}
+
+.form .description {
+ font-style: italic;
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin:0 auto 5px;
+
+}
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #1FDF00;
+ background-color: #BBFFB6;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ background: #ff7900;
+ color: #FFF;
+}
+
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
+#footer .block, .form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+}
diff --git a/chef-server-webui/app/assets/stylesheets/themes/reidb-greenish/style.css b/chef-server-webui/app/assets/stylesheets/themes/reidb-greenish/style.css
new file mode 100644
index 0000000000..23e5245eb4
--- /dev/null
+++ b/chef-server-webui/app/assets/stylesheets/themes/reidb-greenish/style.css
@@ -0,0 +1,301 @@
+.small { font-size:11px; }
+.gray { color:#a2b0b6; }
+.hightlight { background-color:#d6e7c7; }
+
+a:link, a:visited, a:hover, a:active { color: #81B953; }
+h1, h2, h3 { color: #3B5526; }
+a { -moz-outline: none; }
+
+body {
+ color: #222;
+ background: #e4ebe4;
+ font-family: helvetica, arial, sans-serif;
+}
+
+hr {
+ background: #f0f0ee;
+ color: #f0f0ee;
+}
+
+#header {
+ background: #c9deb7;
+
+}
+
+#header h1{
+ padding: 20px 0;
+ font-weight: bold;
+
+}
+
+#header h1 a:link, #header h1 a:active,
+#header h1 a:hover, #header h1 a:visited {
+ color: #3B5526;
+}
+
+#main .block .content {
+ background: #FFF;
+ padding-top: 1px;
+}
+
+#main .block .content h2 {
+ margin-left: 15px;
+}
+
+#main .content { border: 1px solid #81B953;}
+
+#sidebar .block {
+ background: #FFF;
+ border: none;
+}
+
+#sidebar h3 {
+ padding: 8px 12px;
+ background: #3B5526;
+ color: #FFF;
+ font-weight: bold;
+ border-bottom: 5px solid #81B953;
+}
+
+
+#sidebar ul li a:link,
+#sidebar ul li a:visited {
+ background: #FFF;
+ border-bottom: 1px solid #F0F0EE;
+ text-decoration: none;
+}
+
+#sidebar ul li a:hover,
+#sidebar ul li a:active {
+ background: #D3E8C1;
+ color: #FFF;
+}
+
+#main-navigation {
+ background: #44721e;
+ margin-right: 20px;
+ padding: 7px 7px 0 7px;
+}
+
+#main-navigation ul li {
+ background: #91B96F;
+ margin-right: 7px;
+}
+
+#main-navigation ul li a {
+ padding: 10px 10px 5px 10px;
+}
+
+#main-navigation ul li.active {
+ background: #e4ebe4;
+ border: 1px solid #91B96F;
+ border-bottom: none;
+ font-weight: bold;
+}
+
+#main-navigation ul li a:hover,
+#main-navigation ul li a:link,
+#main-navigation ul li a:visited,
+#main-navigation ul li a:active,
+.secondary-navigation ul li a:link, .secondary-navigation ul li a:visited,
+.secondary-navigation ul li a:hover, .secondary-navigation ul li a:active {
+ text-decoration: none;
+ color: #FFF;
+}
+
+#user-navigation ul li a:link,
+#user-navigation ul li a:visited,
+#user-navigation ul li a:active {
+ color: #3B5526;
+}
+
+#user-navigation ul li a:hover { color: #fff; }
+
+#main-navigation ul li.active a:link,
+#main-navigation ul li.active a:visited,
+#main-navigation ul li.active a:hover,
+#main-navigation ul li.active a:active {
+ color: #262626;
+}
+
+.secondary-navigation {
+ background: #3B5526;
+ border-bottom: 5px solid #81b953;
+}
+
+.secondary-navigation ul li a {
+display:block;
+padding: 8px 12px;
+}
+
+.secondary-navigation ul li.active {background: #81b953; font-weight: bold;}
+.secondary-navigation ul li.active a:hover {
+ background-color: #81B953;
+}
+
+.secondary-navigation li a:hover {
+ background: #81B953;
+}
+
+#footer .block {
+ color: #FFF;
+ background: #3B5526;
+}
+
+#footer .block p {
+ margin: 0;
+ padding: 5px;
+}
+
+/* pagination */
+
+.pagination span.current {
+ background: #262626;
+ color: #FFF;
+ border-color: #262626;
+}
+
+.pagination a {
+ color: #262626;
+ border-color: #262626;
+}
+
+.pagination a:hover {
+ color: #FFF;
+ background: #262626;
+}
+
+/* tables */
+
+
+.table th {
+ background: #253618;
+ color: #FFF;
+}
+
+.table tr th { padding: 5px; }
+
+.table td {
+ border-bottom:1px solid #F0F0EE;
+}
+.table tr.odd {background: #ebfadf;}
+.table tr.even {background: #d3e8c1;}
+
+
+/* forms */
+
+.form input.text_field, .form textarea.text_area {
+ width: 100%;
+ border: 1px solid #262626;
+}
+
+.form input.button {
+ background: #EEE;
+ color: #262626;
+ padding: 2px 5px;
+ border: 1px solid #262626;
+ cursor: pointer;
+}
+
+.form .description {
+ font-style: italic;
+ color: #8C8C8C;
+ font-size: .9em;
+}
+
+/* flash-messages */
+.flash .message {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ text-align:center;
+ margin: 0 auto 15px;
+
+}
+
+.flash .message p {
+ margin:8px;
+}
+.flash .error {
+ border: 1px solid #fbb;
+ background-color: #fdd;
+}
+.flash .warning {
+ border: 1px solid #fffaaa;
+ background-color: #ffffcc;
+}
+.flash .notice {
+ border: 1px solid #1FDF00;
+ background-color: #BBFFB6;
+}
+
+/* lists */
+
+ul.list li {
+ border-bottom-color: #F0F0EE;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+ul.list li .item .avatar {
+ border-color: #F0F0EE;
+ border-width: 1px;
+ border-style: solid;
+ padding: 2px;
+}
+
+/* box */
+
+#box .block {
+ background: #FFF;
+}
+
+#box .block h2 {
+ color: #fff;
+ background: #3B5526;
+ border-bottom: 5px solid #81b953;
+}
+
+#box .block .content { border: 1px solid #81b953; border}
+
+/* login */
+
+#block-login { }
+#block-login h2 { background: #3B5526;border-bottom: 5px solid #81b953;}
+
+/* rounded borders */
+
+#main, #main-navigation, #main-navigation li,
+.secondary-navigation, #main .block, #sidebar .block,
+#sidebar h3, ul.list li, #footer .block,
+.form input.button, #box .block, #box .block h2 {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation li.first a,
+.secondary-navigation ul li.first,
+.table th.first, .table th.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+.table th.last {
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+}
+
+.secondary-navigation ul li.first {
+ -moz-border-radius-topleft: 4px;
+ -webkit-border-top-left-radius: 4px;
+}
+
+#sidebar, #sidebar .block, #main .block,
+#sidebar ul.navigation, ul.list li,
+#footer .block, .form input.button, #box .block {
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+} \ No newline at end of file