Scott Seago
2008-May-16 21:02 UTC
[Ovirt-devel] [Patch] move tree popup widget for moving hosts and storage
>From 1ebce4238a6381d6fd513ed8753803164cef18b0 Mon Sep 17 00:00:00 2001From: Scott Seago <sseago at kodiak.boston.redhat.com> Date: Fri, 16 May 2008 16:52:58 -0400 Subject: [PATCH] first pass at move popup. Still not migrated to storage, and the 'new hardware pool' bits need to be hooked up. Signed-off-by: Scott Seago <sseago at kodiak.boston.redhat.com> --- wui/src/app/controllers/hardware_controller.rb | 28 +- wui/src/app/controllers/resources_controller.rb | 2 +- wui/src/app/models/pool.rb | 28 +- wui/src/app/views/hardware/move.rhtml | 43 + wui/src/app/views/hardware/new.html.erb | 76 +- wui/src/app/views/hardware/show_hosts.rhtml | 12 +- wui/src/app/views/hardware/show_storage.rhtml | 2 +- wui/src/app/views/layouts/_tree.rhtml | 2 +- wui/src/app/views/layouts/redux.rhtml | 10 +- wui/src/app/views/user/_grid.rhtml | 2 +- wui/src/public/images/Untitled-4.gif | Bin 0 -> 13123 bytes wui/src/public/images/addstoragepool.png | Bin 0 -> 1069 bytes wui/src/public/images/btn_move.png | Bin 0 -> 1531 bytes wui/src/public/images/btn_moveto_newhost.png | Bin 0 -> 2878 bytes wui/src/public/images/btn_moveto_newpool.png | Bin 0 -> 2731 bytes wui/src/public/images/icon_addvm.png | Bin 0 -> 1242 bytes wui/src/public/images/icon_selection_add.gif | Bin 0 -> 13127 bytes wui/src/public/images/icon_selection_remove.gif | Bin 0 -> 13117 bytes .../public/images/icon_selection_showdetail.gif | Bin 0 -> 13124 bytes wui/src/public/images/loading.gif | Bin 0 -> 2767 bytes wui/src/public/images/slider-bg-1.png | Bin 0 -> 204 bytes wui/src/public/images/slider-bg-2.png | Bin 0 -> 326 bytes wui/src/public/images/slider-handle.gif | Bin 0 -> 176 bytes wui/src/public/javascripts/facebox.js | 1 + .../jquery-treeview/jquery.treeview.async.js | 19 +- wui/src/public/javascripts/jquery.cookie.js | 92 + wui/src/public/javascripts/jquery.js | 3533 ++++++++++++++++++++ wui/src/public/javascripts/ui.core.js | 237 ++ wui/src/public/javascripts/ui.slider.js | 386 +++ wui/src/public/stylesheets/facebox.css | 8 + wui/src/public/stylesheets/layout.css | 138 +- 31 files changed, 4525 insertions(+), 94 deletions(-) create mode 100644 wui/src/app/views/hardware/move.rhtml create mode 100644 wui/src/public/images/Untitled-4.gif create mode 100644 wui/src/public/images/addstoragepool.png create mode 100644 wui/src/public/images/btn_move.png create mode 100644 wui/src/public/images/btn_moveto_newhost.png create mode 100644 wui/src/public/images/btn_moveto_newpool.png create mode 100644 wui/src/public/images/icon_addvm.png create mode 100644 wui/src/public/images/icon_selection_add.gif create mode 100644 wui/src/public/images/icon_selection_remove.gif create mode 100644 wui/src/public/images/icon_selection_showdetail.gif create mode 100755 wui/src/public/images/loading.gif create mode 100755 wui/src/public/images/slider-bg-1.png create mode 100755 wui/src/public/images/slider-bg-2.png create mode 100755 wui/src/public/images/slider-handle.gif create mode 100644 wui/src/public/javascripts/jquery.cookie.js create mode 100755 wui/src/public/javascripts/jquery.js create mode 100755 wui/src/public/javascripts/ui.core.js create mode 100755 wui/src/public/javascripts/ui.slider.js diff --git a/wui/src/app/controllers/hardware_controller.rb b/wui/src/app/controllers/hardware_controller.rb index 599d881..0365931 100644 --- a/wui/src/app/controllers/hardware_controller.rb +++ b/wui/src/app/controllers/hardware_controller.rb @@ -37,22 +37,30 @@ class HardwareController < ApplicationController end end - def json + def json_view_tree + json_tree_internal(Permission::PRIV_VIEW, false) + end + def json_move_tree + json_tree_internal(Permission::PRIV_MODIFY, true) + end + def json_tree_internal(privilege, filter_vm_pools) id = params[:id] if id @pool = Pool.find(id) set_perms(@pool) - unless @can_view - flash[:notice] = 'You do not have permission to view this hardware pool: redirecting to top level' + unless @pool.has_privilege(@user, privilege) + flash[:notice] = 'You do not have permission to access this hardware pool: redirecting to top level' redirect_to :controller => "dashboard" return end end if @pool pools = @pool.children + pools = Pool.select_hardware_pools(pools) if filter_vm_pools open_list = [] else pools = Pool.list_for_user(get_login_user,Permission::PRIV_VIEW) + pools = Pool.select_hardware_pools(pools) if filter_vm_pools current_id = params[:current_id] if current_id current_pool = Pool.find(current_id) @@ -62,7 +70,7 @@ class HardwareController < ApplicationController end end - render :json => Pool.nav_json(pools, open_list) + render :json => Pool.nav_json(pools, open_list, filter_vm_pools) end def show_vms @@ -107,7 +115,7 @@ class HardwareController < ApplicationController def users_json json_list(@pool.permissions, - [:id, :user, :user_role]) + [:id, :uid, :user_role]) end def storage_pools_json @@ -127,6 +135,12 @@ class HardwareController < ApplicationController [:display_name, :size_in_gb, :get_type_label]) end + def move + pre_modify + @resource_type = params[:resource_type] + render :layout => 'popup' + end + def new @pools = @pool.self_and_like_siblings end @@ -174,7 +188,7 @@ class HardwareController < ApplicationController # for hosts that aren't currently empty def move_hosts target_pool_id = params[:target_pool_id] - host_ids_str = params[:host_ids] + host_ids_str = params[:resource_ids] host_ids = host_ids_str.split(",").collect {|x| x.to_i} @pool.transaction do @@ -209,7 +223,7 @@ class HardwareController < ApplicationController # for storage that aren't currently empty def move_storage target_pool_id = params[:target_pool_id] - storage_pool_ids_str = params[:storage_pool_ids] + storage_pool_ids_str = params[:resource_ids] storage_pool_ids = storage_pool_ids_str.split(",").collect {|x| x.to_i} @pool.transaction do diff --git a/wui/src/app/controllers/resources_controller.rb b/wui/src/app/controllers/resources_controller.rb index 68e3abe..5056f09 100644 --- a/wui/src/app/controllers/resources_controller.rb +++ b/wui/src/app/controllers/resources_controller.rb @@ -79,7 +79,7 @@ class ResourcesController < ApplicationController def users_json json_list(@vm_resource_pool.permissions, - [:id, :user, :user_role]) + [:id, :uid, :user_role]) end def new diff --git a/wui/src/app/models/pool.rb b/wui/src/app/models/pool.rb index b6c0e03..34979c0 100644 --- a/wui/src/app/models/pool.rb +++ b/wui/src/app/models/pool.rb @@ -58,11 +58,18 @@ class Pool < ActiveRecord::Base ('#{Permission.roles_for_privilege(privilege).join("', '")}')") end + def self.select_hardware_pools(pools) + pools.select {|pool| pool[:type] == "HardwarePool"} + end + def self.select_vm_pools(pools) + pools.select {|pool| pool[:type] == "VmResourcePool"} + end + def sub_hardware_pools - children.select {|pool| pool[:type] == "HardwarePool"} + Pool.select_hardware_pools(children) end def sub_vm_resource_pools - children.select {|pool| pool[:type] == "VmResourcePool"} + Pool.select_vm_pools(children) end def self_and_like_siblings self_and_siblings.select {|pool| pool[:type] == self.class.name} @@ -113,23 +120,30 @@ class Pool < ActiveRecord::Base return (rgt - lft) != 1 end - def self.nav_json(pools, open_list) - pool_hash(pools, open_list).to_json + def self.nav_json(pools, open_list, filter_vm_pools=false) + pool_hash(pools, open_list, filter_vm_pools).to_json end - def self.pool_hash(pools, open_list) + def self.pool_hash(pools, open_list, filter_vm_pools=false) pools.collect do |pool| hash = {} hash[:id] = pool.id hash[:type] = pool[:type] hash[:text] = pool.name hash[:name] = pool.name - hash[:hasChildren] = pool.hasChildren + children = nil + if filter_vm_pools + children = select_hardware_pools(pool.children) + hash[:hasChildren] = !children.empty? + else + hash[:hasChildren] = pool.hasChildren + end found = false open_list.each do |open_pool| if pool.id == open_pool.id new_open_list = open_list[(open_list.index(open_pool)+1)..-1] unless new_open_list.empty? - hash[:children] = pool_hash(pool.children, new_open_list) + children = pool.children unless children + hash[:children] = pool_hash(children, new_open_list) hash[:expanded] = true hash.delete(:hasChildren) end diff --git a/wui/src/app/views/hardware/move.rhtml b/wui/src/app/views/hardware/move.rhtml new file mode 100644 index 0000000..23ebcf4 --- /dev/null +++ b/wui/src/app/views/hardware/move.rhtml @@ -0,0 +1,43 @@ +<script type="text/javascript"> + $(document).ready(function(){ + $("#move_tree").treeview({ + //animated: "normal", + current_pool_id: <%=@current_pool_id%>, + url: "<%= url_for :controller =>'/hardware', :action => 'json_move_tree' %>", + hardware_url: "#", + resource_url: "#", + onclick: "move_<%= @resource_type %>", + action_type: "javascript" + }) + }); + function move_<%= @resource_type %>(target_pool_id) + { + $.post('<%= url_for :controller => "hardware", :action => "move_#{@resource_type}", :id => @pool %>', + { resource_ids: get_selected_<%= @resource_type %>().toString(), + target_pool_id: target_pool_id }, + function(data,status){ + $("#<%= @resource_type %>_grid").flexReload() + jQuery(document).trigger('close.facebox'); + }); + } +</script> + +<div class="dialog_title_small"> + <div class="header">Move <%= @resource_type.capitalize %></div> + <div>Select an existing hardware pool or create a new pool for selected <%= @resource_type %>. </div> +</div> + +<div class="dialog_tree"> + <ul id="move_tree" class="filetree treeview-famfamfam treeview"></ul> + + <!-- <div style="clear:both;"></div> + <div style=" float:left; padding:0 0 0 5px;"><%= image_tag "icon_unassignedhost.gif" %></div> + <div style=" float:left; padding:5px 0 0 5px;">Unassigned Hosts</div>--> +</div> + + + +<div class="facebox_timfooter"> + <div style="float:left;"><a href="#" onclick=" $('#window').empty().load('<%= url_for :controller => 'resources', :action => 'new', :parent_id => @pool %>')"><%= image_tag "btn_moveto_newpool.png", :title=>"Move host to a new hardware pool" %></a></div> + <div style="float:right;"><a href="#" onclick="jQuery(document).trigger('close.facebox')"><%= image_tag "btn_cancel.png", :title =>"Cancel" %></a></div> +</div> diff --git a/wui/src/app/views/hardware/new.html.erb b/wui/src/app/views/hardware/new.html.erb index 005b0b2..cf11267 100644 --- a/wui/src/app/views/hardware/new.html.erb +++ b/wui/src/app/views/hardware/new.html.erb @@ -1,46 +1,38 @@ - <div id="data"> - <div class="inside"> - - <div id="dataTableWrapper"> - - <div class="dataTable"> - <div class="inside"> - - <div class="data-table-column"> - <% form_tag :action => 'create', :id => @pool do %> - <%= render :partial => 'form' %> - <%= submit_tag 'Create Hardware Pool' %> - <% end %> - </div> - - <div class="data-table-column"> - <strong class="header">Current Hardware Pool (<%= @pools.size %>)</strong> - <% for pool in @pools %> - <div class="hardware-item"><%= link_to pool.name, { :controller => "hardware", :action => "show", :id => pool }, { } %></div> - <% end %> - </div> - - </div> <!-- end #data-table.inside --> - </div> <!-- end #dataTable --> - - </div> <!-- end #dataTableWrapper --> - - </div> <!-- end #data.inside --> - </div> <!-- end #data --> - - </td> - <td id="right"> - <div class="heading"> </div> - <div class="tools"> - - <h3>Actions</h3> - <div class="actions"> - <%= link_to "Back to #{@parent.name}", { :controller => 'hardware', :action => 'show', :id => @parent }, { :class => "" } if @parent %> - </div> - </div> <!-- end #tools --> - </td> +<div class="dialog_title_small"> + <div class="header">Add New Hardware Pool</div> + <div>Add a new Hardware Pool to the <%= @parent.name %> pool.</div> +</div> + +<form method="POST" action="<%= url_for :action => 'create' %>" id="new_hardware_pool_form" > +<div class="dialog_form"> + <%= render :partial => 'form' %> +</div> +<div style="background: url(<%= image_path "fb_footer.jpg" %>) repeat-x; height: 37px; text-align:right; padding: 9px 9px 0 0;"> + <div><input type="image" name="submitButton" value="Submit2" src="<%= image_path "btn_addstorage.png"%>" alt="Create Hardware Pool" /> + <a href="#" onclick="jQuery(document).trigger('close.facebox')"><%=image_tag "btn_cancel.png", :title=>"Cancel" %></a> + </div> +</div> +</form> + <script type="text/javascript"> +$(function() { + var hwpooloptions = { + target: '<%= url_for :action => 'create' %>', // target element to update + dataType: 'json', + success: afterNewHwPool // post-submit callback + }; + + // bind form using 'ajaxForm' + $('#new_hardware_pool_form').ajaxForm(hwpooloptions); +}); +function afterNewHwPool(response, status){ + jQuery(document).trigger('close.facebox'); + // FIXME do we need to reload the tree here + //$("#vmpools_grid").flexReload() +} +</script> <%- content_for :title do -%> -<%= _("Create Hardware Pool") %> +<%= _("New Hardware Pool") %> <%- end -%> + diff --git a/wui/src/app/views/hardware/show_hosts.rhtml b/wui/src/app/views/hardware/show_hosts.rhtml index 5aaeeed..e94485f 100644 --- a/wui/src/app/views/hardware/show_hosts.rhtml +++ b/wui/src/app/views/hardware/show_hosts.rhtml @@ -1,13 +1,13 @@ <div id="toolbar_nav"> <ul> - <li><a href="<%= url_for :controller => 'host', :action => 'addhost', :hardware_pool_id => @pool %>" rel="facebox[.bolder]"><%= image_tag "icon_addhost.png" %> Add Host</a></li> - <li><%= render :partial => 'move_menu' %></li> + <li><a href="<%= url_for :controller => 'host', :action => 'addhost', :hardware_pool_id => @pool %>" rel="facebox[.bolder]"><%= image_tag "icon_addhost.png", :style=>"vertical-align:middle;" %> Add Host</a></li> + <li><a href="<%= url_for :controller => 'hardware', :action => 'move', :id => @pool, :resource_type=>'hosts' %>" rel="facebox[.bolder]"><%= image_tag "icon_move.png", :style=>"vertical-align:middle;" %> Move</a></li> <li><a href="#" onClick="remove_hosts()"><%= image_tag "icon_delete_white.png" %> Delete</a></li> </ul> </div> <script type="text/javascript"> - function remove_hosts() + function get_selected_hosts() { var host_array = new Array() var host_index = 0 @@ -18,8 +18,12 @@ host_index++ } } + return host_array + } + function remove_hosts() + { $.post('<%= url_for :controller => "hardware", :action => "move_hosts", :id => @pool %>', - { host_ids: host_array.toString(), target_pool_id: <%= Pool.root.id %> }, + { resource_ids: get_selected_hosts().toString(), target_pool_id: <%= Pool.root.id %> }, function(data,status){ $("#hosts_grid").flexReload() }); diff --git a/wui/src/app/views/hardware/show_storage.rhtml b/wui/src/app/views/hardware/show_storage.rhtml index d4e4e86..cd5dddf 100644 --- a/wui/src/app/views/hardware/show_storage.rhtml +++ b/wui/src/app/views/hardware/show_storage.rhtml @@ -25,7 +25,7 @@ function remove_storage() { $.post('<%= url_for :controller => "hardware", :action => "move_storage", :id => @pool %>', - { storage_pool_ids: get_selected_storage().toString(), target_pool_id: <%= Pool.root.id %> }, + { resource_ids: get_selected_storage().toString(), target_pool_id: <%= Pool.root.id %> }, function(data,status){ $("#storage_grid").flexReload() }); diff --git a/wui/src/app/views/layouts/_tree.rhtml b/wui/src/app/views/layouts/_tree.rhtml index 98ca9d8..07d80f4 100644 --- a/wui/src/app/views/layouts/_tree.rhtml +++ b/wui/src/app/views/layouts/_tree.rhtml @@ -4,4 +4,4 @@ <%= link_to "Dashboard", { :controller => "dashboard" }, { :id => "dashboard", :class => "#{selected}" } %> </div> <div style="clear:both"></div> -<ul id="tree" class="filetree treeview-famfamfam treeview"></ul> \ No newline at end of file +<ul id="tree" class="filetree treeview-famfamfam treeview"></ul> diff --git a/wui/src/app/views/layouts/redux.rhtml b/wui/src/app/views/layouts/redux.rhtml index bc9d7c3..a83a02c 100644 --- a/wui/src/app/views/layouts/redux.rhtml +++ b/wui/src/app/views/layouts/redux.rhtml @@ -23,16 +23,20 @@ <%= javascript_include_tag "jquery-svg/jquery.svg.pack.js" -%> <!--%= javascript_include_tag "jquery-svg/jquery.svgfilter.js" -%--> <%= javascript_include_tag "jquery-svg/jquery.svggraph.pack.js" -%> - <%= yield :scripts -%> + <%= javascript_include_tag "ui.core.js" -%> + <%= javascript_include_tag "ui.slider.js" -%> + <%= javascript_include_tag "jquery.cookie.js" -%> <%= javascript_include_tag "jquery.form.js" -%> + <%= yield :scripts -%> <script type="text/javascript"> $(document).ready(function(){ $("#tree").treeview({ //animated: "normal", current_pool_id: <%if @current_pool_id == nil%>""<%else%><%=@current_pool_id%><%end%>, - url: "<%= url_for :controller =>'/hardware', :action => 'json' %>", + url: "<%= url_for :controller =>'/hardware', :action => 'json_view_tree' %>", hardware_url: "<%= url_for :controller =>'/hardware', :action => 'show' %>", - resource_url: "<%= url_for :controller =>'/resources', :action => 'show' %>" + resource_url: "<%= url_for :controller =>'/resources', :action => 'show' %>", + action_type: "hyperlink" }) }); diff --git a/wui/src/app/views/user/_grid.rhtml b/wui/src/app/views/user/_grid.rhtml index 24a7b86..010360d 100644 --- a/wui/src/app/views/user/_grid.rhtml +++ b/wui/src/app/views/user/_grid.rhtml @@ -11,7 +11,7 @@ dataType: 'json', colModel : [ {display: '', name : 'id', width : 20, sortable : false, align: 'left', process: <%= table_id %>checkbox}, - {display: 'Name', name : 'user', width : 180, sortable : true, align: 'left'}, + {display: 'Name', name : 'uid', width : 180, sortable : true, align: 'left'}, {display: 'Role', name : 'user_role', width : 80, sortable : true, align: 'left'} ], sortname: "user", diff --git a/wui/src/public/images/Untitled-4.gif b/wui/src/public/images/Untitled-4.gif new file mode 100644 index 0000000000000000000000000000000000000000..564b352f71e15fd954f7eae56058b5625f55d333 GIT bin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mFm>^WzhdB*9d&7O7YDJP#av$G?gJF(r# z+9z11kx8eH*V~c_qN%OQamOBW^o;4#j+)wX<Pq`aDThx!Y*K9Ep%ccB8{0IdF?z`8 zgBv2 at 5F-cc>uLjjpCoz(-cxhn0sHT_ at 2HXcjNq!-z4zL4kKK3Mb(fuo58G+Sp*w6p zWV^xJ4yxLwa^Tim4d~ymf?=w=1~3De0#n1#=01~Q`VF36v10bju7ykEfm{pE9JB!z CAxTgG literal 0 HcmV?d00001 diff --git a/wui/src/public/images/addstoragepool.png b/wui/src/public/images/addstoragepool.png new file mode 100644 index 0000000000000000000000000000000000000000..2a78dd4a67fdbb51e0492dd32b5c7030ed60d22c GIT binary patch literal 1069 zcmV+|1k(G7P)<h;3K|Lk000e1NJLTq000{R000jN1^@s66_d2s00004b3#c}2nYxW zd<bNS00009a7bBm000W`000W`0Ya=am;e9(9CSrkbW?9;ba!ELWdK2BZ(?O2Mrm?o zcW-iQb09-gGnm#!0{{R36?8>dbVG7wVRUJ4ZXi@?ZDjy8FEKJNFgViXWaIz<1BOXN zK~y-6m6T0PTvZgufA_ulf?*gKgixlXg;XiEFc{NV8G~9Xi6)I}H%(|4#)WZFjnTxF zNsZBkUHZ|Gn3yh2(A0%7rm;g}Td?J$v=j!U!>gTn2=n=7-n{p&ivcnMP0C4LZr-^$ z_xC^N+<SzSk|!}C1OUVRZ9d at iGcC0rC)SF60Q-X8TMN2z0r+WTOe^jdZ|DicUSPxh zZO3}UbyL0JI-1%J;%R6_+GUE#CA6f@^h%DoWT9tdOq<>nR_&16$U=xMF>ep-kDfXb zx)zDPhFTLqT4fx|MB3%bCnZ*Xo$KSbh_4oDu5-`MCktQCB at 4g*I{WV=fNQ&g&#qKN zee}k$t&BE+mydKG#S?77u}n}LgrXuH8-xPV#^rAy($UQQ)G{Ye^mV_q{?AtrQfW?h zg+5)-jSD+q#j?F?8Er=%2y{Nbk+K4cf>2b1qJm?=hN#-s!|1tryp8+thQb`}aA>|0 z`($y|=vQQwZNfHzRetGF6>KAm5TXJR0)$do6<0+7P<Rx_qbeXBq*X%NWf~9l01UbS z-n)EbM<&(2i*FsrmJ+*^NAdV7<x^Y;VS}O~92<ndGP2CC=-5)CxP3Ubg<VLqIQti> z5S5-8k11WXm2F9=_Y^C?T|)Kxar=X)z5tG8Qd~{2uEn{X$P(EfplnMr at d@(TG|8+< zYrTh}<y2tboH?;|=$T6~0KPvL-2rshHF5CtdD8b{=o43%U(v}FE$V$P+Cx4D2cno+ z9nf&sHPZA{J1ssxYjb}B;1Zj!b)!es7i4p9qn*-7E)qBtq51fmgd#&cT`pl2bC~HQ zrL~9Tm#4Th7YCrW^)R^y)67jzQ0rCztX*!S^SDYDRG+_AAO9J(CV=YoBNUa=`Xh3G zPqMl=#qC6v=MDsLtAfnJP1KqIU41X0-=6>&-2oeY_m%(sSH1IVPT3p^c16i7++=O$ zDq8$5sazSKTOr)wWpE%$Ub{zsX9JBrgXETO5uduwjivOD!1*U0S7)Q)bML&`@m<&1 zi at 0j)u}uS6E at 2rN%#2<sV`7F_EXG30Al%?(awYd|GGqQRI+^+baP~SI-yiA at eerBh zg!+y?Ji!*sbdpSb0xf=*@#QS at slo>%W7?P7<M%v>0fzhAUIt!&u`~GLjFv}ANqfl0 n%)|WWz%L_X+ST3S4L!ksH^aopM6UnZ00000NkvXXu0mjfxwh=} literal 0 HcmV?d00001 diff --git a/wui/src/public/images/btn_move.png b/wui/src/public/images/btn_move.png new file mode 100644 index 0000000000000000000000000000000000000000..a72adc19d6ee8f40de0a8cd9dc9bb4673eee5f5c GIT binary patch literal 1531 zcmV<X1qAwuP)<h;3K|Lk000e1NJLTq003G50012b1^@s6D)oET00004b3#c}2nYxW zd<bNS00009a7bBm000W`000W`0Ya=am;e9(9CSrkbW?9;ba!ELWdK2BZ(?O2Mrm?o zcW-iQb09-gGnm#!0{{R36?8>dbVG7wVRUJ4ZXi@?ZDjy8FEKSQFgQ;#TwMSF1yo5y zK~!jg?V4RolUEqWe{J7>x4{Ah1;M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zA;er3mnqF1T?6c>C}MAQ3D2!9A`p(#-9LfTVw~+K>FgS~Z|v!4JZp0m|4fE5%Z^Tu zE~Mbwt3EE=7-A}_vTObFbOVIY at cPE7F3)HG)>VuKBfPx13;?fh93eEied7eeG4^aK z#h}-5_DUZ at XoO}ohJz7GTy~1`Ed1CrgwtYVPxVU9UmwikG-c*F<LGRbcXH0ssA>|w zn#_DozeyoDbNLQ6<@sz|<7V5MIsm$S<D9vCC!_bfYXcnEy$(%CI=%gw??3tK5=UO! z!GT?s9N1L}KqRhm{QK;cjVVXZ9{e{nx5^d!_7m*Co;3jvOTNQ`JI~5^C`uq4d#Ju8 z`F5OE6Oow8a3F%1=dve_v)DtZr<+93U%w!>;1i(;6QRf>^&K3addzAboK!BzVKRJL z$bB+=O8D1gh)zKymySvwD|*A+aRWdyI)lM%MN33;s%tT!S4?0qB4VjERREtl8St2v z6%Y$e<W}7x!t7W^GCG5Z#{hf^a6UeKx5-{ujJ0qjk+J?9OI-Mvo%xvaiiqF!0r)yj z9PU?u&qXBM6z#o%d2JO=qlH*#3^h89So(YGfzjy=7_Cl>jy%lH0up2QNDTS_+F|ad z(m|kIZ?mH;FU8=@Lua<+O!PuUYDvUY2rcL*IWY?JZz`o5H8i(AL+b8bJxh1*{tJ`9 hc~W=pPNu7lzX1aQUSQc77bXAz002ovPDHLkV1gc-$oT*O literal 0 HcmV?d00001 diff --git a/wui/src/public/images/btn_moveto_newhost.png b/wui/src/public/images/btn_moveto_newhost.png new file mode 100644 index 0000000000000000000000000000000000000000..17377124bd57ad5fc5f5429d285401d50203d051 GIT binary patch literal 2878 zcmV-E3&He>P)<h;3K|Lk000e1NJLTq004^s0012b1^@s6nkJv200004b3#c}2nYxW zd<bNS00009a7bBm000W`000W`0Ya=am;e9(9CSrkbW?9;ba!ELWdK2BZ(?O2Mrm?o zcW-iQb09-gGnm#!0{{R36?8>dbVG7wVRUJ4ZXi@?ZDjy8FEKSQFgQ;#TwMSF3YSSl zK~!jg?VEdWRM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MsALrm#@67~7k%o51sPZm{hc3sJ+fb8$ z*4~LFikFM9C~~HA?C*_wTwZ!yV-JLWw~v1J#0PcacK<jN+$63oBn%dLoJ;2<t}Tp8 za8U_J(d1_eNhCro=n|DB8t|jh8xg}3J7`Mcn+uKJNHn12i~`Uc8E_Wstmy>Z{gcZq ziK`B})N~>PPJm_s_%zhnw%(kPjWMGDUvJAK(@WxNfjO%PwV)@^*#_{b0Bn(b-t~bq zC(%!xfkkT|=<X#F at E|2WwY=t_*6Pq2Ef~_W(CCc>&YVQ at c>%Tz{gL<(@QT`GM##xW zV at X4$H(a#QB)++jLqSB3n`n0jlHUige&@DFUyUE_t*NY at i}J7Ya+3c#C!zf7{3*)6 c&PM_M4`?|>h75`$QUCw|07*qoM6N<$g0t*za{vGU literal 0 HcmV?d00001 diff --git a/wui/src/public/images/btn_moveto_newpool.png b/wui/src/public/images/btn_moveto_newpool.png new file mode 100644 index 0000000000000000000000000000000000000000..b4c92175af5e2f1e694febf8df2769198ccefa39 GIT binary patch literal 2731 zcmV;c3RLxpP)<h;3K|Lk000e1NJLTq005Z)0012b1^@s6xqZ%b00004b3#c}2nYxW zd<bNS00009a7bBm000W`000W`0Ya=am;e9(9CSrkbW?9;ba!ELWdK2BZ(?O2Mrm?o zcW-iQb09-gGnm#!0{{R36?8>dbVG7wVRUJ4ZXi@?ZDjy8FEKSQFgQ;#TwMSF3Is_+ zK~#90?VSHlQ}-IjUoHJ!N-Y%9cG6a9*C5l%zUZ<@bWzb|F}lqyx?ir>AIOrC?EWEJ zG;u#H;fH(gwiptZuw<Ld5VPH6nVZX0Kq)O+1cYMwPQTD{+H>v?cupvwQ()uH+gH-0 z=k$D@=Y2k(=X{>ec}`mu4`^;~-U<8z*b8_mQe<`91^xq^{rKaLZ%C4a3ZS{U`4sR^ zi^YP^=cBy59FxhkfjW!)6-lSlOioU6`}S=Ti3Gsk&z(E>FV%w??E2=-o7uT at CxRf5 z$z%`&fqXu{!Lp0|RVXPbL95kbFc{Ekw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$>wfj|IQNR{#| z1`vzI=<n}WX0oNTgKRgS&l8D60B|~;jE#+P_wHQ;L7=p>blLeY*5BFLNoQv#qobqB z=eKX)1{RhRWo2dT+O-Q<n6Z+{BvVsU7>!1 at ZQDj=WhEYu2T>Fm7#MhH->l}f?C$bO zOBjm-N?x<b=|kS%-rkPQX2a+6;q&<v;n8RmNs<VKLhReO4}fquOfHur8jTVN1c*kX z%ND#3^DVz$y#LCTD;z$2nA4|E6N|+PK3i%-=9_Q6;nb;9?B2bbU@)kpOW98{nPhBi zjLOPNdV713B#E0hZxRd!5k--{zCI*LqN}TmmtTIFU@%B+Z7t*D<ID6e-42Jt{P^RK zyz<H`1?7p07cV|i^Gf3u3Wby<jC=zUi^b^Z=s=PrzWCw`-hKC7jvhU#jLFwue@!x( zR4&ek*?tn_fK at d&H%rey|2%_(gKIMQD9mOvHk*xHF30%z`0obKdSSI%(d+fZ<MGFC zV=x%7+wF{wj;=|kMx(*ua6GXcolb|{Zbz+FGd?~}CX-pU2BXnPMMVXvRBBlXMK0B7 zG#cXZ_#ZMRZnv9j*RK6J75_vcu^|=n$E{5*CY?^N%LO+-KffwFnM`KQm3Em_D)q>^ z<kHg6dQ*I?ROAn5+1+LF0eO-2X4%4DtyceOYo#JjKN^jua3;%Uv*>g>=I7@(R9KOx z2c1r*JS)}!cN2+(*J82!Pkqy%$X^?a#UkJA-PHg;OixdrvRbWFR8%Nc<03^?i(DFc z at P&yVG{D(xHhU at -i{WrM&}y~J%*+&jSW at JPP^;CL&1S4tD>|KySS%)|%d_$?$o~fX zORLplv)M2jjc7EQ4HaGFuSYJIV{UGasi`UXHzTLcojdn$m3%;Rb90b||H9Zu at xL&N lte(5T4=nr_MyDi6{1;E8%inQR+Ij#0002ovPDHLkV1hf8GQt1 literal 0 HcmV?d00001 diff --git a/wui/src/public/images/icon_addvm.png b/wui/src/public/images/icon_addvm.png new file mode 100644 index 0000000000000000000000000000000000000000..7f2889d50287199e70cce1981c9648569e69eda3 GIT binary patch liter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`vH^BAY0A8<`bLY?T z%F1F^D?V&m5G*#-bjwJqREercgd8~ziG)rh5 at DeK-?2)PEgaKLKN5|Y{>L93;AZe| zR+lVi<1{Dxn$OZ>&qrotBT0ZUrqlHVnx>6!SF$zkC^7w5G&U|*cc_+Ar;bta(k6DT zT1rpfExu|C&_6Aoblb>z5`eB7Xxi{ty9~qN&NI43Y^YdIQ`2#VwJ^h4cpT{FjsBmm zbX}!-Pc=kCyzR|pTUHNxz)wsU7%~k**T-olyt`V at UoQHZ&szarf9*{(KF}Aey6E at 4 z7a9zCSFSB<uCG5LBbvs`6&u+5Y#y3+jd$c?V*T}|#^IPcF~r~1(dO^!5blTbmws|! z at 0qM@C+!zIvoE##ZvjZDxH2;{r86UgU?9LZb at k}+ILk_x at YdV}neGy<_4Wba%9?TS z|H))Fuh8wt&C6?CR=T3pIdv)k!9al4_6q>a&Mlz3r-RP6u7*TR-}%2F0G>I8)9en% z_S{){<%Swr0ua1$`^2Kfi$1NcscEX(y}P`+rltwtKMn%KTfqhS!vFvP07*qoM6N<$ Eg00CqEC2ui literal 0 HcmV?d00001 diff --git a/wui/src/public/images/icon_selection_add.gif b/wui/src/public/images/icon_selection_add.gif new file mode 100644 index 0000000000000000000000000000000000000000..fc41da2c0ce2fc85d3a8c7282edf0f33bdaa093a GIT binary patch literal 13127 zcmeI3X?PPw7{?a`!4?k$4^VNt^|r}oH%Z$pNh+q4f(C(B!Fq0YC+V7Gcir8Zv|d#} z1;zWs`@;LaMaA2SH>h}m_lcr{2YAHUCM1Q&2cP!?-`@F<OeVi~j^F&h&V-3g^&xo} zGnDCJn0!9(_xr2zl{4Z~*hblr>36sxXUa;7IBYvfYI=lQwQv!~YHEa=9*q0qW{h-b z&D|Dh>7LxGbf=V%$~8nQ!Z|6IF*C%G*<2>A+fpvV$*R##B-(d}d5-NvoK%Dx=l;RE zYsL(VumP{&QGEUY8>sb)bz-QlwuWty9d?qevtk`9`h4_5lmtNv2yC%&(F)oNTWUg@ z*4R{Blm3cu9gbs4JfF>Gy;;B4u#&tG3Wa!|$cv(f5+1utcjTN$x2p at 2te>Zm*ovi@ zj%MhrJFnbsbUG1^a~CSL;^Abow2*Fl`wr?=j0~TXO<wT&_|nX at FiZ!fm_=mAuv!fx z9W5NcNwY}Suu?V~Yw?HO$_=3Ms^xk at uZTpck9v<U=n(>~B2`i=iDFy7`U133dE8L7 zMAv_m2L&k at D3<qwisfP6712*jpLO?48;$>;FjXn}GCQqw-?gX;PtqhqbjPO7gbkgk zij**{jO;|UjGQEVQcHyS^57=-SJ*X;1&t+N%H{g4m#%WNbjsd0%k+gwaS at PQ)P=f0 z20$>T3w41EfM84)>H--6!I&=81u_7FF<qz&WB>$Xx=<I$00_o(p)QaC5RB<UT_6J> z7}JHiKn6fCrVDj}41i!v7wQ5T0Ku3p)CDpCf-zmF3uFKUW4cfm$N&h&bfGSg0T7Jo zLR}yOAQ;nyx<Cd%Fs2K2fee6POc&|`834hXOjkwur3caJ^NuWi$1x!P&)<Ljxo+(r zzyJ2 at n$^Gj{L`u*e^~kbci(>V^;chh@%d+;ezIcu#~*$8!Tawmd-t8Umo9nh%{N|u z?bTNnzuf!Mi!VI?+_TR-z38bYpIG?#V~;-a at IwziaQ}Vx-gEa|ciwUPZMWXC;O3id zyy5!muD#~!tFD}X#pRb>ddbBXU3kIy=bbz6oU`Z7IqS?bX3v^=`e{9<o^tX at Cw6z` zvL|#pwspK|=$UltIISa at Aga<XAA8KvM;&=Y+u<{&A9iSK%e1Le4w)Q3_ at GG>n<q4l zZ;Tx{?tq49B+N*m`nuX+z%L3u-s`E^f4_bA*?X@&_o(Ko*xkqMw(BmVNA0}RjysGT zvHkGvw%umyVU-nI4IQ%O;6Ymq9KbMDYX>nym^@R%(B?jqVFnJLHDW<!@5(Xr?Wyb9 M7AIHtj%3FE3%VIhO#lD@ literal 0 HcmV?d00001 diff --git a/wui/src/public/images/icon_selection_remove.gif b/wui/src/public/images/icon_selection_remove.gif new file mode 100644 index 0000000000000000000000000000000000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j*PVCVe%pdu zZ<&AdO*h_f{dLz~bM;kMUUB(lmtJ!5yt#8Onmy~n3uexkKJEOeom0*`_nfmk+OwIn z+U&G-rfKM at Wa131H6A0X(juRJ+T>GDnKW_2_;F*$G&hYtx$&e?(GyP?Ib!&*hU4oa z#|=HUE*uInQlPe`+VAs<f`@mzs*WBq_^3fg9&z|Uu96*a*rA6Ue9(ah?BBm%-~IO8 yXYalC+ at nwLie9^y at 3w2tUCMeeOy#DYOgWQdsu<dwXEID#`5a?@=juj=Ic77S%tnp? literal 0 HcmV?d00001 diff --git a/wui/src/public/images/icon_selection_showdetail.gif b/wui/src/public/images/icon_selection_showdetail.gif new file mode 100644 index 0000000000000000000000000000000000000000..1560a78df429016a2c98dfd1e4949d42bdd28644 GIT binary patch literal 13124 zcmeI3X>=1+7>1`<1cM^tzE1~to6M4=ZN?-OQ_G at 3q}3u~bvkpCj!9<5$<(Ap6a`Tc z5y5?5>%Q-z;=ZA{EAIQgpaKFa#yd?&3Y>%I`@z3&PEK-j=lSmP-1qMtHKw^Cq<EOY z%ru566bgR7zosx`VthQ?q&N!w4L9a3MNJWh?I20rh;U06EaX^Si*RkhxDdBuq*EWzW0RJiajj}kN)2gTW7HGQ%lV9zA&$c4Gif6$=Odh=nH at x?ZMU1}*gnKbMYxgf3)Y=8 zX4- at e_(ZQN_ycU9&L`DNq58U7wncH+v5LV;^{gZa^h=UOQ4WY~>EWUt+6voRLY~mn zT$+>qi*TKeW63<9%jJAIzt6Ojyci0FctPSN$x8`uw%c%&yw}K%C=RlAoF<Z0ZQXKo z(_r0kl at 7DZiEx}dQTZutPO-`p8ChT7Mt!Q8;q!{ci#~xbk4y{0v{R1RL~%^J)il%5 z;`W<$o8(M8m1Scs{;*rQ4pf=7Qcvg+ktp at i;1z;iG0-YeB|$kDnAESn2(4EhH#I%c zy+OGo3j+O=%KJg3 at -Xj;=qIMny1S?K`u|Uurj~tKU3R+fSTvO<X_6s^lcmnYb)9Ld zoG|T-;zad~k|camPlWkO=SJ68Ts4gajU`{s<=Ul}k8+bVD&9BA at WnxK5|CWfg}Oin zKrp5Yb%6|kU`!Y40vQ0om at d=>G5~@xU8oCW00d*YP#4Gm2*z}wE|38bjOjvMAOj#6 z(}lV~20$>T3w41EfM84)>H--6!I&=81u_7FF<qz&WB>$Xx=<I$00_o(p)QaC5RB<U zT_6J>7}JHiKn6fCrVDj}41i!v7wQ5T0Kpqgm#1>mgBbLBM~>d(s4D!s=AXa+TD at xJ zpDUIx`{VcDmj3$7&p-Y6!}s5P`_0#1efh=bpMCnt#~*$8!IJmid-t8U-+J?n*B8I` z>Y`U(e(A**o`3GyXP$m);ge51zTmM(A9?tp2OqfqzI*Sv`>s3hxc#<UZ at IbmrW<d# z{<>?gx%#RruekiOOE0<jq6_EGyI}75bIzN6?yPgpK5OQgGp3($`n1zdoqEcYp6-0^ z<Sr*`pJbUvCY?G_?@T6$rgkVN9N&K2<YOltGqLUHqgq=g96A1oaq+_s8#`w7sOCeP zVuy at 8xG@?DGjgb*zAhN>OQOL0ytM}&u>XGh?z8t^Be)uN&pmeEZP#6P-f71jw%=~s z;oA(`dgxYL4)JU;c+lnpt2Y}^#V|FitC>MefvIKa<6e_t1`Mqp-n(e#lF75?E?&_- IdmwYre}d~ueE<Le literal 0 HcmV?d00001 diff --git a/wui/src/public/images/loading.gif b/wui/src/public/images/loading.gif new file mode 100755 index 0000000000000000000000000000000000000000..f864d5fd38b7466c76b5a36dc0e3e9455c0126e2 GIT binary patch literal 2767 zcmeH``%_bA0*1eHPVNawNVtR;Fkp-nQj8edfS`v<5L7TgR6wi;WfgH-0}4fE+c_uU zB6tf6auF}FAcDdgg|bMU&H)LR5jARM!8$tuwd<npD63mr>$nHqS?K-=JN<t7e*5P6 z-uHc0#>Z+yGvz=Iegxp{+qWGZ9j{-%9vvN>n3$NJp6==CAqYaF(LfM1Z{EEA{{Gt9 z+Ba|B7z_sR+xabl|E~mm-*OXmhLq??y)HONjX>1ze1D?RIn=G1`RR-%fb}zgSh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47_u>V zY*^e(o`?|l++*Y0uQ#&dKapW1o?J{jx+*_gKV^cW+W87KI7hZ5viXv$$=1IR^Z~yA XWBrHU7iSEP8X8hQyAJO{V6g1pwSv80 literal 0 HcmV?d00001 diff --git a/wui/src/public/images/slider-bg-1.png b/wui/src/public/images/slider-bg-1.png new file mode 100755 index 0000000000000000000000000000000000000000..b7d806ed630bb92ef4f8ff94108ee9e3bb07171d GIT binary patch literal 204 zcmeAS at N?(olHy`uVBq!ia0vp^CxDopgAGXfK4bb1q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~-c73F!lIEGZ*dUO3C=K%$t)`v4Z_w4lB-8uJ2;H|vH+w+oy z1*$IOeW({WVfn#BsOtTtsM{_}B3v0iM969`)xHvCE2D1AsJ6TBEMr30l+9c}L`&~P zGl=c)U{^6_PtaUl`)a$X^lX+NX6@;RHh<(YV91^-+OzI^=L?|C44$rjF6*2UngCuv BOOpTq literal 0 HcmV?d00001 diff --git a/wui/src/public/images/slider-bg-2.png b/wui/src/public/images/slider-bg-2.png new file mode 100755 index 0000000000000000000000000000000000000000..8b24cf0910fc24c075e44d324ab05ef2fb739ddc GIT binary patch literal 326 zcmV-M0lEH(P)<h;3K|Lk000e1NJLTq0077U000yS1^@s6$fR=00000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUy=t)FDRCwC#+c64*Fc^m6BnCGT!Ce={ z+v!o_Y0M!!f>2N3<S1H$X`#?=rAU1ra8Ysi;3NO=E4OVE*4m~hidrd^3*h3`bse?V zZI)$5c3oFjRb`SSAsN71mPO3-+{j at VZfTlwasZy2s-%?e8Wm#|@XD3L%hkIV;y4!5 zG?CPgk^A{_SHuH+MnM1y0-UfQ-<+wh at GWvbU+$bB00jXk2tYvq3Ib3NfPw%N1o&6a zb@#`LFK~74Ul6VJvF;v*p>a1T2XOG^5J3<a=}wNm at 9VNGoBdf%Jb)PYf|w|Z+PeS) Y02CZnxVGWxeE<Le07*qoM6N<$f`ROYxBvhE literal 0 HcmV?d00001 diff --git a/wui/src/public/images/slider-handle.gif b/wui/src/public/images/slider-handle.gif new file mode 100755 index 0000000000000000000000000000000000000000..9b89f26641e448c55547ea4315bdc8065d2674d0 GIT binary patch literal 176 zcmZ?wbhEHb<Y5qJ*v!K)|6<ORJq??mHB3KQvFFZ=v(GmidAQ`>rxRD-><L()nRbTZ zKNv8;fZ|UUMg|5R1|5(9$P5OS*a at C1FYPH2?4B9LmRN8(yv5D2?u4dT$5&ZhF8Px( z?I-8zZ)rNV!Qny4x+x#sy+72PNc_mLX74ns=WJ1;UCVq{Pr6l;wEI%=g=P10Z^tRk V=}qRicD<2h!i(R(8F>U5tO2~nPZ0nB literal 0 HcmV?d00001 diff --git a/wui/src/public/javascripts/facebox.js b/wui/src/public/javascripts/facebox.js index be3bf78..e0d4749 100644 --- a/wui/src/public/javascripts/facebox.js +++ b/wui/src/public/javascripts/facebox.js @@ -200,6 +200,7 @@ $('#facebox .close').click($.facebox.close) $('#facebox .close_image').attr('src', $.facebox.settings.closeImage) + $('#facebox .footer').remove() } // getPageScroll() by quirksmode.com diff --git a/wui/src/public/javascripts/jquery-treeview/jquery.treeview.async.js b/wui/src/public/javascripts/jquery-treeview/jquery.treeview.async.js index 72765ae..11802f5 100644 --- a/wui/src/public/javascripts/jquery-treeview/jquery.treeview.async.js +++ b/wui/src/public/javascripts/jquery-treeview/jquery.treeview.async.js @@ -25,8 +25,23 @@ function load(settings, params, child, container) { settings.link_to=settings.resource_url; settings.span_class="file"; } - var current = $("<li/>").attr("id", this.id || "") - .html("<span class=\"" + settings.span_class + "\"><a href=\"" + settings.link_to + "/" + this.id + "\">" + this.text + "</a></span>") + var link_open; + var link_close; + var span_onclick; + var current = $("<li/>").attr("id", this.id || ""); + if (settings.action_type=="hyperlink"){ + link_open = "<a href=\"" + settings.link_to + "/" + this.id + "\">"; + link_close = "</a>"; + } else { + link_open = ""; + link_close = ""; + } + if (settings.action_type=="javascript"){ + span_onclick = " onClick=\"" + settings.onclick + "(" + this.id + ")\" "; + } else { + span_onclick = "" + } + current.html("<span class=\"" + settings.span_class + "\"" + span_onclick + ">" + link_open + this.text + link_close + "</span>") .appendTo(parent); if (this.classes) { current.children("span").addClass(this.classes); diff --git a/wui/src/public/javascripts/jquery.cookie.js b/wui/src/public/javascripts/jquery.cookie.js new file mode 100644 index 0000000..8e8e1d9 --- /dev/null +++ b/wui/src/public/javascripts/jquery.cookie.js @@ -0,0 +1,92 @@ +/** + * Cookie plugin + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Create a cookie with the given name and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true}); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. + * + * @param String name The name of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl at stilbuero.de + */ + +/** + * Get the value of a cookie with the given name. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String name The name of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl at stilbuero.de + */ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { // name and value given, set cookie + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + var path = options.path ? '; path=' + options.path : ''; + var domain = options.domain ? '; domain=' + options.domain : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; \ No newline at end of file diff --git a/wui/src/public/javascripts/jquery.js b/wui/src/public/javascripts/jquery.js new file mode 100755 index 0000000..90e43f9 --- /dev/null +++ b/wui/src/public/javascripts/jquery.js @@ -0,0 +1,3533 @@ +(function(){ +/* + * jQuery 1.2.4a - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-03 03:51:55 +0200 (Sa, 03 Mai 2008) $ + * $Rev: 5390 $ + */ + +// Map over jQuery in case of overwrite +var _jQuery = window.jQuery, +// Map over the $ in case of overwrite + _$ = window.$; + +var jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); +}; + +// A simple way to check for HTML strings or ID strings +// (both of which we optimize for) +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, + +// Is it a simple selector + isSimple = /^.[^:#\[\.]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + return this; + + // Handle HTML strings + } else if ( typeof selector == "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Make sure an element was located + if ( elem ) + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + else { + this[0] = elem; + this.length = 1; + return this; + } + + else + selector = []; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return new jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return new jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); + + return this.setArray(jQuery.makeArray(selector)); + }, + + // The current version of jQuery being used + jquery: "1.2.4a", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // The number of elements contained in the matched element set + length: 0, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + var ret = -1; + + // Locate the position of the desired element + this.each(function(i){ + if ( this == elem ) + ret = i; + }); + + return ret; + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( name.constructor == String ) + if ( value == undefined ) + return this.length && jQuery[ type || "attr" ]( this[0], name ) || undefined; + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text != "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) + // The elements to wrap the target around + jQuery( html, this[0].ownerDocument ) + .clone() + .insertBefore( this[0] ) + .map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }) + .append(this); + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, false, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, true, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + find: function( selector ) { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + jQuery.unique( elems ) : + elems ); + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] != undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, this ) ); + }, + + not: function( selector ) { + if ( selector.constructor == String ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ) ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return !selector ? this : this.pushStack( jQuery.merge( + this.get(), + selector.constructor == String ? + jQuery( selector ).get() : + selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ? + selector : [selector] ) ); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return this.is( "." + selector ); + }, + + val: function( value ) { + if ( value == undefined ) { + + if ( this.length ) { + var elem = this[0]; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + + // Everything else, we just grab the value + } else + return (this[0].value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = value.constructor == Array ? + value : + [ value ]; + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value == undefined ? + (this.length ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + data: function( key, value ){ + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + if ( data === undefined && this.length ) + data = jQuery.data( this[0], key ); + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } else + return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ + jQuery.data( this, key, value ); + }); + }, + + removeData: function( key ){ + return this.each(function(){ + jQuery.removeData( this, key ); + }); + }, + + domManip: function( args, table, reverse, callback ) { + var clone = this.length > 1, elems; + + return this.each(function(){ + if ( !elems ) { + elems = jQuery.clean( args, this.ownerDocument ); + + if ( reverse ) + elems.reverse(); + } + + var obj = this; + + if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); + + var scripts = jQuery( [] ); + + jQuery.each(elems, function(){ + var elem = clone ? + jQuery( this ).clone( true )[0] : + this; + + // execute all scripts after the elements have been injected + if ( jQuery.nodeName( elem, "script" ) ) { + scripts = scripts.add( elem ); + } else { + // Remove any inner scripts for later evaluation + if ( elem.nodeType == 1 ) + scripts = scripts.add( jQuery( "script", elem ).remove() ); + + // Inject the elements into the document + callback.call( obj, elem ); + } + }); + + scripts.each( evalScript ); + }); + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( target.constructor == Boolean ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target != "object" && typeof target != "function" ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy == "object" && src && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, src, copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +var expando = "jQuery" + now(), uuid = 0, windowData = {}, + +// exclude the following css properties to add px + exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, +// cache getComputedStyle + getComputedStyle = document.defaultView && document.defaultView.getComputedStyle; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning this function. + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && !fn.nodeName && + fn.constructor != Array && /function/i.test( fn + "" ); + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.browser.msie ) + script.text = data; + else + script.appendChild( document.createTextNode( data ) ); + + head.appendChild( script ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + cache: {}, + + data: function( elem, name, data ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // Compute a unique ID for the element + if ( !id ) + id = elem[ expando ] = ++uuid; + + // Only generate the data cache if we're + // trying to access or manipulate it + if ( name && !jQuery.cache[ id ] ) + jQuery.cache[ id ] = {}; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) + jQuery.cache[ id ][ name ] = data; + + // Return the named cache data, or the ID for the element + return name ? + jQuery.cache[ id ][ name ] : + id; + }, + + removeData: function( elem, name ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( jQuery.cache[ id ] ) { + // Remove the section of cache data + delete jQuery.cache[ id ][ name ]; + + // If we've removed all the data, remove the element's cache + name = ""; + + for ( name in jQuery.cache[ id ] ) + break; + + if ( !name ) + jQuery.removeData( elem ); + } + + // Otherwise, we want to remove all of the element's data + } else { + // Clean up the element expando + try { + delete elem[ expando ]; + } catch(e){ + // IE has trouble directly removing the expando + // but it's ok with using removeAttribute + if ( elem.removeAttribute ) + elem.removeAttribute( expando ); + } + + // Completely remove the data cache + delete jQuery.cache[ id ]; + } + }, + + // args is for internal usage only + each: function( object, callback, args ) { + if ( args ) { + if ( object.length == undefined ) { + for ( var name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( var i = 0, length = object.length; i < length; i++ ) + if ( callback.apply( object[ i ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( object.length == undefined ) { + for ( var name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var i = 0, length = object.length, value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames != undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use is(".class") + has: function( elem, className ) { + return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret; + + // A helper method for determining if an element's values are broken + function color( elem ) { + if ( !jQuery.browser.safari ) + return false; + + // getComputedStyle is cached + var ret = getComputedStyle( elem, null ); + return !ret || ret.getPropertyValue("color") == ""; + } + + // We need to handle opacity special in IE + if ( name == "opacity" && jQuery.browser.msie ) { + ret = jQuery.attr( elem.style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = elem.style.outline; + elem.style.outline = "0 solid black"; + elem.style.outline = save; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && elem.style && elem.style[ name ] ) + ret = elem.style[ name ]; + + else if ( getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = getComputedStyle( elem, null ); + + if ( computedStyle && !color( elem ) ) + ret = computedStyle.getPropertyValue( name ); + + // If the element isn't reporting its values properly in Safari + // then some display: none elements are involved + else { + var swap = [], stack = [], a = elem, i = 0; + + // Locate all of the parent display: none elements + for ( ; a && color(a); a = a.parentNode ) + stack.unshift(a); + + // Go through and make them visible, but in reverse + // (It would be better if we knew the exact display type that they had) + for ( ; i < stack.length; i++ ) + if ( color( stack[ i ] ) ) { + swap[ i ] = stack[ i ].style.display; + stack[ i ].style.display = "block"; + } + + // Since we flip the display style, we have to handle that + // one special, otherwise get the value + ret = name == "display" && swap[ stack.length - 1 ] != null ? + "none" : + ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; + + // Finally, revert the display styles back + for ( i = 0; i < swap.length; i++ ) + if ( swap[ i ] != null ) + stack[ i ].style.display = swap[ i ]; + } + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var style = elem.style.left, runtimeStyle = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + elem.style.left = ret || 0; + ret = elem.style.pixelLeft + "px"; + + // Revert the changed values + elem.style.left = style; + elem.runtimeStyle.left = runtimeStyle; + } + } + + return ret; + }, + + clean: function( elems, context ) { + var ret = []; + context = context || document; + // !context.createElement fails in IE with an error but returns typeof 'object' + if (typeof context.createElement == 'undefined') + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + jQuery.each(elems, function(i, elem){ + if ( !elem ) + return; + + if ( elem.constructor == Number ) + elem += ''; + + // Convert html string into DOM nodes + if ( typeof elem == "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + "></" + tag + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); + + var wrap + // option or optgroup + !tags.indexOf("<opt") && + [ 1, "<select multiple='multiple'>", "</select>" ] || + + !tags.indexOf("<leg") && + [ 1, "<fieldset>", "</fieldset>" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "<table>", "</table>" ] || + + !tags.indexOf("<tr") && + [ 2, "<table><tbody>", "</tbody></table>" ] || + + // <thead> matched above + (!tags.indexOf("<td") || !tags.indexOf("<th")) && + [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || + + !tags.indexOf("<col") && + [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || + + // IE can't serialize <link> and <script> tags normally + jQuery.browser.msie && + [ 1, "div<div>", "</div>" ] || + + [ 0, "", "" ]; + + // Go to html and back, then peel off extra wrappers + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( wrap[0]-- ) + div = div.lastChild; + + // Remove IE's autoinserted <tbody> from table fragments + if ( jQuery.browser.msie ) { + + // String was a <table>, *may* have spurious <tbody> + var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare <thead> or <tfoot> + wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? + div.childNodes : + []; + + for ( var j = tbody.length - 1; j >= 0 ; --j ) + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) + tbody[ j ].parentNode.removeChild( tbody[ j ] ); + + // IE completely kills leading whitespace when innerHTML is used + if ( /^\s/.test( elem ) ) + div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); + + } + + elem = jQuery.makeArray( div.childNodes ); + } + + if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) ) + return; + + if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options ) + ret.push( elem ); + + else + ret = jQuery.merge( ret, elem ); + + }); + + return ret; + }, + + attr: function( elem, name, value ) { + // don't set attributes on text and comment nodes + if (!elem || elem.nodeType == 3 || elem.nodeType == 8) + return undefined; + + var fix = jQuery.isXMLDoc( elem ) ? + {} : + jQuery.props; + + // Safari mis-reports the default selected property of a hidden option + // Accessing the parent's selectedIndex property fixes it + if ( name == "selected" && jQuery.browser.safari ) + elem.parentNode.selectedIndex; + + // Certain attributes only work when accessed via the old DOM 0 way + if ( fix[ name ] ) { + if ( value != undefined ) + elem[ fix[ name ] ] = value; + + return elem[ fix[ name ] ]; + + } else if ( jQuery.browser.msie && name == "style" ) + return jQuery.attr( elem.style, "cssText", value ); + + else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName( elem, "form" ) && (name == "action" || name == "method") ) + return elem.getAttributeNode( name ).nodeValue; + + // IE elem.getAttribute passes even for style + else if ( elem.tagName ) { + + if ( value != undefined ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode ) + throw "type property can't be changed"; + + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) ) + return elem.getAttribute( name, 2 ); + + return elem.getAttribute( name ); + + // elem is actually elem.style ... set the style + } else { + // IE actually uses filters for opacity + if ( name == "opacity" && jQuery.browser.msie ) { + if ( value != undefined ) { + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + elem.zoom = 1; + + // Set the alpha filter to set the opacity + elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + + (parseFloat( value ).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); + } + + return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? + (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : + ""; + } + + name = name.replace(/-([a-z])/ig, function(all, letter){ + return letter.toUpperCase(); + }); + + if ( value != undefined ) + elem[ name ] = value; + + return elem[ name ]; + } + }, + + trim: function( text ) { + return (text || "").replace( /^\s+|\s+$/g, "" ); + }, + + makeArray: function( array ) { + var ret = []; + + if( array != undefined ){ + var i = array.length; + //the window, strings and functions also have 'length' + if( i != null && !array.split && array != window && !array.call ) + while( i ) + ret[--i] = array[i]; + else + ret[0] = array; + } + + return ret; + }, + + inArray: function( elem, array ) { + for ( var i = 0, length = array.length; i < length; i++ ) + if ( array[ i ] == elem ) + return i; + + return -1; + }, + + merge: function( first, second ) { + // We have to loop this way because IE & Opera overwrite the length + // expando of getElementsByTagName + + // Also, we need to make sure that the correct elements are being returned + // (IE returns comment nodes in a '*' query) + if ( jQuery.browser.msie ) { + for ( var i = 0; second[ i ]; i++ ) + if ( second[ i ].nodeType != 8 ) + first.push( second[ i ] ); + + } else + for ( var i = 0; second[ i ]; i++ ) + first.push( second[ i ] ); + + return first; + }, + + unique: function( array ) { + var ret = [], done = {}; + + try { + + for ( var i = 0, length = array.length; i < length; i++ ) { + var id = jQuery.data( array[ i ] ); + + if ( !done[ id ] ) { + done[ id ] = true; + ret.push( array[ i ] ); + } + } + + } catch( e ) { + ret = array; + } + + return ret; + }, + + grep: function( elems, callback, inv ) { + var ret = []; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) + if ( !inv && callback( elems[ i ], i ) || inv && !callback( elems[ i ], i ) ) + ret.push( elems[ i ] ); + + return ret; + }, + + map: function( elems, callback ) { + var ret = []; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + var value = callback( elems[ i ], i ); + + if ( value !== null && value != undefined ) { + if ( value.constructor != Array ) + value = [ value ]; + + ret = ret.concat( value ); + } + } + + return ret; + } +}); + +var userAgent = navigator.userAgent.toLowerCase(); + +// Figure out what browser is being used +jQuery.browser = { + version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1], + safari: /webkit/.test( userAgent ), + opera: /opera/.test( userAgent ), + msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), + mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) +}; + +var styleFloat = jQuery.browser.msie ? + "styleFloat" : + "cssFloat"; + +jQuery.extend({ + // Check to see if the W3C box model is being used + boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", + + props: { + "for": "htmlFor", + "class": "className", + "float": styleFloat, + cssFloat: styleFloat, + styleFloat: styleFloat, + innerHTML: "innerHTML", + className: "className", + value: "value", + disabled: "disabled", + checked: "checked", + readonly: "readOnly", + selected: "selected", + maxlength: "maxLength", + selectedIndex: "selectedIndex", + defaultValue: "defaultValue", + tagName: "tagName", + nodeName: "nodeName" + } +}); + +jQuery.each({ + parent: function(elem){return elem.parentNode;}, + parents: function(elem){return jQuery.dir(elem,"parentNode");}, + next: function(elem){return jQuery.nth(elem,2,"nextSibling");}, + prev: function(elem){return jQuery.nth(elem,2,"previousSibling");}, + nextAll: function(elem){return jQuery.dir(elem,"nextSibling");}, + prevAll: function(elem){return jQuery.dir(elem,"previousSibling");}, + siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);}, + children: function(elem){return jQuery.sibling(elem.firstChild);}, + contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);} +}, function(name, fn){ + jQuery.fn[ name ] = function( selector ) { + var ret = jQuery.map( this, fn ); + + if ( selector && typeof selector == "string" ) + ret = jQuery.multiFilter( selector, ret ); + + return this.pushStack( jQuery.unique( ret ) ); + }; +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function(name, original){ + jQuery.fn[ name ] = function() { + var args = arguments; + + return this.each(function(){ + for ( var i = 0, length = args.length; i < length; i++ ) + jQuery( args[ i ] )[ original ]( this ); + }); + }; +}); + +jQuery.each({ + removeAttr: function( name ) { + jQuery.attr( this, name, "" ); + if (this.nodeType == 1) + this.removeAttribute( name ); + }, + + addClass: function( classNames ) { + jQuery.className.add( this, classNames ); + }, + + removeClass: function( classNames ) { + jQuery.className.remove( this, classNames ); + }, + + toggleClass: function( classNames ) { + jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames ); + }, + + remove: function( selector ) { + if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) { + // Prevent memory leaks + jQuery( "*", this ).add(this).each(function(){ + jQuery.event.remove(this); + jQuery.removeData(this); + }); + if (this.parentNode) + this.parentNode.removeChild( this ); + } + }, + + empty: function() { + // Remove element nodes and prevent memory leaks + jQuery( ">*", this ).remove(); + + // Remove any remaining nodes + while ( this.firstChild ) + this.removeChild( this.firstChild ); + } +}, function(name, fn){ + jQuery.fn[ name ] = function(){ + return this.each( fn, arguments ); + }; +}); + +jQuery.each([ "Height", "Width" ], function(i, name){ + var type = name.toLowerCase(); + + jQuery.fn[ type ] = function( size ) { + // Get window width or height + return this[0] == window ? + // Opera reports document.body.client[Width/Height] properly in both quirks and standards + jQuery.browser.opera && document.body[ "client" + name ] || + + // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths) + jQuery.browser.safari && window[ "inner" + name ] || + + // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode + document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : + + // Get document width or height + this[0] == document ? + // Either scroll[Width/Height] or offset[Width/Height], whichever is greater + Math.max( + Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), + Math.max(document.body["offset" + name], document.documentElement["offset" + name]) + ) : + + // Get or set width or height on the element + size == undefined ? + // Get width or height on the element + (this.length ? jQuery.css( this[0], type ) : null) : + + // Set the width or height on the element (default to pixels if value is unitless) + this.css( type, size.constructor == String ? size : size + "px" ); + }; +}); +var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? + "(?:[\\w*_-]|\\\\.)" : + "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", + quickChild = new RegExp("^>\\s*(" + chars + "+)"), + quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"), + quickClass = new RegExp("^([#.]?)(" + chars + "*)"); + +jQuery.extend({ + expr: { + "": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);}, + "#": function(a,i,m){return a.getAttribute("id")==m[2];}, + ":": { + // Position Checks + lt: function(a,i,m){return i<m[3]-0;}, + gt: function(a,i,m){return i>m[3]-0;}, + nth: function(a,i,m){return m[3]-0==i;}, + eq: function(a,i,m){return m[3]-0==i;}, + first: function(a,i){return i==0;}, + last: function(a,i,m,r){return i==r.length-1;}, + even: function(a,i){return i%2==0;}, + odd: function(a,i){return i%2;}, + + // Child Checks + "first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;}, + "last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;}, + "only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");}, + + // Parent Checks + parent: function(a){return a.firstChild;}, + empty: function(a){return !a.firstChild;}, + + // Text Check + contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;}, + + // Visibility + visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";}, + hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";}, + + // Form attributes + enabled: function(a){return !a.disabled;}, + disabled: function(a){return a.disabled;}, + checked: function(a){return a.checked;}, + selected: function(a){return a.selected||jQuery.attr(a,"selected");}, + + // Form elements + text: function(a){return "text"==a.type;}, + 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||jQuery.nodeName(a,"button");}, + input: function(a){return /input|select|textarea|button/i.test(a.nodeName);}, + + // :has() + has: function(a,i,m){return jQuery.find(m[3],a).length;}, + + // :header + header: function(a){return /h\d/i.test(a.nodeName);}, + + // :animated + animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;} + } + }, + + // The regular expressions that power the parsing engine + parse: [ + // Match: [@value='test'], [@foo] + /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/, + + // Match: :contains('foo') + /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/, + + // Match: :even, :last-chlid, #id, .class + new RegExp("^([:.#]*)(" + chars + "+)") + ], + + multiFilter: function( expr, elems, not ) { + var old, cur = []; + + while ( expr && expr != old ) { + old = expr; + var f = jQuery.filter( expr, elems, not ); + expr = f.t.replace(/^\s*,\s*/, "" ); + cur = not ? elems = f.r : jQuery.merge( cur, f.r ); + } + + return cur; + }, + + find: function( t, context ) { + // Quickly handle non-string expressions + if ( typeof t != "string" ) + return [ t ]; + + // check to make sure context is a DOM element or a document + if ( context && context.nodeType != 1 && context.nodeType != 9) + return [ ]; + + // Set the correct context (if none is provided) + context = context || document; + + // Initialize the search + var ret = [context], done = [], last, nodeName; + + // Continue while a selector expression exists, and while + // we're no longer looping upon ourselves + while ( t && last != t ) { + var r = []; + last = t; + + t = jQuery.trim(t); + + var foundToken = false, + + // An attempt at speeding up child selectors that + // point to a specific element tag + re = quickChild, + + m = re.exec(t); + + if ( m ) { + nodeName = m[1].toUpperCase(); + + // Perform our own iteration and filter + for ( var i = 0; ret[i]; i++ ) + for ( var c = ret[i].firstChild; c; c = c.nextSibling ) + if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) ) + r.push( c ); + + ret = r; + t = t.replace( re, "" ); + if ( t.indexOf(" ") == 0 ) continue; + foundToken = true; + } else { + re = /^([>+~])\s*(\w*)/i; + + if ( (m = re.exec(t)) != null ) { + r = []; + + var merge = {}; + nodeName = m[2].toUpperCase(); + m = m[1]; + + for ( var j = 0, rl = ret.length; j < rl; j++ ) { + var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild; + for ( ; n; n = n.nextSibling ) + if ( n.nodeType == 1 ) { + var id = jQuery.data(n); + + if ( m == "~" && merge[id] ) break; + + if (!nodeName || n.nodeName.toUpperCase() == nodeName ) { + if ( m == "~" ) merge[id] = true; + r.push( n ); + } + + if ( m == "+" ) break; + } + } + + ret = r; + + // And remove the token + t = jQuery.trim( t.replace( re, "" ) ); + foundToken = true; + } + } + + // See if there's still an expression, and that we haven't already + // matched a token + if ( t && !foundToken ) { + // Handle multiple expressions + if ( !t.indexOf(",") ) { + // Clean the result set + if ( context == ret[0] ) ret.shift(); + + // Merge the result sets + done = jQuery.merge( done, ret ); + + // Reset the context + r = ret = [context]; + + // Touch up the selector string + t = " " + t.substr(1,t.length); + + } else { + // Optimize for the case nodeName#idName + var re2 = quickID; + var m = re2.exec(t); + + // Re-organize the results, so that they're consistent + if ( m ) { + m = [ 0, m[2], m[3], m[1] ]; + + } else { + // Otherwise, do a traditional filter check for + // ID, class, and element selectors + re2 = quickClass; + m = re2.exec(t); + } + + m[2] = m[2].replace(/\\/g, ""); + + var elem = ret[ret.length-1]; + + // Try to do a global search by ID, where we can + if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { + // Optimization for HTML document case + var oid = elem.getElementById(m[2]); + + // Do a quick check for the existence of the actual ID attribute + // to avoid selecting by the name attribute in IE + // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form + if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] ) + oid = jQuery('[@id="'+m[2]+'"]', elem)[0]; + + // Do a quick check for node name (where applicable) so + // that div#foo searches will be really fast + ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : []; + } else { + // We need to find all descendant elements + for ( var i = 0; ret[i]; i++ ) { + // Grab the tag name being searched for + var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2]; + + // Handle IE7 being really dumb about <object>s + if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" ) + tag = "param"; + + r = jQuery.merge( r, ret[i].getElementsByTagName( tag )); + } + + // It's faster to filter by class and be done with it + if ( m[1] == "." ) + r = jQuery.classFilter( r, m[2] ); + + // Same with ID filtering + if ( m[1] == "#" ) { + var tmp = []; + + // Try to find the element with the ID + for ( var i = 0; r[i]; i++ ) + if ( r[i].getAttribute("id") == m[2] ) { + tmp = [ r[i] ]; + break; + } + + r = tmp; + } + + ret = r; + } + + t = t.replace( re2, "" ); + } + + } + + // If a selector string still exists + if ( t ) { + // Attempt to filter it + var val = jQuery.filter(t,r); + ret = r = val.r; + t = jQuery.trim(val.t); + } + } + + // An error occurred with the selector; + // just return an empty set instead + if ( t ) + ret = []; + + // Remove the root context + if ( ret && context == ret[0] ) + ret.shift(); + + // And combine the results + done = jQuery.merge( done, ret ); + + return done; + }, + + classFilter: function(r,m,not){ + m = " " + m + " "; + var tmp = []; + for ( var i = 0; r[i]; i++ ) { + var pass = (" " + r[i].className + " ").indexOf( m ) >= 0; + if ( !not && pass || not && !pass ) + tmp.push( r[i] ); + } + return tmp; + }, + + filter: function(t,r,not) { + var last; + + // Look for common filter expressions + while ( t && t != last ) { + last = t; + + var p = jQuery.parse, m; + + for ( var i = 0; p[i]; i++ ) { + m = p[i].exec( t ); + + if ( m ) { + // Remove what we just matched + t = t.substring( m[0].length ); + + m[2] = m[2].replace(/\\/g, ""); + break; + } + } + + if ( !m ) + break; + + // :not() is a special case that can be optimized by + // keeping it out of the expression list + if ( m[1] == ":" && m[2] == "not" ) + // optimize if only one selector found (most common case) + r = isSimple.test( m[3] ) ? + jQuery.filter(m[3], r, true).r : + jQuery( r ).not( m[3] ); + + // We can get a big speed boost by filtering by class here + else if ( m[1] == "." ) + r = jQuery.classFilter(r, m[2], not); + + else if ( m[1] == "[" ) { + var type = m[3]; + + // special case, filter by exact name + if ( !not && m[2] == 'name' && type == '=' ) + r = jQuery.grep( document.getElementsByName(m[5]), function(elem){ + return jQuery.inArray( elem, r ) != -1; + }); + else { + for ( var i = 0, rl = r.length, tmp = []; i < rl; i++ ) { + var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; + + if ( z == null || /href|src|selected/.test(m[2]) ) + z = jQuery.attr(a,m[2]) || ''; + + if ( (type == "" && !!z || + type == "=" && z == m[5] || + type == "!=" && z != m[5] || + type == "^=" && z && !z.indexOf(m[5]) || + type == "$=" && z.substr(z.length - m[5].length) == m[5] || + (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) + tmp.push( a ); + } + r = tmp; + } + + // We can get a speed boost by handling nth-child here + } else if ( m[1] == ":" && m[2] == "nth-child" ) { + var merge = {}, tmp = [], + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( + m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" || + !/\D/.test(m[3]) && "0n+" + m[3] || m[3]), + // calculate the numbers (first)n+(last) including if they are negative + first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0; + + // loop through all the elements left in the jQuery object + for ( var i = 0, rl = r.length; i < rl; i++ ) { + var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); + + if ( !merge[id] ) { + var c = 1; + + for ( var n = parentNode.firstChild; n; n = n.nextSibling ) + if ( n.nodeType == 1 ) + n.nodeIndex = c++; + + merge[id] = true; + } + + var add = false; + + if ( first == 0 ) { + if ( node.nodeIndex == last ) + add = true; + } else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 ) + add = true; + + if ( add ^ not ) + tmp.push( node ); + } + + r = tmp; + + // Otherwise, find the expression to execute + } else { + var fn = jQuery.expr[ m[1] ]; + if ( typeof fn == "object" ) + fn = fn[ m[2] ]; + + if ( typeof fn == "string" ) + fn = eval("false||function(a,i){return " + fn + ";}"); + + // Execute it against the current filter + r = jQuery.grep( r, function(elem, i){ + return fn(elem, i, m, r); + }, not ); + } + } + + // Return an array of filtered elements (r) + // and the modified expression string (t) + return { r: r, t: t }; + }, + + dir: function( elem, dir ){ + var matched = [], + cur = elem[dir]; + while ( cur && cur != document ) { + if ( cur.nodeType == 1 ) + matched.push( cur ); + cur = cur[dir]; + } + return matched; + }, + + nth: function(cur,result,dir,elem){ + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) + if ( cur.nodeType == 1 && ++num == result ) + break; + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType == 1 && n != elem ) + r.push( n ); + } + + return r; + } +}); +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code orignated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function(elem, types, handler, data) { + if ( elem.nodeType == 3 || elem.nodeType == 8 ) + return; + + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.browser.msie && elem.setInterval ) + elem = window; + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) + handler.guid = this.guid++; + + // if data is passed, bind to handler + if( data != undefined ) { + // Create temporary function pointer to original handler + var fn = handler; + + // Create unique handler function, wrapped around original handler + handler = this.proxy( fn, function() { + // Pass arguments and context to original handler + return fn.apply(this, arguments); + }); + + // Store data in unique handler + handler.data = data; + + // Set the guid of unique handler to the same of original handler, so it can be removed + handler.guid = fn.guid; + } + + // Init the element's event structure + var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}), + handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){ + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + if ( typeof jQuery != "undefined" && !jQuery.event.triggered ) + return jQuery.event.handle.apply(arguments.callee.elem, arguments); + }); + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native + // event in IE. + handle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + jQuery.each(types.split(/\s+/), function(index, type) { + // Namespaced event handlers + var parts = type.split("."); + type = parts[0]; + handler.type = parts[1]; + + // Get the current list of functions bound to this event + var handlers = events[type]; + + // Init the event handler queue + if (!handlers) { + handlers = events[type] = {}; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) { + // Bind the global event handler to the element + if (elem.addEventListener) + elem.addEventListener(type, handle, false); + else if (elem.attachEvent) + elem.attachEvent("on" + type, handle); + } + } + + // Add the function to the element's handler list + handlers[handler.guid] = handler; + + // Keep track of which events have been used, for global triggering + jQuery.event.global[type] = true; + }); + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + guid: 1, + global: {}, + + // Detach an event or set of events from an element + remove: function(elem, types, handler) { + // don't do events on text and comment nodes + if ( elem.nodeType == 3 || elem.nodeType == 8 ) + return; + + var events = jQuery.data(elem, "events"), ret, index; + + if ( events ) { + // Unbind all events for the element + if ( types == undefined || (typeof types == "string" && types.charAt(0) == ".") ) + for ( var type in events ) + this.remove( elem, type + (types || "") ); + else { + // types is actually an event object here + if ( types.type ) { + handler = types.handler; + types = types.type; + } + + // Handle multiple events seperated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + jQuery.each(types.split(/\s+/), function(index, type){ + // Namespaced event handlers + var parts = type.split("."); + type = parts[0]; + + if ( events[type] ) { + // remove the given handler for the given type + if ( handler ) + delete events[type][handler.guid]; + + // remove all handlers for the given type + else + for ( handler in events[type] ) + // Handle the removal of namespaced events + if ( !parts[1] || events[type][handler].type == parts[1] ) + delete events[type][handler]; + + // remove generic event handler if no more handlers exist + for ( ret in events[type] ) break; + if ( !ret ) { + if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) { + if (elem.removeEventListener) + elem.removeEventListener(type, jQuery.data(elem, "handle"), false); + else if (elem.detachEvent) + elem.detachEvent("on" + type, jQuery.data(elem, "handle")); + } + ret = null; + delete events[type]; + } + } + }); + } + + // Remove the expando if it's no longer used + for ( ret in events ) break; + if ( !ret ) { + var handle = jQuery.data( elem, "handle" ); + if ( handle ) handle.elem = null; + jQuery.removeData( elem, "events" ); + jQuery.removeData( elem, "handle" ); + } + } + }, + + trigger: function(type, data, elem, donative, extra) { + // Clone the incoming data, if any + data = jQuery.makeArray(data); + + if ( type.indexOf("!") >= 0 ) { + type = type.slice(0, -1); + var exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Only trigger if we've ever bound an event for it + if ( this.global[type] ) + jQuery("*").add([window, document]).trigger(type, data); + + // Handle triggering a single element + } else { + // don't do events on text and comment nodes + if ( elem.nodeType == 3 || elem.nodeType == 8 ) + return undefined; + + var val, ret, fn = jQuery.isFunction( elem[ type ] || null ), + // Check to see if we need to provide a fake event, or not + event = !data[0] || !data[0].preventDefault; + + // Pass along a fake event + if ( event ) { + data.unshift({ + type: type, + target: elem, + preventDefault: function(){}, + stopPropagation: function(){}, + timeStamp: now() + }); + data[0][expando] = true; // no need to fix fake event + } + + // Enforce the right trigger type + data[0].type = type; + if ( exclusive ) + data[0].exclusive = true; + + // Trigger the event, it is assumed that "handle" is a function + var handle = jQuery.data(elem, "handle"); + if ( handle ) + val = handle.apply( elem, data ); + + // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links) + if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false ) + val = false; + + // Extra functions don't get the custom event object + if ( event ) + data.shift(); + + // Handle triggering of extra function + if ( extra && jQuery.isFunction( extra ) ) { + // call the extra function and tack the current return value on the end for possible inspection + ret = extra.apply( elem, val == null ? data : data.concat( val ) ); + // if anything is returned, give it precedence and have it overwrite the previous value + if (ret !== undefined) + val = ret; + } + + // Trigger the native events (except for clicks on links) + if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) { + this.triggered = true; + try { + elem[ type ](); + // prevent IE from throwing an error for some hidden elements + } catch (e) {} + } + + this.triggered = false; + } + + return val; + }, + + handle: function(event) { + // returned undefined or false + var val, ret, namespace, all, handlers; + + event = arguments[0] = jQuery.event.fix( event || window.event ); + + // Namespaced event handlers + namespace = event.type.split("."); + event.type = namespace[0]; + namespace = namespace[1]; + all = !namespace && !event.exclusive; //cache this now, all = true means, any handler + + handlers = ( jQuery.data(this, "events") || {} )[event.type]; + + for ( var j in handlers ) { + var handler = handlers[j]; + + // Filter the functions by class + if ( all || handler.type == namespace ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handler; + event.data = handler.data; + + ret = handler.apply( this, arguments ); + + if ( val !== false ) + val = ret; + + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + + return val; + }, + + fix: function(event) { + if ( event[expando] == true ) + return event; + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = { originalEvent: originalEvent }; + var props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" "); + for ( var i=props.length; i; i-- ) + event[ props[i] ] = originalEvent[ props[i] ]; + + // Mark it as fixed + event[expando] = true; + + // add preventDefault and stopPropagation since + // they will not work on the clone + event.preventDefault = function() { + // if preventDefault exists run it on the original event + if (originalEvent.preventDefault) + originalEvent.preventDefault(); + // otherwise set the returnValue property of the original event to false (IE) + originalEvent.returnValue = false; + }; + event.stopPropagation = function() { + // if stopPropagation exists run it on the original event + if (originalEvent.stopPropagation) + originalEvent.stopPropagation(); + // otherwise set the cancelBubble property of the original event to true (IE) + originalEvent.cancelBubble = true; + }; + + // Fix timeStamp + event.timeStamp = event.timeStamp || now(); + + // Fix target property, if necessary + if ( !event.target ) + event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either + + // check if target is a textnode (safari) + if ( event.target.nodeType == 3 ) + event.target = event.target.parentNode; + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) + event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, body = document.body; + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); + } + + // Add which for key events + if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) + event.which = event.charCode || event.keyCode; + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) + event.metaKey = event.ctrlKey; + + // Add which for click: 1 == left; 2 == middle; 3 == right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button ) + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + + return event; + }, + + proxy: function( fn, proxy ){ + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++; + return proxy;//so proxy can be declared as an argument + }, + + special: { + ready: { + setup: function() { + // Make sure the ready event is setup + bindReady(); + return; + }, + + teardown: function() { return; } + }, + + mouseenter: { + setup: function() { + if ( jQuery.browser.msie ) return false; + jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler); + return true; + }, + + teardown: function() { + if ( jQuery.browser.msie ) return false; + jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler); + return true; + }, + + handler: function(event) { + // If we actually just moused on to a sub-element, ignore it + if ( withinElement(event, this) ) return true; + // Execute the right handlers by setting the event type to mouseenter + event.type = "mouseenter"; + return jQuery.event.handle.apply(this, arguments); + } + }, + + mouseleave: { + setup: function() { + if ( jQuery.browser.msie ) return false; + jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler); + return true; + }, + + teardown: function() { + if ( jQuery.browser.msie ) return false; + jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler); + return true; + }, + + handler: function(event) { + // If we actually just moused on to a sub-element, ignore it + if ( withinElement(event, this) ) return true; + // Execute the right handlers by setting the event type to mouseleave + event.type = "mouseleave"; + return jQuery.event.handle.apply(this, arguments); + } + } + } +}; + +jQuery.fn.extend({ + bind: function( type, data, fn ) { + return type == "unload" ? this.one(type, data, fn) : this.each(function(){ + jQuery.event.add( this, type, fn || data, fn && data ); + }); + }, + + one: function( type, data, fn ) { + var one = jQuery.event.proxy( fn || data, function(event) { + jQuery(this).unbind(event, one); + return (fn || data).apply( this, arguments ); + }); + return this.each(function(){ + jQuery.event.add( this, type, one, fn && data); + }); + }, + + unbind: function( type, fn ) { + return this.each(function(){ + jQuery.event.remove( this, type, fn ); + }); + }, + + trigger: function( type, data, fn ) { + return this.each(function(){ + jQuery.event.trigger( type, data, this, true, fn ); + }); + }, + + triggerHandler: function( type, data, fn ) { + return this[0] && jQuery.event.trigger( type, data, this[0], false, fn ); + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, i = 1; + + // link all the functions, so any of them can unbind this click handler + while( i < args.length ) + jQuery.event.proxy( fn, args[i++] ); + + return this.click( jQuery.event.proxy( fn, function(event) { + // Figure out which function to execute + this.lastToggle = ( this.lastToggle || 0 ) % i; + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ this.lastToggle++ ].apply( this, arguments ) || false; + })); + }, + + hover: function(fnOver, fnOut) { + return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut); + }, + + ready: function(fn) { + // Attach the listeners + bindReady(); + + // If the DOM is already ready + if ( jQuery.isReady ) + // Execute the function immediately + fn.call( document, jQuery ); + + // Otherwise, remember the function for later + else + // Add the function to the wait list + jQuery.readyList.push( function() { return fn.call(this, jQuery); } ); + + return this; + } +}); + +jQuery.extend({ + isReady: false, + readyList: [], + // Handle when the DOM is ready + ready: function() { + // Make sure that the DOM is not already loaded + if ( !jQuery.isReady ) { + // Remember that the DOM is ready + jQuery.isReady = true; + + // If there are functions bound, to execute + if ( jQuery.readyList ) { + // Execute all of them + jQuery.each( jQuery.readyList, function(){ + this.apply( document ); + }); + + // Reset the list of functions + jQuery.readyList = null; + } + + // Trigger any bound ready events + jQuery(document).triggerHandler("ready"); + } + } +}); + +var readyBound = false; + +function bindReady(){ + if ( readyBound ) return; + readyBound = true; + + // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event + if ( document.addEventListener && !jQuery.browser.opera) + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); + + // If IE is used and is not in a frame + // Continually check to see if the document is ready + if ( jQuery.browser.msie && window == top ) (function(){ + if (jQuery.isReady) return; + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch( error ) { + setTimeout( arguments.callee, 0 ); + return; + } + // and execute any waiting functions + jQuery.ready(); + })(); + + if ( jQuery.browser.opera ) + document.addEventListener( "DOMContentLoaded", function () { + if (jQuery.isReady) return; + for (var i = 0; i < document.styleSheets.length; i++) + if (document.styleSheets[i].disabled) { + setTimeout( arguments.callee, 0 ); + return; + } + // and execute any waiting functions + jQuery.ready(); + }, false); + + if ( jQuery.browser.safari ) { + var numStyles; + (function(){ + if (jQuery.isReady) return; + if ( document.readyState != "loaded" && document.readyState != "complete" ) { + setTimeout( arguments.callee, 0 ); + return; + } + if ( numStyles === undefined ) + numStyles = jQuery("style, link[rel=stylesheet]").length; + if ( document.styleSheets.length != numStyles ) { + setTimeout( arguments.callee, 0 ); + return; + } + // and execute any waiting functions + jQuery.ready(); + })(); + } + + // A fallback to window.onload, that will always work + jQuery.event.add( window, "load", jQuery.ready ); +} + +jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + + "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + + "submit,keydown,keypress,keyup,error").split(","), function(i, name){ + + // Handle event binding + jQuery.fn[name] = function(fn){ + return fn ? this.bind(name, fn) : this.trigger(name); + }; +}); + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function(event, elem) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + // Traverse up the tree + while ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; } + // Return true if we actually just moused on to a sub-element + return parent == elem; +}; + +// Prevent memory leaks in IE +// And prevent errors on refresh with events like mouseover in other browsers +// Window isn't included so as not to unbind existing unload events +jQuery(window).bind("unload", function() { + jQuery("*").add(document).unbind(); +}); +jQuery.fn.extend({ + load: function( url, params, callback ) { + if ( jQuery.isFunction( url ) ) + return this.bind("load", url); + + var off = url.indexOf(" "); + if ( off >= 0 ) { + var selector = url.slice(off, url.length); + url = url.slice(0, off); + } + + callback = callback || function(){}; + + // Default to a GET request + var type = "GET"; + + // If the second parameter was provided + if ( params ) + // If it's a function + if ( jQuery.isFunction( params ) ) { + // We assume that it's the callback + callback = params; + params = null; + + // Otherwise, build a param string + } else { + params = jQuery.param( params ); + type = "POST"; + } + + var self = this; + + // Request the remote document + jQuery.ajax({ + url: url, + type: type, + dataType: "html", + data: params, + complete: function(res, status){ + // If successful, inject the HTML into all the matched elements + if ( status == "success" || status == "notmodified" ) + // See if a selector was specified + self.html( selector ? + // Create a dummy div to hold the results + jQuery("<div/>") + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) + + // Locate the specified elements + .find(selector) : + + // If not, just inject the full result + res.responseText ); + + self.each( callback, [res.responseText, status, res] ); + } + }); + return this; + }, + + serialize: function() { + return jQuery.param(this.serializeArray()); + }, + serializeArray: function() { + return this.map(function(){ + return jQuery.nodeName(this, "form") ? + jQuery.makeArray(this.elements) : this; + }) + .filter(function(){ + return this.name && !this.disabled && + (this.checked || /select|textarea/i.test(this.nodeName) || + /text|hidden|password/i.test(this.type)); + }) + .map(function(i, elem){ + var val = jQuery(this).val(); + return val == null ? null : + val.constructor == Array ? + jQuery.map( val, function(val, i){ + return {name: elem.name, value: val}; + }) : + {name: elem.name, value: val}; + }).get(); + } +}); + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ + jQuery.fn[o] = function(f){ + return this.bind(o, f); + }; +}); + +var jsc = now(); + +jQuery.extend({ + get: function( url, data, callback, type ) { + // shift arguments if data argument was ommited + if ( jQuery.isFunction( data ) ) { + callback = data; + data = null; + } + + return jQuery.ajax({ + type: "GET", + url: url, + data: data, + success: callback, + dataType: type + }); + }, + + getScript: function( url, callback ) { + return jQuery.get(url, null, callback, "script"); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get(url, data, callback, "json"); + }, + + post: function( url, data, callback, type ) { + if ( jQuery.isFunction( data ) ) { + callback = data; + data = {}; + } + + return jQuery.ajax({ + type: "POST", + url: url, + data: data, + success: callback, + dataType: type + }); + }, + + ajaxSetup: function( settings ) { + jQuery.extend( jQuery.ajaxSettings, settings ); + }, + + ajaxSettings: { + global: true, + type: "GET", + timeout: 0, + contentType: "application/x-www-form-urlencoded", + processData: true, + async: true, + data: null, + username: null, + password: null, + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + script: "text/javascript, application/javascript", + json: "application/json, text/javascript", + text: "text/plain", + _default: "*/*" + } + }, + + // Last-Modified header cache for next request + lastModified: {}, + + ajax: function( s ) { + var jsonp, jsre = /=\?(&|$)/g, status, data; + + // Extend the settings, but re-extend 's' so that it can be + // checked again later (in the test suite, specifically) + s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); + + // convert data if not already a string + if ( s.data && s.processData && typeof s.data != "string" ) + s.data = jQuery.param(s.data); + + // Handle JSONP Parameter Callbacks + if ( s.dataType == "jsonp" ) { + if ( s.type.toLowerCase() == "get" ) { + if ( !s.url.match(jsre) ) + s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; + } else if ( !s.data || !s.data.match(jsre) ) + s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; + s.dataType = "json"; + } + + // Build temporary JSONP function + if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { + jsonp = "jsonp" + jsc++; + + // Replace the =? sequence both in the query string and the data + if ( s.data ) + s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); + s.url = s.url.replace(jsre, "=" + jsonp + "$1"); + + // We need to make sure + // that a JSONP style response is executed properly + s.dataType = "script"; + + // Handle JSONP-style loading + window[ jsonp ] = function(tmp){ + data = tmp; + success(); + complete(); + // Garbage collect + window[ jsonp ] = undefined; + try{ delete window[ jsonp ]; } catch(e){} + if ( head ) + head.removeChild( script ); + }; + } + + if ( s.dataType == "script" && s.cache == null ) + s.cache = false; + + if ( s.cache === false && s.type.toLowerCase() == "get" ) { + var ts = now(); + // try replacing _= if it is there + var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); + // if nothing was replaced, add timestamp to the end + s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); + } + + // If data is available, append data to url for get requests + if ( s.data && s.type.toLowerCase() == "get" ) { + s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; + + // IE likes to send both get and post data, prevent this + s.data = null; + } + + // Watch for a new set of requests + if ( s.global && ! jQuery.active++ ) + jQuery.event.trigger( "ajaxStart" ); + + // If we're requesting a remote document + // and trying to load JSON or Script with a GET + if ( (!s.url.indexOf("http") || !s.url.indexOf("//")) && s.dataType == "script" && s.type.toLowerCase() == "get" ) { + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement("script"); + script.src = s.url; + if (s.scriptCharset) + script.charset = s.scriptCharset; + + // Handle Script loading + if ( !jsonp ) { + var done = false; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function(){ + if ( !done && (!this.readyState || + this.readyState == "loaded" || this.readyState == "complete") ) { + done = true; + success(); + complete(); + head.removeChild( script ); + } + }; + } + + head.appendChild(script); + + // We handle everything using the script element injection + return undefined; + } + + var requestDone = false; + + // Create the request object; Microsoft failed to properly + // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available + var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); + + // Open the socket + xml.open(s.type, s.url, s.async, s.username, s.password); + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + // Set the correct header, if data is being sent + if ( s.data ) + xml.setRequestHeader("Content-Type", s.contentType); + + // Set the If-Modified-Since header, if ifModified mode. + if ( s.ifModified ) + xml.setRequestHeader("If-Modified-Since", + jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); + + // Set header so the called script knows that it's an XMLHttpRequest + xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + + // Set the Accepts header for the server, depending on the dataType + xml.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? + s.accepts[ s.dataType ] + ", */*" : + s.accepts._default ); + } catch(e){} + + // Allow custom headers/mimetypes + if ( s.beforeSend && s.beforeSend(xml, s) === false ) { + // cleanup active request counter + s.global && jQuery.active--; + // close opended socket + xml.abort(); + return false; + } + + if ( s.global ) + jQuery.event.trigger("ajaxSend", [xml, s]); + + // Wait for a response to come back + var onreadystatechange = function(isTimeout){ + // The transfer is complete and the data is available, or the request timed out + if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) { + requestDone = true; + + // clear poll interval + if (ival) { + clearInterval(ival); + ival = null; + } + + status = isTimeout == "timeout" && "timeout" || + !jQuery.httpSuccess( xml ) && "error" || + s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" || + "success"; + + if ( status == "success" ) { + // Watch for, and catch, XML document parse errors + try { + // process the data (runs the xml through httpData regardless of callback) + data = jQuery.httpData( xml, s.dataType ); + } catch(e) { + status = "parsererror"; + } + } + + // Make sure that the request was successful or notmodified + if ( status == "success" ) { + // Cache Last-Modified header, if ifModified mode. + var modRes; + try { + modRes = xml.getResponseHeader("Last-Modified"); + } catch(e) {} // swallow exception thrown by FF if header is not available + + if ( s.ifModified && modRes ) + jQuery.lastModified[s.url] = modRes; + + // JSONP handles its own success callback + if ( !jsonp ) + success(); + } else + jQuery.handleError(s, xml, status); + + // Fire the complete handlers + complete(); + + // Stop memory leaks + if ( s.async ) + xml = null; + } + }; + + if ( s.async ) { + // don't attach the handler to the request, just poll it instead + var ival = setInterval(onreadystatechange, 13); + + // Timeout checker + if ( s.timeout > 0 ) + setTimeout(function(){ + // Check to see if the request is still happening + if ( xml ) { + // Cancel the request + xml.abort(); + + if( !requestDone ) + onreadystatechange( "timeout" ); + } + }, s.timeout); + } + + // Send the data + try { + xml.send(s.data); + } catch(e) { + jQuery.handleError(s, xml, null, e); + } + + // firefox 1.5 doesn't fire statechange for sync requests + if ( !s.async ) + onreadystatechange(); + + function success(){ + // If a local callback was specified, fire it and pass it the data + if ( s.success ) + s.success( data, status ); + + // Fire the global callback + if ( s.global ) + jQuery.event.trigger( "ajaxSuccess", [xml, s] ); + } + + function complete(){ + // Process result + if ( s.complete ) + s.complete(xml, status); + + // The request was completed + if ( s.global ) + jQuery.event.trigger( "ajaxComplete", [xml, s] ); + + // Handle the global AJAX counter + if ( s.global && ! --jQuery.active ) + jQuery.event.trigger( "ajaxStop" ); + } + + // return XMLHttpRequest to allow aborting the request etc. + return xml; + }, + + handleError: function( s, xml, status, e ) { + // If a local callback was specified, fire it + if ( s.error ) s.error( xml, status, e ); + + // Fire the global callback + if ( s.global ) + jQuery.event.trigger( "ajaxError", [xml, s, e] ); + }, + + // Counter for holding the number of active queries + active: 0, + + // Determines if an XMLHttpRequest was successful or not + httpSuccess: function( r ) { + try { + // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 + return !r.status && location.protocol == "file:" || + ( r.status >= 200 && r.status < 300 ) || r.status == 304 || r.status == 1223 || + jQuery.browser.safari && r.status == undefined; + } catch(e){} + return false; + }, + + // Determines if an XMLHttpRequest returns NotModified + httpNotModified: function( xml, url ) { + try { + var xmlRes = xml.getResponseHeader("Last-Modified"); + + // Firefox always returns 200. check Last-Modified date + return xml.status == 304 || xmlRes == jQuery.lastModified[url] || + jQuery.browser.safari && xml.status == undefined; + } catch(e){} + return false; + }, + + httpData: function( r, type ) { + var ct = r.getResponseHeader("content-type"), + xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0, + data = xml ? r.responseXML : r.responseText; + + if ( xml && data.documentElement.tagName == "parsererror" ) + throw "parsererror"; + + // If the type is "script", eval it in global context + if ( type == "script" ) + jQuery.globalEval( data ); + + // Get the JavaScript object, if JSON is used. + if ( type == "json" ) + data = eval("(" + data + ")"); + + return data; + }, + + // Serialize an array of form elements or a set of + // key/values into a query string + param: function( a ) { + var s = []; + + // If an array was passed in, assume that it is an array + // of form elements + if ( a.constructor == Array || a.jquery ) + // Serialize the form elements + jQuery.each( a, function(){ + s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) ); + }); + + // Otherwise, assume that it's an object of key/value pairs + else + // Serialize the key/values + for ( var j in a ) + // If the value is an array then the key names need to be repeated + if ( a[j] && a[j].constructor == Array ) + jQuery.each( a[j], function(){ + s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); + }); + else + s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) ); + + // Return the resulting serialization + return s.join("&").replace(/%20/g, "+"); + } + +}); +jQuery.fn.extend({ + show: function(speed,callback){ + return speed ? + this.animate({ + height: "show", width: "show", opacity: "show" + }, speed, callback) : + + this.filter(":hidden").each(function(){ + this.style.display = this.oldblock || ""; + if ( jQuery.css(this,"display") == "none" ) { + var elem = jQuery("<" + this.tagName + " />").appendTo("body"); + this.style.display = elem.css("display"); + // handle an edge condition where css is - div { display:none; } or similar + if (this.style.display == "none") + this.style.display = "block"; + elem.remove(); + } + }).end(); + }, + + hide: function(speed,callback){ + return speed ? + this.animate({ + height: "hide", width: "hide", opacity: "hide" + }, speed, callback) : + + this.filter(":visible").each(function(){ + this.oldblock = this.oldblock || jQuery.css(this,"display"); + this.style.display = "none"; + }).end(); + }, + + // Save the old toggle function + _toggle: jQuery.fn.toggle, + + toggle: function( fn, fn2 ){ + return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? + this._toggle.apply( this, arguments ) : + fn ? + this.animate({ + height: "toggle", width: "toggle", opacity: "toggle" + }, fn, fn2) : + this.each(function(){ + jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); + }); + }, + + slideDown: function(speed,callback){ + return this.animate({height: "show"}, speed, callback); + }, + + slideUp: function(speed,callback){ + return this.animate({height: "hide"}, speed, callback); + }, + + slideToggle: function(speed, callback){ + return this.animate({height: "toggle"}, speed, callback); + }, + + fadeIn: function(speed, callback){ + return this.animate({opacity: "show"}, speed, callback); + }, + + fadeOut: function(speed, callback){ + return this.animate({opacity: "hide"}, speed, callback); + }, + + fadeTo: function(speed,to,callback){ + return this.animate({opacity: to}, speed, callback); + }, + + animate: function( prop, speed, easing, callback ) { + var optall = jQuery.speed(speed, easing, callback); + + return this[ optall.queue === false ? "each" : "queue" ](function(){ + if ( this.nodeType != 1) + return false; + + var opt = jQuery.extend({}, optall), p, + hidden = jQuery(this).is(":hidden"), self = this; + + for ( p in prop ) { + if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) + return jQuery.isFunction(opt.complete) && opt.complete.apply(this); + + if ( p == "height" || p == "width" ) { + // Store display property + opt.display = jQuery.css(this, "display"); + + // Make sure that nothing sneaks out + opt.overflow = this.style.overflow; + } + } + + if ( opt.overflow != null ) + this.style.overflow = "hidden"; + + opt.curAnim = jQuery.extend({}, prop); + + jQuery.each( prop, function(name, val){ + var e = new jQuery.fx( self, opt, name ); + + if ( /toggle|show|hide/.test(val) ) + e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); + else { + var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), + start = e.cur(true) || 0; + + if ( parts ) { + var end = parseFloat(parts[2]), + unit = parts[3] || "px"; + + // We need to compute starting value + if ( unit != "px" ) { + self.style[ name ] = (end || 1) + unit; + start = ((end || 1) / e.cur(true)) * start; + self.style[ name ] = start + unit; + } + + // If a +=/-= token was provided, we're doing a relative animation + if ( parts[1] ) + end = ((parts[1] == "-=" ? -1 : 1) * end) + start; + + e.custom( start, end, unit ); + } else + e.custom( start, val, "" ); + } + }); + + // For JS strict compliance + return true; + }); + }, + + queue: function(type, fn){ + if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) { + fn = type; + type = "fx"; + } + + if ( !type || (typeof type == "string" && !fn) ) + return queue( this[0], type ); + + return this.each(function(){ + if ( fn.constructor == Array ) + queue(this, type, fn); + else { + queue(this, type).push( fn ); + + if ( queue(this, type).length == 1 ) + fn.apply(this); + } + }); + }, + + stop: function(clearQueue, gotoEnd){ + var timers = jQuery.timers; + + if (clearQueue) + this.queue([]); + + this.each(function(){ + // go in reverse order so anything added to the queue during the loop is ignored + for ( var i = timers.length - 1; i >= 0; i-- ) + if ( timers[i].elem == this ) { + if (gotoEnd) + // force the next step to be the last + timers[i](true); + timers.splice(i, 1); + } + }); + + // start the next in the queue if the last step wasn't forced + if (!gotoEnd) + this.dequeue(); + + return this; + } + +}); + +var queue = function( elem, type, array ) { + if ( elem ){ + + type = type || "fx"; + + var q = jQuery.data( elem, type + "queue" ); + + if ( !q || array ) + q = jQuery.data( elem, type + "queue", jQuery.makeArray(array) ); + + } + return q; +}; + +jQuery.fn.dequeue = function(type){ + type = type || "fx"; + + return this.each(function(){ + var q = queue(this, type); + + q.shift(); + + if ( q.length ) + q[0].apply( this ); + }); +}; + +jQuery.extend({ + + speed: function(speed, easing, fn) { + var opt = speed && speed.constructor == Object ? speed : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && easing.constructor != Function && easing + }; + + opt.duration = (opt.duration && opt.duration.constructor == Number ? + opt.duration : + jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds.def; + + // Queueing + opt.old = opt.complete; + opt.complete = function(){ + if ( opt.queue !== false ) + jQuery(this).dequeue(); + if ( jQuery.isFunction( opt.old ) ) + opt.old.apply( this ); + }; + + return opt; + }, + + easing: { + linear: function( p, n, firstNum, diff ) { + return firstNum + diff * p; + }, + swing: function( p, n, firstNum, diff ) { + return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; + } + }, + + timers: [], + timerId: null, + + fx: function( elem, options, prop ){ + this.options = options; + this.elem = elem; + this.prop = prop; + + if ( !options.orig ) + options.orig = {}; + } + +}); + +jQuery.fx.prototype = { + + // Simple function for setting a style value + update: function(){ + if ( this.options.step ) + this.options.step.apply( this.elem, [ this.now, this ] ); + + (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); + + // Set display property to block for height/width animations + if ( this.prop == "height" || this.prop == "width" ) + this.elem.style.display = "block"; + }, + + // Get the current size + cur: function(force){ + if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null ) + return this.elem[ this.prop ]; + + var r = parseFloat(jQuery.css(this.elem, this.prop, force)); + return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; + }, + + // Start an animation from one number to another + custom: function(from, to, unit){ + this.startTime = now(); + this.start = from; + this.end = to; + this.unit = unit || this.unit || "px"; + this.now = this.start; + this.pos = this.state = 0; + this.update(); + + var self = this; + function t(gotoEnd){ + return self.step(gotoEnd); + } + + t.elem = this.elem; + + jQuery.timers.push(t); + + if ( jQuery.timerId == null ) { + jQuery.timerId = setInterval(function(){ + var timers = jQuery.timers; + + for ( var i = 0; i < timers.length; i++ ) + if ( !timers[i]() ) + timers.splice(i--, 1); + + if ( !timers.length ) { + clearInterval( jQuery.timerId ); + jQuery.timerId = null; + } + }, 13); + } + }, + + // Simple 'show' function + show: function(){ + // Remember where we started, so that we can go back to it later + this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); + this.options.show = true; + + // Begin the animation + this.custom(0, this.cur()); + + // Make sure that we start at a small width/height to avoid any + // flash of content + if ( this.prop == "width" || this.prop == "height" ) + this.elem.style[this.prop] = "1px"; + + // Start by showing the element + jQuery(this.elem).show(); + }, + + // Simple 'hide' function + hide: function(){ + // Remember where we started, so that we can go back to it later + this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); + this.options.hide = true; + + // Begin the animation + this.custom(this.cur(), 0); + }, + + // Each step of an animation + step: function(gotoEnd){ + var t = now(); + + if ( gotoEnd || t > this.options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + this.options.curAnim[ this.prop ] = true; + + var done = true; + for ( var i in this.options.curAnim ) + if ( this.options.curAnim[i] !== true ) + done = false; + + if ( done ) { + if ( this.options.display != null ) { + // Reset the overflow + this.elem.style.overflow = this.options.overflow; + + // Reset the display + this.elem.style.display = this.options.display; + if ( jQuery.css(this.elem, "display") == "none" ) + this.elem.style.display = "block"; + } + + // Hide the element if the "hide" operation was done + if ( this.options.hide ) + this.elem.style.display = "none"; + + // Reset the properties, if the item has been hidden or shown + if ( this.options.hide || this.options.show ) + for ( var p in this.options.curAnim ) + jQuery.attr(this.elem.style, p, this.options.orig[p]); + } + + // If a callback was provided, execute it + if ( done && jQuery.isFunction( this.options.complete ) ) + // Execute the complete function + this.options.complete.apply( this.elem ); + + return false; + } else { + var n = t - this.startTime; + this.state = n / this.options.duration; + + // Perform the easing function, defaults to swing + this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); + this.now = this.start + ((this.end - this.start) * this.pos); + + // Perform the next step of the animation + this.update(); + } + + return true; + } + +}; + +jQuery.extend( jQuery.fx, { + speeds:{ + slow: 600, + fast: 200, + def: 400 //default speed + }, + step: { + scrollLeft: function(fx){ + fx.elem.scrollLeft = fx.now; + }, + + scrollTop: function(fx){ + fx.elem.scrollTop = fx.now; + }, + + opacity: function(fx){ + jQuery.attr(fx.elem.style, "opacity", fx.now); + }, + + _default: function(fx){ + fx.elem.style[ fx.prop ] = fx.now + fx.unit; + } + } +}); +// The Offset Method +// Originally By Brandon Aaron, part of the Dimension Plugin +// http://jquery.com/plugins/project/dimensions +jQuery.fn.offset = function() { + var left = 0, top = 0, elem = this[0], results; + + if ( elem ) with ( jQuery.browser ) { + var parent = elem.parentNode, + offsetChild = elem, + offsetParent = elem.offsetParent, + doc = elem.ownerDocument, + safari2 = safari && parseInt(version) < 522 && !/adobeair/i.test(userAgent), + css = jQuery.curCSS, + fixed = css(elem, "position") == "fixed"; + + // Use getBoundingClientRect if available + if ( elem.getBoundingClientRect ) { + var box = elem.getBoundingClientRect(); + + // Add the document scroll offsets + add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), + box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)); + + // IE adds the HTML element's border, by default it is medium which is 2px + // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; } + // IE 7 standards mode, the border is always 2px + // This border/offset is typically represented by the clientLeft and clientTop properties + // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS + // Therefore this method will be off by 2px in IE while in quirksmode + add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop ); + + // Otherwise loop through the offsetParents and parentNodes + } else { + + // Initial element offsets + add( elem.offsetLeft, elem.offsetTop ); + + // Get parent offsets + while ( offsetParent ) { + // Add offsetParent offsets + add( offsetParent.offsetLeft, offsetParent.offsetTop ); + + // Mozilla and Safari > 2 does not include the border on offset parents + // However Mozilla adds the border for table or table cells + if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 ) + border( offsetParent ); + + // Add the document scroll offsets if position is fixed on any offsetParent + if ( !fixed && css(offsetParent, "position") == "fixed" ) + fixed = true; + + // Set offsetChild to previous offsetParent unless it is the body element + offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent; + // Get next offsetParent + offsetParent = offsetParent.offsetParent; + } + + // Get parent scroll offsets + while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) { + // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug + if ( !/^inline|table.*$/i.test(css(parent, "display")) ) + // Subtract parent scroll offsets + add( -parent.scrollLeft, -parent.scrollTop ); + + // Mozilla does not add the border for a parent that has overflow != visible + if ( mozilla && css(parent, "overflow") != "visible" ) + border( parent ); + + // Get next parent + parent = parent.parentNode; + } + + // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild + // Mozilla doubles body offsets with a non-absolutely positioned offsetChild + if ( (safari2 && (fixed || css(offsetChild, "position") == "absolute")) || + (mozilla && css(offsetChild, "position") != "absolute") ) + add( -doc.body.offsetLeft, -doc.body.offsetTop ); + + // Add the document scroll offsets if position is fixed + if ( fixed ) + add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)); + } + + // Return an object with top and left properties + results = { top: top, left: left }; + } + + function border(elem) { + add( jQuery.curCSS(elem, "borderLeftWidth", true), jQuery.curCSS(elem, "borderTopWidth", true) ); + } + + function add(l, t) { + left += parseInt(l) || 0; + top += parseInt(t) || 0; + } + + return results; +}; + + +jQuery.fn.extend({ + position: function() { + var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results; + + if (elem) { + // Get *real* offsetParent + offsetParent = this.offsetParent(); + + // Get correct offsets + offset = this.offset(); + parentOffset = offsetParent.offset(); + + // Subtract element margins + offset.top -= parseInt( jQuery.curCSS(elem, 'marginTop', true) ) || 0; + offset.left -= parseInt( jQuery.curCSS(elem, 'marginLeft', true) ) || 0; + + // Add offsetParent borders + parentOffset.top += parseInt( jQuery.curCSS(offsetParent[0], 'borderTopWidth', true) ) || 0; + parentOffset.left += parseInt( jQuery.curCSS(offsetParent[0], 'borderLeftWidth', true) ) || 0; + + // Subtract the two offsets + results = { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + } + + return results; + }, + + offsetParent: function() { + var offsetParent = this[0].offsetParent; + while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') ) + offsetParent = offsetParent.offsetParent; + return jQuery(offsetParent); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( ['Left', 'Top'], function(i, name) { + jQuery.fn[ 'scroll' + name ] = function(val) { + if (!this[0]) return; + + return val != undefined ? + + // Set the scroll offset + this.each(function() { + this == window || this == document ? + window.scrollTo( + name == 'Left' ? val : jQuery(window)[ 'scrollLeft' ](), + name == 'Top' ? val : jQuery(window)[ 'scrollTop' ]() + ) : + this[ 'scroll' + name ] = val; + }) : + + // Return the scroll offset + this[0] == window || this[0] == document ? + self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] || + jQuery.boxModel && document.documentElement[ 'scroll' + name ] || + document.body[ 'scroll' + name ] : + this[0][ 'scroll' + name ]; + }; +}); +// Create innerHeight, innerWidth, outerHeight and outerWidth methods +jQuery.each([ "Height", "Width" ], function(i, name){ + + var tl = name == "Height" ? "Top" : "Left", // top or left + br = name == "Height" ? "Bottom" : "Right"; // bottom or right + + // innerHeight and innerWidth + jQuery.fn["inner" + name] = function(){ + return this[ name.toLowerCase() ]() + + num(this, "padding" + tl) + + num(this, "padding" + br); + }; + + // outerHeight and outerWidth + jQuery.fn["outer" + name] = function(margin) { + return this["inner" + name]() + + num(this, "border" + tl + "Width") + + num(this, "border" + br + "Width") + + (!!margin ? + num(this, "margin" + tl) + num(this, "margin" + br) : 0); + }; + +}); + +function num(elem, prop) { + elem = elem.jquery ? elem[0] : elem; + return elem && parseInt( jQuery.curCSS(elem, prop, true), 10 ) || 0; +} +})(); diff --git a/wui/src/public/javascripts/ui.core.js b/wui/src/public/javascripts/ui.core.js new file mode 100755 index 0000000..36c7e86 --- /dev/null +++ b/wui/src/public/javascripts/ui.core.js @@ -0,0 +1,237 @@ +/* + * jQuery UI @VERSION + * + * Copyright (c) 2008 Paul Bakaus (ui.jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + * + * $Date: 2008-05-04 16:52:15 +0200 (So, 04 Mai 2008) $ + * $Rev: 5419 $ + */ +;(function($) { + + $.ui = { + plugin: { + add: function(module, option, set) { + var proto = $.ui[module].prototype; + for(var i in set) { + proto.plugins[i] = proto.plugins[i] || []; + proto.plugins[i].push([option, set[i]]); + } + }, + call: function(instance, name, args) { + var set = instance.plugins[name]; + if(!set) { return; } + + for (var i = 0; i < set.length; i++) { + if (instance.options[set[i][0]]) { + set[i][1].apply(instance.element, args); + } + } + } + }, + cssCache: {}, + css: function(name) { + if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; } + var tmp = $('<div class="ui-resizable-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body'); + + //if (!$.browser.safari) + //tmp.appendTo('body'); + + //Opera and Safari set width and height to 0px instead of auto + //Safari returns rgba(0,0,0,0) when bgcolor is not set + $.ui.cssCache[name] = !!( + (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || + !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))) + ); + try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){} + return $.ui.cssCache[name]; + }, + disableSelection: function(e) { + e.unselectable = "on"; + e.onselectstart = function() { return false; }; + if (e.style) { e.style.MozUserSelect = "none"; } + }, + enableSelection: function(e) { + e.unselectable = "off"; + e.onselectstart = function() { return true; }; + if (e.style) { e.style.MozUserSelect = ""; } + }, + hasScroll: function(e, a) { + var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false; + if (e[scroll] > 0) return true; e[scroll] = 1; + has = e[scroll] > 0 ? true : false; e[scroll] = 0; + return has; + } + }; + + + /** jQuery core modifications and additions **/ + + var _remove = $.fn.remove; + $.fn.remove = function() { + $("*", this).add(this).trigger("remove"); + return _remove.apply(this, arguments ); + }; + + // $.widget is a factory to create jQuery plugins + // taking some boilerplate code out of the plugin code + // created by Scott Gonz?lez and J?rn Zaefferer + function getter(namespace, plugin, method) { + var methods = $[namespace][plugin].getter || []; + methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods); + return ($.inArray(method, methods) != -1); + }; + + var widgetPrototype = { + init: function() {}, + destroy: function() {}, + + getData: function(e, key) { + return this.options[key]; + }, + setData: function(e, key, value) { + this.options[key] = value; + }, + + enable: function() { + this.setData(null, 'disabled', false); + }, + disable: function() { + this.setData(null, 'disabled', true); + } + }; + + $.widget = function(name, prototype) { + var namespace = name.split(".")[0]; + name = name.split(".")[1]; + // create plugin method + $.fn[name] = function(options, data) { + var isMethodCall = (typeof options == 'string'), + args = arguments; + + if (isMethodCall && getter(namespace, name, options)) { + var instance = $.data(this[0], name); + return (instance ? instance[options](data) : undefined); + } + + return this.each(function() { + var instance = $.data(this, name); + if (!instance) { + $.data(this, name, new $[namespace][name](this, options)); + } else if (isMethodCall) { + instance[options].apply(instance, $.makeArray(args).slice(1)); + } + }); + }; + + // create widget constructor + $[namespace][name] = function(element, options) { + var self = this; + + this.options = $.extend({}, $[namespace][name].defaults, options); + this.element = $(element) + .bind('setData.' + name, function(e, key, value) { + return self.setData(e, key, value); + }) + .bind('getData.' + name, function(e, key) { + return self.getData(e, key); + }) + .bind('remove', function() { + return self.destroy(); + }); + this.init(); + }; + + // add widget prototype + $[namespace][name].prototype = $.extend({}, widgetPrototype, prototype); + }; + + + /** Mouse Interaction Plugin **/ + + $.widget("ui.mouse", { + init: function() { + var self = this; + + this.element + .bind('mousedown.mouse', function() { return self.click.apply(self, arguments); }) + .bind('mouseup.mouse', function() { (self.timer && clearInterval(self.timer)); }) + .bind('click.mouse', function() { if(self.initialized) { self.initialized = false; return false; } }); + //Prevent text selection in IE + if ($.browser.msie) { + this.unselectable = this.element.attr('unselectable'); + this.element.attr('unselectable', 'on'); + } + }, + destroy: function() { + this.element.unbind('.mouse').removeData("mouse"); + ($.browser.msie && this.element.attr('unselectable', this.unselectable)); + }, + trigger: function() { return this.click.apply(this, arguments); }, + click: function(e) { + + if( e.which != 1 //only left click starts dragging + || $.inArray(e.target.nodeName.toLowerCase(), this.options.dragPrevention || []) != -1 // Prevent execution on defined elements + || (this.options.condition && !this.options.condition.apply(this.options.executor || this, [e, this.element])) //Prevent execution on condition + ) { return true; } + + var self = this; + this.initialized = false; + var initialize = function() { + self._MP = { left: e.pageX, top: e.pageY }; // Store the click mouse position + $(document).bind('mouseup.mouse', function() { return self.stop.apply(self, arguments); }); + $(document).bind('mousemove.mouse', function() { return self.drag.apply(self, arguments); }); + + if(!self.initalized && Math.abs(self._MP.left-e.pageX) >= self.options.distance || Math.abs(self._MP.top-e.pageY) >= self.options.distance) { + (self.options.start && self.options.start.call(self.options.executor || self, e, self.element)); + (self.options.drag && self.options.drag.call(self.options.executor || self, e, this.element)); //This is actually not correct, but expected + self.initialized = true; + } + }; + + if(this.options.delay) { + if(this.timer) { clearInterval(this.timer); } + this.timer = setTimeout(initialize, this.options.delay); + } else { + initialize(); + } + + return false; + + }, + stop: function(e) { + + if(!this.initialized) { + return $(document).unbind('mouseup.mouse').unbind('mousemove.mouse'); + } + + (this.options.stop && this.options.stop.call(this.options.executor || this, e, this.element)); + + $(document).unbind('mouseup.mouse').unbind('mousemove.mouse'); + return false; + + }, + drag: function(e) { + + var o = this.options; + if ($.browser.msie && !e.button) { + return this.stop.call(this, e); // IE mouseup check + } + + if(!this.initialized && (Math.abs(this._MP.left-e.pageX) >= o.distance || Math.abs(this._MP.top-e.pageY) >= o.distance)) { + (o.start && o.start.call(o.executor || this, e, this.element)); + this.initialized = true; + } else { + if(!this.initialized) { return false; } + } + + (o.drag && o.drag.call(this.options.executor || this, e, this.element)); + return false; + + } + }); + +})(jQuery); diff --git a/wui/src/public/javascripts/ui.slider.js b/wui/src/public/javascripts/ui.slider.js new file mode 100755 index 0000000..bacf1c2 --- /dev/null +++ b/wui/src/public/javascripts/ui.slider.js @@ -0,0 +1,386 @@ +/* + * jQuery UI Slider + * + * Copyright (c) 2008 Paul Bakaus + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Slider + * + * Depends: + * ui.core.js + * + * Revision: $Id: ui.slider.js 5452 2008-05-05 16:42:08Z rdworth $ + */ +;(function($) { + + $.widget("ui.slider", { + init: function() { + var self = this; + this.element.addClass("ui-slider"); + this.initBoundaries(); + + // Initialize mouse and key events for interaction + this.handle = $(this.options.handle, this.element); + if (!this.handle.length) { + self.handle = self.generated = $(self.options.handles || [0]).map(function() { + var handle = $("<div/>").addClass("ui-slider-handle").appendTo(self.element); + if (this.id) + handle.attr("id", this.id); + return handle[0]; + }); + } + $(this.handle) + .mouse({ + executor: this, + delay: this.options.delay, + distance: this.options.distance, + dragPrevention: this.options.prevention ? this.options.prevention.toLowerCase().split(',') : ['input','textarea','button','select','option'], + start: this.start, + stop: this.stop, + drag: this.drag, + condition: function(e, handle) { + if(!this.disabled) { + if(this.currentHandle) this.blur(this.currentHandle); + this.focus(handle,1); + return !this.disabled; + } + } + }) + .wrap('<a href="javascript:void(0)" style="cursor:default;"></a>') + .parent() + .bind('focus', function(e) { self.focus(this.firstChild); }) + .bind('blur', function(e) { self.blur(this.firstChild); }) + .bind('keydown', function(e) { + if(/(37|38|39|40)/.test(e.keyCode)) { + self.moveTo({ + x: /(37|39)/.test(e.keyCode) ? (e.keyCode == 37 ? '-' : '+') + '=' + self.oneStep(1) : null, + y: /(38|40)/.test(e.keyCode) ? (e.keyCode == 38 ? '-' : '+') + '=' + self.oneStep(2) : null + }, this.firstChild); + } + }) + ; + + // Prepare dynamic properties for later use + this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() }; + + // Bind the click to the slider itself + this.element.bind('mousedown.slider', function(e) { + self.click.apply(self, [e]); + self.currentHandle.data("mouse").trigger(e); + self.firstValue = self.firstValue + 1; //This is for always triggering the change event + }); + + // Move the first handle to the startValue + $.each(this.options.handles || [], function(index, handle) { + self.moveTo(handle.start, index, true); + }); + if (!isNaN(this.options.startValue)) + this.moveTo(this.options.startValue, 0, true); + + this.previousHandle = $(this.handle[0]); //set the previous handle to the first to allow clicking before selecting the handle + if(this.handle.length == 2 && this.options.range) this.createRange(); + }, + + setData: function(event, key, value) { + this.options[key] = value; + if (/min|max|steps/.test(key)) { + this.initBoundaries(); + } + }, + + initBoundaries: function() { + var element = this.element[0]; + var o = this.options; + $.extend(o, { + axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'), + max: !isNaN(parseInt(o.max,10)) ? { x: parseInt(o.max, 10), y: parseInt(o.max, 10) } : ({ x: o.max && o.max.x || 100, y: o.max && o.max.y || 100 }), + min: !isNaN(parseInt(o.min,10)) ? { x: parseInt(o.min, 10), y: parseInt(o.min, 10) } : ({ x: o.min && o.min.x || 0, y: o.min && o.min.y || 0 }) + }); + //Prepare the real maxValue + o.realMax = { + x: o.max.x - o.min.x, + y: o.max.y - o.min.y + }; + //Calculate stepping based on steps + o.stepping = { + x: o.stepping && o.stepping.x || parseInt(o.stepping, 10) || (o.steps ? o.realMax.x/(o.steps.x || parseInt(o.steps, 10) || o.realMax.x) : 0), + y: o.stepping && o.stepping.y || parseInt(o.stepping, 10) || (o.steps ? o.realMax.y/(o.steps.y || parseInt(o.steps, 10) || o.realMax.y) : 0) + }; + }, + plugins: {}, + createRange: function() { + this.rangeElement = $('<div></div>') + .addClass('ui-slider-range') + .css({ position: 'absolute' }) + .appendTo(this.element); + this.updateRange(); + }, + updateRange: function() { + var prop = this.options.axis == "vertical" ? "top" : "left"; + var size = this.options.axis == "vertical" ? "height" : "width"; + this.rangeElement.css(prop, parseInt($(this.handle[0]).css(prop),10) + this.handleSize(0, this.options.axis == "vertical" ? 2 : 1)/2); + this.rangeElement.css(size, parseInt($(this.handle[1]).css(prop),10) - parseInt($(this.handle[0]).css(prop),10)); + }, + getRange: function() { + return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"),10)) : null; + }, + ui: function(e) { + return { + instance: this, + options: this.options, + handle: this.currentHandle, + value: this.options.axis != "both" || !this.options.axis ? Math.round(this.value(null,this.options.axis == "vertical" ? 2 : 1)) : { + x: Math.round(this.value(null,1)), + y: Math.round(this.value(null,2)) + }, + range: this.getRange() + }; + }, + propagate: function(n,e) { + $.ui.plugin.call(this, n, [e, this.ui()]); + this.element.triggerHandler(n == "slide" ? n : "slide"+n, [e, this.ui()], this.options[n]); + }, + destroy: function() { + this.element + .removeClass("ui-slider ui-slider-disabled") + .removeData("slider") + .unbind(".slider"); + this.handle.mouse("destroy"); + this.generated && this.generated.remove(); + }, + enable: function() { + this.element.removeClass("ui-slider-disabled"); + this.disabled = false; + }, + disable: function() { + this.element.addClass("ui-slider-disabled"); + this.disabled = true; + }, + focus: function(handle,hard) { + this.currentHandle = $(handle).addClass('ui-slider-handle-active'); + if (hard) + this.currentHandle.parent()[0].focus(); + }, + blur: function(handle) { + $(handle).removeClass('ui-slider-handle-active'); + if(this.currentHandle && this.currentHandle[0] == handle) { this.previousHandle = this.currentHandle; this.currentHandle = null; }; + }, + value: function(handle, axis) { + if(this.handle.length == 1) this.currentHandle = this.handle; + if(!axis) axis = this.options.axis == "vertical" ? 2 : 1; + + var value = ((parseInt($(handle != undefined && handle !== null ? this.handle[handle] || handle : this.currentHandle).css(axis == 1 ? "left" : "top"),10) / (this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(handle,axis))) * this.options.realMax[axis == 1 ? "x" : "y"]) + this.options.min[axis == 1 ? "x" : "y"]; + + var o = this.options; + if (o.stepping[axis == 1 ? "x" : "y"]) { + value = Math.round(value / o.stepping[axis == 1 ? "x" : "y"]) * o.stepping[axis == 1 ? "x" : "y"]; + } + return value; + }, + convertValue: function(value,axis) { + if(!axis) axis = this.options.axis == "vertical" ? 2 : 1; + return this.options.min[axis == 1 ? "x" : "y"] + (value / (this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null,axis))) * this.options.realMax[axis == 1 ? "x" : "y"]; + }, + translateValue: function(value,axis) { + if(!axis) axis = this.options.axis == "vertical" ? 2 : 1; + return ((value - this.options.min[axis == 1 ? "x" : "y"]) / this.options.realMax[axis == 1 ? "x" : "y"]) * (this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null,axis)); + }, + handleSize: function(handle,axis) { + if(!axis) axis = this.options.axis == "vertical" ? 2 : 1; + return $(handle != undefined && handle !== null ? this.handle[handle] : this.currentHandle)[0][axis == 1 ? "offsetWidth" : "offsetHeight"]; + }, + click: function(e) { + // This method is only used if: + // - The user didn't click a handle + // - The Slider is not disabled + // - There is a current, or previous selected handle (otherwise we wouldn't know which one to move) + + var pointer = [e.pageX,e.pageY]; + + var clickedHandle = false; + this.handle.each(function() { + if(this == e.target) + clickedHandle = true; + }); + if (clickedHandle || this.disabled || !(this.currentHandle || this.previousHandle)) + return; + + // If a previous handle was focussed, focus it again + if (!this.currentHandle && this.previousHandle) + this.focus(this.previousHandle, true); + + // Move focussed handle to the clicked position + this.offset = this.element.offset(); + + // propagate only for distance > 0, otherwise propagation is done my drag + this.moveTo({ + y: this.convertValue(e.pageY - this.offset.top - this.currentHandle.outerHeight()/2), + x: this.convertValue(e.pageX - this.offset.left - this.currentHandle.outerWidth()/2) + }, null, !this.options.distance); + }, + start: function(e, handle) { + + var o = this.options; + + // This is a especially ugly fix for strange blur events happening on mousemove events + if (!this.currentHandle) + this.focus(this.previousHandle, true); + + this.offset = this.element.offset(); + this.handleOffset = this.currentHandle.offset(); + this.clickOffset = { top: e.pageY - this.handleOffset.top, left: e.pageX - this.handleOffset.left }; + this.firstValue = this.value(); + + this.propagate('start', e); + return false; + + }, + stop: function(e) { + this.propagate('stop', e); + if (this.firstValue != this.value()) + this.propagate('change', e); + this.focus(this.currentHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events + return false; + }, + + oneStep: function(axis) { + if(!axis) axis = this.options.axis == "vertical" ? 2 : 1; + return this.options.stepping[axis == 1 ? "x" : "y"] ? this.options.stepping[axis == 1 ? "x" : "y"] : (this.options.realMax[axis == 1 ? "x" : "y"] / this.actualSize[axis == 1 ? "width" : "height"]) * 5; + }, + + translateRange: function(value,axis) { + if (this.rangeElement) { + if (this.currentHandle[0] == this.handle[0] && value >= this.translateValue(this.value(1),axis)) + value = this.translateValue(this.value(1,axis) - this.oneStep(axis), axis); + if (this.currentHandle[0] == this.handle[1] && value <= this.translateValue(this.value(0),axis)) + value = this.translateValue(this.value(0,axis) + this.oneStep(axis)); + } + if (this.options.handles) { + var handle = this.options.handles[this.handleIndex()]; + if (value < this.translateValue(handle.min,axis)) { + value = this.translateValue(handle.min,axis); + } else if (value > this.translateValue(handle.max,axis)) { + value = this.translateValue(handle.max,axis); + } + } + return value; + }, + + handleIndex: function() { + return this.handle.index(this.currentHandle[0]) + }, + + translateLimits: function(value,axis) { + if(!axis) axis = this.options.axis == "vertical" ? 2 : 1; + if (value >= this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null,axis)) + value = this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null,axis); + if (value <= 0) + value = 0; + return value; + }, + + drag: function(e, handle) { + + var o = this.options; + var position = { top: e.pageY - this.offset.top - this.clickOffset.top, left: e.pageX - this.offset.left - this.clickOffset.left}; + if(!this.currentHandle) this.focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events + + position.left = this.translateLimits(position.left,1); + position.top = this.translateLimits(position.top,2); + + if (o.stepping.x) { + var value = this.convertValue(position.left,1); + value = Math.round(value / o.stepping.x) * o.stepping.x; + position.left = this.translateValue(value, 1); + } + if (o.stepping.y) { + var value = this.convertValue(position.top,2); + value = Math.round(value / o.stepping.y) * o.stepping.y; + position.top = this.translateValue(value, 2); + } + + position.left = this.translateRange(position.left, 1); + position.top = this.translateRange(position.top, 2); + + if(o.axis != "vertical") this.currentHandle.css({ left: position.left }); + if(o.axis != "horizontal") this.currentHandle.css({ top: position.top }); + + if (this.rangeElement) + this.updateRange(); + this.propagate('slide', e); + return false; + }, + + moveTo: function(value, handle, noPropagation) { + var o = this.options; + if (handle == undefined && !this.currentHandle && this.handle.length != 1) + return false; //If no handle has been passed, no current handle is available and we have multiple handles, return false + if (handle == undefined && !this.currentHandle) + handle = 0; //If only one handle is available, use it + if (handle != undefined) + this.currentHandle = this.previousHandle = $(this.handle[handle] || handle); + + + + if(value.x !== undefined && value.y !== undefined) { + var x = value.x; + var y = value.y; + } else { + var x = value, y = value; + } + + if(x && x.constructor != Number) { + var me = /^\-\=/.test(x), pe = /^\+\=/.test(x); + if (me) { + x = this.value(null,1) - parseInt(x.replace('-=', ''), 10); + } else if (pe) { + x = this.value(null,1) + parseInt(x.replace('+=', ''), 10); + } + } + + if(y && y.constructor != Number) { + var me = /^\-\=/.test(y), pe = /^\+\=/.test(y); + if (me) { + y = this.value(null,2) - parseInt(y.replace('-=', ''), 10); + } else if (pe) { + y = this.value(null,2) + parseInt(y.replace('+=', ''), 10); + } + } + + if(o.axis != "vertical" && x) { + if(o.stepping.x) x = Math.round(x / o.stepping.x) * o.stepping.x; + x = this.translateValue(x, 1); + x = this.translateLimits(x, 1); + x = this.translateRange(x, 1); + this.currentHandle.css({ left: x }); + } + + if(o.axis != "horizontal" && y) { + if(o.stepping.y) y = Math.round(y / o.stepping.y) * o.stepping.y; + y = this.translateValue(y, 2); + y = this.translateLimits(y, 2); + y = this.translateRange(y, 2); + this.currentHandle.css({ top: y }); + } + + if (this.rangeElement) + this.updateRange(); + + if (!noPropagation) { + this.propagate('start', null); + this.propagate('stop', null); + this.propagate('change', null); + this.propagate("slide", null); + } + } + }); + + $.ui.slider.getter = "value"; + + $.ui.slider.defaults = { + handle: ".ui-slider-handle", + distance: 1 + }; + +})(jQuery); diff --git a/wui/src/public/stylesheets/facebox.css b/wui/src/public/stylesheets/facebox.css index 3a712ea..9c120f9 100644 --- a/wui/src/public/stylesheets/facebox.css +++ b/wui/src/public/stylesheets/facebox.css @@ -63,6 +63,7 @@ padding-top: 0px; margin-top: 0px; text-align: right; + display:none; } #facebox .tl, #facebox .tr, #facebox .bl, #facebox .br { @@ -93,3 +94,10 @@ position: absolute; height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } + + +.facebox_timfooter { + background: url(../images/fb_footer.jpg) repeat-x; + height: 37px; + padding: 9px 9px 0 9px; +} \ No newline at end of file diff --git a/wui/src/public/stylesheets/layout.css b/wui/src/public/stylesheets/layout.css index 2430d7e..92129e8 100644 --- a/wui/src/public/stylesheets/layout.css +++ b/wui/src/public/stylesheets/layout.css @@ -20,15 +20,17 @@ body { font-size: 90%; } -textarea:focus, input:focus { - background-color: #FFFFCC; -} - img { border-style: none; } + +textarea:focus, input:focus { + background-color: #FFFFCC; +} + + /************************** oVirt layout components **/ @@ -60,7 +62,7 @@ img bottom: 35px; overflow: auto; width: 224px; - background-color:#FFFFFF; + background-color:#FFFFFF; border-right: 1px #CCCCCC solid; } @@ -73,9 +75,9 @@ img #main { padding: 0; margin-left: 0; - position: absolute; + position: absolute; top: 70px; - left: 236px; + left: 230px; right: 0px; bottom: 0px; overflow: auto; @@ -92,22 +94,14 @@ img #content-area { } - - - - - - - - .toolbar { margin: 1px 0 1px 0; background: #CCCCCC url(../images/bg_menu_big.jpg) repeat-x top; height: 31px; - border-left: #FFFFFF solid 1px; - border-top: #FFFFFF solid 1px; - border-bottom: #FFFFFF solid 1px; - border-right: #B4B4B4 solid 1px; + border-left: #FFFFFF solid 1px; + border-top: #FFFFFF solid 1px; + border-bottom: #FFFFFF solid 1px; + border-right: #B4B4B4 solid 1px; } .breadcrumb_main { @@ -126,6 +120,9 @@ img font-size: 130%; } + + + /* ----- Right side of Header -------- */ .header_info { @@ -146,7 +143,7 @@ img border-style: solid; border-color: #7A7A7A; padding-left: 5px; - background: #4A4A4A; + background: #4A4A4A; font-size: 100%; color: #FFFFFF; width: 100px; @@ -214,8 +211,7 @@ img } .selection_detail { - padding: 10px; - margin: 35px 0 0 0; + margin: 0; position:absolute; bottom:0px; left: 0px; @@ -223,7 +219,79 @@ img height: 150px; background: #DEE7EB; border-top: #CCCCCC solid 1px; + overflow: auto; +} + +.selection_left { + padding: 10px 10px 10px 15px; + width:48%; + height: 126px; + float:left; +} + +.selection_title { + font-size: 120%; + font-weight:bold; + padding-bottom: 10px; +} + +.selection_key { + text-align:right; + float:left; + color:#666666; +} + +.selection_value { + text-align:left; + float:left; + padding: 0 0 0 10px; +} + +.selection_right { + width:48%; + float: right; + border-left: 1px solid #CCCCCC; + background: #F0F0F0; + } + + .selection_right_title { + padding: 4px 4px 4px 6px; + background: #F0F0F0; + float: left; +} + + .selection_right_table { + height: 128px; + overflow:auto; + clear:both; + } + + /* ----- Selection Detail Tabbed Navigation -------- */ +.selection_tab_nav { + margin:0; + padding: 0; + background: #F0F0F0; + list-style-type: none; + float: right; +} +.selection_tab_nav li { + margin: 0 1px 0 1px; + padding: 0; + float: left; +} +.selection_tab_nav a { + float:left; + padding: 0 8px; + text-decoration: none; + text-align: center; + background: none; + color:#000000; + line-height: 1.7; + } +.selection_tab_nav a:hover {background:#E3E3E3;} + + @@ -238,22 +306,28 @@ img .dialog_title_small { background:#DEE7EB; - padding:15px; - width:400px; + padding:15px; + min-width: 400px; } + .header { font-size: 180%; line-height: 1.6; } .dialog_body { -height: 350px; + height: 350px; } .dialog_form { margin: 15px; } +.dialog_tree { + height: 200px; + overflow: auto; +} + .field_title { font-size: 105%; font-weight:bold; @@ -289,4 +363,18 @@ height: 350px; +/* This file skins sliders */ + +.ui-slider { width: 200px; height: 23px; position: relative; background-repeat: no-repeat; background-position: center center; } +.ui-slider-handle { position: absolute; z-index: 1; height: 23px; width: 12px; top: 0px; left: 0px; background-image: url(images/slider-handle.gif); } +.ui-slider-handle-active { border: 1px dotted black; } +.ui-slider-disabled .ui-slider-handle { opacity: 0.5; filter: alpha(opacity=50); } +.ui-slider-range { position: absolute; background: #50A029; opacity: 0.3; filter: alpha(opacity=30); width: 100%; height: 100%; } + +/* Default slider backgrounds */ +.ui-slider, .ui-slider-1 { background-image: url(images/slider-bg-1.png); } +.ui-slider-2 { background-image: url(images/slider-bg-2.png); } + + +#slider_callout { background: #FFFFFF; height: 45px; width: 38px; overflow: hidden; position: absolute; top: -50px; margin-left:-10px; padding: 8px 0px 0px 0px; font-family: "Myriad Pro"; color: #284a6e; font-weight: bold; text-align: center;} \ No newline at end of file -- 1.5.4.1
Hugh O. Brock
2008-May-19 16:30 UTC
[Ovirt-devel] [Patch] move tree popup widget for moving hosts and storage
On Fri, May 16, 2008 at 05:02:02PM -0400, Scott Seago wrote:> >From 1ebce4238a6381d6fd513ed8753803164cef18b0 Mon Sep 17 00:00:00 2001 > From: Scott Seago <sseago at kodiak.boston.redhat.com> > Date: Fri, 16 May 2008 16:52:58 -0400 > Subject: [PATCH] first pass at move popup. Still not migrated to storage, > and the 'new hardware pool' bits need to be hooked up. > > > Signed-off-by: Scott Seago <sseago at kodiak.boston.redhat.com> > --- > wui/src/app/controllers/hardware_controller.rb | 28 +- > wui/src/app/controllers/resources_controller.rb | 2 +- > wui/src/app/models/pool.rb | 28 +- > wui/src/app/views/hardware/move.rhtml | 43 + > wui/src/app/views/hardware/new.html.erb | 76 +- > wui/src/app/views/hardware/show_hosts.rhtml | 12 +- > wui/src/app/views/hardware/show_storage.rhtml | 2 +- > wui/src/app/views/layouts/_tree.rhtml | 2 +- > wui/src/app/views/layouts/redux.rhtml | 10 +- > wui/src/app/views/user/_grid.rhtml | 2 +- > wui/src/public/images/Untitled-4.gif | Bin 0 -> 13123 bytes > wui/src/public/images/addstoragepool.png | Bin 0 -> 1069 bytes > wui/src/public/images/btn_move.png | Bin 0 -> 1531 bytes > wui/src/public/images/btn_moveto_newhost.png | Bin 0 -> 2878 bytes > wui/src/public/images/btn_moveto_newpool.png | Bin 0 -> 2731 bytes > wui/src/public/images/icon_addvm.png | Bin 0 -> 1242 bytes > wui/src/public/images/icon_selection_add.gif | Bin 0 -> 13127 bytes > wui/src/public/images/icon_selection_remove.gif | Bin 0 -> 13117 bytes > .../public/images/icon_selection_showdetail.gif | Bin 0 -> 13124 bytes > wui/src/public/images/loading.gif | Bin 0 -> 2767 bytes > wui/src/public/images/slider-bg-1.png | Bin 0 -> 204 bytes > wui/src/public/images/slider-bg-2.png | Bin 0 -> 326 bytes > wui/src/public/images/slider-handle.gif | Bin 0 -> 176 bytes > wui/src/public/javascripts/facebox.js | 1 + > .../jquery-treeview/jquery.treeview.async.js | 19 +- > wui/src/public/javascripts/jquery.cookie.js | 92 + > wui/src/public/javascripts/jquery.js | 3533 > ++++++++++++++++++++ > wui/src/public/javascripts/ui.core.js | 237 ++ > wui/src/public/javascripts/ui.slider.js | 386 +++ > wui/src/public/stylesheets/facebox.css | 8 + > wui/src/public/stylesheets/layout.css | 138 +- > 31 files changed, 4525 insertions(+), 94 deletions(-) > create mode 100644 wui/src/app/views/hardware/move.rhtml > create mode 100644 wui/src/public/images/Untitled-4.gif > create mode 100644 wui/src/public/images/addstoragepool.png > create mode 100644 wui/src/public/images/btn_move.png > create mode 100644 wui/src/public/images/btn_moveto_newhost.png > create mode 100644 wui/src/public/images/btn_moveto_newpool.png > create mode 100644 wui/src/public/images/icon_addvm.png > create mode 100644 wui/src/public/images/icon_selection_add.gif > create mode 100644 wui/src/public/images/icon_selection_remove.gif > create mode 100644 wui/src/public/images/icon_selection_showdetail.gif > create mode 100755 wui/src/public/images/loading.gif > create mode 100755 wui/src/public/images/slider-bg-1.png > create mode 100755 wui/src/public/images/slider-bg-2.png > create mode 100755 wui/src/public/images/slider-handle.gif > create mode 100644 wui/src/public/javascripts/jquery.cookie.js > create mode 100755 wui/src/public/javascripts/jquery.js > create mode 100755 wui/src/public/javascripts/ui.core.js > create mode 100755 wui/src/public/javascripts/ui.slider.js > > diff --git a/wui/src/app/controllers/hardware_controller.rb > b/wui/src/app/controllers/hardware_controller.rb > index 599d881..0365931 100644 > --- a/wui/src/app/controllers/hardware_controller.rb > +++ b/wui/src/app/controllers/hardware_controller.rb > @@ -37,22 +37,30 @@ class HardwareController < ApplicationController > end > end > - def json > + def json_view_tree > + json_tree_internal(Permission::PRIV_VIEW, false) > + end > + def json_move_tree > + json_tree_internal(Permission::PRIV_MODIFY, true) > + end > + def json_tree_internal(privilege, filter_vm_pools) > id = params[:id] > if id > @pool = Pool.find(id) > set_perms(@pool) > - unless @can_view > - flash[:notice] = 'You do not have permission to view this hardware > pool: redirecting to top level' > + unless @pool.has_privilege(@user, privilege) > + flash[:notice] = 'You do not have permission to access this > hardware pool: redirecting to top level' > redirect_to :controller => "dashboard" > return > end > end > if @pool > pools = @pool.children > + pools = Pool.select_hardware_pools(pools) if filter_vm_pools > open_list = [] > else > pools = Pool.list_for_user(get_login_user,Permission::PRIV_VIEW) > + pools = Pool.select_hardware_pools(pools) if filter_vm_pools > current_id = params[:current_id] > if current_id > current_pool = Pool.find(current_id) > @@ -62,7 +70,7 @@ class HardwareController < ApplicationController > end > end > > - render :json => Pool.nav_json(pools, open_list) > + render :json => Pool.nav_json(pools, open_list, filter_vm_pools) > end > > def show_vms > @@ -107,7 +115,7 @@ class HardwareController < ApplicationController > > def users_json > json_list(@pool.permissions, > - [:id, :user, :user_role]) > + [:id, :uid, :user_role]) > end > > def storage_pools_json > @@ -127,6 +135,12 @@ class HardwareController < ApplicationController > [:display_name, :size_in_gb, :get_type_label]) > end > > + def move > + pre_modify > + @resource_type = params[:resource_type] > + render :layout => 'popup' + end > + > def new > @pools = @pool.self_and_like_siblings > end > @@ -174,7 +188,7 @@ class HardwareController < ApplicationController > # for hosts that aren't currently empty > def move_hosts > target_pool_id = params[:target_pool_id] > - host_ids_str = params[:host_ids] > + host_ids_str = params[:resource_ids] > host_ids = host_ids_str.split(",").collect {|x| x.to_i} > @pool.transaction do > @@ -209,7 +223,7 @@ class HardwareController < ApplicationController > # for storage that aren't currently empty > def move_storage > target_pool_id = params[:target_pool_id] > - storage_pool_ids_str = params[:storage_pool_ids] > + storage_pool_ids_str = params[:resource_ids] > storage_pool_ids = storage_pool_ids_str.split(",").collect {|x| x.to_i} > @pool.transaction do > diff --git a/wui/src/app/controllers/resources_controller.rb > b/wui/src/app/controllers/resources_controller.rb > index 68e3abe..5056f09 100644 > --- a/wui/src/app/controllers/resources_controller.rb > +++ b/wui/src/app/controllers/resources_controller.rb > @@ -79,7 +79,7 @@ class ResourcesController < ApplicationController > > def users_json > json_list(@vm_resource_pool.permissions, > - [:id, :user, :user_role]) > + [:id, :uid, :user_role]) > end > > def newNot replaying the entire patch since it is huge, but ACK looks a good start. --Hugh