file_share 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/Gemfile +16 -0
  2. data/Gemfile.lock +147 -0
  3. data/README +0 -0
  4. data/Rakefile +38 -0
  5. data/VERSION +1 -0
  6. data/app/controllers/application_controller.rb +4 -0
  7. data/app/controllers/file_attachments_controller.rb +123 -0
  8. data/app/controllers/file_share/application_controller.rb +5 -0
  9. data/app/helpers/file_attachments_helper.rb +9 -0
  10. data/app/helpers/file_share/application_helper.rb +60 -0
  11. data/app/models/file_attachment.rb +104 -0
  12. data/app/models/file_container.rb +30 -0
  13. data/app/views/file-share-shared/_flash.html.erb +7 -0
  14. data/app/views/file-share-shared/_main_menu.html.erb +3 -0
  15. data/app/views/file-share-shared/_navigation.html.erb +2 -0
  16. data/app/views/file_attachments/_file_attachment.html.erb +17 -0
  17. data/app/views/file_attachments/_file_attachments.html.erb +52 -0
  18. data/app/views/file_attachments/_file_container_option.html.erb +4 -0
  19. data/app/views/file_attachments/_file_container_select.html.erb +14 -0
  20. data/app/views/file_attachments/_plupload_with_listing.html.erb +142 -0
  21. data/app/views/file_attachments/_upload_form.html.erb +22 -0
  22. data/app/views/file_attachments/edit.html.erb +32 -0
  23. data/app/views/file_attachments/index.html.erb +1 -0
  24. data/app/views/file_attachments/update.js.rjs +13 -0
  25. data/app/views/layouts/application.html.erb +56 -0
  26. data/config/application.rb +42 -0
  27. data/config/blueprint_settings.yml +9 -0
  28. data/config/boot.rb +13 -0
  29. data/config/cucumber.yml +8 -0
  30. data/config/database.example.yml +22 -0
  31. data/config/environment.rb +5 -0
  32. data/config/environments/development.rb +26 -0
  33. data/config/environments/production.rb +49 -0
  34. data/config/environments/test.rb +35 -0
  35. data/config/initializers/backtrace_silencers.rb +7 -0
  36. data/config/initializers/inflections.rb +10 -0
  37. data/config/initializers/mime_types.rb +5 -0
  38. data/config/initializers/secret_token.rb +9 -0
  39. data/config/initializers/session_store.rb +10 -0
  40. data/config/locales/en.yml +5 -0
  41. data/config/routes.rb +64 -0
  42. data/db/migrate/20101020002635_create_file_attachments.rb +19 -0
  43. data/db/schema.rb +27 -0
  44. data/db/seeds.rb +7 -0
  45. data/lib/file_share.rb +3 -0
  46. data/lib/file_share/engine.rb +25 -0
  47. data/lib/generators/file_share/install/USAGE +5 -0
  48. data/lib/generators/file_share/install/install_generator.rb +19 -0
  49. data/lib/generators/file_share/install/templates/file_share.rake +169 -0
  50. data/lib/tasks/blueprint.rake +25 -0
  51. data/lib/tasks/cucumber.rake +53 -0
  52. data/public/404.html +26 -0
  53. data/public/422.html +26 -0
  54. data/public/500.html +26 -0
  55. data/public/favicon.ico +0 -0
  56. data/public/images/rails.png +0 -0
  57. data/public/javascripts/file_share.js +62 -0
  58. data/public/javascripts/file_share_behaviors.js +131 -0
  59. data/public/javascripts/idselector.js +538 -0
  60. data/public/javascripts/jquery-1.3.2.min.js +19 -0
  61. data/public/javascripts/jquery-ui-1.7.2.custom.min.js +298 -0
  62. data/public/javascripts/jquery.clonePosition.js +27 -0
  63. data/public/javascripts/jquery.js +154 -0
  64. data/public/javascripts/jquery.qtip-1.0.0-rc3.js +2149 -0
  65. data/public/javascripts/jquery.qtip-1.0.0-rc3.min.js +15 -0
  66. data/public/javascripts/jquery.string.1.0-min.js +6 -0
  67. data/public/javascripts/jquery.tablesorter.min.js +2 -0
  68. data/public/javascripts/lowpro.jquery.js +224 -0
  69. data/public/javascripts/plupload/gears_init.js +86 -0
  70. data/public/javascripts/plupload/jquery.plupload.queue.min.js +202 -0
  71. data/public/javascripts/plupload/plupload.browserplus.min.js +1 -0
  72. data/public/javascripts/plupload/plupload.flash.min.js +1 -0
  73. data/public/javascripts/plupload/plupload.flash.swf +0 -0
  74. data/public/javascripts/plupload/plupload.full.min.js +1 -0
  75. data/public/javascripts/plupload/plupload.gears.min.js +1 -0
  76. data/public/javascripts/plupload/plupload.html4.min.js +1 -0
  77. data/public/javascripts/plupload/plupload.html5.min.js +1 -0
  78. data/public/javascripts/plupload/plupload.min.js +1 -0
  79. data/public/javascripts/plupload/plupload.silverlight.min.js +1 -0
  80. data/public/javascripts/plupload/plupload.silverlight.xap +0 -0
  81. data/public/javascripts/rails.js +132 -0
  82. data/public/robots.txt +5 -0
  83. data/public/stylesheets/blueprint/grid.css +290 -0
  84. data/public/stylesheets/blueprint/icons/cross.png +0 -0
  85. data/public/stylesheets/blueprint/icons/doc.png +0 -0
  86. data/public/stylesheets/blueprint/icons/email.png +0 -0
  87. data/public/stylesheets/blueprint/icons/external.png +0 -0
  88. data/public/stylesheets/blueprint/icons/feed.png +0 -0
  89. data/public/stylesheets/blueprint/icons/im.png +0 -0
  90. data/public/stylesheets/blueprint/icons/key.png +0 -0
  91. data/public/stylesheets/blueprint/icons/pdf.png +0 -0
  92. data/public/stylesheets/blueprint/icons/tick.png +0 -0
  93. data/public/stylesheets/blueprint/icons/visited.png +0 -0
  94. data/public/stylesheets/blueprint/icons/xls.png +0 -0
  95. data/public/stylesheets/blueprint/ie.css +36 -0
  96. data/public/stylesheets/blueprint/oldgrid.css +161 -0
  97. data/public/stylesheets/blueprint/plugins/buttons/icons/cross.png +0 -0
  98. data/public/stylesheets/blueprint/plugins/buttons/icons/key.png +0 -0
  99. data/public/stylesheets/blueprint/plugins/buttons/icons/tick.png +0 -0
  100. data/public/stylesheets/blueprint/plugins/buttons/readme.txt +32 -0
  101. data/public/stylesheets/blueprint/plugins/buttons/screen.css +97 -0
  102. data/public/stylesheets/blueprint/plugins/fancy-type/readme.txt +14 -0
  103. data/public/stylesheets/blueprint/plugins/fancy-type/screen.css +71 -0
  104. data/public/stylesheets/blueprint/plugins/link-icons/icons/doc.png +0 -0
  105. data/public/stylesheets/blueprint/plugins/link-icons/icons/email.png +0 -0
  106. data/public/stylesheets/blueprint/plugins/link-icons/icons/external.png +0 -0
  107. data/public/stylesheets/blueprint/plugins/link-icons/icons/feed.png +0 -0
  108. data/public/stylesheets/blueprint/plugins/link-icons/icons/im.png +0 -0
  109. data/public/stylesheets/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  110. data/public/stylesheets/blueprint/plugins/link-icons/icons/visited.png +0 -0
  111. data/public/stylesheets/blueprint/plugins/link-icons/icons/xls.png +0 -0
  112. data/public/stylesheets/blueprint/plugins/link-icons/readme.txt +18 -0
  113. data/public/stylesheets/blueprint/plugins/link-icons/screen.css +40 -0
  114. data/public/stylesheets/blueprint/plugins/rtl/readme.txt +10 -0
  115. data/public/stylesheets/blueprint/plugins/rtl/screen.css +110 -0
  116. data/public/stylesheets/blueprint/plugins/silksprite/sprite.css +1 -0
  117. data/public/stylesheets/blueprint/plugins/silksprite/sprites.png +0 -0
  118. data/public/stylesheets/blueprint/print.css +29 -0
  119. data/public/stylesheets/blueprint/readme.txt +12 -0
  120. data/public/stylesheets/blueprint/screen.css +402 -0
  121. data/public/stylesheets/error_messages.css +65 -0
  122. data/public/stylesheets/formtastic.css +138 -0
  123. data/public/stylesheets/formtastic_changes.css +33 -0
  124. data/public/stylesheets/main_elements.css +26 -0
  125. data/public/stylesheets/plupload/backgrounds.gif +0 -0
  126. data/public/stylesheets/plupload/buttons-disabled.png +0 -0
  127. data/public/stylesheets/plupload/buttons.png +0 -0
  128. data/public/stylesheets/plupload/delete.gif +0 -0
  129. data/public/stylesheets/plupload/done.gif +0 -0
  130. data/public/stylesheets/plupload/error.gif +0 -0
  131. data/public/stylesheets/plupload/screen.css +172 -0
  132. data/public/stylesheets/plupload/transp50.png +0 -0
  133. data/public/stylesheets/reset.css +60 -0
  134. data/public/stylesheets/scaffold.css +55 -0
  135. data/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  136. data/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  137. data/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  138. data/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  139. data/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  140. data/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  141. data/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  142. data/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  143. data/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  144. data/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  145. data/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  146. data/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  147. data/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  148. data/public/stylesheets/smoothness/jquery-ui-1.7.2.custom.css +406 -0
  149. data/public/stylesheets/tablesorter/blue/asc.gif +0 -0
  150. data/public/stylesheets/tablesorter/blue/bg.gif +0 -0
  151. data/public/stylesheets/tablesorter/blue/desc.gif +0 -0
  152. data/public/stylesheets/tablesorter/blue/style.css +39 -0
  153. data/public/stylesheets/text_and_colors.css +49 -0
  154. data/spec/controllers/file_attachments_controller_spec.rb +305 -0
  155. data/spec/fixtures/file_share_file_attachments.yml +2 -0
  156. data/spec/fixtures/somefile.txt +1 -0
  157. data/spec/helpers/file_attachments_helper_spec.rb +11 -0
  158. data/spec/models/file_attachment_spec.rb +57 -0
  159. data/spec/models/file_container_spec.rb +23 -0
  160. data/spec/spec_helper.rb +27 -0
  161. metadata +474 -0
@@ -0,0 +1,15 @@
1
+ /*
2
+ * jquery.qtip. The jQuery tooltip plugin
3
+ *
4
+ * Copyright (c) 2009 Craig Thompson
5
+ * http://craigsworks.com
6
+ *
7
+ * Licensed under MIT
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * Launch : February 2009
11
+ * Version : 1.0.0-rc3
12
+ * Released: Tuesday 12th May, 2009 - 00:00
13
+ * Debug: jquery.qtip.debug.js
14
+ */
15
+ (function(f){f.fn.qtip=function(B,u){var y,t,A,s,x,w,v,z;if(typeof B=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(B=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(B=="interfaces"){return f(this).data("qtip").interfaces}}}else{if(!B){B={}}if(typeof B.content!=="object"||(B.content.jquery&&B.content.length>0)){B.content={text:B.content}}if(typeof B.content.title!=="object"){B.content.title={text:B.content.title}}if(typeof B.position!=="object"){B.position={corner:B.position}}if(typeof B.position.corner!=="object"){B.position.corner={target:B.position.corner,tooltip:B.position.corner}}if(typeof B.show!=="object"){B.show={when:B.show}}if(typeof B.show.when!=="object"){B.show.when={event:B.show.when}}if(typeof B.show.effect!=="object"){B.show.effect={type:B.show.effect}}if(typeof B.hide!=="object"){B.hide={when:B.hide}}if(typeof B.hide.when!=="object"){B.hide.when={event:B.hide.when}}if(typeof B.hide.effect!=="object"){B.hide.effect={type:B.hide.effect}}if(typeof B.style!=="object"){B.style={name:B.style}}B.style=c(B.style);s=f.extend(true,{},f.fn.qtip.defaults,B);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},B)}return f(this).each(function(){if(typeof B=="string"){w=B.toLowerCase();A=f(this).qtip("interfaces");if(typeof A=="object"){if(u===true&&w=="destroy"){while(A.length>0){A[A.length-1].destroy()}}else{if(u!==true){A=[f(this).qtip("api")]}for(y=0;y<A.length;y++){if(w=="destroy"){A[y].destroy()}else{if(A[y].status.rendered===true){if(w=="show"){A[y].show()}else{if(w=="hide"){A[y].hide()}else{if(w=="focus"){A[y].focus()}else{if(w=="disable"){A[y].disable(true)}else{if(w=="enable"){A[y].disable(false)}}}}}}}}}}}else{v=f.extend(true,{},s);v.hide.effect.length=s.hide.effect.length;v.show.effect.length=s.show.effect.length;if(v.position.container===false){v.position.container=f(document.body)}if(v.position.target===false){v.position.target=f(this)}if(v.show.when.target===false){v.show.when.target=f(this)}if(v.hide.when.target===false){v.hide.when.target=f(this)}t=f.fn.qtip.interfaces.length;for(y=0;y<t;y++){if(typeof f.fn.qtip.interfaces[y]=="undefined"){t=y;break}}x=new d(f(this),v,t);f.fn.qtip.interfaces[t]=x;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length}f(this).data("qtip").interfaces.push(x)}else{f(this).data("qtip",{current:0,interfaces:[x]})}if(v.content.prerender===false&&v.show.when.event!==false&&v.show.ready!==true){v.show.when.target.bind(v.show.when.event+".qtip-"+t+"-create",{qtip:t},function(C){z=f.fn.qtip.interfaces[C.data.qtip];z.options.show.when.target.unbind(z.options.show.when.event+".qtip-"+C.data.qtip+"-create");z.cache.mouse={x:C.pageX,y:C.pageY};p.call(z);z.options.show.when.target.trigger(z.options.show.when.event)})}else{x.cache.mouse={x:v.show.when.target.offset().left,y:v.show.when.target.offset().top};p.call(x)}}})};function d(u,t,v){var s=this;s.id=v;s.options=t;s.status={animated:false,rendered:false,disabled:false,focused:false};s.elements={target:u.addClass(s.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};s.cache={mouse:{},position:{},toggle:0};s.timers={};f.extend(s,s.options.api,{show:function(y){var x,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(s.elements.tooltip.css("display")!=="none"){return s}s.elements.tooltip.stop(true,false);x=s.beforeShow.call(s,y);if(x===false){return s}function w(){if(s.options.position.type!=="static"){s.focus()}s.onShow.call(s,y);if(f.browser.msie){s.elements.tooltip.get(0).style.removeAttribute("filter")}}s.cache.toggle=1;if(s.options.position.type!=="static"){s.updatePosition(y,(s.options.show.effect.length>0))}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo)}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip)}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide()}})}if(typeof s.options.show.effect.type=="function"){s.options.show.effect.type.call(s.elements.tooltip,s.options.show.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.show.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeIn(s.options.show.effect.length,w);break;case"slide":s.elements.tooltip.slideDown(s.options.show.effect.length,function(){w();if(s.options.position.type!=="static"){s.updatePosition(y,true)}});break;case"grow":s.elements.tooltip.show(s.options.show.effect.length,w);break;default:s.elements.tooltip.show(null,w);break}s.elements.tooltip.addClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(s.elements.tooltip.css("display")==="none"){return s}}clearTimeout(s.timers.show);s.elements.tooltip.stop(true,false);x=s.beforeHide.call(s,y);if(x===false){return s}function w(){s.onHide.call(s,y)}s.cache.toggle=0;if(typeof s.options.hide.effect.type=="function"){s.options.hide.effect.type.call(s.elements.tooltip,s.options.hide.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.hide.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeOut(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideUp(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break}s.elements.tooltip.removeClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(w,x){var C,G,L,J,H,E,y,I,B,D,K,A,F,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}G={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};L={position:s.getPosition(),dimensions:s.getDimensions(),corner:s.options.position.corner.tooltip};if(s.options.position.target!=="mouse"){if(s.options.position.target.get(0).nodeName.toLowerCase()=="area"){J=s.options.position.target.attr("coords").split(",");for(C=0;C<J.length;C++){J[C]=parseInt(J[C])}H=s.options.position.target.parent("map").attr("name");E=f('img[usemap="#'+H+'"]:first').offset();G.position={left:Math.floor(E.left+J[0]),top:Math.floor(E.top+J[1])};switch(s.options.position.target.attr("shape").toLowerCase()){case"rect":G.dimensions={width:Math.ceil(Math.abs(J[2]-J[0])),height:Math.ceil(Math.abs(J[3]-J[1]))};break;case"circle":G.dimensions={width:J[2]+1,height:J[2]+1};break;case"poly":G.dimensions={width:J[0],height:J[1]};for(C=0;C<J.length;C++){if(C%2==0){if(J[C]>G.dimensions.width){G.dimensions.width=J[C]}if(J[C]<J[0]){G.position.left=Math.floor(E.left+J[C])}}else{if(J[C]>G.dimensions.height){G.dimensions.height=J[C]}if(J[C]<J[1]){G.position.top=Math.floor(E.top+J[C])}}}G.dimensions.width=G.dimensions.width-(G.position.left-E.left);G.dimensions.height=G.dimensions.height-(G.position.top-E.top);break;default:return f.fn.qtip.log.error.call(s,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}G.dimensions.width-=2;G.dimensions.height-=2}else{if(s.options.position.target.add(document.body).length===1){G.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};G.dimensions={height:f(window).height(),width:f(window).width()}}else{if(typeof s.options.position.target.attr("qtip")!=="undefined"){G.position=s.options.position.target.qtip("api").cache.position}else{G.position=s.options.position.target.offset()}G.dimensions={height:s.options.position.target.outerHeight(),width:s.options.position.target.outerWidth()}}}y=f.extend({},G.position);if(G.corner.search(/right/i)!==-1){y.left+=G.dimensions.width}if(G.corner.search(/bottom/i)!==-1){y.top+=G.dimensions.height}if(G.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left+=(G.dimensions.width/2)}if(G.corner.search(/((left|right)Middle)|center/)!==-1){y.top+=(G.dimensions.height/2)}}else{G.position=y={left:s.cache.mouse.x,top:s.cache.mouse.y};G.dimensions={height:1,width:1}}if(L.corner.search(/right/i)!==-1){y.left-=L.dimensions.width}if(L.corner.search(/bottom/i)!==-1){y.top-=L.dimensions.height}if(L.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left-=(L.dimensions.width/2)}if(L.corner.search(/((left|right)Middle)|center/)!==-1){y.top-=(L.dimensions.height/2)}I=(f.browser.msie)?1:0;B=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(s.options.style.border.radius>0){if(L.corner.search(/Left/)!==-1){y.left-=s.options.style.border.radius}else{if(L.corner.search(/Right/)!==-1){y.left+=s.options.style.border.radius}}if(L.corner.search(/Top/)!==-1){y.top-=s.options.style.border.radius}else{if(L.corner.search(/Bottom/)!==-1){y.top+=s.options.style.border.radius}}}if(I){if(L.corner.search(/top/)!==-1){y.top-=I}else{if(L.corner.search(/bottom/)!==-1){y.top+=I}}if(L.corner.search(/left/)!==-1){y.left-=I}else{if(L.corner.search(/right/)!==-1){y.left+=I}}if(L.corner.search(/leftMiddle|rightMiddle/)!==-1){y.top-=1}}if(s.options.position.adjust.screen===true){y=o.call(s,y,G,L)}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){K=s.elements.tip.attr("rel")}else{K=s.options.position.corner.tooltip}y.left+=(K.search(/right/i)!==-1)?-6:6;y.top+=(K.search(/bottom/i)!==-1)?-6:6}if(!s.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){A=f(this).offset();A.bottom=A.top+f(this).height();A.right=A.left+f(this).width();if(y.top+L.dimensions.height>=A.top&&y.left+L.dimensions.width>=A.left){k.call(s)}})}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;F=s.getPosition();if(y.left!=F.left||y.top!=F.top){z=s.beforePositionUpdate.call(s,w);if(z===false){return s}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false})}else{s.elements.tooltip.css(y)}s.onPositionUpdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return s},updateWidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(w&&typeof w!=="number"){return f.fn.qtip.log.error.call(s,2,"newWidth must be of type number","updateWidth")}}x=s.elements.contentWrapper.siblings().add(s.elements.tip).add(s.elements.button);if(!w){if(typeof s.options.style.width.value=="number"){w=s.options.style.width.value}else{s.elements.tooltip.css({width:"auto"});x.hide();if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"normal"})}w=s.getDimensions().width+1;if(!s.options.style.width.value){if(w>s.options.style.width.max){w=s.options.style.width.max}if(w<s.options.style.width.min){w=s.options.style.width.min}}}}if(w%2!==0){w-=1}s.elements.tooltip.width(w);x.show();if(s.options.style.border.radius){s.elements.tooltip.find(".qtip-betweenCorners").each(function(y){f(this).width(w-(s.options.style.border.radius*2))})}if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"1"});s.elements.wrapper.width(w);if(s.elements.bgiframe){s.elements.bgiframe.width(w).height(s.getDimensions.height)}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(w){var z,A,x,y,B;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof w!=="string"||!f.fn.qtip.styles[w]){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}s.options.style=a.call(s,f.fn.qtip.styles[w],s.options.user.style);s.elements.content.css(q(s.options.style));if(s.options.content.title.text!==false){s.elements.title.css(q(s.options.style.title,true))}s.elements.contentWrapper.css({borderColor:s.options.style.border.color});if(s.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getContext("2d");x.clearRect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");B=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,B,s.options.style.tip.color||s.options.style.border.color)}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodeName="shape"]');z.attr("fillcolor",s.options.style.tip.color||s.options.style.border.color)}}}if(s.options.style.border.radius>0){s.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:s.options.style.border.color});if(f("<canvas>").get(0).getContext){A=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getContext("2d");x.clearRect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),A[y],s.options.style.border.radius,s.options.style.border.color)})}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color)})}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(A,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!A){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}z=s.beforeContentUpdate.call(s,A);if(typeof z=="string"){A=z}else{if(z===false){return}}if(f.browser.msie){s.elements.contentWrapper.children().css({zoom:"normal"})}if(A.jquery&&A.length>0){A.clone(true).appendTo(s.elements.content).show()}else{s.elements.content.html(A)}x=s.elements.content.find("img[complete=false]");if(x.length>0){w=0;x.each(function(C){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++w==x.length){B()}})})}else{B()}function B(){s.updateWidth();if(y!==false){if(s.options.position.type!=="static"){s.updatePosition(s.elements.tooltip.is(":visible"),true)}if(s.options.style.tip.corner!==false){n.call(s)}}}s.onContentUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(w,z,A){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}y=s.beforeContentLoad.call(s);if(y===false){return s}if(A=="post"){f.post(w,z,x)}else{f.get(w,z,x)}function x(B){s.onContentLoad.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");s.updateContent(B)}return s},updateTitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=s.beforeTitleUpdate.call(s);if(returned===false){return s}if(s.elements.button){s.elements.button=s.elements.button.clone(true)}s.elements.title.html(w);if(s.elements.button){s.elements.title.prepend(s.elements.button)}s.onTitleUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(A){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}y=parseInt(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforeFocus.call(s,A);if(z===false){return s}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseInt(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});s.elements.tooltip.css({zIndex:x});s.status.focused=true;s.onFocus.call(s,A);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus")}return s},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DISABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_ENABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return s},destroy:function(){var w,x,y;x=s.beforeDestroy.call(s);if(x===false){return s}if(s.status.rendered){s.options.show.when.target.unbind("mousemove.qtip",s.updatePosition);s.options.show.when.target.unbind("mouseout.qtip",s.hide);s.options.show.when.target.unbind(s.options.show.when.event+".qtip");s.options.hide.when.target.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind("mouseover.qtip",s.focus);s.elements.tooltip.remove()}else{s.options.show.when.target.unbind(s.options.show.when.event+".qtip-create")}if(typeof s.elements.target.data("qtip")=="object"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w<y.length-1;w++){if(y[w].id==s.id){y.splice(w,1)}}}}delete f.fn.qtip.interfaces[s.id];if(typeof y=="object"&&y.length>0){s.elements.target.data("qtip").current=y.length-1}else{s.elements.target.removeData("qtip")}s.onDestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return s.elements.target},getPosition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}w=(s.elements.tooltip.css("display")!=="none")?false:true;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x=s.elements.tooltip.offset();if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x},getDimensions:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}w=(!s.elements.tooltip.is(":visible"))?true:false;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x={height:s.elements.tooltip.outerHeight(),width:s.elements.tooltip.outerWidth()};if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x}})}function p(){var s,w,u,t,v,y,x;s=this;s.beforeRender.call(s);s.status.rendered=true;s.elements.tooltip='<div qtip="'+s.id+'" class="qtip '+(s.options.style.classes.tooltip||s.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+s.options.position.type+';"> <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;"> <div class="qtip-contentWrapper" style="overflow:hidden;"> <div class="qtip-content '+s.options.style.classes.content+'"></div></div></div></div>';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendTo(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentWrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentWrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1})}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true)}if(typeof s.options.style.width.value=="number"){s.updateWidth()}if(f("<canvas>").get(0).getContext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s)}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color})}if(s.options.style.tip.corner!==false){e.call(s)}}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","<br />");s.elements.target.attr("title","")}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","<br />");s.elements.target.attr("alt","")}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(s.options.content.title.text!==false){j.call(s)}s.updateContent(u);l.call(s);if(s.options.show.ready===true){s.show()}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadContent(t,v,y)}s.onRender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_RENDERED,"render")}function m(){var F,z,t,B,x,E,u,G,D,y,w,C,A,s,v;F=this;F.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();t=F.options.style.border.width;B=F.options.style.border.radius;x=F.options.style.border.color||F.options.style.tip.color;E=g(B);u={};for(z in E){u[z]='<div rel="'+z+'" style="'+((z.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+B+"px; width:"+B+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){u[z]+='<canvas height="'+B+'" width="'+B+'" style="vertical-align: top"></canvas>'}else{if(f.browser.msie){G=B*2+3;u[z]+='<v:arc stroked="false" fillcolor="'+x+'" startangle="'+E[z][0]+'" endangle="'+E[z][1]+'" style="width:'+G+"px; height:"+G+"px; margin-top:"+((z.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((z.search(/Right/)!==-1)?E[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}u[z]+="</div>"}D=F.getDimensions().width-(Math.max(t,B)*2);y='<div class="qtip-betweenCorners" style="height:'+B+"px; width:"+D+"px; overflow:hidden; background-color:"+x+'; line-height:0.1px; font-size:1px;">';w='<div class="qtip-borderTop" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.topLeft+u.topRight+y;F.elements.wrapper.prepend(w);C='<div class="qtip-borderBottom" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.bottomLeft+u.bottomRight+y;F.elements.wrapper.append(C);if(f("<canvas>").get(0).getContext){F.elements.wrapper.find("canvas").each(function(){A=E[f(this).parent("[rel]:first").attr("rel")];r.call(F,f(this),A,B,x)})}else{if(f.browser.msie){F.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}s=Math.max(B,(B+(t-B)));v=Math.max(t-B,0);F.elements.contentWrapper.css({border:"0px solid "+x,borderWidth:v+"px "+s+"px"})}function r(u,w,s,t){var v=u.get(0).getContext("2d");v.fillStyle=t;v.beginPath();v.arc(w[0],w[1],s,0,Math.PI*2,false);v.fill()}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove()}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return}else{if(!v){v=t.options.style.tip.corner}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='<div class="'+t.options.style.classes.tip+'" dir="ltr" rel="'+v+'" style="position:absolute; height:'+t.options.style.tip.size.height+"px; width:"+t.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){t.elements.tip+='<canvas height="'+t.options.style.tip.size.height+'" width="'+t.options.style.tip.size.width+'"></canvas>'}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='<v:shape fillcolor="'+s+'" stroked="false" filled="true" path="'+w+'" coordsize="'+u+'" style="width:'+t.options.style.tip.size.width+"px; height:"+t.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((v.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';t.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';t.elements.contentWrapper.css("position","relative")}}t.elements.tooltip.prepend(t.elements.tip+"</div>");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(t,t.elements.tip.find("canvas:first"),x,s)}if(v.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){t.elements.tip.css({marginTop:-4})}n.call(t,v)}function h(t,v,s){var u=t.get(0).getContext("2d");u.fillStyle=s;u.beginPath();u.moveTo(v[0][0],v[0][1]);u.lineTo(v[1][0],v[1][1]);u.lineTo(v[2][0],v[2][1]);u.fill()}function n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return}if(!u){u=t.elements.tip.attr("rel")}w=positionAdjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(u.search(/top/)!==-1)?-3:1}else{positionAdjust=(u.search(/top/)!==-1)?1:2}}if(u.search(/Middle/)!==-1){t.elements.tip.css({left:"50%",marginLeft:-(t.options.style.tip.size.width/2)})}else{if(u.search(/Left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w})}else{if(u.search(/Right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w})}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionAdjust})}else{t.elements.tip.css({bottom:positionAdjust})}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((u.search(/left/)!==-1)?1:2)}if(u.search(/Middle/)!==-1){t.elements.tip.css({top:"50%",marginTop:-(t.options.style.tip.size.height/2)})}else{if(u.search(/Top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w})}else{if(u.search(/Bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w})}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionAdjust})}else{t.elements.tip.css({right:positionAdjust})}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){v=parseInt(t.elements.tip.css("margin-top"))||0;v+=parseInt(t.elements.content.css("margin-top"))||0;t.elements.tip.css({marginTop:v})}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove()}s.elements.title=f('<div class="'+s.options.style.classes.title+'">').css(q(s.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(s.elements.contentWrapper);if(s.options.content.title.text){s.updateTitle.call(s,s.options.content.title.text)}if(s.options.content.title.button!==false&&typeof s.options.content.title.button=="string"){s.elements.button=f('<a class="'+s.options.style.classes.button+'" style="float:right; position: relative"></a>').css(q(s.options.style.button,true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t){if(!s.status.disabled){s.hide(t)}})}}function l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip)}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return}clearTimeout(t.timers.inactive);t.timers.inactive=setTimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive")});t.hide(z)},t.options.hide.delay)}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return}clearTimeout(t.timers.hide)})}}function x(z){if(t.status.disabled===true){return}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y)});y()}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.timers.show=setTimeout(function(){t.show(z)},t.options.show.delay)}function w(z){if(t.status.disabled===true){return}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedTarget).parents("div.qtip[qtip]").length>0){z.stopPropagation();z.preventDefault();clearTimeout(t.timers.hide);return false}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=setTimeout(function(){t.hide(z)},t.options.hide.delay)}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z)}else{w(z)}})}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w)}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus)}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pageX,y:z.pageY};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updatePosition(z)}})}}function o(u,v,A){var z,s,x,y,t,w;z=this;if(A.corner=="center"){return v.position}s=f.extend({},u);y={x:false,y:false};t={left:(s.left<f.fn.qtip.cache.screen.scroll.left),right:(s.left+A.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top<f.fn.qtip.cache.screen.scroll.top),bottom:(s.top+A.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};x={left:(t.left&&(A.corner.search(/right/i)!=-1||(A.corner.search(/right/i)==-1&&!t.right))),right:(t.right&&(A.corner.search(/left/i)!=-1||(A.corner.search(/left/i)==-1&&!t.left))),top:(t.top&&A.corner.search(/top/i)==-1),bottom:(t.bottom&&A.corner.search(/bottom/i)==-1)};if(x.left){if(z.options.position.target!=="mouse"){s.left=v.position.left+v.dimensions.width}else{s.left=z.cache.mouse.x}y.x="Left"}else{if(x.right){if(z.options.position.target!=="mouse"){s.left=v.position.left-A.dimensions.width}else{s.left=z.cache.mouse.x-A.dimensions.width}y.x="Right"}}if(x.top){if(z.options.position.target!=="mouse"){s.top=v.position.top+v.dimensions.height}else{s.top=z.cache.mouse.y}y.y="top"}else{if(x.bottom){if(z.options.position.target!=="mouse"){s.top=v.position.top-A.dimensions.height}else{s.top=z.cache.mouse.y-A.dimensions.height}y.y="bottom"}}if(s.left<0){s.left=u.left;y.x=false}if(s.top<0){s.top=u.top;y.y=false}if(z.options.style.tip.corner!==false){s.corner=new String(A.corner);if(y.x!==false){s.corner=s.corner.replace(/Left|Right|Middle/,y.x)}if(y.y!==false){s.corner=s.corner.replace(/top|bottom/,y.y)}if(s.corner!==z.elements.tip.attr("rel")){e.call(z,s.corner)}}return s}function q(u,t){var v,s;v=f.extend(true,{},u);for(s in v){if(t===true&&s.search(/(tip|classes)/i)!==-1){delete v[s]}else{if(!t&&s.search(/(width|border|tip|title|classes|user)/i)!==-1){delete v[s]}}}return v}function c(s){if(typeof s.tip!=="object"){s.tip={corner:s.tip}}if(typeof s.tip.size!=="object"){s.tip.size={width:s.tip.size,height:s.tip.size}}if(typeof s.border!=="object"){s.border={width:s.border}}if(typeof s.width!=="object"){s.width={value:s.width}}if(typeof s.width.max=="string"){s.width.max=parseInt(s.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof s.width.min=="string"){s.width.min=parseInt(s.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof s.tip.size.x=="number"){s.tip.size.width=s.tip.size.x;delete s.tip.size.x}if(typeof s.tip.size.y=="number"){s.tip.size.height=s.tip.size.y;delete s.tip.size.y}return s}function a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t<arguments.length;t++){u.push(arguments[t])}x=[f.extend.apply(f,u)];while(typeof x[0].name=="string"){x.unshift(c(f.fn.qtip.styles[x[0].name]))}x.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);v=f.extend.apply(f,x);w=(f.browser.msie)?1:0;v.tip.size.width+=w;v.tip.size.height+=w;if(v.tip.size.width%2>0){v.tip.size.width+=1}if(v.tip.size.height%2>0){v.tip.size.height+=1}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip}return v}function b(v,u,t){var s={bottomRight:[[0,0],[u,t],[u,0]],bottomLeft:[[0,0],[u,0],[0,t]],topRight:[[0,t],[u,0],[u,t]],topLeft:[[0,0],[0,t],[u,t]],topMiddle:[[0,t],[u/2,0],[u,t]],bottomMiddle:[[0,0],[u,0],[u/2,t]],rightMiddle:[[0,0],[u,t/2],[0,t]],leftMiddle:[[u,0],[u,t],[0,t/2]]};s.leftTop=s.bottomRight;s.rightTop=s.bottomLeft;s.leftBottom=s.topRight;s.rightBottom=s.topLeft;return s[v]}function g(s){var t;if(f("<canvas>").get(0).getContext){t={topLeft:[s,s],topRight:[0,s],bottomLeft:[s,0],bottomRight:[0,0]}}else{if(f.browser.msie){t={topLeft:[-90,90,0],topRight:[-90,90,-s],bottomLeft:[90,270,0],bottomRight:[90,270,-s]}}}return t}function k(){var s,t,u;s=this;u=s.getDimensions();t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+u.height+"px; width:"+u.width+'px" />';s.elements.bgiframe=s.elements.wrapper.prepend(t).children(".qtip-bgiframe:first")}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var s;f(window).bind("resize scroll",function(t){clearTimeout(s);s=setTimeout(function(){if(t.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()}}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height()}for(i=0;i<f.fn.qtip.interfaces.length;i++){var u=f.fn.qtip.interfaces[i];if(u.status.rendered===true&&(u.options.position.type!=="static"||u.options.position.adjust.scroll&&t.type==="scroll"||u.options.position.adjust.resize&&t.type==="resize")){u.updatePosition(t,true)}}},100)});f(document).bind("mousedown.qtip",function(t){if(f(t.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var u=f(this).qtip("api");if(f(this).is(":visible")&&!u.status.disabled&&f(t.target).add(u.elements.target).length>1){u.hide(t)}})}})});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * jquery.string - Prototype string functions for jQuery
3
+ * (c) 2008 David E. Still (http://stilldesigning.com)
4
+ * Original Prototype extensions (c) 2005-2008 Sam Stephenson (http://prototypejs.org)
5
+ */
6
+ jQuery.__stringPrototype={JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"},blank:function(A){return/^\s*$/.test(this.s(A)||" ")},camelize:function(C){var A=this.s(C).split("-"),B;C=[A[0]];for(B=1;B<A.length;B++){C.push(A[B].charAt(0).toUpperCase()+A[B].substring(1))}C=C.join("");return this.r(arguments,0,C)},capitalize:function(A){A=this.s(A);A=A.charAt(0).toUpperCase()+A.substring(1).toLowerCase();return this.r(arguments,0,A)},dasherize:function(A){A=this.s(A).split("_").join("-");return this.r(arguments,0,A)},empty:function(A){return this.s(A)===""},endsWith:function(B,A){A=this.s(A);var C=A.length-B.length;return C>=0&&A.lastIndexOf(B)===C},escapeHTML:function(A){A=this.s(A).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return this.r(arguments,0,A)},evalJSON:function(sanitize,s){s=this.s(s);var json=this.unfilterJSON(false,s);try{if(!sanitize||this.isJSON(json)){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+s)},evalScripts:function(s){var scriptTags=this.extractScripts(this.s(s)),results=[];if(scriptTags.length>0){for(var i=0;i<scriptTags.length;i++){results.push(eval(scriptTags[i]))}}return results},extractScripts:function(C){var E=new RegExp(this.ScriptFragment,"img"),D=new RegExp(this.ScriptFragment,"im"),A=this.s(C).match(E)||[],F=[];if(A.length>0){for(var B=0;B<A.length;B++){F.push(A[B].match(D)[1]||"")}}return F},gsub:function(C,B,A){A=this.s(A);if(jQuery.isFunction(B)){A=this.sub(C,B,-1,A)}else{A=A.split(C).join(B)}return this.r(arguments,2,A)},include:function(B,A){return this.s(A).indexOf(B)>-1},inspect:function(B,C){C=this.s(C);var A;try{A=this.sub(/[\x00-\x1f\\]/,function(E){var F=jQuery.__stringPrototype.specialChar[E[0]];return F?F:"\\u00"+E[0].charCodeAt().toPaddedString(2,16)},-1,C)}catch(D){A=C}C=(B)?'"'+A.replace(/"/g,'\\"')+'"':"'"+A.replace(/'/g,"\\'")+"'";return this.r(arguments,1,C)},interpolate:function(F,E,C){C=this.s(C);if(!E){E=/(\#\{\s*(\w+)\s*\})/}var A=new RegExp(E.source,"g");var D=C.match(A),B;for(B=0;B<D.length;B++){C=C.replace(D[B],F[D[B].match(E)[2]])}return this.r(arguments,2,C)},isJSON:function(A){A=this.s(A);if(this.blank(A)){return false}A=A.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},scan:function(C,B,A){A=this.s(A);this.sub(C,B,-1,A);return this.r(arguments,2,A)},startsWith:function(B,A){return this.s(A).indexOf(B)===0},strip:function(A){A=jQuery.trim(this.s(A));return this.r(arguments,0,A)},stripScripts:function(A){A=this.s(A).replace(new RegExp(this.ScriptFragment,"img"),"");return this.r(arguments,0,A)},stripTags:function(A){A=this.s(A).replace(/<\/?[^>]+>/gi,"");return this.r(arguments,0,A)},sub:function(H,D,E,C){C=this.s(C);if(H.source&&!H.global){var A=(H.ignoreCase)?"ig":"g";A+=(H.multiline)?"m":"";H=new RegExp(H.source,A)}var G=C.split(H),F=C.match(H);if(jQuery.browser.msie){if(C.indexOf(F[0])==0){G.unshift("")}if(C.lastIndexOf(F[F.length-1])==C.length-F[F.length-1].length){G.push("")}}E=(E<0)?(G.length-1):E||1;C=G[0];for(var B=1;B<G.length;B++){if(B<=E){if(jQuery.isFunction(D)){C+=D(F[B-1]||F)+G[B]}else{C+=D+G[B]}}else{C+=(F[B-1]||F)+G[B]}}return this.r(arguments,3,C)},succ:function(A){A=this.s(A);A=A.slice(0,A.length-1)+String.fromCharCode(A.charCodeAt(A.length-1)+1);return this.r(arguments,0,A)},times:function(D,C){C=this.s(C);var A="";for(var B=0;B<D;B++){A+=C}return this.r(arguments,1,A)},toJSON:function(A){return this.r(arguments,0,this.inspect(true,this.s(A)))},toQueryParams:function(F,C){C=this.s(C);var E=C.substring(C.indexOf("?")+1).split("#")[0].split(F||"&"),H={},B,A,D,G;for(B=0;B<E.length;B++){G=E[B].split("=");A=decodeURIComponent(G[0]);D=(G[1])?decodeURIComponent(G[1]):undefined;if(H[A]){if(typeof H[A]=="string"){H[A]=[H[A]]}H[A].push(D)}else{H[A]=D}}return H},truncate:function(C,A,B){B=this.s(B);C=C||30;A=(!A)?"...":A;B=(B.length>C)?B.slice(0,C-A.length)+A:String(B);return this.r(arguments,2,B)},underscore:function(A){A=this.sub(/[A-Z]/,function(B){return"_"+B.toLowerCase()},-1,this.s(A));if(A.charAt(0)=="_"){A=A.substring(1)}return this.r(arguments,0,A)},unescapeHTML:function(A){A=this.stripTags(this.s(A)).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">");return this.r(arguments,0,A)},unfilterJSON:function(C,B){B=this.s(B);C=C||this.JSONFilter;var A=B.match(C);B=(A!==null)?A[1]:B;return this.r(arguments,1,jQuery.trim(B))},r:function(A,B,C){if(A.length>B||this.str===undefined){return C}else{this.str=""+C;return this}},s:function(A){if(A===""||A){return A}if(this.str===""||this.str){return this.str}return this}};jQuery.__stringPrototype.parseQuery=jQuery.__stringPrototype.toQueryParams;jQuery.string=function(A){if(A===String.prototype){jQuery.extend(String.prototype,jQuery.__stringPrototype)}else{return jQuery.extend({str:A},jQuery.__stringPrototype)}}
@@ -0,0 +1,2 @@
1
+
2
+ (function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
@@ -0,0 +1,224 @@
1
+ (function($) {
2
+
3
+ var addMethods = function(source) {
4
+ var ancestor = this.superclass && this.superclass.prototype;
5
+ var properties = $.keys(source);
6
+
7
+ if (!$.keys({ toString: true }).length) properties.push("toString", "valueOf");
8
+
9
+ for (var i = 0, length = properties.length; i < length; i++) {
10
+ var property = properties[i], value = source[property];
11
+ if (ancestor && $.isFunction(value) && $.argumentNames(value)[0] == "$super") {
12
+
13
+ var method = value, value = $.extend($.wrap((function(m) {
14
+ return function() { return ancestor[m].apply(this, arguments) };
15
+ })(property), method), {
16
+ valueOf: function() { return method },
17
+ toString: function() { return method.toString() }
18
+ });
19
+ }
20
+ this.prototype[property] = value;
21
+ }
22
+
23
+ return this;
24
+ }
25
+
26
+ $.extend({
27
+ keys: function(obj) {
28
+ var keys = [];
29
+ for (var key in obj) keys.push(key);
30
+ return keys;
31
+ },
32
+
33
+ argumentNames: function(func) {
34
+ var names = func.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(/, ?/);
35
+ return names.length == 1 && !names[0] ? [] : names;
36
+ },
37
+
38
+ bind: function(func, scope) {
39
+ return function() {
40
+ return func.apply(scope, $.makeArray(arguments));
41
+ }
42
+ },
43
+
44
+ wrap: function(func, wrapper) {
45
+ var __method = func;
46
+ return function() {
47
+ return wrapper.apply(this, [$.bind(__method, this)].concat($.makeArray(arguments)));
48
+ }
49
+ },
50
+
51
+ klass: function() {
52
+ var parent = null, properties = $.makeArray(arguments);
53
+ if ($.isFunction(properties[0])) parent = properties.shift();
54
+
55
+ var klass = function() {
56
+ this.initialize.apply(this, arguments);
57
+ };
58
+
59
+ klass.superclass = parent;
60
+ klass.subclasses = [];
61
+ klass.addMethods = addMethods;
62
+
63
+ if (parent) {
64
+ var subclass = function() { };
65
+ subclass.prototype = parent.prototype;
66
+ klass.prototype = new subclass;
67
+ parent.subclasses.push(klass);
68
+ }
69
+
70
+ for (var i = 0; i < properties.length; i++)
71
+ klass.addMethods(properties[i]);
72
+
73
+ if (!klass.prototype.initialize)
74
+ klass.prototype.initialize = function() {};
75
+
76
+ klass.prototype.constructor = klass;
77
+
78
+ return klass;
79
+ },
80
+ delegate: function(rules) {
81
+ return function(e) {
82
+ var target = $(e.target), parent = null;
83
+ for (var selector in rules) {
84
+ if (target.is(selector) || ((parent = target.parents(selector)) && parent.length > 0)) {
85
+ return rules[selector].apply(this, [parent || target].concat($.makeArray(arguments)));
86
+ }
87
+ parent = null;
88
+ }
89
+ }
90
+ }
91
+ });
92
+
93
+ var bindEvents = function(instance) {
94
+ for (var member in instance) {
95
+ if (member.match(/^on(.+)/) && typeof instance[member] == 'function') {
96
+ instance.element.bind(RegExp.$1, $.bind(instance[member], instance));
97
+ }
98
+ }
99
+ }
100
+
101
+ var behaviorWrapper = function(behavior) {
102
+ return $.klass(behavior, {
103
+ initialize: function($super, element, args) {
104
+ this.element = $(element);
105
+ if ($super) $super.apply(this, args);
106
+ }
107
+ });
108
+ }
109
+
110
+ var attachBehavior = function(el, behavior, args) {
111
+ var wrapper = behaviorWrapper(behavior);
112
+ instance = new wrapper(el, args);
113
+
114
+ bindEvents(instance);
115
+
116
+ if (!behavior.instances) behavior.instances = [];
117
+
118
+ behavior.instances.push(instance);
119
+
120
+ return instance;
121
+ };
122
+
123
+
124
+ $.fn.extend({
125
+ attach: function() {
126
+ var args = $.makeArray(arguments), behavior = args.shift();
127
+
128
+ if ($.livequery && this.selector) {
129
+ return this.livequery(function() {
130
+ attachBehavior(this, behavior, args);
131
+ });
132
+ } else {
133
+ return this.each(function() {
134
+ attachBehavior(this, behavior, args);
135
+ });
136
+ }
137
+ },
138
+ attachAndReturn: function() {
139
+ var args = $.makeArray(arguments), behavior = args.shift();
140
+
141
+ return $.map(this, function(el) {
142
+ return attachBehavior(el, behavior, args);
143
+ });
144
+ },
145
+ delegate: function(type, rules) {
146
+ return this.bind(type, $.delegate(rules));
147
+ },
148
+ attached: function(behavior) {
149
+ var instances = [];
150
+
151
+ if (!behavior.instances) return instances;
152
+
153
+ this.each(function(i, element) {
154
+ $.each(behavior.instances, function(i, instance) {
155
+ if (instance.element.get(0) == element) instances.push(instance);
156
+ });
157
+ });
158
+
159
+ return instances;
160
+ },
161
+ firstAttached: function(behavior) {
162
+ return this.attached(behavior)[0];
163
+ }
164
+ });
165
+
166
+ Remote = $.klass({
167
+ initialize: function(options) {
168
+ if (this.element.attr('nodeName') == 'FORM') this.element.attach(Remote.Form, options);
169
+ else this.element.attach(Remote.Link, options);
170
+ }
171
+ });
172
+
173
+ Remote.Base = $.klass({
174
+ initialize : function(options) {
175
+ this.options = options;
176
+ },
177
+ _makeRequest : function(options) {
178
+ $.ajax(options);
179
+ return false;
180
+ }
181
+ });
182
+
183
+ Remote.Link = $.klass(Remote.Base, {
184
+ onclick: function() {
185
+ var options = $.extend({
186
+ url: this.element.attr('href'),
187
+ type: 'GET'
188
+ }, this.options);
189
+ return this._makeRequest(options);
190
+ }
191
+ });
192
+
193
+ Remote.Form = $.klass(Remote.Base, {
194
+ onclick: function(e) {
195
+ var target = e.target;
196
+
197
+ if ($.inArray(target.nodeName.toLowerCase(), ['input', 'button']) >= 0 && target.type.match(/submit|image/))
198
+ this._submitButton = target;
199
+ },
200
+ onsubmit: function() {
201
+ var data = this.element.serializeArray();
202
+
203
+ if (this._submitButton) data.push({ name: this._submitButton.name, value: this._submitButton.value });
204
+
205
+ var options = $.extend({
206
+ url : this.element.attr('action'),
207
+ type : this.element.attr('method') || 'GET',
208
+ data : data
209
+ }, this.options);
210
+
211
+ this._makeRequest(options);
212
+
213
+ return false;
214
+ }
215
+ });
216
+
217
+ $.ajaxSetup({
218
+ beforeSend: function(xhr) {
219
+ if (!this.dataType)
220
+ xhr.setRequestHeader("Accept", "text/javascript, text/html, application/xml, text/xml, */*");
221
+ }
222
+ });
223
+
224
+ })(jQuery);
@@ -0,0 +1,86 @@
1
+ // Copyright 2007, Google Inc.
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice,
7
+ // this list of conditions and the following disclaimer.
8
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
9
+ // this list of conditions and the following disclaimer in the documentation
10
+ // and/or other materials provided with the distribution.
11
+ // 3. Neither the name of Google Inc. nor the names of its contributors may be
12
+ // used to endorse or promote products derived from this software without
13
+ // specific prior written permission.
14
+ //
15
+ // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
16
+ // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17
+ // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
18
+ // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
+ // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21
+ // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22
+ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23
+ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24
+ // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+ //
26
+ // Sets up google.gears.*, which is *the only* supported way to access Gears.
27
+ //
28
+ // Circumvent this file at your own risk!
29
+ //
30
+ // In the future, Gears may automatically define google.gears.* without this
31
+ // file. Gears may use these objects to transparently fix bugs and compatibility
32
+ // issues. Applications that use the code below will continue to work seamlessly
33
+ // when that happens.
34
+
35
+ (function() {
36
+ // We are already defined. Hooray!
37
+ if (window.google && google.gears) {
38
+ return;
39
+ }
40
+
41
+ var factory = null;
42
+
43
+ // Firefox
44
+ if (typeof GearsFactory != 'undefined') {
45
+ factory = new GearsFactory();
46
+ } else {
47
+ // IE
48
+ try {
49
+ factory = new ActiveXObject('Gears.Factory');
50
+ // privateSetGlobalObject is only required and supported on WinCE.
51
+ if (factory.getBuildInfo().indexOf('ie_mobile') != -1) {
52
+ factory.privateSetGlobalObject(this);
53
+ }
54
+ } catch (e) {
55
+ // Safari
56
+ if ((typeof navigator.mimeTypes != 'undefined')
57
+ && navigator.mimeTypes["application/x-googlegears"]) {
58
+ factory = document.createElement("object");
59
+ factory.style.display = "none";
60
+ factory.width = 0;
61
+ factory.height = 0;
62
+ factory.type = "application/x-googlegears";
63
+ document.documentElement.appendChild(factory);
64
+ }
65
+ }
66
+ }
67
+
68
+ // *Do not* define any objects if Gears is not installed. This mimics the
69
+ // behavior of Gears defining the objects in the future.
70
+ if (!factory) {
71
+ return;
72
+ }
73
+
74
+ // Now set up the objects, being careful not to overwrite anything.
75
+ //
76
+ // Note: In Internet Explorer for Windows Mobile, you can't add properties to
77
+ // the window object. However, global objects are automatically added as
78
+ // properties of the window object in all browsers.
79
+ if (!window.google) {
80
+ google = {};
81
+ }
82
+
83
+ if (!google.gears) {
84
+ google.gears = {factory: factory};
85
+ }
86
+ })();
@@ -0,0 +1,202 @@
1
+ (function(c) {
2
+ var d = {};
3
+ function a(e) {
4
+ return plupload.translate(e) || e
5
+ }
6
+ function b(f, e) {
7
+ e.contents().each(function(g, h) {
8
+ h = c(h);
9
+ if (!h.is(".plupload")) {
10
+ h.remove()
11
+ }
12
+ });
13
+ e.prepend('<div class="plupload_wrapper plupload_scroll"><div id="' + f + '_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">' + a("Select files") + '</div><div class="plupload_header_text">' + a("Add files to the upload queue and click the start button.") + '</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">' + a("Filename") + '</div><div class="plupload_file_action">&nbsp;</div><div class="plupload_file_status"><span>' + a("Status") + '</span></div><div class="plupload_file_size">' + a("Size") + '</div><div class="plupload_clearer">&nbsp;</div></div><ul id="' + f + '_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add">' + a("Add files") + '</a><a href="#" class="plupload_button plupload_start">' + a("Start upload") + '</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer">&nbsp;</div></div></div></div></div><input type="hidden" id="' + f + '_count" name="' + f + '_count" value="0" /></div>')
14
+ }
15
+ c.fn.pluploadQueue = function(e) {
16
+ if (e) {
17
+ this.each(function() {
18
+ var j,
19
+ i,
20
+ k;
21
+ i = c(this);
22
+ k = i.attr("id");
23
+ if (!k) {
24
+ k = plupload.guid();
25
+ i.attr("id", k)
26
+ }
27
+ j = new plupload.Uploader(c.extend({
28
+ dragdrop: true,
29
+ container: k
30
+ },
31
+ e));
32
+ if (e.preinit) {
33
+ e.preinit(j)
34
+ }
35
+ d[k] = j;
36
+ function h(l) {
37
+ var m;
38
+ if (l.status == plupload.DONE) {
39
+ m = "plupload_done"
40
+ }
41
+ if (l.status == plupload.FAILED) {
42
+ m = "plupload_failed"
43
+ }
44
+ if (l.status == plupload.QUEUED) {
45
+ m = "plupload_delete"
46
+ }
47
+ if (l.status == plupload.UPLOADING) {
48
+ m = "plupload_uploading"
49
+ }
50
+ c("#" + l.id).attr("class", m).find("a").css("display", "block")
51
+ }
52
+ function f() {
53
+ c("span.plupload_total_status", i).html(j.total.percent + "%");
54
+ c("div.plupload_progress_bar", i).css("width", j.total.percent + "%");
55
+ c("span.plupload_upload_status", i).text("Uploaded " + j.total.uploaded + "/" + j.files.length + " files");
56
+ if (j.total.uploaded == j.files.length) {
57
+ j.stop()
58
+ }
59
+ }
60
+ function g() {
61
+ var m = c("ul.plupload_filelist", i).html(""),
62
+ n = 0,
63
+ l;
64
+ c.each(j.files,
65
+ function(p, o) {
66
+ l = "";
67
+ if (o.status == plupload.DONE) {
68
+ if (o.target_name) {
69
+ l += '<input type="hidden" name="' + k + "_" + n + '_tmpname" value="' + plupload.xmlEncode(o.target_name) + '" />'
70
+ }
71
+ l += '<input type="hidden" name="' + k + "_" + n + '_name" value="' + plupload.xmlEncode(o.name) + '" />';
72
+ l += '<input type="hidden" name="' + k + "_" + n + '_status" value="' + (o.status == plupload.DONE ? "done": "failed") + '" />';
73
+ n++;
74
+ c("#" + k + "_count").val(n)
75
+ }
76
+ m.append('<li id="' + o.id + '"><div class="plupload_file_name"><span>' + o.name + '</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">' + o.percent + '%</div><div class="plupload_file_size">' + plupload.formatSize(o.size) + '</div><div class="plupload_clearer">&nbsp;</div>' + l + "</li>");
77
+ h(o);
78
+ c("#" + o.id + ".plupload_delete a").click(function(q) {
79
+ c("#" + o.id).remove();
80
+ j.removeFile(o);
81
+ q.preventDefault()
82
+ })
83
+ });
84
+ c("span.plupload_total_file_size", i).html(plupload.formatSize(j.total.size));
85
+ if (j.total.queued === 0) {
86
+ c("span.plupload_add_text", i).text(a("Add files."))
87
+ } else {
88
+ c("span.plupload_add_text", i).text(j.total.queued + " files queued.")
89
+ }
90
+ c("a.plupload_start", i).toggleClass("plupload_disabled", j.files.length === 0);
91
+ m[0].scrollTop = m[0].scrollHeight;
92
+ f();
93
+ if (!j.files.length && j.features.dragdrop && j.settings.dragdrop) {
94
+ c("#" + k + "_filelist").append('<li class="plupload_droptext">' + a("Drag files here.") + "</li>")
95
+ }
96
+ }
97
+ j.bind("UploadFile",
98
+ function(l, m) {
99
+ c("#" + m.id).addClass("plupload_current_file")
100
+ });
101
+ j.bind("Init",
102
+ function(l, m) {
103
+ b(k, i);
104
+ if (!e.unique_names && e.rename) {
105
+ c("#" + k + "_filelist div.plupload_file_name span", i).live("click",
106
+ function(s) {
107
+ var q = c(s.target),
108
+ o,
109
+ r,
110
+ n,
111
+ p = "";
112
+ o = l.getFile(q.parents("li")[0].id);
113
+ n = o.name;
114
+ r = /^(.+)(\.[^.]+)$/.exec(n);
115
+ if (r) {
116
+ n = r[1];
117
+ p = r[2]
118
+ }
119
+ q.hide().after('<input type="text" />');
120
+ q.next().val(n).focus().blur(function() {
121
+ q.show().next().remove()
122
+ }).keydown(function(u) {
123
+ var t = c(this);
124
+ if (u.keyCode == 13) {
125
+ u.preventDefault();
126
+ o.name = t.val() + p;
127
+ q.text(o.name);
128
+ t.blur()
129
+ }
130
+ })
131
+ })
132
+ }
133
+ c("a.plupload_add", i).attr("id", k + "_browse");
134
+ l.settings.browse_button = k + "_browse";
135
+ if (l.features.dragdrop && l.settings.dragdrop) {
136
+ l.settings.drop_element = k + "_filelist";
137
+ c("#" + k + "_filelist").append('<li class="plupload_droptext">' + a("Drag files here.") + "</li>")
138
+ }
139
+ c("#" + k + "_container").attr("title", "Using runtime: " + m.runtime);
140
+ c("a.plupload_start", i).click(function(n) {
141
+ if (!c(this).hasClass("plupload_disabled")) {
142
+ j.start()
143
+ }
144
+ n.preventDefault()
145
+ });
146
+ c("a.plupload_stop", i).click(function(n) {
147
+ j.stop();
148
+ n.preventDefault()
149
+ });
150
+ c("a.plupload_start", i).addClass("plupload_disabled")
151
+ });
152
+ j.init();
153
+ if (e.setup) {
154
+ e.setup(j)
155
+ }
156
+ j.bind("Error",
157
+ function(l, o) {
158
+ var m = o.file,
159
+ n;
160
+ if (m) {
161
+ n = o.message;
162
+ if (o.details) {
163
+ n += " (" + o.details + ")"
164
+ }
165
+ c("#" + m.id).attr("class", "plupload_failed").find("a").css("display", "block").attr("title", n)
166
+ }
167
+ });
168
+ j.bind("StateChanged",
169
+ function() {
170
+ if (j.state === plupload.STARTED) {
171
+ c("li.plupload_delete a,div.plupload_buttons", i).hide();
172
+ c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop", i).css("display", "block");
173
+ c("span.plupload_upload_status", i).text("Uploaded 0/" + j.files.length + " files")
174
+ } else {
175
+ c("a.plupload_stop,div.plupload_progress", i).hide();
176
+ c("a.plupload_delete", i).css("display", "block")
177
+ }
178
+ });
179
+ j.bind("QueueChanged", g);
180
+ j.bind("StateChanged",
181
+ function(l) {
182
+ if (l.state == plupload.STOPPED) {
183
+ g()
184
+ }
185
+ });
186
+ j.bind("FileUploaded",
187
+ function(l, m) {
188
+ h(m)
189
+ });
190
+ j.bind("UploadProgress",
191
+ function(l, m) {
192
+ c("#" + m.id + " div.plupload_file_status", i).html(m.percent + "%");
193
+ h(m);
194
+ f()
195
+ })
196
+ });
197
+ return this
198
+ } else {
199
+ return d[c(this[0]).attr("id")]
200
+ }
201
+ }
202
+ })(jQuery);