yui-rails-asset 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +21 -0
- data/README +17 -0
- data/lib/yui/rails.rb +29 -0
- data/lib/yui/rails/engine.rb +10 -0
- data/lib/yui/rails/version.rb +6 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/animation/animation-debug.js +1396 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/animation/animation-min.js +23 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/animation/animation.js +1392 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/ajax-loader.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/asc.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/autocomplete.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/back-h.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/back-v.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bar-h.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bar-v.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bg-h.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bg-v.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/blankimage.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/button.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/calendar.css +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/carousel.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/check0.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/check1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/check2.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/colorpicker.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/container.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/datatable.css +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/desc.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/dt-arrow-dn.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/dt-arrow-up.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor-knob.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor-sprite-active.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor-sprite.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor.css +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/header_background.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/hue_bg.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/imagecropper.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/layout.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/layout_sprite.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/loading.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/logger.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menu-button-arrow-disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menu-button-arrow.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menu.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menubaritem_submenuindicator.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menubaritem_submenuindicator_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_checkbox.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_checkbox_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_submenuindicator.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_submenuindicator_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/paginator.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/picker_mask.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/profilerviewer.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/progressbar.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/resize.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/simpleeditor.css +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/skin.css +36 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/slider.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-active.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-focus.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-hover.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/sprite.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/sprite.psd +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/tabview.css +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/treeview-loading.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/treeview-sprite.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/treeview.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/wait.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/yuitest.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/assets/autocomplete-core.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/assets/skins/sam/autocomplete-skin.css +57 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/assets/skins/sam/autocomplete.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/autocomplete-debug.js +3009 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/autocomplete-min.js +12 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/autocomplete.js +2966 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/base/base-min.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/base/base.css +131 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/button-core.css +44 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/button-skin.css +219 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/button.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/menu-button-arrow-disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/menu-button-arrow.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-active.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-focus.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-hover.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/button-debug.js +4694 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/button-min.js +11 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/button/button.js +4633 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calendar-core.css +132 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calendar.css +320 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calgrad.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/callt.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calrt.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calx.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/skins/sam/calendar-skin.css +361 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/skins/sam/calendar.css +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/calendar-debug.js +7324 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/calendar-min.js +18 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/calendar/calendar.js +7294 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/ajax-loader.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/carousel-core.css +88 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/skins/sam/ajax-loader.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/skins/sam/carousel-skin.css +142 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/skins/sam/carousel.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/carousel-debug.js +4390 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/carousel-min.js +12 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/carousel/carousel.js +4349 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/charts/assets/charts.swf +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/charts/charts-debug.js +2061 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/charts/charts-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/charts/charts.js +2060 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/colorpicker-core.css +6 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/hue_thumb.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/picker_mask.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/picker_thumb.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/colorpicker-skin.css +105 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/colorpicker.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/hue_bg.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/picker_mask.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/colorpicker-debug.js +1783 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/colorpicker-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/colorpicker.js +1763 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection-debug.js +1576 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection.js +1546 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection.swf +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection_core-debug.js +980 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection_core-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection_core.js +957 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/alrt16_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/blck16_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/close12_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/container-core.css +176 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/container.css +324 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/hlp16_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/info16_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/skins/sam/container-skin.css +242 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/skins/sam/container.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/tip16_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/warn16_1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/container-debug.js +9076 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/container-min.js +19 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/container.js +9052 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/container_core-debug.js +5136 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/container_core-min.js +14 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/container/container_core.js +5126 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/cookie/cookie-debug.js +482 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/cookie/cookie-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/cookie/cookie.js +482 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datasource/datasource-debug.js +3067 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datasource/datasource-min.js +12 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datasource/datasource.js +2996 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/datatable-core.css +93 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/datatable.css +49 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/datatable-skin.css +240 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/datatable.css +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/dt-arrow-dn.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/dt-arrow-up.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/datatable-debug.js +17360 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/datatable-min.js +29 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datatable/datatable.js +17122 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datemath/datemath-debug.js +408 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datemath/datemath-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/datemath/datemath.js +408 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/dom/dom-debug.js +1872 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/dom/dom-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/dom/dom.js +1832 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/dragdrop/dragdrop-debug.js +3710 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/dragdrop/dragdrop-min.js +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/dragdrop/dragdrop.js +3601 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/editor-core.css +602 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/simpleeditor-core.css +602 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/blankimage.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-knob.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-skin.css +711 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-sprite-active.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-sprite.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor.css +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/simpleeditor-skin.css +711 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/simpleeditor.css +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/editor-debug.js +9557 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/editor-min.js +30 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/editor.js +9447 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/simpleeditor-debug.js +7493 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/simpleeditor-min.js +24 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/editor/simpleeditor.js +7406 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/element-delegate/element-delegate-debug.js +141 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/element-delegate/element-delegate-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/element-delegate/element-delegate.js +138 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/element/element-debug.js +1106 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/element/element-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/element/element.js +1090 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-delegate/event-delegate-debug.js +283 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-delegate/event-delegate-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-delegate/event-delegate.js +281 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-mouseenter/event-mouseenter-debug.js +219 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-mouseenter/event-mouseenter-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-mouseenter/event-mouseenter.js +219 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-simulate/event-simulate-debug.js +622 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-simulate/event-simulate-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event-simulate/event-simulate.js +622 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event/event-debug.js +2524 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event/event-min.js +11 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/event/event.js +2500 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/fonts/fonts-min.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/fonts/fonts.css +56 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/get/get-debug.js +773 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/get/get-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/get/get.js +755 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/grids/grids-min.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/grids/grids.css +467 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/history/assets/blank.html +1 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/history/history-debug.js +808 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/history/history-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/history/history.js +808 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/assets/imagecropper-core.css +33 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/assets/skins/sam/imagecropper-skin.css +16 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/assets/skins/sam/imagecropper.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/imagecropper-debug.js +907 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/imagecropper-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/imagecropper.js +889 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imageloader/imageloader-debug.js +487 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imageloader/imageloader-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/imageloader/imageloader.js +481 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/json/json-debug.js +538 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/json/json-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/json/json.js +538 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/layout-core.css +158 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/skins/sam/layout-skin.css +207 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/skins/sam/layout.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/skins/sam/layout_sprite.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/layout-debug.js +2305 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/layout-min.js +11 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/layout/layout.js +2290 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/logger-core.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/logger.css +57 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/skins/sam/logger-skin.css +55 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/skins/sam/logger.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/logger-debug.js +2104 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/logger-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/logger/logger.js +2104 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu-core.css +242 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu.css +503 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_down_arrow.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_down_arrow_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_up_arrow.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_up_arrow_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menubaritem_submenuindicator.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menubaritem_submenuindicator_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menubaritem_submenuindicator_selected.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_checkbox.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_checkbox_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_checkbox_selected.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_submenuindicator.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_submenuindicator_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_submenuindicator_selected.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menu-skin.css +339 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menu.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menubaritem_submenuindicator.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_checkbox.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_checkbox_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_submenuindicator.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/menu-debug.js +9870 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/menu-min.js +16 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/menu/menu.js +9823 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/paginator/assets/paginator-core.css +6 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/paginator/assets/skins/sam/paginator-skin.css +78 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/paginator/assets/skins/sam/paginator.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/paginator/paginator-debug.js +2393 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/paginator/paginator-min.js +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/paginator/paginator.js +2393 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profiler/profiler-debug.js +557 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profiler/profiler-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profiler/profiler.js +557 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/profilerviewer-core.css +6 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/asc.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/desc.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/header_background.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/profilerviewer-skin.css +167 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/profilerviewer.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/wait.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/profilerviewer-debug.js +1229 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/profilerviewer-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/profilerviewer.js +1192 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/progressbar-core.css +85 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/back-h.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/back-v.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/bar-h.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/bar-v.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/progressbar-skin.css +56 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/progressbar.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/progressbar-debug.js +691 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/progressbar-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/progressbar.js +677 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/reset-fonts-grids/reset-fonts-grids.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/reset-fonts/reset-fonts.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/reset/reset-min.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/reset/reset.css +142 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/resize-core.css +173 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/skins/sam/layout_sprite.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/skins/sam/resize-skin.css +142 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/skins/sam/resize.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/resize-debug.js +1749 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/resize-min.js +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/resize/resize.js +1689 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/selector/selector-debug.js +651 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/selector/selector-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/selector/selector.js +644 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-fader.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-h.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-v-e.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-v.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/left-thumb.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/right-thumb.png +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/bg-h.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/bg-v.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/slider-skin.css +24 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/slider.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/slider-core.css +17 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/slider-skin.css +20 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-bar.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-e.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-fader.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-n.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-s.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-w.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/slider-debug.js +2114 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/slider-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/slider/slider.js +2068 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/storage/storage-debug.js +1185 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/storage/storage-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/storage/storage.js +1183 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/stylesheet/stylesheet-debug.js +648 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/stylesheet/stylesheet-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/stylesheet/stylesheet.js +645 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swf/swf-debug.js +269 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swf/swf-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swf/swf.js +268 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfdetect/swfdetect-debug.js +93 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfdetect/swfdetect-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfdetect/swfdetect.js +93 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swf.js +238 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore-debug.js +470 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore.js +453 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore.swf +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/border_tabs.css +54 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/loading.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/skin-sam.css +77 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/skins/sam/tabview-skin.css +186 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/skins/sam/tabview.css +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/tabview-core.css +133 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/tabview.css +77 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/tabview-debug.js +995 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/tabview-min.js +8 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/tabview/tabview.js +987 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/check0.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/check1.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/check2.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/loading.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview-loading.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview-skin.css +249 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview-sprite.gif +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/treeview-core.css +6 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/treeview-debug.js +4058 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/treeview-min.js +12 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/treeview/treeview.js +3989 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/uploader/assets/uploader.swf +0 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/uploader/uploader-debug.js +1072 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/uploader/uploader-min.js +15 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/uploader/uploader.js +1069 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/utilities/utilities.js +39 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yahoo-dom-event/yahoo-dom-event.js +14 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yahoo/yahoo-debug.js +1075 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yahoo/yahoo-min.js +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yahoo/yahoo.js +1075 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader-dom-event/yuiloader-dom-event.js +17 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader/yuiloader-debug.js +3879 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader/yuiloader-min.js +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader/yuiloader.js +3879 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/skins/sam/yuitest-skin.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/skins/sam/yuitest.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/testlogger.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/yuitest-core.css +7 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest-debug.js +2741 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest-min.js +10 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest.js +2741 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest_core-debug.js +1976 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest_core-min.js +9 -0
- data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest_core.js +1976 -0
- metadata +470 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 2.8.1
|
6
|
+
*/
|
7
|
+
(function(){YAHOO.widget.ProfilerViewer=function(H,G){G=G||{};if(arguments.length==1&&!YAHOO.lang.isString(H)&&!H.nodeName){G=H;H=G.element||null;}if(!H&&!G.element){H=this._createProfilerViewerElement();}YAHOO.widget.ProfilerViewer.superclass.constructor.call(this,H,G);this._init();};YAHOO.extend(YAHOO.widget.ProfilerViewer,YAHOO.util.Element);YAHOO.lang.augmentObject(YAHOO.widget.ProfilerViewer,{CLASS:"yui-pv",CLASS_DASHBOARD:"yui-pv-dashboard",CLASS_REFRESH:"yui-pv-refresh",CLASS_BUSY:"yui-pv-busy",CLASS_CHART_CONTAINER:"yui-pv-chartcontainer",CLASS_CHART:"yui-pv-chart",CLASS_CHART_LEGEND:"yui-pv-chartlegend",CLASS_TABLE:"yui-pv-table",STRINGS:{title:"YUI Profiler (beta)",buttons:{viewprofiler:"View Profiler Data",hideprofiler:"Hide Profiler Report",showchart:"Show Chart",hidechart:"Hide Chart",refreshdata:"Refresh Data"},colHeads:{fn:["Function/Method",null],calls:["Calls",40],avg:["Average",80],min:["Shortest",70],max:["Longest",70],total:["Total Time",70],pct:["Percent",70]},millisecondsAbbrev:"ms",initMessage:"initialiazing chart...",installFlashMessage:"Unable to load Flash content. The YUI Charts Control requires Flash Player 9.0.45 or higher. You can download the latest version of Flash Player from the <a href='http://www.adobe.com/go/getflashplayer'>Adobe Flash Player Download Center</a>."},timeAxisLabelFunction:function(H){var G=(H===Math.floor(H))?H:(Math.round(H*1000))/1000;return(G+" "+YAHOO.widget.ProfilerViewer.STRINGS.millisecondsAbbrev);},percentAxisLabelFunction:function(H){var G=(H===Math.floor(H))?H:(Math.round(H*100))/100;return(G+"%");}},true);var C=YAHOO.util.Dom;var A=YAHOO.util.Event;var B=YAHOO.tool.Profiler;var E=YAHOO.widget.ProfilerViewer;var D=E.prototype;D.refreshData=function(){this.fireEvent("dataRefreshEvent");};D.getHeadEl=function(){return(this._headEl)?C.get(this._headEl):false;};D.getBodyEl=function(){return(this._bodyEl)?C.get(this._bodyEl):false;};D.getChartEl=function(){return(this._chartEl)?C.get(this._chartEl):false;};D.getTableEl=function(){return(this._tableEl)?C.get(this._tableEl):false;};D.getDataTable=function(){return this._dataTable;};D.getChart=function(){return this._chart;};D._rendered=false;D._headEl=null;D._bodyEl=null;D._toggleVisibleEl=null;D._busyEl=null;D._busy=false;D._tableEl=null;D._dataTable=null;D._chartEl=null;D._chartLegendEl=null;D._chartElHeight=250;D._chart=null;D._chartInitialized=false;D._init=function(){this.createEvent("dataRefreshEvent");this.createEvent("renderEvent");this.on("dataRefreshEvent",this._refreshDataTable,this,true);this._initLauncherDOM();if(this.get("showChart")){this.on("sortedByChange",this._refreshChart);}};D._createProfilerViewerElement=function(){var G=document.createElement("div");document.body.insertBefore(G,document.body.firstChild);C.addClass(G,this.SKIN_CLASS);C.addClass(G,E.CLASS);return G;};D.toString=function(){return"ProfilerViewer "+(this.get("id")||this.get("tagName"));};D._toggleVisible=function(){var G=(this.get("visible"))?false:true;this.set("visible",G);};D._show=function(){if(!this._busy){this._setBusyState(true);if(!this._rendered){var G=new YAHOO.util.YUILoader();if(this.get("base")){G.base=this.get("base");}var H=["datatable"];if(this.get("showChart")){H.push("charts");}G.insert({require:H,onSuccess:function(){this._render();},scope:this});}else{var I=this.get("element");C.removeClass(I,"yui-pv-minimized");this._toggleVisibleEl.innerHTML=E.STRINGS.buttons.hideprofiler;C.addClass(I,"yui-pv-null");C.removeClass(I,"yui-pv-null");this.refreshData();}}};D._hide=function(){this._toggleVisibleEl.innerHTML=E.STRINGS.buttons.viewprofiler;C.addClass(this.get("element"),"yui-pv-minimized");};D._render=function(){C.removeClass(this.get("element"),"yui-pv-minimized");this._initViewerDOM();this._initDataTable();if(this.get("showChart")){this._initChartDOM();this._initChart();}this._rendered=true;this._toggleVisibleEl.innerHTML=E.STRINGS.buttons.hideprofiler;this.fireEvent("renderEvent");};D._initLauncherDOM=function(){var I=this.get("element");C.addClass(I,E.CLASS);C.addClass(I,"yui-pv-minimized");this._headEl=document.createElement("div");C.addClass(this._headEl,"hd");var H=E.STRINGS.buttons;var G=(this.get("visible"))?H.hideprofiler:H.viewprofiler;this._toggleVisibleEl=this._createButton(G,this._headEl);this._refreshEl=this._createButton(H.refreshdata,this._headEl);C.addClass(this._refreshEl,E.CLASS_REFRESH);this._busyEl=document.createElement("span");this._headEl.appendChild(this._busyEl);var J=document.createElement("h4");J.innerHTML=E.STRINGS.title;this._headEl.appendChild(J);I.appendChild(this._headEl);A.on(this._toggleVisibleEl,"click",this._toggleVisible,this,true);A.on(this._refreshEl,"click",function(){if(!this._busy){this._setBusyState(true);this.fireEvent("dataRefreshEvent");}},this,true);};D._initViewerDOM=function(){var G=this.get("element");this._bodyEl=document.createElement("div");C.addClass(this._bodyEl,"bd");this._tableEl=document.createElement("div");C.addClass(this._tableEl,E.CLASS_TABLE);this._bodyEl.appendChild(this._tableEl);G.appendChild(this._bodyEl);};D._initChartDOM=function(){this._chartContainer=document.createElement("div");C.addClass(this._chartContainer,E.CLASS_CHART_CONTAINER);var H=document.createElement("div");C.addClass(H,E.CLASS_CHART_LEGEND);var G=document.createElement("div");this._chartLegendEl=document.createElement("dl");this._chartLegendEl.innerHTML="<dd>"+E.STRINGS.initMessage+"</dd>";this._chartEl=document.createElement("div");C.addClass(this._chartEl,E.CLASS_CHART);var I=document.createElement("p");I.innerHTML=E.STRINGS.installFlashMessage;this._chartEl.appendChild(I);this._chartContainer.appendChild(H);H.appendChild(G);G.appendChild(this._chartLegendEl);this._chartContainer.appendChild(this._chartEl);this._bodyEl.insertBefore(this._chartContainer,this._tableEl);};D._createButton=function(I,J,H){var G=document.createElement("a");G.innerHTML=G.title=I;if(J){if(!H){J.appendChild(G);}else{J.insertBefore(G,J.firstChild);}}return G;};D._setBusyState=function(G){if(G){C.addClass(this._busyEl,E.CLASS_BUSY);
|
8
|
+
this._busy=true;}else{C.removeClass(this._busyEl,E.CLASS_BUSY);this._busy=false;}};D._genSortFunction=function(H,G){var J=H;var I=G;return function(L,K){if(I==YAHOO.widget.DataTable.CLASS_ASC){return L[J]-K[J];}else{return((L[J]-K[J])*-1);}};};var F=function(G){var I=0;for(var H=0;H<G.length;I+=G[H++]){}return I;};D._getProfilerData=function(){var L=B.getFullReport();var N=[];var H=0;for(name in L){if(YAHOO.lang.hasOwnProperty(L,name)){var G=L[name];var I={};I.fn=name;I.points=G.points.slice();I.calls=G.calls;I.min=G.min;I.max=G.max;I.avg=G.avg;I.total=F(I.points);I.points=G.points;var P=this.get("filter");if((!P)||(P(I))){N.push(I);H+=I.total;}}}for(var M=0,K=N.length;M<K;M++){N[M].pct=(H)?(N[M].total*100)/H:0;}var O=this.get("sortedBy");var Q=O.key;var J=O.dir;N.sort(this._genSortFunction(Q,J));return N;};D._initDataTable=function(){var P=this;this._dataSource=new YAHOO.util.DataSource(function(){return P._getProfilerData.call(P);},{responseType:YAHOO.util.DataSource.TYPE_JSARRAY,maxCacheEntries:0});var H=this._dataSource;H.responseSchema={fields:["fn","avg","calls","max","min","total","pct","points"]};var O=function(S,R,T,U){var Q=(U===Math.floor(U))?U:(Math.round(U*1000))/1000;S.innerHTML=Q+" "+E.STRINGS.millisecondsAbbrev;};var N=function(S,R,T,U){var Q=(U===Math.floor(U))?U:(Math.round(U*100))/100;S.innerHTML=Q+"%";};var M=YAHOO.widget.DataTable.CLASS_ASC;var J=YAHOO.widget.DataTable.CLASS_DESC;var K=E.STRINGS.colHeads;var I=O;var L=[{key:"fn",sortable:true,label:K.fn[0],sortOptions:{defaultDir:M},resizeable:(YAHOO.util.DragDrop)?true:false,minWidth:K.fn[1]},{key:"calls",sortable:true,label:K.calls[0],sortOptions:{defaultDir:J},width:K.calls[1]},{key:"avg",sortable:true,label:K.avg[0],sortOptions:{defaultDir:J},formatter:I,width:K.avg[1]},{key:"min",sortable:true,label:K.min[0],sortOptions:{defaultDir:M},formatter:I,width:K.min[1]},{key:"max",sortable:true,label:K.max[0],sortOptions:{defaultDir:J},formatter:I,width:K.max[1]},{key:"total",sortable:true,label:K.total[0],sortOptions:{defaultDir:J},formatter:I,width:K.total[1]},{key:"pct",sortable:true,label:K.pct[0],sortOptions:{defaultDir:J},formatter:N,width:K.pct[1]}];this._dataTable=new YAHOO.widget.DataTable(this._tableEl,L,H,{scrollable:true,height:this.get("tableHeight"),initialRequest:null,sortedBy:{key:"total",dir:YAHOO.widget.DataTable.CLASS_DESC}});var G=this._dataTable;G.subscribe("sortedByChange",this._sortedByChange,this,true);G.subscribe("renderEvent",this._dataTableRenderHandler,this,true);G.subscribe("initEvent",this._dataTableRenderHandler,this,true);A.on(this._tableEl.getElementsByTagName("th"),"click",this._thClickHandler,this,true);};D._sortedByChange=function(G){if(G.newValue&&G.newValue.key){this.set("sortedBy",{key:G.newValue.key,dir:G.newValue.dir});}};D._dataTableRenderHandler=function(G){this._setBusyState(false);};D._thClickHandler=function(G){this._setBusyState(true);};D._refreshDataTable=function(G){var H=this._dataTable;H.getDataSource().sendRequest("",H.onDataReturnInitializeTable,H);};D._refreshChart=function(){switch(this.get("sortedBy").key){case"fn":this._chart.set("dataSource",this._chart.get("dataSource"));return;case"calls":this._chart.set("xAxis",this._chartAxisDefinitionPlain);break;case"pct":this._chart.set("xAxis",this._chartAxisDefinitionPercent);break;default:this._chart.set("xAxis",this._chartAxisDefinitionTime);break;}this._drawChartLegend();this._chart.set("series",this._getSeriesDef(this.get("sortedBy").key));};D._getChartData=function(){var H=this._dataTable.getRecordSet().getRecords(0,this.get("maxChartFunctions"));var G=[];for(var J=0,I=H.length;J<I;J++){G.push(H[J].getData());}return G;};D._getSeriesDef=function(K){var J=this.get("chartSeriesDefinitions")[K];var G=[];for(var I=0,H=J.group.length;I<H;I++){var L=this.get("chartSeriesDefinitions")[J.group[I]];G.push({displayName:L.displayName,xField:L.xField,style:{color:L.style.color,size:L.style.size}});}return G;};D._initChart=function(){this._sizeChartCanvas();YAHOO.widget.Chart.SWFURL=this.get("swfUrl");var G=this;var H=new YAHOO.util.DataSource(function(){return G._getChartData.call(G);},{responseType:YAHOO.util.DataSource.TYPE_JSARRAY,maxCacheEntries:0});H.responseSchema={fields:["fn","avg","calls","max","min","total","pct"]};H.subscribe("responseEvent",this._sizeChartCanvas,this,true);this._chartAxisDefinitionTime=new YAHOO.widget.NumericAxis();this._chartAxisDefinitionTime.labelFunction="YAHOO.widget.ProfilerViewer.timeAxisLabelFunction";this._chartAxisDefinitionPercent=new YAHOO.widget.NumericAxis();this._chartAxisDefinitionPercent.labelFunction="YAHOO.widget.ProfilerViewer.percentAxisLabelFunction";this._chartAxisDefinitionPlain=new YAHOO.widget.NumericAxis();this._chart=new YAHOO.widget.BarChart(this._chartEl,H,{yField:"fn",series:this._getSeriesDef(this.get("sortedBy").key),style:this.get("chartStyle"),xAxis:this._chartAxisDefinitionTime});this._drawChartLegend();this._chartInitialized=true;this._dataTable.unsubscribe("initEvent",this._initChart,this);this._dataTable.subscribe("initEvent",this._refreshChart,this,true);};D._drawChartLegend=function(){var M=this.get("chartSeriesDefinitions");var I=M[this.get("sortedBy").key];var H=this._chartLegendEl;H.innerHTML="";for(var K=0,J=I.group.length;K<J;K++){var N=M[I.group[K]];var L=document.createElement("dt");C.setStyle(L,"backgroundColor","#"+N.style.color);var G=document.createElement("dd");G.innerHTML=N.displayName;H.appendChild(L);H.appendChild(G);}};D._sizeChartCanvas=function(I){var G=(I)?I.response.length:this.get("maxChartFunctions");var H=(G*36)+34;if(H!=parseInt(this._chartElHeight,10)){this._chartElHeight=H;C.setStyle(this._chartEl,"height",H+"px");}};D.initAttributes=function(G){YAHOO.widget.ProfilerViewer.superclass.initAttributes.call(this,G);this.setAttributeConfig("base",{value:G.base});this.setAttributeConfig("tableHeight",{value:G.tableHeight||"15em",method:function(H){if(this._dataTable){this._dataTable.set("height",H);}}});this.setAttributeConfig("sortedBy",{value:G.sortedBy||{key:"total",dir:"yui-dt-desc"}});
|
9
|
+
this.setAttributeConfig("filter",{value:G.filter||null,validator:YAHOO.lang.isFunction});this.setAttributeConfig("swfUrl",{value:G.swfUrl||"http://yui.yahooapis.com/2.5.0/build/charts/assets/charts.swf"});this.setAttributeConfig("maxChartFunctions",{value:G.maxChartFunctions||6,method:function(H){if(this._rendered){this._sizeChartCanvas();}},validator:YAHOO.lang.isNumber});this.setAttributeConfig("chartStyle",{value:G.chartStyle||{font:{name:"Arial",color:15658588,size:12},background:{color:"6e6e63"}},method:function(){if(this._rendered&&this.get("showChart")){this._refreshChart();}}});this.setAttributeConfig("chartSeriesDefinitions",{value:G.chartSeriesDefinitions||{total:{displayName:E.STRINGS.colHeads.total[0],xField:"total",style:{color:"4d95dd",size:20},group:["total"]},calls:{displayName:E.STRINGS.colHeads.calls[0],xField:"calls",style:{color:"edff9f",size:20},group:["calls"]},avg:{displayName:E.STRINGS.colHeads.avg[0],xField:"avg",style:{color:"209daf",size:9},group:["avg","min","max"]},min:{displayName:E.STRINGS.colHeads.min[0],xField:"min",style:{color:"b6ecf4",size:9},group:["avg","min","max"]},max:{displayName:E.STRINGS.colHeads.max[0],xField:"max",style:{color:"29c7de",size:9},group:["avg","min","max"]},pct:{displayName:E.STRINGS.colHeads.pct[0],xField:"pct",style:{color:"C96EDB",size:20},group:["pct"]}},method:function(){if(this._rendered&&this.get("showChart")){this._refreshChart();}}});this.setAttributeConfig("visible",{value:G.visible||false,validator:YAHOO.lang.isBoolean,method:function(H){if(H){this._show();}else{if(this._rendered){this._hide();}}}});this.setAttributeConfig("showChart",{value:G.showChart||true,validator:YAHOO.lang.isBoolean,writeOnce:true});YAHOO.widget.ProfilerViewer.superclass.initAttributes.call(this,G);};})();YAHOO.register("profilerviewer",YAHOO.widget.ProfilerViewer,{version:"2.8.1",build:"19"});
|
@@ -0,0 +1,1192 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 2.8.1
|
6
|
+
*/
|
7
|
+
(function() {
|
8
|
+
|
9
|
+
/**
|
10
|
+
* The ProfilerViewer module provides a graphical display for viewing
|
11
|
+
* the output of the YUI Profiler <http://developer.yahoo.com/yui/profiler>.
|
12
|
+
* @module profilerviewer
|
13
|
+
* @requires yahoo, dom, event, element, profiler, yuiloader
|
14
|
+
*/
|
15
|
+
|
16
|
+
/**
|
17
|
+
* A widget to view YUI Profiler output.
|
18
|
+
* @namespace YAHOO.widget
|
19
|
+
* @class ProfilerViewer
|
20
|
+
* @extends YAHOO.util.Element
|
21
|
+
* @constructor
|
22
|
+
* @param {HTMLElement | String | Object} el(optional) The html
|
23
|
+
* element into which the ProfileViewer should be rendered.
|
24
|
+
* An element will be created if none provided.
|
25
|
+
* @param {Object} attr (optional) A key map of the ProfilerViewer's
|
26
|
+
* initial attributes. Ignored if first arg is an attributes object.
|
27
|
+
*/
|
28
|
+
YAHOO.widget.ProfilerViewer = function(el, attr) {
|
29
|
+
attr = attr || {};
|
30
|
+
if (arguments.length == 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
|
31
|
+
attr = el;
|
32
|
+
el = attr.element || null;
|
33
|
+
}
|
34
|
+
if (!el && !attr.element) {
|
35
|
+
el = this._createProfilerViewerElement();
|
36
|
+
}
|
37
|
+
|
38
|
+
YAHOO.widget.ProfilerViewer.superclass.constructor.call(this, el, attr);
|
39
|
+
|
40
|
+
this._init();
|
41
|
+
|
42
|
+
};
|
43
|
+
|
44
|
+
YAHOO.extend(YAHOO.widget.ProfilerViewer, YAHOO.util.Element);
|
45
|
+
|
46
|
+
// Static members of YAHOO.widget.ProfilerViewer:
|
47
|
+
YAHOO.lang.augmentObject(YAHOO.widget.ProfilerViewer, {
|
48
|
+
/**
|
49
|
+
* Classname for ProfilerViewer containing element.
|
50
|
+
* @static
|
51
|
+
* @property CLASS
|
52
|
+
* @type string
|
53
|
+
* @public
|
54
|
+
* @default "yui-pv"
|
55
|
+
*/
|
56
|
+
CLASS: 'yui-pv',
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Classname for ProfilerViewer button dashboard.
|
60
|
+
* @static
|
61
|
+
* @property CLASS_DASHBOARD
|
62
|
+
* @type string
|
63
|
+
* @public
|
64
|
+
* @default "yui-pv-dashboard"
|
65
|
+
*/
|
66
|
+
CLASS_DASHBOARD: 'yui-pv-dashboard',
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Classname for the "refresh data" button.
|
70
|
+
* @static
|
71
|
+
* @property CLASS_REFRESH
|
72
|
+
* @type string
|
73
|
+
* @public
|
74
|
+
* @default "yui-pv-refresh"
|
75
|
+
*/
|
76
|
+
CLASS_REFRESH: 'yui-pv-refresh',
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Classname for busy indicator in the dashboard.
|
80
|
+
* @static
|
81
|
+
* @property CLASS_BUSY
|
82
|
+
* @type string
|
83
|
+
* @public
|
84
|
+
* @default "yui-pv-busy"
|
85
|
+
*/
|
86
|
+
CLASS_BUSY: 'yui-pv-busy',
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Classname for element containing the chart and chart
|
90
|
+
* legend elements.
|
91
|
+
* @static
|
92
|
+
* @property CLASS_CHART_CONTAINER
|
93
|
+
* @type string
|
94
|
+
* @public
|
95
|
+
* @default "yui-pv-chartcontainer"
|
96
|
+
*/
|
97
|
+
CLASS_CHART_CONTAINER: 'yui-pv-chartcontainer',
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Classname for element containing the chart.
|
101
|
+
* @static
|
102
|
+
* @property CLASS_CHART
|
103
|
+
* @type string
|
104
|
+
* @public
|
105
|
+
* @default "yui-pv-chart"
|
106
|
+
*/
|
107
|
+
CLASS_CHART: 'yui-pv-chart',
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Classname for element containing the chart's legend.
|
111
|
+
* @static
|
112
|
+
* @property CLASS_CHART_LEGEND
|
113
|
+
* @type string
|
114
|
+
* @public
|
115
|
+
* @default "yui-pv-chartlegend"
|
116
|
+
*/
|
117
|
+
CLASS_CHART_LEGEND: 'yui-pv-chartlegend',
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Classname for element containing the datatable.
|
121
|
+
* @static
|
122
|
+
* @property CLASS_TABLE
|
123
|
+
* @type string
|
124
|
+
* @public
|
125
|
+
* @default "yui-pv-table"
|
126
|
+
*/
|
127
|
+
CLASS_TABLE: 'yui-pv-table',
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Strings used in the UI.
|
131
|
+
* @static
|
132
|
+
* @property STRINGS
|
133
|
+
* @object
|
134
|
+
* @public
|
135
|
+
* @default English language strings for UI.
|
136
|
+
*/
|
137
|
+
STRINGS: {
|
138
|
+
title: "YUI Profiler (beta)",
|
139
|
+
buttons: {
|
140
|
+
viewprofiler: "View Profiler Data",
|
141
|
+
hideprofiler: "Hide Profiler Report",
|
142
|
+
showchart: "Show Chart",
|
143
|
+
hidechart: "Hide Chart",
|
144
|
+
refreshdata: "Refresh Data"
|
145
|
+
},
|
146
|
+
colHeads: {
|
147
|
+
//key: [column head label, width in pixels]
|
148
|
+
fn: ["Function/Method", null], //must auto-size
|
149
|
+
calls: ["Calls", 40],
|
150
|
+
avg: ["Average", 80],
|
151
|
+
min: ["Shortest", 70],
|
152
|
+
max: ["Longest", 70],
|
153
|
+
total: ["Total Time", 70],
|
154
|
+
pct: ["Percent", 70]
|
155
|
+
},
|
156
|
+
millisecondsAbbrev: "ms",
|
157
|
+
initMessage: "initialiazing chart...",
|
158
|
+
installFlashMessage: "Unable to load Flash content. The YUI Charts Control requires Flash Player 9.0.45 or higher. You can download the latest version of Flash Player from the <a href='http://www.adobe.com/go/getflashplayer'>Adobe Flash Player Download Center</a>."
|
159
|
+
},
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Function used to format numbers in milliseconds
|
163
|
+
* for chart; must be publicly accessible, per Charts spec.
|
164
|
+
* @static
|
165
|
+
* @property timeAxisLabelFunction
|
166
|
+
* @type function
|
167
|
+
* @private
|
168
|
+
*/
|
169
|
+
timeAxisLabelFunction: function(n) {
|
170
|
+
var a = (n === Math.floor(n)) ? n : (Math.round(n*1000))/1000;
|
171
|
+
return (a + " " + YAHOO.widget.ProfilerViewer.STRINGS.millisecondsAbbrev);
|
172
|
+
},
|
173
|
+
|
174
|
+
/**
|
175
|
+
* Function used to format percent numbers for chart; must
|
176
|
+
* be publicly accessible, per Charts spec.
|
177
|
+
* @static
|
178
|
+
* @property percentAxisLabelFunction
|
179
|
+
* @type function
|
180
|
+
* @private
|
181
|
+
*/
|
182
|
+
percentAxisLabelFunction: function(n) {
|
183
|
+
var a = (n === Math.floor(n)) ? n : (Math.round(n*100))/100;
|
184
|
+
return (a + "%");
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
},true);
|
189
|
+
|
190
|
+
|
191
|
+
//
|
192
|
+
// STANDARD SHORTCUTS
|
193
|
+
//
|
194
|
+
var Dom = YAHOO.util.Dom;
|
195
|
+
var Event = YAHOO.util.Event;
|
196
|
+
var Profiler = YAHOO.tool.Profiler;
|
197
|
+
var PV = YAHOO.widget.ProfilerViewer;
|
198
|
+
var proto = PV.prototype;
|
199
|
+
|
200
|
+
|
201
|
+
//
|
202
|
+
// PUBLIC METHODS
|
203
|
+
//
|
204
|
+
|
205
|
+
/**
|
206
|
+
* Refreshes the data displayed in the ProfilerViewer. When called,
|
207
|
+
* this will invoke a refresh of the DataTable and (if displayed)
|
208
|
+
* the Chart.
|
209
|
+
* @method refreshData
|
210
|
+
* @return void
|
211
|
+
* @public
|
212
|
+
*/
|
213
|
+
proto.refreshData = function() {
|
214
|
+
this.fireEvent("dataRefreshEvent");
|
215
|
+
};
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Returns the element containing the console's header.
|
219
|
+
* @method getHeadEl
|
220
|
+
* @return HTMLElement
|
221
|
+
* @public
|
222
|
+
*/
|
223
|
+
proto.getHeadEl = function() {
|
224
|
+
return (this._headEl) ? Dom.get(this._headEl) : false;
|
225
|
+
};
|
226
|
+
|
227
|
+
/**
|
228
|
+
* Returns the element containing the console's body, including
|
229
|
+
* the chart and the datatable..
|
230
|
+
* @method getBodyEl
|
231
|
+
* @return HTMLElement
|
232
|
+
* @public
|
233
|
+
*/
|
234
|
+
proto.getBodyEl = function() {
|
235
|
+
return (this._bodyEl) ? Dom.get(this._bodyEl) : false;
|
236
|
+
};
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Returns the element containing the console's chart.
|
240
|
+
* @method getChartEl
|
241
|
+
* @return HTMLElement
|
242
|
+
* @public
|
243
|
+
*/
|
244
|
+
proto.getChartEl = function() {
|
245
|
+
return (this._chartEl) ? Dom.get(this._chartEl) : false;
|
246
|
+
};
|
247
|
+
|
248
|
+
/**
|
249
|
+
* Returns the element containing the console's dataTable.
|
250
|
+
* @method getTableEl
|
251
|
+
* @return HTMLElement
|
252
|
+
* @public
|
253
|
+
*/
|
254
|
+
proto.getTableEl = function() {
|
255
|
+
return (this._tableEl) ? Dom.get(this._tableEl) : false;
|
256
|
+
};
|
257
|
+
|
258
|
+
/**
|
259
|
+
* Returns the element containing the console's DataTable
|
260
|
+
* instance.
|
261
|
+
* @method getDataTable
|
262
|
+
* @return YAHOO.widget.DataTable
|
263
|
+
* @public
|
264
|
+
*/
|
265
|
+
proto.getDataTable = function() {
|
266
|
+
return this._dataTable;
|
267
|
+
};
|
268
|
+
|
269
|
+
/**
|
270
|
+
* Returns the element containing the console's Chart instance.
|
271
|
+
* @method getChart
|
272
|
+
* @return YAHOO.widget.BarChart
|
273
|
+
* @public
|
274
|
+
*/
|
275
|
+
proto.getChart = function() {
|
276
|
+
return this._chart;
|
277
|
+
};
|
278
|
+
|
279
|
+
|
280
|
+
//
|
281
|
+
// PRIVATE PROPERTIES
|
282
|
+
//
|
283
|
+
proto._rendered = false;
|
284
|
+
proto._headEl = null;
|
285
|
+
proto._bodyEl = null;
|
286
|
+
proto._toggleVisibleEl = null;
|
287
|
+
proto._busyEl = null;
|
288
|
+
proto._busy = false;
|
289
|
+
|
290
|
+
proto._tableEl = null;
|
291
|
+
proto._dataTable = null;
|
292
|
+
|
293
|
+
proto._chartEl = null;
|
294
|
+
proto._chartLegendEl = null;
|
295
|
+
proto._chartElHeight = 250;
|
296
|
+
proto._chart = null;
|
297
|
+
proto._chartInitialized = false;
|
298
|
+
|
299
|
+
//
|
300
|
+
// PRIVATE METHODS
|
301
|
+
//
|
302
|
+
|
303
|
+
proto._init = function() {
|
304
|
+
/**
|
305
|
+
* CUSTOM EVENTS
|
306
|
+
**/
|
307
|
+
|
308
|
+
/**
|
309
|
+
* Fired when a data refresh is requested. No arguments are passed
|
310
|
+
* with this event.
|
311
|
+
*
|
312
|
+
* @event refreshDataEvent
|
313
|
+
*/
|
314
|
+
this.createEvent("dataRefreshEvent");
|
315
|
+
|
316
|
+
/**
|
317
|
+
* Fired when the viewer canvas first renders. No arguments are passed
|
318
|
+
* with this event.
|
319
|
+
*
|
320
|
+
* @event renderEvent
|
321
|
+
*/
|
322
|
+
this.createEvent("renderEvent");
|
323
|
+
|
324
|
+
this.on("dataRefreshEvent", this._refreshDataTable, this, true);
|
325
|
+
|
326
|
+
this._initLauncherDOM();
|
327
|
+
|
328
|
+
if(this.get("showChart")) {
|
329
|
+
this.on("sortedByChange", this._refreshChart);
|
330
|
+
}
|
331
|
+
|
332
|
+
};
|
333
|
+
|
334
|
+
/**
|
335
|
+
* If no element is passed in, create it as the first element
|
336
|
+
* in the document.
|
337
|
+
* @method _createProfilerViewerElement
|
338
|
+
* @return HTMLElement
|
339
|
+
* @private
|
340
|
+
*/
|
341
|
+
proto._createProfilerViewerElement = function() {
|
342
|
+
|
343
|
+
var el = document.createElement("div");
|
344
|
+
document.body.insertBefore(el, document.body.firstChild);
|
345
|
+
Dom.addClass(el, this.SKIN_CLASS);
|
346
|
+
Dom.addClass(el, PV.CLASS);
|
347
|
+
return el;
|
348
|
+
};
|
349
|
+
|
350
|
+
/**
|
351
|
+
* Provides a readable name for the ProfilerViewer instance.
|
352
|
+
* @method toString
|
353
|
+
* @return String
|
354
|
+
* @private
|
355
|
+
*/
|
356
|
+
proto.toString = function() {
|
357
|
+
return "ProfilerViewer " + (this.get('id') || this.get('tagName'));
|
358
|
+
};
|
359
|
+
|
360
|
+
/**
|
361
|
+
* Toggles visibility of the viewer canvas.
|
362
|
+
* @method _toggleVisible
|
363
|
+
* @return void
|
364
|
+
* @private
|
365
|
+
*/
|
366
|
+
proto._toggleVisible = function() {
|
367
|
+
|
368
|
+
var newVis = (this.get("visible")) ? false : true;
|
369
|
+
this.set("visible", newVis);
|
370
|
+
};
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Shows the viewer canvas.
|
374
|
+
* @method show
|
375
|
+
* @return void
|
376
|
+
* @private
|
377
|
+
*/
|
378
|
+
proto._show = function() {
|
379
|
+
if(!this._busy) {
|
380
|
+
this._setBusyState(true);
|
381
|
+
if(!this._rendered) {
|
382
|
+
var loader = new YAHOO.util.YUILoader();
|
383
|
+
if (this.get("base")) {
|
384
|
+
loader.base = this.get("base");
|
385
|
+
}
|
386
|
+
|
387
|
+
var modules = ["datatable"];
|
388
|
+
if(this.get("showChart")) {
|
389
|
+
modules.push("charts");
|
390
|
+
}
|
391
|
+
|
392
|
+
loader.insert({ require: modules,
|
393
|
+
onSuccess: function() {
|
394
|
+
this._render();
|
395
|
+
},
|
396
|
+
scope: this});
|
397
|
+
} else {
|
398
|
+
var el = this.get("element");
|
399
|
+
Dom.removeClass(el, "yui-pv-minimized");
|
400
|
+
this._toggleVisibleEl.innerHTML = PV.STRINGS.buttons.hideprofiler;
|
401
|
+
|
402
|
+
//The Flash Charts component can't be set to display:none,
|
403
|
+
//and even after positioning it offscreen the screen
|
404
|
+
//may fail to repaint in some browsers. Adding an empty
|
405
|
+
//style rule to the console body can help force a repaint:
|
406
|
+
Dom.addClass(el, "yui-pv-null");
|
407
|
+
Dom.removeClass(el, "yui-pv-null");
|
408
|
+
|
409
|
+
//Always refresh data when changing to visible:
|
410
|
+
this.refreshData();
|
411
|
+
}
|
412
|
+
}
|
413
|
+
};
|
414
|
+
|
415
|
+
/**
|
416
|
+
* Hides the viewer canvas.
|
417
|
+
* @method hide
|
418
|
+
* @return void
|
419
|
+
* @private
|
420
|
+
*/
|
421
|
+
proto._hide = function() {
|
422
|
+
this._toggleVisibleEl.innerHTML = PV.STRINGS.buttons.viewprofiler;
|
423
|
+
Dom.addClass(this.get("element"), "yui-pv-minimized");
|
424
|
+
};
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Render the viewer canvas
|
428
|
+
* @method _render
|
429
|
+
* @return void
|
430
|
+
* @private
|
431
|
+
*/
|
432
|
+
proto._render = function() {
|
433
|
+
|
434
|
+
Dom.removeClass(this.get("element"), "yui-pv-minimized");
|
435
|
+
|
436
|
+
this._initViewerDOM();
|
437
|
+
this._initDataTable();
|
438
|
+
if(this.get("showChart")) {
|
439
|
+
this._initChartDOM();
|
440
|
+
this._initChart();
|
441
|
+
}
|
442
|
+
this._rendered = true;
|
443
|
+
this._toggleVisibleEl.innerHTML = PV.STRINGS.buttons.hideprofiler;
|
444
|
+
|
445
|
+
this.fireEvent("renderEvent");
|
446
|
+
|
447
|
+
};
|
448
|
+
|
449
|
+
/**
|
450
|
+
* Set up the DOM structure for the ProfilerViewer launcher.
|
451
|
+
* @method _initLauncherDOM
|
452
|
+
* @private
|
453
|
+
*/
|
454
|
+
proto._initLauncherDOM = function() {
|
455
|
+
|
456
|
+
var el = this.get("element");
|
457
|
+
Dom.addClass(el, PV.CLASS);
|
458
|
+
Dom.addClass(el, "yui-pv-minimized");
|
459
|
+
|
460
|
+
this._headEl = document.createElement("div");
|
461
|
+
Dom.addClass(this._headEl, "hd");
|
462
|
+
|
463
|
+
var s = PV.STRINGS.buttons;
|
464
|
+
var b = (this.get("visible")) ? s.hideprofiler : s.viewprofiler;
|
465
|
+
|
466
|
+
this._toggleVisibleEl = this._createButton(b, this._headEl);
|
467
|
+
|
468
|
+
this._refreshEl = this._createButton(s.refreshdata, this._headEl);
|
469
|
+
Dom.addClass(this._refreshEl, PV.CLASS_REFRESH);
|
470
|
+
|
471
|
+
this._busyEl = document.createElement("span");
|
472
|
+
this._headEl.appendChild(this._busyEl);
|
473
|
+
|
474
|
+
var title = document.createElement("h4");
|
475
|
+
title.innerHTML = PV.STRINGS.title;
|
476
|
+
this._headEl.appendChild(title);
|
477
|
+
|
478
|
+
el.appendChild(this._headEl);
|
479
|
+
|
480
|
+
Event.on(this._toggleVisibleEl, "click", this._toggleVisible, this, true);
|
481
|
+
Event.on(this._refreshEl, "click", function() {
|
482
|
+
if(!this._busy) {
|
483
|
+
this._setBusyState(true);
|
484
|
+
this.fireEvent("dataRefreshEvent");
|
485
|
+
}
|
486
|
+
}, this, true);
|
487
|
+
};
|
488
|
+
|
489
|
+
/**
|
490
|
+
* Set up the DOM structure for the ProfilerViewer canvas,
|
491
|
+
* including the holder for the DataTable.
|
492
|
+
* @method _initViewerDOM
|
493
|
+
* @private
|
494
|
+
*/
|
495
|
+
proto._initViewerDOM = function() {
|
496
|
+
|
497
|
+
var el = this.get("element");
|
498
|
+
this._bodyEl = document.createElement("div");
|
499
|
+
Dom.addClass(this._bodyEl, "bd");
|
500
|
+
this._tableEl = document.createElement("div");
|
501
|
+
Dom.addClass(this._tableEl, PV.CLASS_TABLE);
|
502
|
+
this._bodyEl.appendChild(this._tableEl);
|
503
|
+
el.appendChild(this._bodyEl);
|
504
|
+
};
|
505
|
+
|
506
|
+
/**
|
507
|
+
* Set up the DOM structure for the ProfilerViewer canvas.
|
508
|
+
* @method _initChartDOM
|
509
|
+
* @private
|
510
|
+
*/
|
511
|
+
proto._initChartDOM = function() {
|
512
|
+
|
513
|
+
this._chartContainer = document.createElement("div");
|
514
|
+
Dom.addClass(this._chartContainer, PV.CLASS_CHART_CONTAINER);
|
515
|
+
|
516
|
+
var chl = document.createElement("div");
|
517
|
+
Dom.addClass(chl, PV.CLASS_CHART_LEGEND);
|
518
|
+
|
519
|
+
var chw = document.createElement("div");
|
520
|
+
|
521
|
+
this._chartLegendEl = document.createElement("dl");
|
522
|
+
this._chartLegendEl.innerHTML = "<dd>" + PV.STRINGS.initMessage + "</dd>";
|
523
|
+
|
524
|
+
this._chartEl = document.createElement("div");
|
525
|
+
Dom.addClass(this._chartEl, PV.CLASS_CHART);
|
526
|
+
|
527
|
+
var msg = document.createElement("p");
|
528
|
+
msg.innerHTML = PV.STRINGS.installFlashMessage;
|
529
|
+
this._chartEl.appendChild(msg);
|
530
|
+
|
531
|
+
this._chartContainer.appendChild(chl);
|
532
|
+
chl.appendChild(chw);
|
533
|
+
chw.appendChild(this._chartLegendEl);
|
534
|
+
this._chartContainer.appendChild(this._chartEl);
|
535
|
+
this._bodyEl.insertBefore(this._chartContainer,this._tableEl);
|
536
|
+
};
|
537
|
+
|
538
|
+
|
539
|
+
/**
|
540
|
+
* Create anchor elements for use as buttons. Args: label
|
541
|
+
* is text to appear on the face of the button, parentEl
|
542
|
+
* is the el to which the anchor will be attached, position
|
543
|
+
* is true for inserting as the first node and false for
|
544
|
+
* inserting as the last node of the parentEl.
|
545
|
+
* @method _createButton
|
546
|
+
* @private
|
547
|
+
*/
|
548
|
+
proto._createButton = function(label, parentEl, position) {
|
549
|
+
var b = document.createElement("a");
|
550
|
+
b.innerHTML = b.title = label;
|
551
|
+
if(parentEl) {
|
552
|
+
if(!position) {
|
553
|
+
parentEl.appendChild(b);
|
554
|
+
} else {
|
555
|
+
parentEl.insertBefore(b, parentEl.firstChild);
|
556
|
+
}
|
557
|
+
}
|
558
|
+
return b;
|
559
|
+
};
|
560
|
+
|
561
|
+
/**
|
562
|
+
* Set's console busy state.
|
563
|
+
* @method _setBusyState
|
564
|
+
* @private
|
565
|
+
**/
|
566
|
+
proto._setBusyState = function(b) {
|
567
|
+
if(b) {
|
568
|
+
Dom.addClass(this._busyEl, PV.CLASS_BUSY);
|
569
|
+
this._busy = true;
|
570
|
+
} else {
|
571
|
+
Dom.removeClass(this._busyEl, PV.CLASS_BUSY);
|
572
|
+
this._busy = false;
|
573
|
+
}
|
574
|
+
};
|
575
|
+
|
576
|
+
/**
|
577
|
+
* Generages a sorting function based on current sortedBy
|
578
|
+
* values.
|
579
|
+
* @method _createProfilerViewerElement
|
580
|
+
* @private
|
581
|
+
**/
|
582
|
+
proto._genSortFunction = function(key, dir) {
|
583
|
+
var by = key;
|
584
|
+
var direction = dir;
|
585
|
+
return function(a, b) {
|
586
|
+
if (direction == YAHOO.widget.DataTable.CLASS_ASC) {
|
587
|
+
return a[by] - b[by];
|
588
|
+
} else {
|
589
|
+
return ((a[by] - b[by]) * -1);
|
590
|
+
}
|
591
|
+
};
|
592
|
+
};
|
593
|
+
|
594
|
+
/**
|
595
|
+
* Utility function for array sums.
|
596
|
+
* @method _arraySum
|
597
|
+
* @private
|
598
|
+
**/
|
599
|
+
var _arraySum = function(arr){
|
600
|
+
var ct = 0;
|
601
|
+
for(var i = 0; i < arr.length; ct+=arr[i++]){}
|
602
|
+
return ct;
|
603
|
+
};
|
604
|
+
|
605
|
+
/**
|
606
|
+
* Retrieves data from Profiler, filtering and sorting as needed
|
607
|
+
* based on current widget state. Adds calculated percentage
|
608
|
+
* column and function name to data returned by Profiler.
|
609
|
+
* @method _getProfilerData
|
610
|
+
* @private
|
611
|
+
**/
|
612
|
+
proto._getProfilerData = function() {
|
613
|
+
|
614
|
+
var obj = Profiler.getFullReport();
|
615
|
+
var arr = [];
|
616
|
+
var totalTime = 0;
|
617
|
+
for (name in obj) {
|
618
|
+
if (YAHOO.lang.hasOwnProperty(obj, name)) {
|
619
|
+
var r = obj[name];
|
620
|
+
var o = {};
|
621
|
+
o.fn = name; //add function name to record
|
622
|
+
o.points = r.points.slice(); //copy live array
|
623
|
+
o.calls = r.calls;
|
624
|
+
o.min = r.min;
|
625
|
+
o.max = r.max;
|
626
|
+
o.avg = r.avg;
|
627
|
+
o.total = _arraySum(o.points);
|
628
|
+
o.points = r.points;
|
629
|
+
var f = this.get("filter");
|
630
|
+
if((!f) || (f(o))) {
|
631
|
+
arr.push(o);
|
632
|
+
totalTime += o.total;
|
633
|
+
}
|
634
|
+
}
|
635
|
+
}
|
636
|
+
|
637
|
+
//add calculated percentage column
|
638
|
+
for (var i = 0, j = arr.length; i < j; i++) {
|
639
|
+
arr[i].pct = (totalTime) ? (arr[i].total * 100) / totalTime : 0;
|
640
|
+
}
|
641
|
+
|
642
|
+
var sortedBy = this.get("sortedBy");
|
643
|
+
var key = sortedBy.key;
|
644
|
+
var dir = sortedBy.dir;
|
645
|
+
|
646
|
+
arr.sort(this._genSortFunction(key, dir));
|
647
|
+
|
648
|
+
|
649
|
+
return arr;
|
650
|
+
};
|
651
|
+
|
652
|
+
/**
|
653
|
+
* Set up the DataTable.
|
654
|
+
* @method _initDataTable
|
655
|
+
* @private
|
656
|
+
*/
|
657
|
+
proto._initDataTable = function() {
|
658
|
+
|
659
|
+
var self = this;
|
660
|
+
|
661
|
+
//Set up the JS Function DataSource, pulling data from
|
662
|
+
//the Profiler.
|
663
|
+
this._dataSource = new YAHOO.util.DataSource(
|
664
|
+
function() {
|
665
|
+
return self._getProfilerData.call(self);
|
666
|
+
},
|
667
|
+
{
|
668
|
+
responseType: YAHOO.util.DataSource.TYPE_JSARRAY,
|
669
|
+
maxCacheEntries: 0
|
670
|
+
}
|
671
|
+
);
|
672
|
+
var ds = this._dataSource;
|
673
|
+
|
674
|
+
ds.responseSchema =
|
675
|
+
{
|
676
|
+
fields: [ "fn", "avg", "calls", "max", "min", "total", "pct", "points"]
|
677
|
+
};
|
678
|
+
|
679
|
+
//Set up the DataTable.
|
680
|
+
var formatTimeValue = function(elCell, oRecord, oColumn, oData) {
|
681
|
+
var a = (oData === Math.floor(oData)) ? oData : (Math.round(oData*1000))/1000;
|
682
|
+
elCell.innerHTML = a + " " + PV.STRINGS.millisecondsAbbrev;
|
683
|
+
};
|
684
|
+
|
685
|
+
var formatPercent = function(elCell, oRecord, oColumn, oData) {
|
686
|
+
var a = (oData === Math.floor(oData)) ? oData : (Math.round(oData*100))/100;
|
687
|
+
elCell.innerHTML = a + "%";
|
688
|
+
};
|
689
|
+
|
690
|
+
var a = YAHOO.widget.DataTable.CLASS_ASC;
|
691
|
+
var d = YAHOO.widget.DataTable.CLASS_DESC;
|
692
|
+
var c = PV.STRINGS.colHeads;
|
693
|
+
var f = formatTimeValue;
|
694
|
+
|
695
|
+
var cols = [
|
696
|
+
{key:"fn", sortable:true, label: c.fn[0],
|
697
|
+
sortOptions: {defaultDir:a},
|
698
|
+
resizeable: (YAHOO.util.DragDrop) ? true : false,
|
699
|
+
minWidth:c.fn[1]},
|
700
|
+
{key:"calls", sortable:true, label: c.calls[0],
|
701
|
+
sortOptions: {defaultDir:d},
|
702
|
+
width:c.calls[1]},
|
703
|
+
{key:"avg", sortable:true, label: c.avg[0],
|
704
|
+
sortOptions: {defaultDir:d},
|
705
|
+
formatter:f,
|
706
|
+
width:c.avg[1]},
|
707
|
+
{key:"min", sortable:true, label: c.min[0],
|
708
|
+
sortOptions: {defaultDir:a},
|
709
|
+
formatter:f,
|
710
|
+
width:c.min[1]},
|
711
|
+
{key:"max", sortable:true, label: c.max[0],
|
712
|
+
sortOptions: {defaultDir:d},
|
713
|
+
formatter:f,
|
714
|
+
width:c.max[1]},
|
715
|
+
{key:"total", sortable:true, label: c.total[0],
|
716
|
+
sortOptions: {defaultDir:d},
|
717
|
+
formatter:f,
|
718
|
+
width:c.total[1]},
|
719
|
+
{key:"pct", sortable:true, label: c.pct[0],
|
720
|
+
sortOptions: {defaultDir:d},
|
721
|
+
formatter:formatPercent,
|
722
|
+
width:c.pct[1]}
|
723
|
+
];
|
724
|
+
|
725
|
+
this._dataTable = new YAHOO.widget.DataTable(this._tableEl, cols, ds, {
|
726
|
+
scrollable:true,
|
727
|
+
height:this.get("tableHeight"),
|
728
|
+
initialRequest:null,
|
729
|
+
sortedBy: {
|
730
|
+
key: "total",
|
731
|
+
dir: YAHOO.widget.DataTable.CLASS_DESC
|
732
|
+
}
|
733
|
+
});
|
734
|
+
var dt = this._dataTable;
|
735
|
+
|
736
|
+
//Wire up DataTable events to drive the rest of the UI.
|
737
|
+
dt.subscribe("sortedByChange", this._sortedByChange, this, true);
|
738
|
+
dt.subscribe("renderEvent", this._dataTableRenderHandler, this, true);
|
739
|
+
dt.subscribe("initEvent", this._dataTableRenderHandler, this, true);
|
740
|
+
Event.on(this._tableEl.getElementsByTagName("th"), "click", this._thClickHandler, this, true);
|
741
|
+
};
|
742
|
+
|
743
|
+
/**
|
744
|
+
* Proxy the sort event in DataTable into the ProfilerViewer
|
745
|
+
* attribute.
|
746
|
+
* @method _sortedByChange
|
747
|
+
* @private
|
748
|
+
**/
|
749
|
+
proto._sortedByChange = function(o) {
|
750
|
+
if(o.newValue && o.newValue.key) {
|
751
|
+
this.set("sortedBy", {key: o.newValue.key, dir:o.newValue.dir});
|
752
|
+
}
|
753
|
+
};
|
754
|
+
|
755
|
+
/**
|
756
|
+
* Proxy the render event in DataTable into the ProfilerViewer
|
757
|
+
* attribute.
|
758
|
+
* @method _dataTableRenderHandler
|
759
|
+
* @private
|
760
|
+
**/
|
761
|
+
proto._dataTableRenderHandler = function(o) {
|
762
|
+
this._setBusyState(false);
|
763
|
+
};
|
764
|
+
|
765
|
+
/**
|
766
|
+
* Event handler for clicks on the DataTable's sortable column
|
767
|
+
* heads.
|
768
|
+
* @method _thClickHandler
|
769
|
+
* @private
|
770
|
+
**/
|
771
|
+
proto._thClickHandler = function(o) {
|
772
|
+
this._setBusyState(true);
|
773
|
+
};
|
774
|
+
|
775
|
+
/**
|
776
|
+
* Refresh DataTable, getting new data from Profiler.
|
777
|
+
* @method _refreshDataTable
|
778
|
+
* @private
|
779
|
+
**/
|
780
|
+
proto._refreshDataTable = function(args) {
|
781
|
+
var dt = this._dataTable;
|
782
|
+
dt.getDataSource().sendRequest("", dt.onDataReturnInitializeTable, dt);
|
783
|
+
};
|
784
|
+
|
785
|
+
/**
|
786
|
+
* Refresh chart, getting new data from table.
|
787
|
+
* @method _refreshChart
|
788
|
+
* @private
|
789
|
+
**/
|
790
|
+
proto._refreshChart = function() {
|
791
|
+
|
792
|
+
switch (this.get("sortedBy").key) {
|
793
|
+
case "fn":
|
794
|
+
/*Keep the same data on the chart, but force update to
|
795
|
+
reflect new sort order on function/method name: */
|
796
|
+
this._chart.set("dataSource", this._chart.get("dataSource"));
|
797
|
+
/*no further action necessary; chart redraws*/
|
798
|
+
return;
|
799
|
+
case "calls":
|
800
|
+
/*Null out the xAxis formatting before redrawing chart.*/
|
801
|
+
this._chart.set("xAxis", this._chartAxisDefinitionPlain);
|
802
|
+
break;
|
803
|
+
case "pct":
|
804
|
+
this._chart.set("xAxis", this._chartAxisDefinitionPercent);
|
805
|
+
break;
|
806
|
+
default:
|
807
|
+
/*Set the default xAxis; redraw legend; set the new series definition.*/
|
808
|
+
this._chart.set("xAxis", this._chartAxisDefinitionTime);
|
809
|
+
break;
|
810
|
+
}
|
811
|
+
|
812
|
+
this._drawChartLegend();
|
813
|
+
this._chart.set("series", this._getSeriesDef(this.get("sortedBy").key));
|
814
|
+
|
815
|
+
};
|
816
|
+
|
817
|
+
/**
|
818
|
+
* Get data for the Chart from DataTable recordset
|
819
|
+
* @method _getChartData
|
820
|
+
* @private
|
821
|
+
*/
|
822
|
+
proto._getChartData = function() {
|
823
|
+
//var records = this._getProfilerData();
|
824
|
+
var records = this._dataTable.getRecordSet().getRecords(0, this.get("maxChartFunctions"));
|
825
|
+
var arr = [];
|
826
|
+
for (var i = 0, j = records.length; i<j; i++) {
|
827
|
+
arr.push(records[i].getData());
|
828
|
+
}
|
829
|
+
return arr;
|
830
|
+
};
|
831
|
+
|
832
|
+
/**
|
833
|
+
* Build series definition based on current configuration attributes.
|
834
|
+
* @method _getSeriesDef
|
835
|
+
* @private
|
836
|
+
*/
|
837
|
+
proto._getSeriesDef = function(field) {
|
838
|
+
var sd = this.get("chartSeriesDefinitions")[field];
|
839
|
+
var arr = [];
|
840
|
+
for(var i = 0, j = sd.group.length; i<j; i++) {
|
841
|
+
var c = this.get("chartSeriesDefinitions")[sd.group[i]];
|
842
|
+
arr.push(
|
843
|
+
{displayName:c.displayName,
|
844
|
+
xField:c.xField,
|
845
|
+
style: {color:c.style.color, size:c.style.size}
|
846
|
+
}
|
847
|
+
);
|
848
|
+
}
|
849
|
+
|
850
|
+
return arr;
|
851
|
+
};
|
852
|
+
|
853
|
+
/**
|
854
|
+
* Set up the Chart.
|
855
|
+
* @method _initChart
|
856
|
+
* @private
|
857
|
+
*/
|
858
|
+
proto._initChart = function() {
|
859
|
+
|
860
|
+
this._sizeChartCanvas();
|
861
|
+
|
862
|
+
YAHOO.widget.Chart.SWFURL = this.get("swfUrl");
|
863
|
+
|
864
|
+
var self = this;
|
865
|
+
|
866
|
+
//Create DataSource based on records currently displayed
|
867
|
+
//at the top of the sort list in the DataTable.
|
868
|
+
var ds = new YAHOO.util.DataSource(
|
869
|
+
//force the jsfunction DataSource to run in the scope of
|
870
|
+
//the ProfilerViewer, not in the YAHOO.util.DataSource scope:
|
871
|
+
function() {
|
872
|
+
return self._getChartData.call(self);
|
873
|
+
},
|
874
|
+
{
|
875
|
+
responseType: YAHOO.util.DataSource.TYPE_JSARRAY,
|
876
|
+
maxCacheEntries: 0
|
877
|
+
}
|
878
|
+
);
|
879
|
+
|
880
|
+
ds.responseSchema =
|
881
|
+
{
|
882
|
+
fields: [ "fn", "avg", "calls", "max", "min", "total", "pct" ]
|
883
|
+
};
|
884
|
+
|
885
|
+
ds.subscribe('responseEvent', this._sizeChartCanvas, this, true);
|
886
|
+
|
887
|
+
//Set up the chart itself.
|
888
|
+
this._chartAxisDefinitionTime = new YAHOO.widget.NumericAxis();
|
889
|
+
this._chartAxisDefinitionTime.labelFunction = "YAHOO.widget.ProfilerViewer.timeAxisLabelFunction";
|
890
|
+
|
891
|
+
this._chartAxisDefinitionPercent = new YAHOO.widget.NumericAxis();
|
892
|
+
this._chartAxisDefinitionPercent.labelFunction = "YAHOO.widget.ProfilerViewer.percentAxisLabelFunction";
|
893
|
+
|
894
|
+
this._chartAxisDefinitionPlain = new YAHOO.widget.NumericAxis();
|
895
|
+
|
896
|
+
this._chart = new YAHOO.widget.BarChart( this._chartEl, ds,
|
897
|
+
{
|
898
|
+
yField: "fn",
|
899
|
+
series: this._getSeriesDef(this.get("sortedBy").key),
|
900
|
+
style: this.get("chartStyle"),
|
901
|
+
xAxis: this._chartAxisDefinitionTime
|
902
|
+
} );
|
903
|
+
|
904
|
+
this._drawChartLegend();
|
905
|
+
this._chartInitialized = true;
|
906
|
+
this._dataTable.unsubscribe("initEvent", this._initChart, this);
|
907
|
+
this._dataTable.subscribe("initEvent", this._refreshChart, this, true);
|
908
|
+
|
909
|
+
};
|
910
|
+
|
911
|
+
/**
|
912
|
+
* Set up the Chart's legend
|
913
|
+
* @method _drawChartLegend
|
914
|
+
* @private
|
915
|
+
**/
|
916
|
+
proto._drawChartLegend = function() {
|
917
|
+
var seriesDefs = this.get("chartSeriesDefinitions");
|
918
|
+
var currentDef = seriesDefs[this.get("sortedBy").key];
|
919
|
+
var l = this._chartLegendEl;
|
920
|
+
l.innerHTML = "";
|
921
|
+
for(var i = 0, j = currentDef.group.length; i<j; i++) {
|
922
|
+
var c = seriesDefs[currentDef.group[i]];
|
923
|
+
var dt = document.createElement("dt");
|
924
|
+
Dom.setStyle(dt, "backgroundColor", "#" + c.style.color);
|
925
|
+
var dd = document.createElement("dd");
|
926
|
+
dd.innerHTML = c.displayName;
|
927
|
+
l.appendChild(dt);
|
928
|
+
l.appendChild(dd);
|
929
|
+
}
|
930
|
+
};
|
931
|
+
|
932
|
+
/**
|
933
|
+
* Resize the chart's canvas if based on number of records
|
934
|
+
* returned from the chart's datasource.
|
935
|
+
* @method _sizeChartCanvas
|
936
|
+
* @private
|
937
|
+
**/
|
938
|
+
proto._sizeChartCanvas = function(o) {
|
939
|
+
var bars = (o) ? o.response.length : this.get("maxChartFunctions");
|
940
|
+
var s = (bars * 36) + 34;
|
941
|
+
if (s != parseInt(this._chartElHeight, 10)) {
|
942
|
+
this._chartElHeight = s;
|
943
|
+
Dom.setStyle(this._chartEl, "height", s + "px");
|
944
|
+
}
|
945
|
+
};
|
946
|
+
|
947
|
+
/**
|
948
|
+
* setAttributeConfigs TabView specific properties.
|
949
|
+
* @method initAttributes
|
950
|
+
* @param {Object} attr Hash of initial attributes
|
951
|
+
* @method initAttributes
|
952
|
+
* @private
|
953
|
+
*/
|
954
|
+
proto.initAttributes = function(attr) {
|
955
|
+
YAHOO.widget.ProfilerViewer.superclass.initAttributes.call(this, attr);
|
956
|
+
/**
|
957
|
+
* The YUI Loader base path from which to pull YUI files needed
|
958
|
+
* in the rendering of the ProfilerViewer canvas. Passed directly
|
959
|
+
* to YUI Loader. Leave blank to draw files from
|
960
|
+
* yui.yahooapis.com.
|
961
|
+
* @attribute base
|
962
|
+
* @type string
|
963
|
+
* @default ""
|
964
|
+
*/
|
965
|
+
this.setAttributeConfig('base', {
|
966
|
+
value: attr.base
|
967
|
+
});
|
968
|
+
|
969
|
+
/**
|
970
|
+
* The height of the DataTable. The table will scroll
|
971
|
+
* vertically if the content overflows the specified
|
972
|
+
* height.
|
973
|
+
* @attribute tableHeight
|
974
|
+
* @type string
|
975
|
+
* @default "15em"
|
976
|
+
*/
|
977
|
+
this.setAttributeConfig('tableHeight', {
|
978
|
+
value: attr.tableHeight || "15em",
|
979
|
+
method: function(s) {
|
980
|
+
if(this._dataTable) {
|
981
|
+
this._dataTable.set("height", s);
|
982
|
+
}
|
983
|
+
}
|
984
|
+
});
|
985
|
+
|
986
|
+
/**
|
987
|
+
* The default column key to sort by. Valid keys are: fn, calls,
|
988
|
+
* avg, min, max, total. Valid dir values are:
|
989
|
+
* YAHOO.widget.DataTable.CLASS_ASC and
|
990
|
+
* YAHOO.widget.DataTable.CLASS_DESC (or their
|
991
|
+
* string equivalents).
|
992
|
+
* @attribute sortedBy
|
993
|
+
* @type string
|
994
|
+
* @default {key:"total", dir:"yui-dt-desc"}
|
995
|
+
*/
|
996
|
+
this.setAttributeConfig('sortedBy', {
|
997
|
+
value: attr.sortedBy || {key:"total", dir:"yui-dt-desc"}
|
998
|
+
});
|
999
|
+
|
1000
|
+
/**
|
1001
|
+
* A filter function to use in selecting functions that will
|
1002
|
+
* appear in the ProfilerViewer report. The function is passed
|
1003
|
+
* a function report object and should return a boolean indicating
|
1004
|
+
* whether that function should be included in the ProfilerViewer
|
1005
|
+
* display. The argument is structured as follows:
|
1006
|
+
*
|
1007
|
+
* {
|
1008
|
+
* fn: <str function name>,
|
1009
|
+
* calls : <n number of calls>,
|
1010
|
+
* avg : <n average call duration>,
|
1011
|
+
* max: <n duration of longest call>,
|
1012
|
+
* min: <n duration of shortest call>,
|
1013
|
+
* total: <n total time of all calls>
|
1014
|
+
* points : <array time in ms of each call>
|
1015
|
+
* }
|
1016
|
+
*
|
1017
|
+
* For example, you would use the follwing filter function to
|
1018
|
+
* return only functions that have been called at least once:
|
1019
|
+
*
|
1020
|
+
* function(o) {
|
1021
|
+
* return (o.calls > 0);
|
1022
|
+
* }
|
1023
|
+
*
|
1024
|
+
* @attribute filter
|
1025
|
+
* @type function
|
1026
|
+
* @default null
|
1027
|
+
*/
|
1028
|
+
this.setAttributeConfig('filter', {
|
1029
|
+
value: attr.filter || null,
|
1030
|
+
validator: YAHOO.lang.isFunction
|
1031
|
+
});
|
1032
|
+
|
1033
|
+
/**
|
1034
|
+
* The path to the YUI Charts swf file; must be a full URI
|
1035
|
+
* or a path relative to the page being profiled. Changes at runtime
|
1036
|
+
* not supported; pass this value in at instantiation.
|
1037
|
+
* @attribute swfUrl
|
1038
|
+
* @type string
|
1039
|
+
* @default "http://yui.yahooapis.com/2.5.0/build/charts/assets/charts.swf"
|
1040
|
+
*/
|
1041
|
+
this.setAttributeConfig('swfUrl', {
|
1042
|
+
value: attr.swfUrl || "http://yui.yahooapis.com/2.5.0/build/charts/assets/charts.swf"
|
1043
|
+
});
|
1044
|
+
|
1045
|
+
/**
|
1046
|
+
* The maximum number of functions to profile in the chart. The
|
1047
|
+
* greater the number of functions, the greater the height of the
|
1048
|
+
* chart canvas.
|
1049
|
+
* height.
|
1050
|
+
* @attribute maxChartFunctions
|
1051
|
+
* @type int
|
1052
|
+
* @default 6
|
1053
|
+
*/
|
1054
|
+
this.setAttributeConfig('maxChartFunctions', {
|
1055
|
+
value: attr.maxChartFunctions || 6,
|
1056
|
+
method: function(s) {
|
1057
|
+
if(this._rendered) {
|
1058
|
+
this._sizeChartCanvas();
|
1059
|
+
}
|
1060
|
+
},
|
1061
|
+
validator: YAHOO.lang.isNumber
|
1062
|
+
});
|
1063
|
+
|
1064
|
+
/**
|
1065
|
+
* The style object that defines the chart's visual presentation.
|
1066
|
+
* Conforms to the style attribute passed to the Charts Control
|
1067
|
+
* constructor. See Charts Control User's Guide for more information
|
1068
|
+
* on how to format this object.
|
1069
|
+
* @attribute chartStyle
|
1070
|
+
* @type obj
|
1071
|
+
* @default See JS source for default definitions.
|
1072
|
+
*/
|
1073
|
+
this.setAttributeConfig('chartStyle', {
|
1074
|
+
value: attr.chartStyle || {
|
1075
|
+
font:
|
1076
|
+
{
|
1077
|
+
name: "Arial",
|
1078
|
+
color: 0xeeee5c,
|
1079
|
+
size: 12
|
1080
|
+
},
|
1081
|
+
background:
|
1082
|
+
{
|
1083
|
+
color: "6e6e63"
|
1084
|
+
}
|
1085
|
+
},
|
1086
|
+
method: function() {
|
1087
|
+
if(this._rendered && this.get("showChart")) {
|
1088
|
+
this._refreshChart();
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
});
|
1092
|
+
|
1093
|
+
/**
|
1094
|
+
* The series definition information to use when charting
|
1095
|
+
* specific fields on the chart. displayName, xField,
|
1096
|
+
* and style members are used to construct the series
|
1097
|
+
* definition; the "group" member is the array of fields
|
1098
|
+
* that should be charted when the table is sorted by a
|
1099
|
+
* given field.
|
1100
|
+
* @attribute chartSeriesDefinitions
|
1101
|
+
* @type obj
|
1102
|
+
* @default See JS source for full default definitions.
|
1103
|
+
*/
|
1104
|
+
this.setAttributeConfig('chartSeriesDefinitions', {
|
1105
|
+
value: attr.chartSeriesDefinitions || {
|
1106
|
+
total: {
|
1107
|
+
displayName: PV.STRINGS.colHeads.total[0],
|
1108
|
+
xField: "total",
|
1109
|
+
style: {color:"4d95dd", size:20},
|
1110
|
+
group: ["total"]
|
1111
|
+
},
|
1112
|
+
calls: {
|
1113
|
+
displayName: PV.STRINGS.colHeads.calls[0],
|
1114
|
+
xField: "calls",
|
1115
|
+
style: {color:"edff9f", size:20},
|
1116
|
+
group: ["calls"]
|
1117
|
+
},
|
1118
|
+
avg: {
|
1119
|
+
displayName: PV.STRINGS.colHeads.avg[0],
|
1120
|
+
xField: "avg",
|
1121
|
+
style: {color:"209daf", size:9},
|
1122
|
+
group: ["avg", "min", "max"]
|
1123
|
+
},
|
1124
|
+
min: {
|
1125
|
+
displayName: PV.STRINGS.colHeads.min[0],
|
1126
|
+
xField: "min",
|
1127
|
+
style: {color:"b6ecf4", size:9},
|
1128
|
+
group: ["avg", "min", "max"]
|
1129
|
+
},
|
1130
|
+
max: {
|
1131
|
+
displayName: PV.STRINGS.colHeads.max[0],
|
1132
|
+
xField: "max",
|
1133
|
+
style: {color:"29c7de", size:9},
|
1134
|
+
group: ["avg", "min", "max"]
|
1135
|
+
},
|
1136
|
+
pct: {
|
1137
|
+
displayName: PV.STRINGS.colHeads.pct[0],
|
1138
|
+
xField: "pct",
|
1139
|
+
style: {color:"C96EDB", size:20},
|
1140
|
+
group: ["pct"]
|
1141
|
+
}
|
1142
|
+
},
|
1143
|
+
method: function() {
|
1144
|
+
if(this._rendered && this.get("showChart")) {
|
1145
|
+
this._refreshChart();
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
});
|
1149
|
+
|
1150
|
+
/**
|
1151
|
+
* The default visibility setting for the viewer canvas. If true,
|
1152
|
+
* the viewer will load all necessary files and render itself
|
1153
|
+
* immediately upon instantiation; otherwise, the viewer will
|
1154
|
+
* load only minimal resources until the user toggles visibility
|
1155
|
+
* via the UI.
|
1156
|
+
* @attribute visible
|
1157
|
+
* @type boolean
|
1158
|
+
* @default false
|
1159
|
+
*/
|
1160
|
+
this.setAttributeConfig('visible', {
|
1161
|
+
value: attr.visible || false,
|
1162
|
+
validator: YAHOO.lang.isBoolean,
|
1163
|
+
method: function(b) {
|
1164
|
+
if(b) {
|
1165
|
+
this._show();
|
1166
|
+
} else {
|
1167
|
+
if (this._rendered) {
|
1168
|
+
this._hide();
|
1169
|
+
}
|
1170
|
+
}
|
1171
|
+
}
|
1172
|
+
});
|
1173
|
+
|
1174
|
+
/**
|
1175
|
+
* The default visibility setting for the chart.
|
1176
|
+
* @attribute showChart
|
1177
|
+
* @type boolean
|
1178
|
+
* @default true
|
1179
|
+
*/
|
1180
|
+
this.setAttributeConfig('showChart', {
|
1181
|
+
value: attr.showChart || true,
|
1182
|
+
validator: YAHOO.lang.isBoolean,
|
1183
|
+
writeOnce: true
|
1184
|
+
|
1185
|
+
});
|
1186
|
+
|
1187
|
+
YAHOO.widget.ProfilerViewer.superclass.initAttributes.call(this, attr);
|
1188
|
+
|
1189
|
+
};
|
1190
|
+
|
1191
|
+
})();
|
1192
|
+
YAHOO.register("profilerviewer", YAHOO.widget.ProfilerViewer, {version: "2.8.1", build: "19"});
|