From 6beb446925c967aca92f5513adf36c5db77c00d6 Mon Sep 17 00:00:00 2001 From: TATTAVARADA Date: Thu, 27 Apr 2017 07:53:18 -0400 Subject: [PORTAL-7] Rebase This rebasing includes common libraries and common overlays projects abstraction of components Change-Id: Ia1efa4deacdc5701e6205104ac021a6c80ed60ba Signed-off-by: st782s --- .../fusion/external/angular-1.5/angular-animate.js | 4121 -- .../external/angular-1.5/angular-animate.min.js | 56 - .../angular-1.5/angular-animate.min.js.map | 8 - .../fusion/external/angular-1.5/angular-aria.js | 398 - .../external/angular-1.5/angular-aria.min.js | 14 - .../external/angular-1.5/angular-aria.min.js.map | 8 - .../fusion/external/angular-1.5/angular-cookies.js | 322 - .../external/angular-1.5/angular-cookies.min.js | 9 - .../angular-1.5/angular-cookies.min.js.map | 8 - .../fusion/external/angular-1.5/angular-csp.css | 20 - .../fusion/external/angular-1.5/angular-loader.js | 484 - .../external/angular-1.5/angular-loader.min.js | 10 - .../external/angular-1.5/angular-loader.min.js.map | 8 - .../external/angular-1.5/angular-message-format.js | 980 - .../angular-1.5/angular-message-format.min.js | 26 - .../angular-1.5/angular-message-format.min.js.map | 8 - .../external/angular-1.5/angular-messages.js | 687 - .../external/angular-1.5/angular-messages.min.js | 12 - .../angular-1.5/angular-messages.min.js.map | 8 - .../fusion/external/angular-1.5/angular-mocks.js | 2842 -- .../external/angular-1.5/angular-resource.js | 768 - .../external/angular-1.5/angular-resource.min.js | 15 - .../angular-1.5/angular-resource.min.js.map | 8 - .../fusion/external/angular-1.5/angular-route.js | 1016 - .../external/angular-1.5/angular-route.min.js | 15 - .../external/angular-1.5/angular-route.min.js.map | 8 - .../external/angular-1.5/angular-sanitize.js | 717 - .../external/angular-1.5/angular-sanitize.min.js | 15 - .../angular-1.5/angular-sanitize.min.js.map | 8 - .../external/angular-1.5/angular-scenario.js | 41849 ------------------- .../fusion/external/angular-1.5/angular-touch.js | 729 - .../external/angular-1.5/angular-touch.min.js | 14 - .../external/angular-1.5/angular-touch.min.js.map | 8 - .../app/fusion/external/angular-1.5/angular.js | 30428 -------------- .../app/fusion/external/angular-1.5/angular.min.js | 307 - .../fusion/external/angular-1.5/angular.min.js.map | 8 - .../app/fusion/external/angular-1.5/errors.json | 1 - .../app/fusion/external/angular-1.5/version.json | 1 - .../app/fusion/external/angular-1.5/version.txt | 1 - .../angular-ui/ui-bootstrap-tpls-1.1.2.min.js | 10 - .../angular-ui/ui-bootstrap-tpls-1.2.4.min.js | 10 - .../webapp/app/fusion/external/bootstrap/bs.css | 678 - .../webapp/app/fusion/external/d3/css/nv.d3.css | 656 - .../main/webapp/app/fusion/external/d3/js/cie.js | 155 - .../app/fusion/external/d3/js/colorbrewer.js | 302 - .../main/webapp/app/fusion/external/d3/js/core.js | 122 - .../app/fusion/external/d3/js/crossfilter.js | 1180 - .../app/fusion/external/d3/js/crossfilter.min.js | 1 - .../webapp/app/fusion/external/d3/js/d3.geom.js | 816 - .../main/webapp/app/fusion/external/d3/js/d3.js | 5 - .../app/fusion/external/d3/js/d3.layout.cloud.js | 433 - .../webapp/app/fusion/external/d3/js/d3.layout.js | 908 - .../main/webapp/app/fusion/external/d3/js/d3.v2.js | 7037 ---- .../webapp/app/fusion/external/d3/js/d3.v2.min.js | 4 - .../webapp/app/fusion/external/d3/js/d3.v3.min.js | 1 - .../webapp/app/fusion/external/d3/js/fisheye.js | 86 - .../main/webapp/app/fusion/external/d3/js/hive.js | 80 - .../webapp/app/fusion/external/d3/js/horizon.js | 192 - .../app/fusion/external/d3/js/interactiveLayer.js | 251 - .../main/webapp/app/fusion/external/d3/js/intro.js | 1 - .../app/fusion/external/d3/js/models/axis-min.js | 1 - .../app/fusion/external/d3/js/models/axis.js | 470 - .../app/fusion/external/d3/js/models/axis.min.js | 1 - .../fusion/external/d3/js/models/backup/bullet.js | 250 - .../external/d3/js/models/backup/bulletChart.js | 349 - .../fusion/external/d3/js/models/boilerplate.js | 104 - .../app/fusion/external/d3/js/models/bullet.js | 385 - .../fusion/external/d3/js/models/bulletChart.js | 343 - .../external/d3/js/models/cumulativeLineChart.js | 782 - .../fusion/external/d3/js/models/discreteBar.js | 349 - .../external/d3/js/models/discreteBarChart.js | 333 - .../fusion/external/d3/js/models/distribution.js | 148 - .../fusion/external/d3/js/models/historicalBar.js | 331 - .../external/d3/js/models/historicalBarChart.js | 419 - .../fusion/external/d3/js/models/indentedTree.js | 337 - .../app/fusion/external/d3/js/models/legend.js | 270 - .../app/fusion/external/d3/js/models/line.js | 284 - .../app/fusion/external/d3/js/models/lineChart.js | 465 - .../external/d3/js/models/linePlusBarChart.js | 433 - .../d3/js/models/linePlusBarWithFocusChart.js | 658 - .../external/d3/js/models/lineWithFisheye.js | 200 - .../external/d3/js/models/lineWithFisheyeChart.js | 297 - .../external/d3/js/models/lineWithFocusChart.js | 574 - .../app/fusion/external/d3/js/models/multiBar.js | 461 - .../fusion/external/d3/js/models/multiBarChart.js | 524 - .../external/d3/js/models/multiBarHorizontal.js | 424 - .../d3/js/models/multiBarHorizontalChart.js | 434 - .../external/d3/js/models/multiBarTimeSeries.js | 384 - .../d3/js/models/multiBarTimeSeriesChart.js | 405 - .../app/fusion/external/d3/js/models/multiChart.js | 452 - .../app/fusion/external/d3/js/models/ohlcBar.js | 380 - .../external/d3/js/models/parallelCoordinates.js | 239 - .../webapp/app/fusion/external/d3/js/models/pie.js | 400 - .../app/fusion/external/d3/js/models/pieChart.js | 292 - .../app/fusion/external/d3/js/models/scatter.js | 674 - .../fusion/external/d3/js/models/scatterChart.js | 628 - .../external/d3/js/models/scatterPlusLineChart.js | 620 - .../app/fusion/external/d3/js/models/sparkline.js | 194 - .../fusion/external/d3/js/models/sparklinePlus.js | 295 - .../fusion/external/d3/js/models/stackedArea.js | 368 - .../external/d3/js/models/stackedAreaChart.js | 629 - .../main/webapp/app/fusion/external/d3/js/nv.d3.js | 13097 ------ .../webapp/app/fusion/external/d3/js/nv.d3.min.js | 1 - .../main/webapp/app/fusion/external/d3/js/outro.js | 1 - .../webapp/app/fusion/external/d3/js/sankey.js | 292 - .../webapp/app/fusion/external/d3/js/tooltip.js | 490 - .../main/webapp/app/fusion/external/d3/js/utils.js | 152 - .../external/ebz/angular_js/angular-animate.js | 3721 -- .../external/ebz/angular_js/angular-cookies.js | 206 - .../external/ebz/angular_js/angular-route.js | 911 - .../external/ebz/angular_js/angular-route.min.js | 14 - .../external/ebz/angular_js/angular-sanitize.js | 647 - .../external/ebz/angular_js/angular-touch.js | 628 - .../app/fusion/external/ebz/angular_js/angular.js | 22024 ---------- .../app/fusion/external/ebz/angular_js/app.js | 6 - .../external/ebz/angular_js/checklist-model.js | 99 - .../external/ebz/angular_js/checklist-model.min.js | 1 - .../app/fusion/external/ebz/angular_js/gestures.js | 1495 - .../app/fusion/external/ebz/angular_js/ng_base.js | 4 - .../external/ebz/angular_js/ui-charts-tpls.js | 3909 -- .../app/fusion/external/ebz/ebz_header/footer.css | 311 - .../app/fusion/external/ebz/ebz_header/header.css | 1866 - .../external/ebz/ebz_header/portal_ebz_header.css | 63 - .../main/webapp/app/fusion/external/ebz/fn-ebz.css | 1614 - .../external/ebz/images/no_favorites_star.png | Bin 2794 -> 0 bytes .../app/fusion/external/ebz/js/attHeaderSnippet.js | 210 - .../webapp/app/fusion/external/ebz/js/footer.js | 110 - .../fusion/external/ebz/sandbox/att-abs-tpls.js | 20451 --------- .../external/ebz/sandbox/att-abs-tpls.min.js | 22 - .../fusion/external/ebz/sandbox/styles/base.css | 1 - .../app/fusion/external/ebz/sandbox/styles/btn.css | 1 - .../fusion/external/ebz/sandbox/styles/demo.css | 2 - .../fusion/external/ebz/sandbox/styles/dtpk.css | 9 - .../fusion/external/ebz/sandbox/styles/frms.css | 1 - .../ebz/sandbox/styles/ie/backgroundsize.min.htc | 12 - .../ebz/sandbox/styles/images/upanddown.png | Bin 1033 -> 0 bytes .../ebz/sandbox/styles/pages/iconography.css | 2 - .../fusion/external/ebz/sandbox/styles/sldr.css | 1 - .../fusion/external/ebz/sandbox/styles/style.css | 1 - .../app/fusion/external/ebz/sandbox/styles/tbs.css | 1 - .../app/fusion/external/ionicons-2.0.1/.gitignore | 4 - .../app/fusion/external/ionicons-2.0.1/LICENSE | 21 - .../app/fusion/external/ionicons-2.0.1/bower.json | 31 - .../fusion/external/ionicons-2.0.1/component.json | 19 - .../fusion/external/ionicons-2.0.1/composer.json | 36 - .../external/ionicons-2.0.1/css/ionicons.css | 1480 - .../external/ionicons-2.0.1/css/ionicons.min.css | 11 - .../external/ionicons-2.0.1/fonts/ionicons.eot | Bin 120724 -> 0 bytes .../external/ionicons-2.0.1/fonts/ionicons.svg | 2230 - .../external/ionicons-2.0.1/fonts/ionicons.ttf | Bin 188508 -> 0 bytes .../external/ionicons-2.0.1/fonts/ionicons.woff | Bin 67904 -> 0 bytes .../ionicons-2.0.1/less/_ionicons-font.less | 27 - .../ionicons-2.0.1/less/_ionicons-icons.less | 1473 - .../ionicons-2.0.1/less/_ionicons-variables.less | 747 - .../external/ionicons-2.0.1/less/ionicons.less | 3 - .../ionicons-2.0.1/png/512/alert-circled.png | Bin 2551 -> 0 bytes .../external/ionicons-2.0.1/png/512/alert.png | Bin 766 -> 0 bytes .../ionicons-2.0.1/png/512/android-add-contact.png | Bin 3279 -> 0 bytes .../ionicons-2.0.1/png/512/android-add.png | Bin 240 -> 0 bytes .../ionicons-2.0.1/png/512/android-alarm.png | Bin 6428 -> 0 bytes .../ionicons-2.0.1/png/512/android-archive.png | Bin 1628 -> 0 bytes .../ionicons-2.0.1/png/512/android-arrow-back.png | Bin 1218 -> 0 bytes .../png/512/android-arrow-down-left.png | Bin 1451 -> 0 bytes .../png/512/android-arrow-down-right.png | Bin 1462 -> 0 bytes .../png/512/android-arrow-forward.png | Bin 1191 -> 0 bytes .../png/512/android-arrow-up-left.png | Bin 1499 -> 0 bytes .../png/512/android-arrow-up-right.png | Bin 1482 -> 0 bytes .../ionicons-2.0.1/png/512/android-battery.png | Bin 238 -> 0 bytes .../ionicons-2.0.1/png/512/android-book.png | Bin 3746 -> 0 bytes .../ionicons-2.0.1/png/512/android-calendar.png | Bin 849 -> 0 bytes .../ionicons-2.0.1/png/512/android-call.png | Bin 4766 -> 0 bytes .../ionicons-2.0.1/png/512/android-camera.png | Bin 3871 -> 0 bytes .../ionicons-2.0.1/png/512/android-chat.png | Bin 3577 -> 0 bytes .../ionicons-2.0.1/png/512/android-checkmark.png | Bin 1846 -> 0 bytes .../ionicons-2.0.1/png/512/android-clock.png | Bin 5268 -> 0 bytes .../ionicons-2.0.1/png/512/android-close.png | Bin 2156 -> 0 bytes .../ionicons-2.0.1/png/512/android-contact.png | Bin 3658 -> 0 bytes .../ionicons-2.0.1/png/512/android-contacts.png | Bin 4299 -> 0 bytes .../ionicons-2.0.1/png/512/android-data.png | Bin 4808 -> 0 bytes .../ionicons-2.0.1/png/512/android-developer.png | Bin 4115 -> 0 bytes .../ionicons-2.0.1/png/512/android-display.png | Bin 4909 -> 0 bytes .../ionicons-2.0.1/png/512/android-download.png | Bin 4890 -> 0 bytes .../ionicons-2.0.1/png/512/android-drawer.png | Bin 190 -> 0 bytes .../ionicons-2.0.1/png/512/android-dropdown.png | Bin 777 -> 0 bytes .../ionicons-2.0.1/png/512/android-earth.png | Bin 6517 -> 0 bytes .../ionicons-2.0.1/png/512/android-folder.png | Bin 1688 -> 0 bytes .../ionicons-2.0.1/png/512/android-forums.png | Bin 1739 -> 0 bytes .../ionicons-2.0.1/png/512/android-friends.png | Bin 4868 -> 0 bytes .../ionicons-2.0.1/png/512/android-hand.png | Bin 4650 -> 0 bytes .../ionicons-2.0.1/png/512/android-image.png | Bin 1433 -> 0 bytes .../ionicons-2.0.1/png/512/android-inbox.png | Bin 3018 -> 0 bytes .../ionicons-2.0.1/png/512/android-information.png | Bin 3370 -> 0 bytes .../ionicons-2.0.1/png/512/android-keypad.png | Bin 1055 -> 0 bytes .../ionicons-2.0.1/png/512/android-lightbulb.png | Bin 3515 -> 0 bytes .../ionicons-2.0.1/png/512/android-locate.png | Bin 5003 -> 0 bytes .../ionicons-2.0.1/png/512/android-location.png | Bin 3067 -> 0 bytes .../ionicons-2.0.1/png/512/android-mail.png | Bin 3455 -> 0 bytes .../ionicons-2.0.1/png/512/android-microphone.png | Bin 3267 -> 0 bytes .../ionicons-2.0.1/png/512/android-mixer.png | Bin 2727 -> 0 bytes .../ionicons-2.0.1/png/512/android-more.png | Bin 224 -> 0 bytes .../ionicons-2.0.1/png/512/android-note.png | Bin 249 -> 0 bytes .../ionicons-2.0.1/png/512/android-playstore.png | Bin 3165 -> 0 bytes .../ionicons-2.0.1/png/512/android-printer.png | Bin 1721 -> 0 bytes .../ionicons-2.0.1/png/512/android-promotion.png | Bin 2374 -> 0 bytes .../ionicons-2.0.1/png/512/android-reminder.png | Bin 2890 -> 0 bytes .../ionicons-2.0.1/png/512/android-remove.png | Bin 160 -> 0 bytes .../ionicons-2.0.1/png/512/android-search.png | Bin 4232 -> 0 bytes .../ionicons-2.0.1/png/512/android-send.png | Bin 2079 -> 0 bytes .../ionicons-2.0.1/png/512/android-settings.png | Bin 3883 -> 0 bytes .../ionicons-2.0.1/png/512/android-share.png | Bin 3212 -> 0 bytes .../ionicons-2.0.1/png/512/android-social-user.png | Bin 3644 -> 0 bytes .../ionicons-2.0.1/png/512/android-social.png | Bin 3849 -> 0 bytes .../ionicons-2.0.1/png/512/android-sort.png | Bin 197 -> 0 bytes .../png/512/android-stair-drawer.png | Bin 209 -> 0 bytes .../ionicons-2.0.1/png/512/android-star.png | Bin 2926 -> 0 bytes .../ionicons-2.0.1/png/512/android-stopwatch.png | Bin 5225 -> 0 bytes .../ionicons-2.0.1/png/512/android-storage.png | Bin 233 -> 0 bytes .../ionicons-2.0.1/png/512/android-system-back.png | Bin 1796 -> 0 bytes .../ionicons-2.0.1/png/512/android-system-home.png | Bin 1107 -> 0 bytes .../png/512/android-system-windows.png | Bin 202 -> 0 bytes .../ionicons-2.0.1/png/512/android-timer.png | Bin 3904 -> 0 bytes .../ionicons-2.0.1/png/512/android-trash.png | Bin 2865 -> 0 bytes .../ionicons-2.0.1/png/512/android-user-menu.png | Bin 3568 -> 0 bytes .../ionicons-2.0.1/png/512/android-volume.png | Bin 6022 -> 0 bytes .../ionicons-2.0.1/png/512/android-wifi.png | Bin 4868 -> 0 bytes .../external/ionicons-2.0.1/png/512/aperture.png | Bin 9500 -> 0 bytes .../external/ionicons-2.0.1/png/512/archive.png | Bin 2445 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-down-a.png | Bin 1173 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-down-b.png | Bin 1307 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-down-c.png | Bin 1966 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-expand.png | Bin 2498 -> 0 bytes .../png/512/arrow-graph-down-left.png | Bin 2478 -> 0 bytes .../png/512/arrow-graph-down-right.png | Bin 2545 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-graph-up-left.png | Bin 2440 -> 0 bytes .../png/512/arrow-graph-up-right.png | Bin 2440 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-left-a.png | Bin 1260 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-left-b.png | Bin 1608 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-left-c.png | Bin 1662 -> 0 bytes .../external/ionicons-2.0.1/png/512/arrow-move.png | Bin 1948 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-resize.png | Bin 1266 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-return-left.png | Bin 1082 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-return-right.png | Bin 1124 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-right-a.png | Bin 1317 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-right-b.png | Bin 1671 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-right-c.png | Bin 1657 -> 0 bytes .../ionicons-2.0.1/png/512/arrow-shrink.png | Bin 2594 -> 0 bytes .../external/ionicons-2.0.1/png/512/arrow-swap.png | Bin 1521 -> 0 bytes .../external/ionicons-2.0.1/png/512/arrow-up-a.png | Bin 1115 -> 0 bytes .../external/ionicons-2.0.1/png/512/arrow-up-b.png | Bin 1343 -> 0 bytes .../external/ionicons-2.0.1/png/512/arrow-up-c.png | Bin 2002 -> 0 bytes .../external/ionicons-2.0.1/png/512/asterisk.png | Bin 4023 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/at.png | Bin 5852 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/bag.png | Bin 3665 -> 0 bytes .../ionicons-2.0.1/png/512/battery-charging.png | Bin 1897 -> 0 bytes .../ionicons-2.0.1/png/512/battery-empty.png | Bin 1019 -> 0 bytes .../ionicons-2.0.1/png/512/battery-full.png | Bin 982 -> 0 bytes .../ionicons-2.0.1/png/512/battery-half.png | Bin 1320 -> 0 bytes .../ionicons-2.0.1/png/512/battery-low.png | Bin 1342 -> 0 bytes .../external/ionicons-2.0.1/png/512/beaker.png | Bin 3931 -> 0 bytes .../external/ionicons-2.0.1/png/512/beer.png | Bin 4559 -> 0 bytes .../external/ionicons-2.0.1/png/512/bluetooth.png | Bin 2909 -> 0 bytes .../external/ionicons-2.0.1/png/512/bonfire.png | Bin 4852 -> 0 bytes .../external/ionicons-2.0.1/png/512/bookmark.png | Bin 1102 -> 0 bytes .../external/ionicons-2.0.1/png/512/briefcase.png | Bin 1475 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/bug.png | Bin 4736 -> 0 bytes .../external/ionicons-2.0.1/png/512/calculator.png | Bin 1315 -> 0 bytes .../external/ionicons-2.0.1/png/512/calendar.png | Bin 2577 -> 0 bytes .../external/ionicons-2.0.1/png/512/camera.png | Bin 4190 -> 0 bytes .../external/ionicons-2.0.1/png/512/card.png | Bin 1494 -> 0 bytes .../external/ionicons-2.0.1/png/512/cash.png | Bin 3435 -> 0 bytes .../ionicons-2.0.1/png/512/chatbox-working.png | Bin 2301 -> 0 bytes .../external/ionicons-2.0.1/png/512/chatbox.png | Bin 1870 -> 0 bytes .../external/ionicons-2.0.1/png/512/chatboxes.png | Bin 2562 -> 0 bytes .../ionicons-2.0.1/png/512/chatbubble-working.png | Bin 3028 -> 0 bytes .../external/ionicons-2.0.1/png/512/chatbubble.png | Bin 2579 -> 0 bytes .../ionicons-2.0.1/png/512/chatbubbles.png | Bin 3751 -> 0 bytes .../ionicons-2.0.1/png/512/checkmark-circled.png | Bin 3687 -> 0 bytes .../ionicons-2.0.1/png/512/checkmark-round.png | Bin 2367 -> 0 bytes .../external/ionicons-2.0.1/png/512/checkmark.png | Bin 2134 -> 0 bytes .../ionicons-2.0.1/png/512/chevron-down.png | Bin 1689 -> 0 bytes .../ionicons-2.0.1/png/512/chevron-left.png | Bin 1769 -> 0 bytes .../ionicons-2.0.1/png/512/chevron-right.png | Bin 1831 -> 0 bytes .../external/ionicons-2.0.1/png/512/chevron-up.png | Bin 1677 -> 0 bytes .../external/ionicons-2.0.1/png/512/clipboard.png | Bin 2593 -> 0 bytes .../external/ionicons-2.0.1/png/512/clock.png | Bin 5866 -> 0 bytes .../ionicons-2.0.1/png/512/close-circled.png | Bin 3809 -> 0 bytes .../ionicons-2.0.1/png/512/close-round.png | Bin 2177 -> 0 bytes .../external/ionicons-2.0.1/png/512/close.png | Bin 2244 -> 0 bytes .../ionicons-2.0.1/png/512/closed-captioning.png | Bin 3665 -> 0 bytes .../external/ionicons-2.0.1/png/512/cloud.png | Bin 2067 -> 0 bytes .../ionicons-2.0.1/png/512/code-download.png | Bin 2423 -> 0 bytes .../ionicons-2.0.1/png/512/code-working.png | Bin 2433 -> 0 bytes .../external/ionicons-2.0.1/png/512/code.png | Bin 1720 -> 0 bytes .../external/ionicons-2.0.1/png/512/coffee.png | Bin 3205 -> 0 bytes .../external/ionicons-2.0.1/png/512/compass.png | Bin 7318 -> 0 bytes .../external/ionicons-2.0.1/png/512/compose.png | Bin 4296 -> 0 bytes .../ionicons-2.0.1/png/512/connection-bars.png | Bin 214 -> 0 bytes .../external/ionicons-2.0.1/png/512/contrast.png | Bin 4087 -> 0 bytes .../external/ionicons-2.0.1/png/512/cube.png | Bin 3265 -> 0 bytes .../external/ionicons-2.0.1/png/512/disc.png | Bin 4935 -> 0 bytes .../ionicons-2.0.1/png/512/document-text.png | Bin 1918 -> 0 bytes .../external/ionicons-2.0.1/png/512/document.png | Bin 1914 -> 0 bytes .../external/ionicons-2.0.1/png/512/drag.png | Bin 178 -> 0 bytes .../external/ionicons-2.0.1/png/512/earth.png | Bin 6476 -> 0 bytes .../external/ionicons-2.0.1/png/512/edit.png | Bin 2741 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/egg.png | Bin 4234 -> 0 bytes .../external/ionicons-2.0.1/png/512/eject.png | Bin 3209 -> 0 bytes .../external/ionicons-2.0.1/png/512/email.png | Bin 3125 -> 0 bytes .../ionicons-2.0.1/png/512/eye-disabled.png | Bin 3558 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/eye.png | Bin 3297 -> 0 bytes .../external/ionicons-2.0.1/png/512/female.png | Bin 2779 -> 0 bytes .../external/ionicons-2.0.1/png/512/filing.png | Bin 2349 -> 0 bytes .../ionicons-2.0.1/png/512/film-marker.png | Bin 2645 -> 0 bytes .../external/ionicons-2.0.1/png/512/fireball.png | Bin 3325 -> 0 bytes .../external/ionicons-2.0.1/png/512/flag.png | Bin 2337 -> 0 bytes .../external/ionicons-2.0.1/png/512/flame.png | Bin 3012 -> 0 bytes .../external/ionicons-2.0.1/png/512/flash-off.png | Bin 5437 -> 0 bytes .../external/ionicons-2.0.1/png/512/flash.png | Bin 1965 -> 0 bytes .../external/ionicons-2.0.1/png/512/flask.png | Bin 2939 -> 0 bytes .../external/ionicons-2.0.1/png/512/folder.png | Bin 1689 -> 0 bytes .../external/ionicons-2.0.1/png/512/fork-repo.png | Bin 3236 -> 0 bytes .../external/ionicons-2.0.1/png/512/fork.png | Bin 3007 -> 0 bytes .../external/ionicons-2.0.1/png/512/forward.png | Bin 2142 -> 0 bytes .../external/ionicons-2.0.1/png/512/funnel.png | Bin 3354 -> 0 bytes .../ionicons-2.0.1/png/512/game-controller-a.png | Bin 2548 -> 0 bytes .../ionicons-2.0.1/png/512/game-controller-b.png | Bin 3623 -> 0 bytes .../external/ionicons-2.0.1/png/512/gear-a.png | Bin 3806 -> 0 bytes .../external/ionicons-2.0.1/png/512/gear-b.png | Bin 2756 -> 0 bytes .../external/ionicons-2.0.1/png/512/grid.png | Bin 1066 -> 0 bytes .../external/ionicons-2.0.1/png/512/hammer.png | Bin 2493 -> 0 bytes .../external/ionicons-2.0.1/png/512/happy.png | Bin 5732 -> 0 bytes .../external/ionicons-2.0.1/png/512/headphone.png | Bin 4082 -> 0 bytes .../ionicons-2.0.1/png/512/heart-broken.png | Bin 4007 -> 0 bytes .../external/ionicons-2.0.1/png/512/heart.png | Bin 2322 -> 0 bytes .../external/ionicons-2.0.1/png/512/help-buoy.png | Bin 5824 -> 0 bytes .../ionicons-2.0.1/png/512/help-circled.png | Bin 3940 -> 0 bytes .../external/ionicons-2.0.1/png/512/help.png | Bin 2678 -> 0 bytes .../external/ionicons-2.0.1/png/512/home.png | Bin 1275 -> 0 bytes .../external/ionicons-2.0.1/png/512/icecream.png | Bin 2317 -> 0 bytes .../png/512/icon-social-google-plus-outline.png | Bin 4071 -> 0 bytes .../png/512/icon-social-google-plus.png | Bin 3888 -> 0 bytes .../external/ionicons-2.0.1/png/512/image.png | Bin 2952 -> 0 bytes .../external/ionicons-2.0.1/png/512/images.png | Bin 5073 -> 0 bytes .../ionicons-2.0.1/png/512/information-circled.png | Bin 3300 -> 0 bytes .../ionicons-2.0.1/png/512/information.png | Bin 2236 -> 0 bytes .../external/ionicons-2.0.1/png/512/ionic.png | Bin 5541 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-alarm-outline.png | Bin 5769 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-alarm.png | Bin 3922 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-albums-outline.png | Bin 231 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-albums.png | Bin 226 -> 0 bytes .../png/512/ios7-americanfootball-outline.png | Bin 5767 -> 0 bytes .../png/512/ios7-americanfootball.png | Bin 5675 -> 0 bytes .../png/512/ios7-analytics-outline.png | Bin 5847 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-analytics.png | Bin 4406 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-back.png | Bin 881 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-down.png | Bin 1451 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-forward.png | Bin 898 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-left.png | Bin 1550 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-right.png | Bin 1537 -> 0 bytes .../png/512/ios7-arrow-thin-down.png | Bin 1632 -> 0 bytes .../png/512/ios7-arrow-thin-left.png | Bin 1258 -> 0 bytes .../png/512/ios7-arrow-thin-right.png | Bin 1235 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-thin-up.png | Bin 1647 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-arrow-up.png | Bin 1482 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-at-outline.png | Bin 4303 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-at.png | Bin 4153 -> 0 bytes .../png/512/ios7-barcode-outline.png | Bin 233 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-barcode.png | Bin 219 -> 0 bytes .../png/512/ios7-baseball-outline.png | Bin 6676 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-baseball.png | Bin 5565 -> 0 bytes .../png/512/ios7-basketball-outline.png | Bin 6200 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-basketball.png | Bin 6525 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-bell-outline.png | Bin 3615 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-bell.png | Bin 2769 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-bolt-outline.png | Bin 2384 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-bolt.png | Bin 1892 -> 0 bytes .../png/512/ios7-bookmarks-outline.png | Bin 2454 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-bookmarks.png | Bin 2172 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-box-outline.png | Bin 1602 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-box.png | Bin 1032 -> 0 bytes .../png/512/ios7-briefcase-outline.png | Bin 1359 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-briefcase.png | Bin 1316 -> 0 bytes .../png/512/ios7-browsers-outline.png | Bin 372 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-browsers.png | Bin 357 -> 0 bytes .../png/512/ios7-calculator-outline.png | Bin 1785 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-calculator.png | Bin 1500 -> 0 bytes .../png/512/ios7-calendar-outline.png | Bin 236 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-calendar.png | Bin 230 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-camera-outline.png | Bin 3582 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-camera.png | Bin 3099 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cart-outline.png | Bin 2861 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-cart.png | Bin 2200 -> 0 bytes .../png/512/ios7-chatboxes-outline.png | Bin 901 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-chatboxes.png | Bin 512 -> 0 bytes .../png/512/ios7-chatbubble-outline.png | Bin 3640 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-chatbubble.png | Bin 2259 -> 0 bytes .../png/512/ios7-checkmark-empty.png | Bin 920 -> 0 bytes .../png/512/ios7-checkmark-outline.png | Bin 4706 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-checkmark.png | Bin 3080 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-circle-filled.png | Bin 6478 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-circle-outline.png | Bin 4120 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-clock-outline.png | Bin 4320 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-clock.png | Bin 2762 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-close-empty.png | Bin 1204 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-close-outline.png | Bin 4999 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-close.png | Bin 3426 -> 0 bytes .../png/512/ios7-cloud-download-outline.png | Bin 3953 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cloud-download.png | Bin 2782 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cloud-outline.png | Bin 3339 -> 0 bytes .../png/512/ios7-cloud-upload-outline.png | Bin 3927 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cloud-upload.png | Bin 2815 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-cloud.png | Bin 2082 -> 0 bytes .../png/512/ios7-cloudy-night-outline.png | Bin 3814 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cloudy-night.png | Bin 2870 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cloudy-outline.png | Bin 2280 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cloudy.png | Bin 1572 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-cog-outline.png | Bin 8008 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-cog.png | Bin 6029 -> 0 bytes .../png/512/ios7-compose-outline.png | Bin 1584 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-compose.png | Bin 2061 -> 0 bytes .../png/512/ios7-contact-outline.png | Bin 4846 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-contact.png | Bin 4218 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-copy-outline.png | Bin 927 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-copy.png | Bin 782 -> 0 bytes .../png/512/ios7-download-outline.png | Bin 1163 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-download.png | Bin 1135 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-drag.png | Bin 165 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-email-outline.png | Bin 2592 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-email.png | Bin 4167 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-expand.png | Bin 485 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-eye-outline.png | Bin 4381 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-eye.png | Bin 2973 -> 0 bytes .../png/512/ios7-fastforward-outline.png | Bin 2726 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-fastforward.png | Bin 2158 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-filing-outline.png | Bin 2041 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-filing.png | Bin 1933 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-film-outline.png | Bin 772 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-film.png | Bin 722 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-flag-outline.png | Bin 1928 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-flag.png | Bin 1483 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-folder-outline.png | Bin 1606 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-folder.png | Bin 1640 -> 0 bytes .../png/512/ios7-football-outline.png | Bin 6266 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-football.png | Bin 5391 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-gear-outline.png | Bin 5721 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-gear.png | Bin 3445 -> 0 bytes .../png/512/ios7-glasses-outline.png | Bin 3597 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-glasses.png | Bin 2350 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-heart-outline.png | Bin 3097 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-heart.png | Bin 2078 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-help-empty.png | Bin 1669 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-help-outline.png | Bin 5608 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-help.png | Bin 3587 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-home-outline.png | Bin 1710 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-home.png | Bin 1518 -> 0 bytes .../png/512/ios7-infinite-outline.png | Bin 3028 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-infinite.png | Bin 2989 -> 0 bytes .../png/512/ios7-information-empty.png | Bin 837 -> 0 bytes .../png/512/ios7-information-outline.png | Bin 4563 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-information.png | Bin 2959 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-ionic-outline.png | Bin 5780 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-keypad-outline.png | Bin 7485 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-keypad.png | Bin 7505 -> 0 bytes .../png/512/ios7-lightbulb-outline.png | Bin 3791 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-lightbulb.png | Bin 2696 -> 0 bytes .../png/512/ios7-location-outline.png | Bin 4116 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-location.png | Bin 2767 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-locked-outline.png | Bin 2640 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-locked.png | Bin 2674 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-loop-strong.png | Bin 4101 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-loop.png | Bin 4270 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-medkit-outline.png | Bin 1386 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-medkit.png | Bin 1373 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-mic-off.png | Bin 7597 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-mic-outline.png | Bin 3550 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-mic.png | Bin 3878 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-minus-empty.png | Bin 153 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-minus-outline.png | Bin 4137 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-minus.png | Bin 2520 -> 0 bytes .../png/512/ios7-monitor-outline.png | Bin 225 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-monitor.png | Bin 230 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-moon-outline.png | Bin 2566 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-moon.png | Bin 1784 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-more-outline.png | Bin 1598 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-more.png | Bin 1700 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-musical-note.png | Bin 1521 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-musical-notes.png | Bin 2124 -> 0 bytes .../png/512/ios7-navigate-outline.png | Bin 4901 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-navigate.png | Bin 3333 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-paper-outline.png | Bin 1361 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-paper.png | Bin 1197 -> 0 bytes .../png/512/ios7-paperplane-outline.png | Bin 2952 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-paperplane.png | Bin 4805 -> 0 bytes .../png/512/ios7-partlysunny-outline.png | Bin 4823 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-partlysunny.png | Bin 4052 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-pause-outline.png | Bin 227 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-pause.png | Bin 213 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-paw-outline.png | Bin 6318 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-paw.png | Bin 4119 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-people-outline.png | Bin 5295 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-people.png | Bin 3439 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-person-outline.png | Bin 3189 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-person.png | Bin 2046 -> 0 bytes .../png/512/ios7-personadd-outline.png | Bin 3246 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-personadd.png | Bin 2110 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-photos-outline.png | Bin 234 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-photos.png | Bin 226 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-pie-outline.png | Bin 4549 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-pie.png | Bin 3646 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-play-outline.png | Bin 1474 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-play.png | Bin 1216 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-plus-empty.png | Bin 204 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-plus-outline.png | Bin 4415 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-plus.png | Bin 2970 -> 0 bytes .../png/512/ios7-pricetag-outline.png | Bin 3007 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-pricetag.png | Bin 2593 -> 0 bytes .../png/512/ios7-pricetags-outline.png | Bin 3563 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-pricetags.png | Bin 3219 -> 0 bytes .../png/512/ios7-printer-outline.png | Bin 1764 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-printer.png | Bin 1456 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-pulse-strong.png | Bin 3326 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-pulse.png | Bin 2955 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-rainy-outline.png | Bin 3346 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-rainy.png | Bin 2567 -> 0 bytes .../png/512/ios7-recording-outline.png | Bin 4926 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-recording.png | Bin 3762 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-redo-outline.png | Bin 3094 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-redo.png | Bin 2054 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-refresh-empty.png | Bin 2685 -> 0 bytes .../png/512/ios7-refresh-outline.png | Bin 6021 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-refresh.png | Bin 4579 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-reload.png | Bin 4195 -> 0 bytes .../png/512/ios7-reverse-camera-outline.png | Bin 3404 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-reverse-camera.png | Bin 3019 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-rewind-outline.png | Bin 2898 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-rewind.png | Bin 2362 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-search-strong.png | Bin 3329 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-search.png | Bin 3361 -> 0 bytes .../png/512/ios7-settings-strong.png | Bin 1714 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-settings.png | Bin 2160 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-shrink.png | Bin 490 -> 0 bytes .../png/512/ios7-skipbackward-outline.png | Bin 1890 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-skipbackward.png | Bin 1533 -> 0 bytes .../png/512/ios7-skipforward-outline.png | Bin 1827 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-skipforward.png | Bin 1556 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-snowy.png | Bin 3775 -> 0 bytes .../png/512/ios7-speedometer-outline.png | Bin 4678 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-speedometer.png | Bin 5748 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-star-half.png | Bin 3431 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-star-outline.png | Bin 3572 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-star.png | Bin 2463 -> 0 bytes .../png/512/ios7-stopwatch-outline.png | Bin 4823 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-stopwatch.png | Bin 3451 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-sunny-outline.png | Bin 2669 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-sunny.png | Bin 2506 -> 0 bytes .../png/512/ios7-telephone-outline.png | Bin 3779 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-telephone.png | Bin 2352 -> 0 bytes .../png/512/ios7-tennisball-outline.png | Bin 5535 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-tennisball.png | Bin 6356 -> 0 bytes .../png/512/ios7-thunderstorm-outline.png | Bin 3053 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-thunderstorm.png | Bin 2492 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-time-outline.png | Bin 5875 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-time.png | Bin 4136 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-timer-outline.png | Bin 4578 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-timer.png | Bin 6013 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-toggle-outline.png | Bin 5660 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-toggle.png | Bin 4825 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-trash-outline.png | Bin 4497 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-trash.png | Bin 2760 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-undo-outline.png | Bin 3114 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-undo.png | Bin 1954 -> 0 bytes .../png/512/ios7-unlocked-outline.png | Bin 2580 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-unlocked.png | Bin 2605 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-upload-outline.png | Bin 1128 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-upload.png | Bin 1085 -> 0 bytes .../png/512/ios7-videocam-outline.png | Bin 2038 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-videocam.png | Bin 2715 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-volume-high.png | Bin 2977 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-volume-low.png | Bin 956 -> 0 bytes .../png/512/ios7-wineglass-outline.png | Bin 2527 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-wineglass.png | Bin 2013 -> 0 bytes .../ionicons-2.0.1/png/512/ios7-world-outline.png | Bin 7420 -> 0 bytes .../external/ionicons-2.0.1/png/512/ios7-world.png | Bin 10031 -> 0 bytes .../external/ionicons-2.0.1/png/512/ipad.png | Bin 1356 -> 0 bytes .../external/ionicons-2.0.1/png/512/iphone.png | Bin 1651 -> 0 bytes .../external/ionicons-2.0.1/png/512/ipod.png | Bin 3207 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/jet.png | Bin 2856 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/key.png | Bin 2722 -> 0 bytes .../external/ionicons-2.0.1/png/512/knife.png | Bin 1822 -> 0 bytes .../external/ionicons-2.0.1/png/512/laptop.png | Bin 2474 -> 0 bytes .../external/ionicons-2.0.1/png/512/leaf.png | Bin 3440 -> 0 bytes .../external/ionicons-2.0.1/png/512/levels.png | Bin 2431 -> 0 bytes .../external/ionicons-2.0.1/png/512/lightbulb.png | Bin 2474 -> 0 bytes .../external/ionicons-2.0.1/png/512/link.png | Bin 2306 -> 0 bytes .../external/ionicons-2.0.1/png/512/load-a.png | Bin 3941 -> 0 bytes .../external/ionicons-2.0.1/png/512/load-b.png | Bin 5473 -> 0 bytes .../external/ionicons-2.0.1/png/512/load-c.png | Bin 4337 -> 0 bytes .../external/ionicons-2.0.1/png/512/load-d.png | Bin 6618 -> 0 bytes .../external/ionicons-2.0.1/png/512/location.png | Bin 2739 -> 0 bytes .../external/ionicons-2.0.1/png/512/locked.png | Bin 2494 -> 0 bytes .../external/ionicons-2.0.1/png/512/log-in.png | Bin 1460 -> 0 bytes .../external/ionicons-2.0.1/png/512/log-out.png | Bin 1637 -> 0 bytes .../external/ionicons-2.0.1/png/512/loop.png | Bin 3794 -> 0 bytes .../external/ionicons-2.0.1/png/512/magnet.png | Bin 4495 -> 0 bytes .../external/ionicons-2.0.1/png/512/male.png | Bin 3788 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/man.png | Bin 2126 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/map.png | Bin 4906 -> 0 bytes .../external/ionicons-2.0.1/png/512/medkit.png | Bin 1605 -> 0 bytes .../external/ionicons-2.0.1/png/512/merge.png | Bin 3879 -> 0 bytes .../external/ionicons-2.0.1/png/512/mic-a.png | Bin 4098 -> 0 bytes .../external/ionicons-2.0.1/png/512/mic-b.png | Bin 2576 -> 0 bytes .../external/ionicons-2.0.1/png/512/mic-c.png | Bin 1726 -> 0 bytes .../ionicons-2.0.1/png/512/minus-circled.png | Bin 2655 -> 0 bytes .../ionicons-2.0.1/png/512/minus-round.png | Bin 937 -> 0 bytes .../external/ionicons-2.0.1/png/512/minus.png | Bin 160 -> 0 bytes .../external/ionicons-2.0.1/png/512/model-s.png | Bin 4262 -> 0 bytes .../external/ionicons-2.0.1/png/512/monitor.png | Bin 1469 -> 0 bytes .../external/ionicons-2.0.1/png/512/more.png | Bin 3357 -> 0 bytes .../external/ionicons-2.0.1/png/512/mouse.png | Bin 2891 -> 0 bytes .../external/ionicons-2.0.1/png/512/music-note.png | Bin 2519 -> 0 bytes .../ionicons-2.0.1/png/512/navicon-round.png | Bin 1628 -> 0 bytes .../external/ionicons-2.0.1/png/512/navicon.png | Bin 175 -> 0 bytes .../external/ionicons-2.0.1/png/512/navigate.png | Bin 1693 -> 0 bytes .../external/ionicons-2.0.1/png/512/network.png | Bin 3041 -> 0 bytes .../external/ionicons-2.0.1/png/512/no-smoking.png | Bin 5816 -> 0 bytes .../external/ionicons-2.0.1/png/512/nuclear.png | Bin 3618 -> 0 bytes .../external/ionicons-2.0.1/png/512/outlet.png | Bin 2882 -> 0 bytes .../ionicons-2.0.1/png/512/paper-airplane.png | Bin 3678 -> 0 bytes .../external/ionicons-2.0.1/png/512/paperclip.png | Bin 2710 -> 0 bytes .../external/ionicons-2.0.1/png/512/pause.png | Bin 1340 -> 0 bytes .../external/ionicons-2.0.1/png/512/person-add.png | Bin 2410 -> 0 bytes .../ionicons-2.0.1/png/512/person-stalker.png | Bin 3272 -> 0 bytes .../external/ionicons-2.0.1/png/512/person.png | Bin 2258 -> 0 bytes .../external/ionicons-2.0.1/png/512/pie-graph.png | Bin 3608 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/pin.png | Bin 2270 -> 0 bytes .../external/ionicons-2.0.1/png/512/pinpoint.png | Bin 4799 -> 0 bytes .../external/ionicons-2.0.1/png/512/pizza.png | Bin 4548 -> 0 bytes .../external/ionicons-2.0.1/png/512/plane.png | Bin 3218 -> 0 bytes .../external/ionicons-2.0.1/png/512/planet.png | Bin 4319 -> 0 bytes .../external/ionicons-2.0.1/png/512/play.png | Bin 1787 -> 0 bytes .../ionicons-2.0.1/png/512/playstation.png | Bin 3275 -> 0 bytes .../ionicons-2.0.1/png/512/plus-circled.png | Bin 3114 -> 0 bytes .../external/ionicons-2.0.1/png/512/plus-round.png | Bin 1567 -> 0 bytes .../external/ionicons-2.0.1/png/512/plus.png | Bin 223 -> 0 bytes .../external/ionicons-2.0.1/png/512/podium.png | Bin 209 -> 0 bytes .../external/ionicons-2.0.1/png/512/pound.png | Bin 2383 -> 0 bytes .../external/ionicons-2.0.1/png/512/power.png | Bin 4727 -> 0 bytes .../external/ionicons-2.0.1/png/512/pricetag.png | Bin 2457 -> 0 bytes .../external/ionicons-2.0.1/png/512/pricetags.png | Bin 2906 -> 0 bytes .../external/ionicons-2.0.1/png/512/printer.png | Bin 1869 -> 0 bytes .../ionicons-2.0.1/png/512/pull-request.png | Bin 3613 -> 0 bytes .../external/ionicons-2.0.1/png/512/qr-scanner.png | Bin 1842 -> 0 bytes .../external/ionicons-2.0.1/png/512/quote.png | Bin 1743 -> 0 bytes .../ionicons-2.0.1/png/512/radio-waves.png | Bin 4978 -> 0 bytes .../external/ionicons-2.0.1/png/512/record.png | Bin 3779 -> 0 bytes .../external/ionicons-2.0.1/png/512/refresh.png | Bin 3582 -> 0 bytes .../external/ionicons-2.0.1/png/512/reply-all.png | Bin 3033 -> 0 bytes .../external/ionicons-2.0.1/png/512/reply.png | Bin 2131 -> 0 bytes .../external/ionicons-2.0.1/png/512/ribbon-a.png | Bin 6449 -> 0 bytes .../external/ionicons-2.0.1/png/512/ribbon-b.png | Bin 5913 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/sad.png | Bin 5517 -> 0 bytes .../external/ionicons-2.0.1/png/512/scissors.png | Bin 5061 -> 0 bytes .../external/ionicons-2.0.1/png/512/search.png | Bin 3229 -> 0 bytes .../external/ionicons-2.0.1/png/512/settings.png | Bin 4141 -> 0 bytes .../external/ionicons-2.0.1/png/512/share.png | Bin 2616 -> 0 bytes .../external/ionicons-2.0.1/png/512/shuffle.png | Bin 3420 -> 0 bytes .../ionicons-2.0.1/png/512/skip-backward.png | Bin 2421 -> 0 bytes .../ionicons-2.0.1/png/512/skip-forward.png | Bin 2402 -> 0 bytes .../png/512/social-android-outline.png | Bin 3772 -> 0 bytes .../ionicons-2.0.1/png/512/social-android.png | Bin 2784 -> 0 bytes .../png/512/social-apple-outline.png | Bin 4104 -> 0 bytes .../ionicons-2.0.1/png/512/social-apple.png | Bin 2647 -> 0 bytes .../png/512/social-bitcoin-outline.png | Bin 3790 -> 0 bytes .../ionicons-2.0.1/png/512/social-bitcoin.png | Bin 2424 -> 0 bytes .../png/512/social-buffer-outline.png | Bin 3913 -> 0 bytes .../ionicons-2.0.1/png/512/social-buffer.png | Bin 4687 -> 0 bytes .../png/512/social-designernews-outline.png | Bin 4754 -> 0 bytes .../ionicons-2.0.1/png/512/social-designernews.png | Bin 4242 -> 0 bytes .../png/512/social-dribbble-outline.png | Bin 5588 -> 0 bytes .../ionicons-2.0.1/png/512/social-dribbble.png | Bin 6983 -> 0 bytes .../png/512/social-dropbox-outline.png | Bin 5113 -> 0 bytes .../ionicons-2.0.1/png/512/social-dropbox.png | Bin 6161 -> 0 bytes .../png/512/social-facebook-outline.png | Bin 1788 -> 0 bytes .../ionicons-2.0.1/png/512/social-facebook.png | Bin 1402 -> 0 bytes .../png/512/social-foursquare-outline.png | Bin 3364 -> 0 bytes .../ionicons-2.0.1/png/512/social-foursquare.png | Bin 3021 -> 0 bytes .../png/512/social-freebsd-devil.png | Bin 5300 -> 0 bytes .../png/512/social-github-outline.png | Bin 7475 -> 0 bytes .../ionicons-2.0.1/png/512/social-github.png | Bin 4561 -> 0 bytes .../png/512/social-google-outline.png | Bin 3890 -> 0 bytes .../ionicons-2.0.1/png/512/social-google.png | Bin 3682 -> 0 bytes .../png/512/social-googleplus-outline.png | Bin 4071 -> 0 bytes .../ionicons-2.0.1/png/512/social-googleplus.png | Bin 3888 -> 0 bytes .../png/512/social-hackernews-outline.png | Bin 1994 -> 0 bytes .../ionicons-2.0.1/png/512/social-hackernews.png | Bin 1905 -> 0 bytes .../png/512/social-instagram-outline.png | Bin 3317 -> 0 bytes .../ionicons-2.0.1/png/512/social-instagram.png | Bin 4403 -> 0 bytes .../png/512/social-linkedin-outline.png | Bin 2370 -> 0 bytes .../ionicons-2.0.1/png/512/social-linkedin.png | Bin 2275 -> 0 bytes .../png/512/social-pinterest-outline.png | Bin 6933 -> 0 bytes .../ionicons-2.0.1/png/512/social-pinterest.png | Bin 5532 -> 0 bytes .../png/512/social-reddit-outline.png | Bin 6414 -> 0 bytes .../ionicons-2.0.1/png/512/social-reddit.png | Bin 4498 -> 0 bytes .../ionicons-2.0.1/png/512/social-rss-outline.png | Bin 5945 -> 0 bytes .../external/ionicons-2.0.1/png/512/social-rss.png | Bin 4789 -> 0 bytes .../png/512/social-skype-outline.png | Bin 5608 -> 0 bytes .../ionicons-2.0.1/png/512/social-skype.png | Bin 4269 -> 0 bytes .../png/512/social-tumblr-outline.png | Bin 2725 -> 0 bytes .../ionicons-2.0.1/png/512/social-tumblr.png | Bin 1946 -> 0 bytes .../external/ionicons-2.0.1/png/512/social-tux.png | Bin 7103 -> 0 bytes .../png/512/social-twitter-outline.png | Bin 5569 -> 0 bytes .../ionicons-2.0.1/png/512/social-twitter.png | Bin 3405 -> 0 bytes .../ionicons-2.0.1/png/512/social-usd-outline.png | Bin 5744 -> 0 bytes .../external/ionicons-2.0.1/png/512/social-usd.png | Bin 3446 -> 0 bytes .../png/512/social-vimeo-outline.png | Bin 5525 -> 0 bytes .../ionicons-2.0.1/png/512/social-vimeo.png | Bin 3456 -> 0 bytes .../png/512/social-windows-outline.png | Bin 1775 -> 0 bytes .../ionicons-2.0.1/png/512/social-windows.png | Bin 2550 -> 0 bytes .../png/512/social-wordpress-outline.png | Bin 6418 -> 0 bytes .../ionicons-2.0.1/png/512/social-wordpress.png | Bin 5465 -> 0 bytes .../png/512/social-yahoo-outline.png | Bin 2119 -> 0 bytes .../ionicons-2.0.1/png/512/social-yahoo.png | Bin 1729 -> 0 bytes .../png/512/social-youtube-outline.png | Bin 4655 -> 0 bytes .../ionicons-2.0.1/png/512/social-youtube.png | Bin 2511 -> 0 bytes .../ionicons-2.0.1/png/512/speakerphone.png | Bin 4310 -> 0 bytes .../ionicons-2.0.1/png/512/speedometer.png | Bin 4238 -> 0 bytes .../external/ionicons-2.0.1/png/512/spoon.png | Bin 2306 -> 0 bytes .../external/ionicons-2.0.1/png/512/star.png | Bin 2195 -> 0 bytes .../external/ionicons-2.0.1/png/512/stats-bars.png | Bin 218 -> 0 bytes .../external/ionicons-2.0.1/png/512/steam.png | Bin 3875 -> 0 bytes .../external/ionicons-2.0.1/png/512/stop.png | Bin 1090 -> 0 bytes .../ionicons-2.0.1/png/512/thermometer.png | Bin 1980 -> 0 bytes .../external/ionicons-2.0.1/png/512/thumbsdown.png | Bin 2288 -> 0 bytes .../external/ionicons-2.0.1/png/512/thumbsup.png | Bin 2356 -> 0 bytes .../ionicons-2.0.1/png/512/toggle-filled.png | Bin 3194 -> 0 bytes .../external/ionicons-2.0.1/png/512/toggle.png | Bin 3599 -> 0 bytes .../external/ionicons-2.0.1/png/512/trash-a.png | Bin 2752 -> 0 bytes .../external/ionicons-2.0.1/png/512/trash-b.png | Bin 1882 -> 0 bytes .../external/ionicons-2.0.1/png/512/trophy.png | Bin 3579 -> 0 bytes .../external/ionicons-2.0.1/png/512/umbrella.png | Bin 3416 -> 0 bytes .../external/ionicons-2.0.1/png/512/university.png | Bin 3167 -> 0 bytes .../external/ionicons-2.0.1/png/512/unlocked.png | Bin 2412 -> 0 bytes .../external/ionicons-2.0.1/png/512/upload.png | Bin 2480 -> 0 bytes .../fusion/external/ionicons-2.0.1/png/512/usb.png | Bin 3950 -> 0 bytes .../ionicons-2.0.1/png/512/videocamera.png | Bin 2381 -> 0 bytes .../ionicons-2.0.1/png/512/volume-high.png | Bin 4334 -> 0 bytes .../external/ionicons-2.0.1/png/512/volume-low.png | Bin 2136 -> 0 bytes .../ionicons-2.0.1/png/512/volume-medium.png | Bin 3174 -> 0 bytes .../ionicons-2.0.1/png/512/volume-mute.png | Bin 4803 -> 0 bytes .../external/ionicons-2.0.1/png/512/wand.png | Bin 1933 -> 0 bytes .../external/ionicons-2.0.1/png/512/waterdrop.png | Bin 3169 -> 0 bytes .../external/ionicons-2.0.1/png/512/wifi.png | Bin 3037 -> 0 bytes .../external/ionicons-2.0.1/png/512/wineglass.png | Bin 3734 -> 0 bytes .../external/ionicons-2.0.1/png/512/woman.png | Bin 3592 -> 0 bytes .../external/ionicons-2.0.1/png/512/wrench.png | Bin 2866 -> 0 bytes .../external/ionicons-2.0.1/png/512/xbox.png | Bin 4958 -> 0 bytes .../app/fusion/external/ionicons-2.0.1/readme.md | 60 - .../ionicons-2.0.1/scss/_ionicons-font.scss | 27 - .../ionicons-2.0.1/scss/_ionicons-icons.scss | 1473 - .../ionicons-2.0.1/scss/_ionicons-variables.scss | 741 - .../external/ionicons-2.0.1/scss/ionicons.scss | 15 - .../external/ionicons-2.0.1/src/alert-circled.svg | 11 - .../fusion/external/ionicons-2.0.1/src/alert.svg | 9 - .../ionicons-2.0.1/src/android-add-circle.svg | 12 - .../external/ionicons-2.0.1/src/android-add.svg | 11 - .../ionicons-2.0.1/src/android-alarm-clock.svg | 15 - .../external/ionicons-2.0.1/src/android-alert.svg | 12 - .../external/ionicons-2.0.1/src/android-apps.svg | 12 - .../ionicons-2.0.1/src/android-archive.svg | 12 - .../ionicons-2.0.1/src/android-arrow-back.svg | 11 - .../ionicons-2.0.1/src/android-arrow-down.svg | 11 - .../src/android-arrow-dropdown-circle.svg | 10 - .../ionicons-2.0.1/src/android-arrow-dropdown.svg | 9 - .../src/android-arrow-dropleft-circle.svg | 10 - .../ionicons-2.0.1/src/android-arrow-dropleft.svg | 9 - .../src/android-arrow-dropright-circle.svg | 10 - .../ionicons-2.0.1/src/android-arrow-dropright.svg | 9 - .../src/android-arrow-dropup-circle.svg | 10 - .../ionicons-2.0.1/src/android-arrow-dropup.svg | 9 - .../ionicons-2.0.1/src/android-arrow-forward.svg | 11 - .../ionicons-2.0.1/src/android-arrow-up.svg | 11 - .../external/ionicons-2.0.1/src/android-attach.svg | 15 - .../external/ionicons-2.0.1/src/android-bar.svg | 12 - .../ionicons-2.0.1/src/android-bicycle.svg | 19 - .../external/ionicons-2.0.1/src/android-boat.svg | 16 - .../ionicons-2.0.1/src/android-bookmark.svg | 7 - .../external/ionicons-2.0.1/src/android-bulb.svg | 18 - .../external/ionicons-2.0.1/src/android-bus.svg | 18 - .../ionicons-2.0.1/src/android-calendar.svg | 11 - .../external/ionicons-2.0.1/src/android-call.svg | 10 - .../external/ionicons-2.0.1/src/android-camera.svg | 12 - .../external/ionicons-2.0.1/src/android-cancel.svg | 11 - .../external/ionicons-2.0.1/src/android-car.svg | 15 - .../external/ionicons-2.0.1/src/android-cart.svg | 14 - .../external/ionicons-2.0.1/src/android-chat.svg | 12 - .../ionicons-2.0.1/src/android-checkbox-blank.svg | 12 - .../src/android-checkbox-outline-blank.svg | 13 - .../src/android-checkbox-outline.svg | 13 - .../ionicons-2.0.1/src/android-checkbox.svg | 13 - .../src/android-checkmark-circle.svg | 9 - .../ionicons-2.0.1/src/android-clipboard.svg | 10 - .../external/ionicons-2.0.1/src/android-close.svg | 12 - .../ionicons-2.0.1/src/android-cloud-circle.svg | 16 - .../ionicons-2.0.1/src/android-cloud-done.svg | 12 - .../ionicons-2.0.1/src/android-cloud-outline.svg | 16 - .../external/ionicons-2.0.1/src/android-cloud.svg | 9 - .../ionicons-2.0.1/src/android-color-palette.svg | 17 - .../ionicons-2.0.1/src/android-compass.svg | 9 - .../ionicons-2.0.1/src/android-contact.svg | 15 - .../ionicons-2.0.1/src/android-contacts.svg | 26 - .../ionicons-2.0.1/src/android-contract.svg | 12 - .../external/ionicons-2.0.1/src/android-create.svg | 13 - .../external/ionicons-2.0.1/src/android-delete.svg | 10 - .../ionicons-2.0.1/src/android-desktop.svg | 13 - .../ionicons-2.0.1/src/android-document.svg | 10 - .../ionicons-2.0.1/src/android-done-all.svg | 13 - .../external/ionicons-2.0.1/src/android-done.svg | 13 - .../ionicons-2.0.1/src/android-download.svg | 9 - .../external/ionicons-2.0.1/src/android-drafts.svg | 15 - .../external/ionicons-2.0.1/src/android-exit.svg | 9 - .../external/ionicons-2.0.1/src/android-expand.svg | 12 - .../src/android-favorite-outline.svg | 13 - .../ionicons-2.0.1/src/android-favorite.svg | 11 - .../external/ionicons-2.0.1/src/android-film.svg | 9 - .../ionicons-2.0.1/src/android-folder-open.svg | 10 - .../external/ionicons-2.0.1/src/android-folder.svg | 14 - .../external/ionicons-2.0.1/src/android-funnel.svg | 7 - .../external/ionicons-2.0.1/src/android-globe.svg | 24 - .../external/ionicons-2.0.1/src/android-hand.svg | 15 - .../ionicons-2.0.1/src/android-hangout.svg | 9 - .../external/ionicons-2.0.1/src/android-happy.svg | 12 - .../external/ionicons-2.0.1/src/android-home.svg | 9 - .../external/ionicons-2.0.1/src/android-image.svg | 13 - .../external/ionicons-2.0.1/src/android-laptop.svg | 14 - .../external/ionicons-2.0.1/src/android-list.svg | 10 - .../external/ionicons-2.0.1/src/android-locate.svg | 16 - .../external/ionicons-2.0.1/src/android-lock.svg | 14 - .../external/ionicons-2.0.1/src/android-mail.svg | 13 - .../external/ionicons-2.0.1/src/android-map.svg | 16 - .../external/ionicons-2.0.1/src/android-menu.svg | 11 - .../ionicons-2.0.1/src/android-microphone-off.svg | 17 - .../ionicons-2.0.1/src/android-microphone.svg | 12 - .../ionicons-2.0.1/src/android-more-horizontal.svg | 9 - .../ionicons-2.0.1/src/android-more-vertical.svg | 9 - .../ionicons-2.0.1/src/android-navigate.svg | 11 - .../src/android-notifications-none.svg | 11 - .../src/android-notifications-off.svg | 13 - .../ionicons-2.0.1/src/android-notifications.svg | 9 - .../external/ionicons-2.0.1/src/android-open.svg | 9 - .../ionicons-2.0.1/src/android-options.svg | 26 - .../external/ionicons-2.0.1/src/android-people.svg | 11 - .../ionicons-2.0.1/src/android-person-add.svg | 17 - .../external/ionicons-2.0.1/src/android-person.svg | 10 - .../ionicons-2.0.1/src/android-phone-landscape.svg | 12 - .../ionicons-2.0.1/src/android-phone-portrait.svg | 12 - .../external/ionicons-2.0.1/src/android-pin.svg | 11 - .../external/ionicons-2.0.1/src/android-plane.svg | 12 - .../ionicons-2.0.1/src/android-playstore.svg | 11 - .../external/ionicons-2.0.1/src/android-print.svg | 10 - .../src/android-radio-button-off.svg | 12 - .../ionicons-2.0.1/src/android-radio-button-on.svg | 13 - .../ionicons-2.0.1/src/android-refresh.svg | 11 - .../ionicons-2.0.1/src/android-remove-circle.svg | 10 - .../external/ionicons-2.0.1/src/android-remove.svg | 7 - .../ionicons-2.0.1/src/android-restaurant.svg | 17 - .../external/ionicons-2.0.1/src/android-sad.svg | 16 - .../external/ionicons-2.0.1/src/android-search.svg | 19 - .../external/ionicons-2.0.1/src/android-send.svg | 7 - .../ionicons-2.0.1/src/android-settings.svg | 19 - .../ionicons-2.0.1/src/android-share-alt.svg | 16 - .../external/ionicons-2.0.1/src/android-share.svg | 12 - .../ionicons-2.0.1/src/android-star-half.svg | 9 - .../ionicons-2.0.1/src/android-star-outline.svg | 10 - .../external/ionicons-2.0.1/src/android-star.svg | 10 - .../ionicons-2.0.1/src/android-stopwatch.svg | 21 - .../external/ionicons-2.0.1/src/android-subway.svg | 13 - .../external/ionicons-2.0.1/src/android-sunny.svg | 18 - .../external/ionicons-2.0.1/src/android-sync.svg | 10 - .../ionicons-2.0.1/src/android-textsms.svg | 10 - .../external/ionicons-2.0.1/src/android-time.svg | 15 - .../external/ionicons-2.0.1/src/android-train.svg | 15 - .../external/ionicons-2.0.1/src/android-unlock.svg | 10 - .../external/ionicons-2.0.1/src/android-upload.svg | 9 - .../ionicons-2.0.1/src/android-volume-down.svg | 8 - .../ionicons-2.0.1/src/android-volume-mute.svg | 7 - .../ionicons-2.0.1/src/android-volume-off.svg | 15 - .../ionicons-2.0.1/src/android-volume-up.svg | 9 - .../external/ionicons-2.0.1/src/android-walk.svg | 12 - .../ionicons-2.0.1/src/android-warning.svg | 11 - .../external/ionicons-2.0.1/src/android-watch.svg | 15 - .../external/ionicons-2.0.1/src/android-wifi.svg | 14 - .../external/ionicons-2.0.1/src/aperture.svg | 20 - .../fusion/external/ionicons-2.0.1/src/archive.svg | 12 - .../external/ionicons-2.0.1/src/arrow-down-a.svg | 7 - .../external/ionicons-2.0.1/src/arrow-down-b.svg | 8 - .../external/ionicons-2.0.1/src/arrow-down-c.svg | 9 - .../external/ionicons-2.0.1/src/arrow-expand.svg | 12 - .../ionicons-2.0.1/src/arrow-graph-down-left.svg | 7 - .../ionicons-2.0.1/src/arrow-graph-down-right.svg | 7 - .../ionicons-2.0.1/src/arrow-graph-up-left.svg | 7 - .../ionicons-2.0.1/src/arrow-graph-up-right.svg | 7 - .../external/ionicons-2.0.1/src/arrow-left-a.svg | 7 - .../external/ionicons-2.0.1/src/arrow-left-b.svg | 8 - .../external/ionicons-2.0.1/src/arrow-left-c.svg | 9 - .../external/ionicons-2.0.1/src/arrow-move.svg | 8 - .../external/ionicons-2.0.1/src/arrow-resize.svg | 8 - .../ionicons-2.0.1/src/arrow-return-left.svg | 8 - .../ionicons-2.0.1/src/arrow-return-right.svg | 8 - .../external/ionicons-2.0.1/src/arrow-right-a.svg | 7 - .../external/ionicons-2.0.1/src/arrow-right-b.svg | 8 - .../external/ionicons-2.0.1/src/arrow-right-c.svg | 9 - .../external/ionicons-2.0.1/src/arrow-shrink.svg | 12 - .../external/ionicons-2.0.1/src/arrow-swap.svg | 10 - .../external/ionicons-2.0.1/src/arrow-up-a.svg | 7 - .../external/ionicons-2.0.1/src/arrow-up-b.svg | 8 - .../external/ionicons-2.0.1/src/arrow-up-c.svg | 9 - .../external/ionicons-2.0.1/src/asterisk.svg | 8 - .../app/fusion/external/ionicons-2.0.1/src/at.svg | 25 - .../ionicons-2.0.1/src/backspace-outline.svg | 21 - .../external/ionicons-2.0.1/src/backspace.svg | 17 - .../app/fusion/external/ionicons-2.0.1/src/bag.svg | 10 - .../ionicons-2.0.1/src/battery-charging.svg | 9 - .../external/ionicons-2.0.1/src/battery-empty.svg | 8 - .../external/ionicons-2.0.1/src/battery-full.svg | 8 - .../external/ionicons-2.0.1/src/battery-half.svg | 9 - .../external/ionicons-2.0.1/src/battery-low.svg | 9 - .../fusion/external/ionicons-2.0.1/src/beaker.svg | 20 - .../fusion/external/ionicons-2.0.1/src/beer.svg | 28 - .../external/ionicons-2.0.1/src/bluetooth.svg | 18 - .../fusion/external/ionicons-2.0.1/src/bonfire.svg | 32 - .../external/ionicons-2.0.1/src/bookmark.svg | 10 - .../fusion/external/ionicons-2.0.1/src/bowtie.svg | 22 - .../external/ionicons-2.0.1/src/briefcase.svg | 12 - .../app/fusion/external/ionicons-2.0.1/src/bug.svg | 30 - .../external/ionicons-2.0.1/src/calculator.svg | 10 - .../external/ionicons-2.0.1/src/calendar.svg | 12 - .../fusion/external/ionicons-2.0.1/src/camera.svg | 15 - .../fusion/external/ionicons-2.0.1/src/card.svg | 14 - .../fusion/external/ionicons-2.0.1/src/cash.svg | 31 - .../ionicons-2.0.1/src/chatbox-working.svg | 11 - .../fusion/external/ionicons-2.0.1/src/chatbox.svg | 8 - .../external/ionicons-2.0.1/src/chatboxes.svg | 12 - .../ionicons-2.0.1/src/chatbubble-working.svg | 12 - .../external/ionicons-2.0.1/src/chatbubble.svg | 9 - .../external/ionicons-2.0.1/src/chatbubbles.svg | 16 - .../ionicons-2.0.1/src/checkmark-circled.svg | 13 - .../ionicons-2.0.1/src/checkmark-round.svg | 9 - .../external/ionicons-2.0.1/src/checkmark.svg | 10 - .../external/ionicons-2.0.1/src/chevron-down.svg | 9 - .../external/ionicons-2.0.1/src/chevron-left.svg | 9 - .../external/ionicons-2.0.1/src/chevron-right.svg | 9 - .../external/ionicons-2.0.1/src/chevron-up.svg | 9 - .../external/ionicons-2.0.1/src/clipboard.svg | 22 - .../fusion/external/ionicons-2.0.1/src/clock.svg | 21 - .../external/ionicons-2.0.1/src/close-circled.svg | 13 - .../external/ionicons-2.0.1/src/close-round.svg | 9 - .../fusion/external/ionicons-2.0.1/src/close.svg | 10 - .../ionicons-2.0.1/src/closed-captioning.svg | 31 - .../fusion/external/ionicons-2.0.1/src/cloud.svg | 9 - .../external/ionicons-2.0.1/src/code-download.svg | 31 - .../external/ionicons-2.0.1/src/code-working.svg | 21 - .../fusion/external/ionicons-2.0.1/src/code.svg | 14 - .../fusion/external/ionicons-2.0.1/src/coffee.svg | 13 - .../fusion/external/ionicons-2.0.1/src/compass.svg | 16 - .../fusion/external/ionicons-2.0.1/src/compose.svg | 14 - .../ionicons-2.0.1/src/connection-bars.svg | 12 - .../external/ionicons-2.0.1/src/contrast.svg | 9 - .../fusion/external/ionicons-2.0.1/src/crop.svg | 11 - .../fusion/external/ionicons-2.0.1/src/cube.svg | 19 - .../fusion/external/ionicons-2.0.1/src/disc.svg | 13 - .../external/ionicons-2.0.1/src/document-text.svg | 15 - .../external/ionicons-2.0.1/src/document.svg | 10 - .../fusion/external/ionicons-2.0.1/src/drag.svg | 11 - .../fusion/external/ionicons-2.0.1/src/earth.svg | 44 - .../fusion/external/ionicons-2.0.1/src/easel.svg | 15 - .../fusion/external/ionicons-2.0.1/src/edit.svg | 13 - .../app/fusion/external/ionicons-2.0.1/src/egg.svg | 7 - .../fusion/external/ionicons-2.0.1/src/eject.svg | 12 - .../external/ionicons-2.0.1/src/email-unread.svg | 19 - .../fusion/external/ionicons-2.0.1/src/email.svg | 15 - .../src/erlenmeyer-flask-bubbles.svg | 15 - .../ionicons-2.0.1/src/erlenmeyer-flask.svg | 21 - .../external/ionicons-2.0.1/src/eye-disabled.svg | 18 - .../app/fusion/external/ionicons-2.0.1/src/eye.svg | 15 - .../fusion/external/ionicons-2.0.1/src/female.svg | 8 - .../fusion/external/ionicons-2.0.1/src/filing.svg | 12 - .../external/ionicons-2.0.1/src/film-marker.svg | 10 - .../external/ionicons-2.0.1/src/fireball.svg | 16 - .../fusion/external/ionicons-2.0.1/src/flag.svg | 12 - .../fusion/external/ionicons-2.0.1/src/flame.svg | 11 - .../external/ionicons-2.0.1/src/flash-off.svg | 16 - .../fusion/external/ionicons-2.0.1/src/flash.svg | 7 - .../fusion/external/ionicons-2.0.1/src/folder.svg | 14 - .../external/ionicons-2.0.1/src/fork-repo.svg | 20 - .../fusion/external/ionicons-2.0.1/src/fork.svg | 14 - .../fusion/external/ionicons-2.0.1/src/forward.svg | 9 - .../fusion/external/ionicons-2.0.1/src/funnel.svg | 13 - .../fusion/external/ionicons-2.0.1/src/gear-a.svg | 15 - .../fusion/external/ionicons-2.0.1/src/gear-b.svg | 11 - .../fusion/external/ionicons-2.0.1/src/grid.svg | 32 - .../fusion/external/ionicons-2.0.1/src/hammer.svg | 11 - .../external/ionicons-2.0.1/src/happy-outline.svg | 23 - .../fusion/external/ionicons-2.0.1/src/happy.svg | 20 - .../external/ionicons-2.0.1/src/headphone.svg | 15 - .../external/ionicons-2.0.1/src/heart-broken.svg | 17 - .../fusion/external/ionicons-2.0.1/src/heart.svg | 10 - .../external/ionicons-2.0.1/src/help-buoy.svg | 13 - .../external/ionicons-2.0.1/src/help-circled.svg | 15 - .../fusion/external/ionicons-2.0.1/src/help.svg | 14 - .../fusion/external/ionicons-2.0.1/src/home.svg | 9 - .../external/ionicons-2.0.1/src/icecream.svg | 15 - .../fusion/external/ionicons-2.0.1/src/image.svg | 13 - .../fusion/external/ionicons-2.0.1/src/images.svg | 20 - .../ionicons-2.0.1/src/information-circled.svg | 11 - .../external/ionicons-2.0.1/src/information.svg | 10 - .../fusion/external/ionicons-2.0.1/src/ionic.svg | 18 - .../ionicons-2.0.1/src/ios-alarm-outline.svg | 21 - .../external/ionicons-2.0.1/src/ios-alarm.svg | 14 - .../ionicons-2.0.1/src/ios-albums-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-albums.svg | 11 - .../src/ios-americanfootball-outline.svg | 24 - .../ionicons-2.0.1/src/ios-americanfootball.svg | 21 - .../ionicons-2.0.1/src/ios-analytics-outline.svg | 24 - .../external/ionicons-2.0.1/src/ios-analytics.svg | 17 - .../external/ionicons-2.0.1/src/ios-arrow-back.svg | 7 - .../external/ionicons-2.0.1/src/ios-arrow-down.svg | 7 - .../ionicons-2.0.1/src/ios-arrow-forward.svg | 7 - .../external/ionicons-2.0.1/src/ios-arrow-left.svg | 7 - .../ionicons-2.0.1/src/ios-arrow-right.svg | 7 - .../ionicons-2.0.1/src/ios-arrow-thin-down.svg | 9 - .../ionicons-2.0.1/src/ios-arrow-thin-left.svg | 9 - .../ionicons-2.0.1/src/ios-arrow-thin-right.svg | 9 - .../ionicons-2.0.1/src/ios-arrow-thin-up.svg | 9 - .../external/ionicons-2.0.1/src/ios-arrow-up.svg | 7 - .../external/ionicons-2.0.1/src/ios-at-outline.svg | 26 - .../fusion/external/ionicons-2.0.1/src/ios-at.svg | 24 - .../ionicons-2.0.1/src/ios-barcode-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-barcode.svg | 10 - .../ionicons-2.0.1/src/ios-baseball-outline.svg | 35 - .../external/ionicons-2.0.1/src/ios-baseball.svg | 27 - .../ionicons-2.0.1/src/ios-basketball-outline.svg | 25 - .../external/ionicons-2.0.1/src/ios-basketball.svg | 21 - .../ionicons-2.0.1/src/ios-bell-outline.svg | 13 - .../external/ionicons-2.0.1/src/ios-bell.svg | 11 - .../ionicons-2.0.1/src/ios-body-outline.svg | 27 - .../external/ionicons-2.0.1/src/ios-body.svg | 17 - .../ionicons-2.0.1/src/ios-bolt-outline.svg | 8 - .../external/ionicons-2.0.1/src/ios-bolt.svg | 7 - .../ionicons-2.0.1/src/ios-book-outline.svg | 13 - .../external/ionicons-2.0.1/src/ios-book.svg | 12 - .../ionicons-2.0.1/src/ios-bookmarks-outline.svg | 13 - .../external/ionicons-2.0.1/src/ios-bookmarks.svg | 13 - .../ionicons-2.0.1/src/ios-box-outline.svg | 13 - .../fusion/external/ionicons-2.0.1/src/ios-box.svg | 10 - .../ionicons-2.0.1/src/ios-briefcase-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-briefcase.svg | 13 - .../ionicons-2.0.1/src/ios-browsers-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-browsers.svg | 10 - .../ionicons-2.0.1/src/ios-calculator-outline.svg | 19 - .../external/ionicons-2.0.1/src/ios-calculator.svg | 9 - .../ionicons-2.0.1/src/ios-calendar-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-calendar.svg | 12 - .../ionicons-2.0.1/src/ios-camera-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-camera.svg | 13 - .../ionicons-2.0.1/src/ios-cart-outline.svg | 16 - .../external/ionicons-2.0.1/src/ios-cart.svg | 14 - .../ionicons-2.0.1/src/ios-chatboxes-outline.svg | 10 - .../external/ionicons-2.0.1/src/ios-chatboxes.svg | 10 - .../ionicons-2.0.1/src/ios-chatbubble-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-chatbubble.svg | 11 - .../ionicons-2.0.1/src/ios-checkmark-empty.svg | 10 - .../ionicons-2.0.1/src/ios-checkmark-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-checkmark.svg | 10 - .../ionicons-2.0.1/src/ios-circle-filled.svg | 18 - .../ionicons-2.0.1/src/ios-circle-outline.svg | 13 - .../ionicons-2.0.1/src/ios-clock-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-clock.svg | 10 - .../ionicons-2.0.1/src/ios-close-empty.svg | 13 - .../ionicons-2.0.1/src/ios-close-outline.svg | 20 - .../external/ionicons-2.0.1/src/ios-close.svg | 16 - .../src/ios-cloud-download-outline.svg | 19 - .../ionicons-2.0.1/src/ios-cloud-download.svg | 12 - .../ionicons-2.0.1/src/ios-cloud-outline.svg | 12 - .../src/ios-cloud-upload-outline.svg | 20 - .../ionicons-2.0.1/src/ios-cloud-upload.svg | 13 - .../external/ionicons-2.0.1/src/ios-cloud.svg | 9 - .../src/ios-cloudy-night-outline.svg | 24 - .../ionicons-2.0.1/src/ios-cloudy-night.svg | 21 - .../ionicons-2.0.1/src/ios-cloudy-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-cloudy.svg | 14 - .../ionicons-2.0.1/src/ios-cog-outline.svg | 29 - .../fusion/external/ionicons-2.0.1/src/ios-cog.svg | 23 - .../src/ios-color-filter-outline.svg | 25 - .../ionicons-2.0.1/src/ios-color-filter.svg | 29 - .../ionicons-2.0.1/src/ios-color-wand-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-color-wand.svg | 16 - .../ionicons-2.0.1/src/ios-compose-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-compose.svg | 13 - .../ionicons-2.0.1/src/ios-contact-outline.svg | 13 - .../external/ionicons-2.0.1/src/ios-contact.svg | 13 - .../ionicons-2.0.1/src/ios-copy-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-copy.svg | 12 - .../ionicons-2.0.1/src/ios-crop-strong.svg | 12 - .../external/ionicons-2.0.1/src/ios-crop.svg | 12 - .../ionicons-2.0.1/src/ios-download-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-download.svg | 11 - .../external/ionicons-2.0.1/src/ios-drag.svg | 11 - .../ionicons-2.0.1/src/ios-email-outline.svg | 8 - .../external/ionicons-2.0.1/src/ios-email.svg | 11 - .../ionicons-2.0.1/src/ios-eye-outline.svg | 18 - .../fusion/external/ionicons-2.0.1/src/ios-eye.svg | 13 - .../ionicons-2.0.1/src/ios-fastforward-outline.svg | 8 - .../ionicons-2.0.1/src/ios-fastforward.svg | 7 - .../ionicons-2.0.1/src/ios-filing-outline.svg | 9 - .../external/ionicons-2.0.1/src/ios-filing.svg | 11 - .../ionicons-2.0.1/src/ios-film-outline.svg | 9 - .../external/ionicons-2.0.1/src/ios-film.svg | 11 - .../ionicons-2.0.1/src/ios-flag-outline.svg | 13 - .../external/ionicons-2.0.1/src/ios-flag.svg | 11 - .../ionicons-2.0.1/src/ios-flame-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-flame.svg | 11 - .../ionicons-2.0.1/src/ios-flask-outline.svg | 19 - .../external/ionicons-2.0.1/src/ios-flask.svg | 17 - .../ionicons-2.0.1/src/ios-flower-outline.svg | 75 - .../external/ionicons-2.0.1/src/ios-flower.svg | 38 - .../ionicons-2.0.1/src/ios-folder-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-folder.svg | 13 - .../ionicons-2.0.1/src/ios-football-outline.svg | 20 - .../external/ionicons-2.0.1/src/ios-football.svg | 14 - .../src/ios-game-controller-a-outline.svg | 26 - .../ionicons-2.0.1/src/ios-game-controller-a.svg | 19 - .../src/ios-game-controller-b-outline.svg | 35 - .../ionicons-2.0.1/src/ios-game-controller-b.svg | 23 - .../ionicons-2.0.1/src/ios-gear-outline.svg | 40 - .../external/ionicons-2.0.1/src/ios-gear.svg | 17 - .../ionicons-2.0.1/src/ios-glasses-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-glasses.svg | 11 - .../ionicons-2.0.1/src/ios-grid-view-outline.svg | 8 - .../external/ionicons-2.0.1/src/ios-grid-view.svg | 11 - .../ionicons-2.0.1/src/ios-heart-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-heart.svg | 9 - .../external/ionicons-2.0.1/src/ios-help-empty.svg | 12 - .../ionicons-2.0.1/src/ios-help-outline.svg | 22 - .../external/ionicons-2.0.1/src/ios-help.svg | 12 - .../ionicons-2.0.1/src/ios-home-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-home.svg | 10 - .../ionicons-2.0.1/src/ios-infinite-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-infinite.svg | 16 - .../ionicons-2.0.1/src/ios-information-empty.svg | 12 - .../ionicons-2.0.1/src/ios-information-outline.svg | 17 - .../ionicons-2.0.1/src/ios-information.svg | 11 - .../ionicons-2.0.1/src/ios-ionic-outline.svg | 18 - .../ionicons-2.0.1/src/ios-keypad-outline.svg | 28 - .../external/ionicons-2.0.1/src/ios-keypad.svg | 20 - .../ionicons-2.0.1/src/ios-lightbulb-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-lightbulb.svg | 16 - .../ionicons-2.0.1/src/ios-list-outline.svg | 23 - .../external/ionicons-2.0.1/src/ios-list.svg | 11 - .../ionicons-2.0.1/src/ios-location-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-location.svg | 8 - .../ionicons-2.0.1/src/ios-locked-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-locked.svg | 12 - .../ionicons-2.0.1/src/ios-loop-strong.svg | 18 - .../external/ionicons-2.0.1/src/ios-loop.svg | 22 - .../ionicons-2.0.1/src/ios-medical-outline.svg | 10 - .../external/ionicons-2.0.1/src/ios-medical.svg | 8 - .../ionicons-2.0.1/src/ios-medkit-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-medkit.svg | 13 - .../external/ionicons-2.0.1/src/ios-mic-off.svg | 14 - .../ionicons-2.0.1/src/ios-mic-outline.svg | 12 - .../fusion/external/ionicons-2.0.1/src/ios-mic.svg | 12 - .../ionicons-2.0.1/src/ios-minus-empty.svg | 9 - .../ionicons-2.0.1/src/ios-minus-outline.svg | 16 - .../external/ionicons-2.0.1/src/ios-minus.svg | 10 - .../ionicons-2.0.1/src/ios-monitor-outline.svg | 7 - .../external/ionicons-2.0.1/src/ios-monitor.svg | 10 - .../ionicons-2.0.1/src/ios-moon-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-moon.svg | 13 - .../ionicons-2.0.1/src/ios-more-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-more.svg | 11 - .../ionicons-2.0.1/src/ios-musical-note.svg | 9 - .../ionicons-2.0.1/src/ios-musical-notes.svg | 9 - .../ionicons-2.0.1/src/ios-navigate-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-navigate.svg | 10 - .../ionicons-2.0.1/src/ios-nutrition-outline.svg | 29 - .../external/ionicons-2.0.1/src/ios-nutrition.svg | 17 - .../ionicons-2.0.1/src/ios-paper-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-paper.svg | 8 - .../ionicons-2.0.1/src/ios-paperplane-outline.svg | 8 - .../external/ionicons-2.0.1/src/ios-paperplane.svg | 10 - .../ionicons-2.0.1/src/ios-partlysunny-outline.svg | 33 - .../ionicons-2.0.1/src/ios-partlysunny.svg | 28 - .../ionicons-2.0.1/src/ios-pause-outline.svg | 10 - .../external/ionicons-2.0.1/src/ios-pause.svg | 10 - .../ionicons-2.0.1/src/ios-paw-outline.svg | 43 - .../fusion/external/ionicons-2.0.1/src/ios-paw.svg | 26 - .../ionicons-2.0.1/src/ios-people-outline.svg | 44 - .../external/ionicons-2.0.1/src/ios-people.svg | 29 - .../ionicons-2.0.1/src/ios-person-outline.svg | 22 - .../external/ionicons-2.0.1/src/ios-person.svg | 13 - .../ionicons-2.0.1/src/ios-personadd-outline.svg | 25 - .../external/ionicons-2.0.1/src/ios-personadd.svg | 16 - .../ionicons-2.0.1/src/ios-photos-outline.svg | 10 - .../external/ionicons-2.0.1/src/ios-photos.svg | 10 - .../ionicons-2.0.1/src/ios-pie-outline.svg | 16 - .../fusion/external/ionicons-2.0.1/src/ios-pie.svg | 11 - .../ionicons-2.0.1/src/ios-pint-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-pint.svg | 12 - .../ionicons-2.0.1/src/ios-play-outline.svg | 9 - .../external/ionicons-2.0.1/src/ios-play.svg | 9 - .../external/ionicons-2.0.1/src/ios-plus-empty.svg | 9 - .../ionicons-2.0.1/src/ios-plus-outline.svg | 18 - .../external/ionicons-2.0.1/src/ios-plus.svg | 10 - .../ionicons-2.0.1/src/ios-pricetag-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-pricetag.svg | 11 - .../ionicons-2.0.1/src/ios-pricetags-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-pricetags.svg | 16 - .../ionicons-2.0.1/src/ios-printer-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-printer.svg | 17 - .../ionicons-2.0.1/src/ios-pulse-strong.svg | 12 - .../external/ionicons-2.0.1/src/ios-pulse.svg | 12 - .../ionicons-2.0.1/src/ios-rainy-outline.svg | 20 - .../external/ionicons-2.0.1/src/ios-rainy.svg | 17 - .../ionicons-2.0.1/src/ios-recording-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-recording.svg | 14 - .../ionicons-2.0.1/src/ios-redo-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-redo.svg | 10 - .../ionicons-2.0.1/src/ios-refresh-empty.svg | 10 - .../ionicons-2.0.1/src/ios-refresh-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-refresh.svg | 11 - .../external/ionicons-2.0.1/src/ios-reload.svg | 11 - .../src/ios-reverse-camera-outline.svg | 20 - .../ionicons-2.0.1/src/ios-reverse-camera.svg | 15 - .../ionicons-2.0.1/src/ios-rewind-outline.svg | 8 - .../external/ionicons-2.0.1/src/ios-rewind.svg | 7 - .../ionicons-2.0.1/src/ios-rose-outline.svg | 29 - .../external/ionicons-2.0.1/src/ios-rose.svg | 18 - .../ionicons-2.0.1/src/ios-search-strong.svg | 10 - .../external/ionicons-2.0.1/src/ios-search.svg | 10 - .../ionicons-2.0.1/src/ios-settings-strong.svg | 14 - .../external/ionicons-2.0.1/src/ios-settings.svg | 24 - .../ionicons-2.0.1/src/ios-shuffle-strong.svg | 18 - .../external/ionicons-2.0.1/src/ios-shuffle.svg | 20 - .../src/ios-skipbackward-outline.svg | 8 - .../ionicons-2.0.1/src/ios-skipbackward.svg | 7 - .../ionicons-2.0.1/src/ios-skipforward-outline.svg | 8 - .../ionicons-2.0.1/src/ios-skipforward.svg | 7 - .../external/ionicons-2.0.1/src/ios-snowy.svg | 26 - .../ionicons-2.0.1/src/ios-speedometer-outline.svg | 24 - .../ionicons-2.0.1/src/ios-speedometer.svg | 28 - .../external/ionicons-2.0.1/src/ios-star-half.svg | 8 - .../ionicons-2.0.1/src/ios-star-outline.svg | 8 - .../external/ionicons-2.0.1/src/ios-star.svg | 7 - .../ionicons-2.0.1/src/ios-stopwatch-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-stopwatch.svg | 13 - .../ionicons-2.0.1/src/ios-sunny-outline.svg | 27 - .../external/ionicons-2.0.1/src/ios-sunny.svg | 26 - .../ionicons-2.0.1/src/ios-telephone-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-telephone.svg | 12 - .../ionicons-2.0.1/src/ios-tennisball-outline.svg | 19 - .../external/ionicons-2.0.1/src/ios-tennisball.svg | 25 - .../src/ios-thunderstorm-outline.svg | 22 - .../ionicons-2.0.1/src/ios-thunderstorm.svg | 17 - .../ionicons-2.0.1/src/ios-time-outline.svg | 36 - .../external/ionicons-2.0.1/src/ios-time.svg | 27 - .../ionicons-2.0.1/src/ios-timer-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-timer.svg | 12 - .../ionicons-2.0.1/src/ios-toggle-outline.svg | 22 - .../external/ionicons-2.0.1/src/ios-toggle.svg | 16 - .../ionicons-2.0.1/src/ios-trash-outline.svg | 17 - .../external/ionicons-2.0.1/src/ios-trash.svg | 12 - .../ionicons-2.0.1/src/ios-undo-outline.svg | 11 - .../external/ionicons-2.0.1/src/ios-undo.svg | 10 - .../ionicons-2.0.1/src/ios-unlocked-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-unlocked.svg | 12 - .../ionicons-2.0.1/src/ios-upload-outline.svg | 14 - .../external/ionicons-2.0.1/src/ios-upload.svg | 10 - .../ionicons-2.0.1/src/ios-videocam-outline.svg | 12 - .../external/ionicons-2.0.1/src/ios-videocam.svg | 11 - .../ionicons-2.0.1/src/ios-volume-high.svg | 19 - .../external/ionicons-2.0.1/src/ios-volume-low.svg | 7 - .../ionicons-2.0.1/src/ios-wineglass-outline.svg | 15 - .../external/ionicons-2.0.1/src/ios-wineglass.svg | 11 - .../ionicons-2.0.1/src/ios-world-outline.svg | 22 - .../external/ionicons-2.0.1/src/ios-world.svg | 29 - .../fusion/external/ionicons-2.0.1/src/ipad.svg | 10 - .../fusion/external/ionicons-2.0.1/src/iphone.svg | 13 - .../fusion/external/ionicons-2.0.1/src/ipod.svg | 13 - .../app/fusion/external/ionicons-2.0.1/src/jet.svg | 14 - .../app/fusion/external/ionicons-2.0.1/src/key.svg | 14 - .../fusion/external/ionicons-2.0.1/src/knife.svg | 9 - .../fusion/external/ionicons-2.0.1/src/laptop.svg | 10 - .../fusion/external/ionicons-2.0.1/src/leaf.svg | 12 - .../fusion/external/ionicons-2.0.1/src/levels.svg | 16 - .../external/ionicons-2.0.1/src/lightbulb.svg | 21 - .../fusion/external/ionicons-2.0.1/src/link.svg | 15 - .../fusion/external/ionicons-2.0.1/src/load-a.svg | 17 - .../fusion/external/ionicons-2.0.1/src/load-b.svg | 20 - .../fusion/external/ionicons-2.0.1/src/load-c.svg | 21 - .../fusion/external/ionicons-2.0.1/src/load-d.svg | 28 - .../external/ionicons-2.0.1/src/location.svg | 11 - .../ionicons-2.0.1/src/lock-combination.svg | 28 - .../fusion/external/ionicons-2.0.1/src/locked.svg | 11 - .../fusion/external/ionicons-2.0.1/src/log-in.svg | 14 - .../fusion/external/ionicons-2.0.1/src/log-out.svg | 17 - .../fusion/external/ionicons-2.0.1/src/loop.svg | 14 - .../fusion/external/ionicons-2.0.1/src/magnet.svg | 14 - .../fusion/external/ionicons-2.0.1/src/male.svg | 10 - .../app/fusion/external/ionicons-2.0.1/src/man.svg | 12 - .../app/fusion/external/ionicons-2.0.1/src/map.svg | 30 - .../fusion/external/ionicons-2.0.1/src/medkit.svg | 12 - .../fusion/external/ionicons-2.0.1/src/merge.svg | 13 - .../fusion/external/ionicons-2.0.1/src/mic-a.svg | 15 - .../fusion/external/ionicons-2.0.1/src/mic-b.svg | 17 - .../fusion/external/ionicons-2.0.1/src/mic-c.svg | 8 - .../external/ionicons-2.0.1/src/minus-circled.svg | 9 - .../external/ionicons-2.0.1/src/minus-round.svg | 8 - .../fusion/external/ionicons-2.0.1/src/minus.svg | 7 - .../fusion/external/ionicons-2.0.1/src/model-s.svg | 33 - .../fusion/external/ionicons-2.0.1/src/monitor.svg | 12 - .../fusion/external/ionicons-2.0.1/src/more.svg | 12 - .../fusion/external/ionicons-2.0.1/src/mouse.svg | 24 - .../external/ionicons-2.0.1/src/music-note.svg | 10 - .../external/ionicons-2.0.1/src/navicon-round.svg | 14 - .../fusion/external/ionicons-2.0.1/src/navicon.svg | 11 - .../external/ionicons-2.0.1/src/navigate.svg | 7 - .../fusion/external/ionicons-2.0.1/src/network.svg | 12 - .../external/ionicons-2.0.1/src/no-smoking.svg | 33 - .../fusion/external/ionicons-2.0.1/src/nuclear.svg | 18 - .../fusion/external/ionicons-2.0.1/src/outlet.svg | 16 - .../external/ionicons-2.0.1/src/paintbrush.svg | 18 - .../external/ionicons-2.0.1/src/paintbucket.svg | 12 - .../external/ionicons-2.0.1/src/paper-airplane.svg | 13 - .../external/ionicons-2.0.1/src/paperclip.svg | 13 - .../fusion/external/ionicons-2.0.1/src/pause.svg | 12 - .../external/ionicons-2.0.1/src/person-add.svg | 13 - .../external/ionicons-2.0.1/src/person-stalker.svg | 18 - .../fusion/external/ionicons-2.0.1/src/person.svg | 10 - .../external/ionicons-2.0.1/src/pie-graph.svg | 11 - .../app/fusion/external/ionicons-2.0.1/src/pin.svg | 11 - .../external/ionicons-2.0.1/src/pinpoint.svg | 11 - .../fusion/external/ionicons-2.0.1/src/pizza.svg | 20 - .../fusion/external/ionicons-2.0.1/src/plane.svg | 10 - .../fusion/external/ionicons-2.0.1/src/planet.svg | 21 - .../fusion/external/ionicons-2.0.1/src/play.svg | 8 - .../external/ionicons-2.0.1/src/playstation.svg | 27 - .../external/ionicons-2.0.1/src/plus-circled.svg | 10 - .../external/ionicons-2.0.1/src/plus-round.svg | 9 - .../fusion/external/ionicons-2.0.1/src/plus.svg | 7 - .../fusion/external/ionicons-2.0.1/src/podium.svg | 11 - .../fusion/external/ionicons-2.0.1/src/pound.svg | 11 - .../fusion/external/ionicons-2.0.1/src/power.svg | 15 - .../external/ionicons-2.0.1/src/pricetag.svg | 13 - .../external/ionicons-2.0.1/src/pricetags.svg | 18 - .../fusion/external/ionicons-2.0.1/src/printer.svg | 14 - .../external/ionicons-2.0.1/src/pull-request.svg | 16 - .../external/ionicons-2.0.1/src/qr-scanner.svg | 12 - .../fusion/external/ionicons-2.0.1/src/quote.svg | 16 - .../external/ionicons-2.0.1/src/radio-waves.svg | 25 - .../fusion/external/ionicons-2.0.1/src/record.svg | 7 - .../fusion/external/ionicons-2.0.1/src/refresh.svg | 15 - .../external/ionicons-2.0.1/src/reply-all.svg | 12 - .../fusion/external/ionicons-2.0.1/src/reply.svg | 9 - .../external/ionicons-2.0.1/src/ribbon-a.svg | 14 - .../external/ionicons-2.0.1/src/ribbon-b.svg | 18 - .../external/ionicons-2.0.1/src/sad-outline.svg | 28 - .../app/fusion/external/ionicons-2.0.1/src/sad.svg | 20 - .../external/ionicons-2.0.1/src/scissors.svg | 23 - .../fusion/external/ionicons-2.0.1/src/search.svg | 10 - .../external/ionicons-2.0.1/src/settings.svg | 18 - .../fusion/external/ionicons-2.0.1/src/share.svg | 11 - .../fusion/external/ionicons-2.0.1/src/shuffle.svg | 11 - .../external/ionicons-2.0.1/src/skip-backward.svg | 15 - .../external/ionicons-2.0.1/src/skip-forward.svg | 15 - .../ionicons-2.0.1/src/social-android-outline.svg | 29 - .../external/ionicons-2.0.1/src/social-android.svg | 22 - .../ionicons-2.0.1/src/social-angular-outline.svg | 11 - .../external/ionicons-2.0.1/src/social-angular.svg | 11 - .../ionicons-2.0.1/src/social-apple-outline.svg | 20 - .../external/ionicons-2.0.1/src/social-apple.svg | 14 - .../ionicons-2.0.1/src/social-bitcoin-outline.svg | 27 - .../external/ionicons-2.0.1/src/social-bitcoin.svg | 14 - .../ionicons-2.0.1/src/social-buffer-outline.svg | 24 - .../external/ionicons-2.0.1/src/social-buffer.svg | 18 - .../ionicons-2.0.1/src/social-chrome-outline.svg | 17 - .../external/ionicons-2.0.1/src/social-chrome.svg | 22 - .../ionicons-2.0.1/src/social-codepen-outline.svg | 26 - .../external/ionicons-2.0.1/src/social-codepen.svg | 26 - .../ionicons-2.0.1/src/social-css3-outline.svg | 12 - .../external/ionicons-2.0.1/src/social-css3.svg | 14 - .../src/social-designernews-outline.svg | 18 - .../ionicons-2.0.1/src/social-designernews.svg | 18 - .../ionicons-2.0.1/src/social-dribbble-outline.svg | 15 - .../ionicons-2.0.1/src/social-dribbble.svg | 26 - .../ionicons-2.0.1/src/social-dropbox-outline.svg | 13 - .../external/ionicons-2.0.1/src/social-dropbox.svg | 13 - .../ionicons-2.0.1/src/social-euro-outline.svg | 19 - .../external/ionicons-2.0.1/src/social-euro.svg | 12 - .../ionicons-2.0.1/src/social-facebook-outline.svg | 9 - .../ionicons-2.0.1/src/social-facebook.svg | 8 - .../src/social-foursquare-outline.svg | 22 - .../ionicons-2.0.1/src/social-foursquare.svg | 20 - .../ionicons-2.0.1/src/social-freebsd-devil.svg | 22 - .../ionicons-2.0.1/src/social-github-outline.svg | 24 - .../external/ionicons-2.0.1/src/social-github.svg | 14 - .../ionicons-2.0.1/src/social-google-outline.svg | 19 - .../external/ionicons-2.0.1/src/social-google.svg | 20 - .../src/social-googleplus-outline.svg | 18 - .../ionicons-2.0.1/src/social-googleplus.svg | 17 - .../src/social-hackernews-outline.svg | 12 - .../ionicons-2.0.1/src/social-hackernews.svg | 9 - .../ionicons-2.0.1/src/social-html5-outline.svg | 13 - .../external/ionicons-2.0.1/src/social-html5.svg | 9 - .../src/social-instagram-outline.svg | 12 - .../ionicons-2.0.1/src/social-instagram.svg | 18 - .../src/social-javascript-outline.svg | 27 - .../ionicons-2.0.1/src/social-javascript.svg | 17 - .../ionicons-2.0.1/src/social-linkedin-outline.svg | 22 - .../ionicons-2.0.1/src/social-linkedin.svg | 13 - .../ionicons-2.0.1/src/social-markdown.svg | 14 - .../external/ionicons-2.0.1/src/social-nodejs.svg | 26 - .../external/ionicons-2.0.1/src/social-octocat.svg | 28 - .../src/social-pinterest-outline.svg | 14 - .../ionicons-2.0.1/src/social-pinterest.svg | 15 - .../external/ionicons-2.0.1/src/social-python.svg | 21 - .../ionicons-2.0.1/src/social-reddit-outline.svg | 26 - .../external/ionicons-2.0.1/src/social-reddit.svg | 18 - .../ionicons-2.0.1/src/social-rss-outline.svg | 16 - .../external/ionicons-2.0.1/src/social-rss.svg | 12 - .../external/ionicons-2.0.1/src/social-sass.svg | 35 - .../ionicons-2.0.1/src/social-skype-outline.svg | 26 - .../external/ionicons-2.0.1/src/social-skype.svg | 20 - .../ionicons-2.0.1/src/social-snapchat-outline.svg | 42 - .../ionicons-2.0.1/src/social-snapchat.svg | 31 - .../ionicons-2.0.1/src/social-tumblr-outline.svg | 13 - .../external/ionicons-2.0.1/src/social-tumblr.svg | 10 - .../external/ionicons-2.0.1/src/social-tux.svg | 53 - .../ionicons-2.0.1/src/social-twitch-outline.svg | 13 - .../external/ionicons-2.0.1/src/social-twitch.svg | 9 - .../ionicons-2.0.1/src/social-twitter-outline.svg | 19 - .../external/ionicons-2.0.1/src/social-twitter.svg | 12 - .../ionicons-2.0.1/src/social-usd-outline.svg | 44 - .../external/ionicons-2.0.1/src/social-usd.svg | 24 - .../ionicons-2.0.1/src/social-vimeo-outline.svg | 23 - .../external/ionicons-2.0.1/src/social-vimeo.svg | 18 - .../ionicons-2.0.1/src/social-whatsapp-outline.svg | 25 - .../ionicons-2.0.1/src/social-whatsapp.svg | 18 - .../ionicons-2.0.1/src/social-windows-outline.svg | 17 - .../external/ionicons-2.0.1/src/social-windows.svg | 17 - .../src/social-wordpress-outline.svg | 16 - .../ionicons-2.0.1/src/social-wordpress.svg | 20 - .../ionicons-2.0.1/src/social-yahoo-outline.svg | 10 - .../external/ionicons-2.0.1/src/social-yahoo.svg | 8 - .../ionicons-2.0.1/src/social-yen-outline.svg | 9 - .../external/ionicons-2.0.1/src/social-yen.svg | 8 - .../ionicons-2.0.1/src/social-youtube-outline.svg | 22 - .../external/ionicons-2.0.1/src/social-youtube.svg | 12 - .../ionicons-2.0.1/src/soup-can-outline.svg | 28 - .../external/ionicons-2.0.1/src/soup-can.svg | 16 - .../external/ionicons-2.0.1/src/speakerphone.svg | 19 - .../external/ionicons-2.0.1/src/speedometer.svg | 15 - .../fusion/external/ionicons-2.0.1/src/spoon.svg | 10 - .../fusion/external/ionicons-2.0.1/src/star.svg | 7 - .../external/ionicons-2.0.1/src/stats-bars.svg | 12 - .../fusion/external/ionicons-2.0.1/src/steam.svg | 20 - .../fusion/external/ionicons-2.0.1/src/stop.svg | 8 - .../external/ionicons-2.0.1/src/thermometer.svg | 11 - .../external/ionicons-2.0.1/src/thumbsdown.svg | 13 - .../external/ionicons-2.0.1/src/thumbsup.svg | 13 - .../external/ionicons-2.0.1/src/toggle-filled.svg | 11 - .../fusion/external/ionicons-2.0.1/src/toggle.svg | 12 - .../external/ionicons-2.0.1/src/transgender.svg | 12 - .../fusion/external/ionicons-2.0.1/src/trash-a.svg | 10 - .../fusion/external/ionicons-2.0.1/src/trash-b.svg | 13 - .../fusion/external/ionicons-2.0.1/src/trophy.svg | 16 - .../external/ionicons-2.0.1/src/tshirt-outline.svg | 11 - .../fusion/external/ionicons-2.0.1/src/tshirt.svg | 8 - .../external/ionicons-2.0.1/src/umbrella.svg | 18 - .../external/ionicons-2.0.1/src/university.svg | 11 - .../external/ionicons-2.0.1/src/unlocked.svg | 10 - .../fusion/external/ionicons-2.0.1/src/upload.svg | 9 - .../app/fusion/external/ionicons-2.0.1/src/usb.svg | 22 - .../external/ionicons-2.0.1/src/videocamera.svg | 11 - .../external/ionicons-2.0.1/src/volume-high.svg | 15 - .../external/ionicons-2.0.1/src/volume-low.svg | 11 - .../external/ionicons-2.0.1/src/volume-medium.svg | 13 - .../external/ionicons-2.0.1/src/volume-mute.svg | 14 - .../fusion/external/ionicons-2.0.1/src/wand.svg | 17 - .../external/ionicons-2.0.1/src/waterdrop.svg | 11 - .../fusion/external/ionicons-2.0.1/src/wifi.svg | 16 - .../external/ionicons-2.0.1/src/wineglass.svg | 21 - .../fusion/external/ionicons-2.0.1/src/woman.svg | 13 - .../fusion/external/ionicons-2.0.1/src/wrench.svg | 11 - .../fusion/external/ionicons-2.0.1/src/xbox.svg | 21 - .../app/fusion/external/utils/js/browserCheck.js | 24 - .../scripts/controllers/nbook-framecontroller.js | 34 - .../scripts/controllers/nbookController.js | 179 - .../scripts/controllers/notebookFrameController.js | 65 - .../scripts/dependency/angular.js | 29400 ------------- .../scripts/view-models/notebook-frame.html | 85 - .../scripts/view-models/notebook-viz.html | 26 - .../scripts/view-models/notebook.htm | 54 - .../scripts/view-models/notebookInputs.html | 90 - .../att_angular_gridster/angular-gridster.js | 2244 - .../att_angular_gridster/ui-gridster-tpls.js | 168 - .../fusion/scripts/controllers/adminController.js | 65 - .../fusion/scripts/controllers/admin_menu_edit.js | 230 - .../fusion/scripts/controllers/ase-controller.js | 22 - .../scripts/controllers/broadcast-controller.js | 79 - .../controllers/broadcast-list-controller.js | 120 - .../controllers/collaborate-list-controller.js | 63 - .../app/fusion/scripts/controllers/dummy.txt | 0 .../controllers/fn_menu_add_popup_controller.js | 281 - .../scripts/controllers/jcs-admin-controller.js | 83 - .../scripts/controllers/modelpopupController.js | 40 - .../scripts/controllers/post-search-controller.js | 202 - .../scripts/controllers/profile-controller.js | 286 - .../controllers/profile-search-controller.js | 80 - .../scripts/controllers/profileController.js | 38 - .../fusion/scripts/controllers/role-controller.js | 226 - .../controllers/role-function-list-controller.js | 157 - .../scripts/controllers/role-list-controller.js | 102 - .../controllers/rolefunctionpopupController.js | 84 - .../controllers/rolepopupmodelController.js | 205 - .../scripts/controllers/self-profile-controller.js | 284 - .../scripts/controllers/usage-list-controller.js | 41 - .../scripts/controllers/workflows/workflowApp.js | 24 - .../controllers/workflows/workflowController.js | 509 - .../controllers/workflows/workflowRouting.js | 26 - .../webapp/app/fusion/scripts/directives/dummy.txt | 0 .../webapp/app/fusion/scripts/directives/footer.js | 30 - .../webapp/app/fusion/scripts/directives/header.js | 504 - .../app/fusion/scripts/directives/leftMenu.js | 203 - .../webapp/app/fusion/scripts/jquery.resize.js | 139 - .../main/webapp/app/fusion/scripts/layout/debug.js | 329 - .../app/fusion/scripts/layout/jquery-latest.js | 9555 ----- .../app/fusion/scripts/layout/jquery-ui-latest.js | 14879 ------- .../fusion/scripts/layout/jquery.layout-latest.js | 6086 --- .../main/webapp/app/fusion/scripts/modalService.js | 185 - .../main/webapp/app/fusion/scripts/moment.min.js | 6 - .../app/fusion/scripts/services/adminService.js | 160 - .../app/fusion/scripts/services/headerService.js | 89 - .../app/fusion/scripts/services/leftMenuService.js | 54 - .../app/fusion/scripts/services/profileService.js | 98 - .../app/fusion/scripts/services/userInfoService.js | 51 - .../app/fusion/scripts/socket/peerBroadcast.js | 122 - .../main/webapp/app/fusion/scripts/utils/dummy.txt | 0 .../app/fusion/scripts/utils/page-resource.js | 95 - .../fusion/scripts/utils/sandbox-resources.html | 9 - .../scripts/view-models/admin-page/admin.html | 115 - .../scripts/view-models/admin-page/profile.html | 50 - .../app/fusion/scripts/view-models/dummy.txt | 0 .../app/fusion/scripts/view-models/footer.html | 42 - .../app/fusion/scripts/view-models/header.html | 186 - .../app/fusion/scripts/view-models/left_menu.html | 41 - .../view-models/profile-page/admin_menu_edit.html | 175 - .../view-models/profile-page/broadcast.html | 61 - .../view-models/profile-page/broadcast_list.html | 71 - .../view-models/profile-page/collaborate_list.html | 57 - .../view-models/profile-page/jcs_admin.html | 87 - .../view-models/profile-page/popup_modal.html | 282 - .../profile-page/popup_modal_fn_menu_add.html | 155 - .../profile-page/popup_modal_fn_menu_edit.html | 148 - .../view-models/profile-page/popup_modal_role.html | 82 - .../profile-page/popup_modal_rolefunction.html | 46 - .../view-models/profile-page/post_search.html | 139 - .../view-models/profile-page/profile_detail.html | 188 - .../view-models/profile-page/profile_search.html | 72 - .../scripts/view-models/profile-page/role.html | 118 - .../profile-page/role_function_list.html | 88 - .../view-models/profile-page/role_list.html | 61 - .../view-models/profile-page/self_profile.html | 183 - .../view-models/profile-page/usage_list.html | 64 - .../view-models/workflows/workflow-landing.html | 130 - .../view-models/workflows/workflow-listing.html | 85 - .../view-models/workflows/workflow-new.html | 108 - .../view-models/workflows/workflow-preview.html | 36 - .../view-models/workflows/workflow-remove.html | 38 - .../view-models/workflows/workflow-schedule.html | 116 - .../fusion/scripts/webrtc/RTCMultiConnection.js | 6788 --- .../app/fusion/scripts/webrtc/getSourceId.html | 78 - .../att_angular_gridster/sandbox-gridster.css | 173 - .../styles/att_angular_gridster/ui-gridster.css | 116 - .../main/webapp/app/fusion/styles/fusion-sunny.css | 362 - .../main/webapp/app/fusion/styles/jquery-ui.css | 1225 - .../fusion/styles/layout/layout-default-latest.css | 224 - .../app/fusion/styles/workflows/workflows.css | 50 - .../drools/controller/drools-list-controller.js | 62 - .../drools/controller/drools-view-controller.js | 64 - .../drools/controller/droolsController.js | 30 - .../app/fusionapp/drools/controller/dummy.txt | 0 .../app/fusionapp/drools/directives/dummy.txt | 0 .../app/fusionapp/drools/services/droolsService.js | 76 - .../webapp/app/fusionapp/drools/utils/dummy.txt | 0 .../fusionapp/drools/view-models/droolsList.html | 47 - .../drools/view-models/droolsSinglePage.html | 92 - .../fusionapp/drools/view-models/droolsView.html | 61 - .../app/fusionapp/drools/view-models/dummy.txt | 0 .../main/webapp/app/fusionapp/external/dummy.txt | 0 .../src/main/webapp/app/fusionapp/fonts/dummy.txt | 0 .../src/main/webapp/app/fusionapp/images/dummy.txt | 0 .../app/fusionapp/scripts/controller/dummy.txt | 0 .../scripts/controller/sample-page-controller.js | 80 - .../controller/sample-page-iframe-controller.js | 23 - .../scripts/controller/sampleController.js | 30 - .../app/fusionapp/scripts/directives/dummy.txt | 0 .../webapp/app/fusionapp/scripts/utils/dummy.txt | 0 .../app/fusionapp/scripts/view-models/dummy.txt | 0 .../app/fusionapp/scripts/view-models/sample.html | 60 - .../scripts/view-models/sampleWithIframe.html | 22 - .../scripts/view-models/singlePageSample.html | 87 - .../src/main/webapp/app/fusionapp/styles/dummy.txt | 0 1612 files changed, 287041 deletions(-) delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-route.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-route.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-route.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-scenario.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-touch.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-touch.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-touch.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular.min.js.map delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/errors.json delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/version.json delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/version.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.2.4.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/bootstrap/bs.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/css/nv.d3.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/cie.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/colorbrewer.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/core.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/crossfilter.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/crossfilter.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.geom.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.layout.cloud.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.layout.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.v2.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.v2.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/d3.v3.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/fisheye.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/hive.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/horizon.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/interactiveLayer.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/intro.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/axis-min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/axis.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/axis.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/backup/bullet.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/backup/bulletChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/boilerplate.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/bullet.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/bulletChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/cumulativeLineChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/discreteBar.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/discreteBarChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/distribution.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/historicalBar.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/historicalBarChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/indentedTree.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/legend.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/line.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/lineChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarWithFocusChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheye.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheyeChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/lineWithFocusChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiBar.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiBarChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontal.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontalChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeries.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeriesChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/multiChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/ohlcBar.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/parallelCoordinates.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/pie.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/pieChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/scatter.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/scatterChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/scatterPlusLineChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/sparkline.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/sparklinePlus.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/stackedArea.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/models/stackedAreaChart.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/nv.d3.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/nv.d3.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/outro.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/sankey.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/tooltip.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/d3/js/utils.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular-animate.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular-cookies.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular-route.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular-route.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular-sanitize.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular-touch.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/angular.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/app.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/gestures.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/ng_base.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/ui-charts-tpls.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/ebz_header/footer.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/ebz_header/header.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/ebz_header/portal_ebz_header.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/fn-ebz.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/images/no_favorites_star.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/js/attHeaderSnippet.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/js/footer.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/att-abs-tpls.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/att-abs-tpls.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/base.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/btn.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/demo.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/dtpk.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/frms.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/ie/backgroundsize.min.htc delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/images/upanddown.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/pages/iconography.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/sldr.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/style.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ebz/sandbox/styles/tbs.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/.gitignore delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/LICENSE delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/bower.json delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/component.json delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/composer.json delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/css/ionicons.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/css/ionicons.min.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/fonts/ionicons.eot delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/fonts/ionicons.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/fonts/ionicons.ttf delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/fonts/ionicons.woff delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/less/_ionicons-font.less delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/less/_ionicons-icons.less delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/less/_ionicons-variables.less delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/less/ionicons.less delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/alert-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/alert.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-add-contact.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-add.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-alarm.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-archive.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-arrow-back.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-arrow-down-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-arrow-down-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-arrow-forward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-arrow-up-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-arrow-up-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-battery.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-book.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-calendar.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-call.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-camera.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-chat.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-checkmark.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-clock.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-close.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-contact.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-contacts.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-data.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-developer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-display.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-download.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-drawer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-dropdown.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-earth.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-folder.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-forums.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-friends.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-hand.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-image.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-inbox.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-information.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-keypad.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-lightbulb.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-locate.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-location.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-mail.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-microphone.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-mixer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-more.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-note.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-playstore.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-printer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-promotion.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-reminder.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-remove.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-search.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-send.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-settings.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-share.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-social-user.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-social.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-sort.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-stair-drawer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-star.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-stopwatch.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-storage.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-system-back.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-system-home.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-system-windows.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-timer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-trash.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-user-menu.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-volume.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/android-wifi.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/aperture.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/archive.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-down-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-down-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-down-c.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-expand.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-graph-down-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-graph-down-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-graph-up-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-graph-up-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-left-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-left-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-left-c.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-move.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-resize.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-return-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-return-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-right-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-right-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-right-c.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-shrink.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-swap.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-up-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-up-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/arrow-up-c.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/asterisk.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/at.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/bag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/battery-charging.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/battery-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/battery-full.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/battery-half.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/battery-low.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/beaker.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/beer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/bluetooth.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/bonfire.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/bookmark.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/briefcase.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/bug.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/calculator.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/calendar.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/camera.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/card.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/cash.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chatbox-working.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chatbox.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chatboxes.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chatbubble-working.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chatbubble.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chatbubbles.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/checkmark-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/checkmark-round.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/checkmark.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chevron-down.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chevron-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chevron-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/chevron-up.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/clipboard.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/clock.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/close-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/close-round.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/close.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/closed-captioning.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/cloud.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/code-download.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/code-working.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/code.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/coffee.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/compass.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/compose.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/connection-bars.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/contrast.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/cube.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/disc.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/document-text.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/document.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/drag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/earth.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/edit.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/egg.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/eject.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/email.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/eye-disabled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/eye.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/female.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/filing.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/film-marker.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/fireball.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/flag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/flame.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/flash-off.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/flash.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/flask.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/folder.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/fork-repo.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/fork.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/forward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/funnel.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/game-controller-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/game-controller-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/gear-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/gear-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/grid.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/hammer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/happy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/headphone.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/heart-broken.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/heart.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/help-buoy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/help-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/help.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/home.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/icecream.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/icon-social-google-plus-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/icon-social-google-plus.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/image.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/images.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/information-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/information.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ionic.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-alarm-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-alarm.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-albums-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-albums.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-americanfootball-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-americanfootball.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-analytics-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-analytics.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-back.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-down.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-forward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-thin-down.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-thin-left.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-thin-right.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-thin-up.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-arrow-up.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-at-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-at.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-barcode-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-barcode.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-baseball-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-baseball.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-basketball-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-basketball.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-bell-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-bell.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-bolt-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-bolt.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-bookmarks-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-bookmarks.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-box-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-box.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-briefcase-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-briefcase.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-browsers-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-browsers.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-calculator-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-calculator.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-calendar-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-calendar.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-camera-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-camera.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cart-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cart.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-chatboxes-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-chatboxes.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-chatbubble-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-chatbubble.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-checkmark-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-checkmark-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-checkmark.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-circle-filled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-circle-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-clock-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-clock.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-close-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-close-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-close.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloud-download-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloud-download.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloud-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloud-upload-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloud-upload.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloud.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloudy-night-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloudy-night.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloudy-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cloudy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cog-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-cog.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-compose-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-compose.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-contact-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-contact.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-copy-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-copy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-download-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-download.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-drag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-email-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-email.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-expand.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-eye-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-eye.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-fastforward-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-fastforward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-filing-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-filing.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-film-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-film.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-flag-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-flag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-folder-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-folder.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-football-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-football.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-gear-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-gear.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-glasses-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-glasses.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-heart-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-heart.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-help-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-help-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-help.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-home-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-home.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-infinite-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-infinite.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-information-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-information-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-information.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-ionic-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-keypad-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-keypad.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-lightbulb-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-lightbulb.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-location-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-location.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-locked-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-locked.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-loop-strong.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-loop.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-medkit-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-medkit.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-mic-off.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-mic-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-mic.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-minus-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-minus-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-minus.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-monitor-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-monitor.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-moon-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-moon.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-more-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-more.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-musical-note.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-musical-notes.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-navigate-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-navigate.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-paper-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-paper.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-paperplane-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-paperplane.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-partlysunny-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-partlysunny.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pause-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pause.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-paw-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-paw.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-people-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-people.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-person-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-person.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-personadd-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-personadd.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-photos-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-photos.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pie-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pie.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-play-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-play.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-plus-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-plus-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-plus.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pricetag-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pricetag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pricetags-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pricetags.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-printer-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-printer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pulse-strong.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-pulse.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-rainy-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-rainy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-recording-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-recording.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-redo-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-redo.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-refresh-empty.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-refresh-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-refresh.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-reload.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-reverse-camera-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-reverse-camera.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-rewind-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-rewind.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-search-strong.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-search.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-settings-strong.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-settings.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-shrink.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-skipbackward-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-skipbackward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-skipforward-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-skipforward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-snowy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-speedometer-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-speedometer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-star-half.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-star-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-star.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-stopwatch-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-stopwatch.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-sunny-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-sunny.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-telephone-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-telephone.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-tennisball-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-tennisball.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-thunderstorm-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-thunderstorm.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-time-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-time.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-timer-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-timer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-toggle-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-toggle.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-trash-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-trash.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-undo-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-undo.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-unlocked-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-unlocked.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-upload-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-upload.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-videocam-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-videocam.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-volume-high.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-volume-low.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-wineglass-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-wineglass.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-world-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ios7-world.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ipad.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/iphone.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ipod.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/jet.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/key.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/knife.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/laptop.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/leaf.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/levels.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/lightbulb.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/link.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/load-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/load-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/load-c.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/load-d.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/location.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/locked.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/log-in.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/log-out.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/loop.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/magnet.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/male.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/man.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/map.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/medkit.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/merge.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/mic-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/mic-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/mic-c.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/minus-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/minus-round.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/minus.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/model-s.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/monitor.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/more.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/mouse.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/music-note.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/navicon-round.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/navicon.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/navigate.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/network.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/no-smoking.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/nuclear.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/outlet.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/paper-airplane.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/paperclip.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pause.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/person-add.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/person-stalker.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/person.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pie-graph.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pin.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pinpoint.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pizza.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/plane.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/planet.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/play.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/playstation.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/plus-circled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/plus-round.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/plus.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/podium.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pound.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/power.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pricetag.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pricetags.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/printer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/pull-request.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/qr-scanner.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/quote.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/radio-waves.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/record.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/refresh.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/reply-all.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/reply.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ribbon-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/ribbon-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/sad.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/scissors.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/search.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/settings.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/share.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/shuffle.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/skip-backward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/skip-forward.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-android-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-android.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-apple-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-apple.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-bitcoin-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-bitcoin.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-buffer-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-buffer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-designernews-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-designernews.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-dribbble-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-dribbble.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-dropbox-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-dropbox.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-facebook-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-facebook.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-foursquare-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-foursquare.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-freebsd-devil.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-github-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-github.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-google-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-google.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-googleplus-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-googleplus.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-hackernews-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-hackernews.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-instagram-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-instagram.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-linkedin-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-linkedin.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-pinterest-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-pinterest.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-reddit-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-reddit.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-rss-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-rss.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-skype-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-skype.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-tumblr-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-tumblr.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-tux.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-twitter-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-twitter.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-usd-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-usd.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-vimeo-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-vimeo.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-windows-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-windows.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-wordpress-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-wordpress.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-yahoo-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-yahoo.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-youtube-outline.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/social-youtube.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/speakerphone.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/speedometer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/spoon.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/star.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/stats-bars.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/steam.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/stop.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/thermometer.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/thumbsdown.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/thumbsup.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/toggle-filled.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/toggle.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/trash-a.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/trash-b.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/trophy.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/umbrella.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/university.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/unlocked.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/upload.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/usb.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/videocamera.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/volume-high.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/volume-low.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/volume-medium.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/volume-mute.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/wand.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/waterdrop.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/wifi.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/wineglass.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/woman.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/wrench.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/png/512/xbox.png delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/readme.md delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/scss/_ionicons-font.scss delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/scss/_ionicons-icons.scss delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/scss/_ionicons-variables.scss delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/scss/ionicons.scss delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/alert-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/alert.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-add-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-add.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-alarm-clock.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-alert.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-apps.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-archive.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-back.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-down.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropdown-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropdown.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropleft-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropleft.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropright-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropright.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropup-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-dropup.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-forward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-arrow-up.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-attach.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-bar.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-bicycle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-boat.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-bookmark.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-bulb.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-bus.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-calendar.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-call.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-camera.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-cancel.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-car.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-cart.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-chat.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-checkbox-blank.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-checkbox-outline-blank.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-checkbox-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-checkbox.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-checkmark-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-clipboard.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-close.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-cloud-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-cloud-done.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-cloud-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-cloud.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-color-palette.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-compass.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-contact.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-contacts.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-contract.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-create.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-delete.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-desktop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-document.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-done-all.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-done.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-download.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-drafts.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-exit.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-expand.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-favorite-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-favorite.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-film.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-folder-open.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-folder.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-funnel.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-globe.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-hand.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-hangout.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-happy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-home.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-image.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-laptop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-list.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-locate.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-lock.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-mail.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-map.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-menu.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-microphone-off.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-microphone.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-more-horizontal.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-more-vertical.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-navigate.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-notifications-none.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-notifications-off.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-notifications.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-open.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-options.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-people.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-person-add.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-person.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-phone-landscape.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-phone-portrait.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-pin.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-plane.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-playstore.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-print.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-radio-button-off.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-radio-button-on.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-refresh.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-remove-circle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-remove.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-restaurant.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-sad.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-search.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-send.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-settings.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-share-alt.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-share.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-star-half.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-star-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-star.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-stopwatch.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-subway.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-sunny.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-sync.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-textsms.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-time.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-train.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-unlock.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-upload.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-volume-down.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-volume-mute.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-volume-off.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-volume-up.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-walk.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-warning.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-watch.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/android-wifi.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/aperture.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/archive.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-down-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-down-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-down-c.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-expand.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-graph-down-left.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-graph-down-right.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-graph-up-left.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-graph-up-right.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-left-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-left-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-left-c.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-move.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-resize.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-return-left.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-return-right.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-right-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-right-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-right-c.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-shrink.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-swap.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-up-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-up-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/arrow-up-c.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/asterisk.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/at.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/backspace-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/backspace.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/bag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/battery-charging.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/battery-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/battery-full.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/battery-half.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/battery-low.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/beaker.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/beer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/bluetooth.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/bonfire.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/bookmark.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/bowtie.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/briefcase.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/bug.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/calculator.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/calendar.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/camera.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/card.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/cash.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chatbox-working.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chatbox.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chatboxes.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chatbubble-working.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chatbubble.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chatbubbles.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/checkmark-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/checkmark-round.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/checkmark.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chevron-down.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chevron-left.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chevron-right.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/chevron-up.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/clipboard.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/clock.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/close-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/close-round.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/close.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/closed-captioning.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/cloud.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/code-download.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/code-working.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/code.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/coffee.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/compass.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/compose.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/connection-bars.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/contrast.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/crop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/cube.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/disc.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/document-text.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/document.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/drag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/earth.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/easel.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/edit.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/egg.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/eject.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/email-unread.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/email.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/erlenmeyer-flask-bubbles.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/erlenmeyer-flask.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/eye-disabled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/eye.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/female.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/filing.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/film-marker.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/fireball.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/flag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/flame.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/flash-off.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/flash.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/folder.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/fork-repo.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/fork.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/forward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/funnel.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/gear-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/gear-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/grid.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/hammer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/happy-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/happy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/headphone.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/heart-broken.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/heart.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/help-buoy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/help-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/help.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/home.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/icecream.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/image.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/images.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/information-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/information.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ionic.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-alarm-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-alarm.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-albums-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-albums.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-americanfootball-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-americanfootball.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-analytics-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-analytics.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-back.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-down.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-forward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-left.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-right.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-thin-down.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-thin-left.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-thin-right.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-thin-up.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-arrow-up.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-at-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-at.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-barcode-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-barcode.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-baseball-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-baseball.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-basketball-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-basketball.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-bell-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-bell.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-body-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-body.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-bolt-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-bolt.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-book-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-book.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-bookmarks-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-bookmarks.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-box-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-box.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-briefcase-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-briefcase.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-browsers-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-browsers.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-calculator-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-calculator.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-calendar-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-calendar.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-camera-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-camera.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cart-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cart.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-chatboxes-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-chatboxes.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-chatbubble-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-chatbubble.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-checkmark-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-checkmark-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-checkmark.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-circle-filled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-circle-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-clock-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-clock.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-close-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-close-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-close.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloud-download-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloud-download.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloud-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloud-upload-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloud-upload.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloud.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloudy-night-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloudy-night.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloudy-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cloudy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cog-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-cog.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-color-filter-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-color-filter.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-color-wand-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-color-wand.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-compose-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-compose.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-contact-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-contact.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-copy-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-copy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-crop-strong.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-crop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-download-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-download.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-drag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-email-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-email.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-eye-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-eye.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-fastforward-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-fastforward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-filing-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-filing.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-film-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-film.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flag-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flame-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flame.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flask-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flask.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flower-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-flower.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-folder-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-folder.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-football-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-football.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-game-controller-a-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-game-controller-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-game-controller-b-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-game-controller-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-gear-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-gear.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-glasses-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-glasses.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-grid-view-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-grid-view.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-heart-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-heart.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-help-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-help-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-help.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-home-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-home.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-infinite-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-infinite.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-information-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-information-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-information.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-ionic-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-keypad-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-keypad.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-lightbulb-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-lightbulb.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-list-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-list.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-location-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-location.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-locked-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-locked.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-loop-strong.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-loop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-medical-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-medical.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-medkit-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-medkit.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-mic-off.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-mic-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-mic.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-minus-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-minus-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-minus.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-monitor-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-monitor.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-moon-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-moon.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-more-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-more.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-musical-note.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-musical-notes.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-navigate-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-navigate.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-nutrition-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-nutrition.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-paper-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-paper.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-paperplane-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-paperplane.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-partlysunny-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-partlysunny.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pause-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pause.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-paw-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-paw.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-people-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-people.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-person-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-person.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-personadd-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-personadd.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-photos-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-photos.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pie-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pie.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pint-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pint.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-play-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-play.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-plus-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-plus-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-plus.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pricetag-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pricetag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pricetags-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pricetags.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-printer-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-printer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pulse-strong.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-pulse.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-rainy-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-rainy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-recording-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-recording.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-redo-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-redo.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-refresh-empty.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-refresh-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-refresh.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-reload.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-reverse-camera-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-reverse-camera.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-rewind-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-rewind.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-rose-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-rose.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-search-strong.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-search.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-settings-strong.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-settings.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-shuffle-strong.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-shuffle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-skipbackward-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-skipbackward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-skipforward-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-skipforward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-snowy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-speedometer-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-speedometer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-star-half.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-star-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-star.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-stopwatch-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-stopwatch.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-sunny-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-sunny.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-telephone-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-telephone.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-tennisball-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-tennisball.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-thunderstorm-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-thunderstorm.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-time-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-time.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-timer-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-timer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-toggle-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-toggle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-trash-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-trash.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-undo-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-undo.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-unlocked-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-unlocked.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-upload-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-upload.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-videocam-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-videocam.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-volume-high.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-volume-low.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-wineglass-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-wineglass.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-world-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ios-world.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ipad.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/iphone.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ipod.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/jet.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/key.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/knife.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/laptop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/leaf.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/levels.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/lightbulb.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/link.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/load-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/load-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/load-c.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/load-d.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/location.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/lock-combination.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/locked.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/log-in.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/log-out.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/loop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/magnet.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/male.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/man.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/map.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/medkit.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/merge.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/mic-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/mic-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/mic-c.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/minus-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/minus-round.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/minus.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/model-s.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/monitor.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/more.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/mouse.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/music-note.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/navicon-round.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/navicon.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/navigate.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/network.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/no-smoking.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/nuclear.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/outlet.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/paintbrush.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/paintbucket.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/paper-airplane.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/paperclip.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pause.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/person-add.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/person-stalker.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/person.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pie-graph.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pin.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pinpoint.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pizza.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/plane.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/planet.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/play.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/playstation.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/plus-circled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/plus-round.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/plus.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/podium.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pound.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/power.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pricetag.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pricetags.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/printer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/pull-request.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/qr-scanner.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/quote.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/radio-waves.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/record.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/refresh.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/reply-all.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/reply.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ribbon-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/ribbon-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/sad-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/sad.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/scissors.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/search.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/settings.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/share.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/shuffle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/skip-backward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/skip-forward.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-android-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-android.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-angular-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-angular.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-apple-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-apple.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-bitcoin-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-bitcoin.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-buffer-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-buffer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-chrome-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-chrome.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-codepen-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-codepen.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-css3-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-css3.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-designernews-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-designernews.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-dribbble-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-dribbble.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-dropbox-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-dropbox.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-euro-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-euro.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-facebook-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-facebook.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-foursquare-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-foursquare.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-freebsd-devil.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-github-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-github.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-google-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-google.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-googleplus-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-googleplus.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-hackernews-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-hackernews.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-html5-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-html5.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-instagram-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-instagram.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-javascript-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-javascript.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-linkedin-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-linkedin.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-markdown.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-nodejs.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-octocat.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-pinterest-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-pinterest.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-python.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-reddit-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-reddit.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-rss-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-rss.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-sass.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-skype-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-skype.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-snapchat-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-snapchat.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-tumblr-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-tumblr.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-tux.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-twitch-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-twitch.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-twitter-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-twitter.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-usd-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-usd.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-vimeo-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-vimeo.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-whatsapp-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-whatsapp.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-windows-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-windows.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-wordpress-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-wordpress.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-yahoo-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-yahoo.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-yen-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-yen.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-youtube-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/social-youtube.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/soup-can-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/soup-can.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/speakerphone.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/speedometer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/spoon.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/star.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/stats-bars.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/steam.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/stop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/thermometer.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/thumbsdown.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/thumbsup.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/toggle-filled.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/toggle.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/transgender.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/trash-a.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/trash-b.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/trophy.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/tshirt-outline.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/tshirt.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/umbrella.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/university.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/unlocked.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/upload.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/usb.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/videocamera.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/volume-high.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/volume-low.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/volume-medium.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/volume-mute.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/wand.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/waterdrop.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/wifi.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/wineglass.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/woman.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/wrench.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/ionicons-2.0.1/src/xbox.svg delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/utils/js/browserCheck.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbook-framecontroller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbookController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/notebookFrameController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/dependency/angular.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-frame.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/adminController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/admin_menu_edit.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/fn_menu_add_popup_controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/jcs-admin-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/modelpopupController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/post-search-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-search-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profileController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-function-list-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-list-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolefunctionpopupController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolepopupmodelController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/self-profile-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/usage-list-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowApp.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowRouting.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/footer.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/header.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/leftMenu.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/jquery.resize.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/debug.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery-ui-latest.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/modalService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/moment.min.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/services/adminService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/services/headerService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/services/leftMenuService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/services/profileService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/services/userInfoService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/socket/peerBroadcast.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/admin.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/profile.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/footer.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/header.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/left_menu.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_menu_edit.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/collaborate_list.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/jcs_admin.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/post_search.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_detail.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_search.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_function_list.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_list.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/self_profile.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/usage_list.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-landing.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-listing.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-new.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-preview.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-remove.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-schedule.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/fusion-sunny.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/jquery-ui.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/workflows/workflows.css delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/droolsController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/directives/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/services/droolsService.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/utils/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/external/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/fonts/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/images/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sample.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/singlePageSample.html delete mode 100644 ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/styles/dummy.txt (limited to 'ecomp-sdk/sdk-app/src/main/webapp/app') diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js deleted file mode 100644 index 2778fc56..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.js +++ /dev/null @@ -1,4121 +0,0 @@ -/** - * @license AngularJS v1.5.0 - * (c) 2010-2016 Google, Inc. http://angularjs.org - * License: MIT - */ -(function(window, angular, undefined) {'use strict'; - -/* jshint ignore:start */ -var noop = angular.noop; -var copy = angular.copy; -var extend = angular.extend; -var jqLite = angular.element; -var forEach = angular.forEach; -var isArray = angular.isArray; -var isString = angular.isString; -var isObject = angular.isObject; -var isUndefined = angular.isUndefined; -var isDefined = angular.isDefined; -var isFunction = angular.isFunction; -var isElement = angular.isElement; - -var ELEMENT_NODE = 1; -var COMMENT_NODE = 8; - -var ADD_CLASS_SUFFIX = '-add'; -var REMOVE_CLASS_SUFFIX = '-remove'; -var EVENT_CLASS_PREFIX = 'ng-'; -var ACTIVE_CLASS_SUFFIX = '-active'; -var PREPARE_CLASS_SUFFIX = '-prepare'; - -var NG_ANIMATE_CLASSNAME = 'ng-animate'; -var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren'; - -// Detect proper transitionend/animationend event names. -var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT; - -// If unprefixed events are not supported but webkit-prefixed are, use the latter. -// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them. -// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend` -// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`. -// Register both events in case `window.onanimationend` is not supported because of that, -// do the same for `transitionend` as Safari is likely to exhibit similar behavior. -// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit -// therefore there is no reason to test anymore for other vendor prefixes: -// http://caniuse.com/#search=transition -if (isUndefined(window.ontransitionend) && isDefined(window.onwebkittransitionend)) { - CSS_PREFIX = '-webkit-'; - TRANSITION_PROP = 'WebkitTransition'; - TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend'; -} else { - TRANSITION_PROP = 'transition'; - TRANSITIONEND_EVENT = 'transitionend'; -} - -if (isUndefined(window.onanimationend) && isDefined(window.onwebkitanimationend)) { - CSS_PREFIX = '-webkit-'; - ANIMATION_PROP = 'WebkitAnimation'; - ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend'; -} else { - ANIMATION_PROP = 'animation'; - ANIMATIONEND_EVENT = 'animationend'; -} - -var DURATION_KEY = 'Duration'; -var PROPERTY_KEY = 'Property'; -var DELAY_KEY = 'Delay'; -var TIMING_KEY = 'TimingFunction'; -var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount'; -var ANIMATION_PLAYSTATE_KEY = 'PlayState'; -var SAFE_FAST_FORWARD_DURATION_VALUE = 9999; - -var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY; -var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY; -var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY; -var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY; - -var isPromiseLike = function(p) { - return p && p.then ? true : false; -}; - -var ngMinErr = angular.$$minErr('ng'); -function assertArg(arg, name, reason) { - if (!arg) { - throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); - } - return arg; -} - -function mergeClasses(a,b) { - if (!a && !b) return ''; - if (!a) return b; - if (!b) return a; - if (isArray(a)) a = a.join(' '); - if (isArray(b)) b = b.join(' '); - return a + ' ' + b; -} - -function packageStyles(options) { - var styles = {}; - if (options && (options.to || options.from)) { - styles.to = options.to; - styles.from = options.from; - } - return styles; -} - -function pendClasses(classes, fix, isPrefix) { - var className = ''; - classes = isArray(classes) - ? classes - : classes && isString(classes) && classes.length - ? classes.split(/\s+/) - : []; - forEach(classes, function(klass, i) { - if (klass && klass.length > 0) { - className += (i > 0) ? ' ' : ''; - className += isPrefix ? fix + klass - : klass + fix; - } - }); - return className; -} - -function removeFromArray(arr, val) { - var index = arr.indexOf(val); - if (val >= 0) { - arr.splice(index, 1); - } -} - -function stripCommentsFromElement(element) { - if (element instanceof jqLite) { - switch (element.length) { - case 0: - return []; - break; - - case 1: - // there is no point of stripping anything if the element - // is the only element within the jqLite wrapper. - // (it's important that we retain the element instance.) - if (element[0].nodeType === ELEMENT_NODE) { - return element; - } - break; - - default: - return jqLite(extractElementNode(element)); - break; - } - } - - if (element.nodeType === ELEMENT_NODE) { - return jqLite(element); - } -} - -function extractElementNode(element) { - if (!element[0]) return element; - for (var i = 0; i < element.length; i++) { - var elm = element[i]; - if (elm.nodeType == ELEMENT_NODE) { - return elm; - } - } -} - -function $$addClass($$jqLite, element, className) { - forEach(element, function(elm) { - $$jqLite.addClass(elm, className); - }); -} - -function $$removeClass($$jqLite, element, className) { - forEach(element, function(elm) { - $$jqLite.removeClass(elm, className); - }); -} - -function applyAnimationClassesFactory($$jqLite) { - return function(element, options) { - if (options.addClass) { - $$addClass($$jqLite, element, options.addClass); - options.addClass = null; - } - if (options.removeClass) { - $$removeClass($$jqLite, element, options.removeClass); - options.removeClass = null; - } - } -} - -function prepareAnimationOptions(options) { - options = options || {}; - if (!options.$$prepared) { - var domOperation = options.domOperation || noop; - options.domOperation = function() { - options.$$domOperationFired = true; - domOperation(); - domOperation = noop; - }; - options.$$prepared = true; - } - return options; -} - -function applyAnimationStyles(element, options) { - applyAnimationFromStyles(element, options); - applyAnimationToStyles(element, options); -} - -function applyAnimationFromStyles(element, options) { - if (options.from) { - element.css(options.from); - options.from = null; - } -} - -function applyAnimationToStyles(element, options) { - if (options.to) { - element.css(options.to); - options.to = null; - } -} - -function mergeAnimationDetails(element, oldAnimation, newAnimation) { - var target = oldAnimation.options || {}; - var newOptions = newAnimation.options || {}; - - var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || ''); - var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || ''); - var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove); - - if (newOptions.preparationClasses) { - target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses); - delete newOptions.preparationClasses; - } - - // noop is basically when there is no callback; otherwise something has been set - var realDomOperation = target.domOperation !== noop ? target.domOperation : null; - - extend(target, newOptions); - - // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this. - if (realDomOperation) { - target.domOperation = realDomOperation; - } - - if (classes.addClass) { - target.addClass = classes.addClass; - } else { - target.addClass = null; - } - - if (classes.removeClass) { - target.removeClass = classes.removeClass; - } else { - target.removeClass = null; - } - - oldAnimation.addClass = target.addClass; - oldAnimation.removeClass = target.removeClass; - - return target; -} - -function resolveElementClasses(existing, toAdd, toRemove) { - var ADD_CLASS = 1; - var REMOVE_CLASS = -1; - - var flags = {}; - existing = splitClassesToLookup(existing); - - toAdd = splitClassesToLookup(toAdd); - forEach(toAdd, function(value, key) { - flags[key] = ADD_CLASS; - }); - - toRemove = splitClassesToLookup(toRemove); - forEach(toRemove, function(value, key) { - flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS; - }); - - var classes = { - addClass: '', - removeClass: '' - }; - - forEach(flags, function(val, klass) { - var prop, allow; - if (val === ADD_CLASS) { - prop = 'addClass'; - allow = !existing[klass]; - } else if (val === REMOVE_CLASS) { - prop = 'removeClass'; - allow = existing[klass]; - } - if (allow) { - if (classes[prop].length) { - classes[prop] += ' '; - } - classes[prop] += klass; - } - }); - - function splitClassesToLookup(classes) { - if (isString(classes)) { - classes = classes.split(' '); - } - - var obj = {}; - forEach(classes, function(klass) { - // sometimes the split leaves empty string values - // incase extra spaces were applied to the options - if (klass.length) { - obj[klass] = true; - } - }); - return obj; - } - - return classes; -} - -function getDomNode(element) { - return (element instanceof angular.element) ? element[0] : element; -} - -function applyGeneratedPreparationClasses(element, event, options) { - var classes = ''; - if (event) { - classes = pendClasses(event, EVENT_CLASS_PREFIX, true); - } - if (options.addClass) { - classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX)); - } - if (options.removeClass) { - classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX)); - } - if (classes.length) { - options.preparationClasses = classes; - element.addClass(classes); - } -} - -function clearGeneratedClasses(element, options) { - if (options.preparationClasses) { - element.removeClass(options.preparationClasses); - options.preparationClasses = null; - } - if (options.activeClasses) { - element.removeClass(options.activeClasses); - options.activeClasses = null; - } -} - -function blockTransitions(node, duration) { - // we use a negative delay value since it performs blocking - // yet it doesn't kill any existing transitions running on the - // same element which makes this safe for class-based animations - var value = duration ? '-' + duration + 's' : ''; - applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]); - return [TRANSITION_DELAY_PROP, value]; -} - -function blockKeyframeAnimations(node, applyBlock) { - var value = applyBlock ? 'paused' : ''; - var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY; - applyInlineStyle(node, [key, value]); - return [key, value]; -} - -function applyInlineStyle(node, styleTuple) { - var prop = styleTuple[0]; - var value = styleTuple[1]; - node.style[prop] = value; -} - -function concatWithSpace(a,b) { - if (!a) return b; - if (!b) return a; - return a + ' ' + b; -} - -var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) { - var queue, cancelFn; - - function scheduler(tasks) { - // we make a copy since RAFScheduler mutates the state - // of the passed in array variable and this would be difficult - // to track down on the outside code - queue = queue.concat(tasks); - nextTick(); - } - - queue = scheduler.queue = []; - - /* waitUntilQuiet does two things: - * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through - * 2. It will delay the next wave of tasks from running until the quiet `fn` has run. - * - * The motivation here is that animation code can request more time from the scheduler - * before the next wave runs. This allows for certain DOM properties such as classes to - * be resolved in time for the next animation to run. - */ - scheduler.waitUntilQuiet = function(fn) { - if (cancelFn) cancelFn(); - - cancelFn = $$rAF(function() { - cancelFn = null; - fn(); - nextTick(); - }); - }; - - return scheduler; - - function nextTick() { - if (!queue.length) return; - - var items = queue.shift(); - for (var i = 0; i < items.length; i++) { - items[i](); - } - - if (!cancelFn) { - $$rAF(function() { - if (!cancelFn) nextTick(); - }); - } - } -}]; - -/** - * @ngdoc directive - * @name ngAnimateChildren - * @restrict AE - * @element ANY - * - * @description - * - * ngAnimateChildren allows you to specify that children of this element should animate even if any - * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move` - * (structural) animation, child elements that also have an active structural animation are not animated. - * - * Note that even if `ngAnimteChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation). - * - * - * @param {string} ngAnimateChildren If the value is empty, `true` or `on`, - * then child animations are allowed. If the value is `false`, child animations are not allowed. - * - * @example - * - -
- - -
-
-
- List of items: -
Item {{item}}
-
-
-
-
- - - .container.ng-enter, - .container.ng-leave { - transition: all ease 1.5s; - } - - .container.ng-enter, - .container.ng-leave-active { - opacity: 0; - } - - .container.ng-leave, - .container.ng-enter-active { - opacity: 1; - } - - .item { - background: firebrick; - color: #FFF; - margin-bottom: 10px; - } - - .item.ng-enter, - .item.ng-leave { - transition: transform 1.5s ease; - } - - .item.ng-enter { - transform: translateX(50px); - } - - .item.ng-enter-active { - transform: translateX(0); - } - - - angular.module('ngAnimateChildren', ['ngAnimate']) - .controller('mainController', function() { - this.animateChildren = false; - this.enterElement = false; - }); - -
- */ -var $$AnimateChildrenDirective = ['$interpolate', function($interpolate) { - return { - link: function(scope, element, attrs) { - var val = attrs.ngAnimateChildren; - if (angular.isString(val) && val.length === 0) { //empty attribute - element.data(NG_ANIMATE_CHILDREN_DATA, true); - } else { - // Interpolate and set the value, so that it is available to - // animations that run right after compilation - setData($interpolate(val)(scope)); - attrs.$observe('ngAnimateChildren', setData); - } - - function setData(value) { - value = value === 'on' || value === 'true'; - element.data(NG_ANIMATE_CHILDREN_DATA, value); - } - } - }; -}]; - -var ANIMATE_TIMER_KEY = '$$animateCss'; - -/** - * @ngdoc service - * @name $animateCss - * @kind object - * - * @description - * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes - * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT - * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or - * directives to create more complex animations that can be purely driven using CSS code. - * - * Note that only browsers that support CSS transitions and/or keyframe animations are capable of - * rendering animations triggered via `$animateCss` (bad news for IE9 and lower). - * - * ## Usage - * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that - * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however, - * any automatic control over cancelling animations and/or preventing animations from being run on - * child elements will not be handled by Angular. For this to work as expected, please use `$animate` to - * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger - * the CSS animation. - * - * The example below shows how we can create a folding animation on an element using `ng-if`: - * - * ```html - * - *
- * This element will go BOOM - *
- * - * ``` - * - * Now we create the **JavaScript animation** that will trigger the CSS transition: - * - * ```js - * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { - * return { - * enter: function(element, doneFn) { - * var height = element[0].offsetHeight; - * return $animateCss(element, { - * from: { height:'0px' }, - * to: { height:height + 'px' }, - * duration: 1 // one second - * }); - * } - * } - * }]); - * ``` - * - * ## More Advanced Uses - * - * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks - * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code. - * - * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation, - * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with - * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order - * to provide a working animation that will run in CSS. - * - * The example below showcases a more advanced version of the `.fold-animation` from the example above: - * - * ```js - * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { - * return { - * enter: function(element, doneFn) { - * var height = element[0].offsetHeight; - * return $animateCss(element, { - * addClass: 'red large-text pulse-twice', - * easing: 'ease-out', - * from: { height:'0px' }, - * to: { height:height + 'px' }, - * duration: 1 // one second - * }); - * } - * } - * }]); - * ``` - * - * Since we're adding/removing CSS classes then the CSS transition will also pick those up: - * - * ```css - * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code, - * the CSS classes below will be transitioned despite them being defined as regular CSS classes */ - * .red { background:red; } - * .large-text { font-size:20px; } - * - * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */ - * .pulse-twice { - * animation: 0.5s pulse linear 2; - * -webkit-animation: 0.5s pulse linear 2; - * } - * - * @keyframes pulse { - * from { transform: scale(0.5); } - * to { transform: scale(1.5); } - * } - * - * @-webkit-keyframes pulse { - * from { -webkit-transform: scale(0.5); } - * to { -webkit-transform: scale(1.5); } - * } - * ``` - * - * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen. - * - * ## How the Options are handled - * - * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation - * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline - * styles using the `from` and `to` properties. - * - * ```js - * var animator = $animateCss(element, { - * from: { background:'red' }, - * to: { background:'blue' } - * }); - * animator.start(); - * ``` - * - * ```css - * .rotating-animation { - * animation:0.5s rotate linear; - * -webkit-animation:0.5s rotate linear; - * } - * - * @keyframes rotate { - * from { transform: rotate(0deg); } - * to { transform: rotate(360deg); } - * } - * - * @-webkit-keyframes rotate { - * from { -webkit-transform: rotate(0deg); } - * to { -webkit-transform: rotate(360deg); } - * } - * ``` - * - * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is - * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition - * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition - * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied - * and spread across the transition and keyframe animation. - * - * ## What is returned - * - * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually - * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are - * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties: - * - * ```js - * var animator = $animateCss(element, { ... }); - * ``` - * - * Now what do the contents of our `animator` variable look like: - * - * ```js - * { - * // starts the animation - * start: Function, - * - * // ends (aborts) the animation - * end: Function - * } - * ``` - * - * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends. - * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been - * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties - * and that changing them will not reconfigure the parameters of the animation. - * - * ### runner.done() vs runner.then() - * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the - * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**. - * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()` - * unless you really need a digest to kick off afterwards. - * - * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss - * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code). - * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works. - * - * @param {DOMElement} element the element that will be animated - * @param {object} options the animation-related options that will be applied during the animation - * - * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied - * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.) - * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and - * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted. - * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both). - * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`). - * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`). - * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation. - * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition. - * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation. - * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation. - * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0` - * is provided then the animation will be skipped entirely. - * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is - * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value - * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same - * CSS delay value. - * * `stagger` - A numeric time value representing the delay between successively animated elements - * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.}) - * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a - * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`) - * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.) - * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once - * the animation is closed. This is useful for when the styles are used purely for the sake of - * the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation). - * By default this value is set to `false`. - * - * @return {object} an object with start and end methods and details about the animation. - * - * * `start` - The method to start the animation. This will return a `Promise` when called. - * * `end` - This method will cancel the animation and remove all applied CSS classes and styles. - */ -var ONE_SECOND = 1000; -var BASE_TEN = 10; - -var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3; -var CLOSING_TIME_BUFFER = 1.5; - -var DETECT_CSS_PROPERTIES = { - transitionDuration: TRANSITION_DURATION_PROP, - transitionDelay: TRANSITION_DELAY_PROP, - transitionProperty: TRANSITION_PROP + PROPERTY_KEY, - animationDuration: ANIMATION_DURATION_PROP, - animationDelay: ANIMATION_DELAY_PROP, - animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY -}; - -var DETECT_STAGGER_CSS_PROPERTIES = { - transitionDuration: TRANSITION_DURATION_PROP, - transitionDelay: TRANSITION_DELAY_PROP, - animationDuration: ANIMATION_DURATION_PROP, - animationDelay: ANIMATION_DELAY_PROP -}; - -function getCssKeyframeDurationStyle(duration) { - return [ANIMATION_DURATION_PROP, duration + 's']; -} - -function getCssDelayStyle(delay, isKeyframeAnimation) { - var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP; - return [prop, delay + 's']; -} - -function computeCssStyles($window, element, properties) { - var styles = Object.create(null); - var detectedStyles = $window.getComputedStyle(element) || {}; - forEach(properties, function(formalStyleName, actualStyleName) { - var val = detectedStyles[formalStyleName]; - if (val) { - var c = val.charAt(0); - - // only numerical-based values have a negative sign or digit as the first value - if (c === '-' || c === '+' || c >= 0) { - val = parseMaxTime(val); - } - - // by setting this to null in the event that the delay is not set or is set directly as 0 - // then we can still allow for negative values to be used later on and not mistake this - // value for being greater than any other negative value. - if (val === 0) { - val = null; - } - styles[actualStyleName] = val; - } - }); - - return styles; -} - -function parseMaxTime(str) { - var maxValue = 0; - var values = str.split(/\s*,\s*/); - forEach(values, function(value) { - // it's always safe to consider only second values and omit `ms` values since - // getComputedStyle will always handle the conversion for us - if (value.charAt(value.length - 1) == 's') { - value = value.substring(0, value.length - 1); - } - value = parseFloat(value) || 0; - maxValue = maxValue ? Math.max(value, maxValue) : value; - }); - return maxValue; -} - -function truthyTimingValue(val) { - return val === 0 || val != null; -} - -function getCssTransitionDurationStyle(duration, applyOnlyDuration) { - var style = TRANSITION_PROP; - var value = duration + 's'; - if (applyOnlyDuration) { - style += DURATION_KEY; - } else { - value += ' linear all'; - } - return [style, value]; -} - -function createLocalCacheLookup() { - var cache = Object.create(null); - return { - flush: function() { - cache = Object.create(null); - }, - - count: function(key) { - var entry = cache[key]; - return entry ? entry.total : 0; - }, - - get: function(key) { - var entry = cache[key]; - return entry && entry.value; - }, - - put: function(key, value) { - if (!cache[key]) { - cache[key] = { total: 1, value: value }; - } else { - cache[key].total++; - } - } - }; -} - -// we do not reassign an already present style value since -// if we detect the style property value again we may be -// detecting styles that were added via the `from` styles. -// We make use of `isDefined` here since an empty string -// or null value (which is what getPropertyValue will return -// for a non-existing style) will still be marked as a valid -// value for the style (a falsy value implies that the style -// is to be removed at the end of the animation). If we had a simple -// "OR" statement then it would not be enough to catch that. -function registerRestorableStyles(backup, node, properties) { - forEach(properties, function(prop) { - backup[prop] = isDefined(backup[prop]) - ? backup[prop] - : node.style.getPropertyValue(prop); - }); -} - -var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { - var gcsLookup = createLocalCacheLookup(); - var gcsStaggerLookup = createLocalCacheLookup(); - - this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', - '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue', - function($window, $$jqLite, $$AnimateRunner, $timeout, - $$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) { - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - var parentCounter = 0; - function gcsHashFn(node, extraClasses) { - var KEY = "$$ngAnimateParentKey"; - var parentNode = node.parentNode; - var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter); - return parentID + '-' + node.getAttribute('class') + '-' + extraClasses; - } - - function computeCachedCssStyles(node, className, cacheKey, properties) { - var timings = gcsLookup.get(cacheKey); - - if (!timings) { - timings = computeCssStyles($window, node, properties); - if (timings.animationIterationCount === 'infinite') { - timings.animationIterationCount = 1; - } - } - - // we keep putting this in multiple times even though the value and the cacheKey are the same - // because we're keeping an internal tally of how many duplicate animations are detected. - gcsLookup.put(cacheKey, timings); - return timings; - } - - function computeCachedCssStaggerStyles(node, className, cacheKey, properties) { - var stagger; - - // if we have one or more existing matches of matching elements - // containing the same parent + CSS styles (which is how cacheKey works) - // then staggering is possible - if (gcsLookup.count(cacheKey) > 0) { - stagger = gcsStaggerLookup.get(cacheKey); - - if (!stagger) { - var staggerClassName = pendClasses(className, '-stagger'); - - $$jqLite.addClass(node, staggerClassName); - - stagger = computeCssStyles($window, node, properties); - - // force the conversion of a null value to zero incase not set - stagger.animationDuration = Math.max(stagger.animationDuration, 0); - stagger.transitionDuration = Math.max(stagger.transitionDuration, 0); - - $$jqLite.removeClass(node, staggerClassName); - - gcsStaggerLookup.put(cacheKey, stagger); - } - } - - return stagger || {}; - } - - var cancelLastRAFRequest; - var rafWaitQueue = []; - function waitUntilQuiet(callback) { - rafWaitQueue.push(callback); - $$rAFScheduler.waitUntilQuiet(function() { - gcsLookup.flush(); - gcsStaggerLookup.flush(); - - // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable. - // PLEASE EXAMINE THE `$$forceReflow` service to understand why. - var pageWidth = $$forceReflow(); - - // we use a for loop to ensure that if the queue is changed - // during this looping then it will consider new requests - for (var i = 0; i < rafWaitQueue.length; i++) { - rafWaitQueue[i](pageWidth); - } - rafWaitQueue.length = 0; - }); - } - - function computeTimings(node, className, cacheKey) { - var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES); - var aD = timings.animationDelay; - var tD = timings.transitionDelay; - timings.maxDelay = aD && tD - ? Math.max(aD, tD) - : (aD || tD); - timings.maxDuration = Math.max( - timings.animationDuration * timings.animationIterationCount, - timings.transitionDuration); - - return timings; - } - - return function init(element, initialOptions) { - // all of the animation functions should create - // a copy of the options data, however, if a - // parent service has already created a copy then - // we should stick to using that - var options = initialOptions || {}; - if (!options.$$prepared) { - options = prepareAnimationOptions(copy(options)); - } - - var restoreStyles = {}; - var node = getDomNode(element); - if (!node - || !node.parentNode - || !$$animateQueue.enabled()) { - return closeAndReturnNoopAnimator(); - } - - var temporaryStyles = []; - var classes = element.attr('class'); - var styles = packageStyles(options); - var animationClosed; - var animationPaused; - var animationCompleted; - var runner; - var runnerHost; - var maxDelay; - var maxDelayTime; - var maxDuration; - var maxDurationTime; - var startTime; - var events = []; - - if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) { - return closeAndReturnNoopAnimator(); - } - - var method = options.event && isArray(options.event) - ? options.event.join(' ') - : options.event; - - var isStructural = method && options.structural; - var structuralClassName = ''; - var addRemoveClassName = ''; - - if (isStructural) { - structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true); - } else if (method) { - structuralClassName = method; - } - - if (options.addClass) { - addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX); - } - - if (options.removeClass) { - if (addRemoveClassName.length) { - addRemoveClassName += ' '; - } - addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX); - } - - // there may be a situation where a structural animation is combined together - // with CSS classes that need to resolve before the animation is computed. - // However this means that there is no explicit CSS code to block the animation - // from happening (by setting 0s none in the class name). If this is the case - // we need to apply the classes before the first rAF so we know to continue if - // there actually is a detected transition or keyframe animation - if (options.applyClassesEarly && addRemoveClassName.length) { - applyAnimationClasses(element, options); - } - - var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim(); - var fullClassName = classes + ' ' + preparationClasses; - var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX); - var hasToStyles = styles.to && Object.keys(styles.to).length > 0; - var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0; - - // there is no way we can trigger an animation if no styles and - // no classes are being applied which would then trigger a transition, - // unless there a is raw keyframe value that is applied to the element. - if (!containsKeyframeAnimation - && !hasToStyles - && !preparationClasses) { - return closeAndReturnNoopAnimator(); - } - - var cacheKey, stagger; - if (options.stagger > 0) { - var staggerVal = parseFloat(options.stagger); - stagger = { - transitionDelay: staggerVal, - animationDelay: staggerVal, - transitionDuration: 0, - animationDuration: 0 - }; - } else { - cacheKey = gcsHashFn(node, fullClassName); - stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES); - } - - if (!options.$$skipPreparationClasses) { - $$jqLite.addClass(element, preparationClasses); - } - - var applyOnlyDuration; - - if (options.transitionStyle) { - var transitionStyle = [TRANSITION_PROP, options.transitionStyle]; - applyInlineStyle(node, transitionStyle); - temporaryStyles.push(transitionStyle); - } - - if (options.duration >= 0) { - applyOnlyDuration = node.style[TRANSITION_PROP].length > 0; - var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration); - - // we set the duration so that it will be picked up by getComputedStyle later - applyInlineStyle(node, durationStyle); - temporaryStyles.push(durationStyle); - } - - if (options.keyframeStyle) { - var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle]; - applyInlineStyle(node, keyframeStyle); - temporaryStyles.push(keyframeStyle); - } - - var itemIndex = stagger - ? options.staggerIndex >= 0 - ? options.staggerIndex - : gcsLookup.count(cacheKey) - : 0; - - var isFirst = itemIndex === 0; - - // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY - // without causing any combination of transitions to kick in. By adding a negative delay value - // it forces the setup class' transition to end immediately. We later then remove the negative - // transition delay to allow for the transition to naturally do it's thing. The beauty here is - // that if there is no transition defined then nothing will happen and this will also allow - // other transitions to be stacked on top of each other without any chopping them out. - if (isFirst && !options.skipBlocking) { - blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE); - } - - var timings = computeTimings(node, fullClassName, cacheKey); - var relativeDelay = timings.maxDelay; - maxDelay = Math.max(relativeDelay, 0); - maxDuration = timings.maxDuration; - - var flags = {}; - flags.hasTransitions = timings.transitionDuration > 0; - flags.hasAnimations = timings.animationDuration > 0; - flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty == 'all'; - flags.applyTransitionDuration = hasToStyles && ( - (flags.hasTransitions && !flags.hasTransitionAll) - || (flags.hasAnimations && !flags.hasTransitions)); - flags.applyAnimationDuration = options.duration && flags.hasAnimations; - flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions); - flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations; - flags.recalculateTimingStyles = addRemoveClassName.length > 0; - - if (flags.applyTransitionDuration || flags.applyAnimationDuration) { - maxDuration = options.duration ? parseFloat(options.duration) : maxDuration; - - if (flags.applyTransitionDuration) { - flags.hasTransitions = true; - timings.transitionDuration = maxDuration; - applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0; - temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration)); - } - - if (flags.applyAnimationDuration) { - flags.hasAnimations = true; - timings.animationDuration = maxDuration; - temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration)); - } - } - - if (maxDuration === 0 && !flags.recalculateTimingStyles) { - return closeAndReturnNoopAnimator(); - } - - if (options.delay != null) { - var delayStyle; - if (typeof options.delay !== "boolean") { - delayStyle = parseFloat(options.delay); - // number in options.delay means we have to recalculate the delay for the closing timeout - maxDelay = Math.max(delayStyle, 0); - } - - if (flags.applyTransitionDelay) { - temporaryStyles.push(getCssDelayStyle(delayStyle)); - } - - if (flags.applyAnimationDelay) { - temporaryStyles.push(getCssDelayStyle(delayStyle, true)); - } - } - - // we need to recalculate the delay value since we used a pre-emptive negative - // delay value and the delay value is required for the final event checking. This - // property will ensure that this will happen after the RAF phase has passed. - if (options.duration == null && timings.transitionDuration > 0) { - flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst; - } - - maxDelayTime = maxDelay * ONE_SECOND; - maxDurationTime = maxDuration * ONE_SECOND; - if (!options.skipBlocking) { - flags.blockTransition = timings.transitionDuration > 0; - flags.blockKeyframeAnimation = timings.animationDuration > 0 && - stagger.animationDelay > 0 && - stagger.animationDuration === 0; - } - - if (options.from) { - if (options.cleanupStyles) { - registerRestorableStyles(restoreStyles, node, Object.keys(options.from)); - } - applyAnimationFromStyles(element, options); - } - - if (flags.blockTransition || flags.blockKeyframeAnimation) { - applyBlocking(maxDuration); - } else if (!options.skipBlocking) { - blockTransitions(node, false); - } - - // TODO(matsko): for 1.5 change this code to have an animator object for better debugging - return { - $$willAnimate: true, - end: endFn, - start: function() { - if (animationClosed) return; - - runnerHost = { - end: endFn, - cancel: cancelFn, - resume: null, //this will be set during the start() phase - pause: null - }; - - runner = new $$AnimateRunner(runnerHost); - - waitUntilQuiet(start); - - // we don't have access to pause/resume the animation - // since it hasn't run yet. AnimateRunner will therefore - // set noop functions for resume and pause and they will - // later be overridden once the animation is triggered - return runner; - } - }; - - function endFn() { - close(); - } - - function cancelFn() { - close(true); - } - - function close(rejected) { // jshint ignore:line - // if the promise has been called already then we shouldn't close - // the animation again - if (animationClosed || (animationCompleted && animationPaused)) return; - animationClosed = true; - animationPaused = false; - - if (!options.$$skipPreparationClasses) { - $$jqLite.removeClass(element, preparationClasses); - } - $$jqLite.removeClass(element, activeClasses); - - blockKeyframeAnimations(node, false); - blockTransitions(node, false); - - forEach(temporaryStyles, function(entry) { - // There is only one way to remove inline style properties entirely from elements. - // By using `removeProperty` this works, but we need to convert camel-cased CSS - // styles down to hyphenated values. - node.style[entry[0]] = ''; - }); - - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - - if (Object.keys(restoreStyles).length) { - forEach(restoreStyles, function(value, prop) { - value ? node.style.setProperty(prop, value) - : node.style.removeProperty(prop); - }); - } - - // the reason why we have this option is to allow a synchronous closing callback - // that is fired as SOON as the animation ends (when the CSS is removed) or if - // the animation never takes off at all. A good example is a leave animation since - // the element must be removed just after the animation is over or else the element - // will appear on screen for one animation frame causing an overbearing flicker. - if (options.onDone) { - options.onDone(); - } - - if (events && events.length) { - // Remove the transitionend / animationend listener(s) - element.off(events.join(' '), onAnimationProgress); - } - - //Cancel the fallback closing timeout and remove the timer data - var animationTimerData = element.data(ANIMATE_TIMER_KEY); - if (animationTimerData) { - $timeout.cancel(animationTimerData[0].timer); - element.removeData(ANIMATE_TIMER_KEY); - } - - // if the preparation function fails then the promise is not setup - if (runner) { - runner.complete(!rejected); - } - } - - function applyBlocking(duration) { - if (flags.blockTransition) { - blockTransitions(node, duration); - } - - if (flags.blockKeyframeAnimation) { - blockKeyframeAnimations(node, !!duration); - } - } - - function closeAndReturnNoopAnimator() { - runner = new $$AnimateRunner({ - end: endFn, - cancel: cancelFn - }); - - // should flush the cache animation - waitUntilQuiet(noop); - close(); - - return { - $$willAnimate: false, - start: function() { - return runner; - }, - end: endFn - }; - } - - function onAnimationProgress(event) { - event.stopPropagation(); - var ev = event.originalEvent || event; - - // we now always use `Date.now()` due to the recent changes with - // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info) - var timeStamp = ev.$manualTimeStamp || Date.now(); - - /* Firefox (or possibly just Gecko) likes to not round values up - * when a ms measurement is used for the animation */ - var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)); - - /* $manualTimeStamp is a mocked timeStamp value which is set - * within browserTrigger(). This is only here so that tests can - * mock animations properly. Real events fallback to event.timeStamp, - * or, if they don't, then a timeStamp is automatically created for them. - * We're checking to see if the timeStamp surpasses the expected delay, - * but we're using elapsedTime instead of the timeStamp on the 2nd - * pre-condition since animationPauseds sometimes close off early */ - if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { - // we set this flag to ensure that if the transition is paused then, when resumed, - // the animation will automatically close itself since transitions cannot be paused. - animationCompleted = true; - close(); - } - } - - function start() { - if (animationClosed) return; - if (!node.parentNode) { - close(); - return; - } - - // even though we only pause keyframe animations here the pause flag - // will still happen when transitions are used. Only the transition will - // not be paused since that is not possible. If the animation ends when - // paused then it will not complete until unpaused or cancelled. - var playPause = function(playAnimation) { - if (!animationCompleted) { - animationPaused = !playAnimation; - if (timings.animationDuration) { - var value = blockKeyframeAnimations(node, animationPaused); - animationPaused - ? temporaryStyles.push(value) - : removeFromArray(temporaryStyles, value); - } - } else if (animationPaused && playAnimation) { - animationPaused = false; - close(); - } - }; - - // checking the stagger duration prevents an accidentally cascade of the CSS delay style - // being inherited from the parent. If the transition duration is zero then we can safely - // rely that the delay value is an intentional stagger delay style. - var maxStagger = itemIndex > 0 - && ((timings.transitionDuration && stagger.transitionDuration === 0) || - (timings.animationDuration && stagger.animationDuration === 0)) - && Math.max(stagger.animationDelay, stagger.transitionDelay); - if (maxStagger) { - $timeout(triggerAnimationStart, - Math.floor(maxStagger * itemIndex * ONE_SECOND), - false); - } else { - triggerAnimationStart(); - } - - // this will decorate the existing promise runner with pause/resume methods - runnerHost.resume = function() { - playPause(true); - }; - - runnerHost.pause = function() { - playPause(false); - }; - - function triggerAnimationStart() { - // just incase a stagger animation kicks in when the animation - // itself was cancelled entirely - if (animationClosed) return; - - applyBlocking(false); - - forEach(temporaryStyles, function(entry) { - var key = entry[0]; - var value = entry[1]; - node.style[key] = value; - }); - - applyAnimationClasses(element, options); - $$jqLite.addClass(element, activeClasses); - - if (flags.recalculateTimingStyles) { - fullClassName = node.className + ' ' + preparationClasses; - cacheKey = gcsHashFn(node, fullClassName); - - timings = computeTimings(node, fullClassName, cacheKey); - relativeDelay = timings.maxDelay; - maxDelay = Math.max(relativeDelay, 0); - maxDuration = timings.maxDuration; - - if (maxDuration === 0) { - close(); - return; - } - - flags.hasTransitions = timings.transitionDuration > 0; - flags.hasAnimations = timings.animationDuration > 0; - } - - if (flags.applyAnimationDelay) { - relativeDelay = typeof options.delay !== "boolean" && truthyTimingValue(options.delay) - ? parseFloat(options.delay) - : relativeDelay; - - maxDelay = Math.max(relativeDelay, 0); - timings.animationDelay = relativeDelay; - delayStyle = getCssDelayStyle(relativeDelay, true); - temporaryStyles.push(delayStyle); - node.style[delayStyle[0]] = delayStyle[1]; - } - - maxDelayTime = maxDelay * ONE_SECOND; - maxDurationTime = maxDuration * ONE_SECOND; - - if (options.easing) { - var easeProp, easeVal = options.easing; - if (flags.hasTransitions) { - easeProp = TRANSITION_PROP + TIMING_KEY; - temporaryStyles.push([easeProp, easeVal]); - node.style[easeProp] = easeVal; - } - if (flags.hasAnimations) { - easeProp = ANIMATION_PROP + TIMING_KEY; - temporaryStyles.push([easeProp, easeVal]); - node.style[easeProp] = easeVal; - } - } - - if (timings.transitionDuration) { - events.push(TRANSITIONEND_EVENT); - } - - if (timings.animationDuration) { - events.push(ANIMATIONEND_EVENT); - } - - startTime = Date.now(); - var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime; - var endTime = startTime + timerTime; - - var animationsData = element.data(ANIMATE_TIMER_KEY) || []; - var setupFallbackTimer = true; - if (animationsData.length) { - var currentTimerData = animationsData[0]; - setupFallbackTimer = endTime > currentTimerData.expectedEndTime; - if (setupFallbackTimer) { - $timeout.cancel(currentTimerData.timer); - } else { - animationsData.push(close); - } - } - - if (setupFallbackTimer) { - var timer = $timeout(onAnimationExpired, timerTime, false); - animationsData[0] = { - timer: timer, - expectedEndTime: endTime - }; - animationsData.push(close); - element.data(ANIMATE_TIMER_KEY, animationsData); - } - - if (events.length) { - element.on(events.join(' '), onAnimationProgress); - } - - if (options.to) { - if (options.cleanupStyles) { - registerRestorableStyles(restoreStyles, node, Object.keys(options.to)); - } - applyAnimationToStyles(element, options); - } - } - - function onAnimationExpired() { - var animationsData = element.data(ANIMATE_TIMER_KEY); - - // this will be false in the event that the element was - // removed from the DOM (via a leave animation or something - // similar) - if (animationsData) { - for (var i = 1; i < animationsData.length; i++) { - animationsData[i](); - } - element.removeData(ANIMATE_TIMER_KEY); - } - } - } - }; - }]; -}]; - -var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) { - $$animationProvider.drivers.push('$$animateCssDriver'); - - var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim'; - var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor'; - - var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out'; - var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in'; - - function isDocumentFragment(node) { - return node.parentNode && node.parentNode.nodeType === 11; - } - - this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document', - function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) { - - // only browsers that support these properties can render animations - if (!$sniffer.animations && !$sniffer.transitions) return noop; - - var bodyNode = $document[0].body; - var rootNode = getDomNode($rootElement); - - var rootBodyElement = jqLite( - // this is to avoid using something that exists outside of the body - // we also special case the doc fragment case because our unit test code - // appends the $rootElement to the body after the app has been bootstrapped - isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode - ); - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - return function initDriverFn(animationDetails) { - return animationDetails.from && animationDetails.to - ? prepareFromToAnchorAnimation(animationDetails.from, - animationDetails.to, - animationDetails.classes, - animationDetails.anchors) - : prepareRegularAnimation(animationDetails); - }; - - function filterCssClasses(classes) { - //remove all the `ng-` stuff - return classes.replace(/\bng-\S+\b/g, ''); - } - - function getUniqueValues(a, b) { - if (isString(a)) a = a.split(' '); - if (isString(b)) b = b.split(' '); - return a.filter(function(val) { - return b.indexOf(val) === -1; - }).join(' '); - } - - function prepareAnchoredAnimation(classes, outAnchor, inAnchor) { - var clone = jqLite(getDomNode(outAnchor).cloneNode(true)); - var startingClasses = filterCssClasses(getClassVal(clone)); - - outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); - inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); - - clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME); - - rootBodyElement.append(clone); - - var animatorIn, animatorOut = prepareOutAnimation(); - - // the user may not end up using the `out` animation and - // only making use of the `in` animation or vice-versa. - // In either case we should allow this and not assume the - // animation is over unless both animations are not used. - if (!animatorOut) { - animatorIn = prepareInAnimation(); - if (!animatorIn) { - return end(); - } - } - - var startingAnimator = animatorOut || animatorIn; - - return { - start: function() { - var runner; - - var currentAnimation = startingAnimator.start(); - currentAnimation.done(function() { - currentAnimation = null; - if (!animatorIn) { - animatorIn = prepareInAnimation(); - if (animatorIn) { - currentAnimation = animatorIn.start(); - currentAnimation.done(function() { - currentAnimation = null; - end(); - runner.complete(); - }); - return currentAnimation; - } - } - // in the event that there is no `in` animation - end(); - runner.complete(); - }); - - runner = new $$AnimateRunner({ - end: endFn, - cancel: endFn - }); - - return runner; - - function endFn() { - if (currentAnimation) { - currentAnimation.end(); - } - } - } - }; - - function calculateAnchorStyles(anchor) { - var styles = {}; - - var coords = getDomNode(anchor).getBoundingClientRect(); - - // we iterate directly since safari messes up and doesn't return - // all the keys for the coords object when iterated - forEach(['width','height','top','left'], function(key) { - var value = coords[key]; - switch (key) { - case 'top': - value += bodyNode.scrollTop; - break; - case 'left': - value += bodyNode.scrollLeft; - break; - } - styles[key] = Math.floor(value) + 'px'; - }); - return styles; - } - - function prepareOutAnimation() { - var animator = $animateCss(clone, { - addClass: NG_OUT_ANCHOR_CLASS_NAME, - delay: true, - from: calculateAnchorStyles(outAnchor) - }); - - // read the comment within `prepareRegularAnimation` to understand - // why this check is necessary - return animator.$$willAnimate ? animator : null; - } - - function getClassVal(element) { - return element.attr('class') || ''; - } - - function prepareInAnimation() { - var endingClasses = filterCssClasses(getClassVal(inAnchor)); - var toAdd = getUniqueValues(endingClasses, startingClasses); - var toRemove = getUniqueValues(startingClasses, endingClasses); - - var animator = $animateCss(clone, { - to: calculateAnchorStyles(inAnchor), - addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd, - removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove, - delay: true - }); - - // read the comment within `prepareRegularAnimation` to understand - // why this check is necessary - return animator.$$willAnimate ? animator : null; - } - - function end() { - clone.remove(); - outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); - inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); - } - } - - function prepareFromToAnchorAnimation(from, to, classes, anchors) { - var fromAnimation = prepareRegularAnimation(from, noop); - var toAnimation = prepareRegularAnimation(to, noop); - - var anchorAnimations = []; - forEach(anchors, function(anchor) { - var outElement = anchor['out']; - var inElement = anchor['in']; - var animator = prepareAnchoredAnimation(classes, outElement, inElement); - if (animator) { - anchorAnimations.push(animator); - } - }); - - // no point in doing anything when there are no elements to animate - if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return; - - return { - start: function() { - var animationRunners = []; - - if (fromAnimation) { - animationRunners.push(fromAnimation.start()); - } - - if (toAnimation) { - animationRunners.push(toAnimation.start()); - } - - forEach(anchorAnimations, function(animation) { - animationRunners.push(animation.start()); - }); - - var runner = new $$AnimateRunner({ - end: endFn, - cancel: endFn // CSS-driven animations cannot be cancelled, only ended - }); - - $$AnimateRunner.all(animationRunners, function(status) { - runner.complete(status); - }); - - return runner; - - function endFn() { - forEach(animationRunners, function(runner) { - runner.end(); - }); - } - } - }; - } - - function prepareRegularAnimation(animationDetails) { - var element = animationDetails.element; - var options = animationDetails.options || {}; - - if (animationDetails.structural) { - options.event = animationDetails.event; - options.structural = true; - options.applyClassesEarly = true; - - // we special case the leave animation since we want to ensure that - // the element is removed as soon as the animation is over. Otherwise - // a flicker might appear or the element may not be removed at all - if (animationDetails.event === 'leave') { - options.onDone = options.domOperation; - } - } - - // We assign the preparationClasses as the actual animation event since - // the internals of $animateCss will just suffix the event token values - // with `-active` to trigger the animation. - if (options.preparationClasses) { - options.event = concatWithSpace(options.event, options.preparationClasses); - } - - var animator = $animateCss(element, options); - - // the driver lookup code inside of $$animation attempts to spawn a - // driver one by one until a driver returns a.$$willAnimate animator object. - // $animateCss will always return an object, however, it will pass in - // a flag as a hint as to whether an animation was detected or not - return animator.$$willAnimate ? animator : null; - } - }]; -}]; - -// TODO(matsko): use caching here to speed things up for detection -// TODO(matsko): add documentation -// by the time... - -var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) { - this.$get = ['$injector', '$$AnimateRunner', '$$jqLite', - function($injector, $$AnimateRunner, $$jqLite) { - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - // $animateJs(element, 'enter'); - return function(element, event, classes, options) { - var animationClosed = false; - - // the `classes` argument is optional and if it is not used - // then the classes will be resolved from the element's className - // property as well as options.addClass/options.removeClass. - if (arguments.length === 3 && isObject(classes)) { - options = classes; - classes = null; - } - - options = prepareAnimationOptions(options); - if (!classes) { - classes = element.attr('class') || ''; - if (options.addClass) { - classes += ' ' + options.addClass; - } - if (options.removeClass) { - classes += ' ' + options.removeClass; - } - } - - var classesToAdd = options.addClass; - var classesToRemove = options.removeClass; - - // the lookupAnimations function returns a series of animation objects that are - // matched up with one or more of the CSS classes. These animation objects are - // defined via the module.animation factory function. If nothing is detected then - // we don't return anything which then makes $animation query the next driver. - var animations = lookupAnimations(classes); - var before, after; - if (animations.length) { - var afterFn, beforeFn; - if (event == 'leave') { - beforeFn = 'leave'; - afterFn = 'afterLeave'; // TODO(matsko): get rid of this - } else { - beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1); - afterFn = event; - } - - if (event !== 'enter' && event !== 'move') { - before = packageAnimations(element, event, options, animations, beforeFn); - } - after = packageAnimations(element, event, options, animations, afterFn); - } - - // no matching animations - if (!before && !after) return; - - function applyOptions() { - options.domOperation(); - applyAnimationClasses(element, options); - } - - function close() { - animationClosed = true; - applyOptions(); - applyAnimationStyles(element, options); - } - - var runner; - - return { - $$willAnimate: true, - end: function() { - if (runner) { - runner.end(); - } else { - close(); - runner = new $$AnimateRunner(); - runner.complete(true); - } - return runner; - }, - start: function() { - if (runner) { - return runner; - } - - runner = new $$AnimateRunner(); - var closeActiveAnimations; - var chain = []; - - if (before) { - chain.push(function(fn) { - closeActiveAnimations = before(fn); - }); - } - - if (chain.length) { - chain.push(function(fn) { - applyOptions(); - fn(true); - }); - } else { - applyOptions(); - } - - if (after) { - chain.push(function(fn) { - closeActiveAnimations = after(fn); - }); - } - - runner.setHost({ - end: function() { - endAnimations(); - }, - cancel: function() { - endAnimations(true); - } - }); - - $$AnimateRunner.chain(chain, onComplete); - return runner; - - function onComplete(success) { - close(success); - runner.complete(success); - } - - function endAnimations(cancelled) { - if (!animationClosed) { - (closeActiveAnimations || noop)(cancelled); - onComplete(cancelled); - } - } - } - }; - - function executeAnimationFn(fn, element, event, options, onDone) { - var args; - switch (event) { - case 'animate': - args = [element, options.from, options.to, onDone]; - break; - - case 'setClass': - args = [element, classesToAdd, classesToRemove, onDone]; - break; - - case 'addClass': - args = [element, classesToAdd, onDone]; - break; - - case 'removeClass': - args = [element, classesToRemove, onDone]; - break; - - default: - args = [element, onDone]; - break; - } - - args.push(options); - - var value = fn.apply(fn, args); - if (value) { - if (isFunction(value.start)) { - value = value.start(); - } - - if (value instanceof $$AnimateRunner) { - value.done(onDone); - } else if (isFunction(value)) { - // optional onEnd / onCancel callback - return value; - } - } - - return noop; - } - - function groupEventedAnimations(element, event, options, animations, fnName) { - var operations = []; - forEach(animations, function(ani) { - var animation = ani[fnName]; - if (!animation) return; - - // note that all of these animations will run in parallel - operations.push(function() { - var runner; - var endProgressCb; - - var resolved = false; - var onAnimationComplete = function(rejected) { - if (!resolved) { - resolved = true; - (endProgressCb || noop)(rejected); - runner.complete(!rejected); - } - }; - - runner = new $$AnimateRunner({ - end: function() { - onAnimationComplete(); - }, - cancel: function() { - onAnimationComplete(true); - } - }); - - endProgressCb = executeAnimationFn(animation, element, event, options, function(result) { - var cancelled = result === false; - onAnimationComplete(cancelled); - }); - - return runner; - }); - }); - - return operations; - } - - function packageAnimations(element, event, options, animations, fnName) { - var operations = groupEventedAnimations(element, event, options, animations, fnName); - if (operations.length === 0) { - var a,b; - if (fnName === 'beforeSetClass') { - a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass'); - b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass'); - } else if (fnName === 'setClass') { - a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass'); - b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass'); - } - - if (a) { - operations = operations.concat(a); - } - if (b) { - operations = operations.concat(b); - } - } - - if (operations.length === 0) return; - - // TODO(matsko): add documentation - return function startAnimation(callback) { - var runners = []; - if (operations.length) { - forEach(operations, function(animateFn) { - runners.push(animateFn()); - }); - } - - runners.length ? $$AnimateRunner.all(runners, callback) : callback(); - - return function endFn(reject) { - forEach(runners, function(runner) { - reject ? runner.cancel() : runner.end(); - }); - }; - }; - } - }; - - function lookupAnimations(classes) { - classes = isArray(classes) ? classes : classes.split(' '); - var matches = [], flagMap = {}; - for (var i=0; i < classes.length; i++) { - var klass = classes[i], - animationFactory = $animateProvider.$$registeredAnimations[klass]; - if (animationFactory && !flagMap[klass]) { - matches.push($injector.get(animationFactory)); - flagMap[klass] = true; - } - } - return matches; - } - }]; -}]; - -var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) { - $$animationProvider.drivers.push('$$animateJsDriver'); - this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) { - return function initDriverFn(animationDetails) { - if (animationDetails.from && animationDetails.to) { - var fromAnimation = prepareAnimation(animationDetails.from); - var toAnimation = prepareAnimation(animationDetails.to); - if (!fromAnimation && !toAnimation) return; - - return { - start: function() { - var animationRunners = []; - - if (fromAnimation) { - animationRunners.push(fromAnimation.start()); - } - - if (toAnimation) { - animationRunners.push(toAnimation.start()); - } - - $$AnimateRunner.all(animationRunners, done); - - var runner = new $$AnimateRunner({ - end: endFnFactory(), - cancel: endFnFactory() - }); - - return runner; - - function endFnFactory() { - return function() { - forEach(animationRunners, function(runner) { - // at this point we cannot cancel animations for groups just yet. 1.5+ - runner.end(); - }); - }; - } - - function done(status) { - runner.complete(status); - } - } - }; - } else { - return prepareAnimation(animationDetails); - } - }; - - function prepareAnimation(animationDetails) { - // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations - var element = animationDetails.element; - var event = animationDetails.event; - var options = animationDetails.options; - var classes = animationDetails.classes; - return $$animateJs(element, event, classes, options); - } - }]; -}]; - -var NG_ANIMATE_ATTR_NAME = 'data-ng-animate'; -var NG_ANIMATE_PIN_DATA = '$ngAnimatePin'; -var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { - var PRE_DIGEST_STATE = 1; - var RUNNING_STATE = 2; - var ONE_SPACE = ' '; - - var rules = this.rules = { - skip: [], - cancel: [], - join: [] - }; - - function makeTruthyCssClassMap(classString) { - if (!classString) { - return null; - } - - var keys = classString.split(ONE_SPACE); - var map = Object.create(null); - - forEach(keys, function(key) { - map[key] = true; - }); - return map; - } - - function hasMatchingClasses(newClassString, currentClassString) { - if (newClassString && currentClassString) { - var currentClassMap = makeTruthyCssClassMap(currentClassString); - return newClassString.split(ONE_SPACE).some(function(className) { - return currentClassMap[className]; - }); - } - } - - function isAllowed(ruleType, element, currentAnimation, previousAnimation) { - return rules[ruleType].some(function(fn) { - return fn(element, currentAnimation, previousAnimation); - }); - } - - function hasAnimationClasses(animation, and) { - var a = (animation.addClass || '').length > 0; - var b = (animation.removeClass || '').length > 0; - return and ? a && b : a || b; - } - - rules.join.push(function(element, newAnimation, currentAnimation) { - // if the new animation is class-based then we can just tack that on - return !newAnimation.structural && hasAnimationClasses(newAnimation); - }); - - rules.skip.push(function(element, newAnimation, currentAnimation) { - // there is no need to animate anything if no classes are being added and - // there is no structural animation that will be triggered - return !newAnimation.structural && !hasAnimationClasses(newAnimation); - }); - - rules.skip.push(function(element, newAnimation, currentAnimation) { - // why should we trigger a new structural animation if the element will - // be removed from the DOM anyway? - return currentAnimation.event == 'leave' && newAnimation.structural; - }); - - rules.skip.push(function(element, newAnimation, currentAnimation) { - // if there is an ongoing current animation then don't even bother running the class-based animation - return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural; - }); - - rules.cancel.push(function(element, newAnimation, currentAnimation) { - // there can never be two structural animations running at the same time - return currentAnimation.structural && newAnimation.structural; - }); - - rules.cancel.push(function(element, newAnimation, currentAnimation) { - // if the previous animation is already running, but the new animation will - // be triggered, but the new animation is structural - return currentAnimation.state === RUNNING_STATE && newAnimation.structural; - }); - - rules.cancel.push(function(element, newAnimation, currentAnimation) { - var nA = newAnimation.addClass; - var nR = newAnimation.removeClass; - var cA = currentAnimation.addClass; - var cR = currentAnimation.removeClass; - - // early detection to save the global CPU shortage :) - if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) { - return false; - } - - return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA); - }); - - this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$HashMap', - '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow', - function($$rAF, $rootScope, $rootElement, $document, $$HashMap, - $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow) { - - var activeAnimationsLookup = new $$HashMap(); - var disabledElementsLookup = new $$HashMap(); - var animationsEnabled = null; - - function postDigestTaskFactory() { - var postDigestCalled = false; - return function(fn) { - // we only issue a call to postDigest before - // it has first passed. This prevents any callbacks - // from not firing once the animation has completed - // since it will be out of the digest cycle. - if (postDigestCalled) { - fn(); - } else { - $rootScope.$$postDigest(function() { - postDigestCalled = true; - fn(); - }); - } - }; - } - - // Wait until all directive and route-related templates are downloaded and - // compiled. The $templateRequest.totalPendingRequests variable keeps track of - // all of the remote templates being currently downloaded. If there are no - // templates currently downloading then the watcher will still fire anyway. - var deregisterWatch = $rootScope.$watch( - function() { return $templateRequest.totalPendingRequests === 0; }, - function(isEmpty) { - if (!isEmpty) return; - deregisterWatch(); - - // Now that all templates have been downloaded, $animate will wait until - // the post digest queue is empty before enabling animations. By having two - // calls to $postDigest calls we can ensure that the flag is enabled at the - // very end of the post digest queue. Since all of the animations in $animate - // use $postDigest, it's important that the code below executes at the end. - // This basically means that the page is fully downloaded and compiled before - // any animations are triggered. - $rootScope.$$postDigest(function() { - $rootScope.$$postDigest(function() { - // we check for null directly in the event that the application already called - // .enabled() with whatever arguments that it provided it with - if (animationsEnabled === null) { - animationsEnabled = true; - } - }); - }); - } - ); - - var callbackRegistry = {}; - - // remember that the classNameFilter is set during the provider/config - // stage therefore we can optimize here and setup a helper function - var classNameFilter = $animateProvider.classNameFilter(); - var isAnimatableClassName = !classNameFilter - ? function() { return true; } - : function(className) { - return classNameFilter.test(className); - }; - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - function normalizeAnimationDetails(element, animation) { - return mergeAnimationDetails(element, animation, {}); - } - - // IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259. - var contains = Node.prototype.contains || function(arg) { - // jshint bitwise: false - return this === arg || !!(this.compareDocumentPosition(arg) & 16); - // jshint bitwise: true - }; - - function findCallbacks(parent, element, event) { - var targetNode = getDomNode(element); - var targetParentNode = getDomNode(parent); - - var matches = []; - var entries = callbackRegistry[event]; - if (entries) { - forEach(entries, function(entry) { - if (contains.call(entry.node, targetNode)) { - matches.push(entry.callback); - } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) { - matches.push(entry.callback); - } - }); - } - - return matches; - } - - return { - on: function(event, container, callback) { - var node = extractElementNode(container); - callbackRegistry[event] = callbackRegistry[event] || []; - callbackRegistry[event].push({ - node: node, - callback: callback - }); - }, - - off: function(event, container, callback) { - var entries = callbackRegistry[event]; - if (!entries) return; - - callbackRegistry[event] = arguments.length === 1 - ? null - : filterFromRegistry(entries, container, callback); - - function filterFromRegistry(list, matchContainer, matchCallback) { - var containerNode = extractElementNode(matchContainer); - return list.filter(function(entry) { - var isMatch = entry.node === containerNode && - (!matchCallback || entry.callback === matchCallback); - return !isMatch; - }); - } - }, - - pin: function(element, parentElement) { - assertArg(isElement(element), 'element', 'not an element'); - assertArg(isElement(parentElement), 'parentElement', 'not an element'); - element.data(NG_ANIMATE_PIN_DATA, parentElement); - }, - - push: function(element, event, options, domOperation) { - options = options || {}; - options.domOperation = domOperation; - return queueAnimation(element, event, options); - }, - - // this method has four signatures: - // () - global getter - // (bool) - global setter - // (element) - element getter - // (element, bool) - element setter - enabled: function(element, bool) { - var argCount = arguments.length; - - if (argCount === 0) { - // () - Global getter - bool = !!animationsEnabled; - } else { - var hasElement = isElement(element); - - if (!hasElement) { - // (bool) - Global setter - bool = animationsEnabled = !!element; - } else { - var node = getDomNode(element); - var recordExists = disabledElementsLookup.get(node); - - if (argCount === 1) { - // (element) - Element getter - bool = !recordExists; - } else { - // (element, bool) - Element setter - disabledElementsLookup.put(node, !bool); - } - } - } - - return bool; - } - }; - - function queueAnimation(element, event, initialOptions) { - // we always make a copy of the options since - // there should never be any side effects on - // the input data when running `$animateCss`. - var options = copy(initialOptions); - - var node, parent; - element = stripCommentsFromElement(element); - if (element) { - node = getDomNode(element); - parent = element.parent(); - } - - options = prepareAnimationOptions(options); - - // we create a fake runner with a working promise. - // These methods will become available after the digest has passed - var runner = new $$AnimateRunner(); - - // this is used to trigger callbacks in postDigest mode - var runInNextPostDigestOrNow = postDigestTaskFactory(); - - if (isArray(options.addClass)) { - options.addClass = options.addClass.join(' '); - } - - if (options.addClass && !isString(options.addClass)) { - options.addClass = null; - } - - if (isArray(options.removeClass)) { - options.removeClass = options.removeClass.join(' '); - } - - if (options.removeClass && !isString(options.removeClass)) { - options.removeClass = null; - } - - if (options.from && !isObject(options.from)) { - options.from = null; - } - - if (options.to && !isObject(options.to)) { - options.to = null; - } - - // there are situations where a directive issues an animation for - // a jqLite wrapper that contains only comment nodes... If this - // happens then there is no way we can perform an animation - if (!node) { - close(); - return runner; - } - - var className = [node.className, options.addClass, options.removeClass].join(' '); - if (!isAnimatableClassName(className)) { - close(); - return runner; - } - - var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; - - // this is a hard disable of all animations for the application or on - // the element itself, therefore there is no need to continue further - // past this point if not enabled - // Animations are also disabled if the document is currently hidden (page is not visible - // to the user), because browsers slow down or do not flush calls to requestAnimationFrame - var skipAnimations = !animationsEnabled || $document[0].hidden || disabledElementsLookup.get(node); - var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {}; - var hasExistingAnimation = !!existingAnimation.state; - - // there is no point in traversing the same collection of parent ancestors if a followup - // animation will be run on the same element that already did all that checking work - if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state != PRE_DIGEST_STATE)) { - skipAnimations = !areAnimationsAllowed(element, parent, event); - } - - if (skipAnimations) { - close(); - return runner; - } - - if (isStructural) { - closeChildAnimations(element); - } - - var newAnimation = { - structural: isStructural, - element: element, - event: event, - addClass: options.addClass, - removeClass: options.removeClass, - close: close, - options: options, - runner: runner - }; - - if (hasExistingAnimation) { - var skipAnimationFlag = isAllowed('skip', element, newAnimation, existingAnimation); - if (skipAnimationFlag) { - if (existingAnimation.state === RUNNING_STATE) { - close(); - return runner; - } else { - mergeAnimationDetails(element, existingAnimation, newAnimation); - return existingAnimation.runner; - } - } - var cancelAnimationFlag = isAllowed('cancel', element, newAnimation, existingAnimation); - if (cancelAnimationFlag) { - if (existingAnimation.state === RUNNING_STATE) { - // this will end the animation right away and it is safe - // to do so since the animation is already running and the - // runner callback code will run in async - existingAnimation.runner.end(); - } else if (existingAnimation.structural) { - // this means that the animation is queued into a digest, but - // hasn't started yet. Therefore it is safe to run the close - // method which will call the runner methods in async. - existingAnimation.close(); - } else { - // this will merge the new animation options into existing animation options - mergeAnimationDetails(element, existingAnimation, newAnimation); - - return existingAnimation.runner; - } - } else { - // a joined animation means that this animation will take over the existing one - // so an example would involve a leave animation taking over an enter. Then when - // the postDigest kicks in the enter will be ignored. - var joinAnimationFlag = isAllowed('join', element, newAnimation, existingAnimation); - if (joinAnimationFlag) { - if (existingAnimation.state === RUNNING_STATE) { - normalizeAnimationDetails(element, newAnimation); - } else { - applyGeneratedPreparationClasses(element, isStructural ? event : null, options); - - event = newAnimation.event = existingAnimation.event; - options = mergeAnimationDetails(element, existingAnimation, newAnimation); - - //we return the same runner since only the option values of this animation will - //be fed into the `existingAnimation`. - return existingAnimation.runner; - } - } - } - } else { - // normalization in this case means that it removes redundant CSS classes that - // already exist (addClass) or do not exist (removeClass) on the element - normalizeAnimationDetails(element, newAnimation); - } - - // when the options are merged and cleaned up we may end up not having to do - // an animation at all, therefore we should check this before issuing a post - // digest callback. Structural animations will always run no matter what. - var isValidAnimation = newAnimation.structural; - if (!isValidAnimation) { - // animate (from/to) can be quickly checked first, otherwise we check if any classes are present - isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0) - || hasAnimationClasses(newAnimation); - } - - if (!isValidAnimation) { - close(); - clearElementAnimationState(element); - return runner; - } - - // the counter keeps track of cancelled animations - var counter = (existingAnimation.counter || 0) + 1; - newAnimation.counter = counter; - - markElementAnimationState(element, PRE_DIGEST_STATE, newAnimation); - - $rootScope.$$postDigest(function() { - var animationDetails = activeAnimationsLookup.get(node); - var animationCancelled = !animationDetails; - animationDetails = animationDetails || {}; - - // if addClass/removeClass is called before something like enter then the - // registered parent element may not be present. The code below will ensure - // that a final value for parent element is obtained - var parentElement = element.parent() || []; - - // animate/structural/class-based animations all have requirements. Otherwise there - // is no point in performing an animation. The parent node must also be set. - var isValidAnimation = parentElement.length > 0 - && (animationDetails.event === 'animate' - || animationDetails.structural - || hasAnimationClasses(animationDetails)); - - // this means that the previous animation was cancelled - // even if the follow-up animation is the same event - if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) { - // if another animation did not take over then we need - // to make sure that the domOperation and options are - // handled accordingly - if (animationCancelled) { - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - } - - // if the event changed from something like enter to leave then we do - // it, otherwise if it's the same then the end result will be the same too - if (animationCancelled || (isStructural && animationDetails.event !== event)) { - options.domOperation(); - runner.end(); - } - - // in the event that the element animation was not cancelled or a follow-up animation - // isn't allowed to animate from here then we need to clear the state of the element - // so that any future animations won't read the expired animation data. - if (!isValidAnimation) { - clearElementAnimationState(element); - } - - return; - } - - // this combined multiple class to addClass / removeClass into a setClass event - // so long as a structural event did not take over the animation - event = !animationDetails.structural && hasAnimationClasses(animationDetails, true) - ? 'setClass' - : animationDetails.event; - - markElementAnimationState(element, RUNNING_STATE); - var realRunner = $$animation(element, event, animationDetails.options); - - realRunner.done(function(status) { - close(!status); - var animationDetails = activeAnimationsLookup.get(node); - if (animationDetails && animationDetails.counter === counter) { - clearElementAnimationState(getDomNode(element)); - } - notifyProgress(runner, event, 'close', {}); - }); - - // this will update the runner's flow-control events based on - // the `realRunner` object. - runner.setHost(realRunner); - notifyProgress(runner, event, 'start', {}); - }); - - return runner; - - function notifyProgress(runner, event, phase, data) { - runInNextPostDigestOrNow(function() { - var callbacks = findCallbacks(parent, element, event); - if (callbacks.length) { - // do not optimize this call here to RAF because - // we don't know how heavy the callback code here will - // be and if this code is buffered then this can - // lead to a performance regression. - $$rAF(function() { - forEach(callbacks, function(callback) { - callback(element, phase, data); - }); - }); - } - }); - runner.progress(event, phase, data); - } - - function close(reject) { // jshint ignore:line - clearGeneratedClasses(element, options); - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - options.domOperation(); - runner.complete(!reject); - } - } - - function closeChildAnimations(element) { - var node = getDomNode(element); - var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']'); - forEach(children, function(child) { - var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME)); - var animationDetails = activeAnimationsLookup.get(child); - if (animationDetails) { - switch (state) { - case RUNNING_STATE: - animationDetails.runner.end(); - /* falls through */ - case PRE_DIGEST_STATE: - activeAnimationsLookup.remove(child); - break; - } - } - }); - } - - function clearElementAnimationState(element) { - var node = getDomNode(element); - node.removeAttribute(NG_ANIMATE_ATTR_NAME); - activeAnimationsLookup.remove(node); - } - - function isMatchingElement(nodeOrElmA, nodeOrElmB) { - return getDomNode(nodeOrElmA) === getDomNode(nodeOrElmB); - } - - /** - * This fn returns false if any of the following is true: - * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed - * b) a parent element has an ongoing structural animation, and animateChildren is false - * c) the element is not a child of the body - * d) the element is not a child of the $rootElement - */ - function areAnimationsAllowed(element, parentElement, event) { - var bodyElement = jqLite($document[0].body); - var bodyElementDetected = isMatchingElement(element, bodyElement) || element[0].nodeName === 'HTML'; - var rootElementDetected = isMatchingElement(element, $rootElement); - var parentAnimationDetected = false; - var animateChildren; - var elementDisabled = disabledElementsLookup.get(getDomNode(element)); - - var parentHost = element.data(NG_ANIMATE_PIN_DATA); - if (parentHost) { - parentElement = parentHost; - } - - while (parentElement && parentElement.length) { - if (!rootElementDetected) { - // angular doesn't want to attempt to animate elements outside of the application - // therefore we need to ensure that the rootElement is an ancestor of the current element - rootElementDetected = isMatchingElement(parentElement, $rootElement); - } - - var parentNode = parentElement[0]; - if (parentNode.nodeType !== ELEMENT_NODE) { - // no point in inspecting the #document element - break; - } - - var details = activeAnimationsLookup.get(parentNode) || {}; - // either an enter, leave or move animation will commence - // therefore we can't allow any animations to take place - // but if a parent animation is class-based then that's ok - if (!parentAnimationDetected) { - var parentElementDisabled = disabledElementsLookup.get(parentNode); - - if (parentElementDisabled === true && elementDisabled !== false) { - // disable animations if the user hasn't explicitly enabled animations on the - // current element - elementDisabled = true; - // element is disabled via parent element, no need to check anything else - break; - } else if (parentElementDisabled === false) { - elementDisabled = false; - } - parentAnimationDetected = details.structural; - } - - if (isUndefined(animateChildren) || animateChildren === true) { - var value = parentElement.data(NG_ANIMATE_CHILDREN_DATA); - if (isDefined(value)) { - animateChildren = value; - } - } - - // there is no need to continue traversing at this point - if (parentAnimationDetected && animateChildren === false) break; - - if (!bodyElementDetected) { - // we also need to ensure that the element is or will be a part of the body element - // otherwise it is pointless to even issue an animation to be rendered - bodyElementDetected = isMatchingElement(parentElement, bodyElement); - } - - if (bodyElementDetected && rootElementDetected) { - // If both body and root have been found, any other checks are pointless, - // as no animation data should live outside the application - break; - } - - if (!rootElementDetected) { - // If no rootElement is detected, check if the parentElement is pinned to another element - parentHost = parentElement.data(NG_ANIMATE_PIN_DATA); - if (parentHost) { - // The pin target element becomes the next parent element - parentElement = parentHost; - continue; - } - } - - parentElement = parentElement.parent(); - } - - var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true; - return allowAnimation && rootElementDetected && bodyElementDetected; - } - - function markElementAnimationState(element, state, details) { - details = details || {}; - details.state = state; - - var node = getDomNode(element); - node.setAttribute(NG_ANIMATE_ATTR_NAME, state); - - var oldValue = activeAnimationsLookup.get(node); - var newValue = oldValue - ? extend(oldValue, details) - : details; - activeAnimationsLookup.put(node, newValue); - } - }]; -}]; - -var $$AnimationProvider = ['$animateProvider', function($animateProvider) { - var NG_ANIMATE_REF_ATTR = 'ng-animate-ref'; - - var drivers = this.drivers = []; - - var RUNNER_STORAGE_KEY = '$$animationRunner'; - - function setRunner(element, runner) { - element.data(RUNNER_STORAGE_KEY, runner); - } - - function removeRunner(element) { - element.removeData(RUNNER_STORAGE_KEY); - } - - function getRunner(element) { - return element.data(RUNNER_STORAGE_KEY); - } - - this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$HashMap', '$$rAFScheduler', - function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$HashMap, $$rAFScheduler) { - - var animationQueue = []; - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - function sortAnimations(animations) { - var tree = { children: [] }; - var i, lookup = new $$HashMap(); - - // this is done first beforehand so that the hashmap - // is filled with a list of the elements that will be animated - for (i = 0; i < animations.length; i++) { - var animation = animations[i]; - lookup.put(animation.domNode, animations[i] = { - domNode: animation.domNode, - fn: animation.fn, - children: [] - }); - } - - for (i = 0; i < animations.length; i++) { - processNode(animations[i]); - } - - return flatten(tree); - - function processNode(entry) { - if (entry.processed) return entry; - entry.processed = true; - - var elementNode = entry.domNode; - var parentNode = elementNode.parentNode; - lookup.put(elementNode, entry); - - var parentEntry; - while (parentNode) { - parentEntry = lookup.get(parentNode); - if (parentEntry) { - if (!parentEntry.processed) { - parentEntry = processNode(parentEntry); - } - break; - } - parentNode = parentNode.parentNode; - } - - (parentEntry || tree).children.push(entry); - return entry; - } - - function flatten(tree) { - var result = []; - var queue = []; - var i; - - for (i = 0; i < tree.children.length; i++) { - queue.push(tree.children[i]); - } - - var remainingLevelEntries = queue.length; - var nextLevelEntries = 0; - var row = []; - - for (i = 0; i < queue.length; i++) { - var entry = queue[i]; - if (remainingLevelEntries <= 0) { - remainingLevelEntries = nextLevelEntries; - nextLevelEntries = 0; - result.push(row); - row = []; - } - row.push(entry.fn); - entry.children.forEach(function(childEntry) { - nextLevelEntries++; - queue.push(childEntry); - }); - remainingLevelEntries--; - } - - if (row.length) { - result.push(row); - } - - return result; - } - } - - // TODO(matsko): document the signature in a better way - return function(element, event, options) { - options = prepareAnimationOptions(options); - var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; - - // there is no animation at the current moment, however - // these runner methods will get later updated with the - // methods leading into the driver's end/cancel methods - // for now they just stop the animation from starting - var runner = new $$AnimateRunner({ - end: function() { close(); }, - cancel: function() { close(true); } - }); - - if (!drivers.length) { - close(); - return runner; - } - - setRunner(element, runner); - - var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass)); - var tempClasses = options.tempClasses; - if (tempClasses) { - classes += ' ' + tempClasses; - options.tempClasses = null; - } - - var prepareClassName; - if (isStructural) { - prepareClassName = 'ng-' + event + PREPARE_CLASS_SUFFIX; - $$jqLite.addClass(element, prepareClassName); - } - - animationQueue.push({ - // this data is used by the postDigest code and passed into - // the driver step function - element: element, - classes: classes, - event: event, - structural: isStructural, - options: options, - beforeStart: beforeStart, - close: close - }); - - element.on('$destroy', handleDestroyedElement); - - // we only want there to be one function called within the post digest - // block. This way we can group animations for all the animations that - // were apart of the same postDigest flush call. - if (animationQueue.length > 1) return runner; - - $rootScope.$$postDigest(function() { - var animations = []; - forEach(animationQueue, function(entry) { - // the element was destroyed early on which removed the runner - // form its storage. This means we can't animate this element - // at all and it already has been closed due to destruction. - if (getRunner(entry.element)) { - animations.push(entry); - } else { - entry.close(); - } - }); - - // now any future animations will be in another postDigest - animationQueue.length = 0; - - var groupedAnimations = groupAnimations(animations); - var toBeSortedAnimations = []; - - forEach(groupedAnimations, function(animationEntry) { - toBeSortedAnimations.push({ - domNode: getDomNode(animationEntry.from ? animationEntry.from.element : animationEntry.element), - fn: function triggerAnimationStart() { - // it's important that we apply the `ng-animate` CSS class and the - // temporary classes before we do any driver invoking since these - // CSS classes may be required for proper CSS detection. - animationEntry.beforeStart(); - - var startAnimationFn, closeFn = animationEntry.close; - - // in the event that the element was removed before the digest runs or - // during the RAF sequencing then we should not trigger the animation. - var targetElement = animationEntry.anchors - ? (animationEntry.from.element || animationEntry.to.element) - : animationEntry.element; - - if (getRunner(targetElement)) { - var operation = invokeFirstDriver(animationEntry); - if (operation) { - startAnimationFn = operation.start; - } - } - - if (!startAnimationFn) { - closeFn(); - } else { - var animationRunner = startAnimationFn(); - animationRunner.done(function(status) { - closeFn(!status); - }); - updateAnimationRunners(animationEntry, animationRunner); - } - } - }); - }); - - // we need to sort each of the animations in order of parent to child - // relationships. This ensures that the child classes are applied at the - // right time. - $$rAFScheduler(sortAnimations(toBeSortedAnimations)); - }); - - return runner; - - // TODO(matsko): change to reference nodes - function getAnchorNodes(node) { - var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']'; - var items = node.hasAttribute(NG_ANIMATE_REF_ATTR) - ? [node] - : node.querySelectorAll(SELECTOR); - var anchors = []; - forEach(items, function(node) { - var attr = node.getAttribute(NG_ANIMATE_REF_ATTR); - if (attr && attr.length) { - anchors.push(node); - } - }); - return anchors; - } - - function groupAnimations(animations) { - var preparedAnimations = []; - var refLookup = {}; - forEach(animations, function(animation, index) { - var element = animation.element; - var node = getDomNode(element); - var event = animation.event; - var enterOrMove = ['enter', 'move'].indexOf(event) >= 0; - var anchorNodes = animation.structural ? getAnchorNodes(node) : []; - - if (anchorNodes.length) { - var direction = enterOrMove ? 'to' : 'from'; - - forEach(anchorNodes, function(anchor) { - var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR); - refLookup[key] = refLookup[key] || {}; - refLookup[key][direction] = { - animationID: index, - element: jqLite(anchor) - }; - }); - } else { - preparedAnimations.push(animation); - } - }); - - var usedIndicesLookup = {}; - var anchorGroups = {}; - forEach(refLookup, function(operations, key) { - var from = operations.from; - var to = operations.to; - - if (!from || !to) { - // only one of these is set therefore we can't have an - // anchor animation since all three pieces are required - var index = from ? from.animationID : to.animationID; - var indexKey = index.toString(); - if (!usedIndicesLookup[indexKey]) { - usedIndicesLookup[indexKey] = true; - preparedAnimations.push(animations[index]); - } - return; - } - - var fromAnimation = animations[from.animationID]; - var toAnimation = animations[to.animationID]; - var lookupKey = from.animationID.toString(); - if (!anchorGroups[lookupKey]) { - var group = anchorGroups[lookupKey] = { - structural: true, - beforeStart: function() { - fromAnimation.beforeStart(); - toAnimation.beforeStart(); - }, - close: function() { - fromAnimation.close(); - toAnimation.close(); - }, - classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes), - from: fromAnimation, - to: toAnimation, - anchors: [] // TODO(matsko): change to reference nodes - }; - - // the anchor animations require that the from and to elements both have at least - // one shared CSS class which effectively marries the two elements together to use - // the same animation driver and to properly sequence the anchor animation. - if (group.classes.length) { - preparedAnimations.push(group); - } else { - preparedAnimations.push(fromAnimation); - preparedAnimations.push(toAnimation); - } - } - - anchorGroups[lookupKey].anchors.push({ - 'out': from.element, 'in': to.element - }); - }); - - return preparedAnimations; - } - - function cssClassesIntersection(a,b) { - a = a.split(' '); - b = b.split(' '); - var matches = []; - - for (var i = 0; i < a.length; i++) { - var aa = a[i]; - if (aa.substring(0,3) === 'ng-') continue; - - for (var j = 0; j < b.length; j++) { - if (aa === b[j]) { - matches.push(aa); - break; - } - } - } - - return matches.join(' '); - } - - function invokeFirstDriver(animationDetails) { - // we loop in reverse order since the more general drivers (like CSS and JS) - // may attempt more elements, but custom drivers are more particular - for (var i = drivers.length - 1; i >= 0; i--) { - var driverName = drivers[i]; - if (!$injector.has(driverName)) continue; // TODO(matsko): remove this check - - var factory = $injector.get(driverName); - var driver = factory(animationDetails); - if (driver) { - return driver; - } - } - } - - function beforeStart() { - element.addClass(NG_ANIMATE_CLASSNAME); - if (tempClasses) { - $$jqLite.addClass(element, tempClasses); - } - if (prepareClassName) { - $$jqLite.removeClass(element, prepareClassName); - prepareClassName = null; - } - } - - function updateAnimationRunners(animation, newRunner) { - if (animation.from && animation.to) { - update(animation.from.element); - update(animation.to.element); - } else { - update(animation.element); - } - - function update(element) { - getRunner(element).setHost(newRunner); - } - } - - function handleDestroyedElement() { - var runner = getRunner(element); - if (runner && (event !== 'leave' || !options.$$domOperationFired)) { - runner.end(); - } - } - - function close(rejected) { // jshint ignore:line - element.off('$destroy', handleDestroyedElement); - removeRunner(element); - - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - options.domOperation(); - - if (tempClasses) { - $$jqLite.removeClass(element, tempClasses); - } - - element.removeClass(NG_ANIMATE_CLASSNAME); - runner.complete(!rejected); - } - }; - }]; -}]; - -/** - * @ngdoc directive - * @name ngAnimateSwap - * @restrict A - * @scope - * - * @description - * - * ngAnimateSwap is a animation-oriented directive that allows for the container to - * be removed and entered in whenever the associated expression changes. A - * common usecase for this directive is a rotating banner component which - * contains one image being present at a time. When the active image changes - * then the old image will perform a `leave` animation and the new element - * will be inserted via an `enter` animation. - * - * @example - * - * - *
- *
- * {{ number }} - *
- *
- *
- * - * angular.module('ngAnimateSwapExample', ['ngAnimate']) - * .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) { - * $scope.number = 0; - * $interval(function() { - * $scope.number++; - * }, 1000); - * - * var colors = ['red','blue','green','yellow','orange']; - * $scope.colorClass = function(number) { - * return colors[number % colors.length]; - * }; - * }]); - * - * - * .container { - * height:250px; - * width:250px; - * position:relative; - * overflow:hidden; - * border:2px solid black; - * } - * .container .cell { - * font-size:150px; - * text-align:center; - * line-height:250px; - * position:absolute; - * top:0; - * left:0; - * right:0; - * border-bottom:2px solid black; - * } - * .swap-animation.ng-enter, .swap-animation.ng-leave { - * transition:0.5s linear all; - * } - * .swap-animation.ng-enter { - * top:-250px; - * } - * .swap-animation.ng-enter-active { - * top:0px; - * } - * .swap-animation.ng-leave { - * top:0px; - * } - * .swap-animation.ng-leave-active { - * top:250px; - * } - * .red { background:red; } - * .green { background:green; } - * .blue { background:blue; } - * .yellow { background:yellow; } - * .orange { background:orange; } - * - *
- */ -var ngAnimateSwapDirective = ['$animate', '$rootScope', function($animate, $rootScope) { - return { - restrict: 'A', - transclude: 'element', - terminal: true, - priority: 600, // we use 600 here to ensure that the directive is caught before others - link: function(scope, $element, attrs, ctrl, $transclude) { - var previousElement, previousScope; - scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) { - if (previousElement) { - $animate.leave(previousElement); - } - if (previousScope) { - previousScope.$destroy(); - previousScope = null; - } - if (value || value === 0) { - previousScope = scope.$new(); - $transclude(previousScope, function(element) { - previousElement = element; - $animate.enter(element, null, $element); - }); - } - }); - } - }; -}]; - -/* global angularAnimateModule: true, - - ngAnimateSwapDirective, - $$AnimateAsyncRunFactory, - $$rAFSchedulerFactory, - $$AnimateChildrenDirective, - $$AnimateQueueProvider, - $$AnimationProvider, - $AnimateCssProvider, - $$AnimateCssDriverProvider, - $$AnimateJsProvider, - $$AnimateJsDriverProvider, -*/ - -/** - * @ngdoc module - * @name ngAnimate - * @description - * - * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via - * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an Angular app. - * - *
- * - * # Usage - * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based - * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For - * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within - * the HTML element that the animation will be triggered on. - * - * ## Directive Support - * The following directives are "animation aware": - * - * | Directive | Supported Animations | - * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| - * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move | - * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave | - * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave | - * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave | - * | {@link ng.directive:ngIf#animations ngIf} | enter and leave | - * | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) | - * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) | - * | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | - * | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) | - * | {@link module:ngMessages#animations ngMessage} | enter and leave | - * - * (More information can be found by visiting each the documentation associated with each directive.) - * - * ## CSS-based Animations - * - * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML - * and CSS code we can create an animation that will be picked up by Angular when an the underlying directive performs an operation. - * - * The example below shows how an `enter` animation can be made possible on an element using `ng-if`: - * - * ```html - *
- * Fade me in out - *
- * - * - * ``` - * - * Notice the CSS class **fade**? We can now create the CSS transition code that references this class: - * - * ```css - * /* The starting CSS styles for the enter animation */ - * .fade.ng-enter { - * transition:0.5s linear all; - * opacity:0; - * } - * - * /* The finishing CSS styles for the enter animation */ - * .fade.ng-enter.ng-enter-active { - * opacity:1; - * } - * ``` - * - * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two - * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition - * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards. - * - * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions: - * - * ```css - * /* now the element will fade out before it is removed from the DOM */ - * .fade.ng-leave { - * transition:0.5s linear all; - * opacity:1; - * } - * .fade.ng-leave.ng-leave-active { - * opacity:0; - * } - * ``` - * - * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class: - * - * ```css - * /* there is no need to define anything inside of the destination - * CSS class since the keyframe will take charge of the animation */ - * .fade.ng-leave { - * animation: my_fade_animation 0.5s linear; - * -webkit-animation: my_fade_animation 0.5s linear; - * } - * - * @keyframes my_fade_animation { - * from { opacity:1; } - * to { opacity:0; } - * } - * - * @-webkit-keyframes my_fade_animation { - * from { opacity:1; } - * to { opacity:0; } - * } - * ``` - * - * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element. - * - * ### CSS Class-based Animations - * - * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different - * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added - * and removed. - * - * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class: - * - * ```html - *
- * Show and hide me - *
- * - * - * - * ``` - * - * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since - * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest. - * - * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation - * with CSS styles. - * - * ```html - *
- * Highlight this box - *
- * - * - * - * ``` - * - * We can also make use of CSS keyframes by placing them within the CSS classes. - * - * - * ### CSS Staggering Animations - * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a - * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be - * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for - * the animation. The style property expected within the stagger class can either be a **transition-delay** or an - * **animation-delay** property (or both if your animation contains both transitions and keyframe animations). - * - * ```css - * .my-animation.ng-enter { - * /* standard transition code */ - * transition: 1s linear all; - * opacity:0; - * } - * .my-animation.ng-enter-stagger { - * /* this will have a 100ms delay between each successive leave animation */ - * transition-delay: 0.1s; - * - * /* As of 1.4.4, this must always be set: it signals ngAnimate - * to not accidentally inherit a delay property from another CSS class */ - * transition-duration: 0s; - * } - * .my-animation.ng-enter.ng-enter-active { - * /* standard transition styles */ - * opacity:1; - * } - * ``` - * - * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations - * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this - * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation - * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired. - * - * The following code will issue the **ng-leave-stagger** event on the element provided: - * - * ```js - * var kids = parent.children(); - * - * $animate.leave(kids[0]); //stagger index=0 - * $animate.leave(kids[1]); //stagger index=1 - * $animate.leave(kids[2]); //stagger index=2 - * $animate.leave(kids[3]); //stagger index=3 - * $animate.leave(kids[4]); //stagger index=4 - * - * window.requestAnimationFrame(function() { - * //stagger has reset itself - * $animate.leave(kids[5]); //stagger index=0 - * $animate.leave(kids[6]); //stagger index=1 - * - * $scope.$digest(); - * }); - * ``` - * - * Stagger animations are currently only supported within CSS-defined animations. - * - * ### The `ng-animate` CSS class - * - * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation. - * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations). - * - * Therefore, animations can be applied to an element using this temporary class directly via CSS. - * - * ```css - * .zipper.ng-animate { - * transition:0.5s linear all; - * } - * .zipper.ng-enter { - * opacity:0; - * } - * .zipper.ng-enter.ng-enter-active { - * opacity:1; - * } - * .zipper.ng-leave { - * opacity:1; - * } - * .zipper.ng-leave.ng-leave-active { - * opacity:0; - * } - * ``` - * - * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove - * the CSS class once an animation has completed.) - * - * - * ### The `ng-[event]-prepare` class - * - * This is a special class that can be used to prevent unwanted flickering / flash of content before - * the actual animation starts. The class is added as soon as an animation is initialized, but removed - * before the actual animation starts (after waiting for a $digest). - * It is also only added for *structural* animations (`enter`, `move`, and `leave`). - * - * In practice, flickering can appear when nesting elements with structural animations such as `ngIf` - * into elements that have class-based animations such as `ngClass`. - * - * ```html - *
- *
- *
- *
- *
- * ``` - * - * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating. - * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts: - * - * ```css - * .message.ng-enter-prepare { - * opacity: 0; - * } - * - * ``` - * - * ## JavaScript-based Animations - * - * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared - * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the - * `module.animation()` module function we can register the animation. - * - * Let's see an example of a enter/leave animation using `ngRepeat`: - * - * ```html - *
- * {{ item }} - *
- * ``` - * - * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`: - * - * ```js - * myModule.animation('.slide', [function() { - * return { - * // make note that other events (like addClass/removeClass) - * // have different function input parameters - * enter: function(element, doneFn) { - * jQuery(element).fadeIn(1000, doneFn); - * - * // remember to call doneFn so that angular - * // knows that the animation has concluded - * }, - * - * move: function(element, doneFn) { - * jQuery(element).fadeIn(1000, doneFn); - * }, - * - * leave: function(element, doneFn) { - * jQuery(element).fadeOut(1000, doneFn); - * } - * } - * }]); - * ``` - * - * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as - * greensock.js and velocity.js. - * - * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define - * our animations inside of the same registered animation, however, the function input arguments are a bit different: - * - * ```html - *
- * this box is moody - *
- * - * - * - * ``` - * - * ```js - * myModule.animation('.colorful', [function() { - * return { - * addClass: function(element, className, doneFn) { - * // do some cool animation and call the doneFn - * }, - * removeClass: function(element, className, doneFn) { - * // do some cool animation and call the doneFn - * }, - * setClass: function(element, addedClass, removedClass, doneFn) { - * // do some cool animation and call the doneFn - * } - * } - * }]); - * ``` - * - * ## CSS + JS Animations Together - * - * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular, - * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking - * charge of the animation**: - * - * ```html - *
- * Slide in and out - *
- * ``` - * - * ```js - * myModule.animation('.slide', [function() { - * return { - * enter: function(element, doneFn) { - * jQuery(element).slideIn(1000, doneFn); - * } - * } - * }]); - * ``` - * - * ```css - * .slide.ng-enter { - * transition:0.5s linear all; - * transform:translateY(-100px); - * } - * .slide.ng-enter.ng-enter-active { - * transform:translateY(0); - * } - * ``` - * - * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the - * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from - * our own JS-based animation code: - * - * ```js - * myModule.animation('.slide', ['$animateCss', function($animateCss) { - * return { - * enter: function(element) { -* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`. - * return $animateCss(element, { - * event: 'enter', - * structural: true - * }); - * } - * } - * }]); - * ``` - * - * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework. - * - * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or - * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that - * data into `$animateCss` directly: - * - * ```js - * myModule.animation('.slide', ['$animateCss', function($animateCss) { - * return { - * enter: function(element) { - * return $animateCss(element, { - * event: 'enter', - * structural: true, - * addClass: 'maroon-setting', - * from: { height:0 }, - * to: { height: 200 } - * }); - * } - * } - * }]); - * ``` - * - * Now we can fill in the rest via our transition CSS code: - * - * ```css - * /* the transition tells ngAnimate to make the animation happen */ - * .slide.ng-enter { transition:0.5s linear all; } - * - * /* this extra CSS class will be absorbed into the transition - * since the $animateCss code is adding the class */ - * .maroon-setting { background:red; } - * ``` - * - * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over. - * - * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}. - * - * ## Animation Anchoring (via `ng-animate-ref`) - * - * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between - * structural areas of an application (like views) by pairing up elements using an attribute - * called `ng-animate-ref`. - * - * Let's say for example we have two views that are managed by `ng-view` and we want to show - * that there is a relationship between two components situated in within these views. By using the - * `ng-animate-ref` attribute we can identify that the two components are paired together and we - * can then attach an animation, which is triggered when the view changes. - * - * Say for example we have the following template code: - * - * ```html - * - *
- *
- * - * - * - * - * - * - * - * - * ``` - * - * Now, when the view changes (once the link is clicked), ngAnimate will examine the - * HTML contents to see if there is a match reference between any components in the view - * that is leaving and the view that is entering. It will scan both the view which is being - * removed (leave) and inserted (enter) to see if there are any paired DOM elements that - * contain a matching ref value. - * - * The two images match since they share the same ref value. ngAnimate will now create a - * transport element (which is a clone of the first image element) and it will then attempt - * to animate to the position of the second image element in the next view. For the animation to - * work a special CSS class called `ng-anchor` will be added to the transported element. - * - * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then - * ngAnimate will handle the entire transition for us as well as the addition and removal of - * any changes of CSS classes between the elements: - * - * ```css - * .banner.ng-anchor { - * /* this animation will last for 1 second since there are - * two phases to the animation (an `in` and an `out` phase) */ - * transition:0.5s linear all; - * } - * ``` - * - * We also **must** include animations for the views that are being entered and removed - * (otherwise anchoring wouldn't be possible since the new view would be inserted right away). - * - * ```css - * .view-animation.ng-enter, .view-animation.ng-leave { - * transition:0.5s linear all; - * position:fixed; - * left:0; - * top:0; - * width:100%; - * } - * .view-animation.ng-enter { - * transform:translateX(100%); - * } - * .view-animation.ng-leave, - * .view-animation.ng-enter.ng-enter-active { - * transform:translateX(0%); - * } - * .view-animation.ng-leave.ng-leave-active { - * transform:translateX(-100%); - * } - * ``` - * - * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur: - * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away - * from its origin. Once that animation is over then the `in` stage occurs which animates the - * element to its destination. The reason why there are two animations is to give enough time - * for the enter animation on the new element to be ready. - * - * The example above sets up a transition for both the in and out phases, but we can also target the out or - * in phases directly via `ng-anchor-out` and `ng-anchor-in`. - * - * ```css - * .banner.ng-anchor-out { - * transition: 0.5s linear all; - * - * /* the scale will be applied during the out animation, - * but will be animated away when the in animation runs */ - * transform: scale(1.2); - * } - * - * .banner.ng-anchor-in { - * transition: 1s linear all; - * } - * ``` - * - * - * - * - * ### Anchoring Demo - * - - - Home -
-
-
-
-
- - angular.module('anchoringExample', ['ngAnimate', 'ngRoute']) - .config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/', { - templateUrl: 'home.html', - controller: 'HomeController as home' - }); - $routeProvider.when('/profile/:id', { - templateUrl: 'profile.html', - controller: 'ProfileController as profile' - }); - }]) - .run(['$rootScope', function($rootScope) { - $rootScope.records = [ - { id:1, title: "Miss Beulah Roob" }, - { id:2, title: "Trent Morissette" }, - { id:3, title: "Miss Ava Pouros" }, - { id:4, title: "Rod Pouros" }, - { id:5, title: "Abdul Rice" }, - { id:6, title: "Laurie Rutherford Sr." }, - { id:7, title: "Nakia McLaughlin" }, - { id:8, title: "Jordon Blanda DVM" }, - { id:9, title: "Rhoda Hand" }, - { id:10, title: "Alexandrea Sauer" } - ]; - }]) - .controller('HomeController', [function() { - //empty - }]) - .controller('ProfileController', ['$rootScope', '$routeParams', function($rootScope, $routeParams) { - var index = parseInt($routeParams.id, 10); - var record = $rootScope.records[index - 1]; - - this.title = record.title; - this.id = record.id; - }]); - - -

Welcome to the home page

-

Please click on an element

- - {{ record.title }} - -
- -
- {{ profile.title }} -
-
- - .record { - display:block; - font-size:20px; - } - .profile { - background:black; - color:white; - font-size:100px; - } - .view-container { - position:relative; - } - .view-container > .view.ng-animate { - position:absolute; - top:0; - left:0; - width:100%; - min-height:500px; - } - .view.ng-enter, .view.ng-leave, - .record.ng-anchor { - transition:0.5s linear all; - } - .view.ng-enter { - transform:translateX(100%); - } - .view.ng-enter.ng-enter-active, .view.ng-leave { - transform:translateX(0%); - } - .view.ng-leave.ng-leave-active { - transform:translateX(-100%); - } - .record.ng-anchor-out { - background:red; - } - -
- * - * ### How is the element transported? - * - * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting - * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element - * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The - * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match - * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied - * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class - * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element - * will become visible since the shim class will be removed. - * - * ### How is the morphing handled? - * - * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out - * what CSS classes differ between the starting element and the destination element. These different CSS classes - * will be added/removed on the anchor element and a transition will be applied (the transition that is provided - * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will - * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that - * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since - * the cloned element is placed inside of root element which is likely close to the body element). - * - * Note that if the root element is on the `` element then the cloned node will be placed inside of body. - * - * - * ## Using $animate in your directive code - * - * So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application? - * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's - * imagine we have a greeting box that shows and hides itself when the data changes - * - * ```html - * Hi there - * ``` - * - * ```js - * ngModule.directive('greetingBox', ['$animate', function($animate) { - * return function(scope, element, attrs) { - * attrs.$observe('active', function(value) { - * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on'); - * }); - * }); - * }]); - * ``` - * - * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element - * in our HTML code then we can trigger a CSS or JS animation to happen. - * - * ```css - * /* normally we would create a CSS class to reference on the element */ - * greeting-box.on { transition:0.5s linear all; background:green; color:white; } - * ``` - * - * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's - * possible be sure to visit the {@link ng.$animate $animate service API page}. - * - * - * ### Preventing Collisions With Third Party Libraries - * - * Some third-party frameworks place animation duration defaults across many element or className - * selectors in order to make their code small and reuseable. This can lead to issues with ngAnimate, which - * is expecting actual animations on these elements and has to wait for their completion. - * - * You can prevent this unwanted behavior by using a prefix on all your animation classes: - * - * ```css - * /* prefixed with animate- */ - * .animate-fade-add.animate-fade-add-active { - * transition:1s linear all; - * opacity:0; - * } - * ``` - * - * You then configure `$animate` to enforce this prefix: - * - * ```js - * $animateProvider.classNameFilter(/animate-/); - * ``` - * - * This also may provide your application with a speed boost since only specific elements containing CSS class prefix - * will be evaluated for animation when any DOM changes occur in the application. - * - * ## Callbacks and Promises - * - * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger - * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has - * ended by chaining onto the returned promise that animation method returns. - * - * ```js - * // somewhere within the depths of the directive - * $animate.enter(element, parent).then(function() { - * //the animation has completed - * }); - * ``` - * - * (Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case - * anymore.) - * - * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering - * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view - * routing controller to hook into that: - * - * ```js - * ngModule.controller('HomePageController', ['$animate', function($animate) { - * $animate.on('enter', ngViewElement, function(element) { - * // the animation for this route has completed - * }]); - * }]) - * ``` - * - * (Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.) - */ - -/** - * @ngdoc service - * @name $animate - * @kind object - * - * @description - * The ngAnimate `$animate` service documentation is the same for the core `$animate` service. - * - * Click here {@link ng.$animate to learn more about animations with `$animate`}. - */ -angular.module('ngAnimate', []) - .directive('ngAnimateSwap', ngAnimateSwapDirective) - - .directive('ngAnimateChildren', $$AnimateChildrenDirective) - .factory('$$rAFScheduler', $$rAFSchedulerFactory) - - .provider('$$animateQueue', $$AnimateQueueProvider) - .provider('$$animation', $$AnimationProvider) - - .provider('$animateCss', $AnimateCssProvider) - .provider('$$animateCssDriver', $$AnimateCssDriverProvider) - - .provider('$$animateJs', $$AnimateJsProvider) - .provider('$$animateJsDriver', $$AnimateJsDriverProvider); - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js deleted file mode 100644 index 8e8e41df..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-animate.min.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(D,r,Va){'use strict';function ya(a,b,c){if(!a)throw Ka("areq",b||"?",c||"required");return a}function za(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;ba(a)&&(a=a.join(" "));ba(b)&&(b=b.join(" "));return a+" "+b}function La(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function X(a,b,c){var d="";a=ba(a)?a:a&&R(a)&&a.length?a.split(/\s+/):[];s(a,function(a,g){a&&0=a&&(a=e,e=0,b.push(t),t=[]);t.push(g.fn);g.children.forEach(function(a){e++; -c.push(a)});a--}t.length&&b.push(t);return b}(c)}var M=[],r=U(a);return function(u,A,v){function z(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function K(a){var b=[],c={};s(a,function(a,f){var d=G(a.element),h=0<=["enter","move"].indexOf(a.event),d=a.structural?z(d):[];if(d.length){var e=h?"to":"from";s(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]|| -{};c[b][e]={animationID:f,element:I(a)}})}else b.push(a)});var d={},h={};s(c,function(c,e){var l=c.from,t=c.to;if(l&&t){var g=a[l.animationID],E=a[t.animationID],k=l.animationID.toString();if(!h[k]){var z=h[k]={structural:!0,beforeStart:function(){g.beforeStart();E.beforeStart()},close:function(){g.close();E.close()},classes:J(g.classes,E.classes),from:g,to:E,anchors:[]};z.classes.length?b.push(z):(b.push(g),b.push(E))}h[k].anchors.push({out:l.element,"in":t.element})}else l=l?l.animationID:t.animationID, -t=l.toString(),d[t]||(d[t]=!0,b.push(a[l]))});return b}function J(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],d=0;d=P&&b>=O&&(wa=!0,q())}function L(){function b(){if(!A){t(!1);s(m, -function(a){l.style[a[0]]=a[1]});z(a,f);e.addClass(a,ca);if(p.recalculateTimingStyles){ja=l.className+" "+da;ga=r(l,ja);F=v(l,ja,ga);$=F.maxDelay;n=Math.max($,0);O=F.maxDuration;if(0===O){q();return}p.hasTransitions=0B.expectedEndTime)?H.cancel(B.timer):g.push(q)}L&&(k=H(c,k,!1),g[0]={timer:k,expectedEndTime:d},g.push(q),a.data("$$animateCss",g));if(ea.length)a.on(ea.join(" "),E);f.to&&(f.cleanupStyles&&Ga(x,l,Object.keys(f.to)),Ba(a, -f))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;dARIA](http://www.w3.org/TR/wai-aria/) - * attributes that convey state or semantic information about the application for users - * of assistive technologies, such as screen readers. - * - *
- * - * ## Usage - * - * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following - * directives are supported: - * `ngModel`, `ngChecked`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`, - * `ngDblClick`, and `ngMessages`. - * - * Below is a more detailed breakdown of the attributes handled by ngAria: - * - * | Directive | Supported Attributes | - * |---------------------------------------------|----------------------------------------------------------------------------------------| - * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles | - * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled | - * | {@link ng.directive:ngRequired ngRequired} | aria-required | - * | {@link ng.directive:ngChecked ngChecked} | aria-checked | - * | {@link ng.directive:ngValue ngValue} | aria-checked | - * | {@link ng.directive:ngShow ngShow} | aria-hidden | - * | {@link ng.directive:ngHide ngHide} | aria-hidden | - * | {@link ng.directive:ngDblclick ngDblclick} | tabindex | - * | {@link module:ngMessages ngMessages} | aria-live | - * | {@link ng.directive:ngClick ngClick} | tabindex, keypress event, button role | - * - * Find out more information about each directive by reading the - * {@link guide/accessibility ngAria Developer Guide}. - * - * ##Example - * Using ngDisabled with ngAria: - * ```html - * - * ``` - * Becomes: - * ```html - * - * ``` - * - * ##Disabling Attributes - * It's possible to disable individual attributes added by ngAria with the - * {@link ngAria.$ariaProvider#config config} method. For more details, see the - * {@link guide/accessibility Developer Guide}. - */ - /* global -ngAriaModule */ -var ngAriaModule = angular.module('ngAria', ['ng']). - provider('$aria', $AriaProvider); - -/** -* Internal Utilities -*/ -var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY']; - -var isNodeOneOf = function(elem, nodeTypeArray) { - if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) { - return true; - } -}; -/** - * @ngdoc provider - * @name $ariaProvider - * - * @description - * - * Used for configuring the ARIA attributes injected and managed by ngAria. - * - * ```js - * angular.module('myApp', ['ngAria'], function config($ariaProvider) { - * $ariaProvider.config({ - * ariaValue: true, - * tabindex: false - * }); - * }); - *``` - * - * ## Dependencies - * Requires the {@link ngAria} module to be installed. - * - */ -function $AriaProvider() { - var config = { - ariaHidden: true, - ariaChecked: true, - ariaDisabled: true, - ariaRequired: true, - ariaInvalid: true, - ariaValue: true, - tabindex: true, - bindKeypress: true, - bindRoleForClick: true - }; - - /** - * @ngdoc method - * @name $ariaProvider#config - * - * @param {object} config object to enable/disable specific ARIA attributes - * - * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags - * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags - * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags - * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags - * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags - * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and aria-valuenow tags - * - **tabindex** – `{boolean}` – Enables/disables tabindex tags - * - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on `div` and - * `li` elements with ng-click - * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements like `div` - * using ng-click, making them more accessible to users of assistive technologies - * - * @description - * Enables/disables various ARIA attributes - */ - this.config = function(newConfig) { - config = angular.extend(config, newConfig); - }; - - function watchExpr(attrName, ariaAttr, nodeBlackList, negate) { - return function(scope, elem, attr) { - var ariaCamelName = attr.$normalize(ariaAttr); - if (config[ariaCamelName] && !isNodeOneOf(elem, nodeBlackList) && !attr[ariaCamelName]) { - scope.$watch(attr[attrName], function(boolVal) { - // ensure boolean value - boolVal = negate ? !boolVal : !!boolVal; - elem.attr(ariaAttr, boolVal); - }); - } - }; - } - /** - * @ngdoc service - * @name $aria - * - * @description - * @priority 200 - * - * The $aria service contains helper methods for applying common - * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives. - * - * ngAria injects common accessibility attributes that tell assistive technologies when HTML - * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria, - * let's review a code snippet from ngAria itself: - * - *```js - * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) { - * return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false); - * }]) - *``` - * Shown above, the ngAria module creates a directive with the same signature as the - * traditional `ng-disabled` directive. But this ngAria version is dedicated to - * solely managing accessibility attributes on custom elements. The internal `$aria` service is - * used to watch the boolean attribute `ngDisabled`. If it has not been explicitly set by the - * developer, `aria-disabled` is injected as an attribute with its value synchronized to the - * value in `ngDisabled`. - * - * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do - * anything to enable this feature. The `aria-disabled` attribute is automatically managed - * simply as a silent side-effect of using `ng-disabled` with the ngAria module. - * - * The full list of directives that interface with ngAria: - * * **ngModel** - * * **ngChecked** - * * **ngRequired** - * * **ngDisabled** - * * **ngValue** - * * **ngShow** - * * **ngHide** - * * **ngClick** - * * **ngDblclick** - * * **ngMessages** - * - * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each - * directive. - * - * - * ## Dependencies - * Requires the {@link ngAria} module to be installed. - */ - this.$get = function() { - return { - config: function(key) { - return config[key]; - }, - $$watchExpr: watchExpr - }; - }; -} - - -ngAriaModule.directive('ngShow', ['$aria', function($aria) { - return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true); -}]) -.directive('ngHide', ['$aria', function($aria) { - return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false); -}]) -.directive('ngValue', ['$aria', function($aria) { - return $aria.$$watchExpr('ngValue', 'aria-checked', nodeBlackList, false); -}]) -.directive('ngChecked', ['$aria', function($aria) { - return $aria.$$watchExpr('ngChecked', 'aria-checked', nodeBlackList, false); -}]) -.directive('ngRequired', ['$aria', function($aria) { - return $aria.$$watchExpr('ngRequired', 'aria-required', nodeBlackList, false); -}]) -.directive('ngModel', ['$aria', function($aria) { - - function shouldAttachAttr(attr, normalizedAttr, elem, allowBlacklistEls) { - return $aria.config(normalizedAttr) && !elem.attr(attr) && (allowBlacklistEls || !isNodeOneOf(elem, nodeBlackList)); - } - - function shouldAttachRole(role, elem) { - // if element does not have role attribute - // AND element type is equal to role (if custom element has a type equaling shape) <-- remove? - // AND element is not INPUT - return !elem.attr('role') && (elem.attr('type') === role) && (elem[0].nodeName !== 'INPUT'); - } - - function getShape(attr, elem) { - var type = attr.type, - role = attr.role; - - return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' : - ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' : - (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' : ''; - } - - return { - restrict: 'A', - require: 'ngModel', - priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value - compile: function(elem, attr) { - var shape = getShape(attr, elem); - - return { - pre: function(scope, elem, attr, ngModel) { - if (shape === 'checkbox') { - //Use the input[checkbox] $isEmpty implementation for elements with checkbox roles - ngModel.$isEmpty = function(value) { - return value === false; - }; - } - }, - post: function(scope, elem, attr, ngModel) { - var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false); - - function ngAriaWatchModelValue() { - return ngModel.$modelValue; - } - - function getRadioReaction(newVal) { - var boolVal = (attr.value == ngModel.$viewValue); - elem.attr('aria-checked', boolVal); - } - - function getCheckboxReaction() { - elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue)); - } - - switch (shape) { - case 'radio': - case 'checkbox': - if (shouldAttachRole(shape, elem)) { - elem.attr('role', shape); - } - if (shouldAttachAttr('aria-checked', 'ariaChecked', elem, false)) { - scope.$watch(ngAriaWatchModelValue, shape === 'radio' ? - getRadioReaction : getCheckboxReaction); - } - if (needsTabIndex) { - elem.attr('tabindex', 0); - } - break; - case 'range': - if (shouldAttachRole(shape, elem)) { - elem.attr('role', 'slider'); - } - if ($aria.config('ariaValue')) { - var needsAriaValuemin = !elem.attr('aria-valuemin') && - (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin')); - var needsAriaValuemax = !elem.attr('aria-valuemax') && - (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax')); - var needsAriaValuenow = !elem.attr('aria-valuenow'); - - if (needsAriaValuemin) { - attr.$observe('min', function ngAriaValueMinReaction(newVal) { - elem.attr('aria-valuemin', newVal); - }); - } - if (needsAriaValuemax) { - attr.$observe('max', function ngAriaValueMinReaction(newVal) { - elem.attr('aria-valuemax', newVal); - }); - } - if (needsAriaValuenow) { - scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) { - elem.attr('aria-valuenow', newVal); - }); - } - } - if (needsTabIndex) { - elem.attr('tabindex', 0); - } - break; - } - - if (!attr.hasOwnProperty('ngRequired') && ngModel.$validators.required - && shouldAttachAttr('aria-required', 'ariaRequired', elem, false)) { - // ngModel.$error.required is undefined on custom controls - attr.$observe('required', function() { - elem.attr('aria-required', !!attr['required']); - }); - } - - if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem, true)) { - scope.$watch(function ngAriaInvalidWatch() { - return ngModel.$invalid; - }, function ngAriaInvalidReaction(newVal) { - elem.attr('aria-invalid', !!newVal); - }); - } - } - }; - } - }; -}]) -.directive('ngDisabled', ['$aria', function($aria) { - return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false); -}]) -.directive('ngMessages', function() { - return { - restrict: 'A', - require: '?ngMessages', - link: function(scope, elem, attr, ngMessages) { - if (!elem.attr('aria-live')) { - elem.attr('aria-live', 'assertive'); - } - } - }; -}) -.directive('ngClick',['$aria', '$parse', function($aria, $parse) { - return { - restrict: 'A', - compile: function(elem, attr) { - var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true); - return function(scope, elem, attr) { - - if (!isNodeOneOf(elem, nodeBlackList)) { - - if ($aria.config('bindRoleForClick') && !elem.attr('role')) { - elem.attr('role', 'button'); - } - - if ($aria.config('tabindex') && !elem.attr('tabindex')) { - elem.attr('tabindex', 0); - } - - if ($aria.config('bindKeypress') && !attr.ngKeypress) { - elem.on('keypress', function(event) { - var keyCode = event.which || event.keyCode; - if (keyCode === 32 || keyCode === 13) { - scope.$apply(callback); - } - - function callback() { - fn(scope, { $event: event }); - } - }); - } - } - }; - } - }; -}]) -.directive('ngDblclick', ['$aria', function($aria) { - return function(scope, elem, attr) { - if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nodeBlackList)) { - elem.attr('tabindex', 0); - } - }; -}]); - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js deleted file mode 100644 index cf0fd742..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(s,q,t){'use strict';var f="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),l=function(a,c){if(-1!==c.indexOf(a[0].nodeName))return!0};q.module("ngAria",["ng"]).provider("$aria",function(){function a(a,h,p,n){return function(d,e,b){var g=b.$normalize(h);!c[g]||l(e,p)||b[g]||d.$watch(b[a],function(b){b=n?!b:!!b;e.attr(h,b)})}}var c={ariaHidden:!0,ariaChecked:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};this.config= -function(a){c=q.extend(c,a)};this.$get=function(){return{config:function(a){return c[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(a){return a.$$watchExpr("ngValue","aria-checked",f,!1)}]).directive("ngChecked",["$aria",function(a){return a.$$watchExpr("ngChecked","aria-checked",f,!1)}]).directive("ngRequired", -["$aria",function(a){return a.$$watchExpr("ngRequired","aria-required",f,!1)}]).directive("ngModel",["$aria",function(a){function c(c,n,d,e){return a.config(n)&&!d.attr(c)&&(e||!l(d,f))}function m(a,c){return!c.attr("role")&&c.attr("type")===a&&"INPUT"!==c[0].nodeName}function h(a,c){var d=a.type,e=a.role;return"checkbox"===(d||e)||"menuitemcheckbox"===e?"checkbox":"radio"===(d||e)||"menuitemradio"===e?"radio":"range"===d||"progressbar"===e||"slider"===e?"range":""}return{restrict:"A",require:"ngModel", -priority:200,compile:function(f,n){var d=h(n,f);return{pre:function(a,b,c,k){"checkbox"===d&&(k.$isEmpty=function(a){return!1===a})},post:function(e,b,g,k){function f(){return k.$modelValue}function h(a){b.attr("aria-checked",g.value==k.$viewValue)}function n(){b.attr("aria-checked",!k.$isEmpty(k.$viewValue))}var l=c("tabindex","tabindex",b,!1);switch(d){case "radio":case "checkbox":m(d,b)&&b.attr("role",d);c("aria-checked","ariaChecked",b,!1)&&e.$watch(f,"radio"===d?h:n);l&&b.attr("tabindex",0); -break;case "range":m(d,b)&&b.attr("role","slider");if(a.config("ariaValue")){var p=!b.attr("aria-valuemin")&&(g.hasOwnProperty("min")||g.hasOwnProperty("ngMin")),q=!b.attr("aria-valuemax")&&(g.hasOwnProperty("max")||g.hasOwnProperty("ngMax")),r=!b.attr("aria-valuenow");p&&g.$observe("min",function(a){b.attr("aria-valuemin",a)});q&&g.$observe("max",function(a){b.attr("aria-valuemax",a)});r&&e.$watch(f,function(a){b.attr("aria-valuenow",a)})}l&&b.attr("tabindex",0)}!g.hasOwnProperty("ngRequired")&& -k.$validators.required&&c("aria-required","ariaRequired",b,!1)&&g.$observe("required",function(){b.attr("aria-required",!!g.required)});c("aria-invalid","ariaInvalid",b,!0)&&e.$watch(function(){return k.$invalid},function(a){b.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",f,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,c,f,h){c.attr("aria-live")||c.attr("aria-live", -"assertive")}}}).directive("ngClick",["$aria","$parse",function(a,c){return{restrict:"A",compile:function(m,h){var p=c(h.ngClick,null,!0);return function(c,d,e){if(!l(d,f)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeypress")&&!e.ngKeypress))d.on("keypress",function(a){function d(){p(c,{$event:a})}var e=a.which||a.keyCode;32!==e&&13!==e||c.$apply(d)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(c, -m,h){!a.config("tabindex")||m.attr("tabindex")||l(m,f)||m.attr("tabindex",0)}}])})(window,window.angular); -//# sourceMappingURL=angular-aria.min.js.map diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map deleted file mode 100644 index b1db15b5..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-aria.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ -"version":3, -"file":"angular-aria.min.js", -"lineCount":13, -"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6DtC,IAAIC,EAAgB,gDAAA,MAAA,CAAA,GAAA,CAApB,CAEIC,EAAcA,QAAQ,CAACC,CAAD,CAAOC,CAAP,CAAsB,CAC9C,GAAiD,EAAjD,GAAIA,CAAAC,QAAA,CAAsBF,CAAA,CAAK,CAAL,CAAAG,SAAtB,CAAJ,CACE,MAAO,CAAA,CAFqC,CAR7BP,EAAAQ,OAAA,CAAe,QAAf,CAAyB,CAAC,IAAD,CAAzB,CAAAC,SAAAC,CACc,OADdA,CAkCnBC,QAAsB,EAAG,CAsCvBC,QAASA,EAAS,CAACC,CAAD,CAAWC,CAAX,CAAqBZ,CAArB,CAAoCa,CAApC,CAA4C,CAC5D,MAAO,SAAQ,CAACC,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB,CACjC,IAAIC,EAAgBD,CAAAE,WAAA,CAAgBL,CAAhB,CAChB,EAAAM,CAAA,CAAOF,CAAP,CAAJ,EAA8Bf,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA9B,EAAmEe,CAAA,CAAKC,CAAL,CAAnE,EACEF,CAAAK,OAAA,CAAaJ,CAAA,CAAKJ,CAAL,CAAb,CAA6B,QAAQ,CAACS,CAAD,CAAU,CAE7CA,CAAA,CAAUP,CAAA,CAAS,CAACO,CAAV,CAAoB,CAAEA,CAAAA,CAChClB,EAAAa,KAAA,CAAUH,CAAV,CAAoBQ,CAApB,CAH6C,CAA/C,CAH+B,CADyB,CArC9D,IAAIF,EAAS,CACXG,WAAY,CAAA,CADD,CAEXC,YAAa,CAAA,CAFF,CAGXC,aAAc,CAAA,CAHH,CAIXC,aAAc,CAAA,CAJH,CAKXC,YAAa,CAAA,CALF,CAMXC,UAAW,CAAA,CANA,CAOXC,SAAU,CAAA,CAPC,CAQXC,aAAc,CAAA,CARH,CASXC,iBAAkB,CAAA,CATP,CAiCb,KAAAX,OAAA;AAAcY,QAAQ,CAACC,CAAD,CAAY,CAChCb,CAAA,CAASpB,CAAAkC,OAAA,CAAed,CAAf,CAAuBa,CAAvB,CADuB,CAiElC,KAAAE,KAAA,CAAYC,QAAQ,EAAG,CACrB,MAAO,CACLhB,OAAQA,QAAQ,CAACiB,CAAD,CAAM,CACpB,MAAOjB,EAAA,CAAOiB,CAAP,CADa,CADjB,CAILC,YAAa1B,CAJR,CADc,CAnGA,CAlCNF,CAgJnB6B,UAAA,CAAuB,QAAvB,CAAiC,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACzD,MAAOA,EAAAF,YAAA,CAAkB,QAAlB,CAA4B,aAA5B,CAA2C,EAA3C,CAA+C,CAAA,CAA/C,CADkD,CAA1B,CAAjC,CAAAC,UAAA,CAGW,QAHX,CAGqB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAC7C,MAAOA,EAAAF,YAAA,CAAkB,QAAlB,CAA4B,aAA5B,CAA2C,EAA3C,CAA+C,CAAA,CAA/C,CADsC,CAA1B,CAHrB,CAAAC,UAAA,CAMW,SANX,CAMsB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAC9C,MAAOA,EAAAF,YAAA,CAAkB,SAAlB,CAA6B,cAA7B,CAA6CpC,CAA7C,CAA4D,CAAA,CAA5D,CADuC,CAA1B,CANtB,CAAAqC,UAAA,CASW,WATX,CASwB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAChD,MAAOA,EAAAF,YAAA,CAAkB,WAAlB,CAA+B,cAA/B,CAA+CpC,CAA/C,CAA8D,CAAA,CAA9D,CADyC,CAA1B,CATxB,CAAAqC,UAAA,CAYW,YAZX;AAYyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDpC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CAZzB,CAAAqC,UAAA,CAeW,SAfX,CAesB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAE9CC,QAASA,EAAgB,CAACxB,CAAD,CAAOyB,CAAP,CAAuBtC,CAAvB,CAA6BuC,CAA7B,CAAgD,CACvE,MAAOH,EAAApB,OAAA,CAAasB,CAAb,CAAP,EAAuC,CAACtC,CAAAa,KAAA,CAAUA,CAAV,CAAxC,GAA4D0B,CAA5D,EAAiF,CAACxC,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAAlF,CADuE,CAIzE0C,QAASA,EAAgB,CAACC,CAAD,CAAOzC,CAAP,CAAa,CAIpC,MAAO,CAACA,CAAAa,KAAA,CAAU,MAAV,CAAR,EAA8Bb,CAAAa,KAAA,CAAU,MAAV,CAA9B,GAAoD4B,CAApD,EAAmF,OAAnF,GAA8DzC,CAAA,CAAK,CAAL,CAAAG,SAJ1B,CAOtCuC,QAASA,EAAQ,CAAC7B,CAAD,CAAOb,CAAP,CAAa,CAAA,IACxB2C,EAAO9B,CAAA8B,KADiB,CAExBF,EAAO5B,CAAA4B,KAEX,OAA2B,UAApB,IAAEE,CAAF,EAAUF,CAAV,GAA2C,kBAA3C,GAAkCA,CAAlC,CAAiE,UAAjE,CACoB,OAApB,IAAEE,CAAF,EAAUF,CAAV,GAA2C,eAA3C,GAAkCA,CAAlC,CAA8D,OAA9D,CACU,OAAV,GAACE,CAAD,EAA2C,aAA3C,GAAkCF,CAAlC,EAAqE,QAArE,GAA4DA,CAA5D,CAAiF,OAAjF,CAA2F,EANtE,CAS9B,MAAO,CACLG,SAAU,GADL,CAELC,QAAS,SAFJ;AAGLC,SAAU,GAHL,CAILC,QAASA,QAAQ,CAAC/C,CAAD,CAAOa,CAAP,CAAa,CAC5B,IAAImC,EAAQN,CAAA,CAAS7B,CAAT,CAAeb,CAAf,CAEZ,OAAO,CACLiD,IAAKA,QAAQ,CAACrC,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoBqC,CAApB,CAA6B,CAC1B,UAAd,GAAIF,CAAJ,GAEEE,CAAAC,SAFF,CAEqBC,QAAQ,CAACC,CAAD,CAAQ,CACjC,MAAiB,CAAA,CAAjB,GAAOA,CAD0B,CAFrC,CADwC,CADrC,CASLC,KAAMA,QAAQ,CAAC1C,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoBqC,CAApB,CAA6B,CAGzCK,QAASA,EAAqB,EAAG,CAC/B,MAAOL,EAAAM,YADwB,CAIjCC,QAASA,EAAgB,CAACC,CAAD,CAAS,CAEhC1D,CAAAa,KAAA,CAAU,cAAV,CADeA,CAAAwC,MACf,EAD6BH,CAAAS,WAC7B,CAFgC,CAKlCC,QAASA,EAAmB,EAAG,CAC7B5D,CAAAa,KAAA,CAAU,cAAV,CAA0B,CAACqC,CAAAC,SAAA,CAAiBD,CAAAS,WAAjB,CAA3B,CAD6B,CAX/B,IAAIE,EAAgBxB,CAAA,CAAiB,UAAjB,CAA6B,UAA7B,CAAyCrC,CAAzC,CAA+C,CAAA,CAA/C,CAepB,QAAQgD,CAAR,EACE,KAAK,OAAL,CACA,KAAK,UAAL,CACMR,CAAA,CAAiBQ,CAAjB,CAAwBhD,CAAxB,CAAJ,EACEA,CAAAa,KAAA,CAAU,MAAV,CAAkBmC,CAAlB,CAEEX,EAAA,CAAiB,cAAjB,CAAiC,aAAjC,CAAgDrC,CAAhD,CAAsD,CAAA,CAAtD,CAAJ,EACEY,CAAAK,OAAA,CAAasC,CAAb,CAA8C,OAAV,GAAAP,CAAA,CAChCS,CADgC,CACbG,CADvB,CAGEC,EAAJ,EACE7D,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAEF;KACF,MAAK,OAAL,CACM2B,CAAA,CAAiBQ,CAAjB,CAAwBhD,CAAxB,CAAJ,EACEA,CAAAa,KAAA,CAAU,MAAV,CAAkB,QAAlB,CAEF,IAAIuB,CAAApB,OAAA,CAAa,WAAb,CAAJ,CAA+B,CAC7B,IAAI8C,EAAoB,CAAC9D,CAAAa,KAAA,CAAU,eAAV,CAArBiD,GACCjD,CAAAkD,eAAA,CAAoB,KAApB,CADDD,EAC+BjD,CAAAkD,eAAA,CAAoB,OAApB,CAD/BD,CAAJ,CAEIE,EAAoB,CAAChE,CAAAa,KAAA,CAAU,eAAV,CAArBmD,GACCnD,CAAAkD,eAAA,CAAoB,KAApB,CADDC,EAC+BnD,CAAAkD,eAAA,CAAoB,OAApB,CAD/BC,CAFJ,CAIIC,EAAoB,CAACjE,CAAAa,KAAA,CAAU,eAAV,CAErBiD,EAAJ,EACEjD,CAAAqD,SAAA,CAAc,KAAd,CAAqBC,QAA+B,CAACT,CAAD,CAAS,CAC3D1D,CAAAa,KAAA,CAAU,eAAV,CAA2B6C,CAA3B,CAD2D,CAA7D,CAIEM,EAAJ,EACEnD,CAAAqD,SAAA,CAAc,KAAd,CAAqBC,QAA+B,CAACT,CAAD,CAAS,CAC3D1D,CAAAa,KAAA,CAAU,eAAV,CAA2B6C,CAA3B,CAD2D,CAA7D,CAIEO,EAAJ,EACErD,CAAAK,OAAA,CAAasC,CAAb,CAAoCa,QAA+B,CAACV,CAAD,CAAS,CAC1E1D,CAAAa,KAAA,CAAU,eAAV,CAA2B6C,CAA3B,CAD0E,CAA5E,CAlB2B,CAuB3BG,CAAJ,EACE7D,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CA1CN,CA+CK,CAAAA,CAAAkD,eAAA,CAAoB,YAApB,CAAL;AAA0Cb,CAAAmB,YAAAC,SAA1C,EACKjC,CAAA,CAAiB,eAAjB,CAAkC,cAAlC,CAAkDrC,CAAlD,CAAwD,CAAA,CAAxD,CADL,EAGEa,CAAAqD,SAAA,CAAc,UAAd,CAA0B,QAAQ,EAAG,CACnClE,CAAAa,KAAA,CAAU,eAAV,CAA2B,CAAE,CAAAA,CAAA,SAA7B,CADmC,CAArC,CAKEwB,EAAA,CAAiB,cAAjB,CAAiC,aAAjC,CAAgDrC,CAAhD,CAAsD,CAAA,CAAtD,CAAJ,EACEY,CAAAK,OAAA,CAAasD,QAA2B,EAAG,CACzC,MAAOrB,EAAAsB,SADkC,CAA3C,CAEGC,QAA8B,CAACf,CAAD,CAAS,CACxC1D,CAAAa,KAAA,CAAU,cAAV,CAA0B,CAAE6C,CAAAA,CAA5B,CADwC,CAF1C,CAxEuC,CATtC,CAHqB,CAJzB,CAtBuC,CAA1B,CAftB,CAAAvB,UAAA,CAwIW,YAxIX,CAwIyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAOA,EAAAF,YAAA,CAAkB,YAAlB,CAAgC,eAAhC,CAAiDpC,CAAjD,CAAgE,CAAA,CAAhE,CAD0C,CAA1B,CAxIzB,CAAAqC,UAAA,CA2IW,YA3IX,CA2IyB,QAAQ,EAAG,CAClC,MAAO,CACLS,SAAU,GADL,CAELC,QAAS,aAFJ,CAGL6B,KAAMA,QAAQ,CAAC9D,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB8D,CAApB,CAAgC,CACvC3E,CAAAa,KAAA,CAAU,WAAV,CAAL,EACEb,CAAAa,KAAA,CAAU,WAAV;AAAuB,WAAvB,CAF0C,CAHzC,CAD2B,CA3IpC,CAAAsB,UAAA,CAsJW,SAtJX,CAsJqB,CAAC,OAAD,CAAU,QAAV,CAAoB,QAAQ,CAACC,CAAD,CAAQwC,CAAR,CAAgB,CAC/D,MAAO,CACLhC,SAAU,GADL,CAELG,QAASA,QAAQ,CAAC/C,CAAD,CAAOa,CAAP,CAAa,CAC5B,IAAIgE,EAAKD,CAAA,CAAO/D,CAAAiE,QAAP,CAAyC,IAAzC,CAAqE,CAAA,CAArE,CACT,OAAO,SAAQ,CAAClE,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB,CAEjC,GAAK,CAAAd,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAAL,GAEMsC,CAAApB,OAAA,CAAa,kBAAb,CAQA,EARqC,CAAAhB,CAAAa,KAAA,CAAU,MAAV,CAQrC,EAPFb,CAAAa,KAAA,CAAU,MAAV,CAAkB,QAAlB,CAOE,CAJAuB,CAAApB,OAAA,CAAa,UAAb,CAIA,EAJ6B,CAAAhB,CAAAa,KAAA,CAAU,UAAV,CAI7B,EAHFb,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAGE,CAAAuB,CAAApB,OAAA,CAAa,cAAb,CAAA,EAAiC+D,CAAAlE,CAAAkE,WAVvC,EAWI/E,CAAAgF,GAAA,CAAQ,UAAR,CAAoB,QAAQ,CAACC,CAAD,CAAQ,CAMlCC,QAASA,EAAQ,EAAG,CAClBL,CAAA,CAAGjE,CAAH,CAAU,CAAEuE,OAAQF,CAAV,CAAV,CADkB,CALpB,IAAIG,EAAUH,CAAAI,MAAVD,EAAyBH,CAAAG,QACb,GAAhB,GAAIA,CAAJ,EAAkC,EAAlC,GAAsBA,CAAtB,EACExE,CAAA0E,OAAA,CAAaJ,CAAb,CAHgC,CAApC,CAb6B,CAFP,CAFzB,CADwD,CAA5C,CAtJrB,CAAA/C,UAAA,CAwLW,YAxLX,CAwLyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAO,SAAQ,CAACxB,CAAD;AAAQZ,CAAR,CAAca,CAAd,CAAoB,CAC7B,CAAAuB,CAAApB,OAAA,CAAa,UAAb,CAAJ,EAAiChB,CAAAa,KAAA,CAAU,UAAV,CAAjC,EAA2Dd,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA3D,EACEE,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAF+B,CADc,CAA1B,CAxLzB,CAvMsC,CAArC,CAAD,CAwYGlB,MAxYH,CAwYWA,MAAAC,QAxYX;", -"sources":["angular-aria.js"], -"names":["window","angular","undefined","nodeBlackList","isNodeOneOf","elem","nodeTypeArray","indexOf","nodeName","module","provider","ngAriaModule","$AriaProvider","watchExpr","attrName","ariaAttr","negate","scope","attr","ariaCamelName","$normalize","config","$watch","boolVal","ariaHidden","ariaChecked","ariaDisabled","ariaRequired","ariaInvalid","ariaValue","tabindex","bindKeypress","bindRoleForClick","this.config","newConfig","extend","$get","this.$get","key","$$watchExpr","directive","$aria","shouldAttachAttr","normalizedAttr","allowBlacklistEls","shouldAttachRole","role","getShape","type","restrict","require","priority","compile","shape","pre","ngModel","$isEmpty","ngModel.$isEmpty","value","post","ngAriaWatchModelValue","$modelValue","getRadioReaction","newVal","$viewValue","getCheckboxReaction","needsTabIndex","needsAriaValuemin","hasOwnProperty","needsAriaValuemax","needsAriaValuenow","$observe","ngAriaValueMinReaction","ngAriaValueNowReaction","$validators","required","ngAriaInvalidWatch","$invalid","ngAriaInvalidReaction","link","ngMessages","$parse","fn","ngClick","ngKeypress","on","event","callback","$event","keyCode","which","$apply"] -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js deleted file mode 100644 index 2157ef03..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.js +++ /dev/null @@ -1,322 +0,0 @@ -/** - * @license AngularJS v1.5.0 - * (c) 2010-2016 Google, Inc. http://angularjs.org - * License: MIT - */ -(function(window, angular, undefined) {'use strict'; - -/** - * @ngdoc module - * @name ngCookies - * @description - * - * # ngCookies - * - * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies. - * - * - *
- * - * See {@link ngCookies.$cookies `$cookies`} for usage. - */ - - -angular.module('ngCookies', ['ng']). - /** - * @ngdoc provider - * @name $cookiesProvider - * @description - * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service. - * */ - provider('$cookies', [function $CookiesProvider() { - /** - * @ngdoc property - * @name $cookiesProvider#defaults - * @description - * - * Object containing default options to pass when setting cookies. - * - * The object may have following properties: - * - * - **path** - `{string}` - The cookie will be available only for this path and its - * sub-paths. By default, this is the URL that appears in your `` tag. - * - **domain** - `{string}` - The cookie will be available only for this domain and - * its sub-domains. For security reasons the user agent will not accept the cookie - * if the current domain is not a sub-domain of this domain or equal to it. - * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" - * or a Date object indicating the exact date/time this cookie will expire. - * - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a - * secured connection. - * - * Note: By default, the address that appears in your `` tag will be used as the path. - * This is important so that cookies will be visible for all routes when html5mode is enabled. - * - **/ - var defaults = this.defaults = {}; - - function calcOptions(options) { - return options ? angular.extend({}, defaults, options) : defaults; - } - - /** - * @ngdoc service - * @name $cookies - * - * @description - * Provides read/write access to browser's cookies. - * - *
- * Up until Angular 1.3, `$cookies` exposed properties that represented the - * current browser cookie values. In version 1.4, this behavior has changed, and - * `$cookies` now provides a standard api of getters, setters etc. - *
- * - * Requires the {@link ngCookies `ngCookies`} module to be installed. - * - * @example - * - * ```js - * angular.module('cookiesExample', ['ngCookies']) - * .controller('ExampleController', ['$cookies', function($cookies) { - * // Retrieving a cookie - * var favoriteCookie = $cookies.get('myFavorite'); - * // Setting a cookie - * $cookies.put('myFavorite', 'oatmeal'); - * }]); - * ``` - */ - this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) { - return { - /** - * @ngdoc method - * @name $cookies#get - * - * @description - * Returns the value of given cookie key - * - * @param {string} key Id to use for lookup. - * @returns {string} Raw cookie value. - */ - get: function(key) { - return $$cookieReader()[key]; - }, - - /** - * @ngdoc method - * @name $cookies#getObject - * - * @description - * Returns the deserialized value of given cookie key - * - * @param {string} key Id to use for lookup. - * @returns {Object} Deserialized cookie value. - */ - getObject: function(key) { - var value = this.get(key); - return value ? angular.fromJson(value) : value; - }, - - /** - * @ngdoc method - * @name $cookies#getAll - * - * @description - * Returns a key value object with all the cookies - * - * @returns {Object} All cookies - */ - getAll: function() { - return $$cookieReader(); - }, - - /** - * @ngdoc method - * @name $cookies#put - * - * @description - * Sets a value for given cookie key - * - * @param {string} key Id for the `value`. - * @param {string} value Raw value to be stored. - * @param {Object=} options Options object. - * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} - */ - put: function(key, value, options) { - $$cookieWriter(key, value, calcOptions(options)); - }, - - /** - * @ngdoc method - * @name $cookies#putObject - * - * @description - * Serializes and sets a value for given cookie key - * - * @param {string} key Id for the `value`. - * @param {Object} value Value to be stored. - * @param {Object=} options Options object. - * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} - */ - putObject: function(key, value, options) { - this.put(key, angular.toJson(value), options); - }, - - /** - * @ngdoc method - * @name $cookies#remove - * - * @description - * Remove given cookie - * - * @param {string} key Id of the key-value pair to delete. - * @param {Object=} options Options object. - * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} - */ - remove: function(key, options) { - $$cookieWriter(key, undefined, calcOptions(options)); - } - }; - }]; - }]); - -angular.module('ngCookies'). -/** - * @ngdoc service - * @name $cookieStore - * @deprecated - * @requires $cookies - * - * @description - * Provides a key-value (string-object) storage, that is backed by session cookies. - * Objects put or retrieved from this storage are automatically serialized or - * deserialized by angular's toJson/fromJson. - * - * Requires the {@link ngCookies `ngCookies`} module to be installed. - * - *
- * **Note:** The $cookieStore service is **deprecated**. - * Please use the {@link ngCookies.$cookies `$cookies`} service instead. - *
- * - * @example - * - * ```js - * angular.module('cookieStoreExample', ['ngCookies']) - * .controller('ExampleController', ['$cookieStore', function($cookieStore) { - * // Put cookie - * $cookieStore.put('myFavorite','oatmeal'); - * // Get cookie - * var favoriteCookie = $cookieStore.get('myFavorite'); - * // Removing a cookie - * $cookieStore.remove('myFavorite'); - * }]); - * ``` - */ - factory('$cookieStore', ['$cookies', function($cookies) { - - return { - /** - * @ngdoc method - * @name $cookieStore#get - * - * @description - * Returns the value of given cookie key - * - * @param {string} key Id to use for lookup. - * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist. - */ - get: function(key) { - return $cookies.getObject(key); - }, - - /** - * @ngdoc method - * @name $cookieStore#put - * - * @description - * Sets a value for given cookie key - * - * @param {string} key Id for the `value`. - * @param {Object} value Value to be stored. - */ - put: function(key, value) { - $cookies.putObject(key, value); - }, - - /** - * @ngdoc method - * @name $cookieStore#remove - * - * @description - * Remove given cookie - * - * @param {string} key Id of the key-value pair to delete. - */ - remove: function(key) { - $cookies.remove(key); - } - }; - - }]); - -/** - * @name $$cookieWriter - * @requires $document - * - * @description - * This is a private service for writing cookies - * - * @param {string} name Cookie name - * @param {string=} value Cookie value (if undefined, cookie will be deleted) - * @param {Object=} options Object with options that need to be stored for the cookie. - */ -function $$CookieWriter($document, $log, $browser) { - var cookiePath = $browser.baseHref(); - var rawDocument = $document[0]; - - function buildCookieString(name, value, options) { - var path, expires; - options = options || {}; - expires = options.expires; - path = angular.isDefined(options.path) ? options.path : cookiePath; - if (angular.isUndefined(value)) { - expires = 'Thu, 01 Jan 1970 00:00:00 GMT'; - value = ''; - } - if (angular.isString(expires)) { - expires = new Date(expires); - } - - var str = encodeURIComponent(name) + '=' + encodeURIComponent(value); - str += path ? ';path=' + path : ''; - str += options.domain ? ';domain=' + options.domain : ''; - str += expires ? ';expires=' + expires.toUTCString() : ''; - str += options.secure ? ';secure' : ''; - - // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum: - // - 300 cookies - // - 20 cookies per unique domain - // - 4096 bytes per cookie - var cookieLength = str.length + 1; - if (cookieLength > 4096) { - $log.warn("Cookie '" + name + - "' possibly not set or overflowed because it was too large (" + - cookieLength + " > 4096 bytes)!"); - } - - return str; - } - - return function(name, value, options) { - rawDocument.cookie = buildCookieString(name, value, options); - }; -} - -$$CookieWriter.$inject = ['$document', '$log', '$browser']; - -angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() { - this.$get = $$CookieWriter; -}); - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js deleted file mode 100644 index d0f126a9..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(p,c,n){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,n,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore", -["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular); -//# sourceMappingURL=angular-cookies.min.js.map diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map deleted file mode 100644 index 555b5103..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-cookies.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ -"version":3, -"file":"angular-cookies.min.js", -"lineCount":8, -"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA2QtCC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB,EACrBE,EAAA,CAAUF,CAAAE,QACVD,EAAA,CAAOZ,CAAAc,UAAA,CAAkBH,CAAAC,KAAlB,CAAA,CAAkCD,CAAAC,KAAlC,CAAiDN,CACpDN,EAAAe,YAAA,CAAoBL,CAApB,CAAJ,GACEG,CACA,CADU,+BACV,CAAAH,CAAA,CAAQ,EAFV,CAIIV,EAAAgB,SAAA,CAAiBH,CAAjB,CAAJ,GACEA,CADF,CACY,IAAII,IAAJ,CAASJ,CAAT,CADZ,CAIIK,EAAAA,CAAMC,kBAAA,CAqB6BV,CArB7B,CAANS,CAAiC,GAAjCA,CAAuCC,kBAAA,CAAmBT,CAAnB,CAE3CQ,EAAA,CADAA,CACA,EADON,CAAA,CAAO,QAAP,CAAkBA,CAAlB,CAAyB,EAChC,GAAOD,CAAAS,OAAA,CAAiB,UAAjB,CAA8BT,CAAAS,OAA9B,CAA+C,EAAtD,CACAF,EAAA,EAAOL,CAAA,CAAU,WAAV,CAAwBA,CAAAQ,YAAA,EAAxB,CAAgD,EACvDH,EAAA,EAAOP,CAAAW,OAAA,CAAiB,SAAjB,CAA6B,EAMhCC,EAAAA,CAAeL,CAAAM,OAAfD,CAA4B,CACb,KAAnB,CAAIA,CAAJ,EACEnB,CAAAqB,KAAA,CAAU,UAAV,CASqChB,CATrC,CACE,6DADF;AAEEc,CAFF,CAEiB,iBAFjB,CASFf,EAAAkB,OAAA,CAJOR,CAG6B,CArCW,CAzPnDlB,CAAA2B,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,SAAA,CAOY,UAPZ,CAOwB,CAACC,QAAyB,EAAG,CAwBjD,IAAIC,EAAW,IAAAA,SAAXA,CAA2B,EAiC/B,KAAAC,KAAA,CAAY,CAAC,gBAAD,CAAmB,gBAAnB,CAAqC,QAAQ,CAACC,CAAD,CAAiBC,CAAjB,CAAiC,CACxF,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CACjB,MAAOH,EAAA,EAAA,CAAiBG,CAAjB,CADU,CAXd,CAyBLC,UAAWA,QAAQ,CAACD,CAAD,CAAM,CAEvB,MAAO,CADHzB,CACG,CADK,IAAAwB,IAAA,CAASC,CAAT,CACL,EAAQnC,CAAAqC,SAAA,CAAiB3B,CAAjB,CAAR,CAAkCA,CAFlB,CAzBpB,CAuCL4B,OAAQA,QAAQ,EAAG,CACjB,MAAON,EAAA,EADU,CAvCd,CAuDLO,IAAKA,QAAQ,CAACJ,CAAD,CAAMzB,CAAN,CAAaC,CAAb,CAAsB,CACjCsB,CAAA,CAAeE,CAAf,CAAoBzB,CAApB,CAAuCC,CAvFpC,CAAUX,CAAAwC,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAuF0BnB,CAvF1B,CAAV,CAAkDmB,CAuFrD,CADiC,CAvD9B,CAuELW,UAAWA,QAAQ,CAACN,CAAD,CAAMzB,CAAN,CAAaC,CAAb,CAAsB,CACvC,IAAA4B,IAAA,CAASJ,CAAT,CAAcnC,CAAA0C,OAAA,CAAehC,CAAf,CAAd,CAAqCC,CAArC,CADuC,CAvEpC,CAsFLgC,OAAQA,QAAQ,CAACR,CAAD,CAAMxB,CAAN,CAAe,CAC7BsB,CAAA,CAAeE,CAAf,CAAoBlC,CAApB,CAA2CU,CAtHxC,CAAUX,CAAAwC,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAsH8BnB,CAtH9B,CAAV,CAAkDmB,CAsHrD,CAD6B,CAtF1B,CADiF,CAA9E,CAzDqC,CAA7B,CAPxB,CA8JA9B,EAAA2B,OAAA,CAAe,WAAf,CAAAiB,QAAA,CAiCS,cAjCT;AAiCyB,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CAErD,MAAO,CAWLX,IAAKA,QAAQ,CAACC,CAAD,CAAM,CACjB,MAAOU,EAAAT,UAAA,CAAmBD,CAAnB,CADU,CAXd,CAyBLI,IAAKA,QAAQ,CAACJ,CAAD,CAAMzB,CAAN,CAAa,CACxBmC,CAAAJ,UAAA,CAAmBN,CAAnB,CAAwBzB,CAAxB,CADwB,CAzBrB,CAsCLiC,OAAQA,QAAQ,CAACR,CAAD,CAAM,CACpBU,CAAAF,OAAA,CAAgBR,CAAhB,CADoB,CAtCjB,CAF8C,CAAhC,CAjCzB,CAqIAjC,EAAA4C,QAAA,CAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzB9C,EAAA2B,OAAA,CAAe,WAAf,CAAAC,SAAA,CAAqC,gBAArC,CAAuDmB,QAA+B,EAAG,CACvF,IAAAhB,KAAA,CAAY7B,CAD2E,CAAzF,CAvTsC,CAArC,CAAD,CA4TGH,MA5TH,CA4TWA,MAAAC,QA5TX;", -"sources":["angular-cookies.js"], -"names":["window","angular","undefined","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","factory","$cookies","$inject","$$CookieWriterProvider"] -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css deleted file mode 100644 index 23134fdf..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-csp.css +++ /dev/null @@ -1,20 +0,0 @@ - -@charset "UTF-8"; - -[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], -.ng-cloak, .x-ng-cloak, -.ng-hide:not(.ng-hide-animate) { - display: none !important; -} - -ng\:form { - display: block; -} - -.ng-animate-shim { - visibility:hidden; -} - -.ng-anchor { - position:absolute; -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js deleted file mode 100644 index 77948fd5..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.js +++ /dev/null @@ -1,484 +0,0 @@ -/** - * @license AngularJS v1.5.0 - * (c) 2010-2016 Google, Inc. http://angularjs.org - * License: MIT - */ - -(function() {'use strict'; - function isFunction(value) {return typeof value === 'function';}; - -/* global: toDebugString: true */ - -function serializeObject(obj) { - var seen = []; - - return JSON.stringify(obj, function(key, val) { - val = toJsonReplacer(key, val); - if (isObject(val)) { - - if (seen.indexOf(val) >= 0) return '...'; - - seen.push(val); - } - return val; - }); -} - -function toDebugString(obj) { - if (typeof obj === 'function') { - return obj.toString().replace(/ \{[\s\S]*$/, ''); - } else if (isUndefined(obj)) { - return 'undefined'; - } else if (typeof obj !== 'string') { - return serializeObject(obj); - } - return obj; -} - -/** - * @description - * - * This object provides a utility for producing rich Error messages within - * Angular. It can be called as follows: - * - * var exampleMinErr = minErr('example'); - * throw exampleMinErr('one', 'This {0} is {1}', foo, bar); - * - * The above creates an instance of minErr in the example namespace. The - * resulting error will have a namespaced error code of example.one. The - * resulting error will replace {0} with the value of foo, and {1} with the - * value of bar. The object is not restricted in the number of arguments it can - * take. - * - * If fewer arguments are specified than necessary for interpolation, the extra - * interpolation markers will be preserved in the final string. - * - * Since data will be parsed statically during a build step, some restrictions - * are applied with respect to how minErr instances are created and called. - * Instances should have names of the form namespaceMinErr for a minErr created - * using minErr('namespace') . Error codes, namespaces and template strings - * should all be static strings, not variables or general expressions. - * - * @param {string} module The namespace to use for the new minErr instance. - * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning - * error from returned function, for cases when a particular type of error is useful. - * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance - */ - -function minErr(module, ErrorConstructor) { - ErrorConstructor = ErrorConstructor || Error; - return function() { - var SKIP_INDEXES = 2; - - var templateArgs = arguments, - code = templateArgs[0], - message = '[' + (module ? module + ':' : '') + code + '] ', - template = templateArgs[1], - paramPrefix, i; - - message += template.replace(/\{\d+\}/g, function(match) { - var index = +match.slice(1, -1), - shiftedIndex = index + SKIP_INDEXES; - - if (shiftedIndex < templateArgs.length) { - return toDebugString(templateArgs[shiftedIndex]); - } - - return match; - }); - - message += '\nhttp://errors.angularjs.org/1.5.0/' + - (module ? module + '/' : '') + code; - - for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { - message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' + - encodeURIComponent(toDebugString(templateArgs[i])); - } - - return new ErrorConstructor(message); - }; -} - -/** - * @ngdoc type - * @name angular.Module - * @module ng - * @description - * - * Interface for configuring angular {@link angular.module modules}. - */ - -function setupModuleLoader(window) { - - var $injectorMinErr = minErr('$injector'); - var ngMinErr = minErr('ng'); - - function ensure(obj, name, factory) { - return obj[name] || (obj[name] = factory()); - } - - var angular = ensure(window, 'angular', Object); - - // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap - angular.$$minErr = angular.$$minErr || minErr; - - return ensure(angular, 'module', function() { - /** @type {Object.} */ - var modules = {}; - - /** - * @ngdoc function - * @name angular.module - * @module ng - * @description - * - * The `angular.module` is a global place for creating, registering and retrieving Angular - * modules. - * All modules (angular core or 3rd party) that should be available to an application must be - * registered using this mechanism. - * - * Passing one argument retrieves an existing {@link angular.Module}, - * whereas passing more than one argument creates a new {@link angular.Module} - * - * - * # Module - * - * A module is a collection of services, directives, controllers, filters, and configuration information. - * `angular.module` is used to configure the {@link auto.$injector $injector}. - * - * ```js - * // Create a new module - * var myModule = angular.module('myModule', []); - * - * // register a new service - * myModule.value('appName', 'MyCoolApp'); - * - * // configure existing services inside initialization blocks. - * myModule.config(['$locationProvider', function($locationProvider) { - * // Configure existing providers - * $locationProvider.hashPrefix('!'); - * }]); - * ``` - * - * Then you can create an injector and load your modules like this: - * - * ```js - * var injector = angular.injector(['ng', 'myModule']) - * ``` - * - * However it's more likely that you'll just use - * {@link ng.directive:ngApp ngApp} or - * {@link angular.bootstrap} to simplify this process for you. - * - * @param {!string} name The name of the module to create or retrieve. - * @param {!Array.=} requires If specified then new module is being created. If - * unspecified then the module is being retrieved for further configuration. - * @param {Function=} configFn Optional configuration function for the module. Same as - * {@link angular.Module#config Module#config()}. - * @returns {angular.Module} new module with the {@link angular.Module} api. - */ - return function module(name, requires, configFn) { - var assertNotHasOwnProperty = function(name, context) { - if (name === 'hasOwnProperty') { - throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); - } - }; - - assertNotHasOwnProperty(name, 'module'); - if (requires && modules.hasOwnProperty(name)) { - modules[name] = null; - } - return ensure(modules, name, function() { - if (!requires) { - throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " + - "the module name or forgot to load it. If registering a module ensure that you " + - "specify the dependencies as the second argument.", name); - } - - /** @type {!Array.>} */ - var invokeQueue = []; - - /** @type {!Array.} */ - var configBlocks = []; - - /** @type {!Array.} */ - var runBlocks = []; - - var config = invokeLater('$injector', 'invoke', 'push', configBlocks); - - /** @type {angular.Module} */ - var moduleInstance = { - // Private state - _invokeQueue: invokeQueue, - _configBlocks: configBlocks, - _runBlocks: runBlocks, - - /** - * @ngdoc property - * @name angular.Module#requires - * @module ng - * - * @description - * Holds the list of modules which the injector will load before the current module is - * loaded. - */ - requires: requires, - - /** - * @ngdoc property - * @name angular.Module#name - * @module ng - * - * @description - * Name of the module. - */ - name: name, - - - /** - * @ngdoc method - * @name angular.Module#provider - * @module ng - * @param {string} name service name - * @param {Function} providerType Construction function for creating new instance of the - * service. - * @description - * See {@link auto.$provide#provider $provide.provider()}. - */ - provider: invokeLaterAndSetModuleName('$provide', 'provider'), - - /** - * @ngdoc method - * @name angular.Module#factory - * @module ng - * @param {string} name service name - * @param {Function} providerFunction Function for creating new instance of the service. - * @description - * See {@link auto.$provide#factory $provide.factory()}. - */ - factory: invokeLaterAndSetModuleName('$provide', 'factory'), - - /** - * @ngdoc method - * @name angular.Module#service - * @module ng - * @param {string} name service name - * @param {Function} constructor A constructor function that will be instantiated. - * @description - * See {@link auto.$provide#service $provide.service()}. - */ - service: invokeLaterAndSetModuleName('$provide', 'service'), - - /** - * @ngdoc method - * @name angular.Module#value - * @module ng - * @param {string} name service name - * @param {*} object Service instance object. - * @description - * See {@link auto.$provide#value $provide.value()}. - */ - value: invokeLater('$provide', 'value'), - - /** - * @ngdoc method - * @name angular.Module#constant - * @module ng - * @param {string} name constant name - * @param {*} object Constant value. - * @description - * Because the constants are fixed, they get applied before other provide methods. - * See {@link auto.$provide#constant $provide.constant()}. - */ - constant: invokeLater('$provide', 'constant', 'unshift'), - - /** - * @ngdoc method - * @name angular.Module#decorator - * @module ng - * @param {string} The name of the service to decorate. - * @param {Function} This function will be invoked when the service needs to be - * instantiated and should return the decorated service instance. - * @description - * See {@link auto.$provide#decorator $provide.decorator()}. - */ - decorator: invokeLaterAndSetModuleName('$provide', 'decorator'), - - /** - * @ngdoc method - * @name angular.Module#animation - * @module ng - * @param {string} name animation name - * @param {Function} animationFactory Factory function for creating new instance of an - * animation. - * @description - * - * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. - * - * - * Defines an animation hook that can be later used with - * {@link $animate $animate} service and directives that use this service. - * - * ```js - * module.animation('.animation-name', function($inject1, $inject2) { - * return { - * eventName : function(element, done) { - * //code to run the animation - * //once complete, then run done() - * return function cancellationFunction(element) { - * //code to cancel the animation - * } - * } - * } - * }) - * ``` - * - * See {@link ng.$animateProvider#register $animateProvider.register()} and - * {@link ngAnimate ngAnimate module} for more information. - */ - animation: invokeLaterAndSetModuleName('$animateProvider', 'register'), - - /** - * @ngdoc method - * @name angular.Module#filter - * @module ng - * @param {string} name Filter name - this must be a valid angular expression identifier - * @param {Function} filterFactory Factory function for creating new instance of filter. - * @description - * See {@link ng.$filterProvider#register $filterProvider.register()}. - * - *
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. - * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace - * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores - * (`myapp_subsection_filterx`). - *
- */ - filter: invokeLaterAndSetModuleName('$filterProvider', 'register'), - - /** - * @ngdoc method - * @name angular.Module#controller - * @module ng - * @param {string|Object} name Controller name, or an object map of controllers where the - * keys are the names and the values are the constructors. - * @param {Function} constructor Controller constructor function. - * @description - * See {@link ng.$controllerProvider#register $controllerProvider.register()}. - */ - controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'), - - /** - * @ngdoc method - * @name angular.Module#directive - * @module ng - * @param {string|Object} name Directive name, or an object map of directives where the - * keys are the names and the values are the factories. - * @param {Function} directiveFactory Factory function for creating new instance of - * directives. - * @description - * See {@link ng.$compileProvider#directive $compileProvider.directive()}. - */ - directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'), - - /** - * @ngdoc method - * @name angular.Module#component - * @module ng - * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp) - * @param {Object} options Component definition object (a simplified - * {@link ng.$compile#directive-definition-object directive definition object}) - * - * @description - * See {@link ng.$compileProvider#component $compileProvider.component()}. - */ - component: invokeLaterAndSetModuleName('$compileProvider', 'component'), - - /** - * @ngdoc method - * @name angular.Module#config - * @module ng - * @param {Function} configFn Execute this function on module load. Useful for service - * configuration. - * @description - * Use this method to register work which needs to be performed on module loading. - * For more about how to configure services, see - * {@link providers#provider-recipe Provider Recipe}. - */ - config: config, - - /** - * @ngdoc method - * @name angular.Module#run - * @module ng - * @param {Function} initializationFn Execute this function after injector creation. - * Useful for application initialization. - * @description - * Use this method to register work which should be performed when the injector is done - * loading all modules. - */ - run: function(block) { - runBlocks.push(block); - return this; - } - }; - - if (configFn) { - config(configFn); - } - - return moduleInstance; - - /** - * @param {string} provider - * @param {string} method - * @param {String=} insertMethod - * @returns {angular.Module} - */ - function invokeLater(provider, method, insertMethod, queue) { - if (!queue) queue = invokeQueue; - return function() { - queue[insertMethod || 'push']([provider, method, arguments]); - return moduleInstance; - }; - } - - /** - * @param {string} provider - * @param {string} method - * @returns {angular.Module} - */ - function invokeLaterAndSetModuleName(provider, method) { - return function(recipeName, factoryFunction) { - if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name; - invokeQueue.push([provider, method, arguments]); - return moduleInstance; - }; - } - }); - }; - }); - -} - -setupModuleLoader(window); -})(window); - -/** - * Closure compiler type information - * - * @typedef { { - * requires: !Array., - * invokeQueue: !Array.>, - * - * service: function(string, Function):angular.Module, - * factory: function(string, Function):angular.Module, - * value: function(string, *):angular.Module, - * - * filter: function(string, Function):angular.Module, - * - * init: function(Function):angular.Module - * } } - */ -angular.Module; - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js deleted file mode 100644 index 316ee26e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-loader.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(){'use strict';function d(b){return function(){var a=arguments[0],e;e="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.5.0/"+(b?b+"/":"")+a;for(a=1;a= line.length) { - index -= line.length; - } else { - return { line: i + 1, column: index + 1 }; - } - } -} -var PARSE_CACHE_FOR_TEXT_LITERALS = Object.create(null); - -function parseTextLiteral(text) { - var cachedFn = PARSE_CACHE_FOR_TEXT_LITERALS[text]; - if (cachedFn != null) { - return cachedFn; - } - function parsedFn(context) { return text; } - parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) { - var unwatch = scope['$watch'](noop, - function textLiteralWatcher() { - if (isFunction(listener)) { listener.call(null, text, text, scope); } - unwatch(); - }, - objectEquality); - return unwatch; - }; - PARSE_CACHE_FOR_TEXT_LITERALS[text] = parsedFn; - parsedFn['exp'] = text; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js - parsedFn['expressions'] = []; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding. - return parsedFn; -} - -function subtractOffset(expressionFn, offset) { - if (offset === 0) { - return expressionFn; - } - function minusOffset(value) { - return (value == void 0) ? value : value - offset; - } - function parsedFn(context) { return minusOffset(expressionFn(context)); } - var unwatch; - parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) { - unwatch = scope['$watch'](expressionFn, - function pluralExpressionWatchListener(newValue, oldValue) { - if (isFunction(listener)) { listener.call(null, minusOffset(newValue), minusOffset(oldValue), scope); } - }, - objectEquality); - return unwatch; - }; - return parsedFn; -} - -// NOTE: ADVANCED_OPTIMIZATIONS mode. -// -// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using -// constructs incompatible with that mode. - -/* global $interpolateMinErr: false */ -/* global isFunction: false */ -/* global noop: false */ - -/** - * @constructor - * @private - */ -function MessageSelectorBase(expressionFn, choices) { - var self = this; - this.expressionFn = expressionFn; - this.choices = choices; - if (choices["other"] === void 0) { - throw $interpolateMinErr('reqother', '“other†is a required option.'); - } - this.parsedFn = function(context) { return self.getResult(context); }; - this.parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) { - return self.watchDelegate(scope, listener, objectEquality); - }; - this.parsedFn['exp'] = expressionFn['exp']; - this.parsedFn['expressions'] = expressionFn['expressions']; -} - -MessageSelectorBase.prototype.getMessageFn = function getMessageFn(value) { - return this.choices[this.categorizeValue(value)]; -}; - -MessageSelectorBase.prototype.getResult = function getResult(context) { - return this.getMessageFn(this.expressionFn(context))(context); -}; - -MessageSelectorBase.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) { - var watchers = new MessageSelectorWatchers(this, scope, listener, objectEquality); - return function() { watchers.cancelWatch(); }; -}; - -/** - * @constructor - * @private - */ -function MessageSelectorWatchers(msgSelector, scope, listener, objectEquality) { - var self = this; - this.scope = scope; - this.msgSelector = msgSelector; - this.listener = listener; - this.objectEquality = objectEquality; - this.lastMessage = void 0; - this.messageFnWatcher = noop; - var expressionFnListener = function(newValue, oldValue) { return self.expressionFnListener(newValue, oldValue); }; - this.expressionFnWatcher = scope['$watch'](msgSelector.expressionFn, expressionFnListener, objectEquality); -} - -MessageSelectorWatchers.prototype.expressionFnListener = function expressionFnListener(newValue, oldValue) { - var self = this; - this.messageFnWatcher(); - var messageFnListener = function(newMessage, oldMessage) { return self.messageFnListener(newMessage, oldMessage); }; - var messageFn = this.msgSelector.getMessageFn(newValue); - this.messageFnWatcher = this.scope['$watch'](messageFn, messageFnListener, this.objectEquality); -}; - -MessageSelectorWatchers.prototype.messageFnListener = function messageFnListener(newMessage, oldMessage) { - if (isFunction(this.listener)) { - this.listener.call(null, newMessage, newMessage === oldMessage ? newMessage : this.lastMessage, this.scope); - } - this.lastMessage = newMessage; -}; - -MessageSelectorWatchers.prototype.cancelWatch = function cancelWatch() { - this.expressionFnWatcher(); - this.messageFnWatcher(); -}; - -/** - * @constructor - * @extends MessageSelectorBase - * @private - */ -function SelectMessage(expressionFn, choices) { - MessageSelectorBase.call(this, expressionFn, choices); -} - -function SelectMessageProto() {} -SelectMessageProto.prototype = MessageSelectorBase.prototype; - -SelectMessage.prototype = new SelectMessageProto(); -SelectMessage.prototype.categorizeValue = function categorizeSelectValue(value) { - return (this.choices[value] !== void 0) ? value : "other"; -}; - -/** - * @constructor - * @extends MessageSelectorBase - * @private - */ -function PluralMessage(expressionFn, choices, offset, pluralCat) { - MessageSelectorBase.call(this, expressionFn, choices); - this.offset = offset; - this.pluralCat = pluralCat; -} - -function PluralMessageProto() {} -PluralMessageProto.prototype = MessageSelectorBase.prototype; - -PluralMessage.prototype = new PluralMessageProto(); -PluralMessage.prototype.categorizeValue = function categorizePluralValue(value) { - if (isNaN(value)) { - return "other"; - } else if (this.choices[value] !== void 0) { - return value; - } else { - var category = this.pluralCat(value - this.offset); - return (this.choices[category] !== void 0) ? category : "other"; - } -}; - -// NOTE: ADVANCED_OPTIMIZATIONS mode. -// -// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using -// constructs incompatible with that mode. - -/* global $interpolateMinErr: false */ -/* global isFunction: false */ -/* global parseTextLiteral: false */ - -/** - * @constructor - * @private - */ -function InterpolationParts(trustedContext, allOrNothing) { - this.trustedContext = trustedContext; - this.allOrNothing = allOrNothing; - this.textParts = []; - this.expressionFns = []; - this.expressionIndices = []; - this.partialText = ''; - this.concatParts = null; -} - -InterpolationParts.prototype.flushPartialText = function flushPartialText() { - if (this.partialText) { - if (this.concatParts == null) { - this.textParts.push(this.partialText); - } else { - this.textParts.push(this.concatParts.join('')); - this.concatParts = null; - } - this.partialText = ''; - } -}; - -InterpolationParts.prototype.addText = function addText(text) { - if (text.length) { - if (!this.partialText) { - this.partialText = text; - } else if (this.concatParts) { - this.concatParts.push(text); - } else { - this.concatParts = [this.partialText, text]; - } - } -}; - -InterpolationParts.prototype.addExpressionFn = function addExpressionFn(expressionFn) { - this.flushPartialText(); - this.expressionIndices.push(this.textParts.length); - this.expressionFns.push(expressionFn); - this.textParts.push(''); -}; - -InterpolationParts.prototype.getExpressionValues = function getExpressionValues(context) { - var expressionValues = new Array(this.expressionFns.length); - for (var i = 0; i < this.expressionFns.length; i++) { - expressionValues[i] = this.expressionFns[i](context); - } - return expressionValues; -}; - -InterpolationParts.prototype.getResult = function getResult(expressionValues) { - for (var i = 0; i < this.expressionIndices.length; i++) { - var expressionValue = expressionValues[i]; - if (this.allOrNothing && expressionValue === void 0) return; - this.textParts[this.expressionIndices[i]] = expressionValue; - } - return this.textParts.join(''); -}; - - -InterpolationParts.prototype.toParsedFn = function toParsedFn(mustHaveExpression, originalText) { - var self = this; - this.flushPartialText(); - if (mustHaveExpression && this.expressionFns.length === 0) { - return void 0; - } - if (this.textParts.length === 0) { - return parseTextLiteral(''); - } - if (this.trustedContext && this.textParts.length > 1) { - $interpolateMinErr['throwNoconcat'](originalText); - } - if (this.expressionFns.length === 0) { - if (this.textParts.length != 1) { this.errorInParseLogic(); } - return parseTextLiteral(this.textParts[0]); - } - var parsedFn = function(context) { - return self.getResult(self.getExpressionValues(context)); - }; - parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) { - return self.watchDelegate(scope, listener, objectEquality); - }; - - parsedFn['exp'] = originalText; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js - parsedFn['expressions'] = new Array(this.expressionFns.length); // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding. - for (var i = 0; i < this.expressionFns.length; i++) { - parsedFn['expressions'][i] = this.expressionFns[i]['exp']; - } - - return parsedFn; -}; - -InterpolationParts.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) { - var watcher = new InterpolationPartsWatcher(this, scope, listener, objectEquality); - return function() { watcher.cancelWatch(); }; -}; - -function InterpolationPartsWatcher(interpolationParts, scope, listener, objectEquality) { - this.interpolationParts = interpolationParts; - this.scope = scope; - this.previousResult = (void 0); - this.listener = listener; - var self = this; - this.expressionFnsWatcher = scope['$watchGroup'](interpolationParts.expressionFns, function(newExpressionValues, oldExpressionValues) { - self.watchListener(newExpressionValues, oldExpressionValues); - }); -} - -InterpolationPartsWatcher.prototype.watchListener = function watchListener(newExpressionValues, oldExpressionValues) { - var result = this.interpolationParts.getResult(newExpressionValues); - if (isFunction(this.listener)) { - this.listener.call(null, result, newExpressionValues === oldExpressionValues ? result : this.previousResult, this.scope); - } - this.previousResult = result; -}; - -InterpolationPartsWatcher.prototype.cancelWatch = function cancelWatch() { - this.expressionFnsWatcher(); -}; - -// NOTE: ADVANCED_OPTIMIZATIONS mode. -// -// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using -// constructs incompatible with that mode. - -/* global $interpolateMinErr: false */ -/* global indexToLineAndColumn: false */ -/* global InterpolationParts: false */ -/* global PluralMessage: false */ -/* global SelectMessage: false */ -/* global subtractOffset: false */ - -// The params src and dst are exactly one of two types: NestedParserState or MessageFormatParser. -// This function is fully optimized by V8. (inspect via IRHydra or --trace-deopt.) -// The idea behind writing it this way is to avoid repeating oneself. This is the ONE place where -// the parser state that is saved/restored when parsing nested mustaches is specified. -function copyNestedParserState(src, dst) { - dst.expressionFn = src.expressionFn; - dst.expressionMinusOffsetFn = src.expressionMinusOffsetFn; - dst.pluralOffset = src.pluralOffset; - dst.choices = src.choices; - dst.choiceKey = src.choiceKey; - dst.interpolationParts = src.interpolationParts; - dst.ruleChoiceKeyword = src.ruleChoiceKeyword; - dst.msgStartIndex = src.msgStartIndex; - dst.expressionStartIndex = src.expressionStartIndex; -} - -function NestedParserState(parser) { - copyNestedParserState(parser, this); -} - -/** - * @constructor - * @private - */ -function MessageFormatParser(text, startIndex, $parse, pluralCat, stringifier, - mustHaveExpression, trustedContext, allOrNothing) { - this.text = text; - this.index = startIndex || 0; - this.$parse = $parse; - this.pluralCat = pluralCat; - this.stringifier = stringifier; - this.mustHaveExpression = !!mustHaveExpression; - this.trustedContext = trustedContext; - this.allOrNothing = !!allOrNothing; - this.expressionFn = null; - this.expressionMinusOffsetFn = null; - this.pluralOffset = null; - this.choices = null; - this.choiceKey = null; - this.interpolationParts = null; - this.msgStartIndex = null; - this.nestedStateStack = []; - this.parsedFn = null; - this.rule = null; - this.ruleStack = null; - this.ruleChoiceKeyword = null; - this.interpNestLevel = null; - this.expressionStartIndex = null; - this.stringStartIndex = null; - this.stringQuote = null; - this.stringInterestsRe = null; - this.angularOperatorStack = null; - this.textPart = null; -} - -// preserve v8 optimization. -var EMPTY_STATE = new NestedParserState(new MessageFormatParser( - /* text= */ '', /* startIndex= */ 0, /* $parse= */ null, /* pluralCat= */ null, /* stringifier= */ null, - /* mustHaveExpression= */ false, /* trustedContext= */ null, /* allOrNothing */ false)); - -MessageFormatParser.prototype.pushState = function pushState() { - this.nestedStateStack.push(new NestedParserState(this)); - copyNestedParserState(EMPTY_STATE, this); -}; - -MessageFormatParser.prototype.popState = function popState() { - if (this.nestedStateStack.length === 0) { - this.errorInParseLogic(); - } - var previousState = this.nestedStateStack.pop(); - copyNestedParserState(previousState, this); -}; - -// Oh my JavaScript! Who knew you couldn't match a regex at a specific -// location in a string but will always search forward?! -// Apparently you'll be growing this ability via the sticky flag (y) in -// ES6. I'll just to work around you for now. -MessageFormatParser.prototype.matchRe = function matchRe(re, search) { - re.lastIndex = this.index; - var match = re.exec(this.text); - if (match != null && (search === true || (match.index == this.index))) { - this.index = re.lastIndex; - return match; - } - return null; -}; - -MessageFormatParser.prototype.searchRe = function searchRe(re) { - return this.matchRe(re, true); -}; - - -MessageFormatParser.prototype.consumeRe = function consumeRe(re) { - // Without the sticky flag, we can't use the .test() method to consume a - // match at the current index. Instead, we'll use the slower .exec() method - // and verify match.index. - return !!this.matchRe(re); -}; - -// Run through our grammar avoiding deeply nested function call chains. -MessageFormatParser.prototype.run = function run(initialRule) { - this.ruleStack = [initialRule]; - do { - this.rule = this.ruleStack.pop(); - while (this.rule) { - this.rule(); - } - this.assertRuleOrNull(this.rule); - } while (this.ruleStack.length > 0); -}; - -MessageFormatParser.prototype.errorInParseLogic = function errorInParseLogic() { - throw $interpolateMinErr('logicbug', - 'The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: “{0}â€', - this.text); -}; - -MessageFormatParser.prototype.assertRuleOrNull = function assertRuleOrNull(rule) { - if (rule === void 0) { - this.errorInParseLogic(); - } -}; - -var NEXT_WORD_RE = /\s*(\w+)\s*/g; -MessageFormatParser.prototype.errorExpecting = function errorExpecting() { - // What was wrong with the syntax? Unsupported type, missing comma, or something else? - var match = this.matchRe(NEXT_WORD_RE), position; - if (match == null) { - position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('reqarg', - 'Expected one of “plural†or “select†at line {0}, column {1} of text “{2}â€', - position.line, position.column, this.text); - } - var word = match[1]; - if (word == "select" || word == "plural") { - position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('reqcomma', - 'Expected a comma after the keyword “{0}†at line {1}, column {2} of text “{3}â€', - word, position.line, position.column, this.text); - } else { - position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('unknarg', - 'Unsupported keyword “{0}†at line {0}, column {1}. Only “plural†and “select†are currently supported. Text: “{3}â€', - word, position.line, position.column, this.text); - } -}; - -var STRING_START_RE = /['"]/g; -MessageFormatParser.prototype.ruleString = function ruleString() { - var match = this.matchRe(STRING_START_RE); - if (match == null) { - var position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('wantstring', - 'Expected the beginning of a string at line {0}, column {1} in text “{2}â€', - position.line, position.column, this.text); - } - this.startStringAtMatch(match); -}; - -MessageFormatParser.prototype.startStringAtMatch = function startStringAtMatch(match) { - this.stringStartIndex = match.index; - this.stringQuote = match[0]; - this.stringInterestsRe = this.stringQuote == "'" ? SQUOTED_STRING_INTEREST_RE : DQUOTED_STRING_INTEREST_RE; - this.rule = this.ruleInsideString; -}; - -var SQUOTED_STRING_INTEREST_RE = /\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g; -var DQUOTED_STRING_INTEREST_RE = /\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g; -MessageFormatParser.prototype.ruleInsideString = function ruleInsideString() { - var match = this.searchRe(this.stringInterestsRe); - if (match == null) { - var position = indexToLineAndColumn(this.text, this.stringStartIndex); - throw $interpolateMinErr('untermstr', - 'The string beginning at line {0}, column {1} is unterminated in text “{2}â€', - position.line, position.column, this.text); - } - var chars = match[0]; - if (match == this.stringQuote) { - this.rule = null; - } -}; - -var PLURAL_OR_SELECT_ARG_TYPE_RE = /\s*(plural|select)\s*,\s*/g; -MessageFormatParser.prototype.rulePluralOrSelect = function rulePluralOrSelect() { - var match = this.searchRe(PLURAL_OR_SELECT_ARG_TYPE_RE); - if (match == null) { - this.errorExpecting(); - } - var argType = match[1]; - switch (argType) { - case "plural": this.rule = this.rulePluralStyle; break; - case "select": this.rule = this.ruleSelectStyle; break; - default: this.errorInParseLogic(); - } -}; - -MessageFormatParser.prototype.rulePluralStyle = function rulePluralStyle() { - this.choices = Object.create(null); - this.ruleChoiceKeyword = this.rulePluralValueOrKeyword; - this.rule = this.rulePluralOffset; -}; - -MessageFormatParser.prototype.ruleSelectStyle = function ruleSelectStyle() { - this.choices = Object.create(null); - this.ruleChoiceKeyword = this.ruleSelectKeyword; - this.rule = this.ruleSelectKeyword; -}; - -var NUMBER_RE = /[0]|(?:[1-9][0-9]*)/g; -var PLURAL_OFFSET_RE = new RegExp("\\s*offset\\s*:\\s*(" + NUMBER_RE.source + ")", "g"); - -MessageFormatParser.prototype.rulePluralOffset = function rulePluralOffset() { - var match = this.matchRe(PLURAL_OFFSET_RE); - this.pluralOffset = (match == null) ? 0 : parseInt(match[1], 10); - this.expressionMinusOffsetFn = subtractOffset(this.expressionFn, this.pluralOffset); - this.rule = this.rulePluralValueOrKeyword; -}; - -MessageFormatParser.prototype.assertChoiceKeyIsNew = function assertChoiceKeyIsNew(choiceKey, index) { - if (this.choices[choiceKey] !== void 0) { - var position = indexToLineAndColumn(this.text, index); - throw $interpolateMinErr('dupvalue', - 'The choice “{0}†is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}â€', - choiceKey, position.line, position.column, this.text); - } -}; - -var SELECT_KEYWORD = /\s*(\w+)/g; -MessageFormatParser.prototype.ruleSelectKeyword = function ruleSelectKeyword() { - var match = this.matchRe(SELECT_KEYWORD); - if (match == null) { - this.parsedFn = new SelectMessage(this.expressionFn, this.choices).parsedFn; - this.rule = null; - return; - } - this.choiceKey = match[1]; - this.assertChoiceKeyIsNew(this.choiceKey, match.index); - this.rule = this.ruleMessageText; -}; - -var EXPLICIT_VALUE_OR_KEYWORD_RE = new RegExp("\\s*(?:(?:=(" + NUMBER_RE.source + "))|(\\w+))", "g"); -MessageFormatParser.prototype.rulePluralValueOrKeyword = function rulePluralValueOrKeyword() { - var match = this.matchRe(EXPLICIT_VALUE_OR_KEYWORD_RE); - if (match == null) { - this.parsedFn = new PluralMessage(this.expressionFn, this.choices, this.pluralOffset, this.pluralCat).parsedFn; - this.rule = null; - return; - } - if (match[1] != null) { - this.choiceKey = parseInt(match[1], 10); - } else { - this.choiceKey = match[2]; - } - this.assertChoiceKeyIsNew(this.choiceKey, match.index); - this.rule = this.ruleMessageText; -}; - -var BRACE_OPEN_RE = /\s*{/g; -var BRACE_CLOSE_RE = /}/g; -MessageFormatParser.prototype.ruleMessageText = function ruleMessageText() { - if (!this.consumeRe(BRACE_OPEN_RE)) { - var position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('reqopenbrace', - 'The plural choice “{0}†must be followed by a message in braces at line {1}, column {2} in text “{3}â€', - this.choiceKey, position.line, position.column, this.text); - } - this.msgStartIndex = this.index; - this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing); - this.rule = this.ruleInInterpolationOrMessageText; -}; - -// Note: Since "\" is used as an escape character, don't allow it to be part of the -// startSymbol/endSymbol when I add the feature to allow them to be redefined. -var INTERP_OR_END_MESSAGE_RE = /\\.|{{|}/g; -var INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE = /\\.|{{|#|}/g; -var ESCAPE_OR_MUSTACHE_BEGIN_RE = /\\.|{{/g; -MessageFormatParser.prototype.advanceInInterpolationOrMessageText = function advanceInInterpolationOrMessageText() { - var currentIndex = this.index, match, re; - if (this.ruleChoiceKeyword == null) { // interpolation - match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE); - if (match == null) { // End of interpolation text. Nothing more to process. - this.textPart = this.text.substring(currentIndex); - this.index = this.text.length; - return null; - } - } else { - match = this.searchRe(this.ruleChoiceKeyword == this.rulePluralValueOrKeyword ? - INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE : INTERP_OR_END_MESSAGE_RE); - if (match == null) { - var position = indexToLineAndColumn(this.text, this.msgStartIndex); - throw $interpolateMinErr('reqendbrace', - 'The plural/select choice “{0}†message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}â€', - this.choiceKey, position.line, position.column, this.text); - } - } - // match is non-null. - var token = match[0]; - this.textPart = this.text.substring(currentIndex, match.index); - return token; -}; - -MessageFormatParser.prototype.ruleInInterpolationOrMessageText = function ruleInInterpolationOrMessageText() { - var currentIndex = this.index; - var token = this.advanceInInterpolationOrMessageText(); - if (token == null) { - // End of interpolation text. Nothing more to process. - this.index = this.text.length; - this.interpolationParts.addText(this.text.substring(currentIndex)); - this.rule = null; - return; - } - if (token[0] == "\\") { - // unescape next character and continue - this.interpolationParts.addText(this.textPart + token[1]); - return; - } - this.interpolationParts.addText(this.textPart); - if (token == "{{") { - this.pushState(); - this.ruleStack.push(this.ruleEndMustacheInInterpolationOrMessage); - this.rule = this.ruleEnteredMustache; - } else if (token == "}") { - this.choices[this.choiceKey] = this.interpolationParts.toParsedFn(/*mustHaveExpression=*/false, this.text); - this.rule = this.ruleChoiceKeyword; - } else if (token == "#") { - this.interpolationParts.addExpressionFn(this.expressionMinusOffsetFn); - } else { - this.errorInParseLogic(); - } -}; - -MessageFormatParser.prototype.ruleInterpolate = function ruleInterpolate() { - this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing); - this.rule = this.ruleInInterpolation; -}; - -MessageFormatParser.prototype.ruleInInterpolation = function ruleInInterpolation() { - var currentIndex = this.index; - var match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE); - if (match == null) { - // End of interpolation text. Nothing more to process. - this.index = this.text.length; - this.interpolationParts.addText(this.text.substring(currentIndex)); - this.parsedFn = this.interpolationParts.toParsedFn(this.mustHaveExpression, this.text); - this.rule = null; - return; - } - var token = match[0]; - if (token[0] == "\\") { - // unescape next character and continue - this.interpolationParts.addText(this.text.substring(currentIndex, match.index) + token[1]); - return; - } - this.interpolationParts.addText(this.text.substring(currentIndex, match.index)); - this.pushState(); - this.ruleStack.push(this.ruleInterpolationEndMustache); - this.rule = this.ruleEnteredMustache; -}; - -MessageFormatParser.prototype.ruleInterpolationEndMustache = function ruleInterpolationEndMustache() { - var expressionFn = this.parsedFn; - this.popState(); - this.interpolationParts.addExpressionFn(expressionFn); - this.rule = this.ruleInInterpolation; -}; - -MessageFormatParser.prototype.ruleEnteredMustache = function ruleEnteredMustache() { - this.parsedFn = null; - this.ruleStack.push(this.ruleEndMustache); - this.rule = this.ruleAngularExpression; -}; - -MessageFormatParser.prototype.ruleEndMustacheInInterpolationOrMessage = function ruleEndMustacheInInterpolationOrMessage() { - var expressionFn = this.parsedFn; - this.popState(); - this.interpolationParts.addExpressionFn(expressionFn); - this.rule = this.ruleInInterpolationOrMessageText; -}; - - - -var INTERP_END_RE = /\s*}}/g; -MessageFormatParser.prototype.ruleEndMustache = function ruleEndMustache() { - var match = this.matchRe(INTERP_END_RE); - if (match == null) { - var position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('reqendinterp', - 'Expecting end of interpolation symbol, “{0}â€, at line {1}, column {2} in text “{3}â€', - '}}', position.line, position.column, this.text); - } - if (this.parsedFn == null) { - // If we parsed a MessageFormat extension, (e.g. select/plural today, maybe more some other - // day), then the result *has* to be a string and those rules would have already set - // this.parsedFn. If there was no MessageFormat extension, then there is no requirement to - // stringify the result and parsedFn isn't set. We set it here. While we could have set it - // unconditionally when exiting the Angular expression, I intend for us to not just replace - // $interpolate, but also to replace $parse in a future version (so ng-bind can work), and in - // such a case we do not want to unnecessarily stringify something if it's not going to be used - // in a string context. - this.parsedFn = this.$parse(this.expressionFn, this.stringifier); - this.parsedFn['exp'] = this.expressionFn['exp']; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js - this.parsedFn['expressions'] = this.expressionFn['expressions']; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding. - } - this.rule = null; -}; - -MessageFormatParser.prototype.ruleAngularExpression = function ruleAngularExpression() { - this.angularOperatorStack = []; - this.expressionStartIndex = this.index; - this.rule = this.ruleInAngularExpression; -}; - -function getEndOperator(opBegin) { - switch (opBegin) { - case "{": return "}"; - case "[": return "]"; - case "(": return ")"; - default: return null; - } -} - -function getBeginOperator(opEnd) { - switch (opEnd) { - case "}": return "{"; - case "]": return "["; - case ")": return "("; - default: return null; - } -} - -// TODO(chirayu): The interpolation endSymbol must also be accounted for. It -// just so happens that "}" is an operator so it's in the list below. But we -// should support any other type of start/end interpolation symbol. -var INTERESTING_OPERATORS_RE = /[[\]{}()'",]/g; -MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularExpression() { - var startIndex = this.index; - var match = this.searchRe(INTERESTING_OPERATORS_RE); - var position; - if (match == null) { - if (this.angularOperatorStack.length === 0) { - // This is the end of the Angular expression so this is actually a - // success. Note that when inside an interpolation, this means we even - // consumed the closing interpolation symbols if they were curlies. This - // is NOT an error at this point but will become an error further up the - // stack when the part that saw the opening curlies is unable to find the - // closing ones. - this.index = this.text.length; - this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index)); - // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js - this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index); - this.expressionFn['expressions'] = this.expressionFn['expressions']; - this.rule = null; - return; - } - var innermostOperator = this.angularOperatorStack[0]; - throw $interpolateMinErr('badexpr', - 'Unexpected end of Angular expression. Expecting operator “{0}†at the end of the text “{1}â€', - this.getEndOperator(innermostOperator), this.text); - } - var operator = match[0]; - if (operator == "'" || operator == '"') { - this.ruleStack.push(this.ruleInAngularExpression); - this.startStringAtMatch(match); - return; - } - if (operator == ",") { - if (this.trustedContext) { - position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('unsafe', - 'Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text “{3}â€', - this.trustedContext, position.line, position.column, this.text); - } - // only the top level comma has relevance. - if (this.angularOperatorStack.length === 0) { - // todo: does this need to be trimmed? - this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, match.index)); - // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js - this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, match.index); - this.expressionFn['expressions'] = this.expressionFn['expressions']; - this.rule = null; - this.rule = this.rulePluralOrSelect; - } - return; - } - if (getEndOperator(operator) != null) { - this.angularOperatorStack.unshift(operator); - return; - } - var beginOperator = getBeginOperator(operator); - if (beginOperator == null) { - this.errorInParseLogic(); - } - if (this.angularOperatorStack.length > 0) { - if (beginOperator == this.angularOperatorStack[0]) { - this.angularOperatorStack.shift(); - return; - } - position = indexToLineAndColumn(this.text, this.index); - throw $interpolateMinErr('badexpr', - 'Unexpected operator “{0}†at line {1}, column {2} in text. Was expecting “{3}â€. Text: “{4}â€', - operator, position.line, position.column, getEndOperator(this.angularOperatorStack[0]), this.text); - } - // We are trying to pop off the operator stack but there really isn't anything to pop off. - this.index = match.index; - this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index)); - // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js - this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index); - this.expressionFn['expressions'] = this.expressionFn['expressions']; - this.rule = null; -}; - -// NOTE: ADVANCED_OPTIMIZATIONS mode. -// -// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using -// constructs incompatible with that mode. - -/* global $interpolateMinErr: false */ -/* global MessageFormatParser: false */ -/* global stringify: false */ - -/** - * @ngdoc service - * @name $$messageFormat - * - * @description - * Angular internal service to recognize MessageFormat extensions in interpolation expressions. - * For more information, see: - * https://docs.google.com/a/google.com/document/d/1pbtW2yvtmFBikfRrJd8VAsabiFkKezmYZ_PbgdjQOVU/edit - * - * ## Example - * - * - * - *
- *
- * {{recipients.length, plural, offset:1 - * =0 {{{sender.name}} gave no gifts (\#=#)} - * =1 {{{sender.name}} gave one gift to {{recipients[0].name}} (\#=#)} - * one {{{sender.name}} gave {{recipients[0].name}} and one other person a gift (\#=#)} - * other {{{sender.name}} gave {{recipients[0].name}} and # other people a gift (\#=#)} - * }} - *
- *
- * - * - * function Person(name, gender) { - * this.name = name; - * this.gender = gender; - * } - * - * var alice = new Person("Alice", "female"), - * bob = new Person("Bob", "male"), - * charlie = new Person("Charlie", "male"), - * harry = new Person("Harry Potter", "male"); - * - * angular.module('msgFmtExample', ['ngMessageFormat']) - * .controller('AppController', ['$scope', function($scope) { - * $scope.recipients = [alice, bob, charlie]; - * $scope.sender = harry; - * $scope.decreaseRecipients = function() { - * --$scope.recipients.length; - * }; - * }]); - * - * - * - * describe('MessageFormat plural', function() { - * it('should pluralize initial values', function() { - * var messageElem = element(by.binding('recipients.length')), decreaseRecipientsBtn = element(by.id('decreaseRecipients')); - * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)'); - * decreaseRecipientsBtn.click(); - * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)'); - * decreaseRecipientsBtn.click(); - * expect(messageElem.getText()).toEqual('Harry Potter gave one gift to Alice (#=0)'); - * decreaseRecipientsBtn.click(); - * expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)'); - * }); - * }); - * - *
- */ -var $$MessageFormatFactory = ['$parse', '$locale', '$sce', '$exceptionHandler', function $$messageFormat( - $parse, $locale, $sce, $exceptionHandler) { - - function getStringifier(trustedContext, allOrNothing, text) { - return function stringifier(value) { - try { - value = trustedContext ? $sce['getTrusted'](trustedContext, value) : $sce['valueOf'](value); - return allOrNothing && (value === void 0) ? value : stringify(value); - } catch (err) { - $exceptionHandler($interpolateMinErr['interr'](text, err)); - } - }; - } - - function interpolate(text, mustHaveExpression, trustedContext, allOrNothing) { - var stringifier = getStringifier(trustedContext, allOrNothing, text); - var parser = new MessageFormatParser(text, 0, $parse, $locale['pluralCat'], stringifier, - mustHaveExpression, trustedContext, allOrNothing); - parser.run(parser.ruleInterpolate); - return parser.parsedFn; - } - - return { - 'interpolate': interpolate - }; -}]; - -var $$interpolateDecorator = ['$$messageFormat', '$delegate', function $$interpolateDecorator($$messageFormat, $interpolate) { - if ($interpolate['startSymbol']() != "{{" || $interpolate['endSymbol']() != "}}") { - throw $interpolateMinErr('nochgmustache', 'angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.'); - } - var interpolate = $$messageFormat['interpolate']; - interpolate['startSymbol'] = $interpolate['startSymbol']; - interpolate['endSymbol'] = $interpolate['endSymbol']; - return interpolate; -}]; - - -/** - * @ngdoc module - * @name ngMessageFormat - * @packageName angular-message-format - * @description - */ -var module = window['angular']['module']('ngMessageFormat', ['ng']); -module['factory']('$$messageFormat', $$MessageFormatFactory); -module['config'](['$provide', function($provide) { - $provide['decorator']('$interpolate', $$interpolateDecorator); -}]); - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js deleted file mode 100644 index f85a5876..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-message-format.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(h){'use strict';function C(a){if(null==a)return"";switch(typeof a){case "string":return a;case "number":return""+a;default:return D(a)}}function f(a,b){for(var d=a.split(/\n/g),k=0;k=c.length)b-=c.length;else return{h:k+1,f:b+1}}}function t(a){function b(){return a}var d=u[a];if(null!=d)return d;b.$$watchDelegate=function(b,d,c){var e=b.$watch(v,function(){m(d)&&d.call(null,a,a,b);e()},c);return e};u[a]=b;b.exp=a;b.expressions=[];return b}function F(a,b){function d(a){return void 0== -a?a:a-b}function c(b){return d(a(b))}if(0===b)return a;var e;c.$$watchDelegate=function(b,c,k){return e=b.$watch(a,function(a,k){m(c)&&c.call(null,d(a),d(k),b)},k)};return c}function l(a,b){var d=this;this.b=a;this.e=b;if(void 0===b.other)throw e("reqother");this.d=function(a){return d.D(a)};this.d.$$watchDelegate=function(a,b,c){return d.P(a,b,c)};this.d.exp=a.exp;this.d.expressions=a.expressions}function n(a,b,d,c){var e=this;this.scope=b;this.oa=a;this.v=d;this.qa=c;this.U=void 0;this.K=v;this.ka= -b.$watch(a.b,function(a){return e.ja(a)},c)}function p(a,b){l.call(this,a,b)}function w(){}function q(a,b,d,c){l.call(this,a,b);this.offset=d;this.M=c}function x(){}function g(a,b){this.u=a;this.B=b;this.i=[];this.g=[];this.J=[];this.s="";this.q=null}function r(a,b,d){this.c=a;this.scope=b;this.W=void 0;this.v=d;var c=this;this.la=b.$watchGroup(a.g,function(a,b){c.Ea(a,b)})}function s(a,b){b.b=a.b;b.C=a.C;b.w=a.w;b.e=a.e;b.k=a.k;b.c=a.c;b.n=a.n;b.F=a.F;b.l=a.l}function y(a){s(a,this)}function c(a, -b,d,c,e,E,f,g){this.text=a;this.index=b||0;this.A=d;this.M=c;this.Da=e;this.pa=!!E;this.u=f;this.B=!!g;this.F=this.c=this.k=this.e=this.w=this.C=this.b=null;this.L=[];this.G=this.j=this.ca=this.O=this.da=this.l=this.n=this.o=this.a=this.d=null}function z(a){switch(a){case "{":return"}";case "[":return"]";case "(":return")";default:return null}}function G(a){switch(a){case "}":return"{";case "]":return"[";case ")":return"(";default:return null}}var e=h.angular.$interpolateMinErr,v=h.angular.noop,m= -h.angular.isFunction,D=h.angular.toJson,u=Object.create(null);l.prototype.T=function(a){return this.e[this.R(a)]};l.prototype.D=function(a){return this.T(this.b(a))(a)};l.prototype.P=function(a,b,d){var c=new n(this,a,b,d);return function(){c.I()}};n.prototype.ja=function(a){var b=this;this.K();a=this.oa.T(a);this.K=this.scope.$watch(a,function(a,c){return b.na(a,c)},this.qa)};n.prototype.na=function(a,b){m(this.v)&&this.v.call(null,a,a===b?a:this.U,this.scope);this.U=a};n.prototype.I=function(){this.ka(); -this.K()};w.prototype=l.prototype;p.prototype=new w;p.prototype.R=function(a){return void 0!==this.e[a]?a:"other"};x.prototype=l.prototype;q.prototype=new x;q.prototype.R=function(a){if(isNaN(a))return"other";if(void 0!==this.e[a])return a;a=this.M(a-this.offset);return void 0!==this.e[a]?a:"other"};g.prototype.S=function(){this.s&&(null==this.q?this.i.push(this.s):(this.i.push(this.q.join("")),this.q=null),this.s="")};g.prototype.p=function(a){a.length&&(this.s?this.q?this.q.push(a):this.q=[this.s, -a]:this.s=a)};g.prototype.H=function(a){this.S();this.J.push(this.i.length);this.g.push(a);this.i.push("")};g.prototype.ma=function(a){for(var b=Array(this.g.length),d=0;d - * - *
- *
You did not enter a field
- *
- * Your email must be between 5 and 100 characters long - *
- *
- * - * ``` - * - * Now whatever key/value entries are present within the provided object (in this case `$error`) then - * the ngMessages directive will render the inner first ngMessage directive (depending if the key values - * match the attribute value present on each ngMessage directive). In other words, if your errors - * object contains the following data: - * - * ```javascript - * - * myField.$error = { minlength : true, required : true }; - * ``` - * - * Then the `required` message will be displayed first. When required is false then the `minlength` message - * will be displayed right after (since these messages are ordered this way in the template HTML code). - * The prioritization of each message is determined by what order they're present in the DOM. - * Therefore, instead of having custom JavaScript code determine the priority of what errors are - * present before others, the presentation of the errors are handled within the template. - * - * By default, ngMessages will only display one error at a time. However, if you wish to display all - * messages then the `ng-messages-multiple` attribute flag can be used on the element containing the - * ngMessages directive to make this happen. - * - * ```html - * - *
...
- * - * - * ... - * ``` - * - * ## Reusing and Overriding Messages - * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline - * template. This allows for generic collection of messages to be reused across multiple parts of an - * application. - * - * ```html - * - * - *
- *
- *
- * ``` - * - * However, including generic messages may not be useful enough to match all input fields, therefore, - * `ngMessages` provides the ability to override messages defined in the remote template by redefining - * them within the directive container. - * - * ```html - * - * - * - *
- * - * - *
- * - *
You did not enter your email address
- * - * - *
Your email address is invalid
- * - * - *
- *
- *
- * ``` - * - * In the example HTML code above the message that is set on required will override the corresponding - * required message defined within the remote template. Therefore, with particular input fields (such - * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied - * while more generic messages can be used to handle other, more general input errors. - * - * ## Dynamic Messaging - * ngMessages also supports using expressions to dynamically change key values. Using arrays and - * repeaters to list messages is also supported. This means that the code below will be able to - * fully adapt itself and display the appropriate message when any of the expression data changes: - * - * ```html - *
- * - *
- *
You did not enter your email address
- *
- * - *
{{ errorMessage.text }}
- *
- *
- *
- * ``` - * - * The `errorMessage.type` expression can be a string value or it can be an array so - * that multiple errors can be associated with a single error message: - * - * ```html - * - *
- *
You did not enter your email address
- *
- * Your email must be between 5 and 100 characters long - *
- *
- * ``` - * - * Feel free to use other structural directives such as ng-if and ng-switch to further control - * what messages are active and when. Be careful, if you place ng-message on the same element - * as these structural directives, Angular may not be able to determine if a message is active - * or not. Therefore it is best to place the ng-message on a child element of the structural - * directive. - * - * ```html - *
- *
- *
Please enter something
- *
- *
- * ``` - * - * ## Animations - * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and - * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from - * the DOM by the `ngMessages` directive. - * - * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS - * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no - * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can - * hook into the animations whenever these classes are added/removed. - * - * Let's say that our HTML code for our messages container looks like so: - * - * ```html - * - * ``` - * - * Then the CSS animation code for the message container looks like so: - * - * ```css - * .my-messages { - * transition:1s linear all; - * } - * .my-messages.ng-active { - * // messages are visible - * } - * .my-messages.ng-inactive { - * // messages are hidden - * } - * ``` - * - * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter - * and leave animation is triggered for each particular element bound to the `ngMessage` directive. - * - * Therefore, the CSS code for the inner messages looks like so: - * - * ```css - * .some-message { - * transition:1s linear all; - * } - * - * .some-message.ng-enter {} - * .some-message.ng-enter.ng-enter-active {} - * - * .some-message.ng-leave {} - * .some-message.ng-leave.ng-leave-active {} - * ``` - * - * {@link ngAnimate Click here} to learn how to use JavaScript animations or to learn more about ngAnimate. - */ -angular.module('ngMessages', []) - - /** - * @ngdoc directive - * @module ngMessages - * @name ngMessages - * @restrict AE - * - * @description - * `ngMessages` is a directive that is designed to show and hide messages based on the state - * of a key/value object that it listens on. The directive itself complements error message - * reporting with the `ngModel` $error object (which stores a key/value state of validation errors). - * - * `ngMessages` manages the state of internal messages within its container element. The internal - * messages use the `ngMessage` directive and will be inserted/removed from the page depending - * on if they're present within the key/value object. By default, only one message will be displayed - * at a time and this depends on the prioritization of the messages within the template. (This can - * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.) - * - * A remote template can also be used to promote message reusability and messages can also be - * overridden. - * - * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. - * - * @usage - * ```html - * - * - * ... - * ... - * ... - * - * - * - * - * ... - * ... - * ... - * - * ``` - * - * @param {string} ngMessages an angular expression evaluating to a key/value object - * (this is typically the $error object on an ngModel instance). - * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true - * - * @example - * - * - *
- * - *
myForm.myName.$error = {{ myForm.myName.$error | json }}
- * - *
- *
You did not enter a field
- *
Your field is too short
- *
Your field is too long
- *
- *
- *
- * - * angular.module('ngMessagesExample', ['ngMessages']); - * - *
- */ - .directive('ngMessages', ['$animate', function($animate) { - var ACTIVE_CLASS = 'ng-active'; - var INACTIVE_CLASS = 'ng-inactive'; - - return { - require: 'ngMessages', - restrict: 'AE', - controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) { - var ctrl = this; - var latestKey = 0; - var nextAttachId = 0; - - this.getAttachId = function getAttachId() { return nextAttachId++; }; - - var messages = this.messages = {}; - var renderLater, cachedCollection; - - this.render = function(collection) { - collection = collection || {}; - - renderLater = false; - cachedCollection = collection; - - // this is true if the attribute is empty or if the attribute value is truthy - var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) || - isAttrTruthy($scope, $attrs.multiple); - - var unmatchedMessages = []; - var matchedKeys = {}; - var messageItem = ctrl.head; - var messageFound = false; - var totalMessages = 0; - - // we use != instead of !== to allow for both undefined and null values - while (messageItem != null) { - totalMessages++; - var messageCtrl = messageItem.message; - - var messageUsed = false; - if (!messageFound) { - forEach(collection, function(value, key) { - if (!messageUsed && truthy(value) && messageCtrl.test(key)) { - // this is to prevent the same error name from showing up twice - if (matchedKeys[key]) return; - matchedKeys[key] = true; - - messageUsed = true; - messageCtrl.attach(); - } - }); - } - - if (messageUsed) { - // unless we want to display multiple messages then we should - // set a flag here to avoid displaying the next message in the list - messageFound = !multiple; - } else { - unmatchedMessages.push(messageCtrl); - } - - messageItem = messageItem.next; - } - - forEach(unmatchedMessages, function(messageCtrl) { - messageCtrl.detach(); - }); - - unmatchedMessages.length !== totalMessages - ? $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS) - : $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS); - }; - - $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render); - - this.reRender = function() { - if (!renderLater) { - renderLater = true; - $scope.$evalAsync(function() { - if (renderLater) { - cachedCollection && ctrl.render(cachedCollection); - } - }); - } - }; - - this.register = function(comment, messageCtrl) { - var nextKey = latestKey.toString(); - messages[nextKey] = { - message: messageCtrl - }; - insertMessageNode($element[0], comment, nextKey); - comment.$$ngMessageNode = nextKey; - latestKey++; - - ctrl.reRender(); - }; - - this.deregister = function(comment) { - var key = comment.$$ngMessageNode; - delete comment.$$ngMessageNode; - removeMessageNode($element[0], comment, key); - delete messages[key]; - ctrl.reRender(); - }; - - function findPreviousMessage(parent, comment) { - var prevNode = comment; - var parentLookup = []; - while (prevNode && prevNode !== parent) { - var prevKey = prevNode.$$ngMessageNode; - if (prevKey && prevKey.length) { - return messages[prevKey]; - } - - // dive deeper into the DOM and examine its children for any ngMessage - // comments that may be in an element that appears deeper in the list - if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) == -1) { - parentLookup.push(prevNode); - prevNode = prevNode.childNodes[prevNode.childNodes.length - 1]; - } else { - prevNode = prevNode.previousSibling || prevNode.parentNode; - } - } - } - - function insertMessageNode(parent, comment, key) { - var messageNode = messages[key]; - if (!ctrl.head) { - ctrl.head = messageNode; - } else { - var match = findPreviousMessage(parent, comment); - if (match) { - messageNode.next = match.next; - match.next = messageNode; - } else { - messageNode.next = ctrl.head; - ctrl.head = messageNode; - } - } - } - - function removeMessageNode(parent, comment, key) { - var messageNode = messages[key]; - - var match = findPreviousMessage(parent, comment); - if (match) { - match.next = messageNode.next; - } else { - ctrl.head = messageNode.next; - } - } - }] - }; - - function isAttrTruthy(scope, attr) { - return (isString(attr) && attr.length === 0) || //empty attribute - truthy(scope.$eval(attr)); - } - - function truthy(val) { - return isString(val) ? val.length : !!val; - } - }]) - - /** - * @ngdoc directive - * @name ngMessagesInclude - * @restrict AE - * @scope - * - * @description - * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template - * code from a remote template and place the downloaded template code into the exact spot - * that the ngMessagesInclude directive is placed within the ngMessages container. This allows - * for a series of pre-defined messages to be reused and also allows for the developer to - * determine what messages are overridden due to the placement of the ngMessagesInclude directive. - * - * @usage - * ```html - * - * - * ... - * - * - * - * - * ... - * - * ``` - * - * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. - * - * @param {string} ngMessagesInclude|src a string value corresponding to the remote template. - */ - .directive('ngMessagesInclude', - ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) { - - return { - restrict: 'AE', - require: '^^ngMessages', // we only require this for validation sake - link: function($scope, element, attrs) { - var src = attrs.ngMessagesInclude || attrs.src; - $templateRequest(src).then(function(html) { - $compile(html)($scope, function(contents) { - element.after(contents); - - // the anchor is placed for debugging purposes - var anchor = jqLite($document[0].createComment(' ngMessagesInclude: ' + src + ' ')); - element.after(anchor); - - // we don't want to pollute the DOM anymore by keeping an empty directive element - element.remove(); - }); - }); - } - }; - }]) - - /** - * @ngdoc directive - * @name ngMessage - * @restrict AE - * @scope - * - * @description - * `ngMessage` is a directive with the purpose to show and hide a particular message. - * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element - * must be situated since it determines which messages are visible based on the state - * of the provided key/value map that `ngMessages` listens on. - * - * More information about using `ngMessage` can be found in the - * {@link module:ngMessages `ngMessages` module documentation}. - * - * @usage - * ```html - * - * - * ... - * ... - * - * - * - * - * ... - * ... - * - * ``` - * - * @param {expression} ngMessage|when a string value corresponding to the message key. - */ - .directive('ngMessage', ngMessageDirectiveFactory()) - - - /** - * @ngdoc directive - * @name ngMessageExp - * @restrict AE - * @priority 1 - * @scope - * - * @description - * `ngMessageExp` is a directive with the purpose to show and hide a particular message. - * For `ngMessageExp` to operate, a parent `ngMessages` directive on a parent DOM element - * must be situated since it determines which messages are visible based on the state - * of the provided key/value map that `ngMessages` listens on. - * - * @usage - * ```html - * - * - * ... - * - * - * - * - * ... - * - * ``` - * - * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. - * - * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key. - */ - .directive('ngMessageExp', ngMessageDirectiveFactory()); - -function ngMessageDirectiveFactory() { - return ['$animate', function($animate) { - return { - restrict: 'AE', - transclude: 'element', - priority: 1, // must run before ngBind, otherwise the text is set on the comment - terminal: true, - require: '^^ngMessages', - link: function(scope, element, attrs, ngMessagesCtrl, $transclude) { - var commentNode = element[0]; - - var records; - var staticExp = attrs.ngMessage || attrs.when; - var dynamicExp = attrs.ngMessageExp || attrs.whenExp; - var assignRecords = function(items) { - records = items - ? (isArray(items) - ? items - : items.split(/[\s,]+/)) - : null; - ngMessagesCtrl.reRender(); - }; - - if (dynamicExp) { - assignRecords(scope.$eval(dynamicExp)); - scope.$watchCollection(dynamicExp, assignRecords); - } else { - assignRecords(staticExp); - } - - var currentElement, messageCtrl; - ngMessagesCtrl.register(commentNode, messageCtrl = { - test: function(name) { - return contains(records, name); - }, - attach: function() { - if (!currentElement) { - $transclude(scope, function(elm) { - $animate.enter(elm, null, element); - currentElement = elm; - - // Each time we attach this node to a message we get a new id that we can match - // when we are destroying the node later. - var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId(); - - // in the event that the parent element is destroyed - // by any other structural directive then it's time - // to deregister the message from the controller - currentElement.on('$destroy', function() { - if (currentElement && currentElement.$$attachId === $$attachId) { - ngMessagesCtrl.deregister(commentNode); - messageCtrl.detach(); - } - }); - }); - } - }, - detach: function() { - if (currentElement) { - var elm = currentElement; - currentElement = null; - $animate.leave(elm); - } - } - }); - } - }; - }]; - - function contains(collection, key) { - if (collection) { - return isArray(collection) - ? collection.indexOf(key) >= 0 - : collection.hasOwnProperty(key); - } - } -} - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js deleted file mode 100644 index 19f59cc8..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(A,d,B){'use strict';function l(){return["$animate",function(v){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(n,r,a,b,m){var k=r[0],f,p=a.ngMessage||a.when;a=a.ngMessageExp||a.whenExp;var d=function(a){f=a?w(a)?a:a.split(/[\s,]+/):null;b.reRender()};a?(d(n.$eval(a)),n.$watchCollection(a,d)):d(p);var e,q;b.register(k,q={test:function(a){var g=f;a=g?w(g)?0<=g.indexOf(a):g.hasOwnProperty(a):void 0;return a},attach:function(){e||m(n,function(a){v.enter(a, -null,r);e=a;var g=e.$$attachId=b.getAttachId();e.on("$destroy",function(){e&&e.$$attachId===g&&(b.deregister(k),q.detach())})})},detach:function(){if(e){var a=e;e=null;v.leave(a)}}})}}}]}var w=d.isArray,x=d.forEach,y=d.isString,z=d.element;d.module("ngMessages",[]).directive("ngMessages",["$animate",function(d){function n(a,b){return y(b)&&0===b.length||r(a.$eval(b))}function r(a){return y(a)?a.length:!!a}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(a, -b,m){function k(a,b){for(var c=b,f=[];c&&c!==a;){var h=c.$$ngMessageNode;if(h&&h.length)return e[h];c.childNodes.length&&-1==f.indexOf(c)?(f.push(c),c=c.childNodes[c.childNodes.length-1]):c=c.previousSibling||c.parentNode}}var f=this,p=0,l=0;this.getAttachId=function(){return l++};var e=this.messages={},q,s;this.render=function(g){g=g||{};q=!1;s=g;for(var e=n(b,m.ngMessagesMultiple)||n(b,m.multiple),c=[],k={},h=f.head,p=!1,l=0;null!=h;){l++;var t=h.message,u=!1;p||x(g,function(a,c){!u&&r(a)&&t.test(c)&& -!k[c]&&(u=k[c]=!0,t.attach())});u?p=!e:c.push(t);h=h.next}x(c,function(a){a.detach()});c.length!==l?d.setClass(a,"ng-active","ng-inactive"):d.setClass(a,"ng-inactive","ng-active")};b.$watchCollection(m.ngMessages||m["for"],f.render);this.reRender=function(){q||(q=!0,b.$evalAsync(function(){q&&s&&f.render(s)}))};this.register=function(g,b){var c=p.toString();e[c]={message:b};var d=a[0],h=e[c];f.head?(d=k(d,g))?(h.next=d.next,d.next=h):(h.next=f.head,f.head=h):f.head=h;g.$$ngMessageNode=c;p++;f.reRender()}; -this.deregister=function(b){var d=b.$$ngMessageNode;delete b.$$ngMessageNode;var c=e[d];(b=k(a[0],b))?b.next=c.next:f.head=c.next;delete e[d];f.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(d,n,l){return{restrict:"AE",require:"^^ngMessages",link:function(a,b,m){var k=m.ngMessagesInclude||m.src;d(k).then(function(d){l(d)(a,function(a){b.after(a);a=z(n[0].createComment(" ngMessagesInclude: "+k+" "));b.after(a);b.remove()})})}}}]).directive("ngMessage", -l()).directive("ngMessageExp",l())})(window,window.angular); -//# sourceMappingURL=angular-messages.min.js.map diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map deleted file mode 100644 index 0cb2a943..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-messages.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ -"version":3, -"file":"angular-messages.min.js", -"lineCount":11, -"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA0lBtCC,QAASA,EAAyB,EAAG,CACnC,MAAO,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CACrC,MAAO,CACLC,SAAU,IADL,CAELC,WAAY,SAFP,CAGLC,SAAU,CAHL,CAILC,SAAU,CAAA,CAJL,CAKLC,QAAS,cALJ,CAMLC,KAAMA,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAwBC,CAAxB,CAAwCC,CAAxC,CAAqD,CACjE,IAAIC,EAAcJ,CAAA,CAAQ,CAAR,CAAlB,CAEIK,CAFJ,CAGIC,EAAYL,CAAAM,UAAZD,EAA+BL,CAAAO,KAC/BC,EAAAA,CAAaR,CAAAS,aAAbD,EAAmCR,CAAAU,QACvC,KAAIC,EAAgBA,QAAQ,CAACC,CAAD,CAAQ,CAClCR,CAAA,CAAUQ,CAAA,CACHC,CAAA,CAAQD,CAAR,CAAA,CACKA,CADL,CAEKA,CAAAE,MAAA,CAAY,QAAZ,CAHF,CAIJ,IACNb,EAAAc,SAAA,EANkC,CAShCP,EAAJ,EACEG,CAAA,CAAcb,CAAAkB,MAAA,CAAYR,CAAZ,CAAd,CACA,CAAAV,CAAAmB,iBAAA,CAAuBT,CAAvB,CAAmCG,CAAnC,CAFF,EAIEA,CAAA,CAAcN,CAAd,CAnB+D,KAsB7Da,CAtB6D,CAsB7CC,CACpBlB,EAAAmB,SAAA,CAAwBjB,CAAxB,CAAqCgB,CAArC,CAAmD,CACjDE,KAAMA,QAAQ,CAACC,CAAD,CAAO,CACHlB,IAAAA,EAAAA,CAsCtB,EAAA,CADEmB,CAAJ,CACSV,CAAA,CAAQU,CAAR,CAAA,CAC0B,CAD1B,EACDA,CAAAC,QAAA,CAvCyBF,CAuCzB,CADC,CAEDC,CAAAE,eAAA,CAxCyBH,CAwCzB,CAHR,CADiC,IAAA,EApCzB,OAAO,EADY,CAD4B,CAIjDI,OAAQA,QAAQ,EAAG,CACZR,CAAL,EACEhB,CAAA,CAAYJ,CAAZ,CAAmB,QAAQ,CAAC6B,CAAD,CAAM,CAC/BpC,CAAAqC,MAAA,CAAeD,CAAf;AAAoB,IAApB,CAA0B5B,CAA1B,CACAmB,EAAA,CAAiBS,CAIjB,KAAIE,EAAaX,CAAAW,WAAbA,CAAyC5B,CAAA6B,YAAA,EAK7CZ,EAAAa,GAAA,CAAkB,UAAlB,CAA8B,QAAQ,EAAG,CACnCb,CAAJ,EAAsBA,CAAAW,WAAtB,GAAoDA,CAApD,GACE5B,CAAA+B,WAAA,CAA0B7B,CAA1B,CACA,CAAAgB,CAAAc,OAAA,EAFF,CADuC,CAAzC,CAX+B,CAAjC,CAFe,CAJ8B,CA0BjDA,OAAQA,QAAQ,EAAG,CACjB,GAAIf,CAAJ,CAAoB,CAClB,IAAIS,EAAMT,CACVA,EAAA,CAAiB,IACjB3B,EAAA2C,MAAA,CAAeP,CAAf,CAHkB,CADH,CA1B8B,CAAnD,CAvBiE,CAN9D,CAD8B,CAAhC,CAD4B,CAtlBrC,IAAId,EAAUzB,CAAAyB,QAAd,CACIsB,EAAU/C,CAAA+C,QADd,CAEIC,EAAWhD,CAAAgD,SAFf,CAGIC,EAASjD,CAAAW,QA4ObX,EAAAkD,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,UAAA,CA0Ec,YA1Ed,CA0E4B,CAAC,UAAD,CAAa,QAAQ,CAAChD,CAAD,CAAW,CA0JvDiD,QAASA,EAAY,CAAC1C,CAAD,CAAQ2C,CAAR,CAAc,CAClC,MAAQL,EAAA,CAASK,CAAT,CAAR,EAA0C,CAA1C,GAA0BA,CAAAC,OAA1B,EACOC,CAAA,CAAO7C,CAAAkB,MAAA,CAAYyB,CAAZ,CAAP,CAF2B,CAKnCE,QAASA,EAAM,CAACC,CAAD,CAAM,CACnB,MAAOR,EAAA,CAASQ,CAAT,CAAA,CAAgBA,CAAAF,OAAhB,CAA6B,CAAEE,CAAAA,CADnB,CA3JrB,MAAO,CACLhD,QAAS,YADJ,CAELJ,SAAU,IAFL,CAGLqD,WAAY,CAAC,UAAD,CAAa,QAAb,CAAuB,QAAvB,CAAiC,QAAQ,CAACC,CAAD;AAAWC,CAAX,CAAmBC,CAAnB,CAA2B,CAkG9EC,QAASA,EAAmB,CAACC,CAAD,CAASC,CAAT,CAAkB,CAG5C,IAFA,IAAIC,EAAWD,CAAf,CACIE,EAAe,EACnB,CAAOD,CAAP,EAAmBA,CAAnB,GAAgCF,CAAhC,CAAA,CAAwC,CACtC,IAAII,EAAUF,CAAAG,gBACd,IAAID,CAAJ,EAAeA,CAAAZ,OAAf,CACE,MAAOc,EAAA,CAASF,CAAT,CAKLF,EAAAK,WAAAf,OAAJ,EAAqE,EAArE,EAAkCW,CAAA7B,QAAA,CAAqB4B,CAArB,CAAlC,EACEC,CAAAK,KAAA,CAAkBN,CAAlB,CACA,CAAAA,CAAA,CAAWA,CAAAK,WAAA,CAAoBL,CAAAK,WAAAf,OAApB,CAAiD,CAAjD,CAFb,EAIEU,CAJF,CAIaA,CAAAO,gBAJb,EAIyCP,CAAAQ,WAZH,CAHI,CAjG9C,IAAIC,EAAO,IAAX,CACIC,EAAY,CADhB,CAEIC,EAAe,CAEnB,KAAAjC,YAAA,CAAmBkC,QAAoB,EAAG,CAAE,MAAOD,EAAA,EAAT,CAE1C,KAAIP,EAAW,IAAAA,SAAXA,CAA2B,EAA/B,CACIS,CADJ,CACiBC,CAEjB,KAAAC,OAAA,CAAcC,QAAQ,CAAC7C,CAAD,CAAa,CACjCA,CAAA,CAAaA,CAAb,EAA2B,EAE3B0C,EAAA,CAAc,CAAA,CACdC,EAAA,CAAmB3C,CAanB,KAVA,IAAI8C,EAAW7B,CAAA,CAAaO,CAAb,CAAqBC,CAAAsB,mBAArB,CAAXD,EACW7B,CAAA,CAAaO,CAAb,CAAqBC,CAAAqB,SAArB,CADf,CAGIE,EAAoB,EAHxB,CAIIC,EAAc,EAJlB,CAKIC,EAAcZ,CAAAa,KALlB,CAMIC,EAAe,CAAA,CANnB,CAOIC,EAAgB,CAGpB,CAAsB,IAAtB,EAAOH,CAAP,CAAA,CAA4B,CAC1BG,CAAA,EACA,KAAIzD,EAAcsD,CAAAI,QAAlB,CAEIC,EAAc,CAAA,CACbH,EAAL,EACExC,CAAA,CAAQZ,CAAR,CAAoB,QAAQ,CAACwD,CAAD,CAAQC,CAAR,CAAa,CAClCF,CAAAA,CAAL,EAAoBnC,CAAA,CAAOoC,CAAP,CAApB,EAAqC5D,CAAAE,KAAA,CAAiB2D,CAAjB,CAArC;AAEM,CAAAR,CAAA,CAAYQ,CAAZ,CAFN,GAKEF,CACA,CAHAN,CAAA,CAAYQ,CAAZ,CAGA,CAHmB,CAAA,CAGnB,CAAA7D,CAAAO,OAAA,EANF,CADuC,CAAzC,CAYEoD,EAAJ,CAGEH,CAHF,CAGiB,CAACN,CAHlB,CAKEE,CAAAb,KAAA,CAAuBvC,CAAvB,CAGFsD,EAAA,CAAcA,CAAAQ,KA1BY,CA6B5B9C,CAAA,CAAQoC,CAAR,CAA2B,QAAQ,CAACpD,CAAD,CAAc,CAC/CA,CAAAc,OAAA,EAD+C,CAAjD,CAIAsC,EAAA7B,OAAA,GAA6BkC,CAA7B,CACKrF,CAAA2F,SAAA,CAAkBpC,CAAlB,CAnEQqC,WAmER,CAlEUC,aAkEV,CADL,CAEK7F,CAAA2F,SAAA,CAAkBpC,CAAlB,CAnEUsC,aAmEV,CApEQD,WAoER,CApD4B,CAuDnCpC,EAAA9B,iBAAA,CAAwB+B,CAAAqC,WAAxB,EAA6CrC,CAAA,CAAO,KAAP,CAA7C,CAA4Da,CAAAM,OAA5D,CAEA,KAAApD,SAAA,CAAgBuE,QAAQ,EAAG,CACpBrB,CAAL,GACEA,CACA,CADc,CAAA,CACd,CAAAlB,CAAAwC,WAAA,CAAkB,QAAQ,EAAG,CACvBtB,CAAJ,EACEC,CADF,EACsBL,CAAAM,OAAA,CAAYD,CAAZ,CAFK,CAA7B,CAFF,CADyB,CAW3B,KAAA9C,SAAA,CAAgBoE,QAAQ,CAACrC,CAAD,CAAUhC,CAAV,CAAuB,CAC7C,IAAIsE,EAAU3B,CAAA4B,SAAA,EACdlC,EAAA,CAASiC,CAAT,CAAA,CAAoB,CAClBZ,QAAS1D,CADS,CAGF,KAAA,EAAA2B,CAAA,CAAS,CAAT,CAAA,CAoCd6C,EAAcnC,CAAA,CApCsBiC,CAoCtB,CACb5B,EAAAa,KAAL,CAIE,CADIkB,CACJ,CADY3C,CAAA,CAAoBC,CAApB,CAxCiBC,CAwCjB,CACZ,GACEwC,CAAAV,KACA,CADmBW,CAAAX,KACnB,CAAAW,CAAAX,KAAA,CAAaU,CAFf,GAIEA,CAAAV,KACA,CADmBpB,CAAAa,KACnB,CAAAb,CAAAa,KAAA,CAAYiB,CALd,CAJF,CACE9B,CAAAa,KADF,CACciB,CArCdxC,EAAAI,gBAAA,CAA0BkC,CAC1B3B,EAAA,EAEAD,EAAA9C,SAAA,EAT6C,CAY/C;IAAAiB,WAAA,CAAkB6D,QAAQ,CAAC1C,CAAD,CAAU,CAClC,IAAI6B,EAAM7B,CAAAI,gBACV,QAAOJ,CAAAI,gBA2CP,KAAIoC,EAAcnC,CAAA,CA1CsBwB,CA0CtB,CAGlB,EADIY,CACJ,CADY3C,CAAA,CA5CMH,CAAAI,CAAS,CAATA,CA4CN,CA5CmBC,CA4CnB,CACZ,EACEyC,CAAAX,KADF,CACeU,CAAAV,KADf,CAGEpB,CAAAa,KAHF,CAGciB,CAAAV,KA/Cd,QAAOzB,CAAA,CAASwB,CAAT,CACPnB,EAAA9C,SAAA,EALkC,CA1F0C,CAApE,CAHP,CAJgD,CAAhC,CA1E5B,CAAAwB,UAAA,CA4Qc,mBA5Qd,CA6QK,CAAC,kBAAD,CAAqB,WAArB,CAAkC,UAAlC,CAA8C,QAAQ,CAACuD,CAAD,CAAmBC,CAAnB,CAA8BC,CAA9B,CAAwC,CAE9F,MAAO,CACLxG,SAAU,IADL,CAELI,QAAS,cAFJ,CAGLC,KAAMA,QAAQ,CAACkD,CAAD,CAAShD,CAAT,CAAkBC,CAAlB,CAAyB,CACrC,IAAIiG,EAAMjG,CAAAkG,kBAAND,EAAiCjG,CAAAiG,IACrCH,EAAA,CAAiBG,CAAjB,CAAAE,KAAA,CAA2B,QAAQ,CAACC,CAAD,CAAO,CACxCJ,CAAA,CAASI,CAAT,CAAA,CAAerD,CAAf,CAAuB,QAAQ,CAACsD,CAAD,CAAW,CACxCtG,CAAAuG,MAAA,CAAcD,CAAd,CAGIE,EAAAA,CAASlE,CAAA,CAAO0D,CAAA,CAAU,CAAV,CAAAS,cAAA,CAA2B,sBAA3B,CAAoDP,CAApD,CAA0D,GAA1D,CAAP,CACblG,EAAAuG,MAAA,CAAcC,CAAd,CAGAxG,EAAA0G,OAAA,EARwC,CAA1C,CADwC,CAA1C,CAFqC,CAHlC,CAFuF,CAA9F,CA7QL,CAAAlE,UAAA,CAoUa,WApUb;AAoU0BjD,CAAA,EApU1B,CAAAiD,UAAA,CAqWa,cArWb,CAqW6BjD,CAAA,EArW7B,CAnPsC,CAArC,CAAD,CAyqBGH,MAzqBH,CAyqBWA,MAAAC,QAzqBX;", -"sources":["angular-messages.js"], -"names":["window","angular","undefined","ngMessageDirectiveFactory","$animate","restrict","transclude","priority","terminal","require","link","scope","element","attrs","ngMessagesCtrl","$transclude","commentNode","records","staticExp","ngMessage","when","dynamicExp","ngMessageExp","whenExp","assignRecords","items","isArray","split","reRender","$eval","$watchCollection","currentElement","messageCtrl","register","test","name","collection","indexOf","hasOwnProperty","attach","elm","enter","$$attachId","getAttachId","on","deregister","detach","leave","forEach","isString","jqLite","module","directive","isAttrTruthy","attr","length","truthy","val","controller","$element","$scope","$attrs","findPreviousMessage","parent","comment","prevNode","parentLookup","prevKey","$$ngMessageNode","messages","childNodes","push","previousSibling","parentNode","ctrl","latestKey","nextAttachId","this.getAttachId","renderLater","cachedCollection","render","this.render","multiple","ngMessagesMultiple","unmatchedMessages","matchedKeys","messageItem","head","messageFound","totalMessages","message","messageUsed","value","key","next","setClass","ACTIVE_CLASS","INACTIVE_CLASS","ngMessages","this.reRender","$evalAsync","this.register","nextKey","toString","messageNode","match","this.deregister","$templateRequest","$document","$compile","src","ngMessagesInclude","then","html","contents","after","anchor","createComment","remove"] -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js deleted file mode 100644 index 34d36087..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-mocks.js +++ /dev/null @@ -1,2842 +0,0 @@ -/** - * @license AngularJS v1.5.0 - * (c) 2010-2016 Google, Inc. http://angularjs.org - * License: MIT - */ -(function(window, angular, undefined) { - -'use strict'; - -/** - * @ngdoc object - * @name angular.mock - * @description - * - * Namespace from 'angular-mocks.js' which contains testing related code. - */ -angular.mock = {}; - -/** - * ! This is a private undocumented service ! - * - * @name $browser - * - * @description - * This service is a mock implementation of {@link ng.$browser}. It provides fake - * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr, - * cookies, etc... - * - * The api of this service is the same as that of the real {@link ng.$browser $browser}, except - * that there are several helper methods available which can be used in tests. - */ -angular.mock.$BrowserProvider = function() { - this.$get = function() { - return new angular.mock.$Browser(); - }; -}; - -angular.mock.$Browser = function() { - var self = this; - - this.isMock = true; - self.$$url = "http://server/"; - self.$$lastUrl = self.$$url; // used by url polling fn - self.pollFns = []; - - // TODO(vojta): remove this temporary api - self.$$completeOutstandingRequest = angular.noop; - self.$$incOutstandingRequestCount = angular.noop; - - - // register url polling fn - - self.onUrlChange = function(listener) { - self.pollFns.push( - function() { - if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) { - self.$$lastUrl = self.$$url; - self.$$lastState = self.$$state; - listener(self.$$url, self.$$state); - } - } - ); - - return listener; - }; - - self.$$applicationDestroyed = angular.noop; - self.$$checkUrlChange = angular.noop; - - self.deferredFns = []; - self.deferredNextId = 0; - - self.defer = function(fn, delay) { - delay = delay || 0; - self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId}); - self.deferredFns.sort(function(a, b) { return a.time - b.time;}); - return self.deferredNextId++; - }; - - - /** - * @name $browser#defer.now - * - * @description - * Current milliseconds mock time. - */ - self.defer.now = 0; - - - self.defer.cancel = function(deferId) { - var fnIndex; - - angular.forEach(self.deferredFns, function(fn, index) { - if (fn.id === deferId) fnIndex = index; - }); - - if (angular.isDefined(fnIndex)) { - self.deferredFns.splice(fnIndex, 1); - return true; - } - - return false; - }; - - - /** - * @name $browser#defer.flush - * - * @description - * Flushes all pending requests and executes the defer callbacks. - * - * @param {number=} number of milliseconds to flush. See {@link #defer.now} - */ - self.defer.flush = function(delay) { - if (angular.isDefined(delay)) { - self.defer.now += delay; - } else { - if (self.deferredFns.length) { - self.defer.now = self.deferredFns[self.deferredFns.length - 1].time; - } else { - throw new Error('No deferred tasks to be flushed'); - } - } - - while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) { - self.deferredFns.shift().fn(); - } - }; - - self.$$baseHref = '/'; - self.baseHref = function() { - return this.$$baseHref; - }; -}; -angular.mock.$Browser.prototype = { - -/** - * @name $browser#poll - * - * @description - * run all fns in pollFns - */ - poll: function poll() { - angular.forEach(this.pollFns, function(pollFn) { - pollFn(); - }); - }, - - url: function(url, replace, state) { - if (angular.isUndefined(state)) { - state = null; - } - if (url) { - this.$$url = url; - // Native pushState serializes & copies the object; simulate it. - this.$$state = angular.copy(state); - return this; - } - - return this.$$url; - }, - - state: function() { - return this.$$state; - }, - - notifyWhenNoOutstandingRequests: function(fn) { - fn(); - } -}; - - -/** - * @ngdoc provider - * @name $exceptionHandlerProvider - * - * @description - * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors - * passed to the `$exceptionHandler`. - */ - -/** - * @ngdoc service - * @name $exceptionHandler - * - * @description - * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed - * to it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration - * information. - * - * - * ```js - * describe('$exceptionHandlerProvider', function() { - * - * it('should capture log messages and exceptions', function() { - * - * module(function($exceptionHandlerProvider) { - * $exceptionHandlerProvider.mode('log'); - * }); - * - * inject(function($log, $exceptionHandler, $timeout) { - * $timeout(function() { $log.log(1); }); - * $timeout(function() { $log.log(2); throw 'banana peel'; }); - * $timeout(function() { $log.log(3); }); - * expect($exceptionHandler.errors).toEqual([]); - * expect($log.assertEmpty()); - * $timeout.flush(); - * expect($exceptionHandler.errors).toEqual(['banana peel']); - * expect($log.log.logs).toEqual([[1], [2], [3]]); - * }); - * }); - * }); - * ``` - */ - -angular.mock.$ExceptionHandlerProvider = function() { - var handler; - - /** - * @ngdoc method - * @name $exceptionHandlerProvider#mode - * - * @description - * Sets the logging mode. - * - * @param {string} mode Mode of operation, defaults to `rethrow`. - * - * - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log` - * mode stores an array of errors in `$exceptionHandler.errors`, to allow later - * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and - * {@link ngMock.$log#reset reset()} - * - `rethrow`: If any errors are passed to the handler in tests, it typically means that there - * is a bug in the application or test, so this mock will make these tests fail. - * For any implementations that expect exceptions to be thrown, the `rethrow` mode - * will also maintain a log of thrown errors. - */ - this.mode = function(mode) { - - switch (mode) { - case 'log': - case 'rethrow': - var errors = []; - handler = function(e) { - if (arguments.length == 1) { - errors.push(e); - } else { - errors.push([].slice.call(arguments, 0)); - } - if (mode === "rethrow") { - throw e; - } - }; - handler.errors = errors; - break; - default: - throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!"); - } - }; - - this.$get = function() { - return handler; - }; - - this.mode('rethrow'); -}; - - -/** - * @ngdoc service - * @name $log - * - * @description - * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays - * (one array per logging level). These arrays are exposed as `logs` property of each of the - * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`. - * - */ -angular.mock.$LogProvider = function() { - var debug = true; - - function concat(array1, array2, index) { - return array1.concat(Array.prototype.slice.call(array2, index)); - } - - this.debugEnabled = function(flag) { - if (angular.isDefined(flag)) { - debug = flag; - return this; - } else { - return debug; - } - }; - - this.$get = function() { - var $log = { - log: function() { $log.log.logs.push(concat([], arguments, 0)); }, - warn: function() { $log.warn.logs.push(concat([], arguments, 0)); }, - info: function() { $log.info.logs.push(concat([], arguments, 0)); }, - error: function() { $log.error.logs.push(concat([], arguments, 0)); }, - debug: function() { - if (debug) { - $log.debug.logs.push(concat([], arguments, 0)); - } - } - }; - - /** - * @ngdoc method - * @name $log#reset - * - * @description - * Reset all of the logging arrays to empty. - */ - $log.reset = function() { - /** - * @ngdoc property - * @name $log#log.logs - * - * @description - * Array of messages logged using {@link ng.$log#log `log()`}. - * - * @example - * ```js - * $log.log('Some Log'); - * var first = $log.log.logs.unshift(); - * ``` - */ - $log.log.logs = []; - /** - * @ngdoc property - * @name $log#info.logs - * - * @description - * Array of messages logged using {@link ng.$log#info `info()`}. - * - * @example - * ```js - * $log.info('Some Info'); - * var first = $log.info.logs.unshift(); - * ``` - */ - $log.info.logs = []; - /** - * @ngdoc property - * @name $log#warn.logs - * - * @description - * Array of messages logged using {@link ng.$log#warn `warn()`}. - * - * @example - * ```js - * $log.warn('Some Warning'); - * var first = $log.warn.logs.unshift(); - * ``` - */ - $log.warn.logs = []; - /** - * @ngdoc property - * @name $log#error.logs - * - * @description - * Array of messages logged using {@link ng.$log#error `error()`}. - * - * @example - * ```js - * $log.error('Some Error'); - * var first = $log.error.logs.unshift(); - * ``` - */ - $log.error.logs = []; - /** - * @ngdoc property - * @name $log#debug.logs - * - * @description - * Array of messages logged using {@link ng.$log#debug `debug()`}. - * - * @example - * ```js - * $log.debug('Some Error'); - * var first = $log.debug.logs.unshift(); - * ``` - */ - $log.debug.logs = []; - }; - - /** - * @ngdoc method - * @name $log#assertEmpty - * - * @description - * Assert that all of the logging methods have no logged messages. If any messages are present, - * an exception is thrown. - */ - $log.assertEmpty = function() { - var errors = []; - angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) { - angular.forEach($log[logLevel].logs, function(log) { - angular.forEach(log, function(logItem) { - errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + - (logItem.stack || '')); - }); - }); - }); - if (errors.length) { - errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or " + - "an expected log message was not checked and removed:"); - errors.push(''); - throw new Error(errors.join('\n---------\n')); - } - }; - - $log.reset(); - return $log; - }; -}; - - -/** - * @ngdoc service - * @name $interval - * - * @description - * Mock implementation of the $interval service. - * - * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to - * move forward by `millis` milliseconds and trigger any functions scheduled to run in that - * time. - * - * @param {function()} fn A function that should be called repeatedly. - * @param {number} delay Number of milliseconds between each function call. - * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat - * indefinitely. - * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise - * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. - * @param {...*=} Pass additional parameters to the executed function. - * @returns {promise} A promise which will be notified on each iteration. - */ -angular.mock.$IntervalProvider = function() { - this.$get = ['$browser', '$rootScope', '$q', '$$q', - function($browser, $rootScope, $q, $$q) { - var repeatFns = [], - nextRepeatId = 0, - now = 0; - - var $interval = function(fn, delay, count, invokeApply) { - var hasParams = arguments.length > 4, - args = hasParams ? Array.prototype.slice.call(arguments, 4) : [], - iteration = 0, - skipApply = (angular.isDefined(invokeApply) && !invokeApply), - deferred = (skipApply ? $$q : $q).defer(), - promise = deferred.promise; - - count = (angular.isDefined(count)) ? count : 0; - promise.then(null, null, (!hasParams) ? fn : function() { - fn.apply(null, args); - }); - - promise.$$intervalId = nextRepeatId; - - function tick() { - deferred.notify(iteration++); - - if (count > 0 && iteration >= count) { - var fnIndex; - deferred.resolve(iteration); - - angular.forEach(repeatFns, function(fn, index) { - if (fn.id === promise.$$intervalId) fnIndex = index; - }); - - if (angular.isDefined(fnIndex)) { - repeatFns.splice(fnIndex, 1); - } - } - - if (skipApply) { - $browser.defer.flush(); - } else { - $rootScope.$apply(); - } - } - - repeatFns.push({ - nextTime:(now + delay), - delay: delay, - fn: tick, - id: nextRepeatId, - deferred: deferred - }); - repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;}); - - nextRepeatId++; - return promise; - }; - /** - * @ngdoc method - * @name $interval#cancel - * - * @description - * Cancels a task associated with the `promise`. - * - * @param {promise} promise A promise from calling the `$interval` function. - * @returns {boolean} Returns `true` if the task was successfully cancelled. - */ - $interval.cancel = function(promise) { - if (!promise) return false; - var fnIndex; - - angular.forEach(repeatFns, function(fn, index) { - if (fn.id === promise.$$intervalId) fnIndex = index; - }); - - if (angular.isDefined(fnIndex)) { - repeatFns[fnIndex].deferred.reject('canceled'); - repeatFns.splice(fnIndex, 1); - return true; - } - - return false; - }; - - /** - * @ngdoc method - * @name $interval#flush - * @description - * - * Runs interval tasks scheduled to be run in the next `millis` milliseconds. - * - * @param {number=} millis maximum timeout amount to flush up until. - * - * @return {number} The amount of time moved forward. - */ - $interval.flush = function(millis) { - now += millis; - while (repeatFns.length && repeatFns[0].nextTime <= now) { - var task = repeatFns[0]; - task.fn(); - task.nextTime += task.delay; - repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;}); - } - return millis; - }; - - return $interval; - }]; -}; - - -/* jshint -W101 */ -/* The R_ISO8061_STR regex is never going to fit into the 100 char limit! - * This directive should go inside the anonymous function but a bug in JSHint means that it would - * not be enacted early enough to prevent the warning. - */ -var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; - -function jsonStringToDate(string) { - var match; - if (match = string.match(R_ISO8061_STR)) { - var date = new Date(0), - tzHour = 0, - tzMin = 0; - if (match[9]) { - tzHour = toInt(match[9] + match[10]); - tzMin = toInt(match[9] + match[11]); - } - date.setUTCFullYear(toInt(match[1]), toInt(match[2]) - 1, toInt(match[3])); - date.setUTCHours(toInt(match[4] || 0) - tzHour, - toInt(match[5] || 0) - tzMin, - toInt(match[6] || 0), - toInt(match[7] || 0)); - return date; - } - return string; -} - -function toInt(str) { - return parseInt(str, 10); -} - -function padNumber(num, digits, trim) { - var neg = ''; - if (num < 0) { - neg = '-'; - num = -num; - } - num = '' + num; - while (num.length < digits) num = '0' + num; - if (trim) { - num = num.substr(num.length - digits); - } - return neg + num; -} - - -/** - * @ngdoc type - * @name angular.mock.TzDate - * @description - * - * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`. - * - * Mock of the Date type which has its timezone specified via constructor arg. - * - * The main purpose is to create Date-like instances with timezone fixed to the specified timezone - * offset, so that we can test code that depends on local timezone settings without dependency on - * the time zone settings of the machine where the code is running. - * - * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored) - * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC* - * - * @example - * !!!! WARNING !!!!! - * This is not a complete Date object so only methods that were implemented can be called safely. - * To make matters worse, TzDate instances inherit stuff from Date via a prototype. - * - * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is - * incomplete we might be missing some non-standard methods. This can result in errors like: - * "Date.prototype.foo called on incompatible Object". - * - * ```js - * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); - * newYearInBratislava.getTimezoneOffset() => -60; - * newYearInBratislava.getFullYear() => 2010; - * newYearInBratislava.getMonth() => 0; - * newYearInBratislava.getDate() => 1; - * newYearInBratislava.getHours() => 0; - * newYearInBratislava.getMinutes() => 0; - * newYearInBratislava.getSeconds() => 0; - * ``` - * - */ -angular.mock.TzDate = function(offset, timestamp) { - var self = new Date(0); - if (angular.isString(timestamp)) { - var tsStr = timestamp; - - self.origDate = jsonStringToDate(timestamp); - - timestamp = self.origDate.getTime(); - if (isNaN(timestamp)) { - throw { - name: "Illegal Argument", - message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string" - }; - } - } else { - self.origDate = new Date(timestamp); - } - - var localOffset = new Date(timestamp).getTimezoneOffset(); - self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60; - self.date = new Date(timestamp + self.offsetDiff); - - self.getTime = function() { - return self.date.getTime() - self.offsetDiff; - }; - - self.toLocaleDateString = function() { - return self.date.toLocaleDateString(); - }; - - self.getFullYear = function() { - return self.date.getFullYear(); - }; - - self.getMonth = function() { - return self.date.getMonth(); - }; - - self.getDate = function() { - return self.date.getDate(); - }; - - self.getHours = function() { - return self.date.getHours(); - }; - - self.getMinutes = function() { - return self.date.getMinutes(); - }; - - self.getSeconds = function() { - return self.date.getSeconds(); - }; - - self.getMilliseconds = function() { - return self.date.getMilliseconds(); - }; - - self.getTimezoneOffset = function() { - return offset * 60; - }; - - self.getUTCFullYear = function() { - return self.origDate.getUTCFullYear(); - }; - - self.getUTCMonth = function() { - return self.origDate.getUTCMonth(); - }; - - self.getUTCDate = function() { - return self.origDate.getUTCDate(); - }; - - self.getUTCHours = function() { - return self.origDate.getUTCHours(); - }; - - self.getUTCMinutes = function() { - return self.origDate.getUTCMinutes(); - }; - - self.getUTCSeconds = function() { - return self.origDate.getUTCSeconds(); - }; - - self.getUTCMilliseconds = function() { - return self.origDate.getUTCMilliseconds(); - }; - - self.getDay = function() { - return self.date.getDay(); - }; - - // provide this method only on browsers that already have it - if (self.toISOString) { - self.toISOString = function() { - return padNumber(self.origDate.getUTCFullYear(), 4) + '-' + - padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' + - padNumber(self.origDate.getUTCDate(), 2) + 'T' + - padNumber(self.origDate.getUTCHours(), 2) + ':' + - padNumber(self.origDate.getUTCMinutes(), 2) + ':' + - padNumber(self.origDate.getUTCSeconds(), 2) + '.' + - padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'; - }; - } - - //hide all methods not implemented in this mock that the Date prototype exposes - var unimplementedMethods = ['getUTCDay', - 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', - 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', - 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', - 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString', - 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf']; - - angular.forEach(unimplementedMethods, function(methodName) { - self[methodName] = function() { - throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock"); - }; - }); - - return self; -}; - -//make "tzDateInstance instanceof Date" return true -angular.mock.TzDate.prototype = Date.prototype; -/* jshint +W101 */ - - -/** - * @ngdoc service - * @name $animate - * - * @description - * Mock implementation of the {@link ng.$animate `$animate`} service. Exposes two additional methods - * for testing animations. - */ -angular.mock.animate = angular.module('ngAnimateMock', ['ng']) - - .config(['$provide', function($provide) { - - $provide.factory('$$forceReflow', function() { - function reflowFn() { - reflowFn.totalReflows++; - } - reflowFn.totalReflows = 0; - return reflowFn; - }); - - $provide.factory('$$animateAsyncRun', function() { - var queue = []; - var queueFn = function() { - return function(fn) { - queue.push(fn); - }; - }; - queueFn.flush = function() { - if (queue.length === 0) return false; - - for (var i = 0; i < queue.length; i++) { - queue[i](); - } - queue = []; - - return true; - }; - return queueFn; - }); - - $provide.decorator('$$animateJs', ['$delegate', function($delegate) { - var runners = []; - - var animateJsConstructor = function() { - var animator = $delegate.apply($delegate, arguments); - // If no javascript animation is found, animator is undefined - if (animator) { - runners.push(animator); - } - return animator; - }; - - animateJsConstructor.$closeAndFlush = function() { - runners.forEach(function(runner) { - runner.end(); - }); - runners = []; - }; - - return animateJsConstructor; - }]); - - $provide.decorator('$animateCss', ['$delegate', function($delegate) { - var runners = []; - - var animateCssConstructor = function(element, options) { - var animator = $delegate(element, options); - runners.push(animator); - return animator; - }; - - animateCssConstructor.$closeAndFlush = function() { - runners.forEach(function(runner) { - runner.end(); - }); - runners = []; - }; - - return animateCssConstructor; - }]); - - $provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF', '$animateCss', '$$animateJs', - '$$forceReflow', '$$animateAsyncRun', '$rootScope', - function($delegate, $timeout, $browser, $$rAF, $animateCss, $$animateJs, - $$forceReflow, $$animateAsyncRun, $rootScope) { - var animate = { - queue: [], - cancel: $delegate.cancel, - on: $delegate.on, - off: $delegate.off, - pin: $delegate.pin, - get reflows() { - return $$forceReflow.totalReflows; - }, - enabled: $delegate.enabled, - /** - * @ngdoc method - * @name $animate#closeAndFlush - * @description - * - * This method will close all pending animations (both {@link ngAnimate#javascript-based-animations Javascript} - * and {@link ngAnimate.$animateCss CSS}) and it will also flush any remaining animation frames and/or callbacks. - */ - closeAndFlush: function() { - // we allow the flush command to swallow the errors - // because depending on whether CSS or JS animations are - // used, there may not be a RAF flush. The primary flush - // at the end of this function must throw an exception - // because it will track if there were pending animations - this.flush(true); - $animateCss.$closeAndFlush(); - $$animateJs.$closeAndFlush(); - this.flush(); - }, - /** - * @ngdoc method - * @name $animate#flush - * @description - * - * This method is used to flush the pending callbacks and animation frames to either start - * an animation or conclude an animation. Note that this will not actually close an - * actively running animation (see {@link ngMock.$animate#closeAndFlush `closeAndFlush()`} for that). - */ - flush: function(hideErrors) { - $rootScope.$digest(); - - var doNextRun, somethingFlushed = false; - do { - doNextRun = false; - - if ($$rAF.queue.length) { - $$rAF.flush(); - doNextRun = somethingFlushed = true; - } - - if ($$animateAsyncRun.flush()) { - doNextRun = somethingFlushed = true; - } - } while (doNextRun); - - if (!somethingFlushed && !hideErrors) { - throw new Error('No pending animations ready to be closed or flushed'); - } - - $rootScope.$digest(); - } - }; - - angular.forEach( - ['animate','enter','leave','move','addClass','removeClass','setClass'], function(method) { - animate[method] = function() { - animate.queue.push({ - event: method, - element: arguments[0], - options: arguments[arguments.length - 1], - args: arguments - }); - return $delegate[method].apply($delegate, arguments); - }; - }); - - return animate; - }]); - - }]); - - -/** - * @ngdoc function - * @name angular.mock.dump - * @description - * - * *NOTE*: this is not an injectable instance, just a globally available function. - * - * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for - * debugging. - * - * This method is also available on window, where it can be used to display objects on debug - * console. - * - * @param {*} object - any object to turn into string. - * @return {string} a serialized string of the argument - */ -angular.mock.dump = function(object) { - return serialize(object); - - function serialize(object) { - var out; - - if (angular.isElement(object)) { - object = angular.element(object); - out = angular.element('
'); - angular.forEach(object, function(element) { - out.append(angular.element(element).clone()); - }); - out = out.html(); - } else if (angular.isArray(object)) { - out = []; - angular.forEach(object, function(o) { - out.push(serialize(o)); - }); - out = '[ ' + out.join(', ') + ' ]'; - } else if (angular.isObject(object)) { - if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) { - out = serializeScope(object); - } else if (object instanceof Error) { - out = object.stack || ('' + object.name + ': ' + object.message); - } else { - // TODO(i): this prevents methods being logged, - // we should have a better way to serialize objects - out = angular.toJson(object, true); - } - } else { - out = String(object); - } - - return out; - } - - function serializeScope(scope, offset) { - offset = offset || ' '; - var log = [offset + 'Scope(' + scope.$id + '): {']; - for (var key in scope) { - if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) { - log.push(' ' + key + ': ' + angular.toJson(scope[key])); - } - } - var child = scope.$$childHead; - while (child) { - log.push(serializeScope(child, offset + ' ')); - child = child.$$nextSibling; - } - log.push('}'); - return log.join('\n' + offset); - } -}; - -/** - * @ngdoc service - * @name $httpBackend - * @description - * Fake HTTP backend implementation suitable for unit testing applications that use the - * {@link ng.$http $http service}. - * - * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less - * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}. - * - * During unit testing, we want our unit tests to run quickly and have no external dependencies so - * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or - * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is - * to verify whether a certain request has been sent or not, or alternatively just let the - * application make requests, respond with pre-trained responses and assert that the end result is - * what we expect it to be. - * - * This mock implementation can be used to respond with static or dynamic responses via the - * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc). - * - * When an Angular application needs some data from a server, it calls the $http service, which - * sends the request to a real server using $httpBackend service. With dependency injection, it is - * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify - * the requests and respond with some testing data without sending a request to a real server. - * - * There are two ways to specify what test data should be returned as http responses by the mock - * backend when the code under test makes http requests: - * - * - `$httpBackend.expect` - specifies a request expectation - * - `$httpBackend.when` - specifies a backend definition - * - * - * ## Request Expectations vs Backend Definitions - * - * Request expectations provide a way to make assertions about requests made by the application and - * to define responses for those requests. The test will fail if the expected requests are not made - * or they are made in the wrong order. - * - * Backend definitions allow you to define a fake backend for your application which doesn't assert - * if a particular request was made or not, it just returns a trained response if a request is made. - * The test will pass whether or not the request gets made during testing. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Request expectationsBackend definitions
Syntax.expect(...).respond(...).when(...).respond(...)
Typical usagestrict unit testsloose (black-box) unit testing
Fulfills multiple requestsNOYES
Order of requests mattersYESNO
Request requiredYESNO
Response requiredoptional (see below)YES
- * - * In cases where both backend definitions and request expectations are specified during unit - * testing, the request expectations are evaluated first. - * - * If a request expectation has no response specified, the algorithm will search your backend - * definitions for an appropriate response. - * - * If a request didn't match any expectation or if the expectation doesn't have the response - * defined, the backend definitions are evaluated in sequential order to see if any of them match - * the request. The response from the first matched definition is returned. - * - * - * ## Flushing HTTP requests - * - * The $httpBackend used in production always responds to requests asynchronously. If we preserved - * this behavior in unit testing, we'd have to create async unit tests, which are hard to write, - * to follow and to maintain. But neither can the testing mock respond synchronously; that would - * change the execution of the code under test. For this reason, the mock $httpBackend has a - * `flush()` method, which allows the test to explicitly flush pending requests. This preserves - * the async api of the backend, while allowing the test to execute synchronously. - * - * - * ## Unit testing with mock $httpBackend - * The following code shows how to setup and use the mock backend when unit testing a controller. - * First we create the controller under test: - * - ```js - // The module code - angular - .module('MyApp', []) - .controller('MyController', MyController); - - // The controller code - function MyController($scope, $http) { - var authToken; - - $http.get('/auth.py').then(function(response) { - authToken = response.headers('A-Token'); - $scope.user = response.data; - }); - - $scope.saveMessage = function(message) { - var headers = { 'Authorization': authToken }; - $scope.status = 'Saving...'; - - $http.post('/add-msg.py', message, { headers: headers } ).then(function(response) { - $scope.status = ''; - }).catch(function() { - $scope.status = 'Failed...'; - }); - }; - } - ``` - * - * Now we setup the mock backend and create the test specs: - * - ```js - // testing controller - describe('MyController', function() { - var $httpBackend, $rootScope, createController, authRequestHandler; - - // Set up the module - beforeEach(module('MyApp')); - - beforeEach(inject(function($injector) { - // Set up the mock http service responses - $httpBackend = $injector.get('$httpBackend'); - // backend definition common for all tests - authRequestHandler = $httpBackend.when('GET', '/auth.py') - .respond({userId: 'userX'}, {'A-Token': 'xxx'}); - - // Get hold of a scope (i.e. the root scope) - $rootScope = $injector.get('$rootScope'); - // The $controller service is used to create instances of controllers - var $controller = $injector.get('$controller'); - - createController = function() { - return $controller('MyController', {'$scope' : $rootScope }); - }; - })); - - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - - - it('should fetch authentication token', function() { - $httpBackend.expectGET('/auth.py'); - var controller = createController(); - $httpBackend.flush(); - }); - - - it('should fail authentication', function() { - - // Notice how you can change the response even after it was set - authRequestHandler.respond(401, ''); - - $httpBackend.expectGET('/auth.py'); - var controller = createController(); - $httpBackend.flush(); - expect($rootScope.status).toBe('Failed...'); - }); - - - it('should send msg to server', function() { - var controller = createController(); - $httpBackend.flush(); - - // now you don’t care about the authentication, but - // the controller will still send the request and - // $httpBackend will respond without you having to - // specify the expectation and response for this request - - $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, ''); - $rootScope.saveMessage('message content'); - expect($rootScope.status).toBe('Saving...'); - $httpBackend.flush(); - expect($rootScope.status).toBe(''); - }); - - - it('should send auth header', function() { - var controller = createController(); - $httpBackend.flush(); - - $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) { - // check if the header was sent, if it wasn't the expectation won't - // match the request and the test will fail - return headers['Authorization'] == 'xxx'; - }).respond(201, ''); - - $rootScope.saveMessage('whatever'); - $httpBackend.flush(); - }); - }); - ``` - * - * ## Dynamic responses - * - * You define a response to a request by chaining a call to `respond()` onto a definition or expectation. - * If you provide a **callback** as the first parameter to `respond(callback)` then you can dynamically generate - * a response based on the properties of the request. - * - * The `callback` function should be of the form `function(method, url, data, headers, params)`. - * - * ### Query parameters - * - * By default, query parameters on request URLs are parsed into the `params` object. So a request URL - * of `/list?q=searchstr&orderby=-name` would set `params` to be `{q: 'searchstr', orderby: '-name'}`. - * - * ### Regex parameter matching - * - * If an expectation or definition uses a **regex** to match the URL, you can provide an array of **keys** via a - * `params` argument. The index of each **key** in the array will match the index of a **group** in the - * **regex**. - * - * The `params` object in the **callback** will now have properties with these keys, which hold the value of the - * corresponding **group** in the **regex**. - * - * This also applies to the `when` and `expect` shortcut methods. - * - * - * ```js - * $httpBackend.expect('GET', /\/user\/(.+)/, undefined, undefined, ['id']) - * .respond(function(method, url, data, headers, params) { - * // for requested url of '/user/1234' params is {id: '1234'} - * }); - * - * $httpBackend.whenPATCH(/\/user\/(.+)\/article\/(.+)/, undefined, undefined, ['user', 'article']) - * .respond(function(method, url, data, headers, params) { - * // for url of '/user/1234/article/567' params is {user: '1234', article: '567'} - * }); - * ``` - * - * ## Matching route requests - * - * For extra convenience, `whenRoute` and `expectRoute` shortcuts are available. These methods offer colon - * delimited matching of the url path, ignoring the query string. This allows declarations - * similar to how application routes are configured with `$routeProvider`. Because these methods convert - * the definition url to regex, declaration order is important. Combined with query parameter parsing, - * the following is possible: - * - ```js - $httpBackend.whenRoute('GET', '/users/:id') - .respond(function(method, url, data, headers, params) { - return [200, MockUserList[Number(params.id)]]; - }); - - $httpBackend.whenRoute('GET', '/users') - .respond(function(method, url, data, headers, params) { - var userList = angular.copy(MockUserList), - defaultSort = 'lastName', - count, pages, isPrevious, isNext; - - // paged api response '/v1/users?page=2' - params.page = Number(params.page) || 1; - - // query for last names '/v1/users?q=Archer' - if (params.q) { - userList = $filter('filter')({lastName: params.q}); - } - - pages = Math.ceil(userList.length / pagingLength); - isPrevious = params.page > 1; - isNext = params.page < pages; - - return [200, { - count: userList.length, - previous: isPrevious, - next: isNext, - // sort field -> '/v1/users?sortBy=firstName' - results: $filter('orderBy')(userList, params.sortBy || defaultSort) - .splice((params.page - 1) * pagingLength, pagingLength) - }]; - }); - ``` - */ -angular.mock.$HttpBackendProvider = function() { - this.$get = ['$rootScope', '$timeout', createHttpBackendMock]; -}; - -/** - * General factory function for $httpBackend mock. - * Returns instance for unit testing (when no arguments specified): - * - passing through is disabled - * - auto flushing is disabled - * - * Returns instance for e2e testing (when `$delegate` and `$browser` specified): - * - passing through (delegating request to real backend) is enabled - * - auto flushing is enabled - * - * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified) - * @param {Object=} $browser Auto-flushing enabled if specified - * @return {Object} Instance of $httpBackend mock - */ -function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) { - var definitions = [], - expectations = [], - responses = [], - responsesPush = angular.bind(responses, responses.push), - copy = angular.copy; - - function createResponse(status, data, headers, statusText) { - if (angular.isFunction(status)) return status; - - return function() { - return angular.isNumber(status) - ? [status, data, headers, statusText] - : [200, status, data, headers]; - }; - } - - // TODO(vojta): change params to: method, url, data, headers, callback - function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) { - var xhr = new MockXhr(), - expectation = expectations[0], - wasExpected = false; - - function prettyPrint(data) { - return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp) - ? data - : angular.toJson(data); - } - - function wrapResponse(wrapped) { - if (!$browser && timeout) { - timeout.then ? timeout.then(handleTimeout) : $timeout(handleTimeout, timeout); - } - - return handleResponse; - - function handleResponse() { - var response = wrapped.response(method, url, data, headers, wrapped.params(url)); - xhr.$$respHeaders = response[2]; - callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(), - copy(response[3] || '')); - } - - function handleTimeout() { - for (var i = 0, ii = responses.length; i < ii; i++) { - if (responses[i] === handleResponse) { - responses.splice(i, 1); - callback(-1, undefined, ''); - break; - } - } - } - } - - if (expectation && expectation.match(method, url)) { - if (!expectation.matchData(data)) { - throw new Error('Expected ' + expectation + ' with different data\n' + - 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data); - } - - if (!expectation.matchHeaders(headers)) { - throw new Error('Expected ' + expectation + ' with different headers\n' + - 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' + - prettyPrint(headers)); - } - - expectations.shift(); - - if (expectation.response) { - responses.push(wrapResponse(expectation)); - return; - } - wasExpected = true; - } - - var i = -1, definition; - while ((definition = definitions[++i])) { - if (definition.match(method, url, data, headers || {})) { - if (definition.response) { - // if $browser specified, we do auto flush all requests - ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); - } else if (definition.passThrough) { - $delegate(method, url, data, callback, headers, timeout, withCredentials); - } else throw new Error('No response defined !'); - return; - } - } - throw wasExpected ? - new Error('No response defined !') : - new Error('Unexpected request: ' + method + ' ' + url + '\n' + - (expectation ? 'Expected ' + expectation : 'No more request expected')); - } - - /** - * @ngdoc method - * @name $httpBackend#when - * @description - * Creates a new backend definition. - * - * @param {string} method HTTP method. - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. - * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header - * object and returns true if the headers match the current definition. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - * - * - respond – - * `{function([status,] data[, headers, statusText]) - * | function(function(method, url, data, headers, params)}` - * – The respond method takes a set of static data to be returned or a function that can - * return an array containing response status (number), response data (string), response - * headers (Object), and the text for the status (string). The respond method returns the - * `requestHandler` object for possible overrides. - */ - $httpBackend.when = function(method, url, data, headers, keys) { - var definition = new MockHttpExpectation(method, url, data, headers, keys), - chain = { - respond: function(status, data, headers, statusText) { - definition.passThrough = undefined; - definition.response = createResponse(status, data, headers, statusText); - return chain; - } - }; - - if ($browser) { - chain.passThrough = function() { - definition.response = undefined; - definition.passThrough = true; - return chain; - }; - } - - definitions.push(definition); - return chain; - }; - - /** - * @ngdoc method - * @name $httpBackend#whenGET - * @description - * Creates a new backend definition for GET requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#whenHEAD - * @description - * Creates a new backend definition for HEAD requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#whenDELETE - * @description - * Creates a new backend definition for DELETE requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#whenPOST - * @description - * Creates a new backend definition for POST requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#whenPUT - * @description - * Creates a new backend definition for PUT requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives - * data string and returns true if the data is as expected. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#whenJSONP - * @description - * Creates a new backend definition for JSONP requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - createShortMethods('when'); - - /** - * @ngdoc method - * @name $httpBackend#whenRoute - * @description - * Creates a new backend definition that compares only with the requested route. - * - * @param {string} method HTTP method. - * @param {string} url HTTP url string that supports colon param matching. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. See #when for more info. - */ - $httpBackend.whenRoute = function(method, url) { - var pathObj = parseRoute(url); - return $httpBackend.when(method, pathObj.regexp, undefined, undefined, pathObj.keys); - }; - - function parseRoute(url) { - var ret = { - regexp: url - }, - keys = ret.keys = []; - - if (!url || !angular.isString(url)) return ret; - - url = url - .replace(/([().])/g, '\\$1') - .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option) { - var optional = option === '?' ? option : null; - var star = option === '*' ? option : null; - keys.push({ name: key, optional: !!optional }); - slash = slash || ''; - return '' - + (optional ? '' : slash) - + '(?:' - + (optional ? slash : '') - + (star && '(.+?)' || '([^/]+)') - + (optional || '') - + ')' - + (optional || ''); - }) - .replace(/([\/$\*])/g, '\\$1'); - - ret.regexp = new RegExp('^' + url, 'i'); - return ret; - } - - /** - * @ngdoc method - * @name $httpBackend#expect - * @description - * Creates a new request expectation. - * - * @param {string} method HTTP method. - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that - * receives data string and returns true if the data is as expected, or Object if request body - * is in JSON format. - * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header - * object and returns true if the headers match the current expectation. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - * - * - respond – - * `{function([status,] data[, headers, statusText]) - * | function(function(method, url, data, headers, params)}` - * – The respond method takes a set of static data to be returned or a function that can - * return an array containing response status (number), response data (string), response - * headers (Object), and the text for the status (string). The respond method returns the - * `requestHandler` object for possible overrides. - */ - $httpBackend.expect = function(method, url, data, headers, keys) { - var expectation = new MockHttpExpectation(method, url, data, headers, keys), - chain = { - respond: function(status, data, headers, statusText) { - expectation.response = createResponse(status, data, headers, statusText); - return chain; - } - }; - - expectations.push(expectation); - return chain; - }; - - /** - * @ngdoc method - * @name $httpBackend#expectGET - * @description - * Creates a new request expectation for GET requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {Object=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. See #expect for more info. - */ - - /** - * @ngdoc method - * @name $httpBackend#expectHEAD - * @description - * Creates a new request expectation for HEAD requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {Object=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#expectDELETE - * @description - * Creates a new request expectation for DELETE requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {Object=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#expectPOST - * @description - * Creates a new request expectation for POST requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that - * receives data string and returns true if the data is as expected, or Object if request body - * is in JSON format. - * @param {Object=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#expectPUT - * @description - * Creates a new request expectation for PUT requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that - * receives data string and returns true if the data is as expected, or Object if request body - * is in JSON format. - * @param {Object=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#expectPATCH - * @description - * Creates a new request expectation for PATCH requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that - * receives data string and returns true if the data is as expected, or Object if request body - * is in JSON format. - * @param {Object=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - - /** - * @ngdoc method - * @name $httpBackend#expectJSONP - * @description - * Creates a new request expectation for JSONP requests. For more info see `expect()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives an url - * and returns true if the url matches the current definition. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. - */ - createShortMethods('expect'); - - /** - * @ngdoc method - * @name $httpBackend#expectRoute - * @description - * Creates a new request expectation that compares only with the requested route. - * - * @param {string} method HTTP method. - * @param {string} url HTTP url string that supports colon param matching. - * @returns {requestHandler} Returns an object with `respond` method that controls how a matched - * request is handled. You can save this object for later use and invoke `respond` again in - * order to change how a matched request is handled. See #expect for more info. - */ - $httpBackend.expectRoute = function(method, url) { - var pathObj = parseRoute(url); - return $httpBackend.expect(method, pathObj.regexp, undefined, undefined, pathObj.keys); - }; - - - /** - * @ngdoc method - * @name $httpBackend#flush - * @description - * Flushes all pending requests using the trained responses. - * - * @param {number=} count Number of responses to flush (in the order they arrived). If undefined, - * all pending requests will be flushed. If there are no pending requests when the flush method - * is called an exception is thrown (as this typically a sign of programming error). - */ - $httpBackend.flush = function(count, digest) { - if (digest !== false) $rootScope.$digest(); - if (!responses.length) throw new Error('No pending request to flush !'); - - if (angular.isDefined(count) && count !== null) { - while (count--) { - if (!responses.length) throw new Error('No more pending request to flush !'); - responses.shift()(); - } - } else { - while (responses.length) { - responses.shift()(); - } - } - $httpBackend.verifyNoOutstandingExpectation(digest); - }; - - - /** - * @ngdoc method - * @name $httpBackend#verifyNoOutstandingExpectation - * @description - * Verifies that all of the requests defined via the `expect` api were made. If any of the - * requests were not made, verifyNoOutstandingExpectation throws an exception. - * - * Typically, you would call this method following each test case that asserts requests using an - * "afterEach" clause. - * - * ```js - * afterEach($httpBackend.verifyNoOutstandingExpectation); - * ``` - */ - $httpBackend.verifyNoOutstandingExpectation = function(digest) { - if (digest !== false) $rootScope.$digest(); - if (expectations.length) { - throw new Error('Unsatisfied requests: ' + expectations.join(', ')); - } - }; - - - /** - * @ngdoc method - * @name $httpBackend#verifyNoOutstandingRequest - * @description - * Verifies that there are no outstanding requests that need to be flushed. - * - * Typically, you would call this method following each test case that asserts requests using an - * "afterEach" clause. - * - * ```js - * afterEach($httpBackend.verifyNoOutstandingRequest); - * ``` - */ - $httpBackend.verifyNoOutstandingRequest = function() { - if (responses.length) { - throw new Error('Unflushed requests: ' + responses.length); - } - }; - - - /** - * @ngdoc method - * @name $httpBackend#resetExpectations - * @description - * Resets all request expectations, but preserves all backend definitions. Typically, you would - * call resetExpectations during a multiple-phase test when you want to reuse the same instance of - * $httpBackend mock. - */ - $httpBackend.resetExpectations = function() { - expectations.length = 0; - responses.length = 0; - }; - - return $httpBackend; - - - function createShortMethods(prefix) { - angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) { - $httpBackend[prefix + method] = function(url, headers, keys) { - return $httpBackend[prefix](method, url, undefined, headers, keys); - }; - }); - - angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { - $httpBackend[prefix + method] = function(url, data, headers, keys) { - return $httpBackend[prefix](method, url, data, headers, keys); - }; - }); - } -} - -function MockHttpExpectation(method, url, data, headers, keys) { - - this.data = data; - this.headers = headers; - - this.match = function(m, u, d, h) { - if (method != m) return false; - if (!this.matchUrl(u)) return false; - if (angular.isDefined(d) && !this.matchData(d)) return false; - if (angular.isDefined(h) && !this.matchHeaders(h)) return false; - return true; - }; - - this.matchUrl = function(u) { - if (!url) return true; - if (angular.isFunction(url.test)) return url.test(u); - if (angular.isFunction(url)) return url(u); - return url == u; - }; - - this.matchHeaders = function(h) { - if (angular.isUndefined(headers)) return true; - if (angular.isFunction(headers)) return headers(h); - return angular.equals(headers, h); - }; - - this.matchData = function(d) { - if (angular.isUndefined(data)) return true; - if (data && angular.isFunction(data.test)) return data.test(d); - if (data && angular.isFunction(data)) return data(d); - if (data && !angular.isString(data)) { - return angular.equals(angular.fromJson(angular.toJson(data)), angular.fromJson(d)); - } - return data == d; - }; - - this.toString = function() { - return method + ' ' + url; - }; - - this.params = function(u) { - return angular.extend(parseQuery(), pathParams()); - - function pathParams() { - var keyObj = {}; - if (!url || !angular.isFunction(url.test) || !keys || keys.length === 0) return keyObj; - - var m = url.exec(u); - if (!m) return keyObj; - for (var i = 1, len = m.length; i < len; ++i) { - var key = keys[i - 1]; - var val = m[i]; - if (key && val) { - keyObj[key.name || key] = val; - } - } - - return keyObj; - } - - function parseQuery() { - var obj = {}, key_value, key, - queryStr = u.indexOf('?') > -1 - ? u.substring(u.indexOf('?') + 1) - : ""; - - angular.forEach(queryStr.split('&'), function(keyValue) { - if (keyValue) { - key_value = keyValue.replace(/\+/g,'%20').split('='); - key = tryDecodeURIComponent(key_value[0]); - if (angular.isDefined(key)) { - var val = angular.isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true; - if (!hasOwnProperty.call(obj, key)) { - obj[key] = val; - } else if (angular.isArray(obj[key])) { - obj[key].push(val); - } else { - obj[key] = [obj[key],val]; - } - } - } - }); - return obj; - } - function tryDecodeURIComponent(value) { - try { - return decodeURIComponent(value); - } catch (e) { - // Ignore any invalid uri component - } - } - }; -} - -function createMockXhr() { - return new MockXhr(); -} - -function MockXhr() { - - // hack for testing $http, $httpBackend - MockXhr.$$lastInstance = this; - - this.open = function(method, url, async) { - this.$$method = method; - this.$$url = url; - this.$$async = async; - this.$$reqHeaders = {}; - this.$$respHeaders = {}; - }; - - this.send = function(data) { - this.$$data = data; - }; - - this.setRequestHeader = function(key, value) { - this.$$reqHeaders[key] = value; - }; - - this.getResponseHeader = function(name) { - // the lookup must be case insensitive, - // that's why we try two quick lookups first and full scan last - var header = this.$$respHeaders[name]; - if (header) return header; - - name = angular.lowercase(name); - header = this.$$respHeaders[name]; - if (header) return header; - - header = undefined; - angular.forEach(this.$$respHeaders, function(headerVal, headerName) { - if (!header && angular.lowercase(headerName) == name) header = headerVal; - }); - return header; - }; - - this.getAllResponseHeaders = function() { - var lines = []; - - angular.forEach(this.$$respHeaders, function(value, key) { - lines.push(key + ': ' + value); - }); - return lines.join('\n'); - }; - - this.abort = angular.noop; -} - - -/** - * @ngdoc service - * @name $timeout - * @description - * - * This service is just a simple decorator for {@link ng.$timeout $timeout} service - * that adds a "flush" and "verifyNoPendingTasks" methods. - */ - -angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $browser) { - - /** - * @ngdoc method - * @name $timeout#flush - * @description - * - * Flushes the queue of pending tasks. - * - * @param {number=} delay maximum timeout amount to flush up until - */ - $delegate.flush = function(delay) { - $browser.defer.flush(delay); - }; - - /** - * @ngdoc method - * @name $timeout#verifyNoPendingTasks - * @description - * - * Verifies that there are no pending tasks that need to be flushed. - */ - $delegate.verifyNoPendingTasks = function() { - if ($browser.deferredFns.length) { - throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' + - formatPendingTasksAsString($browser.deferredFns)); - } - }; - - function formatPendingTasksAsString(tasks) { - var result = []; - angular.forEach(tasks, function(task) { - result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}'); - }); - - return result.join(', '); - } - - return $delegate; -}]; - -angular.mock.$RAFDecorator = ['$delegate', function($delegate) { - var rafFn = function(fn) { - var index = rafFn.queue.length; - rafFn.queue.push(fn); - return function() { - rafFn.queue.splice(index, 1); - }; - }; - - rafFn.queue = []; - rafFn.supported = $delegate.supported; - - rafFn.flush = function() { - if (rafFn.queue.length === 0) { - throw new Error('No rAF callbacks present'); - } - - var length = rafFn.queue.length; - for (var i = 0; i < length; i++) { - rafFn.queue[i](); - } - - rafFn.queue = rafFn.queue.slice(i); - }; - - return rafFn; -}]; - -/** - * - */ -angular.mock.$RootElementProvider = function() { - this.$get = function() { - return angular.element('
'); - }; -}; - -/** - * @ngdoc service - * @name $controller - * @description - * A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing - * controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}. - * - * - * ## Example - * - * ```js - * - * // Directive definition ... - * - * myMod.directive('myDirective', { - * controller: 'MyDirectiveController', - * bindToController: { - * name: '@' - * } - * }); - * - * - * // Controller definition ... - * - * myMod.controller('MyDirectiveController', ['$log', function($log) { - * $log.info(this.name); - * })]; - * - * - * // In a test ... - * - * describe('myDirectiveController', function() { - * it('should write the bound name to the log', inject(function($controller, $log) { - * var ctrl = $controller('MyDirectiveController', { /* no locals */ }, { name: 'Clark Kent' }); - * expect(ctrl.name).toEqual('Clark Kent'); - * expect($log.info.logs).toEqual(['Clark Kent']); - * }); - * }); - * - * ``` - * - * @param {Function|string} constructor If called with a function then it's considered to be the - * controller constructor function. Otherwise it's considered to be a string which is used - * to retrieve the controller constructor using the following steps: - * - * * check if a controller with given name is registered via `$controllerProvider` - * * check if evaluating the string on the current scope returns a constructor - * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global - * `window` object (not recommended) - * - * The string can use the `controller as property` syntax, where the controller instance is published - * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this - * to work correctly. - * - * @param {Object} locals Injection locals for Controller. - * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used - * to simulate the `bindToController` feature and simplify certain kinds of tests. - * @return {Object} Instance of given controller. - */ -angular.mock.$ControllerDecorator = ['$delegate', function($delegate) { - return function(expression, locals, later, ident) { - if (later && typeof later === 'object') { - var create = $delegate(expression, locals, true, ident); - angular.extend(create.instance, later); - return create(); - } - return $delegate(expression, locals, later, ident); - }; -}]; - -/** - * @ngdoc service - * @name $componentController - * @description - * A service that can be used to create instances of component controllers. - *
- * Be aware that the controller will be instantiated and attached to the scope as specified in - * the component definition object. That means that you must always provide a `$scope` object - * in the `locals` param. - *
- * @param {string} componentName the name of the component whose controller we want to instantiate - * @param {Object} locals Injection locals for Controller. - * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used - * to simulate the `bindToController` feature and simplify certain kinds of tests. - * @param {string=} ident Override the property name to use when attaching the controller to the scope. - * @return {Object} Instance of requested controller. - */ -angular.mock.$ComponentControllerProvider = ['$compileProvider', function($compileProvider) { - return { - $get: ['$controller','$injector', function($controller,$injector) { - return function $componentController(componentName, locals, bindings, ident) { - // get all directives associated to the component name - var directives = $injector.get(componentName + 'Directive'); - // look for those directives that are components - var candidateDirectives = directives.filter(function(directiveInfo) { - // components have controller, controllerAs and restrict:'E' - return directiveInfo.controller && directiveInfo.controllerAs && directiveInfo.restrict === 'E'; - }); - // check if valid directives found - if (candidateDirectives.length === 0) { - throw new Error('No component found'); - } - if (candidateDirectives.length > 1) { - throw new Error('Too many components found'); - } - // get the info of the component - var directiveInfo = candidateDirectives[0]; - return $controller(directiveInfo.controller, locals, bindings, ident || directiveInfo.controllerAs); - }; - }] - }; -}]; - - -/** - * @ngdoc module - * @name ngMock - * @packageName angular-mocks - * @description - * - * # ngMock - * - * The `ngMock` module provides support to inject and mock Angular services into unit tests. - * In addition, ngMock also extends various core ng services such that they can be - * inspected and controlled in a synchronous manner within test code. - * - * - *
- * - */ -angular.module('ngMock', ['ng']).provider({ - $browser: angular.mock.$BrowserProvider, - $exceptionHandler: angular.mock.$ExceptionHandlerProvider, - $log: angular.mock.$LogProvider, - $interval: angular.mock.$IntervalProvider, - $httpBackend: angular.mock.$HttpBackendProvider, - $rootElement: angular.mock.$RootElementProvider, - $componentController: angular.mock.$ComponentControllerProvider -}).config(['$provide', function($provide) { - $provide.decorator('$timeout', angular.mock.$TimeoutDecorator); - $provide.decorator('$$rAF', angular.mock.$RAFDecorator); - $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator); - $provide.decorator('$controller', angular.mock.$ControllerDecorator); -}]); - -/** - * @ngdoc module - * @name ngMockE2E - * @module ngMockE2E - * @packageName angular-mocks - * @description - * - * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. - * Currently there is only one mock present in this module - - * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock. - */ -angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) { - $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator); -}]); - -/** - * @ngdoc service - * @name $httpBackend - * @module ngMockE2E - * @description - * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of - * applications that use the {@link ng.$http $http service}. - * - * *Note*: For fake http backend implementation suitable for unit testing please see - * {@link ngMock.$httpBackend unit-testing $httpBackend mock}. - * - * This implementation can be used to respond with static or dynamic responses via the `when` api - * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the - * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch - * templates from a webserver). - * - * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application - * is being developed with the real backend api replaced with a mock, it is often desirable for - * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch - * templates or static files from the webserver). To configure the backend with this behavior - * use the `passThrough` request handler of `when` instead of `respond`. - * - * Additionally, we don't want to manually have to flush mocked out requests like we do during unit - * testing. For this reason the e2e $httpBackend flushes mocked out requests - * automatically, closely simulating the behavior of the XMLHttpRequest object. - * - * To setup the application to run with this http backend, you have to create a module that depends - * on the `ngMockE2E` and your application modules and defines the fake backend: - * - * ```js - * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']); - * myAppDev.run(function($httpBackend) { - * phones = [{name: 'phone1'}, {name: 'phone2'}]; - * - * // returns the current list of phones - * $httpBackend.whenGET('/phones').respond(phones); - * - * // adds a new phone to the phones array - * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { - * var phone = angular.fromJson(data); - * phones.push(phone); - * return [200, phone, {}]; - * }); - * $httpBackend.whenGET(/^\/templates\//).passThrough(); - * //... - * }); - * ``` - * - * Afterwards, bootstrap your app with this new module. - */ - -/** - * @ngdoc method - * @name $httpBackend#when - * @module ngMockE2E - * @description - * Creates a new backend definition. - * - * @param {string} method HTTP method. - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp)=} data HTTP request body. - * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header - * object and returns true if the headers match the current definition. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - * - * - respond – - * `{function([status,] data[, headers, statusText]) - * | function(function(method, url, data, headers, params)}` - * – The respond method takes a set of static data to be returned or a function that can return - * an array containing response status (number), response data (string), response headers - * (Object), and the text for the status (string). - * - passThrough – `{function()}` – Any request matching a backend definition with - * `passThrough` handler will be passed through to the real backend (an XHR request will be made - * to the server.) - * - Both methods return the `requestHandler` object for possible overrides. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenGET - * @module ngMockE2E - * @description - * Creates a new backend definition for GET requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenHEAD - * @module ngMockE2E - * @description - * Creates a new backend definition for HEAD requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenDELETE - * @module ngMockE2E - * @description - * Creates a new backend definition for DELETE requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenPOST - * @module ngMockE2E - * @description - * Creates a new backend definition for POST requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp)=} data HTTP request body. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenPUT - * @module ngMockE2E - * @description - * Creates a new backend definition for PUT requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp)=} data HTTP request body. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenPATCH - * @module ngMockE2E - * @description - * Creates a new backend definition for PATCH requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(string|RegExp)=} data HTTP request body. - * @param {(Object|function(Object))=} headers HTTP headers. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ - -/** - * @ngdoc method - * @name $httpBackend#whenJSONP - * @module ngMockE2E - * @description - * Creates a new backend definition for JSONP requests. For more info see `when()`. - * - * @param {string|RegExp|function(string)} url HTTP url or function that receives a url - * and returns true if the url matches the current definition. - * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on - * {@link ngMock.$httpBackend $httpBackend mock}. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ -/** - * @ngdoc method - * @name $httpBackend#whenRoute - * @module ngMockE2E - * @description - * Creates a new backend definition that compares only with the requested route. - * - * @param {string} method HTTP method. - * @param {string} url HTTP url string that supports colon param matching. - * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that - * control how a matched request is handled. You can save this object for later use and invoke - * `respond` or `passThrough` again in order to change how a matched request is handled. - */ -angular.mock.e2e = {}; -angular.mock.e2e.$httpBackendDecorator = - ['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock]; - - -/** - * @ngdoc type - * @name $rootScope.Scope - * @module ngMock - * @description - * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These - * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when - * `ngMock` module is loaded. - * - * In addition to all the regular `Scope` methods, the following helper methods are available: - */ -angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) { - - var $rootScopePrototype = Object.getPrototypeOf($delegate); - - $rootScopePrototype.$countChildScopes = countChildScopes; - $rootScopePrototype.$countWatchers = countWatchers; - - return $delegate; - - // ------------------------------------------------------------------------------------------ // - - /** - * @ngdoc method - * @name $rootScope.Scope#$countChildScopes - * @module ngMock - * @description - * Counts all the direct and indirect child scopes of the current scope. - * - * The current scope is excluded from the count. The count includes all isolate child scopes. - * - * @returns {number} Total number of child scopes. - */ - function countChildScopes() { - // jshint validthis: true - var count = 0; // exclude the current scope - var pendingChildHeads = [this.$$childHead]; - var currentScope; - - while (pendingChildHeads.length) { - currentScope = pendingChildHeads.shift(); - - while (currentScope) { - count += 1; - pendingChildHeads.push(currentScope.$$childHead); - currentScope = currentScope.$$nextSibling; - } - } - - return count; - } - - - /** - * @ngdoc method - * @name $rootScope.Scope#$countWatchers - * @module ngMock - * @description - * Counts all the watchers of direct and indirect child scopes of the current scope. - * - * The watchers of the current scope are included in the count and so are all the watchers of - * isolate child scopes. - * - * @returns {number} Total number of watchers. - */ - function countWatchers() { - // jshint validthis: true - var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope - var pendingChildHeads = [this.$$childHead]; - var currentScope; - - while (pendingChildHeads.length) { - currentScope = pendingChildHeads.shift(); - - while (currentScope) { - count += currentScope.$$watchers ? currentScope.$$watchers.length : 0; - pendingChildHeads.push(currentScope.$$childHead); - currentScope = currentScope.$$nextSibling; - } - } - - return count; - } -}]; - - -if (window.jasmine || window.mocha) { - - var currentSpec = null, - annotatedFunctions = [], - isSpecRunning = function() { - return !!currentSpec; - }; - - angular.mock.$$annotate = angular.injector.$$annotate; - angular.injector.$$annotate = function(fn) { - if (typeof fn === 'function' && !fn.$inject) { - annotatedFunctions.push(fn); - } - return angular.mock.$$annotate.apply(this, arguments); - }; - - - (window.beforeEach || window.setup)(function() { - annotatedFunctions = []; - currentSpec = this; - }); - - (window.afterEach || window.teardown)(function() { - var injector = currentSpec.$injector; - - annotatedFunctions.forEach(function(fn) { - delete fn.$inject; - }); - - angular.forEach(currentSpec.$modules, function(module) { - if (module && module.$$hashKey) { - module.$$hashKey = undefined; - } - }); - - currentSpec.$injector = null; - currentSpec.$modules = null; - currentSpec.$providerInjector = null; - currentSpec = null; - - if (injector) { - injector.get('$rootElement').off(); - injector.get('$rootScope').$destroy(); - } - - // clean up jquery's fragment cache - angular.forEach(angular.element.fragments, function(val, key) { - delete angular.element.fragments[key]; - }); - - MockXhr.$$lastInstance = null; - - angular.forEach(angular.callbacks, function(val, key) { - delete angular.callbacks[key]; - }); - angular.callbacks.counter = 0; - }); - - /** - * @ngdoc function - * @name angular.mock.module - * @description - * - * *NOTE*: This function is also published on window for easy access.
- * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha - * - * This function registers a module configuration code. It collects the configuration information - * which will be used when the injector is created by {@link angular.mock.inject inject}. - * - * See {@link angular.mock.inject inject} for usage example - * - * @param {...(string|Function|Object)} fns any number of modules which are represented as string - * aliases or as anonymous module initialization functions. The modules are used to - * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an - * object literal is passed each key-value pair will be registered on the module via - * {@link auto.$provide $provide}.value, the key being the string name (or token) to associate - * with the value on the injector. - */ - window.module = angular.mock.module = function() { - var moduleFns = Array.prototype.slice.call(arguments, 0); - return isSpecRunning() ? workFn() : workFn; - ///////////////////// - function workFn() { - if (currentSpec.$injector) { - throw new Error('Injector already created, can not register a module!'); - } else { - var fn, modules = currentSpec.$modules || (currentSpec.$modules = []); - angular.forEach(moduleFns, function(module) { - if (angular.isObject(module) && !angular.isArray(module)) { - fn = function($provide) { - angular.forEach(module, function(value, key) { - $provide.value(key, value); - }); - }; - } else { - fn = module; - } - if (currentSpec.$providerInjector) { - currentSpec.$providerInjector.invoke(fn); - } else { - modules.push(fn); - } - }); - } - } - }; - - /** - * @ngdoc function - * @name angular.mock.inject - * @description - * - * *NOTE*: This function is also published on window for easy access.
- * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha - * - * The inject function wraps a function into an injectable function. The inject() creates new - * instance of {@link auto.$injector $injector} per test, which is then used for - * resolving references. - * - * - * ## Resolving References (Underscore Wrapping) - * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this - * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable - * that is declared in the scope of the `describe()` block. Since we would, most likely, want - * the variable to have the same name of the reference we have a problem, since the parameter - * to the `inject()` function would hide the outer variable. - * - * To help with this, the injected parameters can, optionally, be enclosed with underscores. - * These are ignored by the injector when the reference name is resolved. - * - * For example, the parameter `_myService_` would be resolved as the reference `myService`. - * Since it is available in the function body as _myService_, we can then assign it to a variable - * defined in an outer scope. - * - * ``` - * // Defined out reference variable outside - * var myService; - * - * // Wrap the parameter in underscores - * beforeEach( inject( function(_myService_){ - * myService = _myService_; - * })); - * - * // Use myService in a series of tests. - * it('makes use of myService', function() { - * myService.doStuff(); - * }); - * - * ``` - * - * See also {@link angular.mock.module angular.mock.module} - * - * ## Example - * Example of what a typical jasmine tests looks like with the inject method. - * ```js - * - * angular.module('myApplicationModule', []) - * .value('mode', 'app') - * .value('version', 'v1.0.1'); - * - * - * describe('MyApp', function() { - * - * // You need to load modules that you want to test, - * // it loads only the "ng" module by default. - * beforeEach(module('myApplicationModule')); - * - * - * // inject() is used to inject arguments of all given functions - * it('should provide a version', inject(function(mode, version) { - * expect(version).toEqual('v1.0.1'); - * expect(mode).toEqual('app'); - * })); - * - * - * // The inject and module method can also be used inside of the it or beforeEach - * it('should override a version and test the new version is injected', function() { - * // module() takes functions or strings (module aliases) - * module(function($provide) { - * $provide.value('version', 'overridden'); // override version here - * }); - * - * inject(function(version) { - * expect(version).toEqual('overridden'); - * }); - * }); - * }); - * - * ``` - * - * @param {...Function} fns any number of functions which will be injected using the injector. - */ - - - - var ErrorAddingDeclarationLocationStack = function(e, errorForStack) { - this.message = e.message; - this.name = e.name; - if (e.line) this.line = e.line; - if (e.sourceId) this.sourceId = e.sourceId; - if (e.stack && errorForStack) - this.stack = e.stack + '\n' + errorForStack.stack; - if (e.stackArray) this.stackArray = e.stackArray; - }; - ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString; - - window.inject = angular.mock.inject = function() { - var blockFns = Array.prototype.slice.call(arguments, 0); - var errorForStack = new Error('Declaration Location'); - return isSpecRunning() ? workFn.call(currentSpec) : workFn; - ///////////////////// - function workFn() { - var modules = currentSpec.$modules || []; - var strictDi = !!currentSpec.$injectorStrict; - modules.unshift(function($injector) { - currentSpec.$providerInjector = $injector; - }); - modules.unshift('ngMock'); - modules.unshift('ng'); - var injector = currentSpec.$injector; - if (!injector) { - if (strictDi) { - // If strictDi is enabled, annotate the providerInjector blocks - angular.forEach(modules, function(moduleFn) { - if (typeof moduleFn === "function") { - angular.injector.$$annotate(moduleFn); - } - }); - } - injector = currentSpec.$injector = angular.injector(modules, strictDi); - currentSpec.$injectorStrict = strictDi; - } - for (var i = 0, ii = blockFns.length; i < ii; i++) { - if (currentSpec.$injectorStrict) { - // If the injector is strict / strictDi, and the spec wants to inject using automatic - // annotation, then annotate the function here. - injector.annotate(blockFns[i]); - } - try { - /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */ - injector.invoke(blockFns[i] || angular.noop, this); - /* jshint +W040 */ - } catch (e) { - if (e.stack && errorForStack) { - throw new ErrorAddingDeclarationLocationStack(e, errorForStack); - } - throw e; - } finally { - errorForStack = null; - } - } - } - }; - - - angular.mock.inject.strictDi = function(value) { - value = arguments.length ? !!value : true; - return isSpecRunning() ? workFn() : workFn; - - function workFn() { - if (value !== currentSpec.$injectorStrict) { - if (currentSpec.$injector) { - throw new Error('Injector already created, can not modify strict annotations'); - } else { - currentSpec.$injectorStrict = value; - } - } - } - }; -} - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js deleted file mode 100644 index 444be83c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.js +++ /dev/null @@ -1,768 +0,0 @@ -/** - * @license AngularJS v1.5.0 - * (c) 2010-2016 Google, Inc. http://angularjs.org - * License: MIT - */ -(function(window, angular, undefined) {'use strict'; - -var $resourceMinErr = angular.$$minErr('$resource'); - -// Helper functions and regex to lookup a dotted path on an object -// stopping at undefined/null. The path must be composed of ASCII -// identifiers (just like $parse) -var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/; - -function isValidDottedPath(path) { - return (path != null && path !== '' && path !== 'hasOwnProperty' && - MEMBER_NAME_REGEX.test('.' + path)); -} - -function lookupDottedPath(obj, path) { - if (!isValidDottedPath(path)) { - throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path); - } - var keys = path.split('.'); - for (var i = 0, ii = keys.length; i < ii && angular.isDefined(obj); i++) { - var key = keys[i]; - obj = (obj !== null) ? obj[key] : undefined; - } - return obj; -} - -/** - * Create a shallow copy of an object and clear other fields from the destination - */ -function shallowClearAndCopy(src, dst) { - dst = dst || {}; - - angular.forEach(dst, function(value, key) { - delete dst[key]; - }); - - for (var key in src) { - if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { - dst[key] = src[key]; - } - } - - return dst; -} - -/** - * @ngdoc module - * @name ngResource - * @description - * - * # ngResource - * - * The `ngResource` module provides interaction support with RESTful services - * via the $resource service. - * - * - *
- * - * See {@link ngResource.$resource `$resource`} for usage. - */ - -/** - * @ngdoc service - * @name $resource - * @requires $http - * @requires ng.$log - * @requires $q - * @requires ng.$timeout - * - * @description - * A factory which creates a resource object that lets you interact with - * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. - * - * The returned resource object has action methods which provide high-level behaviors without - * the need to interact with the low level {@link ng.$http $http} service. - * - * Requires the {@link ngResource `ngResource`} module to be installed. - * - * By default, trailing slashes will be stripped from the calculated URLs, - * which can pose problems with server backends that do not expect that - * behavior. This can be disabled by configuring the `$resourceProvider` like - * this: - * - * ```js - app.config(['$resourceProvider', function($resourceProvider) { - // Don't strip trailing slashes from calculated URLs - $resourceProvider.defaults.stripTrailingSlashes = false; - }]); - * ``` - * - * @param {string} url A parameterized URL template with parameters prefixed by `:` as in - * `/user/:username`. If you are using a URL with a port number (e.g. - * `http://example.com:8080/api`), it will be respected. - * - * If you are using a url with a suffix, just add the suffix, like this: - * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')` - * or even `$resource('http://example.com/resource/:resource_id.:format')` - * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be - * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you - * can escape it with `/\.`. - * - * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in - * `actions` methods. If a parameter value is a function, it will be executed every time - * when a param value needs to be obtained for a request (unless the param was overridden). - * - * Each key value in the parameter object is first bound to url template if present and then any - * excess keys are appended to the url search query after the `?`. - * - * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in - * URL `/path/greet?salutation=Hello`. - * - * If the parameter value is prefixed with `@` then the value for that parameter will be extracted - * from the corresponding property on the `data` object (provided when calling an action method). - * For example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of - * `someParam` will be `data.someProp`. - * - * @param {Object.=} actions Hash with declaration of custom actions that should extend - * the default set of resource actions. The declaration should be created in the format of {@link - * ng.$http#usage $http.config}: - * - * {action1: {method:?, params:?, isArray:?, headers:?, ...}, - * action2: {method:?, params:?, isArray:?, headers:?, ...}, - * ...} - * - * Where: - * - * - **`action`** – {string} – The name of action. This name becomes the name of the method on - * your resource object. - * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`, - * `DELETE`, `JSONP`, etc). - * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of - * the parameter value is a function, it will be executed every time when a param value needs to - * be obtained for a request (unless the param was overridden). - * - **`url`** – {string} – action specific `url` override. The url templating is supported just - * like for the resource-level urls. - * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array, - * see `returns` section. - * - **`transformRequest`** – - * `{function(data, headersGetter)|Array.}` – - * transform function or an array of such functions. The transform function takes the http - * request body and headers and returns its transformed (typically serialized) version. - * By default, transformRequest will contain one function that checks if the request data is - * an object and serializes to using `angular.toJson`. To prevent this behavior, set - * `transformRequest` to an empty array: `transformRequest: []` - * - **`transformResponse`** – - * `{function(data, headersGetter)|Array.}` – - * transform function or an array of such functions. The transform function takes the http - * response body and headers and returns its transformed (typically deserialized) version. - * By default, transformResponse will contain one function that checks if the response looks - * like a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, - * set `transformResponse` to an empty array: `transformResponse: []` - * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the - * GET request, otherwise if a cache instance built with - * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for - * caching. - * - **`timeout`** – `{number}` – timeout in milliseconds.
- * **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are - * **not** supported in $resource, because the same value would be used for multiple requests. - * If you are looking for a way to cancel requests, you should use the `cancellable` option. - * - **`cancellable`** – `{boolean}` – if set to true, the request made by a "non-instance" call - * will be cancelled (if not already completed) by calling `$cancelRequest()` on the call's - * return value. Calling `$cancelRequest()` for a non-cancellable or an already - * completed/cancelled request will have no effect.
- * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the - * XHR object. See - * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5) - * for more information. - * - **`responseType`** - `{string}` - see - * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType). - * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods - - * `response` and `responseError`. Both `response` and `responseError` interceptors get called - * with `http response` object. See {@link ng.$http $http interceptors}. - * - * @param {Object} options Hash with custom settings that should extend the - * default `$resourceProvider` behavior. The supported options are: - * - * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing - * slashes from any calculated URL will be stripped. (Defaults to true.) - * - **`cancellable`** – {boolean} – If true, the request made by a "non-instance" call will be - * cancelled (if not already completed) by calling `$cancelRequest()` on the call's return value. - * This can be overwritten per action. (Defaults to false.) - * - * @returns {Object} A resource "class" object with methods for the default set of resource actions - * optionally extended with custom `actions`. The default set contains these actions: - * ```js - * { 'get': {method:'GET'}, - * 'save': {method:'POST'}, - * 'query': {method:'GET', isArray:true}, - * 'remove': {method:'DELETE'}, - * 'delete': {method:'DELETE'} }; - * ``` - * - * Calling these methods invoke an {@link ng.$http} with the specified http method, - * destination and parameters. When the data is returned from the server then the object is an - * instance of the resource class. The actions `save`, `remove` and `delete` are available on it - * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create, - * read, update, delete) on server-side data like this: - * ```js - * var User = $resource('/user/:userId', {userId:'@id'}); - * var user = User.get({userId:123}, function() { - * user.abc = true; - * user.$save(); - * }); - * ``` - * - * It is important to realize that invoking a $resource object method immediately returns an - * empty reference (object or array depending on `isArray`). Once the data is returned from the - * server the existing reference is populated with the actual data. This is a useful trick since - * usually the resource is assigned to a model which is then rendered by the view. Having an empty - * object results in no rendering, once the data arrives from the server then the object is - * populated with the data and the view automatically re-renders itself showing the new data. This - * means that in most cases one never has to write a callback function for the action methods. - * - * The action methods on the class object or instance object can be invoked with the following - * parameters: - * - * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])` - * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])` - * - non-GET instance actions: `instance.$action([parameters], [success], [error])` - * - * - * Success callback is called with (value, responseHeaders) arguments, where the value is - * the populated resource instance or collection object. The error callback is called - * with (httpResponse) argument. - * - * Class actions return empty instance (with additional properties below). - * Instance actions return promise of the action. - * - * The Resource instances and collections have these additional properties: - * - * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this - * instance or collection. - * - * On success, the promise is resolved with the same resource instance or collection object, - * updated with data from server. This makes it easy to use in - * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view - * rendering until the resource(s) are loaded. - * - * On failure, the promise is rejected with the {@link ng.$http http response} object, without - * the `resource` property. - * - * If an interceptor object was provided, the promise will instead be resolved with the value - * returned by the interceptor. - * - * - `$resolved`: `true` after first server interaction is completed (either with success or - * rejection), `false` before that. Knowing if the Resource has been resolved is useful in - * data-binding. - * - * The Resource instances and collections have these additional methods: - * - * - `$cancelRequest`: If there is a cancellable, pending request related to the instance or - * collection, calling this method will abort the request. - * - * @example - * - * # Credit card resource - * - * ```js - // Define CreditCard class - var CreditCard = $resource('/user/:userId/card/:cardId', - {userId:123, cardId:'@id'}, { - charge: {method:'POST', params:{charge:true}} - }); - - // We can retrieve a collection from the server - var cards = CreditCard.query(function() { - // GET: /user/123/card - // server returns: [ {id:456, number:'1234', name:'Smith'} ]; - - var card = cards[0]; - // each item is an instance of CreditCard - expect(card instanceof CreditCard).toEqual(true); - card.name = "J. Smith"; - // non GET methods are mapped onto the instances - card.$save(); - // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'} - // server returns: {id:456, number:'1234', name: 'J. Smith'}; - - // our custom method is mapped as well. - card.$charge({amount:9.99}); - // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'} - }); - - // we can create an instance as well - var newCard = new CreditCard({number:'0123'}); - newCard.name = "Mike Smith"; - newCard.$save(); - // POST: /user/123/card {number:'0123', name:'Mike Smith'} - // server returns: {id:789, number:'0123', name: 'Mike Smith'}; - expect(newCard.id).toEqual(789); - * ``` - * - * The object returned from this function execution is a resource "class" which has "static" method - * for each action in the definition. - * - * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and - * `headers`. - * - * @example - * - * # User resource - * - * When the data is returned from the server then the object is an instance of the resource type and - * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD - * operations (create, read, update, delete) on server-side data. - - ```js - var User = $resource('/user/:userId', {userId:'@id'}); - User.get({userId:123}, function(user) { - user.abc = true; - user.$save(); - }); - ``` - * - * It's worth noting that the success callback for `get`, `query` and other methods gets passed - * in the response that came from the server as well as $http header getter function, so one - * could rewrite the above example and get access to http headers as: - * - ```js - var User = $resource('/user/:userId', {userId:'@id'}); - User.get({userId:123}, function(user, getResponseHeaders){ - user.abc = true; - user.$save(function(user, putResponseHeaders) { - //user => saved user object - //putResponseHeaders => $http header getter - }); - }); - ``` - * - * You can also access the raw `$http` promise via the `$promise` property on the object returned - * - ``` - var User = $resource('/user/:userId', {userId:'@id'}); - User.get({userId:123}) - .$promise.then(function(user) { - $scope.user = user; - }); - ``` - * - * @example - * - * # Creating a custom 'PUT' request - * - * In this example we create a custom method on our resource to make a PUT request - * ```js - * var app = angular.module('app', ['ngResource', 'ngRoute']); - * - * // Some APIs expect a PUT request in the format URL/object/ID - * // Here we are creating an 'update' method - * app.factory('Notes', ['$resource', function($resource) { - * return $resource('/notes/:id', null, - * { - * 'update': { method:'PUT' } - * }); - * }]); - * - * // In our controller we get the ID from the URL using ngRoute and $routeParams - * // We pass in $routeParams and our Notes factory along with $scope - * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', - function($scope, $routeParams, Notes) { - * // First get a note object from the factory - * var note = Notes.get({ id:$routeParams.id }); - * $id = note.id; - * - * // Now call update passing in the ID first then the object you are updating - * Notes.update({ id:$id }, note); - * - * // This will PUT /notes/ID with the note object in the request payload - * }]); - * ``` - * - * @example - * - * # Cancelling requests - * - * If an action's configuration specifies that it is cancellable, you can cancel the request related - * to an instance or collection (as long as it is a result of a "non-instance" call): - * - ```js - // ...defining the `Hotel` resource... - var Hotel = $resource('/api/hotel/:id', {id: '@id'}, { - // Let's make the `query()` method cancellable - query: {method: 'get', isArray: true, cancellable: true} - }); - - // ...somewhere in the PlanVacationController... - ... - this.onDestinationChanged = function onDestinationChanged(destination) { - // We don't care about any pending request for hotels - // in a different destination any more - this.availableHotels.$cancelRequest(); - - // Let's query for hotels in '' - // (calls: /api/hotel?location=) - this.availableHotels = Hotel.query({location: destination}); - }; - ``` - * - */ -angular.module('ngResource', ['ng']). - provider('$resource', function() { - var PROTOCOL_AND_DOMAIN_REGEX = /^https?:\/\/[^\/]*/; - var provider = this; - - this.defaults = { - // Strip slashes by default - stripTrailingSlashes: true, - - // Default actions configuration - actions: { - 'get': {method: 'GET'}, - 'save': {method: 'POST'}, - 'query': {method: 'GET', isArray: true}, - 'remove': {method: 'DELETE'}, - 'delete': {method: 'DELETE'} - } - }; - - this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) { - - var noop = angular.noop, - forEach = angular.forEach, - extend = angular.extend, - copy = angular.copy, - isFunction = angular.isFunction; - - /** - * We need our custom method because encodeURIComponent is too aggressive and doesn't follow - * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set - * (pchar) allowed in path segments: - * segment = *pchar - * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" - * pct-encoded = "%" HEXDIG HEXDIG - * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" - * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" - * / "*" / "+" / "," / ";" / "=" - */ - function encodeUriSegment(val) { - return encodeUriQuery(val, true). - replace(/%26/gi, '&'). - replace(/%3D/gi, '='). - replace(/%2B/gi, '+'); - } - - - /** - * This method is intended for encoding *key* or *value* parts of query component. We need a - * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't - * have to be encoded per http://tools.ietf.org/html/rfc3986: - * query = *( pchar / "/" / "?" ) - * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" - * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" - * pct-encoded = "%" HEXDIG HEXDIG - * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" - * / "*" / "+" / "," / ";" / "=" - */ - function encodeUriQuery(val, pctEncodeSpaces) { - return encodeURIComponent(val). - replace(/%40/gi, '@'). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); - } - - function Route(template, defaults) { - this.template = template; - this.defaults = extend({}, provider.defaults, defaults); - this.urlParams = {}; - } - - Route.prototype = { - setUrlParams: function(config, params, actionUrl) { - var self = this, - url = actionUrl || self.template, - val, - encodedVal, - protocolAndDomain = ''; - - var urlParams = self.urlParams = {}; - forEach(url.split(/\W/), function(param) { - if (param === 'hasOwnProperty') { - throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name."); - } - if (!(new RegExp("^\\d+$").test(param)) && param && - (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) { - urlParams[param] = { - isQueryParamValue: (new RegExp("\\?.*=:" + param + "(?:\\W|$)")).test(url) - }; - } - }); - url = url.replace(/\\:/g, ':'); - url = url.replace(PROTOCOL_AND_DOMAIN_REGEX, function(match) { - protocolAndDomain = match; - return ''; - }); - - params = params || {}; - forEach(self.urlParams, function(paramInfo, urlParam) { - val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam]; - if (angular.isDefined(val) && val !== null) { - if (paramInfo.isQueryParamValue) { - encodedVal = encodeUriQuery(val, true); - } else { - encodedVal = encodeUriSegment(val); - } - url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) { - return encodedVal + p1; - }); - } else { - url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match, - leadingSlashes, tail) { - if (tail.charAt(0) == '/') { - return tail; - } else { - return leadingSlashes + tail; - } - }); - } - }); - - // strip trailing slashes and set the url (unless this behavior is specifically disabled) - if (self.defaults.stripTrailingSlashes) { - url = url.replace(/\/+$/, '') || '/'; - } - - // then replace collapse `/.` if found in the last URL path segment before the query - // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x` - url = url.replace(/\/\.(?=\w+($|\?))/, '.'); - // replace escaped `/\.` with `/.` - config.url = protocolAndDomain + url.replace(/\/\\\./, '/.'); - - - // set params - delegate param encoding to $http - forEach(params, function(value, key) { - if (!self.urlParams[key]) { - config.params = config.params || {}; - config.params[key] = value; - } - }); - } - }; - - - function resourceFactory(url, paramDefaults, actions, options) { - var route = new Route(url, options); - - actions = extend({}, provider.defaults.actions, actions); - - function extractParams(data, actionParams) { - var ids = {}; - actionParams = extend({}, paramDefaults, actionParams); - forEach(actionParams, function(value, key) { - if (isFunction(value)) { value = value(); } - ids[key] = value && value.charAt && value.charAt(0) == '@' ? - lookupDottedPath(data, value.substr(1)) : value; - }); - return ids; - } - - function defaultResponseInterceptor(response) { - return response.resource; - } - - function Resource(value) { - shallowClearAndCopy(value || {}, this); - } - - Resource.prototype.toJSON = function() { - var data = extend({}, this); - delete data.$promise; - delete data.$resolved; - return data; - }; - - forEach(actions, function(action, name) { - var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method); - var numericTimeout = action.timeout; - var cancellable = angular.isDefined(action.cancellable) ? action.cancellable : - (options && angular.isDefined(options.cancellable)) ? options.cancellable : - provider.defaults.cancellable; - - if (numericTimeout && !angular.isNumber(numericTimeout)) { - $log.debug('ngResource:\n' + - ' Only numeric values are allowed as `timeout`.\n' + - ' Promises are not supported in $resource, because the same value would ' + - 'be used for multiple requests. If you are looking for a way to cancel ' + - 'requests, you should use the `cancellable` option.'); - delete action.timeout; - numericTimeout = null; - } - - Resource[name] = function(a1, a2, a3, a4) { - var params = {}, data, success, error; - - /* jshint -W086 */ /* (purposefully fall through case statements) */ - switch (arguments.length) { - case 4: - error = a4; - success = a3; - //fallthrough - case 3: - case 2: - if (isFunction(a2)) { - if (isFunction(a1)) { - success = a1; - error = a2; - break; - } - - success = a2; - error = a3; - //fallthrough - } else { - params = a1; - data = a2; - success = a3; - break; - } - case 1: - if (isFunction(a1)) success = a1; - else if (hasBody) data = a1; - else params = a1; - break; - case 0: break; - default: - throw $resourceMinErr('badargs', - "Expected up to 4 arguments [params, data, success, error], got {0} arguments", - arguments.length); - } - /* jshint +W086 */ /* (purposefully fall through case statements) */ - - var isInstanceCall = this instanceof Resource; - var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data)); - var httpConfig = {}; - var responseInterceptor = action.interceptor && action.interceptor.response || - defaultResponseInterceptor; - var responseErrorInterceptor = action.interceptor && action.interceptor.responseError || - undefined; - var timeoutDeferred; - var numericTimeoutPromise; - - forEach(action, function(value, key) { - switch (key) { - default: - httpConfig[key] = copy(value); - break; - case 'params': - case 'isArray': - case 'interceptor': - case 'cancellable': - break; - } - }); - - if (!isInstanceCall && cancellable) { - timeoutDeferred = $q.defer(); - httpConfig.timeout = timeoutDeferred.promise; - - if (numericTimeout) { - numericTimeoutPromise = $timeout(timeoutDeferred.resolve, numericTimeout); - } - } - - if (hasBody) httpConfig.data = data; - route.setUrlParams(httpConfig, - extend({}, extractParams(data, action.params || {}), params), - action.url); - - var promise = $http(httpConfig).then(function(response) { - var data = response.data; - - if (data) { - // Need to convert action.isArray to boolean in case it is undefined - // jshint -W018 - if (angular.isArray(data) !== (!!action.isArray)) { - throw $resourceMinErr('badcfg', - 'Error in resource configuration for action `{0}`. Expected response to ' + - 'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object', - angular.isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url); - } - // jshint +W018 - if (action.isArray) { - value.length = 0; - forEach(data, function(item) { - if (typeof item === "object") { - value.push(new Resource(item)); - } else { - // Valid JSON values may be string literals, and these should not be converted - // into objects. These items will not have access to the Resource prototype - // methods, but unfortunately there - value.push(item); - } - }); - } else { - var promise = value.$promise; // Save the promise - shallowClearAndCopy(data, value); - value.$promise = promise; // Restore the promise - } - } - response.resource = value; - - return response; - }, function(response) { - (error || noop)(response); - return $q.reject(response); - }); - - promise.finally(function() { - value.$resolved = true; - if (!isInstanceCall && cancellable) { - value.$cancelRequest = angular.noop; - $timeout.cancel(numericTimeoutPromise); - timeoutDeferred = numericTimeoutPromise = httpConfig.timeout = null; - } - }); - - promise = promise.then( - function(response) { - var value = responseInterceptor(response); - (success || noop)(value, response.headers); - return value; - }, - responseErrorInterceptor); - - if (!isInstanceCall) { - // we are creating instance / collection - // - set the initial promise - // - return the instance / collection - value.$promise = promise; - value.$resolved = false; - if (cancellable) value.$cancelRequest = timeoutDeferred.resolve; - - return value; - } - - // instance call - return promise; - }; - - - Resource.prototype['$' + name] = function(params, success, error) { - if (isFunction(params)) { - error = success; success = params; params = {}; - } - var result = Resource[name].call(this, params, this, success, error); - return result.$promise || result; - }; - }); - - Resource.bind = function(additionalParamDefaults) { - return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions); - }; - - return Resource; - } - - return resourceFactory; - }]; - }); - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js deleted file mode 100644 index 306657dc..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-resource.min.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(Q,d,G){'use strict';function H(t,g){g=g||{};d.forEach(g,function(d,q){delete g[q]});for(var q in t)!t.hasOwnProperty(q)||"$"===q.charAt(0)&&"$"===q.charAt(1)||(g[q]=t[q]);return g}var z=d.$$minErr("$resource"),N=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,g=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}}; -this.$get=["$http","$log","$q","$timeout",function(q,M,I,J){function A(d,h){return encodeURIComponent(d).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,h?"%20":"+")}function B(d,h){this.template=d;this.defaults=v({},g.defaults,h);this.urlParams={}}function K(e,h,n,k){function c(a,b){var c={};b=v({},h,b);u(b,function(b,h){x(b)&&(b=b());var f;if(b&&b.charAt&&"@"==b.charAt(0)){f=a;var l=b.substr(1);if(null==l||""===l||"hasOwnProperty"===l||!N.test("."+ -l))throw z("badmember",l);for(var l=l.split("."),m=0,k=l.length;m - */ - /* global -ngRouteModule */ -var ngRouteModule = angular.module('ngRoute', ['ng']). - provider('$route', $RouteProvider), - $routeMinErr = angular.$$minErr('ngRoute'); - -/** - * @ngdoc provider - * @name $routeProvider - * - * @description - * - * Used for configuring routes. - * - * ## Example - * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. - * - * ## Dependencies - * Requires the {@link ngRoute `ngRoute`} module to be installed. - */ -function $RouteProvider() { - function inherit(parent, extra) { - return angular.extend(Object.create(parent), extra); - } - - var routes = {}; - - /** - * @ngdoc method - * @name $routeProvider#when - * - * @param {string} path Route path (matched against `$location.path`). If `$location.path` - * contains redundant trailing slash or is missing one, the route will still match and the - * `$location.path` will be updated to add or drop the trailing slash to exactly match the - * route definition. - * - * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up - * to the next slash are matched and stored in `$routeParams` under the given `name` - * when the route matches. - * * `path` can contain named groups starting with a colon and ending with a star: - * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name` - * when the route matches. - * * `path` can contain optional named groups with a question mark: e.g.`:name?`. - * - * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match - * `/color/brown/largecode/code/with/slashes/edit` and extract: - * - * * `color: brown` - * * `largecode: code/with/slashes`. - * - * - * @param {Object} route Mapping information to be assigned to `$route.current` on route - * match. - * - * Object properties: - * - * - `controller` – `{(string|function()=}` – Controller fn that should be associated with - * newly created scope or the name of a {@link angular.Module#controller registered - * controller} if passed as a string. - * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller. - * If present, the controller will be published to scope under the `controllerAs` name. - * - `template` – `{string=|function()=}` – html template as a string or a function that - * returns an html template as a string which should be used by {@link - * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives. - * This property takes precedence over `templateUrl`. - * - * If `template` is a function, it will be called with the following parameters: - * - * - `{Array.}` - route parameters extracted from the current - * `$location.path()` by applying the current route - * - * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html - * template that should be used by {@link ngRoute.directive:ngView ngView}. - * - * If `templateUrl` is a function, it will be called with the following parameters: - * - * - `{Array.}` - route parameters extracted from the current - * `$location.path()` by applying the current route - * - * - `resolve` - `{Object.=}` - An optional map of dependencies which should - * be injected into the controller. If any of these dependencies are promises, the router - * will wait for them all to be resolved or one to be rejected before the controller is - * instantiated. - * If all the promises are resolved successfully, the values of the resolved promises are - * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is - * fired. If any of the promises are rejected the - * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. - * For easier access to the resolved dependencies from the template, the `resolve` map will - * be available on the scope of the route, under `$resolve` (by default) or a custom name - * specified by the `resolveAs` property (see below). This can be particularly useful, when - * working with {@link angular.Module#component components} as route templates.
- *
- * **Note:** If your scope already contains a property with this name, it will be hidden - * or overwritten. Make sure, you specify an appropriate name for this property, that - * does not collide with other properties on the scope. - *
- * The map object is: - * - * - `key` – `{string}`: a name of a dependency to be injected into the controller. - * - `factory` - `{string|function}`: If `string` then it is an alias for a service. - * Otherwise if function, then it is {@link auto.$injector#invoke injected} - * and the return value is treated as the dependency. If the result is a promise, it is - * resolved before its value is injected into the controller. Be aware that - * `ngRoute.$routeParams` will still refer to the previous route within these resolve - * functions. Use `$route.current.params` to access the new route parameters, instead. - * - * - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on - * the scope of the route. If omitted, defaults to `$resolve`. - * - * - `redirectTo` – `{(string|function())=}` – value to update - * {@link ng.$location $location} path with and trigger route redirection. - * - * If `redirectTo` is a function, it will be called with the following parameters: - * - * - `{Object.}` - route parameters extracted from the current - * `$location.path()` by applying the current route templateUrl. - * - `{string}` - current `$location.path()` - * - `{Object}` - current `$location.search()` - * - * The custom `redirectTo` function is expected to return a string which will be used - * to update `$location.path()` and `$location.search()`. - * - * - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()` - * or `$location.hash()` changes. - * - * If the option is set to `false` and url in the browser changes, then - * `$routeUpdate` event is broadcasted on the root scope. - * - * - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive - * - * If the option is set to `true`, then the particular route can be matched without being - * case sensitive - * - * @returns {Object} self - * - * @description - * Adds a new route definition to the `$route` service. - */ - this.when = function(path, route) { - //copy original route object to preserve params inherited from proto chain - var routeCopy = angular.copy(route); - if (angular.isUndefined(routeCopy.reloadOnSearch)) { - routeCopy.reloadOnSearch = true; - } - if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) { - routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch; - } - routes[path] = angular.extend( - routeCopy, - path && pathRegExp(path, routeCopy) - ); - - // create redirection for trailing slashes - if (path) { - var redirectPath = (path[path.length - 1] == '/') - ? path.substr(0, path.length - 1) - : path + '/'; - - routes[redirectPath] = angular.extend( - {redirectTo: path}, - pathRegExp(redirectPath, routeCopy) - ); - } - - return this; - }; - - /** - * @ngdoc property - * @name $routeProvider#caseInsensitiveMatch - * @description - * - * A boolean property indicating if routes defined - * using this provider should be matched using a case insensitive - * algorithm. Defaults to `false`. - */ - this.caseInsensitiveMatch = false; - - /** - * @param path {string} path - * @param opts {Object} options - * @return {?Object} - * - * @description - * Normalizes the given path, returning a regular expression - * and the original path. - * - * Inspired by pathRexp in visionmedia/express/lib/utils.js. - */ - function pathRegExp(path, opts) { - var insensitive = opts.caseInsensitiveMatch, - ret = { - originalPath: path, - regexp: path - }, - keys = ret.keys = []; - - path = path - .replace(/([().])/g, '\\$1') - .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option) { - var optional = option === '?' ? option : null; - var star = option === '*' ? option : null; - keys.push({ name: key, optional: !!optional }); - slash = slash || ''; - return '' - + (optional ? '' : slash) - + '(?:' - + (optional ? slash : '') - + (star && '(.+?)' || '([^/]+)') - + (optional || '') - + ')' - + (optional || ''); - }) - .replace(/([\/$\*])/g, '\\$1'); - - ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : ''); - return ret; - } - - /** - * @ngdoc method - * @name $routeProvider#otherwise - * - * @description - * Sets route definition that will be used on route change when no other route definition - * is matched. - * - * @param {Object|string} params Mapping information to be assigned to `$route.current`. - * If called with a string, the value maps to `redirectTo`. - * @returns {Object} self - */ - this.otherwise = function(params) { - if (typeof params === 'string') { - params = {redirectTo: params}; - } - this.when(null, params); - return this; - }; - - - this.$get = ['$rootScope', - '$location', - '$routeParams', - '$q', - '$injector', - '$templateRequest', - '$sce', - function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) { - - /** - * @ngdoc service - * @name $route - * @requires $location - * @requires $routeParams - * - * @property {Object} current Reference to the current route definition. - * The route definition contains: - * - * - `controller`: The controller constructor as defined in the route definition. - * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for - * controller instantiation. The `locals` contain - * the resolved values of the `resolve` map. Additionally the `locals` also contain: - * - * - `$scope` - The current route scope. - * - `$template` - The current route template HTML. - * - * The `locals` will be assigned to the route scope's `$resolve` property. You can override - * the property name, using `resolveAs` in the route definition. See - * {@link ngRoute.$routeProvider $routeProvider} for more info. - * - * @property {Object} routes Object with all route configuration Objects as its properties. - * - * @description - * `$route` is used for deep-linking URLs to controllers and views (HTML partials). - * It watches `$location.url()` and tries to map the path to an existing route definition. - * - * Requires the {@link ngRoute `ngRoute`} module to be installed. - * - * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API. - * - * The `$route` service is typically used in conjunction with the - * {@link ngRoute.directive:ngView `ngView`} directive and the - * {@link ngRoute.$routeParams `$routeParams`} service. - * - * @example - * This example shows how changing the URL hash causes the `$route` to match a route against the - * URL, and the `ngView` pulls in the partial. - * - * - * - *
- * Choose: - * Moby | - * Moby: Ch1 | - * Gatsby | - * Gatsby: Ch4 | - * Scarlet Letter
- * - *
- * - *
- * - *
$location.path() = {{$location.path()}}
- *
$route.current.templateUrl = {{$route.current.templateUrl}}
- *
$route.current.params = {{$route.current.params}}
- *
$route.current.scope.name = {{$route.current.scope.name}}
- *
$routeParams = {{$routeParams}}
- *
- *
- * - * - * controller: {{name}}
- * Book Id: {{params.bookId}}
- *
- * - * - * controller: {{name}}
- * Book Id: {{params.bookId}}
- * Chapter Id: {{params.chapterId}} - *
- * - * - * angular.module('ngRouteExample', ['ngRoute']) - * - * .controller('MainController', function($scope, $route, $routeParams, $location) { - * $scope.$route = $route; - * $scope.$location = $location; - * $scope.$routeParams = $routeParams; - * }) - * - * .controller('BookController', function($scope, $routeParams) { - * $scope.name = "BookController"; - * $scope.params = $routeParams; - * }) - * - * .controller('ChapterController', function($scope, $routeParams) { - * $scope.name = "ChapterController"; - * $scope.params = $routeParams; - * }) - * - * .config(function($routeProvider, $locationProvider) { - * $routeProvider - * .when('/Book/:bookId', { - * templateUrl: 'book.html', - * controller: 'BookController', - * resolve: { - * // I will cause a 1 second delay - * delay: function($q, $timeout) { - * var delay = $q.defer(); - * $timeout(delay.resolve, 1000); - * return delay.promise; - * } - * } - * }) - * .when('/Book/:bookId/ch/:chapterId', { - * templateUrl: 'chapter.html', - * controller: 'ChapterController' - * }); - * - * // configure html5 to get links working on jsfiddle - * $locationProvider.html5Mode(true); - * }); - * - * - * - * - * it('should load and compile correct template', function() { - * element(by.linkText('Moby: Ch1')).click(); - * var content = element(by.css('[ng-view]')).getText(); - * expect(content).toMatch(/controller\: ChapterController/); - * expect(content).toMatch(/Book Id\: Moby/); - * expect(content).toMatch(/Chapter Id\: 1/); - * - * element(by.partialLinkText('Scarlet')).click(); - * - * content = element(by.css('[ng-view]')).getText(); - * expect(content).toMatch(/controller\: BookController/); - * expect(content).toMatch(/Book Id\: Scarlet/); - * }); - * - *
- */ - - /** - * @ngdoc event - * @name $route#$routeChangeStart - * @eventType broadcast on root scope - * @description - * Broadcasted before a route change. At this point the route services starts - * resolving all of the dependencies needed for the route change to occur. - * Typically this involves fetching the view template as well as any dependencies - * defined in `resolve` route property. Once all of the dependencies are resolved - * `$routeChangeSuccess` is fired. - * - * The route change (and the `$location` change that triggered it) can be prevented - * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} - * for more details about event object. - * - * @param {Object} angularEvent Synthetic event object. - * @param {Route} next Future route information. - * @param {Route} current Current route information. - */ - - /** - * @ngdoc event - * @name $route#$routeChangeSuccess - * @eventType broadcast on root scope - * @description - * Broadcasted after a route change has happened successfully. - * The `resolve` dependencies are now available in the `current.locals` property. - * - * {@link ngRoute.directive:ngView ngView} listens for the directive - * to instantiate the controller and render the view. - * - * @param {Object} angularEvent Synthetic event object. - * @param {Route} current Current route information. - * @param {Route|Undefined} previous Previous route information, or undefined if current is - * first route entered. - */ - - /** - * @ngdoc event - * @name $route#$routeChangeError - * @eventType broadcast on root scope - * @description - * Broadcasted if any of the resolve promises are rejected. - * - * @param {Object} angularEvent Synthetic event object - * @param {Route} current Current route information. - * @param {Route} previous Previous route information. - * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise. - */ - - /** - * @ngdoc event - * @name $route#$routeUpdate - * @eventType broadcast on root scope - * @description - * The `reloadOnSearch` property has been set to false, and we are reusing the same - * instance of the Controller. - * - * @param {Object} angularEvent Synthetic event object - * @param {Route} current Current/previous route information. - */ - - var forceReload = false, - preparedRoute, - preparedRouteIsUpdateOnly, - $route = { - routes: routes, - - /** - * @ngdoc method - * @name $route#reload - * - * @description - * Causes `$route` service to reload the current route even if - * {@link ng.$location $location} hasn't changed. - * - * As a result of that, {@link ngRoute.directive:ngView ngView} - * creates new scope and reinstantiates the controller. - */ - reload: function() { - forceReload = true; - - var fakeLocationEvent = { - defaultPrevented: false, - preventDefault: function fakePreventDefault() { - this.defaultPrevented = true; - forceReload = false; - } - }; - - $rootScope.$evalAsync(function() { - prepareRoute(fakeLocationEvent); - if (!fakeLocationEvent.defaultPrevented) commitRoute(); - }); - }, - - /** - * @ngdoc method - * @name $route#updateParams - * - * @description - * Causes `$route` service to update the current URL, replacing - * current route parameters with those specified in `newParams`. - * Provided property names that match the route's path segment - * definitions will be interpolated into the location's path, while - * remaining properties will be treated as query params. - * - * @param {!Object} newParams mapping of URL parameter names to values - */ - updateParams: function(newParams) { - if (this.current && this.current.$$route) { - newParams = angular.extend({}, this.current.params, newParams); - $location.path(interpolate(this.current.$$route.originalPath, newParams)); - // interpolate modifies newParams, only query params are left - $location.search(newParams); - } else { - throw $routeMinErr('norout', 'Tried updating route when with no current route'); - } - } - }; - - $rootScope.$on('$locationChangeStart', prepareRoute); - $rootScope.$on('$locationChangeSuccess', commitRoute); - - return $route; - - ///////////////////////////////////////////////////// - - /** - * @param on {string} current url - * @param route {Object} route regexp to match the url against - * @return {?Object} - * - * @description - * Check if the route matches the current url. - * - * Inspired by match in - * visionmedia/express/lib/router/router.js. - */ - function switchRouteMatcher(on, route) { - var keys = route.keys, - params = {}; - - if (!route.regexp) return null; - - var m = route.regexp.exec(on); - if (!m) return null; - - for (var i = 1, len = m.length; i < len; ++i) { - var key = keys[i - 1]; - - var val = m[i]; - - if (key && val) { - params[key.name] = val; - } - } - return params; - } - - function prepareRoute($locationEvent) { - var lastRoute = $route.current; - - preparedRoute = parseRoute(); - preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route - && angular.equals(preparedRoute.pathParams, lastRoute.pathParams) - && !preparedRoute.reloadOnSearch && !forceReload; - - if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) { - if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) { - if ($locationEvent) { - $locationEvent.preventDefault(); - } - } - } - } - - function commitRoute() { - var lastRoute = $route.current; - var nextRoute = preparedRoute; - - if (preparedRouteIsUpdateOnly) { - lastRoute.params = nextRoute.params; - angular.copy(lastRoute.params, $routeParams); - $rootScope.$broadcast('$routeUpdate', lastRoute); - } else if (nextRoute || lastRoute) { - forceReload = false; - $route.current = nextRoute; - if (nextRoute) { - if (nextRoute.redirectTo) { - if (angular.isString(nextRoute.redirectTo)) { - $location.path(interpolate(nextRoute.redirectTo, nextRoute.params)).search(nextRoute.params) - .replace(); - } else { - $location.url(nextRoute.redirectTo(nextRoute.pathParams, $location.path(), $location.search())) - .replace(); - } - } - } - - $q.when(nextRoute). - then(function() { - if (nextRoute) { - var locals = angular.extend({}, nextRoute.resolve), - template, templateUrl; - - angular.forEach(locals, function(value, key) { - locals[key] = angular.isString(value) ? - $injector.get(value) : $injector.invoke(value, null, null, key); - }); - - if (angular.isDefined(template = nextRoute.template)) { - if (angular.isFunction(template)) { - template = template(nextRoute.params); - } - } else if (angular.isDefined(templateUrl = nextRoute.templateUrl)) { - if (angular.isFunction(templateUrl)) { - templateUrl = templateUrl(nextRoute.params); - } - if (angular.isDefined(templateUrl)) { - nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl); - template = $templateRequest(templateUrl); - } - } - if (angular.isDefined(template)) { - locals['$template'] = template; - } - return $q.all(locals); - } - }). - then(function(locals) { - // after route change - if (nextRoute == $route.current) { - if (nextRoute) { - nextRoute.locals = locals; - angular.copy(nextRoute.params, $routeParams); - } - $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute); - } - }, function(error) { - if (nextRoute == $route.current) { - $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error); - } - }); - } - } - - - /** - * @returns {Object} the current active route, by matching it against the URL - */ - function parseRoute() { - // Match a route - var params, match; - angular.forEach(routes, function(route, path) { - if (!match && (params = switchRouteMatcher($location.path(), route))) { - match = inherit(route, { - params: angular.extend({}, $location.search(), params), - pathParams: params}); - match.$$route = route; - } - }); - // No route matched; fallback to "otherwise" route - return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); - } - - /** - * @returns {string} interpolation of the redirect path with the parameters - */ - function interpolate(string, params) { - var result = []; - angular.forEach((string || '').split(':'), function(segment, i) { - if (i === 0) { - result.push(segment); - } else { - var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/); - var key = segmentMatch[1]; - result.push(params[key]); - result.push(segmentMatch[2] || ''); - delete params[key]; - } - }); - return result.join(''); - } - }]; -} - -ngRouteModule.provider('$routeParams', $RouteParamsProvider); - - -/** - * @ngdoc service - * @name $routeParams - * @requires $route - * - * @description - * The `$routeParams` service allows you to retrieve the current set of route parameters. - * - * Requires the {@link ngRoute `ngRoute`} module to be installed. - * - * The route parameters are a combination of {@link ng.$location `$location`}'s - * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}. - * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. - * - * In case of parameter name collision, `path` params take precedence over `search` params. - * - * The service guarantees that the identity of the `$routeParams` object will remain unchanged - * (but its properties will likely change) even when a route change occurs. - * - * Note that the `$routeParams` are only updated *after* a route change completes successfully. - * This means that you cannot rely on `$routeParams` being correct in route resolve functions. - * Instead you can use `$route.current.params` to access the new route's parameters. - * - * @example - * ```js - * // Given: - * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby - * // Route: /Chapter/:chapterId/Section/:sectionId - * // - * // Then - * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} - * ``` - */ -function $RouteParamsProvider() { - this.$get = function() { return {}; }; -} - -ngRouteModule.directive('ngView', ngViewFactory); -ngRouteModule.directive('ngView', ngViewFillContentFactory); - - -/** - * @ngdoc directive - * @name ngView - * @restrict ECA - * - * @description - * # Overview - * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by - * including the rendered template of the current route into the main layout (`index.html`) file. - * Every time the current route changes, the included view changes with it according to the - * configuration of the `$route` service. - * - * Requires the {@link ngRoute `ngRoute`} module to be installed. - * - * @animations - * enter - animation is used to bring new content into the browser. - * leave - animation is used to animate existing content away. - * - * The enter and leave animation occur concurrently. - * - * @scope - * @priority 400 - * @param {string=} onload Expression to evaluate whenever the view updates. - * - * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll - * $anchorScroll} to scroll the viewport after the view is updated. - * - * - If the attribute is not set, disable scrolling. - * - If the attribute is set without value, enable scrolling. - * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated - * as an expression yields a truthy value. - * @example - - -
- Choose: - Moby | - Moby: Ch1 | - Gatsby | - Gatsby: Ch4 | - Scarlet Letter
- -
-
-
-
- -
$location.path() = {{main.$location.path()}}
-
$route.current.templateUrl = {{main.$route.current.templateUrl}}
-
$route.current.params = {{main.$route.current.params}}
-
$routeParams = {{main.$routeParams}}
-
-
- - -
- controller: {{book.name}}
- Book Id: {{book.params.bookId}}
-
-
- - -
- controller: {{chapter.name}}
- Book Id: {{chapter.params.bookId}}
- Chapter Id: {{chapter.params.chapterId}} -
-
- - - .view-animate-container { - position:relative; - height:100px!important; - background:white; - border:1px solid black; - height:40px; - overflow:hidden; - } - - .view-animate { - padding:10px; - } - - .view-animate.ng-enter, .view-animate.ng-leave { - transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; - - display:block; - width:100%; - border-left:1px solid black; - - position:absolute; - top:0; - left:0; - right:0; - bottom:0; - padding:10px; - } - - .view-animate.ng-enter { - left:100%; - } - .view-animate.ng-enter.ng-enter-active { - left:0; - } - .view-animate.ng-leave.ng-leave-active { - left:-100%; - } - - - - angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) - .config(['$routeProvider', '$locationProvider', - function($routeProvider, $locationProvider) { - $routeProvider - .when('/Book/:bookId', { - templateUrl: 'book.html', - controller: 'BookCtrl', - controllerAs: 'book' - }) - .when('/Book/:bookId/ch/:chapterId', { - templateUrl: 'chapter.html', - controller: 'ChapterCtrl', - controllerAs: 'chapter' - }); - - $locationProvider.html5Mode(true); - }]) - .controller('MainCtrl', ['$route', '$routeParams', '$location', - function($route, $routeParams, $location) { - this.$route = $route; - this.$location = $location; - this.$routeParams = $routeParams; - }]) - .controller('BookCtrl', ['$routeParams', function($routeParams) { - this.name = "BookCtrl"; - this.params = $routeParams; - }]) - .controller('ChapterCtrl', ['$routeParams', function($routeParams) { - this.name = "ChapterCtrl"; - this.params = $routeParams; - }]); - - - - - it('should load and compile correct template', function() { - element(by.linkText('Moby: Ch1')).click(); - var content = element(by.css('[ng-view]')).getText(); - expect(content).toMatch(/controller\: ChapterCtrl/); - expect(content).toMatch(/Book Id\: Moby/); - expect(content).toMatch(/Chapter Id\: 1/); - - element(by.partialLinkText('Scarlet')).click(); - - content = element(by.css('[ng-view]')).getText(); - expect(content).toMatch(/controller\: BookCtrl/); - expect(content).toMatch(/Book Id\: Scarlet/); - }); - -
- */ - - -/** - * @ngdoc event - * @name ngView#$viewContentLoaded - * @eventType emit on the current ngView scope - * @description - * Emitted every time the ngView content is reloaded. - */ -ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate']; -function ngViewFactory($route, $anchorScroll, $animate) { - return { - restrict: 'ECA', - terminal: true, - priority: 400, - transclude: 'element', - link: function(scope, $element, attr, ctrl, $transclude) { - var currentScope, - currentElement, - previousLeaveAnimation, - autoScrollExp = attr.autoscroll, - onloadExp = attr.onload || ''; - - scope.$on('$routeChangeSuccess', update); - update(); - - function cleanupLastView() { - if (previousLeaveAnimation) { - $animate.cancel(previousLeaveAnimation); - previousLeaveAnimation = null; - } - - if (currentScope) { - currentScope.$destroy(); - currentScope = null; - } - if (currentElement) { - previousLeaveAnimation = $animate.leave(currentElement); - previousLeaveAnimation.then(function() { - previousLeaveAnimation = null; - }); - currentElement = null; - } - } - - function update() { - var locals = $route.current && $route.current.locals, - template = locals && locals.$template; - - if (angular.isDefined(template)) { - var newScope = scope.$new(); - var current = $route.current; - - // Note: This will also link all children of ng-view that were contained in the original - // html. If that content contains controllers, ... they could pollute/change the scope. - // However, using ng-view on an element with additional content does not make sense... - // Note: We can't remove them in the cloneAttchFn of $transclude as that - // function is called before linking the content, which would apply child - // directives to non existing elements. - var clone = $transclude(newScope, function(clone) { - $animate.enter(clone, null, currentElement || $element).then(function onNgViewEnter() { - if (angular.isDefined(autoScrollExp) - && (!autoScrollExp || scope.$eval(autoScrollExp))) { - $anchorScroll(); - } - }); - cleanupLastView(); - }); - - currentElement = clone; - currentScope = current.scope = newScope; - currentScope.$emit('$viewContentLoaded'); - currentScope.$eval(onloadExp); - } else { - cleanupLastView(); - } - } - } - }; -} - -// This directive is called during the $transclude call of the first `ngView` directive. -// It will replace and compile the content of the element with the loaded template. -// We need this directive so that the element content is already filled when -// the link function of another directive on the same element as ngView -// is called. -ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route']; -function ngViewFillContentFactory($compile, $controller, $route) { - return { - restrict: 'ECA', - priority: -400, - link: function(scope, $element) { - var current = $route.current, - locals = current.locals; - - $element.html(locals.$template); - - var link = $compile($element.contents()); - - if (current.controller) { - locals.$scope = scope; - var controller = $controller(current.controller, locals); - if (current.controllerAs) { - scope[current.controllerAs] = controller; - } - $element.data('$ngControllerController', controller); - $element.children().data('$ngControllerController', controller); - } - scope[current.resolveAs || '$resolve'] = locals; - - link(scope); - } - }; -} - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-route.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-route.min.js deleted file mode 100644 index 4d0d0187..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-route.min.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(r,d,C){'use strict';function x(s,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,y){function k(){n&&(g.cancel(n),n=null);l&&(l.$destroy(),l=null);m&&(n=g.leave(m),n.then(function(){n=null}),m=null)}function z(){var b=s.current&&s.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),f=s.current;m=y(b,function(b){g.enter(b,null,m||c).then(function(){!d.isDefined(u)||u&&!a.$eval(u)||h()});k()});l=f.scope=b;l.$emit("$viewContentLoaded"); -l.$eval(v)}else k()}var l,m,n,u=b.autoscroll,v=b.onload||"";a.$on("$routeChangeSuccess",z);z()}}}function A(d,h,g){return{restrict:"ECA",priority:-400,link:function(a,c){var b=g.current,f=b.locals;c.html(f.$template);var y=d(c.contents());if(b.controller){f.$scope=a;var k=h(b.controller,f);b.controllerAs&&(a[b.controllerAs]=k);c.data("$ngControllerController",k);c.children().data("$ngControllerController",k)}a[b.resolveAs||"$resolve"]=f;y(a)}}}r=d.module("ngRoute",["ng"]).provider("$route",function(){function s(a, -c){return d.extend(Object.create(a),c)}function h(a,d){var b=d.caseInsensitiveMatch,f={originalPath:a,regexp:a},g=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,d,b,c){a="?"===c?c:null;c="*"===c?c:null;g.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=new RegExp("^"+a+"$",b?"i":"");return f}var g={};this.when=function(a,c){var b=d.copy(c);d.isUndefined(b.reloadOnSearch)&& -(b.reloadOnSearch=!0);d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=d.extend(b,a&&h(a,b));if(a){var f="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[f]=d.extend({redirectTo:a},h(f,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,c,b,f,h,k,r){function l(b){var e= -t.current;(x=(p=n())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!v)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function m(){var w=t.current,e=p;if(x)w.params=e.params,d.copy(w.params,b),a.$broadcast("$routeUpdate",w);else if(e||w)v=!1,(t.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?c.path(u(e.redirectTo,e.params)).search(e.params).replace():c.url(e.redirectTo(e.pathParams,c.path(),c.search())).replace()),f.when(e).then(function(){if(e){var a= -d.extend({},e.resolve),b,c;d.forEach(a,function(b,e){a[e]=d.isString(b)?h.get(b):h.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(c=e.templateUrl)&&(d.isFunction(c)&&(c=c(e.params)),d.isDefined(c)&&(e.loadedTemplateUrl=r.valueOf(c),b=k(c)));d.isDefined(b)&&(a.$template=b);return f.all(a)}}).then(function(c){e==t.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,w))},function(b){e==t.current&&a.$broadcast("$routeChangeError", -e,w,b)})}function n(){var a,b;d.forEach(g,function(f,g){var q;if(q=!b){var h=c.path();q=f.keys;var l={};if(f.regexp)if(h=f.regexp.exec(h)){for(var k=1,n=h.length;k - * - * See {@link ngSanitize.$sanitize `$sanitize`} for usage. - */ - -/** - * @ngdoc service - * @name $sanitize - * @kind function - * - * @description - * Sanitizes an html string by stripping all potentially dangerous tokens. - * - * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are - * then serialized back to properly escaped html string. This means that no unsafe input can make - * it into the returned string. - * - * The whitelist for URL sanitization of attribute values is configured using the functions - * `aHrefSanitizationWhitelist` and `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider - * `$compileProvider`}. - * - * The input may also contain SVG markup if this is enabled via {@link $sanitizeProvider}. - * - * @param {string} html HTML input. - * @returns {string} Sanitized HTML. - * - * @example - - - -
- Snippet: - - - - - - - - - - - - - - - - - - - - - - - - - -
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value -
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
-</div>
-
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
-
-
- - it('should sanitize the html snippet by default', function() { - expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). - toBe('

an html\nclick here\nsnippet

'); - }); - - it('should inline raw snippet if bound to a trusted value', function() { - expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). - toBe("

an html\n" + - "click here\n" + - "snippet

"); - }); - - it('should escape snippet without any filter', function() { - expect(element(by.css('#bind-default div')).getInnerHtml()). - toBe("<p style=\"color:blue\">an html\n" + - "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + - "snippet</p>"); - }); - - it('should update', function() { - element(by.model('snippet')).clear(); - element(by.model('snippet')).sendKeys('new text'); - expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). - toBe('new text'); - expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( - 'new text'); - expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( - "new <b onclick=\"alert(1)\">text</b>"); - }); -
-
- */ - - -/** - * @ngdoc provider - * @name $sanitizeProvider - * - * @description - * Creates and configures {@link $sanitize} instance. - */ -function $SanitizeProvider() { - var svgEnabled = false; - - this.$get = ['$$sanitizeUri', function($$sanitizeUri) { - if (svgEnabled) { - angular.extend(validElements, svgElements); - } - return function(html) { - var buf = []; - htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) { - return !/^unsafe:/.test($$sanitizeUri(uri, isImage)); - })); - return buf.join(''); - }; - }]; - - - /** - * @ngdoc method - * @name $sanitizeProvider#enableSvg - * @kind function - * - * @description - * Enables a subset of svg to be supported by the sanitizer. - * - *
- *

By enabling this setting without taking other precautions, you might expose your - * application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned - * outside of the containing element and be rendered over other elements on the page (e.g. a login - * link). Such behavior can then result in phishing incidents.

- * - *

To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg - * tags within the sanitized content:

- * - *
- * - *

-   *   .rootOfTheIncludedContent svg {
-   *     overflow: hidden !important;
-   *   }
-   *   
- *
- * - * @param {boolean=} regexp New regexp to whitelist urls with. - * @returns {boolean|ng.$sanitizeProvider} Returns the currently configured value if called - * without an argument or self for chaining otherwise. - */ - this.enableSvg = function(enableSvg) { - if (angular.isDefined(enableSvg)) { - svgEnabled = enableSvg; - return this; - } else { - return svgEnabled; - } - }; -} - -function sanitizeText(chars) { - var buf = []; - var writer = htmlSanitizeWriter(buf, angular.noop); - writer.chars(chars); - return buf.join(''); -} - - -// Regular Expressions for parsing tags and attributes -var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, - // Match everything outside of normal chars and " (quote character) - NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g; - - -// Good source of info about elements and attributes -// http://dev.w3.org/html5/spec/Overview.html#semantics -// http://simon.html5.org/html-elements - -// Safe Void Elements - HTML5 -// http://dev.w3.org/html5/spec/Overview.html#void-elements -var voidElements = toMap("area,br,col,hr,img,wbr"); - -// Elements that you can, intentionally, leave open (and which close themselves) -// http://dev.w3.org/html5/spec/Overview.html#optional-tags -var optionalEndTagBlockElements = toMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), - optionalEndTagInlineElements = toMap("rp,rt"), - optionalEndTagElements = angular.extend({}, - optionalEndTagInlineElements, - optionalEndTagBlockElements); - -// Safe Block Elements - HTML5 -var blockElements = angular.extend({}, optionalEndTagBlockElements, toMap("address,article," + - "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," + - "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")); - -// Inline Elements - HTML5 -var inlineElements = angular.extend({}, optionalEndTagInlineElements, toMap("a,abbr,acronym,b," + - "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," + - "samp,small,span,strike,strong,sub,sup,time,tt,u,var")); - -// SVG Elements -// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements -// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted. -// They can potentially allow for arbitrary javascript to be executed. See #11290 -var svgElements = toMap("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph," + - "hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline," + - "radialGradient,rect,stop,svg,switch,text,title,tspan"); - -// Blocked Elements (will be stripped) -var blockedElements = toMap("script,style"); - -var validElements = angular.extend({}, - voidElements, - blockElements, - inlineElements, - optionalEndTagElements); - -//Attributes that have href and hence need to be sanitized -var uriAttrs = toMap("background,cite,href,longdesc,src,xlink:href"); - -var htmlAttrs = toMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' + - 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' + - 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' + - 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' + - 'valign,value,vspace,width'); - -// SVG attributes (without "id" and "name" attributes) -// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes -var svgAttrs = toMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' + - 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' + - 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' + - 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' + - 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' + - 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' + - 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' + - 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' + - 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' + - 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' + - 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' + - 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' + - 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' + - 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' + - 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true); - -var validAttrs = angular.extend({}, - uriAttrs, - svgAttrs, - htmlAttrs); - -function toMap(str, lowercaseKeys) { - var obj = {}, items = str.split(','), i; - for (i = 0; i < items.length; i++) { - obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true; - } - return obj; -} - -var inertBodyElement; -(function(window) { - var doc; - if (window.document && window.document.implementation) { - doc = window.document.implementation.createHTMLDocument("inert"); - } else { - throw $sanitizeMinErr('noinert', "Can't create an inert html document"); - } - var docElement = doc.documentElement || doc.getDocumentElement(); - var bodyElements = docElement.getElementsByTagName('body'); - - // usually there should be only one body element in the document, but IE doesn't have any, so we need to create one - if (bodyElements.length === 1) { - inertBodyElement = bodyElements[0]; - } else { - var html = doc.createElement('html'); - inertBodyElement = doc.createElement('body'); - html.appendChild(inertBodyElement); - doc.appendChild(html); - } -})(window); - -/** - * @example - * htmlParser(htmlString, { - * start: function(tag, attrs) {}, - * end: function(tag) {}, - * chars: function(text) {}, - * comment: function(text) {} - * }); - * - * @param {string} html string - * @param {object} handler - */ -function htmlParser(html, handler) { - if (html === null || html === undefined) { - html = ''; - } else if (typeof html !== 'string') { - html = '' + html; - } - inertBodyElement.innerHTML = html; - - //mXSS protection - var mXSSAttempts = 5; - do { - if (mXSSAttempts === 0) { - throw $sanitizeMinErr('uinput', "Failed to sanitize html because the input is unstable"); - } - mXSSAttempts--; - - // strip custom-namespaced attributes on IE<=11 - if (document.documentMode <= 11) { - stripCustomNsAttrs(inertBodyElement); - } - html = inertBodyElement.innerHTML; //trigger mXSS - inertBodyElement.innerHTML = html; - } while (html !== inertBodyElement.innerHTML); - - var node = inertBodyElement.firstChild; - while (node) { - switch (node.nodeType) { - case 1: // ELEMENT_NODE - handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes)); - break; - case 3: // TEXT NODE - handler.chars(node.textContent); - break; - } - - var nextNode; - if (!(nextNode = node.firstChild)) { - if (node.nodeType == 1) { - handler.end(node.nodeName.toLowerCase()); - } - nextNode = node.nextSibling; - if (!nextNode) { - while (nextNode == null) { - node = node.parentNode; - if (node === inertBodyElement) break; - nextNode = node.nextSibling; - if (node.nodeType == 1) { - handler.end(node.nodeName.toLowerCase()); - } - } - } - } - node = nextNode; - } - - while (node = inertBodyElement.firstChild) { - inertBodyElement.removeChild(node); - } -} - -function attrToMap(attrs) { - var map = {}; - for (var i = 0, ii = attrs.length; i < ii; i++) { - var attr = attrs[i]; - map[attr.name] = attr.value; - } - return map; -} - - -/** - * Escapes all potentially dangerous characters, so that the - * resulting string can be safely inserted into attribute or - * element text. - * @param value - * @returns {string} escaped text - */ -function encodeEntities(value) { - return value. - replace(/&/g, '&'). - replace(SURROGATE_PAIR_REGEXP, function(value) { - var hi = value.charCodeAt(0); - var low = value.charCodeAt(1); - return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; - }). - replace(NON_ALPHANUMERIC_REGEXP, function(value) { - return '&#' + value.charCodeAt(0) + ';'; - }). - replace(//g, '>'); -} - -/** - * create an HTML/XML writer which writes to buffer - * @param {Array} buf use buf.join('') to get out sanitized html string - * @returns {object} in the form of { - * start: function(tag, attrs) {}, - * end: function(tag) {}, - * chars: function(text) {}, - * comment: function(text) {} - * } - */ -function htmlSanitizeWriter(buf, uriValidator) { - var ignoreCurrentElement = false; - var out = angular.bind(buf, buf.push); - return { - start: function(tag, attrs) { - tag = angular.lowercase(tag); - if (!ignoreCurrentElement && blockedElements[tag]) { - ignoreCurrentElement = tag; - } - if (!ignoreCurrentElement && validElements[tag] === true) { - out('<'); - out(tag); - angular.forEach(attrs, function(value, key) { - var lkey=angular.lowercase(key); - var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); - if (validAttrs[lkey] === true && - (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { - out(' '); - out(key); - out('="'); - out(encodeEntities(value)); - out('"'); - } - }); - out('>'); - } - }, - end: function(tag) { - tag = angular.lowercase(tag); - if (!ignoreCurrentElement && validElements[tag] === true && voidElements[tag] !== true) { - out(''); - } - if (tag == ignoreCurrentElement) { - ignoreCurrentElement = false; - } - }, - chars: function(chars) { - if (!ignoreCurrentElement) { - out(encodeEntities(chars)); - } - } - }; -} - - -/** - * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' attribute to declare - * ns1 namespace and prefixes the attribute with 'ns1' (e.g. 'ns1:xlink:foo'). This is undesirable since we don't want - * to allow any of these custom attributes. This method strips them all. - * - * @param node Root element to process - */ -function stripCustomNsAttrs(node) { - if (node.nodeType === Node.ELEMENT_NODE) { - var attrs = node.attributes; - for (var i = 0, l = attrs.length; i < l; i++) { - var attrNode = attrs[i]; - var attrName = attrNode.name.toLowerCase(); - if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) { - node.removeAttributeNode(attrNode); - i--; - l--; - } - } - } - - var nextNode = node.firstChild; - if (nextNode) { - stripCustomNsAttrs(nextNode); - } - - nextNode = node.nextSibling; - if (nextNode) { - stripCustomNsAttrs(nextNode); - } -} - - - -// define ngSanitize module and register $sanitize service -angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider); - -/* global sanitizeText: false */ - -/** - * @ngdoc filter - * @name linky - * @kind function - * - * @description - * Finds links in text input and turns them into html links. Supports `http/https/ftp/mailto` and - * plain email address links. - * - * Requires the {@link ngSanitize `ngSanitize`} module to be installed. - * - * @param {string} text Input text. - * @param {string} target Window (`_blank|_self|_parent|_top`) or named frame to open links in. - * @param {object|function(url)} [attributes] Add custom attributes to the link element. - * - * Can be one of: - * - * - `object`: A map of attributes - * - `function`: Takes the url as a parameter and returns a map of attributes - * - * If the map of attributes contains a value for `target`, it overrides the value of - * the target parameter. - * - * - * @returns {string} Html-linkified and {@link $sanitize sanitized} text. - * - * @usage - - * - * @example - - -
- Snippet: - - - - - - - - - - - - - - - - - - - - - - - - - - -
FilterSourceRendered
linky filter -
<div ng-bind-html="snippet | linky">
</div>
-
-
-
linky target -
<div ng-bind-html="snippetWithSingleURL | linky:'_blank'">
</div>
-
-
-
linky custom attributes -
<div ng-bind-html="snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}">
</div>
-
-
-
no filter
<div ng-bind="snippet">
</div>
- - - angular.module('linkyExample', ['ngSanitize']) - .controller('ExampleController', ['$scope', function($scope) { - $scope.snippet = - 'Pretty text with some links:\n'+ - 'http://angularjs.org/,\n'+ - 'mailto:us@somewhere.org,\n'+ - 'another@somewhere.org,\n'+ - 'and one more: ftp://127.0.0.1/.'; - $scope.snippetWithSingleURL = 'http://angularjs.org/'; - }]); - - - it('should linkify the snippet with urls', function() { - expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). - toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + - 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); - expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); - }); - - it('should not linkify snippet without the linky filter', function() { - expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). - toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + - 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); - expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); - }); - - it('should update', function() { - element(by.model('snippet')).clear(); - element(by.model('snippet')).sendKeys('new http://link.'); - expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). - toBe('new http://link.'); - expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); - expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) - .toBe('new http://link.'); - }); - - it('should work with the target property', function() { - expect(element(by.id('linky-target')). - element(by.binding("snippetWithSingleURL | linky:'_blank'")).getText()). - toBe('http://angularjs.org/'); - expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); - }); - - it('should optionally add custom attributes', function() { - expect(element(by.id('linky-custom-attributes')). - element(by.binding("snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}")).getText()). - toBe('http://angularjs.org/'); - expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow'); - }); - - - */ -angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { - var LINKY_URL_REGEXP = - /((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, - MAILTO_REGEXP = /^mailto:/i; - - var linkyMinErr = angular.$$minErr('linky'); - var isString = angular.isString; - - return function(text, target, attributes) { - if (text == null || text === '') return text; - if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text); - - var match; - var raw = text; - var html = []; - var url; - var i; - while ((match = raw.match(LINKY_URL_REGEXP))) { - // We can not end in these as they are sometimes found at the end of the sentence - url = match[0]; - // if we did not match ftp/http/www/mailto then assume mailto - if (!match[2] && !match[4]) { - url = (match[3] ? 'http://' : 'mailto:') + url; - } - i = match.index; - addText(raw.substr(0, i)); - addLink(url, match[0].replace(MAILTO_REGEXP, '')); - raw = raw.substring(i + match[0].length); - } - addText(raw); - return $sanitize(html.join('')); - - function addText(text) { - if (!text) { - return; - } - html.push(sanitizeText(text)); - } - - function addLink(url, text) { - var key; - html.push(''); - addText(text); - html.push(''); - } - }; -}]); - - -})(window, window.angular); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js deleted file mode 100644 index 135d5a0e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - AngularJS v1.5.0 - (c) 2010-2016 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(A,e,B){'use strict';function C(a){var c=[];v(c,e.noop).chars(a);return c.join("")}function h(a,c){var b={},d=a.split(","),l;for(l=0;l=document.documentMode&&n(g);a=g.innerHTML;g.innerHTML=a}while(a!==g.innerHTML);for(b=g.firstChild;b;){switch(b.nodeType){case 1:c.start(b.nodeName.toLowerCase(),E(b.attributes)); -break;case 3:c.chars(b.textContent)}var d;if(!(d=b.firstChild)&&(1==b.nodeType&&c.end(b.nodeName.toLowerCase()),d=b.nextSibling,!d))for(;null==d;){b=b.parentNode;if(b===g)break;d=b.nextSibling;1==b.nodeType&&c.end(b.nodeName.toLowerCase())}b=d}for(;b=g.firstChild;)g.removeChild(b)}function E(a){for(var c={},b=0,d=a.length;b/g,">")}function v(a,c){var b=!1,d=e.bind(a,a.push);return{start:function(a,f){a=e.lowercase(a);!b&&H[a]&&(b=a);b||!0!==t[a]||(d("<"),d(a),e.forEach(f,function(b,f){var g=e.lowercase(f),h="img"===a&&"src"===g||"background"===g;!0!==I[g]||!0===y[g]&&!c(b,h)||(d(" "),d(f),d('="'),d(x(b)),d('"'))}),d(">"))},end:function(a){a=e.lowercase(a);b||!0!==t[a]||!0===z[a]||(d(""));a== -b&&(b=!1)},chars:function(a){b||d(x(a))}}}function n(a){if(a.nodeType===Node.ELEMENT_NODE)for(var c=a.attributes,b=0,d=c.length;b"\u201d\u2019]/i,b=/^mailto:/i,d=e.$$minErr("linky"),g=e.isString;return function(f,h,m){function k(a){a&&p.push(C(a))}function q(a,b){var c;p.push("');k(b);p.push("")}if(null==f||""===f)return f;if(!g(f))throw d("notstring",f);for(var r=f,p=[],s,n;f=r.match(c);)s=f[0],f[2]||f[4]||(s=(f[3]?"http://":"mailto:")+s),n=f.index,k(r.substr(0,n)),q(s,f[0].replace(b,"")),r=r.substring(n+f[0].length);k(r);return a(p.join(""))}}])})(window,window.angular); -//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js.map b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js.map deleted file mode 100644 index 7276abd2..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-sanitize.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ -"version":3, -"file":"angular-sanitize.min.js", -"lineCount":14, -"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAsMtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAyF7BC,QAASA,EAAK,CAACC,CAAD,CAAMC,CAAN,CAAqB,CAAA,IAC7BC,EAAM,EADuB,CACnBC,EAAQH,CAAAI,MAAA,CAAU,GAAV,CADW,CACKC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CACEH,CAAA,CAAID,CAAA,CAAgBX,CAAAiB,UAAA,CAAkBJ,CAAA,CAAME,CAAN,CAAlB,CAAhB,CAA8CF,CAAA,CAAME,CAAN,CAAlD,CAAA,CAA8D,CAAA,CAEhE,OAAOH,EAL0B,CA0CnCM,QAASA,EAAU,CAACC,CAAD,CAAOC,CAAP,CAAgB,CACpB,IAAb,GAAID,CAAJ,EAAqBA,CAArB,GAA8BlB,CAA9B,CACEkB,CADF,CACS,EADT,CAE2B,QAF3B,GAEW,MAAOA,EAFlB,GAGEA,CAHF,CAGS,EAHT,CAGcA,CAHd,CAKAE,EAAAC,UAAA,CAA6BH,CAG7B,KAAII,EAAe,CACnB,GAAG,CACD,GAAqB,CAArB,GAAIA,CAAJ,CACE,KAAMC,EAAA,CAAgB,QAAhB,CAAN,CAEFD,CAAA,EAG6B,GAA7B,EAAIE,QAAAC,aAAJ,EACEC,CAAA,CAAmBN,CAAnB,CAEFF,EAAA,CAAOE,CAAAC,UACPD,EAAAC,UAAA,CAA6BH,CAX5B,CAAH,MAYSA,CAZT,GAYkBE,CAAAC,UAZlB,CAeA,KADIM,CACJ,CADWP,CAAAQ,WACX,CAAOD,CAAP,CAAA,CAAa,CACX,OAAQA,CAAAE,SAAR,EACE,KAAK,CAAL,CACEV,CAAAW,MAAA,CAAcH,CAAAI,SAAAC,YAAA,EAAd,CAA2CC,CAAA,CAAUN,CAAAO,WAAV,CAA3C,CACA;KACF,MAAK,CAAL,CACEf,CAAAjB,MAAA,CAAcyB,CAAAQ,YAAd,CALJ,CASA,IAAIC,CACJ,IAAM,EAAAA,CAAA,CAAWT,CAAAC,WAAX,CAAN,GACuB,CAIhBQ,EAJDT,CAAAE,SAICO,EAHHjB,CAAAkB,IAAA,CAAYV,CAAAI,SAAAC,YAAA,EAAZ,CAGGI,CADLA,CACKA,CADMT,CAAAW,YACNF,CAAAA,CAAAA,CALP,EAMI,IAAA,CAAmB,IAAnB,EAAOA,CAAP,CAAA,CAAyB,CACvBT,CAAA,CAAOA,CAAAY,WACP,IAAIZ,CAAJ,GAAaP,CAAb,CAA+B,KAC/BgB,EAAA,CAAWT,CAAAW,YACU,EAArB,EAAIX,CAAAE,SAAJ,EACEV,CAAAkB,IAAA,CAAYV,CAAAI,SAAAC,YAAA,EAAZ,CALqB,CAU7BL,CAAA,CAAOS,CA3BI,CA8Bb,IAAA,CAAOT,CAAP,CAAcP,CAAAQ,WAAd,CAAA,CACER,CAAAoB,YAAA,CAA6Bb,CAA7B,CAxD+B,CA4DnCM,QAASA,EAAS,CAACQ,CAAD,CAAQ,CAExB,IADA,IAAIC,EAAM,EAAV,CACS5B,EAAI,CADb,CACgB6B,EAAKF,CAAA1B,OAArB,CAAmCD,CAAnC,CAAuC6B,CAAvC,CAA2C7B,CAAA,EAA3C,CAAgD,CAC9C,IAAI8B,EAAOH,CAAA,CAAM3B,CAAN,CACX4B,EAAA,CAAIE,CAAAC,KAAJ,CAAA,CAAiBD,CAAAE,MAF6B,CAIhD,MAAOJ,EANiB,CAiB1BK,QAASA,EAAc,CAACD,CAAD,CAAQ,CAC7B,MAAOA,EAAAE,QAAA,CACG,IADH,CACS,OADT,CAAAA,QAAA,CAEGC,CAFH,CAE0B,QAAQ,CAACH,CAAD,CAAQ,CAC7C,IAAII,EAAKJ,CAAAK,WAAA,CAAiB,CAAjB,CACLC,EAAAA,CAAMN,CAAAK,WAAA,CAAiB,CAAjB,CACV,OAAO,IAAP,EAAgC,IAAhC,EAAiBD,CAAjB,CAAsB,KAAtB;CAA0CE,CAA1C,CAAgD,KAAhD,EAA0D,KAA1D,EAAqE,GAHxB,CAF1C,CAAAJ,QAAA,CAOGK,CAPH,CAO4B,QAAQ,CAACP,CAAD,CAAQ,CAC/C,MAAO,IAAP,CAAcA,CAAAK,WAAA,CAAiB,CAAjB,CAAd,CAAoC,GADW,CAP5C,CAAAH,QAAA,CAUG,IAVH,CAUS,MAVT,CAAAA,QAAA,CAWG,IAXH,CAWS,MAXT,CADsB,CAyB/B5C,QAASA,EAAkB,CAACD,CAAD,CAAMmD,CAAN,CAAoB,CAC7C,IAAIC,EAAuB,CAAA,CAA3B,CACIC,EAAMzD,CAAA0D,KAAA,CAAatD,CAAb,CAAkBA,CAAAuD,KAAlB,CACV,OAAO,CACL5B,MAAOA,QAAQ,CAAC6B,CAAD,CAAMlB,CAAN,CAAa,CAC1BkB,CAAA,CAAM5D,CAAAiB,UAAA,CAAkB2C,CAAlB,CACDJ,EAAAA,CAAL,EAA6BK,CAAA,CAAgBD,CAAhB,CAA7B,GACEJ,CADF,CACyBI,CADzB,CAGKJ,EAAL,EAAoD,CAAA,CAApD,GAA6BM,CAAA,CAAcF,CAAd,CAA7B,GACEH,CAAA,CAAI,GAAJ,CAcA,CAbAA,CAAA,CAAIG,CAAJ,CAaA,CAZA5D,CAAA+D,QAAA,CAAgBrB,CAAhB,CAAuB,QAAQ,CAACK,CAAD,CAAQiB,CAAR,CAAa,CAC1C,IAAIC,EAAKjE,CAAAiB,UAAA,CAAkB+C,CAAlB,CAAT,CACIE,EAAmB,KAAnBA,GAAWN,CAAXM,EAAqC,KAArCA,GAA4BD,CAA5BC,EAAyD,YAAzDA,GAAgDD,CAC3B,EAAA,CAAzB,GAAIE,CAAA,CAAWF,CAAX,CAAJ,EACsB,CAAA,CADtB,GACGG,CAAA,CAASH,CAAT,CADH,EAC8B,CAAAV,CAAA,CAAaR,CAAb,CAAoBmB,CAApB,CAD9B,GAEET,CAAA,CAAI,GAAJ,CAIA,CAHAA,CAAA,CAAIO,CAAJ,CAGA,CAFAP,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIT,CAAA,CAAeD,CAAf,CAAJ,CACA,CAAAU,CAAA,CAAI,GAAJ,CANF,CAH0C,CAA5C,CAYA,CAAAA,CAAA,CAAI,GAAJ,CAfF,CAL0B,CADvB,CAwBLnB,IAAKA,QAAQ,CAACsB,CAAD,CAAM,CACjBA,CAAA,CAAM5D,CAAAiB,UAAA,CAAkB2C,CAAlB,CACDJ,EAAL,EAAoD,CAAA,CAApD,GAA6BM,CAAA,CAAcF,CAAd,CAA7B,EAAkF,CAAA,CAAlF,GAA4DS,CAAA,CAAaT,CAAb,CAA5D,GACEH,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIG,CAAJ,CACA,CAAAH,CAAA,CAAI,GAAJ,CAHF,CAKIG,EAAJ;AAAWJ,CAAX,GACEA,CADF,CACyB,CAAA,CADzB,CAPiB,CAxBd,CAmCLrD,MAAOA,QAAQ,CAACA,CAAD,CAAQ,CAChBqD,CAAL,EACEC,CAAA,CAAIT,CAAA,CAAe7C,CAAf,CAAJ,CAFmB,CAnClB,CAHsC,CAsD/CwB,QAASA,EAAkB,CAACC,CAAD,CAAO,CAChC,GAAIA,CAAAE,SAAJ,GAAsBwC,IAAAC,aAAtB,CAEE,IADA,IAAI7B,EAAQd,CAAAO,WAAZ,CACSpB,EAAI,CADb,CACgByD,EAAI9B,CAAA1B,OAApB,CAAkCD,CAAlC,CAAsCyD,CAAtC,CAAyCzD,CAAA,EAAzC,CAA8C,CAC5C,IAAI0D,EAAW/B,CAAA,CAAM3B,CAAN,CAAf,CACI2D,EAAWD,CAAA3B,KAAAb,YAAA,EACf,IAAiB,WAAjB,GAAIyC,CAAJ,EAA6D,CAA7D,GAAgCA,CAAAC,QAAA,CAAiB,MAAjB,CAAhC,CACE/C,CAAAgD,oBAAA,CAAyBH,CAAzB,CAEA,CADA1D,CAAA,EACA,CAAAyD,CAAA,EAN0C,CAYhD,CADInC,CACJ,CADeT,CAAAC,WACf,GACEF,CAAA,CAAmBU,CAAnB,CAIF,EADAA,CACA,CADWT,CAAAW,YACX,GACEZ,CAAA,CAAmBU,CAAnB,CArB8B,CAxdlC,IAAIb,EAAkBxB,CAAA6E,SAAA,CAAiB,WAAjB,CAAtB,CAkMI3B,EAAwB,iCAlM5B,CAoMEI,EAA0B,eApM5B,CA6MIe,EAAe5D,CAAA,CAAM,wBAAN,CA7MnB,CAiNIqE,EAA8BrE,CAAA,CAAM,gDAAN,CAjNlC,CAkNIsE,EAA+BtE,CAAA,CAAM,OAAN,CAlNnC,CAmNIuE,EAAyBhF,CAAAiF,OAAA,CAAe,EAAf,CACeF,CADf,CAEeD,CAFf,CAnN7B,CAwNII,EAAgBlF,CAAAiF,OAAA,CAAe,EAAf;AAAmBH,CAAnB,CAAgDrE,CAAA,CAAM,qKAAN,CAAhD,CAxNpB,CA6NI0E,EAAiBnF,CAAAiF,OAAA,CAAe,EAAf,CAAmBF,CAAnB,CAAiDtE,CAAA,CAAM,2JAAN,CAAjD,CA7NrB,CAqOI2E,EAAc3E,CAAA,CAAM,wNAAN,CArOlB;AA0OIoD,EAAkBpD,CAAA,CAAM,cAAN,CA1OtB,CA4OIqD,EAAgB9D,CAAAiF,OAAA,CAAe,EAAf,CACeZ,CADf,CAEea,CAFf,CAGeC,CAHf,CAIeH,CAJf,CA5OpB,CAmPIZ,EAAW3D,CAAA,CAAM,8CAAN,CAnPf,CAqPI4E,EAAY5E,CAAA,CAAM,kTAAN,CArPhB,CA6PI6E,EAAW7E,CAAA,CAAM,guCAAN;AAcoE,CAAA,CAdpE,CA7Pf,CA6QI0D,EAAanE,CAAAiF,OAAA,CAAe,EAAf,CACeb,CADf,CAEekB,CAFf,CAGeD,CAHf,CA7QjB,CA0RIhE,CACH,UAAQ,CAACtB,CAAD,CAAS,CAEhB,GAAIA,CAAA0B,SAAJ,EAAuB1B,CAAA0B,SAAA8D,eAAvB,CACEC,CAAA,CAAMzF,CAAA0B,SAAA8D,eAAAE,mBAAA,CAAkD,OAAlD,CADR,KAGE,MAAMjE,EAAA,CAAgB,SAAhB,CAAN,CAGF,IAAIkE,EAAeC,CADFH,CAAAI,gBACED,EADqBH,CAAAK,mBAAA,EACrBF,sBAAA,CAAgC,MAAhC,CAGS,EAA5B,GAAID,CAAA1E,OAAJ,CACEK,CADF,CACqBqE,CAAA,CAAa,CAAb,CADrB,EAGMvE,CAGJ,CAHWqE,CAAAM,cAAA,CAAkB,MAAlB,CAGX,CAFAzE,CAEA,CAFmBmE,CAAAM,cAAA,CAAkB,MAAlB,CAEnB,CADA3E,CAAA4E,YAAA,CAAiB1E,CAAjB,CACA,CAAAmE,CAAAO,YAAA,CAAgB5E,CAAhB,CANF,CAXgB,CAAjB,CAAD,CAmBGpB,CAnBH,CAyNAC,EAAAgG,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,SAAA,CAA0C,WAA1C,CApXAC,QAA0B,EAAG,CAC3B,IAAIC,EAAa,CAAA,CAEjB,KAAAC,KAAA,CAAY,CAAC,eAAD,CAAkB,QAAQ,CAACC,CAAD,CAAgB,CAChDF,CAAJ,EACEnG,CAAAiF,OAAA,CAAenB,CAAf,CAA8BsB,CAA9B,CAEF,OAAO,SAAQ,CAACjE,CAAD,CAAO,CACpB,IAAIf;AAAM,EACVc,EAAA,CAAWC,CAAX,CAAiBd,CAAA,CAAmBD,CAAnB,CAAwB,QAAQ,CAACkG,CAAD,CAAMpC,CAAN,CAAe,CAC9D,MAAO,CAAC,UAAAqC,KAAA,CAAgBF,CAAA,CAAcC,CAAd,CAAmBpC,CAAnB,CAAhB,CADsD,CAA/C,CAAjB,CAGA,OAAO9D,EAAAI,KAAA,CAAS,EAAT,CALa,CAJ8B,CAA1C,CA4CZ,KAAAgG,UAAA,CAAiBC,QAAQ,CAACD,CAAD,CAAY,CACnC,MAAIxG,EAAA0G,UAAA,CAAkBF,CAAlB,CAAJ,EACEL,CACO,CADMK,CACN,CAAA,IAFT,EAISL,CAL0B,CA/CV,CAoX7B,CAmIAnG,EAAAgG,OAAA,CAAe,YAAf,CAAAW,OAAA,CAAoC,OAApC,CAA6C,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAAA,IACzEC,EACE,yFAFuE,CAGzEC,EAAgB,WAHyD,CAKzEC,EAAc/G,CAAA6E,SAAA,CAAiB,OAAjB,CAL2D,CAMzEmC,EAAWhH,CAAAgH,SAEf,OAAO,SAAQ,CAACC,CAAD,CAAOC,CAAP,CAAe/E,CAAf,CAA2B,CAwBxCgF,QAASA,EAAO,CAACF,CAAD,CAAO,CAChBA,CAAL,EAGA9F,CAAAwC,KAAA,CAAUzD,CAAA,CAAa+G,CAAb,CAAV,CAJqB,CAOvBG,QAASA,EAAO,CAACC,CAAD,CAAMJ,CAAN,CAAY,CAC1B,IAAIjD,CACJ7C,EAAAwC,KAAA,CAAU,KAAV,CACI3D,EAAAsH,WAAA,CAAmBnF,CAAnB,CAAJ,GACEA,CADF,CACeA,CAAA,CAAWkF,CAAX,CADf,CAGA,IAAIrH,CAAAuH,SAAA,CAAiBpF,CAAjB,CAAJ,CACE,IAAK6B,CAAL,GAAY7B,EAAZ,CACEhB,CAAAwC,KAAA,CAAUK,CAAV;AAAgB,IAAhB,CAAuB7B,CAAA,CAAW6B,CAAX,CAAvB,CAAyC,IAAzC,CAFJ,KAKE7B,EAAA,CAAa,EAEX,EAAAnC,CAAA0G,UAAA,CAAkBQ,CAAlB,CAAJ,EAAmC,QAAnC,EAA+C/E,EAA/C,EACEhB,CAAAwC,KAAA,CAAU,UAAV,CACUuD,CADV,CAEU,IAFV,CAIF/F,EAAAwC,KAAA,CAAU,QAAV,CACU0D,CAAApE,QAAA,CAAY,IAAZ,CAAkB,QAAlB,CADV,CAEU,IAFV,CAGAkE,EAAA,CAAQF,CAAR,CACA9F,EAAAwC,KAAA,CAAU,MAAV,CAtB0B,CA9B5B,GAAY,IAAZ,EAAIsD,CAAJ,EAA6B,EAA7B,GAAoBA,CAApB,CAAiC,MAAOA,EACxC,IAAK,CAAAD,CAAA,CAASC,CAAT,CAAL,CAAqB,KAAMF,EAAA,CAAY,WAAZ,CAA8DE,CAA9D,CAAN,CAOrB,IAJA,IAAIO,EAAMP,CAAV,CACI9F,EAAO,EADX,CAEIkG,CAFJ,CAGItG,CACJ,CAAQ0G,CAAR,CAAgBD,CAAAC,MAAA,CAAUZ,CAAV,CAAhB,CAAA,CAEEQ,CAQA,CARMI,CAAA,CAAM,CAAN,CAQN,CANKA,CAAA,CAAM,CAAN,CAML,EANkBA,CAAA,CAAM,CAAN,CAMlB,GALEJ,CAKF,EALSI,CAAA,CAAM,CAAN,CAAA,CAAW,SAAX,CAAuB,SAKhC,EAL6CJ,CAK7C,EAHAtG,CAGA,CAHI0G,CAAAC,MAGJ,CAFAP,CAAA,CAAQK,CAAAG,OAAA,CAAW,CAAX,CAAc5G,CAAd,CAAR,CAEA,CADAqG,CAAA,CAAQC,CAAR,CAAaI,CAAA,CAAM,CAAN,CAAAxE,QAAA,CAAiB6D,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAU,CAAA,CAAMA,CAAAI,UAAA,CAAc7G,CAAd,CAAkB0G,CAAA,CAAM,CAAN,CAAAzG,OAAlB,CAERmG,EAAA,CAAQK,CAAR,CACA,OAAOZ,EAAA,CAAUzF,CAAAX,KAAA,CAAU,EAAV,CAAV,CAtBiC,CARmC,CAAlC,CAA7C,CApoBsC,CAArC,CAAD,CAusBGT,MAvsBH,CAusBWA,MAAAC,QAvsBX;", -"sources":["angular-sanitize.js"], -"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","toMap","str","lowercaseKeys","obj","items","split","i","length","lowercase","htmlParser","html","handler","inertBodyElement","innerHTML","mXSSAttempts","$sanitizeMinErr","document","documentMode","stripCustomNsAttrs","node","firstChild","nodeType","start","nodeName","toLowerCase","attrToMap","attributes","textContent","nextNode","end","nextSibling","parentNode","removeChild","attrs","map","ii","attr","name","value","encodeEntities","replace","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignoreCurrentElement","out","bind","push","tag","blockedElements","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","voidElements","Node","ELEMENT_NODE","l","attrNode","attrName","indexOf","removeAttributeNode","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","optionalEndTagElements","extend","blockElements","inlineElements","svgElements","htmlAttrs","svgAttrs","implementation","doc","createHTMLDocument","bodyElements","getElementsByTagName","documentElement","getDocumentElement","createElement","appendChild","module","provider","$SanitizeProvider","svgEnabled","$get","$$sanitizeUri","uri","test","enableSvg","this.enableSvg","isDefined","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","linkyMinErr","isString","text","target","addText","addLink","url","isFunction","isObject","raw","match","index","substr","substring"] -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-scenario.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-scenario.js deleted file mode 100644 index 20af805f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/external/angular-1.5/angular-scenario.js +++ /dev/null @@ -1,41849 +0,0 @@ -/*! - * jQuery JavaScript Library v2.1.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-05-01T17:11Z - */ - -(function( global, factory ) {'use strict'; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper window is present, - // execute the factory and get jQuery - // For environments that do not inherently posses a window with a document - // (such as Node.js), expose a jQuery-making factory as module.exports - // This accentuates the need for the creation of a real window - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -// - -var arr = []; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - version = "2.1.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; - }, - - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android < 4.0, iOS < 6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v1.10.19 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-04-18 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = "
"; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter(function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; -}; - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - -function Data() { - // Support: Android < 4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); - - this.expando = jQuery.expando + Math.random(); -} - -Data.uid = 1; -Data.accepts = jQuery.acceptData; - -Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; - - // If not, create one - if ( !unlock ) { - unlock = Data.uid++; - - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); - - // Support: Android < 4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); - } - } - - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; - }, - set: function( owner, data, value ) { - var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - } - return cache; - }, - get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - - return key === undefined ? - cache : cache[ key ]; - }, - access: function( owner, key, value ) { - var stored; - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); - } - - // [*]When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - if ( key === undefined ) { - this.cache[ unlock ] = {}; - - } else { - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - }, - hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } - } -}; -var data_priv = new Data(); - -var data_user = new Data(); - - - -/* - Implementation Summary - - 1. Enforce API surface and semantic compatibility with 1.9.x branch - 2. Improve the module's maintainability by reducing the storage - paths to a single mechanism. - 3. Use the same single mechanism to support "private" and "user" data. - 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) - 5. Avoid exposing implementation details on user objects (eg. expando properties) - 6. Provide a clear path for implementation upgrade to WeakMap in 2014 -*/ -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - data_user.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend({ - hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return data_user.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - data_user.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to data_priv methods, these can be deprecated. - _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - data_priv.remove( elem, name ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = data_user.get( elem ); - - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - data_priv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); - } - - return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", key ] ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = data_priv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); - }; - -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - // Support: Windows Web Apps (WWA) - // `name` and `type` need .setAttribute for WWA - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 - // old WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Make sure textarea (and checkbox) defaultValue is properly cloned - // Support: IE9-IE11+ - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - data_priv.remove( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome < 28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } -}; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - // Support: Android < 4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && e.preventDefault ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && e.stopPropagation ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// Create "bubbling" focus and blur events -// Support: Firefox, Chrome, Safari -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE 9 - option: [ 1, "" ], - - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] - }; - -// Support: IE 9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute("type"); - } - - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - data_user.set( dest, udataCur ); - } -} - -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - -// Support: IE >= 9 -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Support: IE >= 9 - // Fix Cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Fixes #12346 - // Support: Webkit, IE - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; - }, - - cleanData: function( elems ) { - var data, elem, type, key, - special = jQuery.event.special, - i = 0; - - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } - } - } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each(function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - }); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map(function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optmization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "
- - - - - - --> - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
- - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html deleted file mode 100644 index 3c0afd29..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html +++ /dev/null @@ -1,26 +0,0 @@ - -
- - -
- - -
diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm deleted file mode 100644 index bfd74ad3..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
- - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html deleted file mode 100644 index 0a28b50e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - -
-
-
-
- -
-
- - - - - - -
-
-
- -
- -
- -
- -
-
- -
- -
- - - Remove -
-
-
-
- - - - -
- -
- Submit -
- - - -
- - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js deleted file mode 100644 index 985fa434..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js +++ /dev/null @@ -1,2244 +0,0 @@ -/*global define:true*/ -(function(root, factory) { - - 'use strict'; - - if (typeof define === 'function' && define.amd) { - // AMD - define(['angular'], factory); - } else if (typeof exports === 'object') { - // CommonJS - module.exports = factory(require('angular')); - } else { - // Browser, nothing "exported". Only registered as a module with angular. - factory(root.angular); - } -}(this, function(angular) { - - 'use strict'; - - var ie8 = false; - - var getInternetExplorerVersion = function () - // Returns the version of Internet Explorer >4 or - // undefined(indicating the use of another browser). - { - var isIE10 = (eval("/*@cc_on!@*/false") && document.documentMode === 10); - if (isIE10) { - return 10; - } - var v = 3, - div = document.createElement('div'), - all = div.getElementsByTagName('i'); - do { - div.innerHTML = ''; - } while (all[0]); - return v > 4 ? v : undefined; - }; - - var browserVersion = getInternetExplorerVersion(); - - if (browserVersion && browserVersion < 9) { - ie8 = true; - } - - // This returned angular module 'gridster' is what is exported. - return angular.module('attGridsterLib', []) - - .constant('gridsterConfig', { - columns: 6, // number of columns in the grid - pushing: true, // whether to push other items out of the way - floating: true, // whether to automatically float items up so they stack - swapping: true, // whether or not to have items switch places instead of push down if they are the same size - width: 'auto', // width of the grid. "auto" will expand the grid to its parent container - colWidth: 'auto', // width of grid columns. "auto" will divide the width of the grid evenly among the columns - rowHeight: 'match', // height of grid rows. 'match' will make it the same as the column width, a numeric value will be interpreted as pixels, '/2' is half the column width, '*5' is five times the column width, etc. - margins: [10, 10], // margins in between grid items - outerMargin: false, - isMobile: false, // toggle mobile view - mobileBreakPoint: 100, // width threshold to toggle mobile mode - mobileModeEnabled: true, // whether or not to toggle mobile mode when screen width is less than mobileBreakPoint - minColumns: 1, // minimum amount of columns the grid can scale down to - minRows: 1, // minimum amount of rows to show if the grid is empty - maxRows: 100, // maximum amount of rows in the grid - defaultSizeX: 1, // default width of an item in columns - defaultSizeY: 1, // default height of an item in rows - minSizeX: 1, // minimum column width of an item - maxSizeX: null, // maximum column width of an item - minSizeY: 1, // minumum row height of an item - maxSizeY: null, // maximum row height of an item - saveGridItemCalculatedHeightInMobile: false, // grid item height in mobile display. true- to use the calculated height by sizeY given - resizable: { // options to pass to resizable handler - enabled: false, - handles: ['s', 'e', 'n', 'w', 'se', 'ne', 'sw', 'nw'] - }, - draggable: { // options to pass to draggable handler - enabled: true, - scrollSensitivity: 20, // Distance in pixels from the edge of the viewport after which the viewport should scroll, relative to pointer - scrollSpeed: 15 // Speed at which the window should scroll once the mouse pointer gets within scrollSensitivity distance - } - }) - - .controller('GridsterCtrl', ['gridsterConfig', '$timeout', - function(gridsterConfig, $timeout) { - - var gridster = this; - - /** - * Create options from gridsterConfig constant - */ - angular.extend(this, gridsterConfig); - - this.resizable = angular.extend({}, gridsterConfig.resizable || {}); - this.draggable = angular.extend({}, gridsterConfig.draggable || {}); - - var flag = false; - this.layoutChanged = function() { - if (flag) { - return; - } - flag = true; - $timeout(function() { - flag = false; - if (gridster.loaded) { - gridster.floatItemsUp(); - } - gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0); - }, 30); - }; - - /** - * A positional array of the items in the grid - */ - this.grid = []; - - /** - * Clean up after yourself - */ - this.destroy = function() { - // empty the grid to cut back on the possibility - // of circular references - if (this.grid) { - this.grid = []; - } - this.$element = null; - }; - - /** - * Overrides default options - * - * @param {Object} options The options to override - */ - this.setOptions = function(options) { - if (!options) { - return; - } - - options = angular.extend({}, options); - - // all this to avoid using jQuery... - if (options.draggable) { - angular.extend(this.draggable, options.draggable); - delete(options.draggable); - } - if (options.resizable) { - angular.extend(this.resizable, options.resizable); - delete(options.resizable); - } - - angular.extend(this, options); - - if (!this.margins || this.margins.length !== 2) { - this.margins = [0, 0]; - } else { - for (var x = 0, l = this.margins.length; x < l; ++x) { - this.margins[x] = parseInt(this.margins[x], 10); - if (isNaN(this.margins[x])) { - this.margins[x] = 0; - } - } - } - }; - - /** - * Check if item can occupy a specified position in the grid - * - * @param {Object} item The item in question - * @param {Number} row The row index - * @param {Number} column The column index - * @returns {Boolean} True if if item fits - */ - this.canItemOccupy = function(item, row, column) { - return row > -1 && column > -1 && item.sizeX + column <= this.columns && item.sizeY + row <= this.maxRows; - }; - - /** - * Set the item in the first suitable position - * - * @param {Object} item The item to insert - */ - this.autoSetItemPosition = function(item) { - // walk through each row and column looking for a place it will fit - for (var rowIndex = 0; rowIndex < this.maxRows; ++rowIndex) { - for (var colIndex = 0; colIndex < this.columns; ++colIndex) { - // only insert if position is not already taken and it can fit - var items = this.getItems(rowIndex, colIndex, item.sizeX, item.sizeY, item); - if (items.length === 0 && this.canItemOccupy(item, rowIndex, colIndex)) { - this.putItem(item, rowIndex, colIndex); - return; - } - } - } - throw new Error('Unable to place item!'); - }; - - /** - * Gets items at a specific coordinate - * - * @param {Number} row - * @param {Number} column - * @param {Number} sizeX - * @param {Number} sizeY - * @param {Array} excludeItems An array of items to exclude from selection - * @returns {Array} Items that match the criteria - */ - this.getItems = function(row, column, sizeX, sizeY, excludeItems) { - var items = []; - if (!sizeX || !sizeY) { - sizeX = sizeY = 1; - } - if (excludeItems && !(excludeItems instanceof Array)) { - excludeItems = [excludeItems]; - } - for (var h = 0; h < sizeY; ++h) { - for (var w = 0; w < sizeX; ++w) { - var item = this.getItem(row + h, column + w, excludeItems); - if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && items.indexOf(item) === -1) { - items.push(item); - } - } - } - return items; - }; - - /** - * @param {Array} items - * @returns {Object} An item that represents the bounding box of the items - */ - this.getBoundingBox = function(items) { - - if (items.length === 0) { - return null; - } - if (items.length === 1) { - return { - row: items[0].row, - col: items[0].col, - sizeY: items[0].sizeY, - sizeX: items[0].sizeX - }; - } - - var maxRow = 0; - var maxCol = 0; - var minRow = 9999; - var minCol = 9999; - - for (var i = 0, l = items.length; i < l; ++i) { - var item = items[i]; - minRow = Math.min(item.row, minRow); - minCol = Math.min(item.col, minCol); - maxRow = Math.max(item.row + item.sizeY, maxRow); - maxCol = Math.max(item.col + item.sizeX, maxCol); - } - - return { - row: minRow, - col: minCol, - sizeY: maxRow - minRow, - sizeX: maxCol - minCol - }; - }; - - - /** - * Removes an item from the grid - * - * @param {Object} item - */ - this.removeItem = function(item) { - for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) { - var columns = this.grid[rowIndex]; - if (!columns) { - continue; - } - var index = columns.indexOf(item); - if (index !== -1) { - columns[index] = null; - break; - } - } - this.layoutChanged(); - }; - - /** - * Returns the item at a specified coordinate - * - * @param {Number} row - * @param {Number} column - * @param {Array} excludeItems Items to exclude from selection - * @returns {Object} The matched item or null - */ - this.getItem = function(row, column, excludeItems) { - if (excludeItems && !(excludeItems instanceof Array)) { - excludeItems = [excludeItems]; - } - var sizeY = 1; - while (row > -1) { - var sizeX = 1, - col = column; - while (col > -1) { - var items = this.grid[row]; - if (items) { - var item = items[col]; - if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && item.sizeX >= sizeX && item.sizeY >= sizeY) { - return item; - } - } - ++sizeX; - --col; - } - --row; - ++sizeY; - } - return null; - }; - - /** - * Insert an array of items into the grid - * - * @param {Array} items An array of items to insert - */ - this.putItems = function(items) { - for (var i = 0, l = items.length; i < l; ++i) { - this.putItem(items[i]); - } - }; - - /** - * Insert a single item into the grid - * - * @param {Object} item The item to insert - * @param {Number} row (Optional) Specifies the items row index - * @param {Number} column (Optional) Specifies the items column index - * @param {Array} ignoreItems - */ - this.putItem = function(item, row, column, ignoreItems) { - // auto place item if no row specified - if (typeof row === 'undefined' || row === null) { - row = item.row; - column = item.col; - if (typeof row === 'undefined' || row === null) { - this.autoSetItemPosition(item); - return; - } - } - - // keep item within allowed bounds - if (!this.canItemOccupy(item, row, column)) { - column = Math.min(this.columns - item.sizeX, Math.max(0, column)); - row = Math.min(this.maxRows - item.sizeY, Math.max(0, row)); - } - - // check if item is already in grid - if (item.oldRow !== null && typeof item.oldRow !== 'undefined') { - var samePosition = item.oldRow === row && item.oldColumn === column; - var inGrid = this.grid[row] && this.grid[row][column] === item; - if (samePosition && inGrid) { - item.row = row; - item.col = column; - return; - } else { - // remove from old position - var oldRow = this.grid[item.oldRow]; - if (oldRow && oldRow[item.oldColumn] === item) { - delete oldRow[item.oldColumn]; - } - } - } - - item.oldRow = item.row = row; - item.oldColumn = item.col = column; - - this.moveOverlappingItems(item, ignoreItems); - - if (!this.grid[row]) { - this.grid[row] = []; - } - this.grid[row][column] = item; - - if (this.movingItem === item) { - this.floatItemUp(item); - } - this.layoutChanged(); - }; - - /** - * Trade row and column if item1 with item2 - * - * @param {Object} item1 - * @param {Object} item2 - */ - this.swapItems = function(item1, item2) { - this.grid[item1.row][item1.col] = item2; - this.grid[item2.row][item2.col] = item1; - - var item1Row = item1.row; - var item1Col = item1.col; - item1.row = item2.row; - item1.col = item2.col; - item2.row = item1Row; - item2.col = item1Col; - }; - - /** - * Prevents items from being overlapped - * - * @param {Object} item The item that should remain - * @param {Array} ignoreItems - */ - this.moveOverlappingItems = function(item, ignoreItems) { - // don't move item, so ignore it - if (!ignoreItems) { - ignoreItems = [item]; - } else if (ignoreItems.indexOf(item) === -1) { - ignoreItems = ignoreItems.slice(0); - ignoreItems.push(item); - } - - // get the items in the space occupied by the item's coordinates - var overlappingItems = this.getItems( - item.row, - item.col, - item.sizeX, - item.sizeY, - ignoreItems - ); - this.moveItemsDown(overlappingItems, item.row + item.sizeY, ignoreItems); - }; - - /** - * Moves an array of items to a specified row - * - * @param {Array} items The items to move - * @param {Number} newRow The target row - * @param {Array} ignoreItems - */ - this.moveItemsDown = function(items, newRow, ignoreItems) { - if (!items || items.length === 0) { - return; - } - items.sort(function(a, b) { - return a.row - b.row; - }); - - ignoreItems = ignoreItems ? ignoreItems.slice(0) : []; - var topRows = {}, - item, i, l; - - // calculate the top rows in each column - for (i = 0, l = items.length; i < l; ++i) { - item = items[i]; - var topRow = topRows[item.col]; - if (typeof topRow === 'undefined' || item.row < topRow) { - topRows[item.col] = item.row; - } - } - - // move each item down from the top row in its column to the row - for (i = 0, l = items.length; i < l; ++i) { - item = items[i]; - var rowsToMove = newRow - topRows[item.col]; - this.moveItemDown(item, item.row + rowsToMove, ignoreItems); - ignoreItems.push(item); - } - }; - - /** - * Moves an item down to a specified row - * - * @param {Object} item The item to move - * @param {Number} newRow The target row - * @param {Array} ignoreItems - */ - this.moveItemDown = function(item, newRow, ignoreItems) { - if (item.row >= newRow) { - return; - } - while (item.row < newRow) { - ++item.row; - this.moveOverlappingItems(item, ignoreItems); - } - this.putItem(item, item.row, item.col, ignoreItems); - }; - - /** - * Moves all items up as much as possible - */ - this.floatItemsUp = function() { - if (this.floating === false) { - return; - } - for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) { - var columns = this.grid[rowIndex]; - if (!columns) { - continue; - } - for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) { - var item = columns[colIndex]; - if (item) { - this.floatItemUp(item); - } - } - } - }; - - /** - * Float an item up to the most suitable row - * - * @param {Object} item The item to move - */ - this.floatItemUp = function(item) { - if (this.floating === false) { - return; - } - var colIndex = item.col, - sizeY = item.sizeY, - sizeX = item.sizeX, - bestRow = null, - bestColumn = null, - rowIndex = item.row - 1; - - while (rowIndex > -1) { - var items = this.getItems(rowIndex, colIndex, sizeX, sizeY, item); - if (items.length !== 0) { - break; - } - bestRow = rowIndex; - bestColumn = colIndex; - --rowIndex; - } - if (bestRow !== null) { - this.putItem(item, bestRow, bestColumn); - } - }; - - /** - * Update gridsters height - * - * @param {Number} plus (Optional) Additional height to add - */ - this.updateHeight = function(plus) { - var maxHeight = this.minRows; - plus = plus || 0; - for (var rowIndex = this.grid.length; rowIndex >= 0; --rowIndex) { - var columns = this.grid[rowIndex]; - if (!columns) { - continue; - } - for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) { - if (columns[colIndex]) { - maxHeight = Math.max(maxHeight, rowIndex + plus + columns[colIndex].sizeY); - } - } - } - this.gridHeight = this.maxRows - maxHeight > 0 ? Math.min(this.maxRows, maxHeight) : Math.max(this.maxRows, maxHeight); - }; - - /** - * Returns the number of rows that will fit in given amount of pixels - * - * @param {Number} pixels - * @param {Boolean} ceilOrFloor (Optional) Determines rounding method - */ - this.pixelsToRows = function(pixels, ceilOrFloor) { - if (ceilOrFloor === true) { - return Math.ceil(pixels / this.curRowHeight); - } else if (ceilOrFloor === false) { - return Math.floor(pixels / this.curRowHeight); - } - - return Math.round(pixels / this.curRowHeight); - }; - - /** - * Returns the number of columns that will fit in a given amount of pixels - * - * @param {Number} pixels - * @param {Boolean} ceilOrFloor (Optional) Determines rounding method - * @returns {Number} The number of columns - */ - this.pixelsToColumns = function(pixels, ceilOrFloor) { - if (ceilOrFloor === true) { - return Math.ceil(pixels / this.curColWidth); - } else if (ceilOrFloor === false) { - return Math.floor(pixels / this.curColWidth); - } - - return Math.round(pixels / this.curColWidth); - }; - } - ]) - - .directive('gridsterPreview', function() { - return { - replace: true, - scope: true, - require: '^gridster', - template: '
', - link: function(scope, $el, attrs, gridster) { - - /** - * @returns {Object} style object for preview element - */ - scope.previewStyle = function() { - - if (!gridster.movingItem) { - return { - display: 'none' - }; - } - - return { - display: 'block', - height: (gridster.movingItem.sizeY * gridster.curRowHeight - gridster.margins[0]) + 'px', - width: (gridster.movingItem.sizeX * gridster.curColWidth - gridster.margins[1]) + 'px', - top: (gridster.movingItem.row * gridster.curRowHeight + (gridster.outerMargin ? gridster.margins[0] : 0)) + 'px', - left: (gridster.movingItem.col * gridster.curColWidth + (gridster.outerMargin ? gridster.margins[1] : 0)) + 'px' - }; - }; - } - }; - }) - - /** - * The gridster directive - * - * @param {Function} $timeout - * @param {Object} $window - * @param {Object} $rootScope - * @param {Function} gridsterDebounce - */ - .directive('gridster', ['$timeout', '$window', '$rootScope', 'gridsterDebounce', - function($timeout, $window, $rootScope, gridsterDebounce) { - return { - scope: true, - restrict: 'EAC', - controller: 'GridsterCtrl', - controllerAs: 'gridster', - compile: function($tplElem) { - - $tplElem.prepend('
'); - - return function(scope, $elem, attrs, gridster) { - gridster.loaded = false; - - gridster.$element = $elem; - - scope.gridster = gridster; - - $elem.addClass('gridster'); - - var isVisible = function(ele) { - return ele.style.visibility !== 'hidden' && ele.style.display !== 'none'; - }; - - function refresh(config) { - gridster.setOptions(config); - - if (!isVisible($elem[0])) { - return; - } - - // resolve "auto" & "match" values - if (gridster.width === 'auto') { - gridster.curWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10); - } else { - gridster.curWidth = gridster.width; - } - - if (gridster.colWidth === 'auto') { - gridster.curColWidth = (gridster.curWidth + (gridster.outerMargin ? -gridster.margins[1] : gridster.margins[1])) / gridster.columns; - } else { - gridster.curColWidth = gridster.colWidth; - } - - gridster.curRowHeight = gridster.rowHeight; - if (typeof gridster.rowHeight === 'string') { - if (gridster.rowHeight === 'match') { - gridster.curRowHeight = Math.round(gridster.curColWidth); - } else if (gridster.rowHeight.indexOf('*') !== -1) { - gridster.curRowHeight = Math.round(gridster.curColWidth * gridster.rowHeight.replace('*', '').replace(' ', '')); - } else if (gridster.rowHeight.indexOf('/') !== -1) { - gridster.curRowHeight = Math.round(gridster.curColWidth / gridster.rowHeight.replace('/', '').replace(' ', '')); - } - } - - gridster.isMobile = gridster.mobileModeEnabled && gridster.curWidth <= gridster.mobileBreakPoint; - - // loop through all items and reset their CSS - for (var rowIndex = 0, l = gridster.grid.length; rowIndex < l; ++rowIndex) { - var columns = gridster.grid[rowIndex]; - if (!columns) { - continue; - } - - for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) { - if (columns[colIndex]) { - var item = columns[colIndex]; - item.setElementPosition(); - item.setElementSizeY(); - item.setElementSizeX(); - } - } - } - - updateHeight(); - } - - var optionsKey = attrs.gridster; - if (optionsKey) { - scope.$parent.$watch(optionsKey, function(newConfig) { - refresh(newConfig); - }, true); - } else { - refresh({}); - } - - scope.$watch(function() { - return gridster.loaded; - }, function() { - if (gridster.loaded) { - $elem.addClass('gridster-loaded'); - } else { - $elem.removeClass('gridster-loaded'); - } - }); - - scope.$watch(function() { - return gridster.isMobile; - }, function() { - if (gridster.isMobile) { - $elem.addClass('gridster-mobile').removeClass('gridster-desktop'); - } else { - $elem.removeClass('gridster-mobile').addClass('gridster-desktop'); - } - $rootScope.$broadcast('gridster-mobile-changed', gridster); - }); - - scope.$watch(function() { - return gridster.draggable; - }, function() { - $rootScope.$broadcast('gridster-draggable-changed', gridster); - }, true); - - scope.$watch(function() { - return gridster.resizable; - }, function() { - $rootScope.$broadcast('gridster-resizable-changed', gridster); - }, true); - - function updateHeight() { - if(gridster.gridHeight){ //need to put this check, otherwise fail in IE8 - $elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px'); - } - } - - scope.$watch(function() { - return gridster.gridHeight; - }, updateHeight); - - scope.$watch(function() { - return gridster.movingItem; - }, function() { - gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0); - }); - - var prevWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10); - - var resize = function() { - var width = $elem[0].offsetWidth || parseInt($elem.css('width'), 10); - - if (!width || width === prevWidth || gridster.movingItem) { - return; - } - prevWidth = width; - - if (gridster.loaded) { - $elem.removeClass('gridster-loaded'); - } - - refresh(); - - if (gridster.loaded) { - $elem.addClass('gridster-loaded'); - } - - $rootScope.$broadcast('gridster-resized', [width, $elem[0].offsetHeight], gridster); - }; - - // track element width changes any way we can - var onResize = gridsterDebounce(function onResize() { - resize(); - $timeout(function() { - scope.$apply(); - }); - }, 100); - - scope.$watch(function() { - return isVisible($elem[0]); - }, onResize); - - // see https://github.com/sdecima/javascript-detect-element-resize - if (typeof window.addResizeListener === 'function') { - window.addResizeListener($elem[0], onResize); - } else { - scope.$watch(function() { - return $elem[0].offsetWidth || parseInt($elem.css('width'), 10); - }, resize); - } - var $win = angular.element($window); - $win.on('resize', onResize); - - // be sure to cleanup - scope.$on('$destroy', function() { - gridster.destroy(); - $win.off('resize', onResize); - if (typeof window.removeResizeListener === 'function') { - window.removeResizeListener($elem[0], onResize); - } - }); - - // allow a little time to place items before floating up - $timeout(function() { - scope.$watch('gridster.floating', function() { - gridster.floatItemsUp(); - }); - gridster.loaded = true; - }, 100); - }; - } - }; - } - ]) - - .controller('GridsterItemCtrl', function() { - this.$element = null; - this.gridster = null; - this.row = null; - this.col = null; - this.sizeX = null; - this.sizeY = null; - this.minSizeX = 0; - this.minSizeY = 0; - this.maxSizeX = null; - this.maxSizeY = null; - - this.init = function($element, gridster) { - this.$element = $element; - this.gridster = gridster; - this.sizeX = gridster.defaultSizeX; - this.sizeY = gridster.defaultSizeY; - }; - - this.destroy = function() { - // set these to null to avoid the possibility of circular references - this.gridster = null; - this.$element = null; - }; - - /** - * Returns the items most important attributes - */ - this.toJSON = function() { - return { - row: this.row, - col: this.col, - sizeY: this.sizeY, - sizeX: this.sizeX - }; - }; - - this.isMoving = function() { - return this.gridster.movingItem === this; - }; - - /** - * Set the items position - * - * @param {Number} row - * @param {Number} column - */ - this.setPosition = function(row, column) { - this.gridster.putItem(this, row, column); - - if (!this.isMoving()) { - this.setElementPosition(); - } - }; - - /** - * Sets a specified size property - * - * @param {String} key Can be either "x" or "y" - * @param {Number} value The size amount - * @param {Boolean} preventMove - */ - this.setSize = function(key, value, preventMove) { - key = key.toUpperCase(); - var camelCase = 'size' + key, - titleCase = 'Size' + key; - if (value === '') { - return; - } - value = parseInt(value, 10); - if (isNaN(value) || value === 0) { - value = this.gridster['default' + titleCase]; - } - var max = key === 'X' ? this.gridster.columns : this.gridster.maxRows; - if (this['max' + titleCase]) { - max = Math.min(this['max' + titleCase], max); - } - if (this.gridster['max' + titleCase]) { - max = Math.min(this.gridster['max' + titleCase], max); - } - if (key === 'X' && this.cols) { - max -= this.cols; - } else if (key === 'Y' && this.rows) { - max -= this.rows; - } - - var min = 0; - if (this['min' + titleCase]) { - min = Math.max(this['min' + titleCase], min); - } - if (this.gridster['min' + titleCase]) { - min = Math.max(this.gridster['min' + titleCase], min); - } - - value = Math.max(Math.min(value, max), min); - - var changed = (this[camelCase] !== value || (this['old' + titleCase] && this['old' + titleCase] !== value)); - this['old' + titleCase] = this[camelCase] = value; - - if (!this.isMoving()) { - this['setElement' + titleCase](); - } - if (!preventMove && changed) { - this.gridster.moveOverlappingItems(this); - this.gridster.layoutChanged(); - } - - return changed; - }; - - /** - * Sets the items sizeY property - * - * @param {Number} rows - * @param {Boolean} preventMove - */ - this.setSizeY = function(rows, preventMove) { - return this.setSize('Y', rows, preventMove); - }; - - /** - * Sets the items sizeX property - * - * @param {Number} columns - * @param {Boolean} preventMove - */ - this.setSizeX = function(columns, preventMove) { - return this.setSize('X', columns, preventMove); - }; - - /** - * Sets an elements position on the page - */ - this.setElementPosition = function() { - if (this.gridster.isMobile) { - this.$element.css({ - marginLeft: this.gridster.margins[0] + 'px', - marginRight: this.gridster.margins[0] + 'px', - marginTop: this.gridster.margins[1] + 'px', - marginBottom: this.gridster.margins[1] + 'px', - top: '', - left: '' - }); - } else { - this.$element.css({ - margin: 0, - top: (this.row * this.gridster.curRowHeight + (this.gridster.outerMargin ? this.gridster.margins[0] : 0)) + 'px', - left: (this.col * this.gridster.curColWidth + (this.gridster.outerMargin ? this.gridster.margins[1] : 0)) + 'px' - }); - } - }; - - /** - * Sets an elements height - */ - this.setElementSizeY = function() { - if (this.gridster.isMobile && !this.gridster.saveGridItemCalculatedHeightInMobile) { - this.$element.css('height', ''); - } else { - var computedHeight = (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]) + 'px'; - //this.$element.css('height', computedHeight); - this.$element.attr('style', this.$element.attr('style') + '; ' + 'height: '+computedHeight+' !important;'); - } - }; - - /** - * Sets an elements width - */ - this.setElementSizeX = function() { - if (this.gridster.isMobile) { - this.$element.css('width', ''); - } else { - this.$element.css('width', (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]) + 'px'); - } - }; - - /** - * Gets an element's width - */ - this.getElementSizeX = function() { - return (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]); - }; - - /** - * Gets an element's height - */ - this.getElementSizeY = function() { - return (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]); - }; - - }) - - .factory('GridsterTouch', [function() { - return function GridsterTouch(target, startEvent, moveEvent, endEvent) { - var lastXYById = {}; - - // Opera doesn't have Object.keys so we use this wrapper - var numberOfKeys = function(theObject) { - if (Object.keys) { - return Object.keys(theObject).length; - } - - var n = 0, - key; - for (key in theObject) { - ++n; - } - - return n; - }; - - // this calculates the delta needed to convert pageX/Y to offsetX/Y because offsetX/Y don't exist in the TouchEvent object or in Firefox's MouseEvent object - var computeDocumentToElementDelta = function(theElement) { - var elementLeft = 0; - var elementTop = 0; - var oldIEUserAgent = navigator.userAgent.match(/\bMSIE\b/); - - for (var offsetElement = theElement; offsetElement != null; offsetElement = offsetElement.offsetParent) { - // the following is a major hack for versions of IE less than 8 to avoid an apparent problem on the IEBlog with double-counting the offsets - // this may not be a general solution to IE7's problem with offsetLeft/offsetParent - if (oldIEUserAgent && - (!document.documentMode || document.documentMode < 8) && - offsetElement.currentStyle.position === 'relative' && offsetElement.offsetParent && offsetElement.offsetParent.currentStyle.position === 'relative' && offsetElement.offsetLeft === offsetElement.offsetParent.offsetLeft) { - // add only the top - elementTop += offsetElement.offsetTop; - } else { - elementLeft += offsetElement.offsetLeft; - elementTop += offsetElement.offsetTop; - } - } - - return { - x: elementLeft, - y: elementTop - }; - }; - - // cache the delta from the document to our event target (reinitialized each mousedown/MSPointerDown/touchstart) - var documentToTargetDelta = computeDocumentToElementDelta(target); - - // common event handler for the mouse/pointer/touch models and their down/start, move, up/end, and cancel events - var doEvent = function(theEvtObj) { - - if (theEvtObj.type === 'mousemove' && numberOfKeys(lastXYById) === 0) { - return; - } - - var prevent = true; - - var pointerList = theEvtObj.changedTouches ? theEvtObj.changedTouches : [theEvtObj]; - - for (var i = 0; i < pointerList.length; ++i) { - var pointerObj = pointerList[i]; - var pointerId = (typeof pointerObj.identifier !== 'undefined') ? pointerObj.identifier : (typeof pointerObj.pointerId !== 'undefined') ? pointerObj.pointerId : 1; - - // use the pageX/Y coordinates to compute target-relative coordinates when we have them (in ie < 9, we need to do a little work to put them there) - if (typeof pointerObj.pageX === 'undefined') { - - // initialize assuming our source element is our target - if(!ie8){ - pointerObj.pageX = pointerObj.offsetX + documentToTargetDelta.x; - pointerObj.pageY = pointerObj.offsetY + documentToTargetDelta.y; - } - else{ - pointerObj.pageX = pointerObj.clientX; - pointerObj.pageY = pointerObj.clientY; - } - - if (pointerObj.srcElement.offsetParent === target && document.documentMode && document.documentMode === 8 && pointerObj.type === 'mousedown') { - // source element is a child piece of VML, we're in IE8, and we've not called setCapture yet - add the origin of the source element - pointerObj.pageX += pointerObj.srcElement.offsetLeft; - pointerObj.pageY += pointerObj.srcElement.offsetTop; - } else if (pointerObj.srcElement !== target && !document.documentMode || document.documentMode < 8) { - // source element isn't the target (most likely it's a child piece of VML) and we're in a version of IE before IE8 - - // the offsetX/Y values are unpredictable so use the clientX/Y values and adjust by the scroll offsets of its parents - // to get the document-relative coordinates (the same as pageX/Y) - var sx = -2, - sy = -2; // adjust for old IE's 2-pixel border - for (var scrollElement = pointerObj.srcElement; scrollElement !== null; scrollElement = scrollElement.parentNode) { - sx += scrollElement.scrollLeft ? scrollElement.scrollLeft : 0; - sy += scrollElement.scrollTop ? scrollElement.scrollTop : 0; - } - - pointerObj.pageX = pointerObj.clientX + sx; - pointerObj.pageY = pointerObj.clientY + sy; - } - } - - - var pageX = pointerObj.pageX; - var pageY = pointerObj.pageY; - - if (theEvtObj.type.match(/(start|down)$/i)) { - // clause for processing MSPointerDown, touchstart, and mousedown - - // refresh the document-to-target delta on start in case the target has moved relative to document - documentToTargetDelta = computeDocumentToElementDelta(target); - - // protect against failing to get an up or end on this pointerId - if (lastXYById[pointerId]) { - if (endEvent) { - endEvent({ - target: theEvtObj.target, - which: theEvtObj.which, - pointerId: pointerId, - pageX: pageX, - pageY: pageY - }); - } - - delete lastXYById[pointerId]; - } - - if (startEvent) { - if (prevent) { - prevent = startEvent({ - target: theEvtObj.target, - which: theEvtObj.which, - pointerId: pointerId, - pageX: pageX, - pageY: pageY - }); - } - } - - // init last page positions for this pointer - lastXYById[pointerId] = { - x: pageX, - y: pageY - }; - - // IE pointer model - if (target.msSetPointerCapture) { - target.msSetPointerCapture(pointerId); - } else if (theEvtObj.type === 'mousedown' && numberOfKeys(lastXYById) === 1) { - if (useSetReleaseCapture) { - target.setCapture(true); - } else { - document.addEventListener('mousemove', doEvent, false); - document.addEventListener('mouseup', doEvent, false); - } - } - } else if (theEvtObj.type.match(/move$/i)) { - // clause handles mousemove, MSPointerMove, and touchmove - - if (lastXYById[pointerId] && !(lastXYById[pointerId].x === pageX && lastXYById[pointerId].y === pageY)) { - // only extend if the pointer is down and it's not the same as the last point - - if (moveEvent && prevent) { - prevent = moveEvent({ - target: theEvtObj.target, - which: theEvtObj.which, - pointerId: pointerId, - pageX: pageX, - pageY: pageY - }); - } - - // update last page positions for this pointer - lastXYById[pointerId].x = pageX; - lastXYById[pointerId].y = pageY; - } - } else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel)$/i)) { - // clause handles up/end/cancel - - if (endEvent && prevent) { - prevent = endEvent({ - target: theEvtObj.target, - which: theEvtObj.which, - pointerId: pointerId, - pageX: pageX, - pageY: pageY - }); - } - - // delete last page positions for this pointer - delete lastXYById[pointerId]; - - // in the Microsoft pointer model, release the capture for this pointer - // in the mouse model, release the capture or remove document-level event handlers if there are no down points - // nothing is required for the iOS touch model because capture is implied on touchstart - if (target.msReleasePointerCapture) { - target.msReleasePointerCapture(pointerId); - } else if (theEvtObj.type === 'mouseup' && numberOfKeys(lastXYById) === 0) { - if (useSetReleaseCapture) { - target.releaseCapture(); - } else { - document.removeEventListener('mousemove', doEvent, false); - document.removeEventListener('mouseup', doEvent, false); - } - } - } - } - - if (prevent) { - if (theEvtObj.preventDefault) { - theEvtObj.preventDefault(); - } - - if (theEvtObj.preventManipulation) { - theEvtObj.preventManipulation(); - } - - if (theEvtObj.preventMouseEvent) { - theEvtObj.preventMouseEvent(); - } - } - }; - - var useSetReleaseCapture = false; - // saving the settings for contentZooming and touchaction before activation - var contentZooming, msTouchAction; - - this.enable = function() { - - if (window.navigator.msPointerEnabled) { - // Microsoft pointer model - target.addEventListener('MSPointerDown', doEvent, false); - target.addEventListener('MSPointerMove', doEvent, false); - target.addEventListener('MSPointerUp', doEvent, false); - target.addEventListener('MSPointerCancel', doEvent, false); - - // css way to prevent panning in our target area - if (typeof target.style.msContentZooming !== 'undefined') { - contentZooming = target.style.msContentZooming; - target.style.msContentZooming = 'none'; - } - - // new in Windows Consumer Preview: css way to prevent all built-in touch actions on our target - // without this, you cannot touch draw on the element because IE will intercept the touch events - if (typeof target.style.msTouchAction !== 'undefined') { - msTouchAction = target.style.msTouchAction; - target.style.msTouchAction = 'none'; - } - } else if (target.addEventListener) { - // iOS touch model - target.addEventListener('touchstart', doEvent, false); - target.addEventListener('touchmove', doEvent, false); - target.addEventListener('touchend', doEvent, false); - target.addEventListener('touchcancel', doEvent, false); - - // mouse model - target.addEventListener('mousedown', doEvent, false); - - // mouse model with capture - // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target - if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) { - useSetReleaseCapture = true; - - target.addEventListener('mousemove', doEvent, false); - target.addEventListener('mouseup', doEvent, false); - } - } else if (target.attachEvent && target.setCapture) { - // legacy IE mode - mouse with capture - useSetReleaseCapture = true; - target.attachEvent('onmousedown', function() { - doEvent(window.event); - window.event.returnValue = false; - return false; - }); - target.attachEvent('onmousemove', function() { - doEvent(window.event); - window.event.returnValue = false; - return false; - }); - target.attachEvent('onmouseup', function() { - doEvent(window.event); - window.event.returnValue = false; - return false; - }); - } - }; - - this.disable = function() { - if (window.navigator.msPointerEnabled) { - // Microsoft pointer model - target.removeEventListener('MSPointerDown', doEvent, false); - target.removeEventListener('MSPointerMove', doEvent, false); - target.removeEventListener('MSPointerUp', doEvent, false); - target.removeEventListener('MSPointerCancel', doEvent, false); - - // reset zooming to saved value - if (contentZooming) { - target.style.msContentZooming = contentZooming; - } - - // reset touch action setting - if (msTouchAction) { - target.style.msTouchAction = msTouchAction; - } - } else if (target.removeEventListener) { - // iOS touch model - target.removeEventListener('touchstart', doEvent, false); - target.removeEventListener('touchmove', doEvent, false); - target.removeEventListener('touchend', doEvent, false); - target.removeEventListener('touchcancel', doEvent, false); - - // mouse model - target.removeEventListener('mousedown', doEvent, false); - - // mouse model with capture - // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target - if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) { - useSetReleaseCapture = true; - - target.removeEventListener('mousemove', doEvent, false); - target.removeEventListener('mouseup', doEvent, false); - } - } else if (target.detachEvent && target.setCapture) { - // legacy IE mode - mouse with capture - useSetReleaseCapture = true; - target.detachEvent('onmousedown'); - target.detachEvent('onmousemove'); - target.detachEvent('onmouseup'); - } - }; - - return this; - }; - }]) - - .factory('GridsterDraggable', ['$document', '$timeout', '$window', 'GridsterTouch', - function($document, $timeout, $window, GridsterTouch) { - function GridsterDraggable($el, scope, gridster, item, itemOptions) { - - var elmX, elmY, elmW, elmH, - - mouseX = 0, - mouseY = 0, - lastMouseX = 0, - lastMouseY = 0, - mOffX = 0, - mOffY = 0, - - minTop = 0, - maxTop = 9999, - minLeft = 0, - realdocument = $document[0]; - - var originalCol, originalRow; - var inputTags = ['select', 'input', 'textarea', 'button']; - - var gridsterItemDragElement = $el[0].querySelector('[gridster-item-drag]'); - //console.log(gridsterItemDragElement); - var isDraggableAreaDefined = gridsterItemDragElement?true:false; - //console.log(isDraggableAreaDefined); - - function mouseDown(e) { - - if(ie8){ - e.target = window.event.srcElement; - e.which = window.event.button; - } - - if(isDraggableAreaDefined && (!gridsterItemDragElement.contains(e.target))){ - return false; - } - - if (inputTags.indexOf(e.target.nodeName.toLowerCase()) !== -1) { - return false; - } - - var $target = angular.element(e.target); - - // exit, if a resize handle was hit - if ($target.hasClass('gridster-item-resizable-handler')) { - return false; - } - - // exit, if the target has it's own click event - if ($target.attr('onclick') || $target.attr('ng-click')) { - return false; - } - - // only works if you have jQuery - if ($target.closest && $target.closest('.gridster-no-drag').length) { - return false; - } - - switch (e.which) { - case 1: - // left mouse button - break; - case 2: - case 3: - // right or middle mouse button - return; - } - - lastMouseX = e.pageX; - lastMouseY = e.pageY; - - elmX = parseInt($el.css('left'), 10); - elmY = parseInt($el.css('top'), 10); - elmW = $el[0].offsetWidth; - elmH = $el[0].offsetHeight; - - originalCol = item.col; - originalRow = item.row; - - dragStart(e); - - return true; - } - - function mouseMove(e) { - if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) { - return false; - } - - var maxLeft = gridster.curWidth - 1; - - // Get the current mouse position. - mouseX = e.pageX; - mouseY = e.pageY; - - // Get the deltas - var diffX = mouseX - lastMouseX + mOffX; - var diffY = mouseY - lastMouseY + mOffY; - mOffX = mOffY = 0; - - // Update last processed mouse positions. - lastMouseX = mouseX; - lastMouseY = mouseY; - - var dX = diffX, - dY = diffY; - if (elmX + dX < minLeft) { - diffX = minLeft - elmX; - mOffX = dX - diffX; - } else if (elmX + elmW + dX > maxLeft) { - diffX = maxLeft - elmX - elmW; - mOffX = dX - diffX; - } - - if (elmY + dY < minTop) { - diffY = minTop - elmY; - mOffY = dY - diffY; - } else if (elmY + elmH + dY > maxTop) { - diffY = maxTop - elmY - elmH; - mOffY = dY - diffY; - } - elmX += diffX; - elmY += diffY; - - // set new position - $el.css({ - 'top': elmY + 'px', - 'left': elmX + 'px' - }); - - drag(e); - - return true; - } - - function mouseUp(e) { - if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) { - return false; - } - - mOffX = mOffY = 0; - - dragStop(e); - - return true; - } - - function dragStart(event) { - $el.addClass('gridster-item-moving'); - gridster.movingItem = item; - - gridster.updateHeight(item.sizeY); - scope.$apply(function() { - if (gridster.draggable && gridster.draggable.start) { - gridster.draggable.start(event, $el, itemOptions); - } - }); - } - - function drag(event) { - var oldRow = item.row, - oldCol = item.col, - hasCallback = gridster.draggable && gridster.draggable.drag, - scrollSensitivity = gridster.draggable.scrollSensitivity, - scrollSpeed = gridster.draggable.scrollSpeed; - - var row = gridster.pixelsToRows(elmY); - var col = gridster.pixelsToColumns(elmX); - - var itemsInTheWay = gridster.getItems(row, col, item.sizeX, item.sizeY, item); - var hasItemsInTheWay = itemsInTheWay.length !== 0; - - if (gridster.swapping === true && hasItemsInTheWay) { - var boundingBoxItem = gridster.getBoundingBox(itemsInTheWay), - sameSize = boundingBoxItem.sizeX === item.sizeX && boundingBoxItem.sizeY === item.sizeY, - sameRow = boundingBoxItem.row === oldRow, - sameCol = boundingBoxItem.col === oldCol, - samePosition = boundingBoxItem.row === row && boundingBoxItem.col === col, - inline = sameRow || sameCol; - - if (sameSize && itemsInTheWay.length === 1) { - if (samePosition) { - gridster.swapItems(item, itemsInTheWay[0]); - } else if (inline) { - return; - } - } else if (boundingBoxItem.sizeX <= item.sizeX && boundingBoxItem.sizeY <= item.sizeY && inline) { - var emptyRow = item.row <= row ? item.row : row + item.sizeY, - emptyCol = item.col <= col ? item.col : col + item.sizeX, - rowOffset = emptyRow - boundingBoxItem.row, - colOffset = emptyCol - boundingBoxItem.col; - - for (var i = 0, l = itemsInTheWay.length; i < l; ++i) { - var itemInTheWay = itemsInTheWay[i]; - - var itemsInFreeSpace = gridster.getItems( - itemInTheWay.row + rowOffset, - itemInTheWay.col + colOffset, - itemInTheWay.sizeX, - itemInTheWay.sizeY, - item - ); - - if (itemsInFreeSpace.length === 0) { - gridster.putItem(itemInTheWay, itemInTheWay.row + rowOffset, itemInTheWay.col + colOffset); - } - } - } - } - - if (gridster.pushing !== false || !hasItemsInTheWay) { - item.row = row; - item.col = col; - } - - if(($window.navigator.appName === 'Microsoft Internet Explorer' && !ie8) || $window.navigator.userAgent.indexOf("Firefox")!==-1){ - if (event.pageY - realdocument.documentElement.scrollTop < scrollSensitivity) { - realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop - scrollSpeed; - } else if ($window.innerHeight - (event.pageY - realdocument.documentElement.scrollTop) < scrollSensitivity) { - realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop + scrollSpeed; - } - } - else{ - if (event.pageY - realdocument.body.scrollTop < scrollSensitivity) { - realdocument.body.scrollTop = realdocument.body.scrollTop - scrollSpeed; - } else if ($window.innerHeight - (event.pageY - realdocument.body.scrollTop) < scrollSensitivity) { - realdocument.body.scrollTop = realdocument.body.scrollTop + scrollSpeed; - } - } - - - - if (event.pageX - realdocument.body.scrollLeft < scrollSensitivity) { - realdocument.body.scrollLeft = realdocument.body.scrollLeft - scrollSpeed; - } else if ($window.innerWidth - (event.pageX - realdocument.body.scrollLeft) < scrollSensitivity) { - realdocument.body.scrollLeft = realdocument.body.scrollLeft + scrollSpeed; - } - - if (hasCallback || oldRow !== item.row || oldCol !== item.col) { - scope.$apply(function() { - if (hasCallback) { - gridster.draggable.drag(event, $el, itemOptions); - } - }); - } - } - - function dragStop(event) { - $el.removeClass('gridster-item-moving'); - var row = gridster.pixelsToRows(elmY); - var col = gridster.pixelsToColumns(elmX); - if (gridster.pushing !== false || gridster.getItems(row, col, item.sizeX, item.sizeY, item).length === 0) { - item.row = row; - item.col = col; - } - gridster.movingItem = null; - item.setPosition(item.row, item.col); - - scope.$apply(function() { - if (gridster.draggable && gridster.draggable.stop) { - gridster.draggable.stop(event, $el, itemOptions); - } - }); - } - - var enabled = null; - var $dragHandles = null; - var unifiedInputs = []; - - this.enable = function() { - if (enabled === true) { - return; - } - - // disable and timeout required for some template rendering - $timeout(function() { - // disable any existing draghandles - for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) { - unifiedInputs[u].disable(); - } - unifiedInputs = []; - - if (gridster.draggable && gridster.draggable.handle) { - $dragHandles = angular.element($el[0].querySelectorAll(gridster.draggable.handle)); - if ($dragHandles.length === 0) { - // fall back to element if handle not found... - $dragHandles = $el; - } - } else { - $dragHandles = $el; - } - - for (var h = 0, hl = $dragHandles.length; h < hl; ++h) { - unifiedInputs[h] = new GridsterTouch($dragHandles[h], mouseDown, mouseMove, mouseUp); - unifiedInputs[h].enable(); - } - - enabled = true; - }); - }; - - this.disable = function() { - if (enabled === false) { - return; - } - - // timeout to avoid race contition with the enable timeout - $timeout(function() { - - for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) { - unifiedInputs[u].disable(); - } - - unifiedInputs = []; - enabled = false; - }); - }; - - this.toggle = function(enabled) { - if (enabled) { - this.enable(); - } else { - this.disable(); - } - }; - - this.destroy = function() { - this.disable(); - }; - } - - return GridsterDraggable; - } - ]) - - .factory('GridsterResizable', ['GridsterTouch', function(GridsterTouch) { - function GridsterResizable($el, scope, gridster, item, itemOptions) { - - function ResizeHandle(handleClass) { - - var hClass = handleClass; - - var elmX, elmY, elmW, elmH, - - mouseX = 0, - mouseY = 0, - lastMouseX = 0, - lastMouseY = 0, - mOffX = 0, - mOffY = 0, - - minTop = 0, - maxTop = 9999, - minLeft = 0; - - var getMinHeight = function() { - return (item.minSizeY ? item.minSizeY : 1) * gridster.curRowHeight - gridster.margins[0]; - }; - var getMinWidth = function() { - return (item.minSizeX ? item.minSizeX : 1) * gridster.curColWidth - gridster.margins[1]; - }; - - var originalWidth, originalHeight; - var savedDraggable; - - function mouseDown(e) { - switch (e.which) { - case 1: - // left mouse button - break; - case 2: - case 3: - // right or middle mouse button - return; - } - - // save the draggable setting to restore after resize - savedDraggable = gridster.draggable.enabled; - if (savedDraggable) { - gridster.draggable.enabled = false; - scope.$broadcast('gridster-draggable-changed', gridster); - } - - // Get the current mouse position. - lastMouseX = e.pageX; - lastMouseY = e.pageY; - - // Record current widget dimensions - elmX = parseInt($el.css('left'), 10); - elmY = parseInt($el.css('top'), 10); - elmW = $el[0].offsetWidth; - elmH = $el[0].offsetHeight; - - originalWidth = item.sizeX; - originalHeight = item.sizeY; - - resizeStart(e); - - return true; - } - - function resizeStart(e) { - $el.addClass('gridster-item-moving'); - $el.addClass('gridster-item-resizing'); - - gridster.movingItem = item; - - item.setElementSizeX(); - item.setElementSizeY(); - item.setElementPosition(); - gridster.updateHeight(1); - - scope.$apply(function() { - // callback - if (gridster.resizable && gridster.resizable.start) { - gridster.resizable.start(e, $el, itemOptions); // options is the item model - } - }); - } - - function mouseMove(e) { - var maxLeft = gridster.curWidth - 1; - - // Get the current mouse position. - mouseX = e.pageX; - mouseY = e.pageY; - - // Get the deltas - var diffX = mouseX - lastMouseX + mOffX; - var diffY = mouseY - lastMouseY + mOffY; - mOffX = mOffY = 0; - - // Update last processed mouse positions. - lastMouseX = mouseX; - lastMouseY = mouseY; - - var dY = diffY, - dX = diffX; - - if (hClass.indexOf('n') >= 0) { - if (elmH - dY < getMinHeight()) { - diffY = elmH - getMinHeight(); - mOffY = dY - diffY; - } else if (elmY + dY < minTop) { - diffY = minTop - elmY; - mOffY = dY - diffY; - } - elmY += diffY; - elmH -= diffY; - } - if (hClass.indexOf('s') >= 0) { - if (elmH + dY < getMinHeight()) { - diffY = getMinHeight() - elmH; - mOffY = dY - diffY; - } else if (elmY + elmH + dY > maxTop) { - diffY = maxTop - elmY - elmH; - mOffY = dY - diffY; - } - elmH += diffY; - } - if (hClass.indexOf('w') >= 0) { - if (elmW - dX < getMinWidth()) { - diffX = elmW - getMinWidth(); - mOffX = dX - diffX; - } else if (elmX + dX < minLeft) { - diffX = minLeft - elmX; - mOffX = dX - diffX; - } - elmX += diffX; - elmW -= diffX; - } - if (hClass.indexOf('e') >= 0) { - if (elmW + dX < getMinWidth()) { - diffX = getMinWidth() - elmW; - mOffX = dX - diffX; - } else if (elmX + elmW + dX > maxLeft) { - diffX = maxLeft - elmX - elmW; - mOffX = dX - diffX; - } - elmW += diffX; - } - - // set new position - $el.css({ - 'top': elmY + 'px', - 'left': elmX + 'px', - 'width': elmW + 'px', - 'height': elmH + 'px' - }); - - resize(e); - - return true; - } - - function mouseUp(e) { - // restore draggable setting to its original state - if (gridster.draggable.enabled !== savedDraggable) { - gridster.draggable.enabled = savedDraggable; - scope.$broadcast('gridster-draggable-changed', gridster); - } - - mOffX = mOffY = 0; - - resizeStop(e); - - return true; - } - - function resize(e) { - var oldRow = item.row, - oldCol = item.col, - oldSizeX = item.sizeX, - oldSizeY = item.sizeY, - hasCallback = gridster.resizable && gridster.resizable.resize; - - var col = item.col; - // only change column if grabbing left edge - if (['w', 'nw', 'sw'].indexOf(handleClass) !== -1) { - col = gridster.pixelsToColumns(elmX, false); - } - - var row = item.row; - // only change row if grabbing top edge - if (['n', 'ne', 'nw'].indexOf(handleClass) !== -1) { - row = gridster.pixelsToRows(elmY, false); - } - - var sizeX = item.sizeX; - // only change row if grabbing left or right edge - if (['n', 's'].indexOf(handleClass) === -1) { - sizeX = gridster.pixelsToColumns(elmW, true); - } - - var sizeY = item.sizeY; - // only change row if grabbing top or bottom edge - if (['e', 'w'].indexOf(handleClass) === -1) { - sizeY = gridster.pixelsToRows(elmH, true); - } - - if (gridster.pushing !== false || gridster.getItems(row, col, sizeX, sizeY, item).length === 0) { - item.row = row; - item.col = col; - item.sizeX = sizeX; - item.sizeY = sizeY; - } - var isChanged = item.row !== oldRow || item.col !== oldCol || item.sizeX !== oldSizeX || item.sizeY !== oldSizeY; - - if (hasCallback || isChanged) { - scope.$apply(function() { - if (hasCallback) { - gridster.resizable.resize(e, $el, itemOptions); // options is the item model - } - }); - } - } - - function resizeStop(e) { - $el.removeClass('gridster-item-moving'); - $el.removeClass('gridster-item-resizing'); - - gridster.movingItem = null; - - item.setPosition(item.row, item.col); - item.setSizeY(item.sizeY); - item.setSizeX(item.sizeX); - - scope.$apply(function() { - if (gridster.resizable && gridster.resizable.stop) { - gridster.resizable.stop(e, $el, itemOptions); // options is the item model - } - }); - } - - var $dragHandle = null; - var unifiedInput; - - this.enable = function() { - if (!$dragHandle) { - $dragHandle = angular.element('
'); - $el.append($dragHandle); - } - - unifiedInput = new GridsterTouch($dragHandle[0], mouseDown, mouseMove, mouseUp); - unifiedInput.enable(); - }; - - this.disable = function() { - if ($dragHandle) { - $dragHandle.remove(); - $dragHandle = null; - } - - unifiedInput.disable(); - unifiedInput = undefined; - }; - - this.destroy = function() { - this.disable(); - }; - } - - var handles = []; - var handlesOpts = gridster.resizable.handles; - if (typeof handlesOpts === 'string') { - handlesOpts = gridster.resizable.handles.split(','); - } - var enabled = false; - - for (var c = 0, l = handlesOpts.length; c < l; c++) { - handles.push(new ResizeHandle(handlesOpts[c])); - } - - this.enable = function() { - if (enabled) { - return; - } - for (var c = 0, l = handles.length; c < l; c++) { - handles[c].enable(); - } - enabled = true; - }; - - this.disable = function() { - if (!enabled) { - return; - } - for (var c = 0, l = handles.length; c < l; c++) { - handles[c].disable(); - } - enabled = false; - }; - - this.toggle = function(enabled) { - if (enabled) { - this.enable(); - } else { - this.disable(); - } - }; - - this.destroy = function() { - for (var c = 0, l = handles.length; c < l; c++) { - handles[c].destroy(); - } - }; - } - return GridsterResizable; - }]) - - .factory('gridsterDebounce', function() { - return function gridsterDebounce(func, wait, immediate) { - var timeout; - return function() { - var context = this, - args = arguments; - var later = function() { - timeout = null; - if (!immediate) { - func.apply(context, args); - } - }; - var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) { - func.apply(context, args); - } - }; - }; - }) - - /** - * GridsterItem directive - * @param $parse - * @param GridsterDraggable - * @param GridsterResizable - * @param gridsterDebounce - */ - .directive('gridsterItem', ['$parse', 'GridsterDraggable', 'GridsterResizable', 'gridsterDebounce', - function($parse, GridsterDraggable, GridsterResizable, gridsterDebounce) { - return { - scope: true, - restrict: 'EA', - controller: 'GridsterItemCtrl', - controllerAs: 'gridsterItem', - require: ['^gridster', 'gridsterItem'], - link: function(scope, $el, attrs, controllers) { - var optionsKey = attrs.gridsterItem, - options; - - var gridster = controllers[0], - item = controllers[1]; - - scope.gridster = gridster; - - - // bind the item's position properties - // options can be an object specified by gridster-item="object" - // or the options can be the element html attributes object - if (optionsKey) { - var $optionsGetter = $parse(optionsKey); - options = $optionsGetter(scope) || {}; - if (!options && $optionsGetter.assign) { - options = { - row: item.row, - col: item.col, - sizeX: item.sizeX, - sizeY: item.sizeY, - minSizeX: 0, - minSizeY: 0, - maxSizeX: null, - maxSizeY: null - }; - $optionsGetter.assign(scope, options); - } - } else { - options = attrs; - } - - item.init($el, gridster); - - $el.addClass('gridster-item'); - - var aspects = ['minSizeX', 'maxSizeX', 'minSizeY', 'maxSizeY', 'sizeX', 'sizeY', 'row', 'col'], - $getters = {}; - - var expressions = []; - var aspectFn = function(aspect) { - var expression; - if (typeof options[aspect] === 'string') { - // watch the expression in the scope - expression = options[aspect]; - } else if (typeof options[aspect.toLowerCase()] === 'string') { - // watch the expression in the scope - expression = options[aspect.toLowerCase()]; - } else if (optionsKey) { - // watch the expression on the options object in the scope - expression = optionsKey + '.' + aspect; - } else { - return; - } - expressions.push('"' + aspect + '":' + expression); - $getters[aspect] = $parse(expression); - - // initial set - var val = $getters[aspect](scope); - if (typeof val === 'number') { - item[aspect] = val; - } - }; - - for (var i = 0, l = aspects.length; i < l; ++i) { - aspectFn(aspects[i]); - } - - var watchExpressions = '{' + expressions.join(',') + '}'; - - // when the value changes externally, update the internal item object - scope.$watchCollection(watchExpressions, function(newVals, oldVals) { - for (var aspect in newVals) { - var newVal = newVals[aspect]; - var oldVal = oldVals[aspect]; - if (oldVal === newVal) { - continue; - } - newVal = parseInt(newVal, 10); - if (!isNaN(newVal)) { - item[aspect] = newVal; - } - } - }); - - function positionChanged() { - // call setPosition so the element and gridster controller are updated - item.setPosition(item.row, item.col); - - // when internal item position changes, update externally bound values - if ($getters.row && $getters.row.assign) { - $getters.row.assign(scope, item.row); - } - if ($getters.col && $getters.col.assign) { - $getters.col.assign(scope, item.col); - } - } - scope.$watch(function() { - return item.row + ',' + item.col; - }, positionChanged); - - function sizeChanged() { - var changedX = item.setSizeX(item.sizeX, true); - if (changedX && $getters.sizeX && $getters.sizeX.assign) { - $getters.sizeX.assign(scope, item.sizeX); - } - var changedY = item.setSizeY(item.sizeY, true); - if (changedY && $getters.sizeY && $getters.sizeY.assign) { - $getters.sizeY.assign(scope, item.sizeY); - } - - if (changedX || changedY) { - item.gridster.moveOverlappingItems(item); - gridster.layoutChanged(); - scope.$broadcast('gridster-item-resized', item); - } - } - - scope.$watch(function() { - return item.sizeY + ',' + item.sizeX + ',' + item.minSizeX + ',' + item.maxSizeX + ',' + item.minSizeY + ',' + item.maxSizeY; - }, sizeChanged); - - var draggable = new GridsterDraggable($el, scope, gridster, item, options); - var resizable = new GridsterResizable($el, scope, gridster, item, options); - - var updateResizable = function() { - resizable.toggle(!gridster.isMobile && gridster.resizable && gridster.resizable.enabled); - }; - updateResizable(); - - var updateDraggable = function() { - draggable.toggle(!gridster.isMobile && gridster.draggable && gridster.draggable.enabled); - }; - updateDraggable(); - - scope.$on('gridster-draggable-changed', updateDraggable); - scope.$on('gridster-resizable-changed', updateResizable); - scope.$on('gridster-resized', updateResizable); - scope.$on('gridster-mobile-changed', function() { - updateResizable(); - updateDraggable(); - }); - - function whichTransitionEvent() { - var el = document.createElement('div'); - var transitions = { - 'transition': 'transitionend', - 'OTransition': 'oTransitionEnd', - 'MozTransition': 'transitionend', - 'WebkitTransition': 'webkitTransitionEnd' - }; - for (var t in transitions) { - if (el.style[t] !== undefined) { - return transitions[t]; - } - } - } - - var debouncedTransitionEndPublisher = gridsterDebounce(function() { - scope.$apply(function() { - scope.$broadcast('gridster-item-transition-end', item); - }); - }, 50); - - if(whichTransitionEvent()){ //check for IE8, as it evaluates to null - $el.on(whichTransitionEvent(), debouncedTransitionEndPublisher); - } - - scope.$broadcast('gridster-item-initialized', item); - - return scope.$on('$destroy', function() { - try { - resizable.destroy(); - draggable.destroy(); - } catch (e) {} - - try { - gridster.removeItem(item); - } catch (e) {} - - try { - item.destroy(); - } catch (e) {} - }); - } - }; - } - ]) - - .directive('gridsterNoDrag', function() { - return { - restrict: 'A', - link: function(scope, $element) { - $element.addClass('gridster-no-drag'); - } - }; - }) - - ; - -})); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js deleted file mode 100644 index 3ca3db7d..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js +++ /dev/null @@ -1,168 +0,0 @@ -/** -* FileName ui-gridster -* Version 0.0.1 -* Build number ad58c6f4f8f8fd7f04ac457f95d76f09 -* Date 08/17/2015 -*/ - - -(function(angular, window){ -angular.module("att.gridster", ["att.gridster.tpls", "att.gridster.utilities","att.gridster.gridster"]); -angular.module("att.gridster.tpls", ["template/gridster/gridster.html","template/gridster/gridsterItem.html","template/gridster/gridsterItemBody.html","template/gridster/gridsterItemFooter.html","template/gridster/gridsterItemHeader.html"]); -angular.module('att.gridster.utilities', []) - .factory('$extendObj', [function() { - var _extendDeep = function(dst) { - angular.forEach(arguments, function(obj) { - if (obj !== dst) { - angular.forEach(obj, function(value, key) { - if (dst[key] && dst[key].constructor && dst[key].constructor === Object) { - _extendDeep(dst[key], value); - } else { - dst[key] = value; - } - }); - } - }); - return dst; - }; - return { - extendDeep: _extendDeep - }; - }]); - -angular.module('att.gridster.gridster', ['attGridsterLib', 'att.gridster.utilities']) - .config(['$compileProvider', function($compileProvider) { - $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/); - }]) - .constant('attGridsterConfig', - { - columns: 3, - margins: [10, 10], - outerMargin: true, - pushing: true, - floating: true, - swapping: true, - draggable: { - enabled: true - } - }) - .directive('attGridster', ['attGridsterConfig', '$extendObj', function(attGridsterConfig, $extendObj) { - return { - restrict: 'EA', - scope: { - attGridsterOptions: '=?' - }, - templateUrl: 'template/gridster/gridster.html', - replace: false, - transclude: true, - controller: [function() {}], - link: function(scope) { - if (angular.isDefined(scope.attGridsterOptions)) { - attGridsterConfig = $extendObj.extendDeep(attGridsterConfig, scope.attGridsterOptions); - } - scope.attGridsterConfig = attGridsterConfig; - } - }; - }]) - .directive('attGridsterItem', ['$timeout', function($timeout) { - return { - restrict: 'EA', - require: ['^attGridster'], - scope: { - attGridsterItem: '=' - }, - templateUrl: 'template/gridster/gridsterItem.html', - replace: false, - transclude: true, - controller: [function() {}] - }; - }]) - .directive('attGridsterItemHeader', [function() { - return { - restrict: 'EA', - require: ['^attGridsterItem'], - scope: { - headerText: '@', - subHeaderText: '@?' - }, - templateUrl: 'template/gridster/gridsterItemHeader.html', - replace: true, - transclude: true, - link: function(scope, element) { - if (angular.isDefined(scope.subHeaderText) && scope.subHeaderText) { - angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("tabindex", "0"); - angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("aria-label", scope.subHeaderText); - } - } - }; - }]) - .directive('attGridsterItemBody', [function() { - return { - restrict: 'EA', - require: ['^attGridsterItem'], - scope: {}, - templateUrl: 'template/gridster/gridsterItemBody.html', - replace: true, - transclude: true - }; - }]) - .directive('attGridsterItemFooter', ['$location', function($location) { - return { - restrict: 'EA', - require: ['^attGridsterItem'], - scope: { - attGridsterItemFooterLink: '@?' - }, - templateUrl: 'template/gridster/gridsterItemFooter.html', - replace: true, - transclude: true, - controller: ['$scope', function($scope) { - $scope.clickOnFooterLink = function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - if ($scope.attGridsterItemFooterLink) { - $location.url($scope.attGridsterItemFooterLink); - } - }; - }], - link: function(scope, element) { - if (angular.isDefined(scope.attGridsterItemFooterLink) && scope.attGridsterItemFooterLink) { - element.attr("role", "link"); - } - } - }; - }]); -angular.module("template/gridster/gridster.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/gridster/gridster.html", - "
"); -}]); - -angular.module("template/gridster/gridsterItem.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/gridster/gridsterItem.html", - "
"); -}]); - -angular.module("template/gridster/gridsterItemBody.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/gridster/gridsterItemBody.html", - "
"); -}]); - -angular.module("template/gridster/gridsterItemFooter.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/gridster/gridsterItemFooter.html", - "
\n" + - " \n" + - "
"); -}]); - -angular.module("template/gridster/gridsterItemHeader.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/gridster/gridsterItemHeader.html", - "
\n" + - " \"||\"\n" + - " {{headerText}}\n" + - " {{subHeaderText}}\n" + - "
\n" + - "
"); -}]); - -return {} -})(angular, window); \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/adminController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/adminController.js deleted file mode 100644 index a99be9fe..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/adminController.js +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.config(function($routeProvider) { - $routeProvider - - - .when('/role_function_list', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/role_function_list.html', - controller: 'roleFunctionListController' - }) - - .when('/admin_menu_edit', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/admin_menu_edit.html', - controller: 'AdminMenuEditController' - }) - .when('/role/:roleId', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/role.html', - controller: 'roleController' - }) - .when('/jcs_admin', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/jcs_admin.html', - controller: 'cacheAdminController' - }) - .when('/broadcast_list', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/broadcast_list.html', - controller: 'broadcastListController' - }) - .when('/broadcast/:messageLocationId/:messageLocation/:messageId', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/broadcast.html', - controller: 'broadcastController' - }) - .when('/broadcast/:messageLocationId/:messageLocation', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/broadcast.html', - controller: 'broadcastController' - }) - .when('/collaborate_list', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/collaborate_list.html', - controller: 'collaborateListController' - }) - .when('/usage_list', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/usage_list.html', - controller: 'usageListController' - }) - .otherwise({ - templateUrl: 'app/fusion/scripts/view-models/profile-page/role_list.html', - controller : "roleListController" - }); -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/admin_menu_edit.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/admin_menu_edit.js deleted file mode 100644 index 54d58a45..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/admin_menu_edit.js +++ /dev/null @@ -1,230 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('AdminMenuEditController', function ($scope, AdminService, modalService, $modal, $route){ - $( "#dialog" ).hide(); - -/* AdminService.getRoleFunctionList().then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions); - - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - });*/ - $scope.init = function () { - $scope.numberOfRecordstoShow=20; - AdminService.getFnMenuItems().then(function(data){ - var j = data; - $scope.data =JSON.parse(j.data); - $scope.fnMenuItems =($scope.data.fnMenuItems); - - },function(error){ - console.log("failed"); - //reloadPageOnce(); - }); - } - $scope.init(); - $scope.mapActiveStatus = function(status){ - if(status) - status = "Y"; - else - status = "N"; - return status; - - }; - - - $scope.addNewFnMenuItemModalPopup = function(availableFnMenuItem) { - $scope.editFnMenuItem = null; - var modalInstance = $modal.open({ - templateUrl: 'fn_menu_add_popup.html', - controller: 'fn_menu_popupController', - resolve: { - message: function () { - var message = { - availableFnMenuItem: $scope.editFnMenuItem - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.availableFnMenuItems=response.availableFnMenuItems; - $route.reload(); - }); - }; - - $scope.removeMenuItem = function(fnMenuItem) { - modalService.popupConfirmWin("Confirm","You are about to delete the menu item "+fnMenuItem.label+". Do you want to continue?", - function(){ - var uuu = "admin_fn_menu/removeMenuItem.htm"; - var postData={fnMenuItem: fnMenuItem}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.fnMenuItem=data.fnMenuItem;}); - $route.reload(); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - - }; - - $scope.editRoleFunction = null; - var dialog = null; - $scope.editRoleFunctionPopup = function(availableRoleFunction) { - $scope.editRoleFunction = availableRoleFunction; - $( "#dialog" ).dialog({ - modal: true - }); - }; - - $scope.editMenuItemModalPopup = function(availableFnMenuItem) { - $scope.editFnMenuItem = availableFnMenuItem; - var modalInstance = $modal.open({ - templateUrl: 'fn_menu_add_popup.html', - controller: 'fn_menu_popupController', - resolve: { - message: function () { - var message = { - availableFnMenuItem: $scope.editFnMenuItem - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - $scope.availableFnMenuItems=response.availableFnMenuItems; - $route.reload(); - }); - }; - - $scope.editRoleFunctionModalPopup = function(availableRoleFunction) { - $scope.editRoleFunction = availableRoleFunction; - var modalInstance = $modal.open({ - templateUrl: 'edit_role_function_popup.html', - controller: 'rolefunctionpopupController', - resolve: { - message: function () { - var message = { - availableRoleFunction: $scope.editRoleFunction - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.availableRoleFunctions=response.availableRoleFunctions; - }); - }; - - $scope.addNewRoleFunctionModalPopup = function(availableRoleFunction) { - $scope.editRoleFunction = null; - var modalInstance = $modal.open({ - templateUrl: 'edit_role_function_popup.html', - controller: 'rolefunctionpopupController', - resolve: { - message: function () { - var message = { - availableRoleFunction: $scope.editRoleFunction - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.availableRoleFunctions=response.availableRoleFunctions; - }); - }; - - $scope.addNewRoleFunctionPopup = function() { - $scope.editRoleFunction = null; - $( "#dialog" ).dialog({ - modal: true - }); - }; - - $scope.saveRoleFunction = function(availableRoleFunction) { - var uuu = "role_function_list/saveRoleFunction.htm"; - var postData={availableRoleFunction: availableRoleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.availableRoleFunctions=[];$scope.$apply(); - $scope.availableRoleFunctions=data.availableRoleFunctions;}); - //alert("Update Successful.") ; - console.log($scope.availableRoleFunctions); - - $scope.editRoleFunction = null; - $( "#dialog" ).dialog("close"); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - }; - - - $scope.removeRole = function(availableRoleFunction) { - modalService.popupConfirmWin("Confirm","You are about to delete the role function "+availableRoleFunction.name+". Do you want to continue?", - function(){ - var uuu = "role_function_list/removeRoleFunction.htm"; - var postData={availableRoleFunction: availableRoleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.availableRoleFunctions=data.availableRoleFunctions;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - - }; - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js deleted file mode 100644 index 45fc31ac..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js +++ /dev/null @@ -1,22 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('aseCtrl', function ($scope){ -/* do nothing yet*/ -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js deleted file mode 100644 index 77ee22f5..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js +++ /dev/null @@ -1,79 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('broadcastController', function ($scope, modalService, $modal,AdminService,$routeParams){ - //$scope.broadcastMessage=${broadcastMessage}; - //$scope.broadcastSites=${broadcastSites}; - //console.log($scope.broadcastMessage); - $scope.broadcastMessage=[]; - $scope.broadcastSites=[]; - AdminService.getBroadcast($routeParams.messageLocationId, $routeParams.messageLocation, $routeParams.messageId).then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.broadcastMessage=JSON.parse($scope.data.broadcastMessage); - $scope.broadcastSites=JSON.parse($scope.data.broadcastSites); - console.log($scope.broadcastMessage); - console.log($scope.broadcastMessage.id); - console.log($scope.broadcastSites); - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.save = function() { - var uuu = "broadcast/save"; - var postData={broadcastMessage: $scope.broadcastMessage}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - window.location.href = "admin#/broadcast_list"; - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - }; - - $scope.close = function() { - window.location.href = "admin#/broadcast_list"; -}; - -}); - -$(function() { - $( "#startDatepicker" ).datepicker(); - $( "#endDatepicker" ).datepicker(); - - $( "#startDatepicker" ).change(function() { - var tempStartDate = moment($( "#startDatepicker" ).val()).format('YYYY-MM-DD hh:mm:ss.S'); - $( "#startDateHidden" ).val(tempStartDate.toString()); - //alert( $( "#startDateHidden" ).val() ); - }); - $( "#endDatepicker" ).change(function() { - var tempEndDate = moment($( "#endDatepicker" ).val()).format('YYYY-MM-DD hh:mm:ss.S'); - $( "#endDateHidden" ).val(tempEndDate.toString()); - //alert( $( "#endDateHidden" ).val() ); - }); -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js deleted file mode 100644 index cb10a29b..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js +++ /dev/null @@ -1,120 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('broadcastListController', function ($scope, modalService, $modal,AdminService){ - //$scope.broadcastMessage=${broadcastMessage}; - //$scope.broadcastSites=${broadcastSites}; - //console.log($scope.broadcastMessage); - var messagesMap = {}; - AdminService.getBroadcastList().then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - $scope.messagesList=(($scope.data.messagesList===null) ? [""]:$scope.data.messagesList); - $scope.messageLocations=(($scope.data.messageLocations===null) ? [""]:$scope.data.messageLocations); - console.log("messages: "+$scope.messagesList); - console.log("location: "+$scope.messageLocations); - $.each($scope.messageLocations, function(i, a){ - //var result = []; - angular.forEach($scope.messagesList, function(value, key) { - if (key+'' === a.value+'') { - //var objsJSON = JSON.parse(value); - - $.each(value, function(i, a){ - var startDateLong = a.startDate; - var tempStartDate = new Date(startDateLong); - tempStartDate = moment(tempStartDate).format('DD MMM YYYY hh:mmA zz');//03 Jun 2013 04:15PM EDT - a.displayStartDate=tempStartDate.toString(); - - var endDateLong = a.endDate; - var tempEndDate = new Date(endDateLong); - tempEndDate = moment(tempEndDate).format('DD MMM YYYY hh:mmA zz');//03 Jun 2013 04:15PM EDT - a.displayEndDate=tempEndDate.toString(); - }); - a.messages = value; - } - }); - console.log(a.messages); - }); - - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - - $scope.editMessage = function(location) { - - editMessage(location.value, location.label); - }; - - $scope.toggleActive = function(broadcastMessage) { - - //alert('deleted'+role.name); - var uuu = "broadcast_list/toggleActive"; - var postData={broadcastMessage:broadcastMessage}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - //window.location.reload(); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while toggling: "+ data.responseText); - - } - }); - - - }; - - $scope.remove = function(broadcastMessage) { - - //alert('deleted'+role.name); - var uuu = "broadcast_list/remove"; - var postData={broadcastMessage:broadcastMessage}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - window.location.reload(); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - - }; - -}); - -function editMessage(messageLocationId, messageLocation, messageId) { - window.location='admin#/broadcast/'+messageLocationId + '/' + messageLocation + ((messageId != null) ? '/' + messageId : ''); -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js deleted file mode 100644 index 5b0b9342..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller("collaborateListController", function ($scope,$http,modalService, $modal,AdminService) { - // Table Data - AdminService.getCollaborateList().then(function(data){ - - var j = data; - $scope.tableData = JSON.parse(j.data); - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.viewPerPage = 20; - $scope.scrollViewsPerPage = 2; - $scope.currentPage = 1; - $scope.totalPage; - $scope.searchCategory = ""; - $scope.searchString = ""; - /* modalService.showSuccess('','Modal Sample') ; */ - for(x in $scope.tableData){ - if($scope.tableData[x].active_yn=='Y') - $scope.tableData[x].active_yn=true; - else - $scope.tableData[x].active_yn=false; - } - $scope.openCollaboration = function(chatId){ - openInNewTab('collaboration?chat_id=' + chatId); - } - - $scope.toggleProfileActive = function(profileId) { - modalService.popupConfirmWin("Confirm","You are about to change user's active status. Do you want to continue?", - function(){ - $http.get("profile/toggleProfileActive?profile_id="+profileId).success(function(){}); - - }) - }; - -}); - -function openInNewTab(url) { - var win = window.open(url, '_blank'); - win.focus(); -}; diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/fn_menu_add_popup_controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/fn_menu_add_popup_controller.js deleted file mode 100644 index e0179946..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/fn_menu_add_popup_controller.js +++ /dev/null @@ -1,281 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -var fn_menu_popupController = function ($scope, $modalInstance, message, $http){ /// examine the LeftMenuService - if(message.availableFnMenuItem==null) - $scope.label='Add New Menu Item' - - else{ - $scope.label='Edit Menu Item' - //$scope.disableParentId=true; - } - - $scope.getParentData = function(){ - var uuu = "admin_fn_menu/get_parent_list" - $.ajax({ - type : 'GET', - url : uuu, - dataType: 'json', // data type expected from server - contentType: 'application/json', - //data: JSON.stringify(postData), // data type sent to server - success : function(data){ - $scope.$apply(function(){ - //$scope.availableRoleFunctions=[];$scope.$apply(); - $scope.parentListSelectData=data; // data from server - menuItems = $scope.parentListSelectData; - var heirarchicalMenuItems = []; - var children = []; - for ( var i=0; i b[prop]) { - return 1; - } else if (a[prop] < b[prop]) { - return -1; - } - return 0; - } - - }; - - $scope.getParentLabel = function(parentId, parentListSelectData){ - var element; - element = parentListSelectData[0]; - for (var i=0; i=0) - $scope.importProfileList.splice(index, 1); - } - }; - - $scope.prepareProfileSelection = function() { - if($scope.importProfileList) - $.each($scope.importProfileList, function(i, profile){ - $scope.preparePostSearchBean(profile); - }); - ; - } - - $scope.preparePostSearchBean = function(profile) { - //console.log('Importing: '+profile.orgUserId); - //console.log('ngexistinguser:'+$scope.ngexistingUsers[profile.orgUserId]) - if($scope.postSearchBean.selected==null){ - $scope.postSearchBean.selected=[]; - $scope.postSearchBean.postOrgUserId=[]; - $scope.postSearchBean.postHrid=[]; - $scope.postSearchBean.postFirstName=[]; - $scope.postSearchBean.postLastName=[]; - $scope.postSearchBean.postOrgCode=[]; - $scope.postSearchBean.postPhone=[]; - $scope.postSearchBean.postEmail=[]; - $scope.postSearchBean.postAddress1=[]; - $scope.postSearchBean.postAddress2=[]; - $scope.postSearchBean.postCity=[]; - $scope.postSearchBean.postState=[]; - $scope.postSearchBean.postZipCode=[]; - $scope.postSearchBean.postLocationClli=[]; - $scope.postSearchBean.postBusinessCountryCode=[]; - $scope.postSearchBean.postBusinessCountryName=[]; - $scope.postSearchBean.postDepartment=[]; - $scope.postSearchBean.postDepartmentName=[]; - $scope.postSearchBean.postBusinessUnit=[]; - $scope.postSearchBean.postBusinessUnitName=[]; - $scope.postSearchBean.postJobTitle=[]; - $scope.postSearchBean.postOrgManagerUserId=[]; - $scope.postSearchBean.postCommandChain=[]; - $scope.postSearchBean.postCompanyCode=[]; - $scope.postSearchBean.postCompany=[]; - $scope.postSearchBean.postCostCenter=[]; - $scope.postSearchBean.postSiloStatus=[]; - $scope.postSearchBean.postFinancialLocCode=[]; - } - - $scope.postSearchBean.selected.push(profile.orgUserId); - $scope.postSearchBean.postOrgUserId.push(profile.orgUserId); - $scope.postSearchBean.postHrid.push(profile.hrid); - $scope.postSearchBean.postFirstName.push(profile.firstName); - $scope.postSearchBean.postLastName.push(profile.lastName); - $scope.postSearchBean.postOrgCode.push(profile.orgCode); - $scope.postSearchBean.postPhone.push(profile.phone); - $scope.postSearchBean.postEmail.push(profile.email); - $scope.postSearchBean.postAddress1.push(profile.address1); - $scope.postSearchBean.postAddress2.push(profile.address2); - $scope.postSearchBean.postCity.push(profile.city); - $scope.postSearchBean.postState.push(profile.state); - if(profile.zipCodeSuffix==null) - $scope.postSearchBean.postZipCode.push(profile.zipCode); - else - $scope.postSearchBean.postZipCode.push(profile.zipCode+'-'+profile.zipCodeSuffix); - $scope.postSearchBean.postLocationClli.push(profile.locationClli); - $scope.postSearchBean.postBusinessCountryCode.push(profile.businessCountryCode); - $scope.postSearchBean.postBusinessCountryName.push(profile.businessCountryName); - $scope.postSearchBean.postDepartment.push(profile.department); - $scope.postSearchBean.postDepartmentName.push(profile.departmentName); - $scope.postSearchBean.postBusinessUnit.push(profile.businessUnit); - $scope.postSearchBean.postBusinessUnitName.push(profile.businessUnitName); - $scope.postSearchBean.postJobTitle.push(profile.jobTitle); - $scope.postSearchBean.postOrgManagerUserId.push(profile.orgManagerUserId); - $scope.postSearchBean.postCommandChain.push(profile.commandChain); - $scope.postSearchBean.postCompanyCode.push(profile.companyCode); - $scope.postSearchBean.postCompany.push(profile.company); - $scope.postSearchBean.postCostCenter.push(profile.costCenter); - $scope.postSearchBean.postSiloStatus.push(profile.siloStatus); - $scope.postSearchBean.postFinancialLocCode.push(profile.financialLocCode); - }; - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-controller.js deleted file mode 100644 index aa0066b0..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-controller.js +++ /dev/null @@ -1,286 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('profileController', function ($scope,$http,ProfileService,$routeParams,modalService){ - $scope.tableData=[]; - $scope.profile=[]; - $scope.ociavailableRoles=[]; - $scope.ociTimeZones; - $scope.ociCountries; - var stateList=[]; - $scope.availableRoles = []; - $scope.timeZones = []; - $scope.selectedTimeZone = null; - $scope.countries = []; - $scope.selectedCountry = null; - - ProfileService.getProfileDetail($routeParams.profileId).then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.profile =JSON.parse($scope.data.profile); - $scope.ociavailableRoles =JSON.parse($scope.data.availableRoles); - $scope.ociTimeZones=JSON.parse($scope.data.timeZones); - $scope.ociCountries=JSON.parse($scope.data.countries); - stateList=JSON.parse($scope.data.stateList); - $scope.orgUserId=$scope.profile.orgUserId; - $scope.orgManagerUserId=$scope.profile.orgManagerUserId; - - - if($scope.ociavailableRoles) - $.each($scope.ociavailableRoles, function(i, a){ - var availableRole = a; - availableRole.selected = false; - $.each($scope.profile.roles, function(j, b){ - if(a.id === b.id) { - availableRole.selected = true; - } - }); - $scope.availableRoles.push(availableRole); - }); - ; - - /*$scope.ociTimeZones = ${model.timeZones};*/ - - if($scope.ociTimeZones){ - $.each($scope.ociTimeZones, function(i, a){ - var timeZone = {"index":i, "value":a.value, "title":a.label}; - $scope.timeZones.push(timeZone); - if($scope.profile.timeZoneId !== null && a.value === $scope.profile.timeZoneId.toString()){ - $scope.selectedTimeZone = timeZone; - } - }); - }; - - /*$scope.ociCountries = ${model.countries};*/ - - //alert($scope.ociCountries[0].label); - if($scope.ociCountries) - $.each($scope.ociCountries, function(i, a){ - var country = {"index":i, "value":a.value, "title":a.label}; - $scope.countries.push(country); - if(a.value === $scope.profile.country){ - $scope.selectedCountry = country; - } - }); - ; - - /*var stateList=${model.stateList};*/ - //alert(stateList[0].label); - stateList = stateList== null? []: stateList; - var selectedState= $scope.profile.state ? $scope.profile.state:""; - $scope.stateList = initDropdownWithLookUp(stateList,selectedState ); - - //$scope.resetMenu(); - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - /*$scope.profile=${model.profile};*/ - $scope.orgUserId=$scope.profile.orgUserId; - $scope.orgManagerUserId=$scope.profile.orgManagerUserId; - - $scope.viewPerPage = 2; - $scope.currentPage = 1; - $scope.totalPage; - $scope.searchCategory = ""; - $scope.searchString = ""; - - $( "#dialog" ).hide(); - - /*$scope.ociavailableRoles=${model.availableRoles};*/ - //modalService.showFailure('Error','') ; - - - $scope.saveProfile = function() { - var uuu = "profile/saveProfile?profile_id=" + $routeParams.profileId; - var postData={profile: $scope.profile, - selectedCountry:$scope.selectedCountry!=null?$scope.selectedCountry.value:"", - selectedState:$scope.stateList.selected!=null?$scope.stateList.selected.value:"", - selectedTimeZone:$scope.selectedTimeZone!=null?$scope.selectedTimeZone.value:"" - }; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - modalService.showSuccess("Success","Update Successful."); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - }; - - $scope.addNewRolePopup = function(role) { - $( "#dialog" ).dialog({ - modal: true, - width: 500, - height:600 - }); - $(".ui-dialog").css("z-index",2001); - $(".ui-dialog-titlebar").hide(); - }; - - $scope.toggleRole = function(selected,availableRole) { - $scope.profileTemp=$scope.profile; - $scope.profile={}; - //alert('toggleRole: '+selected); - if(!selected) { - //remove role - var uuu = "profile/removeRole?profile_id=" + $routeParams.profileId; - modalService.popupConfirmWinWithCancel("Confirm","You are about to remove the role "+availableRole.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?", - function(){ - var postData={role:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.profile=data;}); - }, - error : function(data){ - $scope.$apply(function(){$scope.profile=$scope.profileTemp;}); - modalService.showFailure("Fail","Error while saving."); - } - }); - }, - function(){ - availableRole.selected=!availableRole.selected; - }); - - - } else { - //add role - var uuu = "profile/addNewRole?profile_id=" + $routeParams.profileId; - modalService.popupConfirmWinWithCancel("Confirm","You are about to add the role "+availableRole.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?", - function(){ - var postData={role:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.profile=data;}); - }, - error : function(data){ - $scope.$apply(function(){$scope.profile=$scope.profileTemp;}); - modalService.showFailure("Fail","Error while saving."); - } - }); - - },function(){ - availableRole.selected=!availableRole.selected; - }) - - } - - - }; - - $scope.removeRole = function(role) { - - - modalService.popupConfirmWin("Confirm","You are about to remove the role "+role.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?", - function(){ - $scope.profileTemp=$scope.profile; - $scope.profile={}; - var uuu = "profile/removeRole?profile_id=" + $routeParams.profileId; - var postData={role:role}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.profile=data; - $.each($scope.availableRoles, function(k, c){ - if(c.id === role.id) { - c.selected = false; - } - }); - }); - - }, - error : function(data){ - $scope.$apply(function(){$scope.profile=$scope.profileTemp;}); - modalService.showFailure("Fail","Error while saving."); - } - }); - - }) - - - }; - - function initDropdownWithLookUp(arr,selectedValue){ - var dropdownArray=[]; - var selected = null; - if(arr){ - for(var i = 0,l = arr.length; i < l; i++) { - var option = { - "index" : i , - "value" : arr[i].value, - "title" : arr[i].label - }; - dropdownArray.push(option); - if(arr[i].value === selectedValue){ - selected = option; - } - } - } - var dropDown={}; - dropDown.options = dropdownArray; - dropDown.selected = selected; - return dropDown; - }; - - $scope.doRolePopup = function() { - var modalInstance = $modal.open({ - templateUrl: 'roles_popup.html', - controller: 'rolepopupController', - resolve: { - message: function () { - var message ={ - availableRoles: $scope.availableRoles - }; - return message; - } - } - }); - modalInstance.result.then(function (opts) { - if(opts!=null){ - $scope.profile=opts.profile; - } - }); - } - - $scope.close = function(){ - $('#dialog').dialog('close'); - } - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-search-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-search-controller.js deleted file mode 100644 index 6da82dcc..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profile-search-controller.js +++ /dev/null @@ -1,80 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('profileSearchCtrl', function($scope, $http,ProfileService,modalService){ - - $scope.showInput = true; - $scope.totalPages1 = 5; - $scope.viewPerPage1 = 8; - $scope.currentPage1 = 1; - - $scope.$watch('viewPerPage1', function(val) { - ProfileService.getProfilePagination($scope.currentPage1, val).then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.tableData =JSON.parse($scope.data.profileList); - $scope.totalPages1 =JSON.parse($scope.data.totalPage); - for(x in $scope.tableData){ - if($scope.tableData[x].active_yn=='Y') - $scope.tableData[x].active_yn=true; - else - $scope.tableData[x].active_yn=false; - } - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - }); - - $scope.customHandler = function(num) { - $scope.currentPage1 = num; - ProfileService.getProfilePagination($scope.currentPage1,$scope.viewPerPage1).then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.tableData =JSON.parse($scope.data.profileList); - $scope.totalPages1 =JSON.parse($scope.data.totalPage); - for(x in $scope.tableData){ - if($scope.tableData[x].active_yn=='Y') - $scope.tableData[x].active_yn=true; - else - $scope.tableData[x].active_yn=false; - } - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - }; - - $scope.editRow = function(profileId){ - window.location = 'userProfile#/profile/' + profileId; - }; - - $scope.toggleProfileActive = function(rowData) { - modalService.popupConfirmWinWithCancel("Confirm","You are about to change user's active status. Do you want to continue?", - function(){ - $http.get("profile/toggleProfileActive?profile_id="+rowData.id).success(function(){}); - }, - function(){ - rowData.active=!rowData.active; - }) - }; - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profileController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profileController.js deleted file mode 100644 index 4b30e40e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/profileController.js +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.config(function($routeProvider) { - $routeProvider - .when('/profile/:profileId', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/profile_detail.html', - controller: 'profileController' - }) - .when('/post_search', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/post_search.html', - controller: 'postSearchCtrl' - }) - .when('/self_profile', { - templateUrl: 'app/fusion/scripts/view-models/profile-page/self_profile.html', - controller: 'selfProfileController' - }) - .otherwise({ - templateUrl: 'app/fusion/scripts/view-models/profile-page/profile_search.html', - controller : "profileSearchCtrl" - }); -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-controller.js deleted file mode 100644 index 50913af8..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-controller.js +++ /dev/null @@ -1,226 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('roleController', function ($scope, modalService, $modal, AdminService,$routeParams){ - //$scope.role=${role}; - //console.log($scope.role.roleFunctions); - - $( "#dialogRoleFunction" ).hide(); - $( "#dialogChildRole" ).hide(); - - //$scope.ociavailableRoleFunctions=${availableRoleFunctions}; - - AdminService.getRole($routeParams.roleId).then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - - $scope.role =JSON.parse($scope.data.role); - console.log($scope.role); - - $scope.ociavailableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions); - console.log($scope.ociavailableRoleFunctions); - $scope.availableRoleFunctions=[]; - - if($scope.ociavailableRoleFunctions) - $.each($scope.ociavailableRoleFunctions, function(i, a){ - var availableRoleFunction = a; - availableRoleFunction.selected = false; - $.each($scope.role.roleFunctions, function(j, b){ - if(a.code === b.code) { - availableRoleFunction.selected = true; - } - }); - $scope.availableRoleFunctions.push(availableRoleFunction); - }); - - - $scope.ociavailableRoles=JSON.parse($scope.data.availableRoles); - console.log($scope.ociavailableRoles); - console.log("testing roles if exist"); - $scope.availableRoles=[]; - - if($scope.ociavailableRoles) - $.each($scope.ociavailableRoles, function(i, a){ - var availableRole = a; - availableRole.selected = false; - if($scope.role.childRoles){ - $.each($scope.role.childRoles, function(j, b){ - if(a.id === b.id) { - availableRole.selected = true; - } - }); - }; - $scope.availableRoles.push(availableRole); - }); - - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.saveRole = function() { - var exists = false; - for(x in $scope.availableRoles){ - console.log($scope.availableRoles[x].name); - if($scope.availableRoles[x].name==$scope.role.name){ - modalService.showFailure("Warning", "Role already exists."); - exists = true; - //$modalInstance.close({availableRoleFunctions:message.availableRoleFunctions}); - } - } - if(!exists){ - var uuu = "role/saveRole.htm?role_id="+$routeParams.roleId; - var postData={role: $scope.role, childRoles: $scope.role.childRoles, roleFunctions : $scope.role.roleFunctions}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - modalService.showSuccess("Success","Update Successful."); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while saving."); - } - }); - } - - }; - - $scope.addNewRoleFunctionModalPopup = function() { - var modalInstance = $modal.open({ - templateUrl: 'role_functions_popup.html', - controller: 'rolepopupController', - backdrop: 'static', - resolve: { - roleId: function () { - return $routeParams.roleId; - }, - role: function () { - return $scope.role; - }, - availableRoles: function () { - return $scope.ociavailableRoles; - }, - availableRoleFunctions: function () { - return $scope.ociavailableRoleFunctions; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.role=response.role; - }); - }; - - $scope.addNewChildRoleModalPopup = function() { - var modalInstance = $modal.open({ - templateUrl: 'child_roles_popup.html', - controller: 'rolepopupController', - backdrop: 'static', - resolve: { - roleId: function () { - return $routeParams.roleId; - }, - role: function () { - return $scope.role; - }, - availableRoles: function () { - return $scope.ociavailableRoles; - }, - availableRoleFunctions: function () { - return $scope.ociavailableRoleFunctions; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.role=response.role; - }); - }; - - - - $scope.removeRoleFunction = function(roleFunction) { - modalService.popupConfirmWin("Confirm","You are about to remove the role function "+roleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?", - function(){ - var uuu = "role/removeRoleFunction.htm?role_id=" + $routeParams.roleId; - var postData={roleFunction:roleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.role=data.role; - $.each($scope.availableRoleFunctions, function(k, c){ - if(c.code === roleFunction.code) { - c.selected = false; - } - }); - }); - - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }) - - }; - - $scope.removeChildRole = function(childRole) { - modalService.popupConfirmWin("Confirm","You are about to remove the child role "+childRole.name+" from the role for "+$scope.role.name+". Do you want to continue?", - function(){ - var uuu = "role/removeChildRole.htm?role_id=" + $routeParams.roleId; - var postData={childRole:childRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.role=data.role; - $.each($scope.availableRoles, function(k, c){ - if(c.id === childRole.id) { - c.selected = false; - } - }); - }); - - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }) - - }; - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-function-list-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-function-list-controller.js deleted file mode 100644 index eedac3e0..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-function-list-controller.js +++ /dev/null @@ -1,157 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('roleFunctionListController', function ($scope, AdminService, modalService, $modal){ - $( "#dialog" ).hide(); - - AdminService.getRoleFunctionList().then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions); - - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.editRoleFunction = null; - var dialog = null; - $scope.editRoleFunctionPopup = function(availableRoleFunction) { - $scope.editRoleFunction = availableRoleFunction; - $( "#dialog" ).dialog({ - modal: true - }); - }; - - $scope.editRoleFunctionModalPopup = function(availableRoleFunction) { - $scope.editRoleFunction = availableRoleFunction; - $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions; - $scope.availableRoleFunctions={}; - var modalInstance = $modal.open({ - templateUrl: 'edit_role_function_popup.html', - controller: 'rolefunctionpopupController', - resolve: { - message: function () { - var message = { - availableRoleFunction: $scope.editRoleFunction, - availableRoleFunctions: $scope.availableRoleFunctionsTemp - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - if(response!=null) - $scope.availableRoleFunctions=response.availableRoleFunctions; - else - $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp; - }); - }; - - $scope.addNewRoleFunctionModalPopup = function(availableRoleFunction) { - $scope.editRoleFunction = null; - $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions; - $scope.availableRoleFunctions={}; - var modalInstance = $modal.open({ - templateUrl: 'edit_role_function_popup.html', - controller: 'rolefunctionpopupController', - resolve: { - message: function () { - var message = { - availableRoleFunction: $scope.editRoleFunction, - availableRoleFunctions: $scope.availableRoleFunctionsTemp - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - if(response!=null) - $scope.availableRoleFunctions=response.availableRoleFunctions; - else - $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp; - }); - }; - - $scope.addNewRoleFunctionPopup = function() { - $scope.editRoleFunction = null; - $( "#dialog" ).dialog({ - modal: true - }); - }; - - $scope.saveRoleFunction = function(availableRoleFunction) { - var uuu = "role_function_list/saveRoleFunction.htm"; - var postData={availableRoleFunction: availableRoleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.availableRoleFunctions=[];$scope.$apply(); - $scope.availableRoleFunctions=data.availableRoleFunctions;}); - //alert("Update Successful.") ; - console.log($scope.availableRoleFunctions); - - $scope.editRoleFunction = null; - $( "#dialog" ).dialog("close"); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - }; - - - $scope.removeRole = function(availableRoleFunction) { - modalService.popupConfirmWin("Confirm","You are about to delete the role function "+availableRoleFunction.name+". Do you want to continue?", - function(){ - $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions; - $scope.availableRoleFunctions={}; - var uuu = "role_function_list/removeRoleFunction.htm"; - var postData={availableRoleFunction: availableRoleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.availableRoleFunctions=data.availableRoleFunctions;}); - }, - error : function(data){ - console.log(data); - $scope.$apply(function(){$scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;}); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - - }; - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-list-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-list-controller.js deleted file mode 100644 index a16d61ef..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/role-list-controller.js +++ /dev/null @@ -1,102 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('roleListController', function ($scope,AdminService,modalService){ - - AdminService.getRoles().then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - $scope.availableRoles =JSON.parse($scope.data.availableRoles); - - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - //console.log($scope.availableRoles); - $scope.toggleRole = function(selected,availableRole) { - //alert('toggleRole: '+selected); - var toggleType = null; - if(selected) { - toggleType = "activate"; - } else { - toggleType = "inactivate"; - } - - modalService.popupConfirmWinWithCancel("Confirm","You are about to "+toggleType+" the test role "+availableRole.name+". Do you want to continue?", - function(){ - var uuu = "role_list/toggleRole"; - - var postData={role:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - console.log(data); - $scope.$apply(function(){$scope.availableRoles=data.availableRoles;}); - console.log($scope.availableRoles); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while saving."); - } - }); - - }, - function(){ - availableRole.active=!availableRole.active; - }) - - - }; - - $scope.removeRole = function(role) { - - modalService.popupConfirmWin("Confirm","You are about to delete the role "+role.name+". Do you want to continue?", - function(){ - var uuu = "role_list/removeRole"; - var postData={role:role}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.availableRoles=data.availableRoles;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - - - }; - - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolefunctionpopupController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolefunctionpopupController.js deleted file mode 100644 index 14aea22c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolefunctionpopupController.js +++ /dev/null @@ -1,84 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -var rolefunctionpopupController = function ($scope, modalService, $modalInstance, message, $http,AdminService){ - if(message.availableRoleFunction==null) { - $scope.label='Add Role Function'; - var tempText = ""; - } - else{ - $scope.label='Edit Role Function' - $scope.disableCd=true; - var tempText = new String(message.availableRoleFunction.name); - $scope.editRoleFunction = message.availableRoleFunction; - } - - $scope.tempText = tempText; - - $scope.saveRoleFunction = function(availableRoleFunction) { - var uuu = "role_function_list/saveRoleFunction.htm"; - var postData={availableRoleFunction: availableRoleFunction}; - - if(availableRoleFunction==null){ - modalService.showFailure("Warning", "Please enter valid role function details."); - } - var exists = false; - for(x in message.availableRoleFunctions){ - console.log(message.availableRoleFunctions[x].name); - if(message.availableRoleFunctions[x].name==availableRoleFunction.name){ - modalService.showFailure("Warning", "Role Function already exists."); - exists = true; - availableRoleFunction.name = $scope.tempText; - } - } - - if(!exists && availableRoleFunction.name.trim() != '' && availableRoleFunction.code.trim() != ''){ - $http.post(uuu, JSON.stringify(postData)).then(function(res){ - console.log("data"); -// console.log(res.data); -// $scope.availableRoleFunctionsTemp = res.data.availableRoleFunctions; - AdminService.getRoleFunctionList().then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions); - - //$scope.resetMenu(); - $modalInstance.close(); - },function(error){ - console.log("failed"); - reloadPageOnce(); - $modalInstance.close(); - }); - - - }); - - - - - } - }; - - - - $scope.close = function() { - $modalInstance.close(); - }; -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolepopupmodelController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolepopupmodelController.js deleted file mode 100644 index f8ecfadd..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/rolepopupmodelController.js +++ /dev/null @@ -1,205 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -var rolepopupController = function ($scope, $modalInstance, role, roleId, availableRoles, availableRoleFunctions,AdminService,modalService){ - - $scope.role = role; - console.log($scope.role); - if($scope.role.childRoles==null){ - $scope.role.childRoles=[]; - } - - $scope.ociavailableRoles=availableRoles; - console.log($scope.ociavailableRoles); - - $scope.availableRoles=[]; - if($scope.ociavailableRoles) - $.each($scope.ociavailableRoles, function(i, a){ - var availableRole = a; - availableRole.selected = false; - if($scope.role.childRoles){ - $.each($scope.role.childRoles, function(j, b){ - if(a.id === b.id) { - availableRole.selected = true; - } - }); - }; - $scope.availableRoles.push(availableRole); - }); - - $scope.ociavailableRoleFunctions = availableRoleFunctions; - console.log($scope.ociavailableRoleFunctions); - $scope.availableRoleFunctions = []; - if($scope.ociavailableRoleFunctions) - $.each($scope.ociavailableRoleFunctions, function(i, a){ - var availableRoleFunction = a; - availableRoleFunction.selected = false; - $.each($scope.role.roleFunctions, function(j, b){ - if(a.code === b.code) { - availableRoleFunction.selected = true; - } - }); - $scope.availableRoleFunctions.push(availableRoleFunction); - }); - //$scope.resetMenu(); - - $scope.toggleRoleFunction = function(selected,availableRoleFunction) { - //alert('toggleRole: '+selected); - - if(!selected) { - //remove role function - if(role.id==null){ - var index = $scope.role.roleFunctions.indexOf(availableRoleFunction); - if(index>=0) - $scope.role.roleFunctions.splice(index, 1); - return; - } - var uuu = "role/removeRoleFunction.htm?role_id=" + roleId; - modalService.popupConfirmWinWithCancel("Confirm","You are about to remove the role function "+availableRoleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?", - function(){ - var postData={roleFunction:availableRoleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.role=data.role;}); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }, - function(){ - availableRoleFunction.selected=!availableRoleFunction.selected; - }) - - } else { - //add role function - if(role.id==null){ - $scope.role.roleFunctions.push(availableRoleFunction); - return; - } - var uuu = "role/addRoleFunction.htm?role_id=" + roleId; - - modalService.popupConfirmWinWithCancel("Confirm","You are about to add the role function "+availableRoleFunction.name+" to the role for "+$scope.role.name+". Do you want to continue?", - function(){ - var postData={roleFunction:availableRoleFunction}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.role=data.role;}); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }, - function(){ - availableRoleFunction.selected=!availableRoleFunction.selected; - }) - } - - - }; - - $scope.toggleChildRole = function(selected,availableRole) { - //alert('toggleRole: '+selected); - - if(!selected) { - //remove role - if(role.id==null){ - var index = $scope.role.childRoles.indexOf(availableRole); - if(index>=0) - $scope.role.childRoles.splice(index, 1); - return; - } - var uuu = "role/removeChildRole.htm?role_id=" + roleId; - - modalService.popupConfirmWinWithCancel("Confirm","You are about to remove the child role "+availableRole.name+" from the role for "+$scope.role.name+". Do you want to continue?", - function(){ - var postData={childRole:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - console.log('role',data.role); - $scope.$apply(function(){$scope.role=data.role;}); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }, - function(){ - availableRole.selected=true; - }) - - } else { - //add role - if(role.id==null){ - $scope.role.childRoles.push(availableRole); - return; - } - var uuu = "role/addChildRole.htm?role_id=" + roleId; - - modalService.popupConfirmWinWithCancel("Confirm","You are about to add the child role "+availableRole.name+" to the role for "+$scope.role.name+". Do you want to continue?", - function(){ - var postData={childRole:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.role=data.role;}); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }, - function(){ - availableRole.selected=false; - }) - } - - - }; - - $scope.close = function() { - console.log('role', $scope.role); - $modalInstance.close({role:$scope.role}); - }; - -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/self-profile-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/self-profile-controller.js deleted file mode 100644 index b82dae30..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/self-profile-controller.js +++ /dev/null @@ -1,284 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('selfProfileController', function ($scope,$http,ProfileService,$routeParams,modalService){ - $scope.tableData=[]; - $scope.profile=[]; - $scope.ociavailableRoles=[]; - $scope.ociTimeZones; - $scope.ociCountries; - var stateList=[]; - $scope.availableRoles = []; - $scope.timeZones = []; - $scope.selectedTimeZone = null; - $scope.countries = []; - $scope.selectedCountry = null; - $scope.isUserSystemAdmin = false; - - ProfileService.getSelfProfileDetail().then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.profile =JSON.parse($scope.data.profile); - $scope.profileId = $scope.profile.id; - $scope.ociavailableRoles =JSON.parse($scope.data.availableRoles); - $scope.ociTimeZones=JSON.parse($scope.data.timeZones); - $scope.ociCountries=JSON.parse($scope.data.countries); - stateList=JSON.parse($scope.data.stateList); - $scope.orgUserId=$scope.profile.orgUserId; - $scope.orgManagerUserId=$scope.profile.orgManagerUserId; - - if($scope.ociavailableRoles) - $.each($scope.ociavailableRoles, function(i, a){ - var availableRole = a; - availableRole.selected = false; - $.each($scope.profile.roles, function(j, b){ - if(a.id === b.id) { - availableRole.selected = true; - if(a.id === 1){ - $scope.isUserSystemAdmin = true; - } - } - }); - $scope.availableRoles.push(availableRole); - }); - ; - - /*$scope.ociTimeZones = ${model.timeZones};*/ - - if($scope.ociTimeZones){ - $.each($scope.ociTimeZones, function(i, a){ - var timeZone = {"index":i, "value":a.value, "title":a.label}; - $scope.timeZones.push(timeZone); - if($scope.profile.timeZoneId !== null && a.value === $scope.profile.timeZoneId.toString()){ - $scope.selectedTimeZone = timeZone; - } - }); - }; - - /*$scope.ociCountries = ${model.countries};*/ - - //alert($scope.ociCountries[0].label); - if($scope.ociCountries) - $.each($scope.ociCountries, function(i, a){ - var country = {"index":i, "value":a.value, "title":a.label}; - $scope.countries.push(country); - if(a.value === $scope.profile.country){ - $scope.selectedCountry = country; - } - }); - ; - - /*var stateList=${model.stateList};*/ - //alert(stateList[0].label); - stateList = stateList== null? []: stateList; - var selectedState= $scope.profile.state ? $scope.profile.state:""; - $scope.stateList = initDropdownWithLookUp(stateList,selectedState ); - - //$scope.resetMenu(); - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - /*$scope.profile=${model.profile};*/ - $scope.orgUserId=$scope.profile.orgUserId; - $scope.orgManagerUserId=$scope.profile.orgManagerUserId; - - $scope.viewPerPage = 2; - $scope.currentPage = 1; - $scope.totalPage; - $scope.searchCategory = ""; - $scope.searchString = ""; - - $( "#dialog" ).hide(); - - /*$scope.ociavailableRoles=${model.availableRoles};*/ - //modalService.showFailure('Error','') ; - - - $scope.saveProfile = function() { - var uuu = "profile/saveProfile?profile_id=" + $scope.profileId;; - var postData={profile: $scope.profile, - selectedCountry:$scope.selectedCountry!=null?$scope.selectedCountry.value:"", - selectedState:$scope.stateList.selected!=null?$scope.stateList.selected.value:"", - selectedTimeZone:$scope.selectedTimeZone!=null?$scope.selectedTimeZone.value:"" - }; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - modalService.showSuccess("Success","Update Successful."); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - }; - - $scope.addNewRolePopup = function(role) { - $( "#dialog" ).dialog({ - modal: true, - width: 500, - height:600 - }); - - $(".ui-dialog").css("z-index",10002); - $(".ui-dialog-titlebar").hide(); - }; - - $scope.toggleRole = function(selected,availableRole) { - //alert('toggleRole: '+selected); - if(!selected) { - //remove role - var uuu = "profile/removeRole?profile_id=" + $scope.profileId;; - modalService.popupConfirmWinWithCancel("Confirm","You are about to remove the role "+availableRole.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?", - function(){ - var postData={role:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.profile=data;}); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - }, - function(){ - availableRole.selected=!availableRole.selected; - }); - - - } else { - //add role - var uuu = "profile/addNewRole?profile_id=" + $scope.profileId;; - modalService.popupConfirmWinWithCancel("Confirm","You are about to add the role "+availableRole.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?", - function(){ - var postData={role:availableRole}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.profile=data;}); - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - },function(){ - availableRole.selected=!availableRole.selected; - }) - - } - - - }; - - $scope.removeRole = function(role) { - - - modalService.popupConfirmWin("Confirm","You are about to remove the role "+role.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?", - function(){ - var uuu = "profile/removeRole?profile_id=" + $scope.profileId;; - var postData={role:role}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.profile=data; - $.each($scope.availableRoles, function(k, c){ - if(c.id === role.id) { - c.selected = false; - } - }); - }); - - }, - error : function(data){ - modalService.showFailure("Fail","Error while saving."); - } - }); - - }) - - - }; - - function initDropdownWithLookUp(arr,selectedValue){ - var dropdownArray=[]; - var selected = null; - if(arr){ - for(var i = 0,l = arr.length; i < l; i++) { - var option = { - "index" : i , - "value" : arr[i].value, - "title" : arr[i].label - }; - dropdownArray.push(option); - if(arr[i].value === selectedValue){ - selected = option; - } - } - } - var dropDown={}; - dropDown.options = dropdownArray; - dropDown.selected = selected; - return dropDown; - }; - - $scope.doRolePopup = function() { - var modalInstance = $modal.open({ - templateUrl: 'roles_popup.html', - controller: 'rolepopupController', - resolve: { - message: function () { - var message ={ - availableRoles: $scope.availableRoles - }; - return message; - } - } - }); - modalInstance.result.then(function (opts) { - if(opts!=null){ - $scope.profile=opts.profile; - } - }); - } - - $scope.close = function(){ - $('#dialog').dialog('close'); - } - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/usage-list-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/usage-list-controller.js deleted file mode 100644 index b495b934..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/usage-list-controller.js +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('usageListController', function ($scope,$interval,$http,$modal,modalService,AdminService){ - - AdminService.getUsageList().then(function(data){ - - var j = data; - $scope.data = JSON.parse(j.data); - $scope.users =$scope.data; - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.removeSession = function(sessionId) { - modalService.popupConfirmWin("Confirm","You are about to expel this user from the application. All of their unsaved data will be lost. Do you want to continue?", - function(){ - $http.get("usage_list/removeSession?deleteSessionId="+sessionId).success(function(response){$scope.users=response;}); - }) - - } -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowApp.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowApp.js deleted file mode 100644 index 0a5c8019..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowApp.js +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -angular.module('att.abs.helper', []); -angular.module('quantum', []); - -var app=angular.module("workflowApp", ["att.abs", "att.abs.helper","modalServices", - "att.gridster","checklist-model","ngRoute", "ui.bootstrap"]); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowController.js deleted file mode 100644 index 169a8868..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowController.js +++ /dev/null @@ -1,509 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('workflowsController', function($scope, $http, $uibModal, $log, modalService, $modal) { - - $scope.viewPerPage = 5; - $scope.scrollViewsPerPage = 20; - $scope.currentPage = 2; - $scope.totalPage; - $scope.searchCategory = ""; - $scope.searchString = ""; - $scope.radio = { - value: "" - }; - - - $scope.showModal = false; - $scope.toggleModal = function(){ - $scope.showModal = !$scope.showModal; - }; - - $scope.workflow = {}; - $scope.workflow.active = "true"; - - $scope.updateAllWorkflowStatus = function() { - angular.forEach($scope.workflows,function(value){ - $scope.checkWorkflowStatus(value); - }) - } - - $scope.fetchWorkflowsList = function() { - $http.get('workflows/list').then(function(workflowList){ - console.log('Got new list from server = ' + workflowList.data); - $scope.workflows = workflowList.data; - $scope.updateAllWorkflowStatus(); - }); - }; - - $scope.addNewWorkflow = function(newWorkflow) { - $http.post('workflows/addWorkflow/', JSON.stringify(newWorkflow)).success(function() { - $scope.fetchWorkflowsList(); - }); - - $scope.workflow.name = ''; - - }; - - $scope.updateWorkflow = function (workflowToEdit) { - //workflowToEdit.active='true'; - var modalInstance = $uibModal.open({ - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-new.html', - //size : modalSize, - controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { - $scope.workflow = workflowToEdit; - $scope.ok = function() { - console.log('Updating existing workflow ... ' + JSON.stringify($scope.workflow)); - $http.post('workflows/editWorkflow/', JSON.stringify($scope.workflow)).then(function(returnedWorkflow){ - console.log('Returned Workflow = ' + JSON.stringify(returnedWorkflow)); - $uibModalInstance.close($scope.workflow); - }); - }; - - $scope.cancel = function() { - $uibModalInstance.dismiss(); - }; - }], - //End of inner controller - resolve: { - workflow: function() { - console.log('Passing ' + JSON.stringify($scope.workflow)); - return $scope.workflow; - } - } - }); - - modalInstance.result.then(function (editedWorkFlow) { - //Need to convert to proper date - later - delete editedWorkFlow.created; - delete editedWorkFlow.updated; - - delete editedWorkFlow.createdBy; - delete editedWorkFlow.modifiedBy; - - console.log('selected Item ' + JSON.stringify(editedWorkFlow)); - $scope.$emit('workflowAdded', editedWorkFlow); - - }, function () { - $log.info('Modal dismissed at: ' + new Date()); - }); - }; - - $scope.reset = function(){ - console.log("Resetting ...."); - }; - - $scope.update = function(){ - console.log("updating ...."); - }; - - $scope.createWorkflow = function (modalSize) { - - var modalInstance = $uibModal.open({ - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-new.html', - size : modalSize, - controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { - $scope.workflow = {}; - $scope.workflow.active = 'true'; - $scope.ok = function() { - console.log('Saving new workflow ... ' + JSON.stringify($scope.workflow)); - $http.post('workflows/addWorkflow/', JSON.stringify($scope.workflow)).then(function(returnedWorkflow){ - console.log('Returned Workflow = ' + JSON.stringify(returnedWorkflow)); - $uibModalInstance.close($scope.workflow); - }); - }; -/* console.log(size);*/ - $scope.cancel = function() { - $uibModalInstance.dismiss(); - }; - }], - //End of inner controller - resolve: { - workflow: function() { - console.log('Passing ' + JSON.stringify($scope.workflow)); - return $scope.workflow; - } - } - }); - - modalInstance.result.then(function (newWorkflow) { - console.log('selected Item ' + JSON.stringify(newWorkflow)); - $scope.$emit('workflowAdded', newWorkflow); - - }, function () { - $log.info('Modal dismissed at: ' + new Date()); - }); - };//End of createWorkflow function - - - $scope.removeWorkflow = function(workflowToRemove){ - var modalInstance = $uibModal.open({ - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-remove.html', - controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { - $scope.workflowToRemove = workflowToRemove; - $scope.ok = function() { - console.log('Removing workflow ... ' + JSON.stringify($scope.workflowToRemove) + ' on client request.'); - $http.post('workflows/removeWorkflow/', JSON.stringify($scope.workflowToRemove.id)).then(function(){ - console.log('Workflow successfully removed !!!'); - $uibModalInstance.close(); - }); - }; - - $scope.cancel = function() { - $uibModalInstance.dismiss(); - }; - }] - }); - - modalInstance.result.then(function () { - $scope.$emit('workflowRemoved'); - }, function () { - $log.info('Modal dismissed at: ' + new Date()); - }); - - }; - - - - $scope.scheduleWorkflow = function(workflowToSchedule){ - var modalInstance = $uibModal.open({ - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-schedule.html', - size:'lg', - - controller: ['$scope', '$uibModalInstance', '$http','dateFilter', function ($scope, $uibModalInstance, $http,dateFilter) { - - $scope.workflowToSchedule = workflowToSchedule; - $scope.dt = new Date(); - $scope.dt2 = new Date(); - $scope.dateformat = 'MM/dd/yyyy', - $scope.datetimeformat = "hh:mm a"; - - $scope.recurrenceOptions =[{ - index:0, value:'One-Time', title:'One-Time' - },{ - index:1, value: 'Hourly',title:'Hourly' - },{ - index:2, value: 'Daily',title:'Daily' - },{ - index:3, value: 'Weekly',title:'Weekly' - }] - $scope.selectRecurrenceOpt = $scope.recurrenceOptions[0]; - - $scope.hours = []; - for (var i=0; i<24; i++){ - var newObj={} - newObj.index = i; - newObj.value = ""+i; - newObj.title = ""+i; - $scope.hours.push(newObj); - } - - $scope.minutes = []; - for (var i=0; i<60; i++){ - var newObj={} - newObj.index = i; - newObj.value = ""+i; - newObj.title = ""+i; - $scope.minutes.push(newObj); - } - - $scope.AMPMOptions =[ - { - index:0, value:'AM', title:'AM' - },{ - index:1, value: 'PM',title:'PM' - }] - - $scope.selectFirstHour =$scope.hours[0]; - $scope.selectFirstMinute =$scope.minutes[0]; - - $scope.selectLastHour =$scope.hours[0]; - $scope.selectLastMinute =$scope.minutes[0]; - - $scope.selectStartAMPMOption=$scope.AMPMOptions[0]; - $scope.selectLastAMPMOption=$scope.AMPMOptions[0]; - - var GenerateCronExpression = function(trigger_dt, RecurrenceOpt) { - var CRON_sec = trigger_dt.getSeconds(); - var CRON_min = trigger_dt.getMinutes(); - var CRON_hr = trigger_dt.getHours(); - var CRON_date= trigger_dt.getDate(); - var CRON_month = trigger_dt.toLocaleString('en-US', {month: 'short'}).toUpperCase(); - var CRON_day = trigger_dt.toLocaleString('en-US', {weekday: 'short'}).toUpperCase(); - var CRON_year = trigger_dt.getFullYear(); - if (RecurrenceOpt ==="One-Time") { - CRON_day = '?' - } else { - if (RecurrenceOpt ==="Hourly") { - CRON_hr = '*'; - CRON_date = '*' - CRON_month = '*' - CRON_day = '?' - CRON_year = '*' - } else if (RecurrenceOpt ==="Daily") { - CRON_date = '*' - CRON_month = '*' - CRON_day = '?' - CRON_year = '*' - } else if (RecurrenceOpt ==="Weekly") { - CRON_date = '*' - CRON_month = '*' - CRON_year = '*' - } - } - - var CRON_Expression = [CRON_sec, CRON_min, CRON_hr, CRON_date, CRON_month, CRON_day, CRON_year]; - return CRON_Expression.join(" "); - } - - $scope.ok = function() { - - // DateTime for the start time: it should be noted that the start time - // for a CRON job should be prior to the trigger time. - $scope.trigger_dt = new Date( $scope.dt.getFullYear() + - "-" + ("0"+($scope.dt.getMonth()+1)).slice(-2) + - "-" +("0"+ $scope.dt.getDate()).slice(-2) + - " " + ("0" + $scope.selectFirstHour.value).slice(-2) + - ":" +("0" + $scope.selectFirstMinute.value).slice(-2) + - ":00.0"); - - $scope.startDateTime_CRON = GenerateCronExpression($scope.trigger_dt, $scope.selectRecurrenceOpt.value) - - //roll back the the start date time by 30 seconds (start time should be 30 seconds prior to trigger time) - dt_st = new Date($scope.trigger_dt - 30*1000) - - startDateTime = dt_st.getFullYear() + - "-" + ("0"+(dt_st.getMonth()+1)).slice(-2) + - "-" +("0"+ dt_st.getDate()).slice(-2) + - " " + ("0" + dt_st.getHours()).slice(-2) + - ":" +("0" + dt_st.getMinutes()).slice(-2) + - ":" + ("0" + dt_st.getSeconds()).slice(-2) +".0"; - $scope.startDateTime = startDateTime; - - $scope.endDateTime = $scope.dt2.getFullYear() + - "-" + ("0"+($scope.dt2.getMonth()+1)).slice(-2) + - "-" +("0"+ $scope.dt2.getDate()).slice(-2) + - " " + ("0"+ $scope.selectLastHour.value).slice(-2) + - ":" +("0" + $scope.selectLastMinute.value).slice(-2) + - ":00.0" - - $scope.WorkflowScheduleObject = {}; - $scope.WorkflowScheduleObject['startDateTime_CRON'] = $scope.startDateTime_CRON; - $scope.WorkflowScheduleObject['startDateTime'] = $scope.startDateTime; - $scope.WorkflowScheduleObject['endDateTime'] = $scope.endDateTime; - $scope.WorkflowScheduleObject['workflowKey'] = $scope.workflowToSchedule.workflowKey; - $scope.WorkflowScheduleObject['recurrence'] = $scope.selectRecurrenceOpt.value; - $scope.WorkflowScheduleObject['workflow_arguments'] = "test"; - $scope.WorkflowScheduleObject['workflow_server_url'] = $scope.workflowToSchedule.runLink; - - - TimeFromNowToStart = new Date($scope.startDateTime)-new Date() - TimeStartToEnd = new Date($scope.endDateTime)-new Date($scope.startDateTime) - - if (TimeFromNowToStart<=0) { - console.log("invalid start time input") - alert("Please ensure the scheduled start date time is later than current time.") - return; - } - if (TimeStartToEnd<=0) { - console.log("invalid end time input") - alert("Please ensure the schduled end date time is later than the start time.") - return; - } - // if successful then save and close - $scope.saveCronJob($scope.WorkflowScheduleObject); - $uibModalInstance.close(); - - }; - - $scope.saveCronJob = function(cronJobData){ - - console.log('saving cron job data: ' + cronJobData); - var uuu = "workflows/saveCronJob.htm"; - var postData={cronJobDataObj: cronJobData}; - $.ajax({ - type : 'POST', - url : uuu, - //dataType: 'json', // data type expected from server - contentType: 'application/json', - data: JSON.stringify(postData), // data type sent to server - success : function(data){ - $scope.$apply(function(){ - //$scope.availableRoleFunctions=[];$scope.$apply(); - // new // $scope.availableFnMenuItems=data.availableFnMenuItems; - } - ); - //alert("Update Successful.") ; - //$scope.editRoleFunction = null; - // new /// $modalInstance.close({availableFnMenuItems:$scope.availableRoleFunctions}); - }, - error : function(data){ - alert("Error while saving."); - } - }); - - }; - - $scope.cancel = function() { - console.log("cancel triggered") - $uibModalInstance.dismiss(); - }; - }] - }); - - modalInstance.result.then(function () { - $scope.$emit('workflowRemoved'); - }, function () { - $log.info('Modal dismissed at: ' + new Date()); - }); - - }; - - - - - - - - - $scope.previewWorkflow = function(workflowToPreview,modalSize){ - var modalInstance = $uibModal.open({ - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-preview.html', - size:modalSize, - controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { - $scope.workflowToPreview = workflowToPreview; - console.log('previewWorkFlow invoked'); - console.log($scope.workflowToPreview); - - $scope.cancel = function() { - $uibModalInstance.dismiss(); - }; - }] - }); - - modalInstance.result.then(function () { - $scope.$emit('workflowRemoved'); - }, function () { - $log.info('Modal dismissed at: ' + new Date()); - }); - - }; - - - /* change work flow status based on the boolean variable "suspendBool" which corresponds whether - * we would like to suspend or activate a workflow specified by key. */ - $scope.changeWorkflowStatus = function(workflowToChangeStatus,suspendBool){ - if (workflowToChangeStatus!==null) { - var statusUrl= workflowToChangeStatus.runLink+"/engine-rest/process-definition/key/"+workflowToChangeStatus.workflowKey - var suspendedUrl= statusUrl+"/suspended" - var xmlHttp = new XMLHttpRequest(); - xmlHttp.open('PUT', suspendedUrl, false); - xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8'); - xmlHttp.onload = function() { - if (suspendBool) { - console.log("process definition is now suspended"); - workflowToChangeStatus.active="false" - } else { - console.log("process definition is now activated"); - workflowToChangeStatus.active="true" - } - }; - xmlHttp.send(JSON.stringify({ - "suspended" : suspendBool, - "includeProcessInstances" : true, - "executionDate" : "2013-11-21T10:49:45" - })); - } - - }; - - $scope.activateWorkflow = function(workflowToActivate){ - $scope.changeWorkflowStatus(workflowToActivate,false) - - }; - - $scope.suspendWorkflow = function(workflowToActivate){ - $scope.changeWorkflowStatus(workflowToActivate,true) - }; - - $scope.checkWorkflowStatus = function(workflow) { - if (workflow!==null) { - var statusUrl= workflow.runLink+"/engine-rest/process-definition/key/"+workflow.workflowKey - var xmlHttp3 = new XMLHttpRequest(); - xmlHttp3.open('GET', statusUrl, true); - xmlHttp3.withCredentials = true; - xmlHttp3.send(); - xmlHttp3.onreadystatechange = function() { - if (xmlHttp3.readyState == 4 && xmlHttp3.status == 200) { - // do something with the response in the variable data - var temp = JSON.parse(xmlHttp3.responseText) - if (temp.suspended == false){ - console.log("Activated") - workflow.active="true" - } else { - console.log("Suspended") - workflow.active="false" - } - } - } - } - }; - - $scope.StartWorkflowInstance = function(workflowToStart){ - if (workflowToStart!==null) { - var statusUrl= workflowToStart.runLink+"/engine-rest/process-definition/key/"+workflowToStart.workflowKey - var suspendedUrl= statusUrl+"/submit-form" - var xmlHttp = new XMLHttpRequest(); - xmlHttp.open('POST', suspendedUrl, false); - xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8'); - xmlHttp.onload = function() { - }; - xmlHttp.send(JSON.stringify({ - "variables": { - "customerId": {"value":"asdasda","type":"String"}, - "amount":{"value":"100","type":"String"} - } - })); - } - - }; - - - $scope.$on('workflowAdded', function(event, newWorkflow) { - console.log("New Workflow to be added in list scope " + JSON.stringify(newWorkflow)); - //$scope.workflows.push(newWorkflow); - $scope.fetchWorkflowsList(); - console.log('newly added workflow = ' + JSON.stringify(newWorkflow)); - }); - - $scope.$on('workflowRemoved', function(event) { - $scope.fetchWorkflowsList(); - }); - - $scope.fetchWorkflowsList(); - - - -}); - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowRouting.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowRouting.js deleted file mode 100644 index 81fe4e28..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/controllers/workflows/workflowRouting.js +++ /dev/null @@ -1,26 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.config(function($routeProvider) { - $routeProvider - .when('/all', { - templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-listing.html', - controller: 'workflowsController' - }) -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/footer.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/footer.js deleted file mode 100644 index a2dab75c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/footer.js +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.directive('qFooter', function () { - return { - restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements - replace: false, - templateUrl: "app/fusion/scripts/view-models/footer.html", - controller: ['$scope', '$filter', function ($scope, $filter) { - // Your behaviour goes here :) - }] - } -}); - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/header.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/header.js deleted file mode 100644 index bc90d200..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/header.js +++ /dev/null @@ -1,504 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.directive('qHeader', function () { - return { - restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements - replace: false, - templateUrl: "app/fusion/scripts/view-models/header.html", - controller: ['$scope', '$filter','$http','$timeout', '$log','UserInfoService', '$window', '$cookies', function ($scope, $filter, $http, $timeout, $log,UserInfoService, $window, $cookies) { - - /*Define fields*/ - $scope.userName; - $scope.userFirstName; - $scope.redirectUrl; - $scope.contactUsUrl; - $scope.getAccessUrl; - $scope.childData=[]; - $scope.parentData=[]; - $scope.menuItems = []; - $scope.loadMenufail=false; - $scope.megaMenuDataObject=[]; - $scope.activeClickSubMenu = { - x: '' - }; - $scope.activeClickMenu = { - x: '' - }; - $scope.favoritesMenuItems = []; - $scope.favoriteItemsCount = 0; - $scope.showFavorites = false; - $scope.emptyFavorites = false; - $scope.favoritesWindow = false; - - /*Menu Structure*/ - var menuStructureConvert = function(menuItems) { - console.log(menuItems); - $scope.megaMenuDataObjectTemp = - [ - { - text: "ECOMP", - children: menuItems - }, - { - text: "Help", - children: [ - { - text:"Contact Us", - url:$scope.contactUsUrl - }, - { - text:"Get Access", - url:$scope.getAccessUrl - }] - } - ]; - return $scope.megaMenuDataObjectTemp; - }; - - /***************functions**************/ - /*Put user info into fields*/ - $scope.inputUserInfo = function(userInfo){ - if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){ - if(typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null){ - $scope.userFirstName = userInfo.USER_FIRST_NAME; - } - } - } - /*getting user info from session*/ - $scope.getUserNameFromSession = function(){ - UserInfoService.getFunctionalMenuStaticDetailSession() - .then(function (res) { - $scope.contactUsUrl=res.contactUsLink; - $scope.userName = res.userName; - $scope.userFirstName = res.firstName; - $scope.redirectUrl = res.portalUrl; - $scope.getAccessUrl = res.getAccessUrl; - }); - } - $scope.getTopMenuStaticInfo=function() { - var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext(); - promise.then( - function(res) { - if(res==null || res==''){ - $log.info('failed getting static User information'); - $scope.getUserNameFromSession(); - }else{ - $log.info('Received static User information'); - - var resData = res; - console.log(resData); - $scope.inputUserInfo(resData); - $scope.userName = $scope.firstName+ ' '+ $scope.lastName; - } - }, - function(err) { - $log.info('failed getting static User information'); - } - ); - } - - $scope.returnToPortal=function(){ - window.location.href = $scope.redirectUrl; - } - - var unflatten = function( array, parent, tree ){ - tree = typeof tree !== 'undefined' ? tree : []; - parent = typeof parent !== 'undefined' ? parent : { menuId: null }; - var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; }); - if( !_.isEmpty( children ) ){ - if( parent.menuId === null ){ - tree = children; - }else{ - parent['children'] = children - } - _.each( children, function( child ){ unflatten( array, child ) } ); - } - return tree; - } - - $scope.getMenu=function() { - $scope.getTopMenuStaticInfo(); - $http({ - method: "GET", - url: 'get_functional_menu', -// TIMEOUT USED FOR LOCAL TESTING ONLY -// timeout: 100 - }).success(function (response) { - - if (response == '101: Timeout') { - $log.debug('Timeout attempting to get_functional_menu'); - $scope.megaMenuDataObject = menuStructureConvert(""); -// $scope.createErrorMenu(); - //$scope.loadMenufail=true; - } else { - if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){ - $log.debug('Timeout attempting to get_functional_menu'); - $scope.menuItems = unflatten( response); - $scope.megaMenuDataObject = menuStructureConvert($scope.menuItems); -// $scope.createErrorMenu(); - //$scope.loadMenufail=true; - }else{ - $scope.loadMenufail=false; - $scope.contactUsURL = response.contactUsLink; - $log.debug('functional_menu',response); - $scope.megaMenuDataObject = menuStructureConvert(""); - } - } - }).error(function (response){ - $scope.megaMenuDataObject = menuStructureConvert(""); -// $scope.createErrorMenu(); - //$scope.loadMenufail=true; - $log.debug('REST API failed get_functional_menu...'); - }); - - } - - $scope.adjustHeader=function() { - $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header); - - if($scope.showHeader == true) { - $scope.drawer_margin_top = 70; - $scope.drawer_custom_top = 54; - $scope.toggle_drawer_top = 55; - } - else { - - $scope.drawer_margin_top = 60; - $scope.drawer_custom_top = 0; - $scope.toggle_drawer_top = 10; - } - - } - - $scope.getMenu(); - $scope.adjustHeader(); - -/* **************************************************************************/ -/* Logic for the favorite menus is here */ - - $scope.loadFavorites = function () { - $log.debug('loadFavorites has happened.'); - if ($scope.favoritesMenuItems == '') { - $scope.generateFavoriteItems(); - $log.debug('loadFavorites is calling generateFavoriteItems()'); - } else { - $log.debug('loadFavorites is NOT calling generateFavoriteItems()'); - } - } - - $scope.goToUrl = function (item) { - $log.info("goToUrl called") - $log.info(item); - - var url = item.url; - var restrictedApp = item.restrictedApp; - $log.debug('Restricted app status is: ' + restrictedApp); - if (!url) { - $log.info('No url found for this application, doing nothing..'); - return; - } - if (restrictedApp) { - $window.open(url, '_blank'); - } else { - $window.open(url, '_self'); - } - - } - - $scope.submenuLevelAction = function(index, column) { - if ($scope.favoritesMenuItems == '') { - $scope.generateFavoriteItems(); - $log.debug('submenuLevelAction is calling generateFavoriteItems()'); - } - $log.debug('item hovered/clicked: ' + index + '; column = ' + column); - if (column == 2) { // 2 is Design - $scope.favoritesWindow = false; - $scope.showFavorites = false; - $scope.emptyFavorites = false; - } - if (index=='Favorites' && $scope.favoriteItemsCount != 0) { - $log.debug('Showing Favorites window'); - $scope.favoritesWindow = true; - $scope.showFavorites = true; - $scope.emptyFavorites = false; - } - if (index=='Favorites' && $scope.favoriteItemsCount == 0) { - $log.debug('Hiding Favorites window in favor of No Favorites Window'); - $scope.favoritesWindow = true; - $scope.showFavorites = false; - $scope.emptyFavorites = true; - } - if (column > 2) { - $scope.favoritesWindow = false; - $scope.showFavorites = false; - $scope.emptyFavorites = false; - } - }; - - $scope.hideFavoritesWindow = function() { - $log.debug('$scope.hideFavoritesWindow has been called'); - $scope.showFavorites = false; - $scope.emptyFavorites = false; - } - - $scope.isUrlFavorite = function (menuId) { -// $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId); - var jsonMenu = JSON.stringify($scope.favoritesMenuItems); - var isMenuFavorite = jsonMenu.indexOf('menuId\":' + menuId); - if (isMenuFavorite==-1) { - return false; - } else { - return true; - } - - } - - $scope.generateFavoriteItems = function() { - $http({ - method: "GET", - url: 'get_favorites', -// TIMEOUT USED FOR LOCAL TESTING ONLY -// timeout: 100 - }).success(function (response) { - if (response == '101: Timeout') { - $log.error('Timeout attempting to get_favorites_menu'); - } else { - if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){ - $log.error('REST API failed get_favorites' + response); - }else{ - $log.debug('get_favorites = ' + JSON.stringify(response)); - $scope.favoritesMenuItems = response; - $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length; - $log.info('number of favorite menus: ' + $scope.favoriteItemsCount); - } - } - }).error(function (response){ - $log.error('REST API failed get_favorites' + response); -//createFavoriteErrorMenu() USED FOR LOCAL TESTING ONLY -// $scope.createFavoriteErrorMenu(); - }); - } - - $scope.createFavoriteErrorMenu=function() { - $scope.favoritesMenuItems = []; - $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length; - $log.info('number of favorite menus: ' + $scope.favoriteItemsCount); - } - - /* end of Favorite Menu code */ - /* **************************************************************************/ - - - /* **************************************************************************/ - // THIS IS USED FOR LOCAL TESTING ONLY - /* **************************************************************************/ - $scope.createErrorMenu=function() { - $log.debug('Creating fake menu now...'); -// $scope.loadMenufail=true; - $scope.menuItems = [ - { - "menuId": 1, - "column": 2, - "text": "Design", - "parentMenuId": null, - "url": "" - }, - { - "menuId": 2, - "column": 3, - "text": "Infrastructure Ordering", - "parentMenuId": null, - "url": "" - }, - { - "menuId": 3, - "column": 4, - "text": "Service Creation", - "parentMenuId": null, - "url": "" - }, - { - "menuId": 4, - "column": 5, - "text": "Service Mgmt", - "parentMenuId": null, - "url": "" - }, - { - "menuId": 90, - "column": 1, - "text": "Google", - "parentMenuId": 1, - "url": "" - }, - { - "menuId": 91, - "column": 1, - "text": "Mike Little's Coffee Cup", - "parentMenuId": 2, - "url": "" - }, - { - "menuId": 92, - "column": 2, - "text": "Andy and his Astrophotgraphy", - "parentMenuId": 3, - "url": "" - }, - { - "menuId": 93, - "column": 1, - "text": "JSONLint", - "parentMenuId": 4, - "url": "" - }, - { - "menuId": 94, - "column": 2, - "text": "HROneStop", - "parentMenuId": 4, - "url": "" - }, - { - "menuId": 95, - "column": 2, - "text": "4th Level App4a R16", - "parentMenuId": 4, - "url": "" - }, - { - "menuId": 96, - "column": 3, - "text": "3rd Level App1c R200", - "parentMenuId": 4, - "url": "" - }, - { - "menuId": 97, - "column": 1, - "text": "3rd Level App4b R16", - "parentMenuId": 5, - "url": "" - }, - { - "menuId": 98, - "column": 2, - "text": "3rd Level App2b R16", - "parentMenuId": 5, - "url": "" - }, - { - "menuId": 99, - "column": 1, - "text": "Favorites", - "parentMenuId": null, - "url": "" - } - ]; - $scope.menuItems = unflatten( $scope.menuItems ); - //remove this - $scope.megaMenuDataObject = menuStructureConvert($scope.menuItems); - } - }] - } -}); - -app.filter("ellipsis", function(){ - return function(text, length){ - if (text) { - var ellipsis = text.length > length ? "..." : ""; - return text.slice(0, length) + ellipsis; - }; - return text; - } -}); - -function reloadPageOnce() { - if( window.localStorage ) - { - if( !localStorage.getItem('firstLoad') ) - { - localStorage['firstLoad'] = true; - window.location.reload(); - } - else - localStorage.removeItem('firstLoad'); - } -} -app.controller('loginSnippetCtrl', function ($scope,$http, $log,UserInfoService){ - /*Define fields*/ - $scope.userProfile={ - firstName:'', - lastName:'', - fullName:'', - email:'', - userid:'' - } - /*Put user info into fields*/ - $scope.inputUserInfo = function(userInfo){ - if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){ - if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='') - $scope.userProfile.firstName = userInfo.USER_FIRST_NAME; - if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='') - $scope.userProfile.lastName = userInfo.USER_LAST_NAME; - if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='') - $scope.userProfile.email = userInfo.USER_EMAIL; - if (typeof(userInfo.USER_ORGUSERID) != "undefined" && userInfo.USER_ORGUSERID!=null && userInfo.USER_ORGUSERID!='') - $scope.userProfile.userid = userInfo.USER_ORGUSERID; - } - } - /*getting user info from session*/ - $scope.getUserNameFromSession = function(){ - UserInfoService.getFunctionalMenuStaticDetailSession() - .then(function (response) { - $scope.userProfile.fullName = response.userName; - $scope.userProfile.userid = response.userid; - $scope.userProfile.email = response.email; - }); - } - /*getting user info from shared context*/ - $scope.getUserName=function() { - var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext(); - promise.then( - function(res) { - if(res==null || res==''){ - $log.info('Getting User information from session'); - $scope.getUserNameFromSession(); - - }else{ - $log.info('Received User information from shared context',res); - var resData = res; - console.log(resData); - $scope.inputUserInfo(resData); - $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName; - } - }, - function(err) { - console.log('error'); - } - ); - }; - /*call the get user info function*/ - try{ - $scope.getUserName(); - }catch(err){ - $log.info('Error while getting User information',err); - } -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/leftMenu.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/leftMenu.js deleted file mode 100644 index 737cb801..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/directives/leftMenu.js +++ /dev/null @@ -1,203 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ - -app.directive('qMenu', function () { - return { - restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements - replace: false, - templateUrl: "app/fusion/scripts/view-models/left_menu.html", - controller: ['$scope', '$filter','$http','$timeout','$cookies','LeftMenuService', function ($scope, $filter, $http,$timeout,$cookies,LeftMenuService) { - - $scope.leftChildData=[]; - $scope.leftParentData=[]; - $scope.leftMenuItems = []; - $scope.app_name = ""; - $scope.app_name_full; - LeftMenuService.getLeftMenu().then(function(response){ - var j = response; - try{ - if(j && j !== "null" && j!== "undefined"){ - $scope.leftParentData = JSON.parse(j.data); - $scope.leftChildData = JSON.parse(j.data2); - }else{ - throw "Get Left Menu respsone is not an object/is empty"; - } - try{ - var leftChildItemList = $scope.leftChildData; - var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1]; - var leftParentList =$scope.leftParentData; - for (var i = 0; i < leftParentList.length; i++) { - $scope.item = { - parentLabel : leftParentList[i].label, - parentAction : leftParentList[i].action, - parentImageSrc : leftParentList[i].imageSrc, - open:pageUrl==leftParentList[i].action?true:false, - childItemList : leftChildItemList[i] - } - $scope.leftMenuItems.push($scope.item); - }; - }catch(err){ - console.log("error happened while trying to set left menu structure"+err); - } - }catch (e) { - console.log("error happened while trying to get left menu items"+e); - reloadPageOnce(); - return; - } - },function(error){ - console.log("error happened while calling getLeftMenu"+error); - }); - - LeftMenuService.getAppName().then(function(response){ - var j = response; - try{ - if(j && j !== "null" && j!== "undefined"){ - console.log("app name is " + $scope.app_name); - $scope.app_name_full = j.data; - var processed_app_name = j.data; - var n = processed_app_name.length; - if (n > 15) { - n = 15; - } - $scope.app_name = processed_app_name.substr(0, n); - }else{ - throw "Get app_name respsone is not an object/is empty"; - } - }catch (e) { - console.log("error happened while trying to get app name "+e); - return; - } - },function(error){ - console.log("error happened while calling getAppName "+error); - }); - - $scope.adjustHeader=function() { - $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header); - - if($scope.showHeader == true) { - $scope.drawer_margin_top = 50; - $scope.drawer_custom_top = 20; - $scope.toggle_drawer_top = 55; - } - else { - - $scope.drawer_margin_top = 0; - $scope.drawer_custom_top = 0; - $scope.toggle_drawer_top = 0; - } - - - }; - - $scope.adjustHLeftMenu = function (type){ - $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header); - - if($scope.showHeader == true) { - $scope.drawer_margin_top = 60; - $scope.drawer_custom_top = 54; - $scope.toggle_drawer_top = 55; - } - else { - - $scope.drawer_margin_top = 50; - $scope.drawer_custom_top = 0; - $scope.toggle_drawer_top = 10; - } - if(type=='burgerIcon'){ - return { "top": $scope.toggle_drawer_top+"px"}; - }else if(type=='leftMenu'){ - return { "margin-top": $scope.drawer_margin_top+"px"}; - }else - return; - } - $scope.adjustHeader(); - $scope.drawerOpen = true; - - $scope.toggleDrawer = function() { - $scope.drawerOpen = !($scope.drawerOpen); - if ($scope.drawerOpen) { - // setCookie('drawerOpen','open',30); - $scope.arrowShow = true; - - - if (document.getElementById('fnMenueContent')!=null) - document.getElementById('fnMenueContent').style.marginLeft = "0px"; - - if (document.getElementById('rightContentAdmin')!=null) - document.getElementById('rightContentAdmin').style.marginLeft = "210px"; - - else if (document.getElementById('rightContentProfile')!=null) - document.getElementById('rightContentProfile').style.marginLeft = "210px"; - - - - } else { - - $scope.arrowShow = false; - - if (document.getElementById('fnMenueContent')!=null) - document.getElementById('fnMenueContent').style.marginLeft = "-150px"; - - if (document.getElementById('rightContentAdmin')!=null) { - document.getElementById('rightContentAdmin').style.marginLeft = "50px"; - - } - - else if (document.getElementById('rightContentProfile')!=null) - document.getElementById('rightContentProfile').style.marginLeft = "50px"; - - - - - } - }; - - $timeout(function() { - detectScrollEvent(); - }, 800); - }] - } - -}); -$(window).scroll(function() { - if ($('.att-drawer').is(':visible')) { - detectScrollEvent(); - } - -}); - -function detectScrollEvent() { - try{ - var footerOff = $('#footerContainer').offset().top; - var headOff = $('#headerContainer').offset().top; - var winHeight = $(window).height(); - if ((footerOff - headOff) <= winHeight) { - $('.att-drawer').css({ - "height" : footerOff - headOff - 55 - }); - } else { - $('.att-drawer').css({ - "height" : "94vh" - }); - } - }catch(err){ - console.log(err) - } -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/jquery.resize.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/jquery.resize.js deleted file mode 100644 index 1ebd6c95..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/jquery.resize.js +++ /dev/null @@ -1,139 +0,0 @@ -/*! - * jquery.resize.js 0.0.1 - https://github.com/yckart/jquery.resize.js - * Resize-event for DOM-Nodes - * - * @see http://workingdraft.de/113/ - * @see http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ - * - * Copyright (c) 2013 Yannick Albert (http://yckart.com) - * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php). - * 2013/04/01 - */ - -(function(factory) { - if(typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); - } else if(typeof exports === 'object') { - // Node/CommonJS style for Browserify - module.exports = factory; - } else { - // Browser globals - factory(jQuery); - } -}(function($) { - - function addFlowListener(element, type, fn) { - var flow = type == 'over'; - element.addEventListener('OverflowEvent' in window ? 'overflowchanged' : type + 'flow', function(e) { - if(e.type == (type + 'flow') || ((e.orient == 0 && e.horizontalOverflow == flow) || (e.orient == 1 && e.verticalOverflow == flow) || (e.orient == 2 && e.horizontalOverflow == flow && e.verticalOverflow == flow))) { - e.flow = type; - return fn.call(this, e); - } - }, false); - }; - - function fireEvent(element, type, data, options) { - var options = options || {}, - event = document.createEvent('Event'); - event.initEvent(type, 'bubbles' in options ? options.bubbles : true, 'cancelable' in options ? options.cancelable : true); - for(var z in data) event[z] = data[z]; - element.dispatchEvent(event); - }; - - $.event.special.resize = { - setup: function() { - var element = this; - var resize = 'onresize' in element; - if(!resize && !element._resizeSensor) { - var sensor = element._resizeSensor = document.createElement('div'); - sensor.className = 'resize-sensor'; - sensor.innerHTML = '
'; - - var x = 0, - y = 0, - first = sensor.firstElementChild.firstChild, - last = sensor.lastElementChild.firstChild, - matchFlow = function(event) { - var change = false, - width = element.offsetWidth; - if(x != width) { - first.style.width = width - 1 + 'px'; - last.style.width = width + 1 + 'px'; - change = true; - x = width; - } - var height = element.offsetHeight; - if(y != height) { - first.style.height = height - 1 + 'px'; - last.style.height = height + 1 + 'px'; - change = true; - y = height; - } - if(change && event.currentTarget != element) fireEvent(element, 'resize'); - }; - - if(getComputedStyle(element).position == 'static') { - element.style.position = 'relative'; - element._resizeSensor._resetPosition = true; - } - addFlowListener(sensor, 'over', matchFlow); - addFlowListener(sensor, 'under', matchFlow); - addFlowListener(sensor.firstElementChild, 'over', matchFlow); - addFlowListener(sensor.lastElementChild, 'under', matchFlow); - element.appendChild(sensor); - matchFlow({}); - } - var events = element._flowEvents || (element._flowEvents = []); - if(events.indexOf(handler) == -1) events.push(handler); - if(!resize) element.addEventListener('resize', handler, false); - element.onresize = function(e) { - events.forEach(function(fn) { - fn.call(element, e); - }); - }; - }, - - teardown: function() { - var element = this; - var index = element._flowEvents.indexOf(handler); - if(index > -1) element._flowEvents.splice(index, 1); - if(!element._flowEvents.length) { - var sensor = element._resizeSensor; - if(sensor) { - element.removeChild(sensor); - if(sensor._resetPosition) element.style.position = 'static'; - delete element._resizeSensor; - } - if('onresize' in element) element.onresize = null; - delete element._flowEvents; - } - element.removeEventListener('resize', handler); - } - }; - - $.fn.extend({ - resize: function(fn) { - return fn ? this.bind("resize", fn) : this.trigger("resize"); - }, - - unresize: function(fn) { - return this.unbind("resize", fn); - } - }); - - - function handler(event) { - var orgEvent = event || window.event, - args = [].slice.call(arguments, 1); - - event = $.event.fix(orgEvent); - event.type = "resize"; - - // Add event to the front of the arguments - args.unshift(event); - - return($.event.dispatch || $.event.handle).apply(this, args); - } - -})); \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/debug.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/debug.js deleted file mode 100644 index eff36a25..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/debug.js +++ /dev/null @@ -1,329 +0,0 @@ -/** - * debugData - * - * Pass me a data structure {} and I'll output all the key/value pairs - recursively - * - * @example var HTML = debugData( oElem.style, "Element.style", { keys: "top,left,width,height", recurse: true, sort: true, display: true, returnHTML: true }); - * - * @param Object o_Data A JSON-style data structure - * @param String s_Title Title for dialog (optional) - * @param Hash options Pass additional options in a hash - */ -function debugData (o_Data, s_Title, options) { - options = options || {}; - var - str=(s_Title||s_Title==='' ? s_Title : 'DATA') - , dType=$.type(o_Data) - // maintain backward compatibility with OLD 'recurseData' param - , recurse=($.type(options)==='boolean' ? options : options.recurse !==false) - , keys=(options.keys?','+options.keys+',':false) - , display=options.display !==false - , html=options.returnHTML !==false - , sort=!!options.sort - , prefix=options.indent ? ' ' : '' - , D=[], i=0 // Array to hold data, i=counter - , hasSubKeys = false - , k, t, skip, x, type // loop vars - ; - if (dType!=='object' && dType!=='array') { - if (options.display) alert( (s_Title || 'debugData') +': '+ o_Data ); - return o_Data; - } - if (dType==='object' && $.isPlainObject(o_Data)) - dType='hash'; - - if (o_Data.jquery) { - str=s_Title+'jQuery Collection ('+ o_Data.length +')\n context="'+ o_Data.context +'"'; - } - else if (o_Data.nodeName) { - str=s_Title+o_Data.tagName; - var id = o_Data.id, cls=o_Data.className, src=o_Data.src, hrf=o_Data.href; - if (id) str+='\n id="'+ id+'"'; - if (cls) str+='\n class="'+ cls+'"'; - if (src) str+='\n src="'+ src+'"'; - if (hrf) str+='\n href="'+ hrf+'"'; - } - else { - parse(o_Data,prefix,dType); // recursive parsing - if (sort && !hasSubKeys) D.sort(); // sort by keyName - but NOT if has subKeys! - if (str) str += '\n***'+ '****************************'.substr(0,str.length) +'\n'; - str += D.join('\n'); // add line-breaks - } - - if (display) alert(str); // display data - if (html) str=str.replace(/\n/g, '
').replace(/ /g, '  '); // format as HTML - return str; - - function parse ( data, prefix, parentType ) { - var first = true; - try { - $.each( data, function (key, val) { - skip = (keys && keys.indexOf(','+key+',') === -1); - type = $.type(val); - if (type==='object' && $.isPlainObject(val)) - type = 'hash'; - k = prefix + (first ? ' ' : ', '); - first = false; - - if (parentType!=='array') // no key-names for array items - k += key+': '; // NOT an array - - if (type==="date" || type==="regexp") { - val = val.toString(); - type = "string"; - } - if (type==="string") { // STRING - if (!skip) D[i++] = k +'"'+ val +'"'; - } - // NULL, UNDEFINED, NUMBER or BOOLEAN - else if (/^(null|undefined|number|boolean)/.test(type)) { - if (!skip) D[i++] = k + val; - } - else if (type==="function") { // FUNCTION - if (!skip) D[i++] = k +'function()'; - } - else if (type==="array") { // ARRAY - if (!skip) { - D[i++] = k +'['; - parse( val, prefix+' ',type); // RECURSE - D[i++] = prefix +' ]'; - } - } - else if (val.jquery) { // JQUERY OBJECT - if (!skip) D[i++] = k +'jQuery ('+ val.length +') context="'+ val.context +'"'; - } - else if (val.nodeName) { // DOM ELEMENT - var id = val.id, cls=val.className, src=val.src, hrf=val.href; - if (skip) D[i++] = k +' '+ - id ? 'id="'+ id+'"' : - src ? 'src="'+ src+'"' : - hrf ? 'href="'+ hrf+'"' : - cls ? 'class="'+cls+'"' : - ''; - } - else if (type==="hash") { // JSON - if (!recurse || $.isEmptyObject(val)) { // show an empty hash - if (!skip) D[i++] = k +'{ }'; - } - else { // recurse into JSON hash - indent output - D[i++] = k +'{'; - parse( val, prefix+' ',type); // RECURSE - D[i++] = prefix +' }'; - } - } - else { // OBJECT - if (!skip) D[i++] = k +'OBJECT'; // NOT a hash - } - }); - } catch (e) {} - } -}; - -function debugStackTrace (s_Title, options) { - var - callstack = [] - , isCallstackPopulated = false - ; - try { - i.dont.exist += 0; // doesn't exist- that's the point - } catch(e) { - if (e.stack) { // Firefox - var lines = e.stack.split('\n'); - for (var i=0, len=lines.length; i') - .html( content.replace(/\n/g, '
').replace(/ /g, '  ') ) // format as HTML - .css( options.css ) - ; -}; diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js deleted file mode 100644 index 1c998bab..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js +++ /dev/null @@ -1,9555 +0,0 @@ -/*! - * jQuery JavaScript Library v1.9.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-1-14 - */ -(function( window, undefined ) { -"use strict"; -var - // A central reference to the root jQuery(document) - rootjQuery, - - // The deferred used on DOM ready - readyList, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.9.0", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, all, a, select, opt, input, fragment, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
a"; - - // Support tests won't run in some limited or non-browser environments - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - if ( !all || !a || !all.length ) { - return {}; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - support = { - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - checkOn: !!input.value, - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Tests for enctype support on a form (#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: document.compatMode === "CSS1Compat", - - // Will be defined later - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
t
"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - body.style.zoom = 1; - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})(); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt /* For internal use only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data, false ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name, false ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - // Try to fetch any internally stored data first - return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - } - - this.each(function() { - jQuery.data( this, key, value ); - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - hooks.cur = fn; - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - // Toggle whole class name - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - // In IE9+, Flash objects don't have .getAttribute (#12945) - // Support: IE9+ - if ( typeof elem.getAttribute !== "undefined" ) { - ret = elem.getAttribute( name ); - } - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( rboolean.test( name ) ) { - // Set corresponding property to false for boolean attributes - // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 - if ( !getSetAttribute && ruseDefault.test( name ) ) { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } else { - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - var - // Use .prop to determine if this attribute is understood as boolean - prop = jQuery.prop( elem, name ), - - // Fetch it accordingly - attr = typeof prop === "boolean" && elem.getAttribute( name ), - detail = typeof prop === "boolean" ? - - getSetInput && getSetAttribute ? - attr != null : - // oldIE fabricates an empty string for missing boolean attributes - // and conflates checked/selected into attroperties - ruseDefault.test( name ) ? - elem[ jQuery.camelCase( "default-" + name ) ] : - !!attr : - - // fetch an attribute node for properties not recognized as boolean - elem.getAttributeNode( name ); - - return detail && detail.value !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; - -// fix oldIE value attroperty -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return jQuery.nodeName( elem, "input" ) ? - - // Ignore the value *property* by using defaultValue - elem.defaultValue : - - ret && ret.specified ? ret.value : undefined; - }, - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret == null ? undefined : ret; - } - }); - }); - - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - // Don't attach events to noData or text/comment nodes (but allow plain objects) - elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem ); - - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = event.type || event, - namespaces = event.namespace ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - event.isTrigger = true; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - } - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== document.activeElement && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === document.activeElement && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var i, - cachedruns, - Expr, - getText, - isXML, - compile, - hasDuplicate, - outermostContext, - - // Local document vars - setDocument, - document, - docElem, - documentIsXML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - sortOrder, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - support = {}, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Array methods - arr = [], - pop = arr.pop, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - - rnative = /\{\s*\[native code\]\s*\}/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, - funescape = function( _, escaped ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - return high !== high ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Use a stripped-down slice if we can't use a native one -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -/** - * For feature detection - * @param {Function} fn The function to test for native support - */ -function isNative( fn ) { - return rnative.test( fn + "" ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var cache, - keys = []; - - return (cache = function( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - }); -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; - } -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !documentIsXML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - - // QSA path - if ( support.qsa && !rbuggyQSA.test(selector) ) { - old = true; - nid = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsXML = isXML( doc ); - - // Check if getElementsByTagName("*") returns only elements - support.tagNameNoComments = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if attributes should be retrieved by attribute nodes - support.attributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }); - - // Check if getElementsByClassName can be trusted - support.getByClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } - - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }); - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - support.getByName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
"; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = doc.getElementsByName && - // buggy browsers will return fewer than the correct 2 - doc.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - doc.getElementsByName( expando + 0 ).length; - support.getIdNotName = !doc.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - - // IE6/7 return modified attributes - Expr.attrHandle = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }) ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; - - // ID find and filter - if ( support.getIdNotName ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.tagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Name - Expr.find["NAME"] = support.getByName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; - - // Class - Expr.find["CLASS"] = support.getByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { - return context.getElementsByClassName( className ); - } - }; - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21), - // no need to also add to buggyMatches since matches checks buggyQSA - // A support test would require too much code (would include document ready) - rbuggyQSA = [ ":focus" ]; - - if ( (support.qsa = isNative(doc.querySelectorAll)) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE8 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = ""; - if ( div.querySelectorAll("[i^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - var compare; - - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { - if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { - if ( a === doc || contains( preferredDoc, a ) ) { - return -1; - } - if ( b === doc || contains( preferredDoc, b ) ) { - return 1; - } - return 0; - } - return compare & 4 ? -1 : 1; - } - - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE ); - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - // Always assume the presence of duplicates if sort doesn't - // pass them to our comparison function (as in Google Chrome). - hasDuplicate = false; - [0, 0].sort( sortOrder ); - support.detectDuplicates = hasDuplicate; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyQSA always contains :focus, so no need for an existence check - if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - var val; - - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( !documentIsXML ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); - } - if ( documentIsXML || support.attributes ) { - return elem.getAttribute( name ); - } - return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? - name : - val && val.specified ? val.value : null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - i = 1, - j = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -function siblingCheck( a, b ) { - var cur = a && b && a.nextSibling; - - for ( ; cur; cur = cur.nextSibling ) { - if ( cur === b ) { - return -1; - } - } - - return a ? 1 : -1; -} - -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[4] ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - - nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.substr( result.length - check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifider - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsXML ? - elem.getAttribute("xml:lang") || elem.getAttribute("lang") : - elem.lang) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push( { - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && combinator.dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Nested matchers should use non-integer dirruns - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - for ( j = 0; (matcher = elementMatchers[j]); j++ ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - // `i` starts as a string, so matchedCount would equal "00" if there are no elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - for ( j = 0; (matcher = setMatchers[j]); j++ ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !documentIsXML && - Expr.relative[ tokens[1].type ] ) { - - context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - documentIsXML, - results, - rsibling.test( selector ) - ); - return results; -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Easy API for creating new setFilters -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Initialize with the default document -setDocument(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, ret, self; - - if ( typeof selector !== "string" ) { - self = this; - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < self.length; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - ret = []; - for ( i = 0; i < this.length; i++ ) { - jQuery.find( selector, this[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( jQuery.unique( ret ) ); - ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true) ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
", "
" ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - col: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - var isFunc = jQuery.isFunction( value ); - - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( !isFunc && typeof value !== "string" ) { - value = jQuery( value ).not( this ).detach(); - } - - return this.domManip( [ value ], true, function( elem ) { - var next = this.nextSibling, - parent = this.parentNode; - - if ( parent && this.nodeType === 1 || this.nodeType === 11 ) { - - jQuery( this ).remove(); - - if ( next ) { - next.parentNode.insertBefore( elem, next ); - } else { - parent.appendChild( elem ); - } - } - }); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, table ? self.html() : undefined ); - } - self.domManip( args, table, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - node, - i - ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery.ajax({ - url: node.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - var attr = elem.getAttributeNode("type"); - elem.type = ( attr && attr.specified ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, data, e; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, srcElements, node, i, clone, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var contains, elem, tag, tmp, wrap, tbody, j, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== "undefined" ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - } -}); -var curCSS, getStyles, iframe, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else if ( !values[ index ] && !isHidden( elem ) ) { - jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) ); - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - var bool = typeof state === "boolean"; - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("' : ''); - inst._keyEvent = false; - return html; - }, - - /* Generate the month and year header. */ - _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, - secondary, monthNames, monthNamesShort) { - var changeMonth = this._get(inst, 'changeMonth'); - var changeYear = this._get(inst, 'changeYear'); - var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); - var html = '
'; - var monthHtml = ''; - // month selection - if (secondary || !changeMonth) - monthHtml += '' + monthNames[drawMonth] + ''; - else { - var inMinYear = (minDate && minDate.getFullYear() == drawYear); - var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); - monthHtml += ''; - } - if (!showMonthAfterYear) - html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); - // year selection - if ( !inst.yearshtml ) { - inst.yearshtml = ''; - if (secondary || !changeYear) - html += '' + drawYear + ''; - else { - // determine range of years to display - var years = this._get(inst, 'yearRange').split(':'); - var thisYear = new Date().getFullYear(); - var determineYear = function(value) { - var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) : - (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) : - parseInt(value, 10))); - return (isNaN(year) ? thisYear : year); - }; - var year = determineYear(years[0]); - var endYear = Math.max(year, determineYear(years[1] || '')); - year = (minDate ? Math.max(year, minDate.getFullYear()) : year); - endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); - inst.yearshtml += ''; - - html += inst.yearshtml; - inst.yearshtml = null; - } - } - html += this._get(inst, 'yearSuffix'); - if (showMonthAfterYear) - html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; - html += '
'; // Close datepicker_header - return html; - }, - - /* Adjust one of the date sub-fields. */ - _adjustInstDate: function(inst, offset, period) { - var year = inst.drawYear + (period == 'Y' ? offset : 0); - var month = inst.drawMonth + (period == 'M' ? offset : 0); - var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + - (period == 'D' ? offset : 0); - var date = this._restrictMinMax(inst, - this._daylightSavingAdjust(new Date(year, month, day))); - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - if (period == 'M' || period == 'Y') - this._notifyChange(inst); - }, - - /* Ensure a date is within any min/max bounds. */ - _restrictMinMax: function(inst, date) { - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - var newDate = (minDate && date < minDate ? minDate : date); - newDate = (maxDate && newDate > maxDate ? maxDate : newDate); - return newDate; - }, - - /* Notify change of month/year. */ - _notifyChange: function(inst) { - var onChange = this._get(inst, 'onChangeMonthYear'); - if (onChange) - onChange.apply((inst.input ? inst.input[0] : null), - [inst.selectedYear, inst.selectedMonth + 1, inst]); - }, - - /* Determine the number of months to show. */ - _getNumberOfMonths: function(inst) { - var numMonths = this._get(inst, 'numberOfMonths'); - return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); - }, - - /* Determine the current maximum date - ensure no time components are set. */ - _getMinMaxDate: function(inst, minMax) { - return this._determineDate(inst, this._get(inst, minMax + 'Date'), null); - }, - - /* Find the number of days in a given month. */ - _getDaysInMonth: function(year, month) { - return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); - }, - - /* Find the day of the week of the first of a month. */ - _getFirstDayOfMonth: function(year, month) { - return new Date(year, month, 1).getDay(); - }, - - /* Determines if we should allow a "next/prev" month display change. */ - _canAdjustMonth: function(inst, offset, curYear, curMonth) { - var numMonths = this._getNumberOfMonths(inst); - var date = this._daylightSavingAdjust(new Date(curYear, - curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); - if (offset < 0) - date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); - return this._isInRange(inst, date); - }, - - /* Is the given date in the accepted range? */ - _isInRange: function(inst, date) { - var minDate = this._getMinMaxDate(inst, 'min'); - var maxDate = this._getMinMaxDate(inst, 'max'); - return ((!minDate || date.getTime() >= minDate.getTime()) && - (!maxDate || date.getTime() <= maxDate.getTime())); - }, - - /* Provide the configuration settings for formatting/parsing. */ - _getFormatConfig: function(inst) { - var shortYearCutoff = this._get(inst, 'shortYearCutoff'); - shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : - new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); - return {shortYearCutoff: shortYearCutoff, - dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), - monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; - }, - - /* Format the given date for display. */ - _formatDate: function(inst, day, month, year) { - if (!day) { - inst.currentDay = inst.selectedDay; - inst.currentMonth = inst.selectedMonth; - inst.currentYear = inst.selectedYear; - } - var date = (day ? (typeof day == 'object' ? day : - this._daylightSavingAdjust(new Date(year, month, day))) : - this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); - return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); - } -}); - -/* - * Bind hover events for datepicker elements. - * Done via delegate so the binding only occurs once in the lifetime of the parent div. - * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. - */ -function bindHover(dpDiv) { - var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a'; - return dpDiv.delegate(selector, 'mouseout', function() { - $(this).removeClass('ui-state-hover'); - if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover'); - if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover'); - }) - .delegate(selector, 'mouseover', function(){ - if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { - $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); - $(this).addClass('ui-state-hover'); - if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover'); - if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover'); - } - }); -} - -/* jQuery extend now ignores nulls! */ -function extendRemove(target, props) { - $.extend(target, props); - for (var name in props) - if (props[name] == null || props[name] == undefined) - target[name] = props[name]; - return target; -}; - -/* Invoke the datepicker functionality. - @param options string - a command, optionally followed by additional parameters or - Object - settings for attaching new datepicker functionality - @return jQuery object */ -$.fn.datepicker = function(options){ - - /* Verify an empty collection wasn't passed - Fixes #6976 */ - if ( !this.length ) { - return this; - } - - /* Initialise the date picker. */ - if (!$.datepicker.initialized) { - $(document).mousedown($.datepicker._checkExternalClick). - find(document.body).append($.datepicker.dpDiv); - $.datepicker.initialized = true; - } - - var otherArgs = Array.prototype.slice.call(arguments, 1); - if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget')) - return $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this[0]].concat(otherArgs)); - if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') - return $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this[0]].concat(otherArgs)); - return this.each(function() { - typeof options == 'string' ? - $.datepicker['_' + options + 'Datepicker']. - apply($.datepicker, [this].concat(otherArgs)) : - $.datepicker._attachDatepicker(this, options); - }); -}; - -$.datepicker = new Datepicker(); // singleton instance -$.datepicker.initialized = false; -$.datepicker.uuid = new Date().getTime(); -$.datepicker.version = "1.9.2"; - -// Workaround for #4055 -// Add another global to avoid noConflict issues with inline event handlers -window['DP_jQuery_' + dpuuid] = $; - -})(jQuery); -(function( $, undefined ) { - -var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ", - sizeRelatedOptions = { - buttons: true, - height: true, - maxHeight: true, - maxWidth: true, - minHeight: true, - minWidth: true, - width: true - }, - resizableRelatedOptions = { - maxHeight: true, - maxWidth: true, - minHeight: true, - minWidth: true - }; - -$.widget("ui.dialog", { - version: "1.9.2", - options: { - autoOpen: true, - buttons: {}, - closeOnEscape: true, - closeText: "close", - dialogClass: "", - draggable: true, - hide: null, - height: "auto", - maxHeight: false, - maxWidth: false, - minHeight: 150, - minWidth: 150, - modal: false, - position: { - my: "center", - at: "center", - of: window, - collision: "fit", - // ensure that the titlebar is never outside the document - using: function( pos ) { - var topOffset = $( this ).css( pos ).offset().top; - if ( topOffset < 0 ) { - $( this ).css( "top", pos.top - topOffset ); - } - } - }, - resizable: true, - show: null, - stack: true, - title: "", - width: 300, - zIndex: 1000 - }, - - _create: function() { - this.originalTitle = this.element.attr( "title" ); - // #5742 - .attr() might return a DOMElement - if ( typeof this.originalTitle !== "string" ) { - this.originalTitle = ""; - } - this.oldPosition = { - parent: this.element.parent(), - index: this.element.parent().children().index( this.element ) - }; - this.options.title = this.options.title || this.originalTitle; - var that = this, - options = this.options, - - title = options.title || " ", - uiDialog, - uiDialogTitlebar, - uiDialogTitlebarClose, - uiDialogTitle, - uiDialogButtonPane; - - uiDialog = ( this.uiDialog = $( "
" ) ) - .addClass( uiDialogClasses + options.dialogClass ) - .css({ - display: "none", - outline: 0, // TODO: move to stylesheet - zIndex: options.zIndex - }) - // setting tabIndex makes the div focusable - .attr( "tabIndex", -1) - .keydown(function( event ) { - if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && - event.keyCode === $.ui.keyCode.ESCAPE ) { - that.close( event ); - event.preventDefault(); - } - }) - .mousedown(function( event ) { - that.moveToTop( false, event ); - }) - .appendTo( "body" ); - - this.element - .show() - .removeAttr( "title" ) - .addClass( "ui-dialog-content ui-widget-content" ) - .appendTo( uiDialog ); - - uiDialogTitlebar = ( this.uiDialogTitlebar = $( "
" ) ) - .addClass( "ui-dialog-titlebar ui-widget-header " + - "ui-corner-all ui-helper-clearfix" ) - .bind( "mousedown", function() { - // Dialog isn't getting focus when dragging (#8063) - uiDialog.focus(); - }) - .prependTo( uiDialog ); - - uiDialogTitlebarClose = $( "" ) - .addClass( "ui-dialog-titlebar-close ui-corner-all" ) - .attr( "role", "button" ) - .click(function( event ) { - event.preventDefault(); - that.close( event ); - }) - .appendTo( uiDialogTitlebar ); - - ( this.uiDialogTitlebarCloseText = $( "" ) ) - .addClass( "ui-icon ui-icon-closethick" ) - .text( options.closeText ) - .appendTo( uiDialogTitlebarClose ); - - uiDialogTitle = $( "" ) - .uniqueId() - .addClass( "ui-dialog-title" ) - .html( title ) - .prependTo( uiDialogTitlebar ); - - uiDialogButtonPane = ( this.uiDialogButtonPane = $( "
" ) ) - .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); - - ( this.uiButtonSet = $( "
" ) ) - .addClass( "ui-dialog-buttonset" ) - .appendTo( uiDialogButtonPane ); - - uiDialog.attr({ - role: "dialog", - "aria-labelledby": uiDialogTitle.attr( "id" ) - }); - - uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection(); - this._hoverable( uiDialogTitlebarClose ); - this._focusable( uiDialogTitlebarClose ); - - if ( options.draggable && $.fn.draggable ) { - this._makeDraggable(); - } - if ( options.resizable && $.fn.resizable ) { - this._makeResizable(); - } - - this._createButtons( options.buttons ); - this._isOpen = false; - - if ( $.fn.bgiframe ) { - uiDialog.bgiframe(); - } - - // prevent tabbing out of modal dialogs - this._on( uiDialog, { keydown: function( event ) { - if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) { - return; - } - - var tabbables = $( ":tabbable", uiDialog ), - first = tabbables.filter( ":first" ), - last = tabbables.filter( ":last" ); - - if ( event.target === last[0] && !event.shiftKey ) { - first.focus( 1 ); - return false; - } else if ( event.target === first[0] && event.shiftKey ) { - last.focus( 1 ); - return false; - } - }}); - }, - - _init: function() { - if ( this.options.autoOpen ) { - this.open(); - } - }, - - _destroy: function() { - var next, - oldPosition = this.oldPosition; - - if ( this.overlay ) { - this.overlay.destroy(); - } - this.uiDialog.hide(); - this.element - .removeClass( "ui-dialog-content ui-widget-content" ) - .hide() - .appendTo( "body" ); - this.uiDialog.remove(); - - if ( this.originalTitle ) { - this.element.attr( "title", this.originalTitle ); - } - - next = oldPosition.parent.children().eq( oldPosition.index ); - // Don't try to place the dialog next to itself (#8613) - if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { - next.before( this.element ); - } else { - oldPosition.parent.append( this.element ); - } - }, - - widget: function() { - return this.uiDialog; - }, - - close: function( event ) { - var that = this, - maxZ, thisZ; - - if ( !this._isOpen ) { - return; - } - - if ( false === this._trigger( "beforeClose", event ) ) { - return; - } - - this._isOpen = false; - - if ( this.overlay ) { - this.overlay.destroy(); - } - - if ( this.options.hide ) { - this._hide( this.uiDialog, this.options.hide, function() { - that._trigger( "close", event ); - }); - } else { - this.uiDialog.hide(); - this._trigger( "close", event ); - } - - $.ui.dialog.overlay.resize(); - - // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) - if ( this.options.modal ) { - maxZ = 0; - $( ".ui-dialog" ).each(function() { - if ( this !== that.uiDialog[0] ) { - thisZ = $( this ).css( "z-index" ); - if ( !isNaN( thisZ ) ) { - maxZ = Math.max( maxZ, thisZ ); - } - } - }); - $.ui.dialog.maxZ = maxZ; - } - - return this; - }, - - isOpen: function() { - return this._isOpen; - }, - - // the force parameter allows us to move modal dialogs to their correct - // position on open - moveToTop: function( force, event ) { - var options = this.options, - saveScroll; - - if ( ( options.modal && !force ) || - ( !options.stack && !options.modal ) ) { - return this._trigger( "focus", event ); - } - - if ( options.zIndex > $.ui.dialog.maxZ ) { - $.ui.dialog.maxZ = options.zIndex; - } - if ( this.overlay ) { - $.ui.dialog.maxZ += 1; - $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ; - this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ ); - } - - // Save and then restore scroll - // Opera 9.5+ resets when parent z-index is changed. - // http://bugs.jqueryui.com/ticket/3193 - saveScroll = { - scrollTop: this.element.scrollTop(), - scrollLeft: this.element.scrollLeft() - }; - $.ui.dialog.maxZ += 1; - this.uiDialog.css( "z-index", $.ui.dialog.maxZ ); - this.element.attr( saveScroll ); - this._trigger( "focus", event ); - - return this; - }, - - open: function() { - if ( this._isOpen ) { - return; - } - - var hasFocus, - options = this.options, - uiDialog = this.uiDialog; - - this._size(); - this._position( options.position ); - uiDialog.show( options.show ); - this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null; - this.moveToTop( true ); - - // set focus to the first tabbable element in the content area or the first button - // if there are no tabbable elements, set focus on the dialog itself - hasFocus = this.element.find( ":tabbable" ); - if ( !hasFocus.length ) { - hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); - if ( !hasFocus.length ) { - hasFocus = uiDialog; - } - } - hasFocus.eq( 0 ).focus(); - - this._isOpen = true; - this._trigger( "open" ); - - return this; - }, - - _createButtons: function( buttons ) { - var that = this, - hasButtons = false; - - // if we already have a button pane, remove it - this.uiDialogButtonPane.remove(); - this.uiButtonSet.empty(); - - if ( typeof buttons === "object" && buttons !== null ) { - $.each( buttons, function() { - return !(hasButtons = true); - }); - } - if ( hasButtons ) { - $.each( buttons, function( name, props ) { - var button, click; - props = $.isFunction( props ) ? - { click: props, text: name } : - props; - // Default to a non-submitting button - props = $.extend( { type: "button" }, props ); - // Change the context for the click callback to be the main element - click = props.click; - props.click = function() { - click.apply( that.element[0], arguments ); - }; - button = $( "", props ) - .appendTo( that.uiButtonSet ); - if ( $.fn.button ) { - button.button(); - } - }); - this.uiDialog.addClass( "ui-dialog-buttons" ); - this.uiDialogButtonPane.appendTo( this.uiDialog ); - } else { - this.uiDialog.removeClass( "ui-dialog-buttons" ); - } - }, - - _makeDraggable: function() { - var that = this, - options = this.options; - - function filteredUi( ui ) { - return { - position: ui.position, - offset: ui.offset - }; - } - - this.uiDialog.draggable({ - cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", - handle: ".ui-dialog-titlebar", - containment: "document", - start: function( event, ui ) { - $( this ) - .addClass( "ui-dialog-dragging" ); - that._trigger( "dragStart", event, filteredUi( ui ) ); - }, - drag: function( event, ui ) { - that._trigger( "drag", event, filteredUi( ui ) ); - }, - stop: function( event, ui ) { - options.position = [ - ui.position.left - that.document.scrollLeft(), - ui.position.top - that.document.scrollTop() - ]; - $( this ) - .removeClass( "ui-dialog-dragging" ); - that._trigger( "dragStop", event, filteredUi( ui ) ); - $.ui.dialog.overlay.resize(); - } - }); - }, - - _makeResizable: function( handles ) { - handles = (handles === undefined ? this.options.resizable : handles); - var that = this, - options = this.options, - // .ui-resizable has position: relative defined in the stylesheet - // but dialogs have to use absolute or fixed positioning - position = this.uiDialog.css( "position" ), - resizeHandles = typeof handles === 'string' ? - handles : - "n,e,s,w,se,sw,ne,nw"; - - function filteredUi( ui ) { - return { - originalPosition: ui.originalPosition, - originalSize: ui.originalSize, - position: ui.position, - size: ui.size - }; - } - - this.uiDialog.resizable({ - cancel: ".ui-dialog-content", - containment: "document", - alsoResize: this.element, - maxWidth: options.maxWidth, - maxHeight: options.maxHeight, - minWidth: options.minWidth, - minHeight: this._minHeight(), - handles: resizeHandles, - start: function( event, ui ) { - $( this ).addClass( "ui-dialog-resizing" ); - that._trigger( "resizeStart", event, filteredUi( ui ) ); - }, - resize: function( event, ui ) { - that._trigger( "resize", event, filteredUi( ui ) ); - }, - stop: function( event, ui ) { - $( this ).removeClass( "ui-dialog-resizing" ); - options.height = $( this ).height(); - options.width = $( this ).width(); - that._trigger( "resizeStop", event, filteredUi( ui ) ); - $.ui.dialog.overlay.resize(); - } - }) - .css( "position", position ) - .find( ".ui-resizable-se" ) - .addClass( "ui-icon ui-icon-grip-diagonal-se" ); - }, - - _minHeight: function() { - var options = this.options; - - if ( options.height === "auto" ) { - return options.minHeight; - } else { - return Math.min( options.minHeight, options.height ); - } - }, - - _position: function( position ) { - var myAt = [], - offset = [ 0, 0 ], - isVisible; - - if ( position ) { - // deep extending converts arrays to objects in jQuery <= 1.3.2 :-( - // if (typeof position == 'string' || $.isArray(position)) { - // myAt = $.isArray(position) ? position : position.split(' '); - - if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) { - myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ]; - if ( myAt.length === 1 ) { - myAt[ 1 ] = myAt[ 0 ]; - } - - $.each( [ "left", "top" ], function( i, offsetPosition ) { - if ( +myAt[ i ] === myAt[ i ] ) { - offset[ i ] = myAt[ i ]; - myAt[ i ] = offsetPosition; - } - }); - - position = { - my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " + - myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]), - at: myAt.join( " " ) - }; - } - - position = $.extend( {}, $.ui.dialog.prototype.options.position, position ); - } else { - position = $.ui.dialog.prototype.options.position; - } - - // need to show the dialog to get the actual offset in the position plugin - isVisible = this.uiDialog.is( ":visible" ); - if ( !isVisible ) { - this.uiDialog.show(); - } - this.uiDialog.position( position ); - if ( !isVisible ) { - this.uiDialog.hide(); - } - }, - - _setOptions: function( options ) { - var that = this, - resizableOptions = {}, - resize = false; - - $.each( options, function( key, value ) { - that._setOption( key, value ); - - if ( key in sizeRelatedOptions ) { - resize = true; - } - if ( key in resizableRelatedOptions ) { - resizableOptions[ key ] = value; - } - }); - - if ( resize ) { - this._size(); - } - if ( this.uiDialog.is( ":data(resizable)" ) ) { - this.uiDialog.resizable( "option", resizableOptions ); - } - }, - - _setOption: function( key, value ) { - var isDraggable, isResizable, - uiDialog = this.uiDialog; - - switch ( key ) { - case "buttons": - this._createButtons( value ); - break; - case "closeText": - // ensure that we always pass a string - this.uiDialogTitlebarCloseText.text( "" + value ); - break; - case "dialogClass": - uiDialog - .removeClass( this.options.dialogClass ) - .addClass( uiDialogClasses + value ); - break; - case "disabled": - if ( value ) { - uiDialog.addClass( "ui-dialog-disabled" ); - } else { - uiDialog.removeClass( "ui-dialog-disabled" ); - } - break; - case "draggable": - isDraggable = uiDialog.is( ":data(draggable)" ); - if ( isDraggable && !value ) { - uiDialog.draggable( "destroy" ); - } - - if ( !isDraggable && value ) { - this._makeDraggable(); - } - break; - case "position": - this._position( value ); - break; - case "resizable": - // currently resizable, becoming non-resizable - isResizable = uiDialog.is( ":data(resizable)" ); - if ( isResizable && !value ) { - uiDialog.resizable( "destroy" ); - } - - // currently resizable, changing handles - if ( isResizable && typeof value === "string" ) { - uiDialog.resizable( "option", "handles", value ); - } - - // currently non-resizable, becoming resizable - if ( !isResizable && value !== false ) { - this._makeResizable( value ); - } - break; - case "title": - // convert whatever was passed in o a string, for html() to not throw up - $( ".ui-dialog-title", this.uiDialogTitlebar ) - .html( "" + ( value || " " ) ); - break; - } - - this._super( key, value ); - }, - - _size: function() { - /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content - * divs will both have width and height set, so we need to reset them - */ - var nonContentHeight, minContentHeight, autoHeight, - options = this.options, - isVisible = this.uiDialog.is( ":visible" ); - - // reset content sizing - this.element.show().css({ - width: "auto", - minHeight: 0, - height: 0 - }); - - if ( options.minWidth > options.width ) { - options.width = options.minWidth; - } - - // reset wrapper sizing - // determine the height of all the non-content elements - nonContentHeight = this.uiDialog.css({ - height: "auto", - width: options.width - }) - .outerHeight(); - minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); - - if ( options.height === "auto" ) { - // only needed for IE6 support - if ( $.support.minHeight ) { - this.element.css({ - minHeight: minContentHeight, - height: "auto" - }); - } else { - this.uiDialog.show(); - autoHeight = this.element.css( "height", "auto" ).height(); - if ( !isVisible ) { - this.uiDialog.hide(); - } - this.element.height( Math.max( autoHeight, minContentHeight ) ); - } - } else { - this.element.height( Math.max( options.height - nonContentHeight, 0 ) ); - } - - if (this.uiDialog.is( ":data(resizable)" ) ) { - this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); - } - } -}); - -$.extend($.ui.dialog, { - uuid: 0, - maxZ: 0, - - getTitleId: function($el) { - var id = $el.attr( "id" ); - if ( !id ) { - this.uuid += 1; - id = this.uuid; - } - return "ui-dialog-title-" + id; - }, - - overlay: function( dialog ) { - this.$el = $.ui.dialog.overlay.create( dialog ); - } -}); - -$.extend( $.ui.dialog.overlay, { - instances: [], - // reuse old instances due to IE memory leak with alpha transparency (see #5185) - oldInstances: [], - maxZ: 0, - events: $.map( - "focus,mousedown,mouseup,keydown,keypress,click".split( "," ), - function( event ) { - return event + ".dialog-overlay"; - } - ).join( " " ), - create: function( dialog ) { - if ( this.instances.length === 0 ) { - // prevent use of anchors and inputs - // we use a setTimeout in case the overlay is created from an - // event that we're going to be cancelling (see #2804) - setTimeout(function() { - // handle $(el).dialog().dialog('close') (see #4065) - if ( $.ui.dialog.overlay.instances.length ) { - $( document ).bind( $.ui.dialog.overlay.events, function( event ) { - // stop events if the z-index of the target is < the z-index of the overlay - // we cannot return true when we don't want to cancel the event (#3523) - if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) { - return false; - } - }); - } - }, 1 ); - - // handle window resize - $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize ); - } - - var $el = ( this.oldInstances.pop() || $( "
" ).addClass( "ui-widget-overlay" ) ); - - // allow closing by pressing the escape key - $( document ).bind( "keydown.dialog-overlay", function( event ) { - var instances = $.ui.dialog.overlay.instances; - // only react to the event if we're the top overlay - if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el && - dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && - event.keyCode === $.ui.keyCode.ESCAPE ) { - - dialog.close( event ); - event.preventDefault(); - } - }); - - $el.appendTo( document.body ).css({ - width: this.width(), - height: this.height() - }); - - if ( $.fn.bgiframe ) { - $el.bgiframe(); - } - - this.instances.push( $el ); - return $el; - }, - - destroy: function( $el ) { - var indexOf = $.inArray( $el, this.instances ), - maxZ = 0; - - if ( indexOf !== -1 ) { - this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] ); - } - - if ( this.instances.length === 0 ) { - $( [ document, window ] ).unbind( ".dialog-overlay" ); - } - - $el.height( 0 ).width( 0 ).remove(); - - // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) - $.each( this.instances, function() { - maxZ = Math.max( maxZ, this.css( "z-index" ) ); - }); - this.maxZ = maxZ; - }, - - height: function() { - var scrollHeight, - offsetHeight; - // handle IE - if ( $.ui.ie ) { - scrollHeight = Math.max( - document.documentElement.scrollHeight, - document.body.scrollHeight - ); - offsetHeight = Math.max( - document.documentElement.offsetHeight, - document.body.offsetHeight - ); - - if ( scrollHeight < offsetHeight ) { - return $( window ).height() + "px"; - } else { - return scrollHeight + "px"; - } - // handle "good" browsers - } else { - return $( document ).height() + "px"; - } - }, - - width: function() { - var scrollWidth, - offsetWidth; - // handle IE - if ( $.ui.ie ) { - scrollWidth = Math.max( - document.documentElement.scrollWidth, - document.body.scrollWidth - ); - offsetWidth = Math.max( - document.documentElement.offsetWidth, - document.body.offsetWidth - ); - - if ( scrollWidth < offsetWidth ) { - return $( window ).width() + "px"; - } else { - return scrollWidth + "px"; - } - // handle "good" browsers - } else { - return $( document ).width() + "px"; - } - }, - - resize: function() { - /* If the dialog is draggable and the user drags it past the - * right edge of the window, the document becomes wider so we - * need to stretch the overlay. If the user then drags the - * dialog back to the left, the document will become narrower, - * so we need to shrink the overlay to the appropriate size. - * This is handled by shrinking the overlay before setting it - * to the full document size. - */ - var $overlays = $( [] ); - $.each( $.ui.dialog.overlay.instances, function() { - $overlays = $overlays.add( this ); - }); - - $overlays.css({ - width: 0, - height: 0 - }).css({ - width: $.ui.dialog.overlay.width(), - height: $.ui.dialog.overlay.height() - }); - } -}); - -$.extend( $.ui.dialog.overlay.prototype, { - destroy: function() { - $.ui.dialog.overlay.destroy( this.$el ); - } -}); - -}( jQuery ) ); -(function( $, undefined ) { - -$.widget("ui.draggable", $.ui.mouse, { - version: "1.9.2", - widgetEventPrefix: "drag", - options: { - addClasses: true, - appendTo: "parent", - axis: false, - connectToSortable: false, - containment: false, - cursor: "auto", - cursorAt: false, - grid: false, - handle: false, - helper: "original", - iframeFix: false, - opacity: false, - refreshPositions: false, - revert: false, - revertDuration: 500, - scope: "default", - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - snap: false, - snapMode: "both", - snapTolerance: 20, - stack: false, - zIndex: false - }, - _create: function() { - - if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) - this.element[0].style.position = 'relative'; - - (this.options.addClasses && this.element.addClass("ui-draggable")); - (this.options.disabled && this.element.addClass("ui-draggable-disabled")); - - this._mouseInit(); - - }, - - _destroy: function() { - this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); - this._mouseDestroy(); - }, - - _mouseCapture: function(event) { - - var o = this.options; - - // among others, prevent a drag on a resizable-handle - if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle')) - return false; - - //Quit if we're not on a valid handle - this.handle = this._getHandle(event); - if (!this.handle) - return false; - - $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { - $('
') - .css({ - width: this.offsetWidth+"px", height: this.offsetHeight+"px", - position: "absolute", opacity: "0.001", zIndex: 1000 - }) - .css($(this).offset()) - .appendTo("body"); - }); - - return true; - - }, - - _mouseStart: function(event) { - - var o = this.options; - - //Create and append the visible helper - this.helper = this._createHelper(event); - - this.helper.addClass("ui-draggable-dragging"); - - //Cache the helper size - this._cacheHelperProportions(); - - //If ddmanager is used for droppables, set the global draggable - if($.ui.ddmanager) - $.ui.ddmanager.current = this; - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Store the helper's css position - this.cssPosition = this.helper.css("position"); - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.positionAbs = this.element.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - //Generate the original position - this.originalPosition = this.position = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Set a containment if given in the options - if(o.containment) - this._setContainment(); - - //Trigger event + callbacks - if(this._trigger("start", event) === false) { - this._clear(); - return false; - } - - //Recache the helper size - this._cacheHelperProportions(); - - //Prepare the droppable offsets - if ($.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(this, event); - - - this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position - - //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) - if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event); - - return true; - }, - - _mouseDrag: function(event, noPropagation) { - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - //Call plugins and callbacks and use the resulting position if something is returned - if (!noPropagation) { - var ui = this._uiHash(); - if(this._trigger('drag', event, ui) === false) { - this._mouseUp({}); - return false; - } - this.position = ui.position; - } - - if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; - if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; - if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); - - return false; - }, - - _mouseStop: function(event) { - - //If we are using droppables, inform the manager about the drop - var dropped = false; - if ($.ui.ddmanager && !this.options.dropBehaviour) - dropped = $.ui.ddmanager.drop(this, event); - - //if a drop comes from outside (a sortable) - if(this.dropped) { - dropped = this.dropped; - this.dropped = false; - } - - //if the original element is no longer in the DOM don't bother to continue (see #8269) - var element = this.element[0], elementInDom = false; - while ( element && (element = element.parentNode) ) { - if (element == document ) { - elementInDom = true; - } - } - if ( !elementInDom && this.options.helper === "original" ) - return false; - - if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { - var that = this; - $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { - if(that._trigger("stop", event) !== false) { - that._clear(); - } - }); - } else { - if(this._trigger("stop", event) !== false) { - this._clear(); - } - } - - return false; - }, - - _mouseUp: function(event) { - //Remove frame helpers - $("div.ui-draggable-iframeFix").each(function() { - this.parentNode.removeChild(this); - }); - - //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) - if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event); - - return $.ui.mouse.prototype._mouseUp.call(this, event); - }, - - cancel: function() { - - if(this.helper.is(".ui-draggable-dragging")) { - this._mouseUp({}); - } else { - this._clear(); - } - - return this; - - }, - - _getHandle: function(event) { - - var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; - $(this.options.handle, this.element) - .find("*") - .andSelf() - .each(function() { - if(this == event.target) handle = true; - }); - - return handle; - - }, - - _createHelper: function(event) { - - var o = this.options; - var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element); - - if(!helper.parents('body').length) - helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); - - if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) - helper.css("position", "absolute"); - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj == 'string') { - obj = obj.split(' '); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ('left' in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ('right' in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ('top' in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ('bottom' in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information - || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix - po = { top: 0, left: 0 }; - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition == "relative") { - var p = this.element.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.element.css("marginLeft"),10) || 0), - top: (parseInt(this.element.css("marginTop"),10) || 0), - right: (parseInt(this.element.css("marginRight"),10) || 0), - bottom: (parseInt(this.element.css("marginBottom"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var o = this.options; - if(o.containment == 'parent') o.containment = this.helper[0].parentNode; - if(o.containment == 'document' || o.containment == 'window') this.containment = [ - o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, - o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, - (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left, - (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - - if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) { - var c = $(o.containment); - var ce = c[0]; if(!ce) return; - var co = c.offset(); - var over = ($(ce).css("overflow") != 'hidden'); - - this.containment = [ - (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0), - (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0), - (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, - (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom - ]; - this.relative_container = c; - - } else if(o.containment.constructor == Array) { - this.containment = o.containment; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) pos = this.position; - var mod = d == "absolute" ? 1 : -1; - var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top // The absolute mouse position - + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) - - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left // The absolute mouse position - + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) - - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - var pageX = event.pageX; - var pageY = event.pageY; - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - var containment; - if(this.containment) { - if (this.relative_container){ - var co = this.relative_container.offset(); - containment = [ this.containment[0] + co.left, - this.containment[1] + co.top, - this.containment[2] + co.left, - this.containment[3] + co.top ]; - } - else { - containment = this.containment; - } - - if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left; - if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top; - if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left; - if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top; - } - - if(o.grid) { - //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) - var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; - pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; - pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY // The absolute mouse position - - this.offset.click.top // Click offset (relative to the element) - - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.top // The offsetParent's offset without borders (offset + border) - + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX // The absolute mouse position - - this.offset.click.left // Click offset (relative to the element) - - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.left // The offsetParent's offset without borders (offset + border) - + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _clear: function() { - this.helper.removeClass("ui-draggable-dragging"); - if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); - //if($.ui.ddmanager) $.ui.ddmanager.current = null; - this.helper = null; - this.cancelHelperRemoval = false; - }, - - // From now on bulk stuff - mainly helpers - - _trigger: function(type, event, ui) { - ui = ui || this._uiHash(); - $.ui.plugin.call(this, type, [event, ui]); - if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins - return $.Widget.prototype._trigger.call(this, type, event, ui); - }, - - plugins: {}, - - _uiHash: function(event) { - return { - helper: this.helper, - position: this.position, - originalPosition: this.originalPosition, - offset: this.positionAbs - }; - } - -}); - -$.ui.plugin.add("draggable", "connectToSortable", { - start: function(event, ui) { - - var inst = $(this).data("draggable"), o = inst.options, - uiSortable = $.extend({}, ui, { item: inst.element }); - inst.sortables = []; - $(o.connectToSortable).each(function() { - var sortable = $.data(this, 'sortable'); - if (sortable && !sortable.options.disabled) { - inst.sortables.push({ - instance: sortable, - shouldRevert: sortable.options.revert - }); - sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). - sortable._trigger("activate", event, uiSortable); - } - }); - - }, - stop: function(event, ui) { - - //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper - var inst = $(this).data("draggable"), - uiSortable = $.extend({}, ui, { item: inst.element }); - - $.each(inst.sortables, function() { - if(this.instance.isOver) { - - this.instance.isOver = 0; - - inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance - this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) - - //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid' - if(this.shouldRevert) this.instance.options.revert = true; - - //Trigger the stop of the sortable - this.instance._mouseStop(event); - - this.instance.options.helper = this.instance.options._helper; - - //If the helper has been the original item, restore properties in the sortable - if(inst.options.helper == 'original') - this.instance.currentItem.css({ top: 'auto', left: 'auto' }); - - } else { - this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance - this.instance._trigger("deactivate", event, uiSortable); - } - - }); - - }, - drag: function(event, ui) { - - var inst = $(this).data("draggable"), that = this; - - var checkPos = function(o) { - var dyClick = this.offset.click.top, dxClick = this.offset.click.left; - var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left; - var itemHeight = o.height, itemWidth = o.width; - var itemTop = o.top, itemLeft = o.left; - - return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth); - }; - - $.each(inst.sortables, function(i) { - - var innermostIntersecting = false; - var thisSortable = this; - //Copy over some variables to allow calling the sortable's native _intersectsWith - this.instance.positionAbs = inst.positionAbs; - this.instance.helperProportions = inst.helperProportions; - this.instance.offset.click = inst.offset.click; - - if(this.instance._intersectsWith(this.instance.containerCache)) { - innermostIntersecting = true; - $.each(inst.sortables, function () { - this.instance.positionAbs = inst.positionAbs; - this.instance.helperProportions = inst.helperProportions; - this.instance.offset.click = inst.offset.click; - if (this != thisSortable - && this.instance._intersectsWith(this.instance.containerCache) - && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])) - innermostIntersecting = false; - return innermostIntersecting; - }); - } - - - if(innermostIntersecting) { - //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once - if(!this.instance.isOver) { - - this.instance.isOver = 1; - //Now we fake the start of dragging for the sortable instance, - //by cloning the list group item, appending it to the sortable and using it as inst.currentItem - //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) - this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true); - this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it - this.instance.options.helper = function() { return ui.helper[0]; }; - - event.target = this.instance.currentItem[0]; - this.instance._mouseCapture(event, true); - this.instance._mouseStart(event, true, true); - - //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes - this.instance.offset.click.top = inst.offset.click.top; - this.instance.offset.click.left = inst.offset.click.left; - this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; - this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; - - inst._trigger("toSortable", event); - inst.dropped = this.instance.element; //draggable revert needs that - //hack so receive/update callbacks work (mostly) - inst.currentItem = inst.element; - this.instance.fromOutside = inst; - - } - - //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable - if(this.instance.currentItem) this.instance._mouseDrag(event); - - } else { - - //If it doesn't intersect with the sortable, and it intersected before, - //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval - if(this.instance.isOver) { - - this.instance.isOver = 0; - this.instance.cancelHelperRemoval = true; - - //Prevent reverting on this forced stop - this.instance.options.revert = false; - - // The out event needs to be triggered independently - this.instance._trigger('out', event, this.instance._uiHash(this.instance)); - - this.instance._mouseStop(event, true); - this.instance.options.helper = this.instance.options._helper; - - //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size - this.instance.currentItem.remove(); - if(this.instance.placeholder) this.instance.placeholder.remove(); - - inst._trigger("fromSortable", event); - inst.dropped = false; //draggable revert needs that - } - - }; - - }); - - } -}); - -$.ui.plugin.add("draggable", "cursor", { - start: function(event, ui) { - var t = $('body'), o = $(this).data('draggable').options; - if (t.css("cursor")) o._cursor = t.css("cursor"); - t.css("cursor", o.cursor); - }, - stop: function(event, ui) { - var o = $(this).data('draggable').options; - if (o._cursor) $('body').css("cursor", o._cursor); - } -}); - -$.ui.plugin.add("draggable", "opacity", { - start: function(event, ui) { - var t = $(ui.helper), o = $(this).data('draggable').options; - if(t.css("opacity")) o._opacity = t.css("opacity"); - t.css('opacity', o.opacity); - }, - stop: function(event, ui) { - var o = $(this).data('draggable').options; - if(o._opacity) $(ui.helper).css('opacity', o._opacity); - } -}); - -$.ui.plugin.add("draggable", "scroll", { - start: function(event, ui) { - var i = $(this).data("draggable"); - if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); - }, - drag: function(event, ui) { - - var i = $(this).data("draggable"), o = i.options, scrolled = false; - - if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { - - if(!o.axis || o.axis != 'x') { - if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) - i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; - else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) - i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; - } - - if(!o.axis || o.axis != 'y') { - if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) - i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; - else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) - i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; - } - - } else { - - if(!o.axis || o.axis != 'x') { - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - } - - if(!o.axis || o.axis != 'y') { - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - } - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(i, event); - - } -}); - -$.ui.plugin.add("draggable", "snap", { - start: function(event, ui) { - - var i = $(this).data("draggable"), o = i.options; - i.snapElements = []; - - $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() { - var $t = $(this); var $o = $t.offset(); - if(this != i.element[0]) i.snapElements.push({ - item: this, - width: $t.outerWidth(), height: $t.outerHeight(), - top: $o.top, left: $o.left - }); - }); - - }, - drag: function(event, ui) { - - var inst = $(this).data("draggable"), o = inst.options; - var d = o.snapTolerance; - - var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, - y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; - - for (var i = inst.snapElements.length - 1; i >= 0; i--){ - - var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, - t = inst.snapElements[i].top, b = t + inst.snapElements[i].height; - - //Yes, I know, this is insane ;) - if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) { - if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); - inst.snapElements[i].snapping = false; - continue; - } - - if(o.snapMode != 'inner') { - var ts = Math.abs(t - y2) <= d; - var bs = Math.abs(b - y1) <= d; - var ls = Math.abs(l - x2) <= d; - var rs = Math.abs(r - x1) <= d; - if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; - if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; - if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; - if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; - } - - var first = (ts || bs || ls || rs); - - if(o.snapMode != 'outer') { - var ts = Math.abs(t - y1) <= d; - var bs = Math.abs(b - y2) <= d; - var ls = Math.abs(l - x1) <= d; - var rs = Math.abs(r - x2) <= d; - if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; - if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; - if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; - if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; - } - - if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) - (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); - inst.snapElements[i].snapping = (ts || bs || ls || rs || first); - - }; - - } -}); - -$.ui.plugin.add("draggable", "stack", { - start: function(event, ui) { - - var o = $(this).data("draggable").options; - - var group = $.makeArray($(o.stack)).sort(function(a,b) { - return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); - }); - if (!group.length) { return; } - - var min = parseInt(group[0].style.zIndex) || 0; - $(group).each(function(i) { - this.style.zIndex = min + i; - }); - - this[0].style.zIndex = min + group.length; - - } -}); - -$.ui.plugin.add("draggable", "zIndex", { - start: function(event, ui) { - var t = $(ui.helper), o = $(this).data("draggable").options; - if(t.css("zIndex")) o._zIndex = t.css("zIndex"); - t.css('zIndex', o.zIndex); - }, - stop: function(event, ui) { - var o = $(this).data("draggable").options; - if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex); - } -}); - -})(jQuery); -(function( $, undefined ) { - -$.widget("ui.droppable", { - version: "1.9.2", - widgetEventPrefix: "drop", - options: { - accept: '*', - activeClass: false, - addClasses: true, - greedy: false, - hoverClass: false, - scope: 'default', - tolerance: 'intersect' - }, - _create: function() { - - var o = this.options, accept = o.accept; - this.isover = 0; this.isout = 1; - - this.accept = $.isFunction(accept) ? accept : function(d) { - return d.is(accept); - }; - - //Store the droppable's proportions - this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; - - // Add the reference and positions to the manager - $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || []; - $.ui.ddmanager.droppables[o.scope].push(this); - - (o.addClasses && this.element.addClass("ui-droppable")); - - }, - - _destroy: function() { - var drop = $.ui.ddmanager.droppables[this.options.scope]; - for ( var i = 0; i < drop.length; i++ ) - if ( drop[i] == this ) - drop.splice(i, 1); - - this.element.removeClass("ui-droppable ui-droppable-disabled"); - }, - - _setOption: function(key, value) { - - if(key == 'accept') { - this.accept = $.isFunction(value) ? value : function(d) { - return d.is(value); - }; - } - $.Widget.prototype._setOption.apply(this, arguments); - }, - - _activate: function(event) { - var draggable = $.ui.ddmanager.current; - if(this.options.activeClass) this.element.addClass(this.options.activeClass); - (draggable && this._trigger('activate', event, this.ui(draggable))); - }, - - _deactivate: function(event) { - var draggable = $.ui.ddmanager.current; - if(this.options.activeClass) this.element.removeClass(this.options.activeClass); - (draggable && this._trigger('deactivate', event, this.ui(draggable))); - }, - - _over: function(event) { - - var draggable = $.ui.ddmanager.current; - if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element - - if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - if(this.options.hoverClass) this.element.addClass(this.options.hoverClass); - this._trigger('over', event, this.ui(draggable)); - } - - }, - - _out: function(event) { - - var draggable = $.ui.ddmanager.current; - if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element - - if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); - this._trigger('out', event, this.ui(draggable)); - } - - }, - - _drop: function(event,custom) { - - var draggable = custom || $.ui.ddmanager.current; - if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element - - var childrenIntersection = false; - this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() { - var inst = $.data(this, 'droppable'); - if( - inst.options.greedy - && !inst.options.disabled - && inst.options.scope == draggable.options.scope - && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) - && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance) - ) { childrenIntersection = true; return false; } - }); - if(childrenIntersection) return false; - - if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - if(this.options.activeClass) this.element.removeClass(this.options.activeClass); - if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); - this._trigger('drop', event, this.ui(draggable)); - return this.element; - } - - return false; - - }, - - ui: function(c) { - return { - draggable: (c.currentItem || c.element), - helper: c.helper, - position: c.position, - offset: c.positionAbs - }; - } - -}); - -$.ui.intersect = function(draggable, droppable, toleranceMode) { - - if (!droppable.offset) return false; - - var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, - y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height; - var l = droppable.offset.left, r = l + droppable.proportions.width, - t = droppable.offset.top, b = t + droppable.proportions.height; - - switch (toleranceMode) { - case 'fit': - return (l <= x1 && x2 <= r - && t <= y1 && y2 <= b); - break; - case 'intersect': - return (l < x1 + (draggable.helperProportions.width / 2) // Right Half - && x2 - (draggable.helperProportions.width / 2) < r // Left Half - && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half - && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half - break; - case 'pointer': - var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left), - draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top), - isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width); - return isOver; - break; - case 'touch': - return ( - (y1 >= t && y1 <= b) || // Top edge touching - (y2 >= t && y2 <= b) || // Bottom edge touching - (y1 < t && y2 > b) // Surrounded vertically - ) && ( - (x1 >= l && x1 <= r) || // Left edge touching - (x2 >= l && x2 <= r) || // Right edge touching - (x1 < l && x2 > r) // Surrounded horizontally - ); - break; - default: - return false; - break; - } - -}; - -/* - This manager tracks offsets of draggables and droppables -*/ -$.ui.ddmanager = { - current: null, - droppables: { 'default': [] }, - prepareOffsets: function(t, event) { - - var m = $.ui.ddmanager.droppables[t.options.scope] || []; - var type = event ? event.type : null; // workaround for #2317 - var list = (t.currentItem || t.element).find(":data(droppable)").andSelf(); - - droppablesLoop: for (var i = 0; i < m.length; i++) { - - if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted - for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item - m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue - - if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables - - m[i].offset = m[i].element.offset(); - m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; - - } - - }, - drop: function(draggable, event) { - - var dropped = false; - $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { - - if(!this.options) return; - if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) - dropped = this._drop.call(this, event) || dropped; - - if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { - this.isout = 1; this.isover = 0; - this._deactivate.call(this, event); - } - - }); - return dropped; - - }, - dragStart: function( draggable, event ) { - //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) - draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { - if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); - }); - }, - drag: function(draggable, event) { - - //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. - if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event); - - //Run through all droppables and check their positions based on specific tolerance options - $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { - - if(this.options.disabled || this.greedyChild || !this.visible) return; - var intersects = $.ui.intersect(draggable, this, this.options.tolerance); - - var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null); - if(!c) return; - - var parentInstance; - if (this.options.greedy) { - // find droppable parents with same scope - var scope = this.options.scope; - var parent = this.element.parents(':data(droppable)').filter(function () { - return $.data(this, 'droppable').options.scope === scope; - }); - - if (parent.length) { - parentInstance = $.data(parent[0], 'droppable'); - parentInstance.greedyChild = (c == 'isover' ? 1 : 0); - } - } - - // we just moved into a greedy child - if (parentInstance && c == 'isover') { - parentInstance['isover'] = 0; - parentInstance['isout'] = 1; - parentInstance._out.call(parentInstance, event); - } - - this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0; - this[c == "isover" ? "_over" : "_out"].call(this, event); - - // we just moved out of a greedy child - if (parentInstance && c == 'isout') { - parentInstance['isout'] = 0; - parentInstance['isover'] = 1; - parentInstance._over.call(parentInstance, event); - } - }); - - }, - dragStop: function( draggable, event ) { - draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); - //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) - if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); - } -}; - -})(jQuery); -;(jQuery.effects || (function($, undefined) { - -var backCompat = $.uiBackCompat !== false, - // prefix used for storing data on .data() - dataSpace = "ui-effects-"; - -$.effects = { - effect: {} -}; - -/*! - * jQuery Color Animations v2.0.0 - * http://jquery.com/ - * - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * Date: Mon Aug 13 13:41:02 2012 -0500 - */ -(function( jQuery, undefined ) { - - var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "), - - // plusequals test for += 100 -= 100 - rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, - // a set of RE's that can match strings and generate color tuples. - stringParsers = [{ - re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ], - execResult[ 3 ], - execResult[ 4 ] - ]; - } - }, { - re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ] * 2.55, - execResult[ 2 ] * 2.55, - execResult[ 3 ] * 2.55, - execResult[ 4 ] - ]; - } - }, { - // this regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ], 16 ) - ]; - } - }, { - // this regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) - ]; - } - }, { - re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, - space: "hsla", - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ] / 100, - execResult[ 3 ] / 100, - execResult[ 4 ] - ]; - } - }], - - // jQuery.Color( ) - color = jQuery.Color = function( color, green, blue, alpha ) { - return new jQuery.Color.fn.parse( color, green, blue, alpha ); - }, - spaces = { - rgba: { - props: { - red: { - idx: 0, - type: "byte" - }, - green: { - idx: 1, - type: "byte" - }, - blue: { - idx: 2, - type: "byte" - } - } - }, - - hsla: { - props: { - hue: { - idx: 0, - type: "degrees" - }, - saturation: { - idx: 1, - type: "percent" - }, - lightness: { - idx: 2, - type: "percent" - } - } - } - }, - propTypes = { - "byte": { - floor: true, - max: 255 - }, - "percent": { - max: 1 - }, - "degrees": { - mod: 360, - floor: true - } - }, - support = color.support = {}, - - // element for support tests - supportElem = jQuery( "

" )[ 0 ], - - // colors = jQuery.Color.names - colors, - - // local aliases of functions called often - each = jQuery.each; - -// determine rgba support immediately -supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; -support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; - -// define cache name and alpha properties -// for rgba and hsla spaces -each( spaces, function( spaceName, space ) { - space.cache = "_" + spaceName; - space.props.alpha = { - idx: 3, - type: "percent", - def: 1 - }; -}); - -function clamp( value, prop, allowEmpty ) { - var type = propTypes[ prop.type ] || {}; - - if ( value == null ) { - return (allowEmpty || !prop.def) ? null : prop.def; - } - - // ~~ is an short way of doing floor for positive numbers - value = type.floor ? ~~value : parseFloat( value ); - - // IE will pass in empty strings as value for alpha, - // which will hit this case - if ( isNaN( value ) ) { - return prop.def; - } - - if ( type.mod ) { - // we add mod before modding to make sure that negatives values - // get converted properly: -10 -> 350 - return (value + type.mod) % type.mod; - } - - // for now all property types without mod have min and max - return 0 > value ? 0 : type.max < value ? type.max : value; -} - -function stringParse( string ) { - var inst = color(), - rgba = inst._rgba = []; - - string = string.toLowerCase(); - - each( stringParsers, function( i, parser ) { - var parsed, - match = parser.re.exec( string ), - values = match && parser.parse( match ), - spaceName = parser.space || "rgba"; - - if ( values ) { - parsed = inst[ spaceName ]( values ); - - // if this was an rgba parse the assignment might happen twice - // oh well.... - inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; - rgba = inst._rgba = parsed._rgba; - - // exit each( stringParsers ) here because we matched - return false; - } - }); - - // Found a stringParser that handled it - if ( rgba.length ) { - - // if this came from a parsed string, force "transparent" when alpha is 0 - // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) - if ( rgba.join() === "0,0,0,0" ) { - jQuery.extend( rgba, colors.transparent ); - } - return inst; - } - - // named colors - return colors[ string ]; -} - -color.fn = jQuery.extend( color.prototype, { - parse: function( red, green, blue, alpha ) { - if ( red === undefined ) { - this._rgba = [ null, null, null, null ]; - return this; - } - if ( red.jquery || red.nodeType ) { - red = jQuery( red ).css( green ); - green = undefined; - } - - var inst = this, - type = jQuery.type( red ), - rgba = this._rgba = []; - - // more than 1 argument specified - assume ( red, green, blue, alpha ) - if ( green !== undefined ) { - red = [ red, green, blue, alpha ]; - type = "array"; - } - - if ( type === "string" ) { - return this.parse( stringParse( red ) || colors._default ); - } - - if ( type === "array" ) { - each( spaces.rgba.props, function( key, prop ) { - rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); - }); - return this; - } - - if ( type === "object" ) { - if ( red instanceof color ) { - each( spaces, function( spaceName, space ) { - if ( red[ space.cache ] ) { - inst[ space.cache ] = red[ space.cache ].slice(); - } - }); - } else { - each( spaces, function( spaceName, space ) { - var cache = space.cache; - each( space.props, function( key, prop ) { - - // if the cache doesn't exist, and we know how to convert - if ( !inst[ cache ] && space.to ) { - - // if the value was null, we don't need to copy it - // if the key was alpha, we don't need to copy it either - if ( key === "alpha" || red[ key ] == null ) { - return; - } - inst[ cache ] = space.to( inst._rgba ); - } - - // this is the only case where we allow nulls for ALL properties. - // call clamp with alwaysAllowEmpty - inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); - }); - - // everything defined but alpha? - if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { - // use the default of 1 - inst[ cache ][ 3 ] = 1; - if ( space.from ) { - inst._rgba = space.from( inst[ cache ] ); - } - } - }); - } - return this; - } - }, - is: function( compare ) { - var is = color( compare ), - same = true, - inst = this; - - each( spaces, function( _, space ) { - var localCache, - isCache = is[ space.cache ]; - if (isCache) { - localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; - each( space.props, function( _, prop ) { - if ( isCache[ prop.idx ] != null ) { - same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); - return same; - } - }); - } - return same; - }); - return same; - }, - _space: function() { - var used = [], - inst = this; - each( spaces, function( spaceName, space ) { - if ( inst[ space.cache ] ) { - used.push( spaceName ); - } - }); - return used.pop(); - }, - transition: function( other, distance ) { - var end = color( other ), - spaceName = end._space(), - space = spaces[ spaceName ], - startColor = this.alpha() === 0 ? color( "transparent" ) : this, - start = startColor[ space.cache ] || space.to( startColor._rgba ), - result = start.slice(); - - end = end[ space.cache ]; - each( space.props, function( key, prop ) { - var index = prop.idx, - startValue = start[ index ], - endValue = end[ index ], - type = propTypes[ prop.type ] || {}; - - // if null, don't override start value - if ( endValue === null ) { - return; - } - // if null - use end - if ( startValue === null ) { - result[ index ] = endValue; - } else { - if ( type.mod ) { - if ( endValue - startValue > type.mod / 2 ) { - startValue += type.mod; - } else if ( startValue - endValue > type.mod / 2 ) { - startValue -= type.mod; - } - } - result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); - } - }); - return this[ spaceName ]( result ); - }, - blend: function( opaque ) { - // if we are already opaque - return ourself - if ( this._rgba[ 3 ] === 1 ) { - return this; - } - - var rgb = this._rgba.slice(), - a = rgb.pop(), - blend = color( opaque )._rgba; - - return color( jQuery.map( rgb, function( v, i ) { - return ( 1 - a ) * blend[ i ] + a * v; - })); - }, - toRgbaString: function() { - var prefix = "rgba(", - rgba = jQuery.map( this._rgba, function( v, i ) { - return v == null ? ( i > 2 ? 1 : 0 ) : v; - }); - - if ( rgba[ 3 ] === 1 ) { - rgba.pop(); - prefix = "rgb("; - } - - return prefix + rgba.join() + ")"; - }, - toHslaString: function() { - var prefix = "hsla(", - hsla = jQuery.map( this.hsla(), function( v, i ) { - if ( v == null ) { - v = i > 2 ? 1 : 0; - } - - // catch 1 and 2 - if ( i && i < 3 ) { - v = Math.round( v * 100 ) + "%"; - } - return v; - }); - - if ( hsla[ 3 ] === 1 ) { - hsla.pop(); - prefix = "hsl("; - } - return prefix + hsla.join() + ")"; - }, - toHexString: function( includeAlpha ) { - var rgba = this._rgba.slice(), - alpha = rgba.pop(); - - if ( includeAlpha ) { - rgba.push( ~~( alpha * 255 ) ); - } - - return "#" + jQuery.map( rgba, function( v ) { - - // default to 0 when nulls exist - v = ( v || 0 ).toString( 16 ); - return v.length === 1 ? "0" + v : v; - }).join(""); - }, - toString: function() { - return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); - } -}); -color.fn.parse.prototype = color.fn; - -// hsla conversions adapted from: -// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 - -function hue2rgb( p, q, h ) { - h = ( h + 1 ) % 1; - if ( h * 6 < 1 ) { - return p + (q - p) * h * 6; - } - if ( h * 2 < 1) { - return q; - } - if ( h * 3 < 2 ) { - return p + (q - p) * ((2/3) - h) * 6; - } - return p; -} - -spaces.hsla.to = function ( rgba ) { - if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { - return [ null, null, null, rgba[ 3 ] ]; - } - var r = rgba[ 0 ] / 255, - g = rgba[ 1 ] / 255, - b = rgba[ 2 ] / 255, - a = rgba[ 3 ], - max = Math.max( r, g, b ), - min = Math.min( r, g, b ), - diff = max - min, - add = max + min, - l = add * 0.5, - h, s; - - if ( min === max ) { - h = 0; - } else if ( r === max ) { - h = ( 60 * ( g - b ) / diff ) + 360; - } else if ( g === max ) { - h = ( 60 * ( b - r ) / diff ) + 120; - } else { - h = ( 60 * ( r - g ) / diff ) + 240; - } - - if ( l === 0 || l === 1 ) { - s = l; - } else if ( l <= 0.5 ) { - s = diff / add; - } else { - s = diff / ( 2 - add ); - } - return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; -}; - -spaces.hsla.from = function ( hsla ) { - if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { - return [ null, null, null, hsla[ 3 ] ]; - } - var h = hsla[ 0 ] / 360, - s = hsla[ 1 ], - l = hsla[ 2 ], - a = hsla[ 3 ], - q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, - p = 2 * l - q; - - return [ - Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), - Math.round( hue2rgb( p, q, h ) * 255 ), - Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), - a - ]; -}; - - -each( spaces, function( spaceName, space ) { - var props = space.props, - cache = space.cache, - to = space.to, - from = space.from; - - // makes rgba() and hsla() - color.fn[ spaceName ] = function( value ) { - - // generate a cache for this space if it doesn't exist - if ( to && !this[ cache ] ) { - this[ cache ] = to( this._rgba ); - } - if ( value === undefined ) { - return this[ cache ].slice(); - } - - var ret, - type = jQuery.type( value ), - arr = ( type === "array" || type === "object" ) ? value : arguments, - local = this[ cache ].slice(); - - each( props, function( key, prop ) { - var val = arr[ type === "object" ? key : prop.idx ]; - if ( val == null ) { - val = local[ prop.idx ]; - } - local[ prop.idx ] = clamp( val, prop ); - }); - - if ( from ) { - ret = color( from( local ) ); - ret[ cache ] = local; - return ret; - } else { - return color( local ); - } - }; - - // makes red() green() blue() alpha() hue() saturation() lightness() - each( props, function( key, prop ) { - // alpha is included in more than one space - if ( color.fn[ key ] ) { - return; - } - color.fn[ key ] = function( value ) { - var vtype = jQuery.type( value ), - fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), - local = this[ fn ](), - cur = local[ prop.idx ], - match; - - if ( vtype === "undefined" ) { - return cur; - } - - if ( vtype === "function" ) { - value = value.call( this, cur ); - vtype = jQuery.type( value ); - } - if ( value == null && prop.empty ) { - return this; - } - if ( vtype === "string" ) { - match = rplusequals.exec( value ); - if ( match ) { - value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); - } - } - local[ prop.idx ] = value; - return this[ fn ]( local ); - }; - }); -}); - -// add .fx.step functions -each( stepHooks, function( i, hook ) { - jQuery.cssHooks[ hook ] = { - set: function( elem, value ) { - var parsed, curElem, - backgroundColor = ""; - - if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) { - value = color( parsed || value ); - if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { - curElem = hook === "backgroundColor" ? elem.parentNode : elem; - while ( - (backgroundColor === "" || backgroundColor === "transparent") && - curElem && curElem.style - ) { - try { - backgroundColor = jQuery.css( curElem, "backgroundColor" ); - curElem = curElem.parentNode; - } catch ( e ) { - } - } - - value = value.blend( backgroundColor && backgroundColor !== "transparent" ? - backgroundColor : - "_default" ); - } - - value = value.toRgbaString(); - } - try { - elem.style[ hook ] = value; - } catch( error ) { - // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' - } - } - }; - jQuery.fx.step[ hook ] = function( fx ) { - if ( !fx.colorInit ) { - fx.start = color( fx.elem, hook ); - fx.end = color( fx.end ); - fx.colorInit = true; - } - jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); - }; -}); - -jQuery.cssHooks.borderColor = { - expand: function( value ) { - var expanded = {}; - - each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { - expanded[ "border" + part + "Color" ] = value; - }); - return expanded; - } -}; - -// Basic color names only. -// Usage of any of the other color names requires adding yourself or including -// jquery.color.svg-names.js. -colors = jQuery.Color.names = { - // 4.1. Basic color keywords - aqua: "#00ffff", - black: "#000000", - blue: "#0000ff", - fuchsia: "#ff00ff", - gray: "#808080", - green: "#008000", - lime: "#00ff00", - maroon: "#800000", - navy: "#000080", - olive: "#808000", - purple: "#800080", - red: "#ff0000", - silver: "#c0c0c0", - teal: "#008080", - white: "#ffffff", - yellow: "#ffff00", - - // 4.2.3. "transparent" color keyword - transparent: [ null, null, null, 0 ], - - _default: "#ffffff" -}; - -})( jQuery ); - - - -/******************************************************************************/ -/****************************** CLASS ANIMATIONS ******************************/ -/******************************************************************************/ -(function() { - -var classAnimationActions = [ "add", "remove", "toggle" ], - shorthandStyles = { - border: 1, - borderBottom: 1, - borderColor: 1, - borderLeft: 1, - borderRight: 1, - borderTop: 1, - borderWidth: 1, - margin: 1, - padding: 1 - }; - -$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { - $.fx.step[ prop ] = function( fx ) { - if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { - jQuery.style( fx.elem, prop, fx.end ); - fx.setAttr = true; - } - }; -}); - -function getElementStyles() { - var style = this.ownerDocument.defaultView ? - this.ownerDocument.defaultView.getComputedStyle( this, null ) : - this.currentStyle, - newStyle = {}, - key, - len; - - // webkit enumerates style porperties - if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { - len = style.length; - while ( len-- ) { - key = style[ len ]; - if ( typeof style[ key ] === "string" ) { - newStyle[ $.camelCase( key ) ] = style[ key ]; - } - } - } else { - for ( key in style ) { - if ( typeof style[ key ] === "string" ) { - newStyle[ key ] = style[ key ]; - } - } - } - - return newStyle; -} - - -function styleDifference( oldStyle, newStyle ) { - var diff = {}, - name, value; - - for ( name in newStyle ) { - value = newStyle[ name ]; - if ( oldStyle[ name ] !== value ) { - if ( !shorthandStyles[ name ] ) { - if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { - diff[ name ] = value; - } - } - } - } - - return diff; -} - -$.effects.animateClass = function( value, duration, easing, callback ) { - var o = $.speed( duration, easing, callback ); - - return this.queue( function() { - var animated = $( this ), - baseClass = animated.attr( "class" ) || "", - applyClassChange, - allAnimations = o.children ? animated.find( "*" ).andSelf() : animated; - - // map the animated objects to store the original styles. - allAnimations = allAnimations.map(function() { - var el = $( this ); - return { - el: el, - start: getElementStyles.call( this ) - }; - }); - - // apply class change - applyClassChange = function() { - $.each( classAnimationActions, function(i, action) { - if ( value[ action ] ) { - animated[ action + "Class" ]( value[ action ] ); - } - }); - }; - applyClassChange(); - - // map all animated objects again - calculate new styles and diff - allAnimations = allAnimations.map(function() { - this.end = getElementStyles.call( this.el[ 0 ] ); - this.diff = styleDifference( this.start, this.end ); - return this; - }); - - // apply original class - animated.attr( "class", baseClass ); - - // map all animated objects again - this time collecting a promise - allAnimations = allAnimations.map(function() { - var styleInfo = this, - dfd = $.Deferred(), - opts = jQuery.extend({}, o, { - queue: false, - complete: function() { - dfd.resolve( styleInfo ); - } - }); - - this.el.animate( this.diff, opts ); - return dfd.promise(); - }); - - // once all animations have completed: - $.when.apply( $, allAnimations.get() ).done(function() { - - // set the final class - applyClassChange(); - - // for each animated element, - // clear all css properties that were animated - $.each( arguments, function() { - var el = this.el; - $.each( this.diff, function(key) { - el.css( key, '' ); - }); - }); - - // this is guarnteed to be there if you use jQuery.speed() - // it also handles dequeuing the next anim... - o.complete.call( animated[ 0 ] ); - }); - }); -}; - -$.fn.extend({ - _addClass: $.fn.addClass, - addClass: function( classNames, speed, easing, callback ) { - return speed ? - $.effects.animateClass.call( this, - { add: classNames }, speed, easing, callback ) : - this._addClass( classNames ); - }, - - _removeClass: $.fn.removeClass, - removeClass: function( classNames, speed, easing, callback ) { - return speed ? - $.effects.animateClass.call( this, - { remove: classNames }, speed, easing, callback ) : - this._removeClass( classNames ); - }, - - _toggleClass: $.fn.toggleClass, - toggleClass: function( classNames, force, speed, easing, callback ) { - if ( typeof force === "boolean" || force === undefined ) { - if ( !speed ) { - // without speed parameter - return this._toggleClass( classNames, force ); - } else { - return $.effects.animateClass.call( this, - (force ? { add: classNames } : { remove: classNames }), - speed, easing, callback ); - } - } else { - // without force parameter - return $.effects.animateClass.call( this, - { toggle: classNames }, force, speed, easing ); - } - }, - - switchClass: function( remove, add, speed, easing, callback) { - return $.effects.animateClass.call( this, { - add: add, - remove: remove - }, speed, easing, callback ); - } -}); - -})(); - -/******************************************************************************/ -/*********************************** EFFECTS **********************************/ -/******************************************************************************/ - -(function() { - -$.extend( $.effects, { - version: "1.9.2", - - // Saves a set of properties in a data storage - save: function( element, set ) { - for( var i=0; i < set.length; i++ ) { - if ( set[ i ] !== null ) { - element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); - } - } - }, - - // Restores a set of previously saved properties from a data storage - restore: function( element, set ) { - var val, i; - for( i=0; i < set.length; i++ ) { - if ( set[ i ] !== null ) { - val = element.data( dataSpace + set[ i ] ); - // support: jQuery 1.6.2 - // http://bugs.jquery.com/ticket/9917 - // jQuery 1.6.2 incorrectly returns undefined for any falsy value. - // We can't differentiate between "" and 0 here, so we just assume - // empty string since it's likely to be a more common value... - if ( val === undefined ) { - val = ""; - } - element.css( set[ i ], val ); - } - } - }, - - setMode: function( el, mode ) { - if (mode === "toggle") { - mode = el.is( ":hidden" ) ? "show" : "hide"; - } - return mode; - }, - - // Translates a [top,left] array into a baseline value - // this should be a little more flexible in the future to handle a string & hash - getBaseline: function( origin, original ) { - var y, x; - switch ( origin[ 0 ] ) { - case "top": y = 0; break; - case "middle": y = 0.5; break; - case "bottom": y = 1; break; - default: y = origin[ 0 ] / original.height; - } - switch ( origin[ 1 ] ) { - case "left": x = 0; break; - case "center": x = 0.5; break; - case "right": x = 1; break; - default: x = origin[ 1 ] / original.width; - } - return { - x: x, - y: y - }; - }, - - // Wraps the element around a wrapper that copies position properties - createWrapper: function( element ) { - - // if the element is already wrapped, return it - if ( element.parent().is( ".ui-effects-wrapper" )) { - return element.parent(); - } - - // wrap the element - var props = { - width: element.outerWidth(true), - height: element.outerHeight(true), - "float": element.css( "float" ) - }, - wrapper = $( "

" ) - .addClass( "ui-effects-wrapper" ) - .css({ - fontSize: "100%", - background: "transparent", - border: "none", - margin: 0, - padding: 0 - }), - // Store the size in case width/height are defined in % - Fixes #5245 - size = { - width: element.width(), - height: element.height() - }, - active = document.activeElement; - - // support: Firefox - // Firefox incorrectly exposes anonymous content - // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 - try { - active.id; - } catch( e ) { - active = document.body; - } - - element.wrap( wrapper ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).focus(); - } - - wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element - - // transfer positioning properties to the wrapper - if ( element.css( "position" ) === "static" ) { - wrapper.css({ position: "relative" }); - element.css({ position: "relative" }); - } else { - $.extend( props, { - position: element.css( "position" ), - zIndex: element.css( "z-index" ) - }); - $.each([ "top", "left", "bottom", "right" ], function(i, pos) { - props[ pos ] = element.css( pos ); - if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { - props[ pos ] = "auto"; - } - }); - element.css({ - position: "relative", - top: 0, - left: 0, - right: "auto", - bottom: "auto" - }); - } - element.css(size); - - return wrapper.css( props ).show(); - }, - - removeWrapper: function( element ) { - var active = document.activeElement; - - if ( element.parent().is( ".ui-effects-wrapper" ) ) { - element.parent().replaceWith( element ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).focus(); - } - } - - - return element; - }, - - setTransition: function( element, list, factor, value ) { - value = value || {}; - $.each( list, function( i, x ) { - var unit = element.cssUnit( x ); - if ( unit[ 0 ] > 0 ) { - value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; - } - }); - return value; - } -}); - -// return an effect options object for the given parameters: -function _normalizeArguments( effect, options, speed, callback ) { - - // allow passing all options as the first parameter - if ( $.isPlainObject( effect ) ) { - options = effect; - effect = effect.effect; - } - - // convert to an object - effect = { effect: effect }; - - // catch (effect, null, ...) - if ( options == null ) { - options = {}; - } - - // catch (effect, callback) - if ( $.isFunction( options ) ) { - callback = options; - speed = null; - options = {}; - } - - // catch (effect, speed, ?) - if ( typeof options === "number" || $.fx.speeds[ options ] ) { - callback = speed; - speed = options; - options = {}; - } - - // catch (effect, options, callback) - if ( $.isFunction( speed ) ) { - callback = speed; - speed = null; - } - - // add options to effect - if ( options ) { - $.extend( effect, options ); - } - - speed = speed || options.duration; - effect.duration = $.fx.off ? 0 : - typeof speed === "number" ? speed : - speed in $.fx.speeds ? $.fx.speeds[ speed ] : - $.fx.speeds._default; - - effect.complete = callback || options.complete; - - return effect; -} - -function standardSpeed( speed ) { - // valid standard speeds - if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) { - return true; - } - - // invalid strings - treat as "normal" speed - if ( typeof speed === "string" && !$.effects.effect[ speed ] ) { - // TODO: remove in 2.0 (#7115) - if ( backCompat && $.effects[ speed ] ) { - return false; - } - return true; - } - - return false; -} - -$.fn.extend({ - effect: function( /* effect, options, speed, callback */ ) { - var args = _normalizeArguments.apply( this, arguments ), - mode = args.mode, - queue = args.queue, - effectMethod = $.effects.effect[ args.effect ], - - // DEPRECATED: remove in 2.0 (#7115) - oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ]; - - if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) { - // delegate to the original method (e.g., .show()) if possible - if ( mode ) { - return this[ mode ]( args.duration, args.complete ); - } else { - return this.each( function() { - if ( args.complete ) { - args.complete.call( this ); - } - }); - } - } - - function run( next ) { - var elem = $( this ), - complete = args.complete, - mode = args.mode; - - function done() { - if ( $.isFunction( complete ) ) { - complete.call( elem[0] ); - } - if ( $.isFunction( next ) ) { - next(); - } - } - - // if the element is hiddden and mode is hide, - // or element is visible and mode is show - if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { - done(); - } else { - effectMethod.call( elem[0], args, done ); - } - } - - // TODO: remove this check in 2.0, effectMethod will always be true - if ( effectMethod ) { - return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); - } else { - // DEPRECATED: remove in 2.0 (#7115) - return oldEffectMethod.call(this, { - options: args, - duration: args.duration, - callback: args.complete, - mode: args.mode - }); - } - }, - - _show: $.fn.show, - show: function( speed ) { - if ( standardSpeed( speed ) ) { - return this._show.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "show"; - return this.effect.call( this, args ); - } - }, - - _hide: $.fn.hide, - hide: function( speed ) { - if ( standardSpeed( speed ) ) { - return this._hide.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "hide"; - return this.effect.call( this, args ); - } - }, - - // jQuery core overloads toggle and creates _toggle - __toggle: $.fn.toggle, - toggle: function( speed ) { - if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) { - return this.__toggle.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "toggle"; - return this.effect.call( this, args ); - } - }, - - // helper functions - cssUnit: function(key) { - var style = this.css( key ), - val = []; - - $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { - if ( style.indexOf( unit ) > 0 ) { - val = [ parseFloat( style ), unit ]; - } - }); - return val; - } -}); - -})(); - -/******************************************************************************/ -/*********************************** EASING ***********************************/ -/******************************************************************************/ - -(function() { - -// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) - -var baseEasings = {}; - -$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { - baseEasings[ name ] = function( p ) { - return Math.pow( p, i + 2 ); - }; -}); - -$.extend( baseEasings, { - Sine: function ( p ) { - return 1 - Math.cos( p * Math.PI / 2 ); - }, - Circ: function ( p ) { - return 1 - Math.sqrt( 1 - p * p ); - }, - Elastic: function( p ) { - return p === 0 || p === 1 ? p : - -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); - }, - Back: function( p ) { - return p * p * ( 3 * p - 2 ); - }, - Bounce: function ( p ) { - var pow2, - bounce = 4; - - while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} - return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); - } -}); - -$.each( baseEasings, function( name, easeIn ) { - $.easing[ "easeIn" + name ] = easeIn; - $.easing[ "easeOut" + name ] = function( p ) { - return 1 - easeIn( 1 - p ); - }; - $.easing[ "easeInOut" + name ] = function( p ) { - return p < 0.5 ? - easeIn( p * 2 ) / 2 : - 1 - easeIn( p * -2 + 2 ) / 2; - }; -}); - -})(); - -})(jQuery)); -(function( $, undefined ) { - -var rvertical = /up|down|vertical/, - rpositivemotion = /up|left|vertical|horizontal/; - -$.effects.effect.blind = function( o, done ) { - // Create element - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "height", "width" ], - mode = $.effects.setMode( el, o.mode || "hide" ), - direction = o.direction || "up", - vertical = rvertical.test( direction ), - ref = vertical ? "height" : "width", - ref2 = vertical ? "top" : "left", - motion = rpositivemotion.test( direction ), - animation = {}, - show = mode === "show", - wrapper, distance, margin; - - // if already wrapped, the wrapper's properties are my property. #6245 - if ( el.parent().is( ".ui-effects-wrapper" ) ) { - $.effects.save( el.parent(), props ); - } else { - $.effects.save( el, props ); - } - el.show(); - wrapper = $.effects.createWrapper( el ).css({ - overflow: "hidden" - }); - - distance = wrapper[ ref ](); - margin = parseFloat( wrapper.css( ref2 ) ) || 0; - - animation[ ref ] = show ? distance : 0; - if ( !motion ) { - el - .css( vertical ? "bottom" : "right", 0 ) - .css( vertical ? "top" : "left", "auto" ) - .css({ position: "absolute" }); - - animation[ ref2 ] = show ? margin : distance + margin; - } - - // start at 0 if we are showing - if ( show ) { - wrapper.css( ref, 0 ); - if ( ! motion ) { - wrapper.css( ref2, margin + distance ); - } - } - - // Animate - wrapper.animate( animation, { - duration: o.duration, - easing: o.easing, - queue: false, - complete: function() { - if ( mode === "hide" ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - } - }); - -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.bounce = function( o, done ) { - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "height", "width" ], - - // defaults: - mode = $.effects.setMode( el, o.mode || "effect" ), - hide = mode === "hide", - show = mode === "show", - direction = o.direction || "up", - distance = o.distance, - times = o.times || 5, - - // number of internal animations - anims = times * 2 + ( show || hide ? 1 : 0 ), - speed = o.duration / anims, - easing = o.easing, - - // utility: - ref = ( direction === "up" || direction === "down" ) ? "top" : "left", - motion = ( direction === "up" || direction === "left" ), - i, - upAnim, - downAnim, - - // we will need to re-assemble the queue to stack our animations in place - queue = el.queue(), - queuelen = queue.length; - - // Avoid touching opacity to prevent clearType and PNG issues in IE - if ( show || hide ) { - props.push( "opacity" ); - } - - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); // Create Wrapper - - // default distance for the BIGGEST bounce is the outer Distance / 3 - if ( !distance ) { - distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; - } - - if ( show ) { - downAnim = { opacity: 1 }; - downAnim[ ref ] = 0; - - // if we are showing, force opacity 0 and set the initial position - // then do the "first" animation - el.css( "opacity", 0 ) - .css( ref, motion ? -distance * 2 : distance * 2 ) - .animate( downAnim, speed, easing ); - } - - // start at the smallest distance if we are hiding - if ( hide ) { - distance = distance / Math.pow( 2, times - 1 ); - } - - downAnim = {}; - downAnim[ ref ] = 0; - // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here - for ( i = 0; i < times; i++ ) { - upAnim = {}; - upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; - - el.animate( upAnim, speed, easing ) - .animate( downAnim, speed, easing ); - - distance = hide ? distance * 2 : distance / 2; - } - - // Last Bounce when Hiding - if ( hide ) { - upAnim = { opacity: 0 }; - upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; - - el.animate( upAnim, speed, easing ); - } - - el.queue(function() { - if ( hide ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - }); - - // inject all the animations we just queued to be first in line (after "inprogress") - if ( queuelen > 1) { - queue.splice.apply( queue, - [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); - } - el.dequeue(); - -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.clip = function( o, done ) { - // Create element - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "height", "width" ], - mode = $.effects.setMode( el, o.mode || "hide" ), - show = mode === "show", - direction = o.direction || "vertical", - vert = direction === "vertical", - size = vert ? "height" : "width", - position = vert ? "top" : "left", - animation = {}, - wrapper, animate, distance; - - // Save & Show - $.effects.save( el, props ); - el.show(); - - // Create Wrapper - wrapper = $.effects.createWrapper( el ).css({ - overflow: "hidden" - }); - animate = ( el[0].tagName === "IMG" ) ? wrapper : el; - distance = animate[ size ](); - - // Shift - if ( show ) { - animate.css( size, 0 ); - animate.css( position, distance / 2 ); - } - - // Create Animation Object: - animation[ size ] = show ? distance : 0; - animation[ position ] = show ? 0 : distance / 2; - - // Animate - animate.animate( animation, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: function() { - if ( !show ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - } - }); - -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.drop = function( o, done ) { - - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], - mode = $.effects.setMode( el, o.mode || "hide" ), - show = mode === "show", - direction = o.direction || "left", - ref = ( direction === "up" || direction === "down" ) ? "top" : "left", - motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg", - animation = { - opacity: show ? 1 : 0 - }, - distance; - - // Adjust - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); - - distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2; - - if ( show ) { - el - .css( "opacity", 0 ) - .css( ref, motion === "pos" ? -distance : distance ); - } - - // Animation - animation[ ref ] = ( show ? - ( motion === "pos" ? "+=" : "-=" ) : - ( motion === "pos" ? "-=" : "+=" ) ) + - distance; - - // Animate - el.animate( animation, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: function() { - if ( mode === "hide" ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - } - }); -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.explode = function( o, done ) { - - var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3, - cells = rows, - el = $( this ), - mode = $.effects.setMode( el, o.mode || "hide" ), - show = mode === "show", - - // show and then visibility:hidden the element before calculating offset - offset = el.show().css( "visibility", "hidden" ).offset(), - - // width and height of a piece - width = Math.ceil( el.outerWidth() / cells ), - height = Math.ceil( el.outerHeight() / rows ), - pieces = [], - - // loop - i, j, left, top, mx, my; - - // children animate complete: - function childComplete() { - pieces.push( this ); - if ( pieces.length === rows * cells ) { - animComplete(); - } - } - - // clone the element for each row and cell. - for( i = 0; i < rows ; i++ ) { // ===> - top = offset.top + i * height; - my = i - ( rows - 1 ) / 2 ; - - for( j = 0; j < cells ; j++ ) { // ||| - left = offset.left + j * width; - mx = j - ( cells - 1 ) / 2 ; - - // Create a clone of the now hidden main element that will be absolute positioned - // within a wrapper div off the -left and -top equal to size of our pieces - el - .clone() - .appendTo( "body" ) - .wrap( "
" ) - .css({ - position: "absolute", - visibility: "visible", - left: -j * width, - top: -i * height - }) - - // select the wrapper - make it overflow: hidden and absolute positioned based on - // where the original was located +left and +top equal to the size of pieces - .parent() - .addClass( "ui-effects-explode" ) - .css({ - position: "absolute", - overflow: "hidden", - width: width, - height: height, - left: left + ( show ? mx * width : 0 ), - top: top + ( show ? my * height : 0 ), - opacity: show ? 0 : 1 - }).animate({ - left: left + ( show ? 0 : mx * width ), - top: top + ( show ? 0 : my * height ), - opacity: show ? 1 : 0 - }, o.duration || 500, o.easing, childComplete ); - } - } - - function animComplete() { - el.css({ - visibility: "visible" - }); - $( pieces ).remove(); - if ( !show ) { - el.hide(); - } - done(); - } -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.fade = function( o, done ) { - var el = $( this ), - mode = $.effects.setMode( el, o.mode || "toggle" ); - - el.animate({ - opacity: mode - }, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: done - }); -}; - -})( jQuery ); -(function( $, undefined ) { - -$.effects.effect.fold = function( o, done ) { - - // Create element - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "height", "width" ], - mode = $.effects.setMode( el, o.mode || "hide" ), - show = mode === "show", - hide = mode === "hide", - size = o.size || 15, - percent = /([0-9]+)%/.exec( size ), - horizFirst = !!o.horizFirst, - widthFirst = show !== horizFirst, - ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ], - duration = o.duration / 2, - wrapper, distance, - animation1 = {}, - animation2 = {}; - - $.effects.save( el, props ); - el.show(); - - // Create Wrapper - wrapper = $.effects.createWrapper( el ).css({ - overflow: "hidden" - }); - distance = widthFirst ? - [ wrapper.width(), wrapper.height() ] : - [ wrapper.height(), wrapper.width() ]; - - if ( percent ) { - size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; - } - if ( show ) { - wrapper.css( horizFirst ? { - height: 0, - width: size - } : { - height: size, - width: 0 - }); - } - - // Animation - animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size; - animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0; - - // Animate - wrapper - .animate( animation1, duration, o.easing ) - .animate( animation2, duration, o.easing, function() { - if ( hide ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - }); - -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.highlight = function( o, done ) { - var elem = $( this ), - props = [ "backgroundImage", "backgroundColor", "opacity" ], - mode = $.effects.setMode( elem, o.mode || "show" ), - animation = { - backgroundColor: elem.css( "backgroundColor" ) - }; - - if (mode === "hide") { - animation.opacity = 0; - } - - $.effects.save( elem, props ); - - elem - .show() - .css({ - backgroundImage: "none", - backgroundColor: o.color || "#ffff99" - }) - .animate( animation, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: function() { - if ( mode === "hide" ) { - elem.hide(); - } - $.effects.restore( elem, props ); - done(); - } - }); -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.pulsate = function( o, done ) { - var elem = $( this ), - mode = $.effects.setMode( elem, o.mode || "show" ), - show = mode === "show", - hide = mode === "hide", - showhide = ( show || mode === "hide" ), - - // showing or hiding leaves of the "last" animation - anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), - duration = o.duration / anims, - animateTo = 0, - queue = elem.queue(), - queuelen = queue.length, - i; - - if ( show || !elem.is(":visible")) { - elem.css( "opacity", 0 ).show(); - animateTo = 1; - } - - // anims - 1 opacity "toggles" - for ( i = 1; i < anims; i++ ) { - elem.animate({ - opacity: animateTo - }, duration, o.easing ); - animateTo = 1 - animateTo; - } - - elem.animate({ - opacity: animateTo - }, duration, o.easing); - - elem.queue(function() { - if ( hide ) { - elem.hide(); - } - done(); - }); - - // We just queued up "anims" animations, we need to put them next in the queue - if ( queuelen > 1 ) { - queue.splice.apply( queue, - [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); - } - elem.dequeue(); -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.puff = function( o, done ) { - var elem = $( this ), - mode = $.effects.setMode( elem, o.mode || "hide" ), - hide = mode === "hide", - percent = parseInt( o.percent, 10 ) || 150, - factor = percent / 100, - original = { - height: elem.height(), - width: elem.width(), - outerHeight: elem.outerHeight(), - outerWidth: elem.outerWidth() - }; - - $.extend( o, { - effect: "scale", - queue: false, - fade: true, - mode: mode, - complete: done, - percent: hide ? percent : 100, - from: hide ? - original : - { - height: original.height * factor, - width: original.width * factor, - outerHeight: original.outerHeight * factor, - outerWidth: original.outerWidth * factor - } - }); - - elem.effect( o ); -}; - -$.effects.effect.scale = function( o, done ) { - - // Create element - var el = $( this ), - options = $.extend( true, {}, o ), - mode = $.effects.setMode( el, o.mode || "effect" ), - percent = parseInt( o.percent, 10 ) || - ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ), - direction = o.direction || "both", - origin = o.origin, - original = { - height: el.height(), - width: el.width(), - outerHeight: el.outerHeight(), - outerWidth: el.outerWidth() - }, - factor = { - y: direction !== "horizontal" ? (percent / 100) : 1, - x: direction !== "vertical" ? (percent / 100) : 1 - }; - - // We are going to pass this effect to the size effect: - options.effect = "size"; - options.queue = false; - options.complete = done; - - // Set default origin and restore for show/hide - if ( mode !== "effect" ) { - options.origin = origin || ["middle","center"]; - options.restore = true; - } - - options.from = o.from || ( mode === "show" ? { - height: 0, - width: 0, - outerHeight: 0, - outerWidth: 0 - } : original ); - options.to = { - height: original.height * factor.y, - width: original.width * factor.x, - outerHeight: original.outerHeight * factor.y, - outerWidth: original.outerWidth * factor.x - }; - - // Fade option to support puff - if ( options.fade ) { - if ( mode === "show" ) { - options.from.opacity = 0; - options.to.opacity = 1; - } - if ( mode === "hide" ) { - options.from.opacity = 1; - options.to.opacity = 0; - } - } - - // Animate - el.effect( options ); - -}; - -$.effects.effect.size = function( o, done ) { - - // Create element - var original, baseline, factor, - el = $( this ), - props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], - - // Always restore - props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], - - // Copy for children - props2 = [ "width", "height", "overflow" ], - cProps = [ "fontSize" ], - vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], - hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], - - // Set options - mode = $.effects.setMode( el, o.mode || "effect" ), - restore = o.restore || mode !== "effect", - scale = o.scale || "both", - origin = o.origin || [ "middle", "center" ], - position = el.css( "position" ), - props = restore ? props0 : props1, - zero = { - height: 0, - width: 0, - outerHeight: 0, - outerWidth: 0 - }; - - if ( mode === "show" ) { - el.show(); - } - original = { - height: el.height(), - width: el.width(), - outerHeight: el.outerHeight(), - outerWidth: el.outerWidth() - }; - - if ( o.mode === "toggle" && mode === "show" ) { - el.from = o.to || zero; - el.to = o.from || original; - } else { - el.from = o.from || ( mode === "show" ? zero : original ); - el.to = o.to || ( mode === "hide" ? zero : original ); - } - - // Set scaling factor - factor = { - from: { - y: el.from.height / original.height, - x: el.from.width / original.width - }, - to: { - y: el.to.height / original.height, - x: el.to.width / original.width - } - }; - - // Scale the css box - if ( scale === "box" || scale === "both" ) { - - // Vertical props scaling - if ( factor.from.y !== factor.to.y ) { - props = props.concat( vProps ); - el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); - el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); - } - - // Horizontal props scaling - if ( factor.from.x !== factor.to.x ) { - props = props.concat( hProps ); - el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); - el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); - } - } - - // Scale the content - if ( scale === "content" || scale === "both" ) { - - // Vertical props scaling - if ( factor.from.y !== factor.to.y ) { - props = props.concat( cProps ).concat( props2 ); - el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); - el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); - } - } - - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); - el.css( "overflow", "hidden" ).css( el.from ); - - // Adjust - if (origin) { // Calculate baseline shifts - baseline = $.effects.getBaseline( origin, original ); - el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y; - el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x; - el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y; - el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x; - } - el.css( el.from ); // set top & left - - // Animate - if ( scale === "content" || scale === "both" ) { // Scale the children - - // Add margins/font-size - vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); - hProps = hProps.concat([ "marginLeft", "marginRight" ]); - props2 = props0.concat(vProps).concat(hProps); - - el.find( "*[width]" ).each( function(){ - var child = $( this ), - c_original = { - height: child.height(), - width: child.width(), - outerHeight: child.outerHeight(), - outerWidth: child.outerWidth() - }; - if (restore) { - $.effects.save(child, props2); - } - - child.from = { - height: c_original.height * factor.from.y, - width: c_original.width * factor.from.x, - outerHeight: c_original.outerHeight * factor.from.y, - outerWidth: c_original.outerWidth * factor.from.x - }; - child.to = { - height: c_original.height * factor.to.y, - width: c_original.width * factor.to.x, - outerHeight: c_original.height * factor.to.y, - outerWidth: c_original.width * factor.to.x - }; - - // Vertical props scaling - if ( factor.from.y !== factor.to.y ) { - child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); - child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); - } - - // Horizontal props scaling - if ( factor.from.x !== factor.to.x ) { - child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); - child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); - } - - // Animate children - child.css( child.from ); - child.animate( child.to, o.duration, o.easing, function() { - - // Restore children - if ( restore ) { - $.effects.restore( child, props2 ); - } - }); - }); - } - - // Animate - el.animate( el.to, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: function() { - if ( el.to.opacity === 0 ) { - el.css( "opacity", el.from.opacity ); - } - if( mode === "hide" ) { - el.hide(); - } - $.effects.restore( el, props ); - if ( !restore ) { - - // we need to calculate our new positioning based on the scaling - if ( position === "static" ) { - el.css({ - position: "relative", - top: el.to.top, - left: el.to.left - }); - } else { - $.each([ "top", "left" ], function( idx, pos ) { - el.css( pos, function( _, str ) { - var val = parseInt( str, 10 ), - toRef = idx ? el.to.left : el.to.top; - - // if original was "auto", recalculate the new value from wrapper - if ( str === "auto" ) { - return toRef + "px"; - } - - return val + toRef + "px"; - }); - }); - } - } - - $.effects.removeWrapper( el ); - done(); - } - }); - -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.shake = function( o, done ) { - - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "height", "width" ], - mode = $.effects.setMode( el, o.mode || "effect" ), - direction = o.direction || "left", - distance = o.distance || 20, - times = o.times || 3, - anims = times * 2 + 1, - speed = Math.round(o.duration/anims), - ref = (direction === "up" || direction === "down") ? "top" : "left", - positiveMotion = (direction === "up" || direction === "left"), - animation = {}, - animation1 = {}, - animation2 = {}, - i, - - // we will need to re-assemble the queue to stack our animations in place - queue = el.queue(), - queuelen = queue.length; - - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); - - // Animation - animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; - animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; - animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; - - // Animate - el.animate( animation, speed, o.easing ); - - // Shakes - for ( i = 1; i < times; i++ ) { - el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing ); - } - el - .animate( animation1, speed, o.easing ) - .animate( animation, speed / 2, o.easing ) - .queue(function() { - if ( mode === "hide" ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - }); - - // inject all the animations we just queued to be first in line (after "inprogress") - if ( queuelen > 1) { - queue.splice.apply( queue, - [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); - } - el.dequeue(); - -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.slide = function( o, done ) { - - // Create element - var el = $( this ), - props = [ "position", "top", "bottom", "left", "right", "width", "height" ], - mode = $.effects.setMode( el, o.mode || "show" ), - show = mode === "show", - direction = o.direction || "left", - ref = (direction === "up" || direction === "down") ? "top" : "left", - positiveMotion = (direction === "up" || direction === "left"), - distance, - animation = {}; - - // Adjust - $.effects.save( el, props ); - el.show(); - distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); - - $.effects.createWrapper( el ).css({ - overflow: "hidden" - }); - - if ( show ) { - el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); - } - - // Animation - animation[ ref ] = ( show ? - ( positiveMotion ? "+=" : "-=") : - ( positiveMotion ? "-=" : "+=")) + - distance; - - // Animate - el.animate( animation, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: function() { - if ( mode === "hide" ) { - el.hide(); - } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); - done(); - } - }); -}; - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.transfer = function( o, done ) { - var elem = $( this ), - target = $( o.to ), - targetFixed = target.css( "position" ) === "fixed", - body = $("body"), - fixTop = targetFixed ? body.scrollTop() : 0, - fixLeft = targetFixed ? body.scrollLeft() : 0, - endPosition = target.offset(), - animation = { - top: endPosition.top - fixTop , - left: endPosition.left - fixLeft , - height: target.innerHeight(), - width: target.innerWidth() - }, - startPosition = elem.offset(), - transfer = $( '
' ) - .appendTo( document.body ) - .addClass( o.className ) - .css({ - top: startPosition.top - fixTop , - left: startPosition.left - fixLeft , - height: elem.innerHeight(), - width: elem.innerWidth(), - position: targetFixed ? "fixed" : "absolute" - }) - .animate( animation, o.duration, o.easing, function() { - transfer.remove(); - done(); - }); -}; - -})(jQuery); -(function( $, undefined ) { - -var mouseHandled = false; - -$.widget( "ui.menu", { - version: "1.9.2", - defaultElement: "
    ", - delay: 300, - options: { - icons: { - submenu: "ui-icon-carat-1-e" - }, - menus: "ul", - position: { - my: "left top", - at: "right top" - }, - role: "menu", - - // callbacks - blur: null, - focus: null, - select: null - }, - - _create: function() { - this.activeMenu = this.element; - this.element - .uniqueId() - .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) - .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) - .attr({ - role: this.options.role, - tabIndex: 0 - }) - // need to catch all clicks on disabled menu - // not possible through _on - .bind( "click" + this.eventNamespace, $.proxy(function( event ) { - if ( this.options.disabled ) { - event.preventDefault(); - } - }, this )); - - if ( this.options.disabled ) { - this.element - .addClass( "ui-state-disabled" ) - .attr( "aria-disabled", "true" ); - } - - this._on({ - // Prevent focus from sticking to links inside menu after clicking - // them (focus should always stay on UL during navigation). - "mousedown .ui-menu-item > a": function( event ) { - event.preventDefault(); - }, - "click .ui-state-disabled > a": function( event ) { - event.preventDefault(); - }, - "click .ui-menu-item:has(a)": function( event ) { - var target = $( event.target ).closest( ".ui-menu-item" ); - if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) { - mouseHandled = true; - - this.select( event ); - // Open submenu on click - if ( target.has( ".ui-menu" ).length ) { - this.expand( event ); - } else if ( !this.element.is( ":focus" ) ) { - // Redirect focus to the menu - this.element.trigger( "focus", [ true ] ); - - // If the active item is on the top level, let it stay active. - // Otherwise, blur the active item since it is no longer visible. - if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { - clearTimeout( this.timer ); - } - } - } - }, - "mouseenter .ui-menu-item": function( event ) { - var target = $( event.currentTarget ); - // Remove ui-state-active class from siblings of the newly focused menu item - // to avoid a jump caused by adjacent elements both having a class with a border - target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" ); - this.focus( event, target ); - }, - mouseleave: "collapseAll", - "mouseleave .ui-menu": "collapseAll", - focus: function( event, keepActiveItem ) { - // If there's already an active item, keep it active - // If not, activate the first item - var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 ); - - if ( !keepActiveItem ) { - this.focus( event, item ); - } - }, - blur: function( event ) { - this._delay(function() { - if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { - this.collapseAll( event ); - } - }); - }, - keydown: "_keydown" - }); - - this.refresh(); - - // Clicks outside of a menu collapse any open menus - this._on( this.document, { - click: function( event ) { - if ( !$( event.target ).closest( ".ui-menu" ).length ) { - this.collapseAll( event ); - } - - // Reset the mouseHandled flag - mouseHandled = false; - } - }); - }, - - _destroy: function() { - // Destroy (sub)menus - this.element - .removeAttr( "aria-activedescendant" ) - .find( ".ui-menu" ).andSelf() - .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" ) - .removeAttr( "role" ) - .removeAttr( "tabIndex" ) - .removeAttr( "aria-labelledby" ) - .removeAttr( "aria-expanded" ) - .removeAttr( "aria-hidden" ) - .removeAttr( "aria-disabled" ) - .removeUniqueId() - .show(); - - // Destroy menu items - this.element.find( ".ui-menu-item" ) - .removeClass( "ui-menu-item" ) - .removeAttr( "role" ) - .removeAttr( "aria-disabled" ) - .children( "a" ) - .removeUniqueId() - .removeClass( "ui-corner-all ui-state-hover" ) - .removeAttr( "tabIndex" ) - .removeAttr( "role" ) - .removeAttr( "aria-haspopup" ) - .children().each( function() { - var elem = $( this ); - if ( elem.data( "ui-menu-submenu-carat" ) ) { - elem.remove(); - } - }); - - // Destroy menu dividers - this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); - }, - - _keydown: function( event ) { - var match, prev, character, skip, regex, - preventDefault = true; - - function escape( value ) { - return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); - } - - switch ( event.keyCode ) { - case $.ui.keyCode.PAGE_UP: - this.previousPage( event ); - break; - case $.ui.keyCode.PAGE_DOWN: - this.nextPage( event ); - break; - case $.ui.keyCode.HOME: - this._move( "first", "first", event ); - break; - case $.ui.keyCode.END: - this._move( "last", "last", event ); - break; - case $.ui.keyCode.UP: - this.previous( event ); - break; - case $.ui.keyCode.DOWN: - this.next( event ); - break; - case $.ui.keyCode.LEFT: - this.collapse( event ); - break; - case $.ui.keyCode.RIGHT: - if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { - this.expand( event ); - } - break; - case $.ui.keyCode.ENTER: - case $.ui.keyCode.SPACE: - this._activate( event ); - break; - case $.ui.keyCode.ESCAPE: - this.collapse( event ); - break; - default: - preventDefault = false; - prev = this.previousFilter || ""; - character = String.fromCharCode( event.keyCode ); - skip = false; - - clearTimeout( this.filterTimer ); - - if ( character === prev ) { - skip = true; - } else { - character = prev + character; - } - - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { - return regex.test( $( this ).children( "a" ).text() ); - }); - match = skip && match.index( this.active.next() ) !== -1 ? - this.active.nextAll( ".ui-menu-item" ) : - match; - - // If no matches on the current filter, reset to the last character pressed - // to move down the menu to the first item that starts with that character - if ( !match.length ) { - character = String.fromCharCode( event.keyCode ); - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { - return regex.test( $( this ).children( "a" ).text() ); - }); - } - - if ( match.length ) { - this.focus( event, match ); - if ( match.length > 1 ) { - this.previousFilter = character; - this.filterTimer = this._delay(function() { - delete this.previousFilter; - }, 1000 ); - } else { - delete this.previousFilter; - } - } else { - delete this.previousFilter; - } - } - - if ( preventDefault ) { - event.preventDefault(); - } - }, - - _activate: function( event ) { - if ( !this.active.is( ".ui-state-disabled" ) ) { - if ( this.active.children( "a[aria-haspopup='true']" ).length ) { - this.expand( event ); - } else { - this.select( event ); - } - } - }, - - refresh: function() { - var menus, - icon = this.options.icons.submenu, - submenus = this.element.find( this.options.menus ); - - // Initialize nested menus - submenus.filter( ":not(.ui-menu)" ) - .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) - .hide() - .attr({ - role: this.options.role, - "aria-hidden": "true", - "aria-expanded": "false" - }) - .each(function() { - var menu = $( this ), - item = menu.prev( "a" ), - submenuCarat = $( "" ) - .addClass( "ui-menu-icon ui-icon " + icon ) - .data( "ui-menu-submenu-carat", true ); - - item - .attr( "aria-haspopup", "true" ) - .prepend( submenuCarat ); - menu.attr( "aria-labelledby", item.attr( "id" ) ); - }); - - menus = submenus.add( this.element ); - - // Don't refresh list items that are already adapted - menus.children( ":not(.ui-menu-item):has(a)" ) - .addClass( "ui-menu-item" ) - .attr( "role", "presentation" ) - .children( "a" ) - .uniqueId() - .addClass( "ui-corner-all" ) - .attr({ - tabIndex: -1, - role: this._itemRole() - }); - - // Initialize unlinked menu-items containing spaces and/or dashes only as dividers - menus.children( ":not(.ui-menu-item)" ).each(function() { - var item = $( this ); - // hyphen, em dash, en dash - if ( !/[^\-—–\s]/.test( item.text() ) ) { - item.addClass( "ui-widget-content ui-menu-divider" ); - } - }); - - // Add aria-disabled attribute to any disabled menu item - menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); - - // If the active item has been removed, blur the menu - if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { - this.blur(); - } - }, - - _itemRole: function() { - return { - menu: "menuitem", - listbox: "option" - }[ this.options.role ]; - }, - - focus: function( event, item ) { - var nested, focused; - this.blur( event, event && event.type === "focus" ); - - this._scrollIntoView( item ); - - this.active = item.first(); - focused = this.active.children( "a" ).addClass( "ui-state-focus" ); - // Only update aria-activedescendant if there's a role - // otherwise we assume focus is managed elsewhere - if ( this.options.role ) { - this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); - } - - // Highlight active parent menu item, if any - this.active - .parent() - .closest( ".ui-menu-item" ) - .children( "a:first" ) - .addClass( "ui-state-active" ); - - if ( event && event.type === "keydown" ) { - this._close(); - } else { - this.timer = this._delay(function() { - this._close(); - }, this.delay ); - } - - nested = item.children( ".ui-menu" ); - if ( nested.length && ( /^mouse/.test( event.type ) ) ) { - this._startOpening(nested); - } - this.activeMenu = item.parent(); - - this._trigger( "focus", event, { item: item } ); - }, - - _scrollIntoView: function( item ) { - var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; - if ( this._hasScroll() ) { - borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; - paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; - offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; - scroll = this.activeMenu.scrollTop(); - elementHeight = this.activeMenu.height(); - itemHeight = item.height(); - - if ( offset < 0 ) { - this.activeMenu.scrollTop( scroll + offset ); - } else if ( offset + itemHeight > elementHeight ) { - this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); - } - } - }, - - blur: function( event, fromFocus ) { - if ( !fromFocus ) { - clearTimeout( this.timer ); - } - - if ( !this.active ) { - return; - } - - this.active.children( "a" ).removeClass( "ui-state-focus" ); - this.active = null; - - this._trigger( "blur", event, { item: this.active } ); - }, - - _startOpening: function( submenu ) { - clearTimeout( this.timer ); - - // Don't open if already open fixes a Firefox bug that caused a .5 pixel - // shift in the submenu position when mousing over the carat icon - if ( submenu.attr( "aria-hidden" ) !== "true" ) { - return; - } - - this.timer = this._delay(function() { - this._close(); - this._open( submenu ); - }, this.delay ); - }, - - _open: function( submenu ) { - var position = $.extend({ - of: this.active - }, this.options.position ); - - clearTimeout( this.timer ); - this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) - .hide() - .attr( "aria-hidden", "true" ); - - submenu - .show() - .removeAttr( "aria-hidden" ) - .attr( "aria-expanded", "true" ) - .position( position ); - }, - - collapseAll: function( event, all ) { - clearTimeout( this.timer ); - this.timer = this._delay(function() { - // If we were passed an event, look for the submenu that contains the event - var currentMenu = all ? this.element : - $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); - - // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway - if ( !currentMenu.length ) { - currentMenu = this.element; - } - - this._close( currentMenu ); - - this.blur( event ); - this.activeMenu = currentMenu; - }, this.delay ); - }, - - // With no arguments, closes the currently active menu - if nothing is active - // it closes all menus. If passed an argument, it will search for menus BELOW - _close: function( startMenu ) { - if ( !startMenu ) { - startMenu = this.active ? this.active.parent() : this.element; - } - - startMenu - .find( ".ui-menu" ) - .hide() - .attr( "aria-hidden", "true" ) - .attr( "aria-expanded", "false" ) - .end() - .find( "a.ui-state-active" ) - .removeClass( "ui-state-active" ); - }, - - collapse: function( event ) { - var newItem = this.active && - this.active.parent().closest( ".ui-menu-item", this.element ); - if ( newItem && newItem.length ) { - this._close(); - this.focus( event, newItem ); - } - }, - - expand: function( event ) { - var newItem = this.active && - this.active - .children( ".ui-menu " ) - .children( ".ui-menu-item" ) - .first(); - - if ( newItem && newItem.length ) { - this._open( newItem.parent() ); - - // Delay so Firefox will not hide activedescendant change in expanding submenu from AT - this._delay(function() { - this.focus( event, newItem ); - }); - } - }, - - next: function( event ) { - this._move( "next", "first", event ); - }, - - previous: function( event ) { - this._move( "prev", "last", event ); - }, - - isFirstItem: function() { - return this.active && !this.active.prevAll( ".ui-menu-item" ).length; - }, - - isLastItem: function() { - return this.active && !this.active.nextAll( ".ui-menu-item" ).length; - }, - - _move: function( direction, filter, event ) { - var next; - if ( this.active ) { - if ( direction === "first" || direction === "last" ) { - next = this.active - [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) - .eq( -1 ); - } else { - next = this.active - [ direction + "All" ]( ".ui-menu-item" ) - .eq( 0 ); - } - } - if ( !next || !next.length || !this.active ) { - next = this.activeMenu.children( ".ui-menu-item" )[ filter ](); - } - - this.focus( event, next ); - }, - - nextPage: function( event ) { - var item, base, height; - - if ( !this.active ) { - this.next( event ); - return; - } - if ( this.isLastItem() ) { - return; - } - if ( this._hasScroll() ) { - base = this.active.offset().top; - height = this.element.height(); - this.active.nextAll( ".ui-menu-item" ).each(function() { - item = $( this ); - return item.offset().top - base - height < 0; - }); - - this.focus( event, item ); - } else { - this.focus( event, this.activeMenu.children( ".ui-menu-item" ) - [ !this.active ? "first" : "last" ]() ); - } - }, - - previousPage: function( event ) { - var item, base, height; - if ( !this.active ) { - this.next( event ); - return; - } - if ( this.isFirstItem() ) { - return; - } - if ( this._hasScroll() ) { - base = this.active.offset().top; - height = this.element.height(); - this.active.prevAll( ".ui-menu-item" ).each(function() { - item = $( this ); - return item.offset().top - base + height > 0; - }); - - this.focus( event, item ); - } else { - this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() ); - } - }, - - _hasScroll: function() { - return this.element.outerHeight() < this.element.prop( "scrollHeight" ); - }, - - select: function( event ) { - // TODO: It should never be possible to not have an active item at this - // point, but the tests don't trigger mouseenter before click. - this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); - var ui = { item: this.active }; - if ( !this.active.has( ".ui-menu" ).length ) { - this.collapseAll( event, true ); - } - this._trigger( "select", event, ui ); - } -}); - -}( jQuery )); -(function( $, undefined ) { - -$.widget( "ui.progressbar", { - version: "1.9.2", - options: { - value: 0, - max: 100 - }, - - min: 0, - - _create: function() { - this.element - .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) - .attr({ - role: "progressbar", - "aria-valuemin": this.min, - "aria-valuemax": this.options.max, - "aria-valuenow": this._value() - }); - - this.valueDiv = $( "
    " ) - .appendTo( this.element ); - - this.oldValue = this._value(); - this._refreshValue(); - }, - - _destroy: function() { - this.element - .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) - .removeAttr( "role" ) - .removeAttr( "aria-valuemin" ) - .removeAttr( "aria-valuemax" ) - .removeAttr( "aria-valuenow" ); - - this.valueDiv.remove(); - }, - - value: function( newValue ) { - if ( newValue === undefined ) { - return this._value(); - } - - this._setOption( "value", newValue ); - return this; - }, - - _setOption: function( key, value ) { - if ( key === "value" ) { - this.options.value = value; - this._refreshValue(); - if ( this._value() === this.options.max ) { - this._trigger( "complete" ); - } - } - - this._super( key, value ); - }, - - _value: function() { - var val = this.options.value; - // normalize invalid value - if ( typeof val !== "number" ) { - val = 0; - } - return Math.min( this.options.max, Math.max( this.min, val ) ); - }, - - _percentage: function() { - return 100 * this._value() / this.options.max; - }, - - _refreshValue: function() { - var value = this.value(), - percentage = this._percentage(); - - if ( this.oldValue !== value ) { - this.oldValue = value; - this._trigger( "change" ); - } - - this.valueDiv - .toggle( value > this.min ) - .toggleClass( "ui-corner-right", value === this.options.max ) - .width( percentage.toFixed(0) + "%" ); - this.element.attr( "aria-valuenow", value ); - } -}); - -})( jQuery ); -(function( $, undefined ) { - -$.widget("ui.resizable", $.ui.mouse, { - version: "1.9.2", - widgetEventPrefix: "resize", - options: { - alsoResize: false, - animate: false, - animateDuration: "slow", - animateEasing: "swing", - aspectRatio: false, - autoHide: false, - containment: false, - ghost: false, - grid: false, - handles: "e,s,se", - helper: false, - maxHeight: null, - maxWidth: null, - minHeight: 10, - minWidth: 10, - zIndex: 1000 - }, - _create: function() { - - var that = this, o = this.options; - this.element.addClass("ui-resizable"); - - $.extend(this, { - _aspectRatio: !!(o.aspectRatio), - aspectRatio: o.aspectRatio, - originalElement: this.element, - _proportionallyResizeElements: [], - _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null - }); - - //Wrap the element if it cannot hold child nodes - if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { - - //Create a wrapper element and set the wrapper to the new current internal element - this.element.wrap( - $('
    ').css({ - position: this.element.css('position'), - width: this.element.outerWidth(), - height: this.element.outerHeight(), - top: this.element.css('top'), - left: this.element.css('left') - }) - ); - - //Overwrite the original this.element - this.element = this.element.parent().data( - "resizable", this.element.data('resizable') - ); - - this.elementIsWrapper = true; - - //Move margins to the wrapper - this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); - this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); - - //Prevent Safari textarea resize - this.originalResizeStyle = this.originalElement.css('resize'); - this.originalElement.css('resize', 'none'); - - //Push the actual element to our proportionallyResize internal array - this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' })); - - // avoid IE jump (hard set the margin) - this.originalElement.css({ margin: this.originalElement.css('margin') }); - - // fix handlers offset - this._proportionallyResize(); - - } - - this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' }); - if(this.handles.constructor == String) { - - if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw'; - var n = this.handles.split(","); this.handles = {}; - - for(var i = 0; i < n.length; i++) { - - var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle; - var axis = $('
    '); - - // Apply zIndex to all handles - see #7960 - axis.css({ zIndex: o.zIndex }); - - //TODO : What's going on here? - if ('se' == handle) { - axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se'); - }; - - //Insert into internal handles object and append to element - this.handles[handle] = '.ui-resizable-'+handle; - this.element.append(axis); - } - - } - - this._renderAxis = function(target) { - - target = target || this.element; - - for(var i in this.handles) { - - if(this.handles[i].constructor == String) - this.handles[i] = $(this.handles[i], this.element).show(); - - //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls) - if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { - - var axis = $(this.handles[i], this.element), padWrapper = 0; - - //Checking the correct pad and border - padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); - - //The padding type i have to apply... - var padPos = [ 'padding', - /ne|nw|n/.test(i) ? 'Top' : - /se|sw|s/.test(i) ? 'Bottom' : - /^e$/.test(i) ? 'Right' : 'Left' ].join(""); - - target.css(padPos, padWrapper); - - this._proportionallyResize(); - - } - - //TODO: What's that good for? There's not anything to be executed left - if(!$(this.handles[i]).length) - continue; - - } - }; - - //TODO: make renderAxis a prototype function - this._renderAxis(this.element); - - this._handles = $('.ui-resizable-handle', this.element) - .disableSelection(); - - //Matching axis name - this._handles.mouseover(function() { - if (!that.resizing) { - if (this.className) - var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); - //Axis, default = se - that.axis = axis && axis[1] ? axis[1] : 'se'; - } - }); - - //If we want to auto hide the elements - if (o.autoHide) { - this._handles.hide(); - $(this.element) - .addClass("ui-resizable-autohide") - .mouseenter(function() { - if (o.disabled) return; - $(this).removeClass("ui-resizable-autohide"); - that._handles.show(); - }) - .mouseleave(function(){ - if (o.disabled) return; - if (!that.resizing) { - $(this).addClass("ui-resizable-autohide"); - that._handles.hide(); - } - }); - } - - //Initialize the mouse interaction - this._mouseInit(); - - }, - - _destroy: function() { - - this._mouseDestroy(); - - var _destroy = function(exp) { - $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") - .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove(); - }; - - //TODO: Unwrap at same DOM position - if (this.elementIsWrapper) { - _destroy(this.element); - var wrapper = this.element; - this.originalElement.css({ - position: wrapper.css('position'), - width: wrapper.outerWidth(), - height: wrapper.outerHeight(), - top: wrapper.css('top'), - left: wrapper.css('left') - }).insertAfter( wrapper ); - wrapper.remove(); - } - - this.originalElement.css('resize', this.originalResizeStyle); - _destroy(this.originalElement); - - return this; - }, - - _mouseCapture: function(event) { - var handle = false; - for (var i in this.handles) { - if ($(this.handles[i])[0] == event.target) { - handle = true; - } - } - - return !this.options.disabled && handle; - }, - - _mouseStart: function(event) { - - var o = this.options, iniPos = this.element.position(), el = this.element; - - this.resizing = true; - this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() }; - - // bugfix for http://dev.jquery.com/ticket/1749 - if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) { - el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left }); - } - - this._renderProxy(); - - var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top')); - - if (o.containment) { - curleft += $(o.containment).scrollLeft() || 0; - curtop += $(o.containment).scrollTop() || 0; - } - - //Store needed variables - this.offset = this.helper.offset(); - this.position = { left: curleft, top: curtop }; - this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; - this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; - this.originalPosition = { left: curleft, top: curtop }; - this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; - this.originalMousePosition = { left: event.pageX, top: event.pageY }; - - //Aspect Ratio - this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); - - var cursor = $('.ui-resizable-' + this.axis).css('cursor'); - $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor); - - el.addClass("ui-resizable-resizing"); - this._propagate("start", event); - return true; - }, - - _mouseDrag: function(event) { - - //Increase performance, avoid regex - var el = this.helper, o = this.options, props = {}, - that = this, smp = this.originalMousePosition, a = this.axis; - - var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0; - var trigger = this._change[a]; - if (!trigger) return false; - - // Calculate the attrs that will be change - var data = trigger.apply(this, [event, dx, dy]); - - // Put this in the mouseDrag handler since the user can start pressing shift while resizing - this._updateVirtualBoundaries(event.shiftKey); - if (this._aspectRatio || event.shiftKey) - data = this._updateRatio(data, event); - - data = this._respectSize(data, event); - - // plugins callbacks need to be called first - this._propagate("resize", event); - - el.css({ - top: this.position.top + "px", left: this.position.left + "px", - width: this.size.width + "px", height: this.size.height + "px" - }); - - if (!this._helper && this._proportionallyResizeElements.length) - this._proportionallyResize(); - - this._updateCache(data); - - // calling the user callback at the end - this._trigger('resize', event, this.ui()); - - return false; - }, - - _mouseStop: function(event) { - - this.resizing = false; - var o = this.options, that = this; - - if(this._helper) { - var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), - soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height, - soffsetw = ista ? 0 : that.sizeDiff.width; - - var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }, - left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null, - top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null; - - if (!o.animate) - this.element.css($.extend(s, { top: top, left: left })); - - that.helper.height(that.size.height); - that.helper.width(that.size.width); - - if (this._helper && !o.animate) this._proportionallyResize(); - } - - $('body').css('cursor', 'auto'); - - this.element.removeClass("ui-resizable-resizing"); - - this._propagate("stop", event); - - if (this._helper) this.helper.remove(); - return false; - - }, - - _updateVirtualBoundaries: function(forceAspectRatio) { - var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b; - - b = { - minWidth: isNumber(o.minWidth) ? o.minWidth : 0, - maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, - minHeight: isNumber(o.minHeight) ? o.minHeight : 0, - maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity - }; - - if(this._aspectRatio || forceAspectRatio) { - // We want to create an enclosing box whose aspect ration is the requested one - // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension - pMinWidth = b.minHeight * this.aspectRatio; - pMinHeight = b.minWidth / this.aspectRatio; - pMaxWidth = b.maxHeight * this.aspectRatio; - pMaxHeight = b.maxWidth / this.aspectRatio; - - if(pMinWidth > b.minWidth) b.minWidth = pMinWidth; - if(pMinHeight > b.minHeight) b.minHeight = pMinHeight; - if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth; - if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight; - } - this._vBoundaries = b; - }, - - _updateCache: function(data) { - var o = this.options; - this.offset = this.helper.offset(); - if (isNumber(data.left)) this.position.left = data.left; - if (isNumber(data.top)) this.position.top = data.top; - if (isNumber(data.height)) this.size.height = data.height; - if (isNumber(data.width)) this.size.width = data.width; - }, - - _updateRatio: function(data, event) { - - var o = this.options, cpos = this.position, csize = this.size, a = this.axis; - - if (isNumber(data.height)) data.width = (data.height * this.aspectRatio); - else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio); - - if (a == 'sw') { - data.left = cpos.left + (csize.width - data.width); - data.top = null; - } - if (a == 'nw') { - data.top = cpos.top + (csize.height - data.height); - data.left = cpos.left + (csize.width - data.width); - } - - return data; - }, - - _respectSize: function(data, event) { - - var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis, - ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), - isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height); - - if (isminw) data.width = o.minWidth; - if (isminh) data.height = o.minHeight; - if (ismaxw) data.width = o.maxWidth; - if (ismaxh) data.height = o.maxHeight; - - var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height; - var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); - - if (isminw && cw) data.left = dw - o.minWidth; - if (ismaxw && cw) data.left = dw - o.maxWidth; - if (isminh && ch) data.top = dh - o.minHeight; - if (ismaxh && ch) data.top = dh - o.maxHeight; - - // fixing jump error on top/left - bug #2330 - var isNotwh = !data.width && !data.height; - if (isNotwh && !data.left && data.top) data.top = null; - else if (isNotwh && !data.top && data.left) data.left = null; - - return data; - }, - - _proportionallyResize: function() { - - var o = this.options; - if (!this._proportionallyResizeElements.length) return; - var element = this.helper || this.element; - - for (var i=0; i < this._proportionallyResizeElements.length; i++) { - - var prel = this._proportionallyResizeElements[i]; - - if (!this.borderDif) { - var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')], - p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')]; - - this.borderDif = $.map(b, function(v, i) { - var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0; - return border + padding; - }); - } - - prel.css({ - height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, - width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 - }); - - }; - - }, - - _renderProxy: function() { - - var el = this.element, o = this.options; - this.elementOffset = el.offset(); - - if(this._helper) { - - this.helper = this.helper || $('
    '); - - // fix ie6 offset TODO: This seems broken - var ie6offset = ($.ui.ie6 ? 1 : 0), - pxyoffset = ( $.ui.ie6 ? 2 : -1 ); - - this.helper.addClass(this._helper).css({ - width: this.element.outerWidth() + pxyoffset, - height: this.element.outerHeight() + pxyoffset, - position: 'absolute', - left: this.elementOffset.left - ie6offset +'px', - top: this.elementOffset.top - ie6offset +'px', - zIndex: ++o.zIndex //TODO: Don't modify option - }); - - this.helper - .appendTo("body") - .disableSelection(); - - } else { - this.helper = this.element; - } - - }, - - _change: { - e: function(event, dx, dy) { - return { width: this.originalSize.width + dx }; - }, - w: function(event, dx, dy) { - var o = this.options, cs = this.originalSize, sp = this.originalPosition; - return { left: sp.left + dx, width: cs.width - dx }; - }, - n: function(event, dx, dy) { - var o = this.options, cs = this.originalSize, sp = this.originalPosition; - return { top: sp.top + dy, height: cs.height - dy }; - }, - s: function(event, dx, dy) { - return { height: this.originalSize.height + dy }; - }, - se: function(event, dx, dy) { - return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); - }, - sw: function(event, dx, dy) { - return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); - }, - ne: function(event, dx, dy) { - return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); - }, - nw: function(event, dx, dy) { - return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); - } - }, - - _propagate: function(n, event) { - $.ui.plugin.call(this, n, [event, this.ui()]); - (n != "resize" && this._trigger(n, event, this.ui())); - }, - - plugins: {}, - - ui: function() { - return { - originalElement: this.originalElement, - element: this.element, - helper: this.helper, - position: this.position, - size: this.size, - originalSize: this.originalSize, - originalPosition: this.originalPosition - }; - } - -}); - -/* - * Resizable Extensions - */ - -$.ui.plugin.add("resizable", "alsoResize", { - - start: function (event, ui) { - var that = $(this).data("resizable"), o = that.options; - - var _store = function (exp) { - $(exp).each(function() { - var el = $(this); - el.data("resizable-alsoresize", { - width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), - left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10) - }); - }); - }; - - if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) { - if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } - else { $.each(o.alsoResize, function (exp) { _store(exp); }); } - }else{ - _store(o.alsoResize); - } - }, - - resize: function (event, ui) { - var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition; - - var delta = { - height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0, - top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0 - }, - - _alsoResize = function (exp, c) { - $(exp).each(function() { - var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, - css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left']; - - $.each(css, function (i, prop) { - var sum = (start[prop]||0) + (delta[prop]||0); - if (sum && sum >= 0) - style[prop] = sum || null; - }); - - el.css(style); - }); - }; - - if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) { - $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); - }else{ - _alsoResize(o.alsoResize); - } - }, - - stop: function (event, ui) { - $(this).removeData("resizable-alsoresize"); - } -}); - -$.ui.plugin.add("resizable", "animate", { - - stop: function(event, ui) { - var that = $(this).data("resizable"), o = that.options; - - var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), - soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height, - soffsetw = ista ? 0 : that.sizeDiff.width; - - var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, - left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null, - top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null; - - that.element.animate( - $.extend(style, top && left ? { top: top, left: left } : {}), { - duration: o.animateDuration, - easing: o.animateEasing, - step: function() { - - var data = { - width: parseInt(that.element.css('width'), 10), - height: parseInt(that.element.css('height'), 10), - top: parseInt(that.element.css('top'), 10), - left: parseInt(that.element.css('left'), 10) - }; - - if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height }); - - // propagating resize, and updating values for each animation step - that._updateCache(data); - that._propagate("resize", event); - - } - } - ); - } - -}); - -$.ui.plugin.add("resizable", "containment", { - - start: function(event, ui) { - var that = $(this).data("resizable"), o = that.options, el = that.element; - var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; - if (!ce) return; - - that.containerElement = $(ce); - - if (/document/.test(oc) || oc == document) { - that.containerOffset = { left: 0, top: 0 }; - that.containerPosition = { left: 0, top: 0 }; - - that.parentData = { - element: $(document), left: 0, top: 0, - width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight - }; - } - - // i'm a node, so compute top, left, right, bottom - else { - var element = $(ce), p = []; - $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); - - that.containerOffset = element.offset(); - that.containerPosition = element.position(); - that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; - - var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width, - width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); - - that.parentData = { - element: ce, left: co.left, top: co.top, width: width, height: height - }; - } - }, - - resize: function(event, ui) { - var that = $(this).data("resizable"), o = that.options, - ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position, - pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement; - - if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co; - - if (cp.left < (that._helper ? co.left : 0)) { - that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); - if (pRatio) that.size.height = that.size.width / that.aspectRatio; - that.position.left = o.helper ? co.left : 0; - } - - if (cp.top < (that._helper ? co.top : 0)) { - that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); - if (pRatio) that.size.width = that.size.height * that.aspectRatio; - that.position.top = that._helper ? co.top : 0; - } - - that.offset.left = that.parentData.left+that.position.left; - that.offset.top = that.parentData.top+that.position.top; - - var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ), - hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height ); - - var isParent = that.containerElement.get(0) == that.element.parent().get(0), - isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position')); - - if(isParent && isOffsetRelative) woset -= that.parentData.left; - - if (woset + that.size.width >= that.parentData.width) { - that.size.width = that.parentData.width - woset; - if (pRatio) that.size.height = that.size.width / that.aspectRatio; - } - - if (hoset + that.size.height >= that.parentData.height) { - that.size.height = that.parentData.height - hoset; - if (pRatio) that.size.width = that.size.height * that.aspectRatio; - } - }, - - stop: function(event, ui){ - var that = $(this).data("resizable"), o = that.options, cp = that.position, - co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement; - - var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height; - - if (that._helper && !o.animate && (/relative/).test(ce.css('position'))) - $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); - - if (that._helper && !o.animate && (/static/).test(ce.css('position'))) - $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); - - } -}); - -$.ui.plugin.add("resizable", "ghost", { - - start: function(event, ui) { - - var that = $(this).data("resizable"), o = that.options, cs = that.size; - - that.ghost = that.originalElement.clone(); - that.ghost - .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) - .addClass('ui-resizable-ghost') - .addClass(typeof o.ghost == 'string' ? o.ghost : ''); - - that.ghost.appendTo(that.helper); - - }, - - resize: function(event, ui){ - var that = $(this).data("resizable"), o = that.options; - if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width }); - }, - - stop: function(event, ui){ - var that = $(this).data("resizable"), o = that.options; - if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0)); - } - -}); - -$.ui.plugin.add("resizable", "grid", { - - resize: function(event, ui) { - var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey; - o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid; - var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1); - - if (/^(se|s|e)$/.test(a)) { - that.size.width = os.width + ox; - that.size.height = os.height + oy; - } - else if (/^(ne)$/.test(a)) { - that.size.width = os.width + ox; - that.size.height = os.height + oy; - that.position.top = op.top - oy; - } - else if (/^(sw)$/.test(a)) { - that.size.width = os.width + ox; - that.size.height = os.height + oy; - that.position.left = op.left - ox; - } - else { - that.size.width = os.width + ox; - that.size.height = os.height + oy; - that.position.top = op.top - oy; - that.position.left = op.left - ox; - } - } - -}); - -var num = function(v) { - return parseInt(v, 10) || 0; -}; - -var isNumber = function(value) { - return !isNaN(parseInt(value, 10)); -}; - -})(jQuery); -(function( $, undefined ) { - -$.widget("ui.selectable", $.ui.mouse, { - version: "1.9.2", - options: { - appendTo: 'body', - autoRefresh: true, - distance: 0, - filter: '*', - tolerance: 'touch' - }, - _create: function() { - var that = this; - - this.element.addClass("ui-selectable"); - - this.dragged = false; - - // cache selectee children based on filter - var selectees; - this.refresh = function() { - selectees = $(that.options.filter, that.element[0]); - selectees.addClass("ui-selectee"); - selectees.each(function() { - var $this = $(this); - var pos = $this.offset(); - $.data(this, "selectable-item", { - element: this, - $element: $this, - left: pos.left, - top: pos.top, - right: pos.left + $this.outerWidth(), - bottom: pos.top + $this.outerHeight(), - startselected: false, - selected: $this.hasClass('ui-selected'), - selecting: $this.hasClass('ui-selecting'), - unselecting: $this.hasClass('ui-unselecting') - }); - }); - }; - this.refresh(); - - this.selectees = selectees.addClass("ui-selectee"); - - this._mouseInit(); - - this.helper = $("
    "); - }, - - _destroy: function() { - this.selectees - .removeClass("ui-selectee") - .removeData("selectable-item"); - this.element - .removeClass("ui-selectable ui-selectable-disabled"); - this._mouseDestroy(); - }, - - _mouseStart: function(event) { - var that = this; - - this.opos = [event.pageX, event.pageY]; - - if (this.options.disabled) - return; - - var options = this.options; - - this.selectees = $(options.filter, this.element[0]); - - this._trigger("start", event); - - $(options.appendTo).append(this.helper); - // position helper (lasso) - this.helper.css({ - "left": event.clientX, - "top": event.clientY, - "width": 0, - "height": 0 - }); - - if (options.autoRefresh) { - this.refresh(); - } - - this.selectees.filter('.ui-selected').each(function() { - var selectee = $.data(this, "selectable-item"); - selectee.startselected = true; - if (!event.metaKey && !event.ctrlKey) { - selectee.$element.removeClass('ui-selected'); - selectee.selected = false; - selectee.$element.addClass('ui-unselecting'); - selectee.unselecting = true; - // selectable UNSELECTING callback - that._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - }); - - $(event.target).parents().andSelf().each(function() { - var selectee = $.data(this, "selectable-item"); - if (selectee) { - var doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected'); - selectee.$element - .removeClass(doSelect ? "ui-unselecting" : "ui-selected") - .addClass(doSelect ? "ui-selecting" : "ui-unselecting"); - selectee.unselecting = !doSelect; - selectee.selecting = doSelect; - selectee.selected = doSelect; - // selectable (UN)SELECTING callback - if (doSelect) { - that._trigger("selecting", event, { - selecting: selectee.element - }); - } else { - that._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - return false; - } - }); - - }, - - _mouseDrag: function(event) { - var that = this; - this.dragged = true; - - if (this.options.disabled) - return; - - var options = this.options; - - var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY; - if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; } - if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; } - this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1}); - - this.selectees.each(function() { - var selectee = $.data(this, "selectable-item"); - //prevent helper from being selected if appendTo: selectable - if (!selectee || selectee.element == that.element[0]) - return; - var hit = false; - if (options.tolerance == 'touch') { - hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); - } else if (options.tolerance == 'fit') { - hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); - } - - if (hit) { - // SELECT - if (selectee.selected) { - selectee.$element.removeClass('ui-selected'); - selectee.selected = false; - } - if (selectee.unselecting) { - selectee.$element.removeClass('ui-unselecting'); - selectee.unselecting = false; - } - if (!selectee.selecting) { - selectee.$element.addClass('ui-selecting'); - selectee.selecting = true; - // selectable SELECTING callback - that._trigger("selecting", event, { - selecting: selectee.element - }); - } - } else { - // UNSELECT - if (selectee.selecting) { - if ((event.metaKey || event.ctrlKey) && selectee.startselected) { - selectee.$element.removeClass('ui-selecting'); - selectee.selecting = false; - selectee.$element.addClass('ui-selected'); - selectee.selected = true; - } else { - selectee.$element.removeClass('ui-selecting'); - selectee.selecting = false; - if (selectee.startselected) { - selectee.$element.addClass('ui-unselecting'); - selectee.unselecting = true; - } - // selectable UNSELECTING callback - that._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - } - if (selectee.selected) { - if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { - selectee.$element.removeClass('ui-selected'); - selectee.selected = false; - - selectee.$element.addClass('ui-unselecting'); - selectee.unselecting = true; - // selectable UNSELECTING callback - that._trigger("unselecting", event, { - unselecting: selectee.element - }); - } - } - } - }); - - return false; - }, - - _mouseStop: function(event) { - var that = this; - - this.dragged = false; - - var options = this.options; - - $('.ui-unselecting', this.element[0]).each(function() { - var selectee = $.data(this, "selectable-item"); - selectee.$element.removeClass('ui-unselecting'); - selectee.unselecting = false; - selectee.startselected = false; - that._trigger("unselected", event, { - unselected: selectee.element - }); - }); - $('.ui-selecting', this.element[0]).each(function() { - var selectee = $.data(this, "selectable-item"); - selectee.$element.removeClass('ui-selecting').addClass('ui-selected'); - selectee.selecting = false; - selectee.selected = true; - selectee.startselected = true; - that._trigger("selected", event, { - selected: selectee.element - }); - }); - this._trigger("stop", event); - - this.helper.remove(); - - return false; - } - -}); - -})(jQuery); -(function( $, undefined ) { - -// number of pages in a slider -// (how many times can you page up/down to go through the whole range) -var numPages = 5; - -$.widget( "ui.slider", $.ui.mouse, { - version: "1.9.2", - widgetEventPrefix: "slide", - - options: { - animate: false, - distance: 0, - max: 100, - min: 0, - orientation: "horizontal", - range: false, - step: 1, - value: 0, - values: null - }, - - _create: function() { - var i, handleCount, - o = this.options, - existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), - handle = "", - handles = []; - - this._keySliding = false; - this._mouseSliding = false; - this._animateOff = true; - this._handleIndex = null; - this._detectOrientation(); - this._mouseInit(); - - this.element - .addClass( "ui-slider" + - " ui-slider-" + this.orientation + - " ui-widget" + - " ui-widget-content" + - " ui-corner-all" + - ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) ); - - this.range = $([]); - - if ( o.range ) { - if ( o.range === true ) { - if ( !o.values ) { - o.values = [ this._valueMin(), this._valueMin() ]; - } - if ( o.values.length && o.values.length !== 2 ) { - o.values = [ o.values[0], o.values[0] ]; - } - } - - this.range = $( "
    " ) - .appendTo( this.element ) - .addClass( "ui-slider-range" + - // note: this isn't the most fittingly semantic framework class for this element, - // but worked best visually with a variety of themes - " ui-widget-header" + - ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) ); - } - - handleCount = ( o.values && o.values.length ) || 1; - - for ( i = existingHandles.length; i < handleCount; i++ ) { - handles.push( handle ); - } - - this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); - - this.handle = this.handles.eq( 0 ); - - this.handles.add( this.range ).filter( "a" ) - .click(function( event ) { - event.preventDefault(); - }) - .mouseenter(function() { - if ( !o.disabled ) { - $( this ).addClass( "ui-state-hover" ); - } - }) - .mouseleave(function() { - $( this ).removeClass( "ui-state-hover" ); - }) - .focus(function() { - if ( !o.disabled ) { - $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" ); - $( this ).addClass( "ui-state-focus" ); - } else { - $( this ).blur(); - } - }) - .blur(function() { - $( this ).removeClass( "ui-state-focus" ); - }); - - this.handles.each(function( i ) { - $( this ).data( "ui-slider-handle-index", i ); - }); - - this._on( this.handles, { - keydown: function( event ) { - var allowed, curVal, newVal, step, - index = $( event.target ).data( "ui-slider-handle-index" ); - - switch ( event.keyCode ) { - case $.ui.keyCode.HOME: - case $.ui.keyCode.END: - case $.ui.keyCode.PAGE_UP: - case $.ui.keyCode.PAGE_DOWN: - case $.ui.keyCode.UP: - case $.ui.keyCode.RIGHT: - case $.ui.keyCode.DOWN: - case $.ui.keyCode.LEFT: - event.preventDefault(); - if ( !this._keySliding ) { - this._keySliding = true; - $( event.target ).addClass( "ui-state-active" ); - allowed = this._start( event, index ); - if ( allowed === false ) { - return; - } - } - break; - } - - step = this.options.step; - if ( this.options.values && this.options.values.length ) { - curVal = newVal = this.values( index ); - } else { - curVal = newVal = this.value(); - } - - switch ( event.keyCode ) { - case $.ui.keyCode.HOME: - newVal = this._valueMin(); - break; - case $.ui.keyCode.END: - newVal = this._valueMax(); - break; - case $.ui.keyCode.PAGE_UP: - newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) ); - break; - case $.ui.keyCode.PAGE_DOWN: - newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) ); - break; - case $.ui.keyCode.UP: - case $.ui.keyCode.RIGHT: - if ( curVal === this._valueMax() ) { - return; - } - newVal = this._trimAlignValue( curVal + step ); - break; - case $.ui.keyCode.DOWN: - case $.ui.keyCode.LEFT: - if ( curVal === this._valueMin() ) { - return; - } - newVal = this._trimAlignValue( curVal - step ); - break; - } - - this._slide( event, index, newVal ); - }, - keyup: function( event ) { - var index = $( event.target ).data( "ui-slider-handle-index" ); - - if ( this._keySliding ) { - this._keySliding = false; - this._stop( event, index ); - this._change( event, index ); - $( event.target ).removeClass( "ui-state-active" ); - } - } - }); - - this._refreshValue(); - - this._animateOff = false; - }, - - _destroy: function() { - this.handles.remove(); - this.range.remove(); - - this.element - .removeClass( "ui-slider" + - " ui-slider-horizontal" + - " ui-slider-vertical" + - " ui-slider-disabled" + - " ui-widget" + - " ui-widget-content" + - " ui-corner-all" ); - - this._mouseDestroy(); - }, - - _mouseCapture: function( event ) { - var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, - that = this, - o = this.options; - - if ( o.disabled ) { - return false; - } - - this.elementSize = { - width: this.element.outerWidth(), - height: this.element.outerHeight() - }; - this.elementOffset = this.element.offset(); - - position = { x: event.pageX, y: event.pageY }; - normValue = this._normValueFromMouse( position ); - distance = this._valueMax() - this._valueMin() + 1; - this.handles.each(function( i ) { - var thisDistance = Math.abs( normValue - that.values(i) ); - if ( distance > thisDistance ) { - distance = thisDistance; - closestHandle = $( this ); - index = i; - } - }); - - // workaround for bug #3736 (if both handles of a range are at 0, - // the first is always used as the one with least distance, - // and moving it is obviously prevented by preventing negative ranges) - if( o.range === true && this.values(1) === o.min ) { - index += 1; - closestHandle = $( this.handles[index] ); - } - - allowed = this._start( event, index ); - if ( allowed === false ) { - return false; - } - this._mouseSliding = true; - - this._handleIndex = index; - - closestHandle - .addClass( "ui-state-active" ) - .focus(); - - offset = closestHandle.offset(); - mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" ); - this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { - left: event.pageX - offset.left - ( closestHandle.width() / 2 ), - top: event.pageY - offset.top - - ( closestHandle.height() / 2 ) - - ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - - ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + - ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) - }; - - if ( !this.handles.hasClass( "ui-state-hover" ) ) { - this._slide( event, index, normValue ); - } - this._animateOff = true; - return true; - }, - - _mouseStart: function() { - return true; - }, - - _mouseDrag: function( event ) { - var position = { x: event.pageX, y: event.pageY }, - normValue = this._normValueFromMouse( position ); - - this._slide( event, this._handleIndex, normValue ); - - return false; - }, - - _mouseStop: function( event ) { - this.handles.removeClass( "ui-state-active" ); - this._mouseSliding = false; - - this._stop( event, this._handleIndex ); - this._change( event, this._handleIndex ); - - this._handleIndex = null; - this._clickOffset = null; - this._animateOff = false; - - return false; - }, - - _detectOrientation: function() { - this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; - }, - - _normValueFromMouse: function( position ) { - var pixelTotal, - pixelMouse, - percentMouse, - valueTotal, - valueMouse; - - if ( this.orientation === "horizontal" ) { - pixelTotal = this.elementSize.width; - pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); - } else { - pixelTotal = this.elementSize.height; - pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); - } - - percentMouse = ( pixelMouse / pixelTotal ); - if ( percentMouse > 1 ) { - percentMouse = 1; - } - if ( percentMouse < 0 ) { - percentMouse = 0; - } - if ( this.orientation === "vertical" ) { - percentMouse = 1 - percentMouse; - } - - valueTotal = this._valueMax() - this._valueMin(); - valueMouse = this._valueMin() + percentMouse * valueTotal; - - return this._trimAlignValue( valueMouse ); - }, - - _start: function( event, index ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - return this._trigger( "start", event, uiHash ); - }, - - _slide: function( event, index, newVal ) { - var otherVal, - newValues, - allowed; - - if ( this.options.values && this.options.values.length ) { - otherVal = this.values( index ? 0 : 1 ); - - if ( ( this.options.values.length === 2 && this.options.range === true ) && - ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) - ) { - newVal = otherVal; - } - - if ( newVal !== this.values( index ) ) { - newValues = this.values(); - newValues[ index ] = newVal; - // A slide can be canceled by returning false from the slide callback - allowed = this._trigger( "slide", event, { - handle: this.handles[ index ], - value: newVal, - values: newValues - } ); - otherVal = this.values( index ? 0 : 1 ); - if ( allowed !== false ) { - this.values( index, newVal, true ); - } - } - } else { - if ( newVal !== this.value() ) { - // A slide can be canceled by returning false from the slide callback - allowed = this._trigger( "slide", event, { - handle: this.handles[ index ], - value: newVal - } ); - if ( allowed !== false ) { - this.value( newVal ); - } - } - } - }, - - _stop: function( event, index ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - - this._trigger( "stop", event, uiHash ); - }, - - _change: function( event, index ) { - if ( !this._keySliding && !this._mouseSliding ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - - this._trigger( "change", event, uiHash ); - } - }, - - value: function( newValue ) { - if ( arguments.length ) { - this.options.value = this._trimAlignValue( newValue ); - this._refreshValue(); - this._change( null, 0 ); - return; - } - - return this._value(); - }, - - values: function( index, newValue ) { - var vals, - newValues, - i; - - if ( arguments.length > 1 ) { - this.options.values[ index ] = this._trimAlignValue( newValue ); - this._refreshValue(); - this._change( null, index ); - return; - } - - if ( arguments.length ) { - if ( $.isArray( arguments[ 0 ] ) ) { - vals = this.options.values; - newValues = arguments[ 0 ]; - for ( i = 0; i < vals.length; i += 1 ) { - vals[ i ] = this._trimAlignValue( newValues[ i ] ); - this._change( null, i ); - } - this._refreshValue(); - } else { - if ( this.options.values && this.options.values.length ) { - return this._values( index ); - } else { - return this.value(); - } - } - } else { - return this._values(); - } - }, - - _setOption: function( key, value ) { - var i, - valsLength = 0; - - if ( $.isArray( this.options.values ) ) { - valsLength = this.options.values.length; - } - - $.Widget.prototype._setOption.apply( this, arguments ); - - switch ( key ) { - case "disabled": - if ( value ) { - this.handles.filter( ".ui-state-focus" ).blur(); - this.handles.removeClass( "ui-state-hover" ); - this.handles.prop( "disabled", true ); - this.element.addClass( "ui-disabled" ); - } else { - this.handles.prop( "disabled", false ); - this.element.removeClass( "ui-disabled" ); - } - break; - case "orientation": - this._detectOrientation(); - this.element - .removeClass( "ui-slider-horizontal ui-slider-vertical" ) - .addClass( "ui-slider-" + this.orientation ); - this._refreshValue(); - break; - case "value": - this._animateOff = true; - this._refreshValue(); - this._change( null, 0 ); - this._animateOff = false; - break; - case "values": - this._animateOff = true; - this._refreshValue(); - for ( i = 0; i < valsLength; i += 1 ) { - this._change( null, i ); - } - this._animateOff = false; - break; - case "min": - case "max": - this._animateOff = true; - this._refreshValue(); - this._animateOff = false; - break; - } - }, - - //internal value getter - // _value() returns value trimmed by min and max, aligned by step - _value: function() { - var val = this.options.value; - val = this._trimAlignValue( val ); - - return val; - }, - - //internal values getter - // _values() returns array of values trimmed by min and max, aligned by step - // _values( index ) returns single value trimmed by min and max, aligned by step - _values: function( index ) { - var val, - vals, - i; - - if ( arguments.length ) { - val = this.options.values[ index ]; - val = this._trimAlignValue( val ); - - return val; - } else { - // .slice() creates a copy of the array - // this copy gets trimmed by min and max and then returned - vals = this.options.values.slice(); - for ( i = 0; i < vals.length; i+= 1) { - vals[ i ] = this._trimAlignValue( vals[ i ] ); - } - - return vals; - } - }, - - // returns the step-aligned value that val is closest to, between (inclusive) min and max - _trimAlignValue: function( val ) { - if ( val <= this._valueMin() ) { - return this._valueMin(); - } - if ( val >= this._valueMax() ) { - return this._valueMax(); - } - var step = ( this.options.step > 0 ) ? this.options.step : 1, - valModStep = (val - this._valueMin()) % step, - alignValue = val - valModStep; - - if ( Math.abs(valModStep) * 2 >= step ) { - alignValue += ( valModStep > 0 ) ? step : ( -step ); - } - - // Since JavaScript has problems with large floats, round - // the final value to 5 digits after the decimal point (see #4124) - return parseFloat( alignValue.toFixed(5) ); - }, - - _valueMin: function() { - return this.options.min; - }, - - _valueMax: function() { - return this.options.max; - }, - - _refreshValue: function() { - var lastValPercent, valPercent, value, valueMin, valueMax, - oRange = this.options.range, - o = this.options, - that = this, - animate = ( !this._animateOff ) ? o.animate : false, - _set = {}; - - if ( this.options.values && this.options.values.length ) { - this.handles.each(function( i ) { - valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; - _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; - $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); - if ( that.options.range === true ) { - if ( that.orientation === "horizontal" ) { - if ( i === 0 ) { - that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); - } - if ( i === 1 ) { - that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } else { - if ( i === 0 ) { - that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); - } - if ( i === 1 ) { - that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } - } - lastValPercent = valPercent; - }); - } else { - value = this.value(); - valueMin = this._valueMin(); - valueMax = this._valueMax(); - valPercent = ( valueMax !== valueMin ) ? - ( value - valueMin ) / ( valueMax - valueMin ) * 100 : - 0; - _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; - this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); - - if ( oRange === "min" && this.orientation === "horizontal" ) { - this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); - } - if ( oRange === "max" && this.orientation === "horizontal" ) { - this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - if ( oRange === "min" && this.orientation === "vertical" ) { - this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); - } - if ( oRange === "max" && this.orientation === "vertical" ) { - this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } - } - -}); - -}(jQuery)); -(function( $, undefined ) { - -$.widget("ui.sortable", $.ui.mouse, { - version: "1.9.2", - widgetEventPrefix: "sort", - ready: false, - options: { - appendTo: "parent", - axis: false, - connectWith: false, - containment: false, - cursor: 'auto', - cursorAt: false, - dropOnEmpty: true, - forcePlaceholderSize: false, - forceHelperSize: false, - grid: false, - handle: false, - helper: "original", - items: '> *', - opacity: false, - placeholder: false, - revert: false, - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1000 - }, - _create: function() { - - var o = this.options; - this.containerCache = {}; - this.element.addClass("ui-sortable"); - - //Get the items - this.refresh(); - - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false; - - //Let's determine the parent's offset - this.offset = this.element.offset(); - - //Initialize mouse events for interaction - this._mouseInit(); - - //We're ready to go - this.ready = true - - }, - - _destroy: function() { - this.element - .removeClass("ui-sortable ui-sortable-disabled"); - this._mouseDestroy(); - - for ( var i = this.items.length - 1; i >= 0; i-- ) - this.items[i].item.removeData(this.widgetName + "-item"); - - return this; - }, - - _setOption: function(key, value){ - if ( key === "disabled" ) { - this.options[ key ] = value; - - this.widget().toggleClass( "ui-sortable-disabled", !!value ); - } else { - // Don't call widget base _setOption for disable as it adds ui-state-disabled class - $.Widget.prototype._setOption.apply(this, arguments); - } - }, - - _mouseCapture: function(event, overrideHandle) { - var that = this; - - if (this.reverting) { - return false; - } - - if(this.options.disabled || this.options.type == 'static') return false; - - //We have to refresh the items data once first - this._refreshItems(event); - - //Find out if the clicked node (or one of its parents) is a actual item in this.items - var currentItem = null, nodes = $(event.target).parents().each(function() { - if($.data(this, that.widgetName + '-item') == that) { - currentItem = $(this); - return false; - } - }); - if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target); - - if(!currentItem) return false; - if(this.options.handle && !overrideHandle) { - var validHandle = false; - - $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; }); - if(!validHandle) return false; - } - - this.currentItem = currentItem; - this._removeCurrentsFromItems(); - return true; - - }, - - _mouseStart: function(event, overrideHandle, noActivation) { - - var o = this.options; - this.currentContainer = this; - - //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture - this.refreshPositions(); - - //Create and append the visible helper - this.helper = this._createHelper(event); - - //Cache the helper size - this._cacheHelperProportions(); - - /* - * - Position generation - - * This block generates everything position related - it's the core of draggables. - */ - - //Cache the margins of the original element - this._cacheMargins(); - - //Get the next scrolling parent - this.scrollParent = this.helper.scrollParent(); - - //The element's absolute position on the page minus margins - this.offset = this.currentItem.offset(); - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }; - - $.extend(this.offset, { - click: { //Where the click happened, relative to the element - left: event.pageX - this.offset.left, - top: event.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper - }); - - // Only after we got the offset, we can change the helper's position to absolute - // TODO: Still need to figure out a way to make relative sorting possible - this.helper.css("position", "absolute"); - this.cssPosition = this.helper.css("position"); - - //Generate the original position - this.originalPosition = this._generatePosition(event); - this.originalPageX = event.pageX; - this.originalPageY = event.pageY; - - //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied - (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); - - //Cache the former DOM position - this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; - - //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way - if(this.helper[0] != this.currentItem[0]) { - this.currentItem.hide(); - } - - //Create the placeholder - this._createPlaceholder(); - - //Set a containment if given in the options - if(o.containment) - this._setContainment(); - - if(o.cursor) { // cursor option - if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor"); - $('body').css("cursor", o.cursor); - } - - if(o.opacity) { // opacity option - if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity"); - this.helper.css("opacity", o.opacity); - } - - if(o.zIndex) { // zIndex option - if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex"); - this.helper.css("zIndex", o.zIndex); - } - - //Prepare scrolling - if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') - this.overflowOffset = this.scrollParent.offset(); - - //Call callbacks - this._trigger("start", event, this._uiHash()); - - //Recache the helper size - if(!this._preserveHelperProportions) - this._cacheHelperProportions(); - - - //Post 'activate' events to possible containers - if(!noActivation) { - for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); } - } - - //Prepare possible droppables - if($.ui.ddmanager) - $.ui.ddmanager.current = this; - - if ($.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(this, event); - - this.dragging = true; - - this.helper.addClass("ui-sortable-helper"); - this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position - return true; - - }, - - _mouseDrag: function(event) { - - //Compute the helpers position - this.position = this._generatePosition(event); - this.positionAbs = this._convertPositionTo("absolute"); - - if (!this.lastPositionAbs) { - this.lastPositionAbs = this.positionAbs; - } - - //Do scrolling - if(this.options.scroll) { - var o = this.options, scrolled = false; - if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') { - - if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; - else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) - this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; - - if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; - else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) - this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; - - } else { - - if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); - else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) - scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); - - if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); - else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) - scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); - - } - - if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) - $.ui.ddmanager.prepareOffsets(this, event); - } - - //Regenerate the absolute position used for position checks - this.positionAbs = this._convertPositionTo("absolute"); - - //Set the helper position - if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; - if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; - - //Rearrange - for (var i = this.items.length - 1; i >= 0; i--) { - - //Cache variables and intersection, continue if no intersection - var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item); - if (!intersection) continue; - - // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving - // an item from one container to another the - // currentContainer is switched before the placeholder is moved. - // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. - if (item.instance !== this.currentContainer) continue; - - if (itemElement != this.currentItem[0] //cannot intersect with itself - && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before - && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked - && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true) - //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container - ) { - - this.direction = intersection == 1 ? "down" : "up"; - - if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { - this._rearrange(event, item); - } else { - break; - } - - this._trigger("change", event, this._uiHash()); - break; - } - } - - //Post events to containers - this._contactContainers(event); - - //Interconnect with droppables - if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); - - //Call callbacks - this._trigger('sort', event, this._uiHash()); - - this.lastPositionAbs = this.positionAbs; - return false; - - }, - - _mouseStop: function(event, noPropagation) { - - if(!event) return; - - //If we are using droppables, inform the manager about the drop - if ($.ui.ddmanager && !this.options.dropBehaviour) - $.ui.ddmanager.drop(this, event); - - if(this.options.revert) { - var that = this; - var cur = this.placeholder.offset(); - - this.reverting = true; - - $(this.helper).animate({ - left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), - top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) - }, parseInt(this.options.revert, 10) || 500, function() { - that._clear(event); - }); - } else { - this._clear(event, noPropagation); - } - - return false; - - }, - - cancel: function() { - - if(this.dragging) { - - this._mouseUp({ target: null }); - - if(this.options.helper == "original") - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - else - this.currentItem.show(); - - //Post deactivating events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - this.containers[i]._trigger("deactivate", null, this._uiHash(this)); - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", null, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - if (this.placeholder) { - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove(); - - $.extend(this, { - helper: null, - dragging: false, - reverting: false, - _noFinalSort: null - }); - - if(this.domPosition.prev) { - $(this.domPosition.prev).after(this.currentItem); - } else { - $(this.domPosition.parent).prepend(this.currentItem); - } - } - - return this; - - }, - - serialize: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected); - var str = []; o = o || {}; - - $(items).each(function() { - var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); - if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2])); - }); - - if(!str.length && o.key) { - str.push(o.key + '='); - } - - return str.join('&'); - - }, - - toArray: function(o) { - - var items = this._getItemsAsjQuery(o && o.connected); - var ret = []; o = o || {}; - - items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); }); - return ret; - - }, - - /* Be careful with the following core functions */ - _intersectsWith: function(item) { - - var x1 = this.positionAbs.left, - x2 = x1 + this.helperProportions.width, - y1 = this.positionAbs.top, - y2 = y1 + this.helperProportions.height; - - var l = item.left, - r = l + item.width, - t = item.top, - b = t + item.height; - - var dyClick = this.offset.click.top, - dxClick = this.offset.click.left; - - var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r; - - if( this.options.tolerance == "pointer" - || this.options.forcePointerForContainers - || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) - ) { - return isOverElement; - } else { - - return (l < x1 + (this.helperProportions.width / 2) // Right Half - && x2 - (this.helperProportions.width / 2) < r // Left Half - && t < y1 + (this.helperProportions.height / 2) // Bottom Half - && y2 - (this.helperProportions.height / 2) < b ); // Top Half - - } - }, - - _intersectsWithPointer: function(item) { - - var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), - isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), - isOverElement = isOverElementHeight && isOverElementWidth, - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (!isOverElement) - return false; - - return this.floating ? - ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 ) - : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) ); - - }, - - _intersectsWithSides: function(item) { - - var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), - isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), - verticalDirection = this._getDragVerticalDirection(), - horizontalDirection = this._getDragHorizontalDirection(); - - if (this.floating && horizontalDirection) { - return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf)); - } else { - return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf)); - } - - }, - - _getDragVerticalDirection: function() { - var delta = this.positionAbs.top - this.lastPositionAbs.top; - return delta != 0 && (delta > 0 ? "down" : "up"); - }, - - _getDragHorizontalDirection: function() { - var delta = this.positionAbs.left - this.lastPositionAbs.left; - return delta != 0 && (delta > 0 ? "right" : "left"); - }, - - refresh: function(event) { - this._refreshItems(event); - this.refreshPositions(); - return this; - }, - - _connectWith: function() { - var options = this.options; - return options.connectWith.constructor == String - ? [options.connectWith] - : options.connectWith; - }, - - _getItemsAsjQuery: function(connected) { - - var items = []; - var queries = []; - var connectWith = this._connectWith(); - - if(connectWith && connected) { - for (var i = connectWith.length - 1; i >= 0; i--){ - var cur = $(connectWith[i]); - for (var j = cur.length - 1; j >= 0; j--){ - var inst = $.data(cur[j], this.widgetName); - if(inst && inst != this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]); - } - }; - }; - } - - queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]); - - for (var i = queries.length - 1; i >= 0; i--){ - queries[i][0].each(function() { - items.push(this); - }); - }; - - return $(items); - - }, - - _removeCurrentsFromItems: function() { - - var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); - - this.items = $.grep(this.items, function (item) { - for (var j=0; j < list.length; j++) { - if(list[j] == item.item[0]) - return false; - }; - return true; - }); - - }, - - _refreshItems: function(event) { - - this.items = []; - this.containers = [this]; - var items = this.items; - var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]]; - var connectWith = this._connectWith(); - - if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down - for (var i = connectWith.length - 1; i >= 0; i--){ - var cur = $(connectWith[i]); - for (var j = cur.length - 1; j >= 0; j--){ - var inst = $.data(cur[j], this.widgetName); - if(inst && inst != this && !inst.options.disabled) { - queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); - this.containers.push(inst); - } - }; - }; - } - - for (var i = queries.length - 1; i >= 0; i--) { - var targetData = queries[i][1]; - var _queries = queries[i][0]; - - for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) { - var item = $(_queries[j]); - - item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager) - - items.push({ - item: item, - instance: targetData, - width: 0, height: 0, - left: 0, top: 0 - }); - }; - }; - - }, - - refreshPositions: function(fast) { - - //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change - if(this.offsetParent && this.helper) { - this.offset.parent = this._getParentOffset(); - } - - for (var i = this.items.length - 1; i >= 0; i--){ - var item = this.items[i]; - - //We ignore calculating positions of all connected containers when we're not over them - if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) - continue; - - var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; - - if (!fast) { - item.width = t.outerWidth(); - item.height = t.outerHeight(); - } - - var p = t.offset(); - item.left = p.left; - item.top = p.top; - }; - - if(this.options.custom && this.options.custom.refreshContainers) { - this.options.custom.refreshContainers.call(this); - } else { - for (var i = this.containers.length - 1; i >= 0; i--){ - var p = this.containers[i].element.offset(); - this.containers[i].containerCache.left = p.left; - this.containers[i].containerCache.top = p.top; - this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); - this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); - }; - } - - return this; - }, - - _createPlaceholder: function(that) { - that = that || this; - var o = that.options; - - if(!o.placeholder || o.placeholder.constructor == String) { - var className = o.placeholder; - o.placeholder = { - element: function() { - - var el = $(document.createElement(that.currentItem[0].nodeName)) - .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") - .removeClass("ui-sortable-helper")[0]; - - if(!className) - el.style.visibility = "hidden"; - - return el; - }, - update: function(container, p) { - - // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that - // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified - if(className && !o.forcePlaceholderSize) return; - - //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item - if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); }; - if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); }; - } - }; - } - - //Create the placeholder - that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); - - //Append it after the actual current item - that.currentItem.after(that.placeholder); - - //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) - o.placeholder.update(that, that.placeholder); - - }, - - _contactContainers: function(event) { - - // get innermost container that intersects with item - var innermostContainer = null, innermostIndex = null; - - - for (var i = this.containers.length - 1; i >= 0; i--){ - - // never consider a container that's located within the item itself - if($.contains(this.currentItem[0], this.containers[i].element[0])) - continue; - - if(this._intersectsWith(this.containers[i].containerCache)) { - - // if we've already found a container and it's more "inner" than this, then continue - if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) - continue; - - innermostContainer = this.containers[i]; - innermostIndex = i; - - } else { - // container doesn't intersect. trigger "out" event if necessary - if(this.containers[i].containerCache.over) { - this.containers[i]._trigger("out", event, this._uiHash(this)); - this.containers[i].containerCache.over = 0; - } - } - - } - - // if no intersecting containers found, return - if(!innermostContainer) return; - - // move the item into the container if it's not there already - if(this.containers.length === 1) { - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } else { - - //When entering a new container, we will find the item with the least distance and append our item near it - var dist = 10000; var itemWithLeastDistance = null; - var posProperty = this.containers[innermostIndex].floating ? 'left' : 'top'; - var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height'; - var base = this.positionAbs[posProperty] + this.offset.click[posProperty]; - for (var j = this.items.length - 1; j >= 0; j--) { - if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue; - if(this.items[j].item[0] == this.currentItem[0]) continue; - var cur = this.items[j].item.offset()[posProperty]; - var nearBottom = false; - if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ - nearBottom = true; - cur += this.items[j][sizeProperty]; - } - - if(Math.abs(cur - base) < dist) { - dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; - this.direction = nearBottom ? "up": "down"; - } - } - - if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled - return; - - this.currentContainer = this.containers[innermostIndex]; - itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); - this._trigger("change", event, this._uiHash()); - this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); - - //Update the placeholder - this.options.placeholder.update(this.currentContainer, this.placeholder); - - this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); - this.containers[innermostIndex].containerCache.over = 1; - } - - - }, - - _createHelper: function(event) { - - var o = this.options; - var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem); - - if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already - $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); - - if(helper[0] == this.currentItem[0]) - this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; - - if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width()); - if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height()); - - return helper; - - }, - - _adjustOffsetFromHelper: function(obj) { - if (typeof obj == 'string') { - obj = obj.split(' '); - } - if ($.isArray(obj)) { - obj = {left: +obj[0], top: +obj[1] || 0}; - } - if ('left' in obj) { - this.offset.click.left = obj.left + this.margins.left; - } - if ('right' in obj) { - this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; - } - if ('top' in obj) { - this.offset.click.top = obj.top + this.margins.top; - } - if ('bottom' in obj) { - this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; - } - }, - - _getParentOffset: function() { - - - //Get the offsetParent and cache its position - this.offsetParent = this.helper.offsetParent(); - var po = this.offsetParent.offset(); - - // This is a special case where we need to modify a offset calculated on start, since the following happened: - // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent - // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that - // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag - if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) { - po.left += this.scrollParent.scrollLeft(); - po.top += this.scrollParent.scrollTop(); - } - - if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information - || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix - po = { top: 0, left: 0 }; - - return { - top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), - left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) - }; - - }, - - _getRelativeOffset: function() { - - if(this.cssPosition == "relative") { - var p = this.currentItem.position(); - return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() - }; - } else { - return { top: 0, left: 0 }; - } - - }, - - _cacheMargins: function() { - this.margins = { - left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), - top: (parseInt(this.currentItem.css("marginTop"),10) || 0) - }; - }, - - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - }; - }, - - _setContainment: function() { - - var o = this.options; - if(o.containment == 'parent') o.containment = this.helper[0].parentNode; - if(o.containment == 'document' || o.containment == 'window') this.containment = [ - 0 - this.offset.relative.left - this.offset.parent.left, - 0 - this.offset.relative.top - this.offset.parent.top, - $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left, - ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top - ]; - - if(!(/^(document|window|parent)$/).test(o.containment)) { - var ce = $(o.containment)[0]; - var co = $(o.containment).offset(); - var over = ($(ce).css("overflow") != 'hidden'); - - this.containment = [ - co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, - co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, - co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, - co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - ]; - } - - }, - - _convertPositionTo: function(d, pos) { - - if(!pos) pos = this.position; - var mod = d == "absolute" ? 1 : -1; - var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - return { - top: ( - pos.top // The absolute mouse position - + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) - - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) - ), - left: ( - pos.left // The absolute mouse position - + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent - + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) - - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) - ) - }; - - }, - - _generatePosition: function(event) { - - var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); - - // This is another very weird special case that only happens for relative elements: - // 1. If the css position is relative - // 2. and the scroll parent is the document or similar to the offset parent - // we have to refresh the relative offset during the scroll so there are no jumps - if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { - this.offset.relative = this._getRelativeOffset(); - } - - var pageX = event.pageX; - var pageY = event.pageY; - - /* - * - Position constraining - - * Constrain the position to a mix of grid, containment. - */ - - if(this.originalPosition) { //If we are not dragging yet, we won't check for options - - if(this.containment) { - if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left; - if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top; - if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; - if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; - } - - if(o.grid) { - var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; - pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; - - var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; - pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; - } - - } - - return { - top: ( - pageY // The absolute mouse position - - this.offset.click.top // Click offset (relative to the element) - - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.top // The offsetParent's offset without borders (offset + border) - + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) - ), - left: ( - pageX // The absolute mouse position - - this.offset.click.left // Click offset (relative to the element) - - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent - - this.offset.parent.left // The offsetParent's offset without borders (offset + border) - + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) - ) - }; - - }, - - _rearrange: function(event, i, a, hardRefresh) { - - a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling)); - - //Various things done here to improve the performance: - // 1. we create a setTimeout, that calls refreshPositions - // 2. on the instance, we have a counter variable, that get's higher after every append - // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same - // 4. this lets only the last addition to the timeout stack through - this.counter = this.counter ? ++this.counter : 1; - var counter = this.counter; - - this._delay(function() { - if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove - }); - - }, - - _clear: function(event, noPropagation) { - - this.reverting = false; - // We delay all events that have to be triggered to after the point where the placeholder has been removed and - // everything else normalized again - var delayedTriggers = []; - - // We first have to update the dom position of the actual currentItem - // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) - if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem); - this._noFinalSort = null; - - if(this.helper[0] == this.currentItem[0]) { - for(var i in this._storedCSS) { - if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = ''; - } - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); - } else { - this.currentItem.show(); - } - - if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); - if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed - - // Check if the items Container has Changed and trigger appropriate - // events. - if (this !== this.currentContainer) { - if(!noPropagation) { - delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); - delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); - } - } - - - //Post events to containers - for (var i = this.containers.length - 1; i >= 0; i--){ - if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - if(this.containers[i].containerCache.over) { - delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); - this.containers[i].containerCache.over = 0; - } - } - - //Do what was originally in plugins - if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor - if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity - if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index - - this.dragging = false; - if(this.cancelHelperRemoval) { - if(!noPropagation) { - this._trigger("beforeStop", event, this._uiHash()); - for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return false; - } - - if(!noPropagation) this._trigger("beforeStop", event, this._uiHash()); - - //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! - this.placeholder[0].parentNode.removeChild(this.placeholder[0]); - - if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null; - - if(!noPropagation) { - for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events - this._trigger("stop", event, this._uiHash()); - } - - this.fromOutside = false; - return true; - - }, - - _trigger: function() { - if ($.Widget.prototype._trigger.apply(this, arguments) === false) { - this.cancel(); - } - }, - - _uiHash: function(_inst) { - var inst = _inst || this; - return { - helper: inst.helper, - placeholder: inst.placeholder || $([]), - position: inst.position, - originalPosition: inst.originalPosition, - offset: inst.positionAbs, - item: inst.currentItem, - sender: _inst ? _inst.element : null - }; - } - -}); - -})(jQuery); -(function( $ ) { - -function modifier( fn ) { - return function() { - var previous = this.element.val(); - fn.apply( this, arguments ); - this._refresh(); - if ( previous !== this.element.val() ) { - this._trigger( "change" ); - } - }; -} - -$.widget( "ui.spinner", { - version: "1.9.2", - defaultElement: "", - widgetEventPrefix: "spin", - options: { - culture: null, - icons: { - down: "ui-icon-triangle-1-s", - up: "ui-icon-triangle-1-n" - }, - incremental: true, - max: null, - min: null, - numberFormat: null, - page: 10, - step: 1, - - change: null, - spin: null, - start: null, - stop: null - }, - - _create: function() { - // handle string values that need to be parsed - this._setOption( "max", this.options.max ); - this._setOption( "min", this.options.min ); - this._setOption( "step", this.options.step ); - - // format the value, but don't constrain - this._value( this.element.val(), true ); - - this._draw(); - this._on( this._events ); - this._refresh(); - - // turning off autocomplete prevents the browser from remembering the - // value when navigating through history, so we re-enable autocomplete - // if the page is unloaded before the widget is destroyed. #7790 - this._on( this.window, { - beforeunload: function() { - this.element.removeAttr( "autocomplete" ); - } - }); - }, - - _getCreateOptions: function() { - var options = {}, - element = this.element; - - $.each( [ "min", "max", "step" ], function( i, option ) { - var value = element.attr( option ); - if ( value !== undefined && value.length ) { - options[ option ] = value; - } - }); - - return options; - }, - - _events: { - keydown: function( event ) { - if ( this._start( event ) && this._keydown( event ) ) { - event.preventDefault(); - } - }, - keyup: "_stop", - focus: function() { - this.previous = this.element.val(); - }, - blur: function( event ) { - if ( this.cancelBlur ) { - delete this.cancelBlur; - return; - } - - this._refresh(); - if ( this.previous !== this.element.val() ) { - this._trigger( "change", event ); - } - }, - mousewheel: function( event, delta ) { - if ( !delta ) { - return; - } - if ( !this.spinning && !this._start( event ) ) { - return false; - } - - this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); - clearTimeout( this.mousewheelTimer ); - this.mousewheelTimer = this._delay(function() { - if ( this.spinning ) { - this._stop( event ); - } - }, 100 ); - event.preventDefault(); - }, - "mousedown .ui-spinner-button": function( event ) { - var previous; - - // We never want the buttons to have focus; whenever the user is - // interacting with the spinner, the focus should be on the input. - // If the input is focused then this.previous is properly set from - // when the input first received focus. If the input is not focused - // then we need to set this.previous based on the value before spinning. - previous = this.element[0] === this.document[0].activeElement ? - this.previous : this.element.val(); - function checkFocus() { - var isActive = this.element[0] === this.document[0].activeElement; - if ( !isActive ) { - this.element.focus(); - this.previous = previous; - // support: IE - // IE sets focus asynchronously, so we need to check if focus - // moved off of the input because the user clicked on the button. - this._delay(function() { - this.previous = previous; - }); - } - } - - // ensure focus is on (or stays on) the text field - event.preventDefault(); - checkFocus.call( this ); - - // support: IE - // IE doesn't prevent moving focus even with event.preventDefault() - // so we set a flag to know when we should ignore the blur event - // and check (again) if focus moved off of the input. - this.cancelBlur = true; - this._delay(function() { - delete this.cancelBlur; - checkFocus.call( this ); - }); - - if ( this._start( event ) === false ) { - return; - } - - this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); - }, - "mouseup .ui-spinner-button": "_stop", - "mouseenter .ui-spinner-button": function( event ) { - // button will add ui-state-active if mouse was down while mouseleave and kept down - if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { - return; - } - - if ( this._start( event ) === false ) { - return false; - } - this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); - }, - // TODO: do we really want to consider this a stop? - // shouldn't we just stop the repeater and wait until mouseup before - // we trigger the stop event? - "mouseleave .ui-spinner-button": "_stop" - }, - - _draw: function() { - var uiSpinner = this.uiSpinner = this.element - .addClass( "ui-spinner-input" ) - .attr( "autocomplete", "off" ) - .wrap( this._uiSpinnerHtml() ) - .parent() - // add buttons - .append( this._buttonHtml() ); - - this.element.attr( "role", "spinbutton" ); - - // button bindings - this.buttons = uiSpinner.find( ".ui-spinner-button" ) - .attr( "tabIndex", -1 ) - .button() - .removeClass( "ui-corner-all" ); - - // IE 6 doesn't understand height: 50% for the buttons - // unless the wrapper has an explicit height - if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && - uiSpinner.height() > 0 ) { - uiSpinner.height( uiSpinner.height() ); - } - - // disable spinner if element was already disabled - if ( this.options.disabled ) { - this.disable(); - } - }, - - _keydown: function( event ) { - var options = this.options, - keyCode = $.ui.keyCode; - - switch ( event.keyCode ) { - case keyCode.UP: - this._repeat( null, 1, event ); - return true; - case keyCode.DOWN: - this._repeat( null, -1, event ); - return true; - case keyCode.PAGE_UP: - this._repeat( null, options.page, event ); - return true; - case keyCode.PAGE_DOWN: - this._repeat( null, -options.page, event ); - return true; - } - - return false; - }, - - _uiSpinnerHtml: function() { - return ""; - }, - - _buttonHtml: function() { - return "" + - "" + - "" + - "" + - "" + - "" + - ""; - }, - - _start: function( event ) { - if ( !this.spinning && this._trigger( "start", event ) === false ) { - return false; - } - - if ( !this.counter ) { - this.counter = 1; - } - this.spinning = true; - return true; - }, - - _repeat: function( i, steps, event ) { - i = i || 500; - - clearTimeout( this.timer ); - this.timer = this._delay(function() { - this._repeat( 40, steps, event ); - }, i ); - - this._spin( steps * this.options.step, event ); - }, - - _spin: function( step, event ) { - var value = this.value() || 0; - - if ( !this.counter ) { - this.counter = 1; - } - - value = this._adjustValue( value + step * this._increment( this.counter ) ); - - if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { - this._value( value ); - this.counter++; - } - }, - - _increment: function( i ) { - var incremental = this.options.incremental; - - if ( incremental ) { - return $.isFunction( incremental ) ? - incremental( i ) : - Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 ); - } - - return 1; - }, - - _precision: function() { - var precision = this._precisionOf( this.options.step ); - if ( this.options.min !== null ) { - precision = Math.max( precision, this._precisionOf( this.options.min ) ); - } - return precision; - }, - - _precisionOf: function( num ) { - var str = num.toString(), - decimal = str.indexOf( "." ); - return decimal === -1 ? 0 : str.length - decimal - 1; - }, - - _adjustValue: function( value ) { - var base, aboveMin, - options = this.options; - - // make sure we're at a valid step - // - find out where we are relative to the base (min or 0) - base = options.min !== null ? options.min : 0; - aboveMin = value - base; - // - round to the nearest step - aboveMin = Math.round(aboveMin / options.step) * options.step; - // - rounding is based on 0, so adjust back to our base - value = base + aboveMin; - - // fix precision from bad JS floating point math - value = parseFloat( value.toFixed( this._precision() ) ); - - // clamp the value - if ( options.max !== null && value > options.max) { - return options.max; - } - if ( options.min !== null && value < options.min ) { - return options.min; - } - - return value; - }, - - _stop: function( event ) { - if ( !this.spinning ) { - return; - } - - clearTimeout( this.timer ); - clearTimeout( this.mousewheelTimer ); - this.counter = 0; - this.spinning = false; - this._trigger( "stop", event ); - }, - - _setOption: function( key, value ) { - if ( key === "culture" || key === "numberFormat" ) { - var prevValue = this._parse( this.element.val() ); - this.options[ key ] = value; - this.element.val( this._format( prevValue ) ); - return; - } - - if ( key === "max" || key === "min" || key === "step" ) { - if ( typeof value === "string" ) { - value = this._parse( value ); - } - } - - this._super( key, value ); - - if ( key === "disabled" ) { - if ( value ) { - this.element.prop( "disabled", true ); - this.buttons.button( "disable" ); - } else { - this.element.prop( "disabled", false ); - this.buttons.button( "enable" ); - } - } - }, - - _setOptions: modifier(function( options ) { - this._super( options ); - this._value( this.element.val() ); - }), - - _parse: function( val ) { - if ( typeof val === "string" && val !== "" ) { - val = window.Globalize && this.options.numberFormat ? - Globalize.parseFloat( val, 10, this.options.culture ) : +val; - } - return val === "" || isNaN( val ) ? null : val; - }, - - _format: function( value ) { - if ( value === "" ) { - return ""; - } - return window.Globalize && this.options.numberFormat ? - Globalize.format( value, this.options.numberFormat, this.options.culture ) : - value; - }, - - _refresh: function() { - this.element.attr({ - "aria-valuemin": this.options.min, - "aria-valuemax": this.options.max, - // TODO: what should we do with values that can't be parsed? - "aria-valuenow": this._parse( this.element.val() ) - }); - }, - - // update the value without triggering change - _value: function( value, allowAny ) { - var parsed; - if ( value !== "" ) { - parsed = this._parse( value ); - if ( parsed !== null ) { - if ( !allowAny ) { - parsed = this._adjustValue( parsed ); - } - value = this._format( parsed ); - } - } - this.element.val( value ); - this._refresh(); - }, - - _destroy: function() { - this.element - .removeClass( "ui-spinner-input" ) - .prop( "disabled", false ) - .removeAttr( "autocomplete" ) - .removeAttr( "role" ) - .removeAttr( "aria-valuemin" ) - .removeAttr( "aria-valuemax" ) - .removeAttr( "aria-valuenow" ); - this.uiSpinner.replaceWith( this.element ); - }, - - stepUp: modifier(function( steps ) { - this._stepUp( steps ); - }), - _stepUp: function( steps ) { - this._spin( (steps || 1) * this.options.step ); - }, - - stepDown: modifier(function( steps ) { - this._stepDown( steps ); - }), - _stepDown: function( steps ) { - this._spin( (steps || 1) * -this.options.step ); - }, - - pageUp: modifier(function( pages ) { - this._stepUp( (pages || 1) * this.options.page ); - }), - - pageDown: modifier(function( pages ) { - this._stepDown( (pages || 1) * this.options.page ); - }), - - value: function( newVal ) { - if ( !arguments.length ) { - return this._parse( this.element.val() ); - } - modifier( this._value ).call( this, newVal ); - }, - - widget: function() { - return this.uiSpinner; - } -}); - -}( jQuery ) ); -(function( $, undefined ) { - -var tabId = 0, - rhash = /#.*$/; - -function getNextTabId() { - return ++tabId; -} - -function isLocal( anchor ) { - return anchor.hash.length > 1 && - anchor.href.replace( rhash, "" ) === - location.href.replace( rhash, "" ) - // support: Safari 5.1 - // Safari 5.1 doesn't encode spaces in window.location - // but it does encode spaces from anchors (#8777) - .replace( /\s/g, "%20" ); -} - -$.widget( "ui.tabs", { - version: "1.9.2", - delay: 300, - options: { - active: null, - collapsible: false, - event: "click", - heightStyle: "content", - hide: null, - show: null, - - // callbacks - activate: null, - beforeActivate: null, - beforeLoad: null, - load: null - }, - - _create: function() { - var that = this, - options = this.options, - active = options.active, - locationHash = location.hash.substring( 1 ); - - this.running = false; - - this.element - .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) - .toggleClass( "ui-tabs-collapsible", options.collapsible ) - // Prevent users from focusing disabled tabs via click - .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) { - if ( $( this ).is( ".ui-state-disabled" ) ) { - event.preventDefault(); - } - }) - // support: IE <9 - // Preventing the default action in mousedown doesn't prevent IE - // from focusing the element, so if the anchor gets focused, blur. - // We don't have to worry about focusing the previously focused - // element since clicking on a non-focusable element should focus - // the body anyway. - .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { - if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { - this.blur(); - } - }); - - this._processTabs(); - - if ( active === null ) { - // check the fragment identifier in the URL - if ( locationHash ) { - this.tabs.each(function( i, tab ) { - if ( $( tab ).attr( "aria-controls" ) === locationHash ) { - active = i; - return false; - } - }); - } - - // check for a tab marked active via a class - if ( active === null ) { - active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); - } - - // no active tab, set to false - if ( active === null || active === -1 ) { - active = this.tabs.length ? 0 : false; - } - } - - // handle numbers: negative, out of range - if ( active !== false ) { - active = this.tabs.index( this.tabs.eq( active ) ); - if ( active === -1 ) { - active = options.collapsible ? false : 0; - } - } - options.active = active; - - // don't allow collapsible: false and active: false - if ( !options.collapsible && options.active === false && this.anchors.length ) { - options.active = 0; - } - - // Take disabling tabs via class attribute from HTML - // into account and update option properly. - if ( $.isArray( options.disabled ) ) { - options.disabled = $.unique( options.disabled.concat( - $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { - return that.tabs.index( li ); - }) - ) ).sort(); - } - - // check for length avoids error when initializing empty list - if ( this.options.active !== false && this.anchors.length ) { - this.active = this._findActive( this.options.active ); - } else { - this.active = $(); - } - - this._refresh(); - - if ( this.active.length ) { - this.load( options.active ); - } - }, - - _getCreateEventData: function() { - return { - tab: this.active, - panel: !this.active.length ? $() : this._getPanelForTab( this.active ) - }; - }, - - _tabKeydown: function( event ) { - var focusedTab = $( this.document[0].activeElement ).closest( "li" ), - selectedIndex = this.tabs.index( focusedTab ), - goingForward = true; - - if ( this._handlePageNav( event ) ) { - return; - } - - switch ( event.keyCode ) { - case $.ui.keyCode.RIGHT: - case $.ui.keyCode.DOWN: - selectedIndex++; - break; - case $.ui.keyCode.UP: - case $.ui.keyCode.LEFT: - goingForward = false; - selectedIndex--; - break; - case $.ui.keyCode.END: - selectedIndex = this.anchors.length - 1; - break; - case $.ui.keyCode.HOME: - selectedIndex = 0; - break; - case $.ui.keyCode.SPACE: - // Activate only, no collapsing - event.preventDefault(); - clearTimeout( this.activating ); - this._activate( selectedIndex ); - return; - case $.ui.keyCode.ENTER: - // Toggle (cancel delayed activation, allow collapsing) - event.preventDefault(); - clearTimeout( this.activating ); - // Determine if we should collapse or activate - this._activate( selectedIndex === this.options.active ? false : selectedIndex ); - return; - default: - return; - } - - // Focus the appropriate tab, based on which key was pressed - event.preventDefault(); - clearTimeout( this.activating ); - selectedIndex = this._focusNextTab( selectedIndex, goingForward ); - - // Navigating with control key will prevent automatic activation - if ( !event.ctrlKey ) { - // Update aria-selected immediately so that AT think the tab is already selected. - // Otherwise AT may confuse the user by stating that they need to activate the tab, - // but the tab will already be activated by the time the announcement finishes. - focusedTab.attr( "aria-selected", "false" ); - this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); - - this.activating = this._delay(function() { - this.option( "active", selectedIndex ); - }, this.delay ); - } - }, - - _panelKeydown: function( event ) { - if ( this._handlePageNav( event ) ) { - return; - } - - // Ctrl+up moves focus to the current tab - if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { - event.preventDefault(); - this.active.focus(); - } - }, - - // Alt+page up/down moves focus to the previous/next tab (and activates) - _handlePageNav: function( event ) { - if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { - this._activate( this._focusNextTab( this.options.active - 1, false ) ); - return true; - } - if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { - this._activate( this._focusNextTab( this.options.active + 1, true ) ); - return true; - } - }, - - _findNextTab: function( index, goingForward ) { - var lastTabIndex = this.tabs.length - 1; - - function constrain() { - if ( index > lastTabIndex ) { - index = 0; - } - if ( index < 0 ) { - index = lastTabIndex; - } - return index; - } - - while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { - index = goingForward ? index + 1 : index - 1; - } - - return index; - }, - - _focusNextTab: function( index, goingForward ) { - index = this._findNextTab( index, goingForward ); - this.tabs.eq( index ).focus(); - return index; - }, - - _setOption: function( key, value ) { - if ( key === "active" ) { - // _activate() will handle invalid values and update this.options - this._activate( value ); - return; - } - - if ( key === "disabled" ) { - // don't use the widget factory's disabled handling - this._setupDisabled( value ); - return; - } - - this._super( key, value); - - if ( key === "collapsible" ) { - this.element.toggleClass( "ui-tabs-collapsible", value ); - // Setting collapsible: false while collapsed; open first panel - if ( !value && this.options.active === false ) { - this._activate( 0 ); - } - } - - if ( key === "event" ) { - this._setupEvents( value ); - } - - if ( key === "heightStyle" ) { - this._setupHeightStyle( value ); - } - }, - - _tabId: function( tab ) { - return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId(); - }, - - _sanitizeSelector: function( hash ) { - return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; - }, - - refresh: function() { - var options = this.options, - lis = this.tablist.children( ":has(a[href])" ); - - // get disabled tabs from class attribute from HTML - // this will get converted to a boolean if needed in _refresh() - options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { - return lis.index( tab ); - }); - - this._processTabs(); - - // was collapsed or no tabs - if ( options.active === false || !this.anchors.length ) { - options.active = false; - this.active = $(); - // was active, but active tab is gone - } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { - // all remaining tabs are disabled - if ( this.tabs.length === options.disabled.length ) { - options.active = false; - this.active = $(); - // activate previous tab - } else { - this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); - } - // was active, active tab still exists - } else { - // make sure active index is correct - options.active = this.tabs.index( this.active ); - } - - this._refresh(); - }, - - _refresh: function() { - this._setupDisabled( this.options.disabled ); - this._setupEvents( this.options.event ); - this._setupHeightStyle( this.options.heightStyle ); - - this.tabs.not( this.active ).attr({ - "aria-selected": "false", - tabIndex: -1 - }); - this.panels.not( this._getPanelForTab( this.active ) ) - .hide() - .attr({ - "aria-expanded": "false", - "aria-hidden": "true" - }); - - // Make sure one tab is in the tab order - if ( !this.active.length ) { - this.tabs.eq( 0 ).attr( "tabIndex", 0 ); - } else { - this.active - .addClass( "ui-tabs-active ui-state-active" ) - .attr({ - "aria-selected": "true", - tabIndex: 0 - }); - this._getPanelForTab( this.active ) - .show() - .attr({ - "aria-expanded": "true", - "aria-hidden": "false" - }); - } - }, - - _processTabs: function() { - var that = this; - - this.tablist = this._getList() - .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) - .attr( "role", "tablist" ); - - this.tabs = this.tablist.find( "> li:has(a[href])" ) - .addClass( "ui-state-default ui-corner-top" ) - .attr({ - role: "tab", - tabIndex: -1 - }); - - this.anchors = this.tabs.map(function() { - return $( "a", this )[ 0 ]; - }) - .addClass( "ui-tabs-anchor" ) - .attr({ - role: "presentation", - tabIndex: -1 - }); - - this.panels = $(); - - this.anchors.each(function( i, anchor ) { - var selector, panel, panelId, - anchorId = $( anchor ).uniqueId().attr( "id" ), - tab = $( anchor ).closest( "li" ), - originalAriaControls = tab.attr( "aria-controls" ); - - // inline tab - if ( isLocal( anchor ) ) { - selector = anchor.hash; - panel = that.element.find( that._sanitizeSelector( selector ) ); - // remote tab - } else { - panelId = that._tabId( tab ); - selector = "#" + panelId; - panel = that.element.find( selector ); - if ( !panel.length ) { - panel = that._createPanel( panelId ); - panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); - } - panel.attr( "aria-live", "polite" ); - } - - if ( panel.length) { - that.panels = that.panels.add( panel ); - } - if ( originalAriaControls ) { - tab.data( "ui-tabs-aria-controls", originalAriaControls ); - } - tab.attr({ - "aria-controls": selector.substring( 1 ), - "aria-labelledby": anchorId - }); - panel.attr( "aria-labelledby", anchorId ); - }); - - this.panels - .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) - .attr( "role", "tabpanel" ); - }, - - // allow overriding how to find the list for rare usage scenarios (#7715) - _getList: function() { - return this.element.find( "ol,ul" ).eq( 0 ); - }, - - _createPanel: function( id ) { - return $( "
    " ) - .attr( "id", id ) - .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) - .data( "ui-tabs-destroy", true ); - }, - - _setupDisabled: function( disabled ) { - if ( $.isArray( disabled ) ) { - if ( !disabled.length ) { - disabled = false; - } else if ( disabled.length === this.anchors.length ) { - disabled = true; - } - } - - // disable tabs - for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { - if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { - $( li ) - .addClass( "ui-state-disabled" ) - .attr( "aria-disabled", "true" ); - } else { - $( li ) - .removeClass( "ui-state-disabled" ) - .removeAttr( "aria-disabled" ); - } - } - - this.options.disabled = disabled; - }, - - _setupEvents: function( event ) { - var events = { - click: function( event ) { - event.preventDefault(); - } - }; - if ( event ) { - $.each( event.split(" "), function( index, eventName ) { - events[ eventName ] = "_eventHandler"; - }); - } - - this._off( this.anchors.add( this.tabs ).add( this.panels ) ); - this._on( this.anchors, events ); - this._on( this.tabs, { keydown: "_tabKeydown" } ); - this._on( this.panels, { keydown: "_panelKeydown" } ); - - this._focusable( this.tabs ); - this._hoverable( this.tabs ); - }, - - _setupHeightStyle: function( heightStyle ) { - var maxHeight, overflow, - parent = this.element.parent(); - - if ( heightStyle === "fill" ) { - // IE 6 treats height like minHeight, so we need to turn off overflow - // in order to get a reliable height - // we use the minHeight support test because we assume that only - // browsers that don't support minHeight will treat height as minHeight - if ( !$.support.minHeight ) { - overflow = parent.css( "overflow" ); - parent.css( "overflow", "hidden"); - } - maxHeight = parent.height(); - this.element.siblings( ":visible" ).each(function() { - var elem = $( this ), - position = elem.css( "position" ); - - if ( position === "absolute" || position === "fixed" ) { - return; - } - maxHeight -= elem.outerHeight( true ); - }); - if ( overflow ) { - parent.css( "overflow", overflow ); - } - - this.element.children().not( this.panels ).each(function() { - maxHeight -= $( this ).outerHeight( true ); - }); - - this.panels.each(function() { - $( this ).height( Math.max( 0, maxHeight - - $( this ).innerHeight() + $( this ).height() ) ); - }) - .css( "overflow", "auto" ); - } else if ( heightStyle === "auto" ) { - maxHeight = 0; - this.panels.each(function() { - maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); - }).height( maxHeight ); - } - }, - - _eventHandler: function( event ) { - var options = this.options, - active = this.active, - anchor = $( event.currentTarget ), - tab = anchor.closest( "li" ), - clickedIsActive = tab[ 0 ] === active[ 0 ], - collapsing = clickedIsActive && options.collapsible, - toShow = collapsing ? $() : this._getPanelForTab( tab ), - toHide = !active.length ? $() : this._getPanelForTab( active ), - eventData = { - oldTab: active, - oldPanel: toHide, - newTab: collapsing ? $() : tab, - newPanel: toShow - }; - - event.preventDefault(); - - if ( tab.hasClass( "ui-state-disabled" ) || - // tab is already loading - tab.hasClass( "ui-tabs-loading" ) || - // can't switch durning an animation - this.running || - // click on active header, but not collapsible - ( clickedIsActive && !options.collapsible ) || - // allow canceling activation - ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { - return; - } - - options.active = collapsing ? false : this.tabs.index( tab ); - - this.active = clickedIsActive ? $() : tab; - if ( this.xhr ) { - this.xhr.abort(); - } - - if ( !toHide.length && !toShow.length ) { - $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); - } - - if ( toShow.length ) { - this.load( this.tabs.index( tab ), event ); - } - this._toggle( event, eventData ); - }, - - // handles show/hide for selecting tabs - _toggle: function( event, eventData ) { - var that = this, - toShow = eventData.newPanel, - toHide = eventData.oldPanel; - - this.running = true; - - function complete() { - that.running = false; - that._trigger( "activate", event, eventData ); - } - - function show() { - eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); - - if ( toShow.length && that.options.show ) { - that._show( toShow, that.options.show, complete ); - } else { - toShow.show(); - complete(); - } - } - - // start out by hiding, then showing, then completing - if ( toHide.length && this.options.hide ) { - this._hide( toHide, this.options.hide, function() { - eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); - show(); - }); - } else { - eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); - toHide.hide(); - show(); - } - - toHide.attr({ - "aria-expanded": "false", - "aria-hidden": "true" - }); - eventData.oldTab.attr( "aria-selected", "false" ); - // If we're switching tabs, remove the old tab from the tab order. - // If we're opening from collapsed state, remove the previous tab from the tab order. - // If we're collapsing, then keep the collapsing tab in the tab order. - if ( toShow.length && toHide.length ) { - eventData.oldTab.attr( "tabIndex", -1 ); - } else if ( toShow.length ) { - this.tabs.filter(function() { - return $( this ).attr( "tabIndex" ) === 0; - }) - .attr( "tabIndex", -1 ); - } - - toShow.attr({ - "aria-expanded": "true", - "aria-hidden": "false" - }); - eventData.newTab.attr({ - "aria-selected": "true", - tabIndex: 0 - }); - }, - - _activate: function( index ) { - var anchor, - active = this._findActive( index ); - - // trying to activate the already active panel - if ( active[ 0 ] === this.active[ 0 ] ) { - return; - } - - // trying to collapse, simulate a click on the current active header - if ( !active.length ) { - active = this.active; - } - - anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; - this._eventHandler({ - target: anchor, - currentTarget: anchor, - preventDefault: $.noop - }); - }, - - _findActive: function( index ) { - return index === false ? $() : this.tabs.eq( index ); - }, - - _getIndex: function( index ) { - // meta-function to give users option to provide a href string instead of a numerical index. - if ( typeof index === "string" ) { - index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); - } - - return index; - }, - - _destroy: function() { - if ( this.xhr ) { - this.xhr.abort(); - } - - this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); - - this.tablist - .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) - .removeAttr( "role" ); - - this.anchors - .removeClass( "ui-tabs-anchor" ) - .removeAttr( "role" ) - .removeAttr( "tabIndex" ) - .removeData( "href.tabs" ) - .removeData( "load.tabs" ) - .removeUniqueId(); - - this.tabs.add( this.panels ).each(function() { - if ( $.data( this, "ui-tabs-destroy" ) ) { - $( this ).remove(); - } else { - $( this ) - .removeClass( "ui-state-default ui-state-active ui-state-disabled " + - "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) - .removeAttr( "tabIndex" ) - .removeAttr( "aria-live" ) - .removeAttr( "aria-busy" ) - .removeAttr( "aria-selected" ) - .removeAttr( "aria-labelledby" ) - .removeAttr( "aria-hidden" ) - .removeAttr( "aria-expanded" ) - .removeAttr( "role" ); - } - }); - - this.tabs.each(function() { - var li = $( this ), - prev = li.data( "ui-tabs-aria-controls" ); - if ( prev ) { - li.attr( "aria-controls", prev ); - } else { - li.removeAttr( "aria-controls" ); - } - }); - - this.panels.show(); - - if ( this.options.heightStyle !== "content" ) { - this.panels.css( "height", "" ); - } - }, - - enable: function( index ) { - var disabled = this.options.disabled; - if ( disabled === false ) { - return; - } - - if ( index === undefined ) { - disabled = false; - } else { - index = this._getIndex( index ); - if ( $.isArray( disabled ) ) { - disabled = $.map( disabled, function( num ) { - return num !== index ? num : null; - }); - } else { - disabled = $.map( this.tabs, function( li, num ) { - return num !== index ? num : null; - }); - } - } - this._setupDisabled( disabled ); - }, - - disable: function( index ) { - var disabled = this.options.disabled; - if ( disabled === true ) { - return; - } - - if ( index === undefined ) { - disabled = true; - } else { - index = this._getIndex( index ); - if ( $.inArray( index, disabled ) !== -1 ) { - return; - } - if ( $.isArray( disabled ) ) { - disabled = $.merge( [ index ], disabled ).sort(); - } else { - disabled = [ index ]; - } - } - this._setupDisabled( disabled ); - }, - - load: function( index, event ) { - index = this._getIndex( index ); - var that = this, - tab = this.tabs.eq( index ), - anchor = tab.find( ".ui-tabs-anchor" ), - panel = this._getPanelForTab( tab ), - eventData = { - tab: tab, - panel: panel - }; - - // not remote - if ( isLocal( anchor[ 0 ] ) ) { - return; - } - - this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); - - // support: jQuery <1.8 - // jQuery <1.8 returns false if the request is canceled in beforeSend, - // but as of 1.8, $.ajax() always returns a jqXHR object. - if ( this.xhr && this.xhr.statusText !== "canceled" ) { - tab.addClass( "ui-tabs-loading" ); - panel.attr( "aria-busy", "true" ); - - this.xhr - .success(function( response ) { - // support: jQuery <1.8 - // http://bugs.jquery.com/ticket/11778 - setTimeout(function() { - panel.html( response ); - that._trigger( "load", event, eventData ); - }, 1 ); - }) - .complete(function( jqXHR, status ) { - // support: jQuery <1.8 - // http://bugs.jquery.com/ticket/11778 - setTimeout(function() { - if ( status === "abort" ) { - that.panels.stop( false, true ); - } - - tab.removeClass( "ui-tabs-loading" ); - panel.removeAttr( "aria-busy" ); - - if ( jqXHR === that.xhr ) { - delete that.xhr; - } - }, 1 ); - }); - } - }, - - // TODO: Remove this function in 1.10 when ajaxOptions is removed - _ajaxSettings: function( anchor, event, eventData ) { - var that = this; - return { - url: anchor.attr( "href" ), - beforeSend: function( jqXHR, settings ) { - return that._trigger( "beforeLoad", event, - $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) ); - } - }; - }, - - _getPanelForTab: function( tab ) { - var id = $( tab ).attr( "aria-controls" ); - return this.element.find( this._sanitizeSelector( "#" + id ) ); - } -}); - -// DEPRECATED -if ( $.uiBackCompat !== false ) { - - // helper method for a lot of the back compat extensions - $.ui.tabs.prototype._ui = function( tab, panel ) { - return { - tab: tab, - panel: panel, - index: this.anchors.index( tab ) - }; - }; - - // url method - $.widget( "ui.tabs", $.ui.tabs, { - url: function( index, url ) { - this.anchors.eq( index ).attr( "href", url ); - } - }); - - // TODO: Remove _ajaxSettings() method when removing this extension - // ajaxOptions and cache options - $.widget( "ui.tabs", $.ui.tabs, { - options: { - ajaxOptions: null, - cache: false - }, - - _create: function() { - this._super(); - - var that = this; - - this._on({ tabsbeforeload: function( event, ui ) { - // tab is already cached - if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { - event.preventDefault(); - return; - } - - ui.jqXHR.success(function() { - if ( that.options.cache ) { - $.data( ui.tab[ 0 ], "cache.tabs", true ); - } - }); - }}); - }, - - _ajaxSettings: function( anchor, event, ui ) { - var ajaxOptions = this.options.ajaxOptions; - return $.extend( {}, ajaxOptions, { - error: function( xhr, status ) { - try { - // Passing index avoid a race condition when this method is - // called after the user has selected another tab. - // Pass the anchor that initiated this request allows - // loadError to manipulate the tab content panel via $(a.hash) - ajaxOptions.error( - xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); - } - catch ( error ) {} - } - }, this._superApply( arguments ) ); - }, - - _setOption: function( key, value ) { - // reset cache if switching from cached to not cached - if ( key === "cache" && value === false ) { - this.anchors.removeData( "cache.tabs" ); - } - this._super( key, value ); - }, - - _destroy: function() { - this.anchors.removeData( "cache.tabs" ); - this._super(); - }, - - url: function( index ){ - this.anchors.eq( index ).removeData( "cache.tabs" ); - this._superApply( arguments ); - } - }); - - // abort method - $.widget( "ui.tabs", $.ui.tabs, { - abort: function() { - if ( this.xhr ) { - this.xhr.abort(); - } - } - }); - - // spinner - $.widget( "ui.tabs", $.ui.tabs, { - options: { - spinner: "Loading…" - }, - _create: function() { - this._super(); - this._on({ - tabsbeforeload: function( event, ui ) { - // Don't react to nested tabs or tabs that don't use a spinner - if ( event.target !== this.element[ 0 ] || - !this.options.spinner ) { - return; - } - - var span = ui.tab.find( "span" ), - html = span.html(); - span.html( this.options.spinner ); - ui.jqXHR.complete(function() { - span.html( html ); - }); - } - }); - } - }); - - // enable/disable events - $.widget( "ui.tabs", $.ui.tabs, { - options: { - enable: null, - disable: null - }, - - enable: function( index ) { - var options = this.options, - trigger; - - if ( index && options.disabled === true || - ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) { - trigger = true; - } - - this._superApply( arguments ); - - if ( trigger ) { - this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); - } - }, - - disable: function( index ) { - var options = this.options, - trigger; - - if ( index && options.disabled === false || - ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) { - trigger = true; - } - - this._superApply( arguments ); - - if ( trigger ) { - this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); - } - } - }); - - // add/remove methods and events - $.widget( "ui.tabs", $.ui.tabs, { - options: { - add: null, - remove: null, - tabTemplate: "
  • #{label}
  • " - }, - - add: function( url, label, index ) { - if ( index === undefined ) { - index = this.anchors.length; - } - - var doInsertAfter, panel, - options = this.options, - li = $( options.tabTemplate - .replace( /#\{href\}/g, url ) - .replace( /#\{label\}/g, label ) ), - id = !url.indexOf( "#" ) ? - url.replace( "#", "" ) : - this._tabId( li ); - - li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true ); - li.attr( "aria-controls", id ); - - doInsertAfter = index >= this.tabs.length; - - // try to find an existing element before creating a new one - panel = this.element.find( "#" + id ); - if ( !panel.length ) { - panel = this._createPanel( id ); - if ( doInsertAfter ) { - if ( index > 0 ) { - panel.insertAfter( this.panels.eq( -1 ) ); - } else { - panel.appendTo( this.element ); - } - } else { - panel.insertBefore( this.panels[ index ] ); - } - } - panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide(); - - if ( doInsertAfter ) { - li.appendTo( this.tablist ); - } else { - li.insertBefore( this.tabs[ index ] ); - } - - options.disabled = $.map( options.disabled, function( n ) { - return n >= index ? ++n : n; - }); - - this.refresh(); - if ( this.tabs.length === 1 && options.active === false ) { - this.option( "active", 0 ); - } - - this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); - return this; - }, - - remove: function( index ) { - index = this._getIndex( index ); - var options = this.options, - tab = this.tabs.eq( index ).remove(), - panel = this._getPanelForTab( tab ).remove(); - - // If selected tab was removed focus tab to the right or - // in case the last tab was removed the tab to the left. - // We check for more than 2 tabs, because if there are only 2, - // then when we remove this tab, there will only be one tab left - // so we don't need to detect which tab to activate. - if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) { - this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) ); - } - - options.disabled = $.map( - $.grep( options.disabled, function( n ) { - return n !== index; - }), - function( n ) { - return n >= index ? --n : n; - }); - - this.refresh(); - - this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) ); - return this; - } - }); - - // length method - $.widget( "ui.tabs", $.ui.tabs, { - length: function() { - return this.anchors.length; - } - }); - - // panel ids (idPrefix option + title attribute) - $.widget( "ui.tabs", $.ui.tabs, { - options: { - idPrefix: "ui-tabs-" - }, - - _tabId: function( tab ) { - var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab; - a = a[0]; - return $( a ).closest( "li" ).attr( "aria-controls" ) || - a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) || - this.options.idPrefix + getNextTabId(); - } - }); - - // _createPanel method - $.widget( "ui.tabs", $.ui.tabs, { - options: { - panelTemplate: "
    " - }, - - _createPanel: function( id ) { - return $( this.options.panelTemplate ) - .attr( "id", id ) - .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) - .data( "ui-tabs-destroy", true ); - } - }); - - // selected option - $.widget( "ui.tabs", $.ui.tabs, { - _create: function() { - var options = this.options; - if ( options.active === null && options.selected !== undefined ) { - options.active = options.selected === -1 ? false : options.selected; - } - this._super(); - options.selected = options.active; - if ( options.selected === false ) { - options.selected = -1; - } - }, - - _setOption: function( key, value ) { - if ( key !== "selected" ) { - return this._super( key, value ); - } - - var options = this.options; - this._super( "active", value === -1 ? false : value ); - options.selected = options.active; - if ( options.selected === false ) { - options.selected = -1; - } - }, - - _eventHandler: function() { - this._superApply( arguments ); - this.options.selected = this.options.active; - if ( this.options.selected === false ) { - this.options.selected = -1; - } - } - }); - - // show and select event - $.widget( "ui.tabs", $.ui.tabs, { - options: { - show: null, - select: null - }, - _create: function() { - this._super(); - if ( this.options.active !== false ) { - this._trigger( "show", null, this._ui( - this.active.find( ".ui-tabs-anchor" )[ 0 ], - this._getPanelForTab( this.active )[ 0 ] ) ); - } - }, - _trigger: function( type, event, data ) { - var tab, panel, - ret = this._superApply( arguments ); - - if ( !ret ) { - return false; - } - - if ( type === "beforeActivate" ) { - tab = data.newTab.length ? data.newTab : data.oldTab; - panel = data.newPanel.length ? data.newPanel : data.oldPanel; - ret = this._super( "select", event, { - tab: tab.find( ".ui-tabs-anchor" )[ 0], - panel: panel[ 0 ], - index: tab.closest( "li" ).index() - }); - } else if ( type === "activate" && data.newTab.length ) { - ret = this._super( "show", event, { - tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ], - panel: data.newPanel[ 0 ], - index: data.newTab.closest( "li" ).index() - }); - } - return ret; - } - }); - - // select method - $.widget( "ui.tabs", $.ui.tabs, { - select: function( index ) { - index = this._getIndex( index ); - if ( index === -1 ) { - if ( this.options.collapsible && this.options.selected !== -1 ) { - index = this.options.selected; - } else { - return; - } - } - this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace ); - } - }); - - // cookie option - (function() { - - var listId = 0; - - $.widget( "ui.tabs", $.ui.tabs, { - options: { - cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } - }, - _create: function() { - var options = this.options, - active; - if ( options.active == null && options.cookie ) { - active = parseInt( this._cookie(), 10 ); - if ( active === -1 ) { - active = false; - } - options.active = active; - } - this._super(); - }, - _cookie: function( active ) { - var cookie = [ this.cookie || - ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ]; - if ( arguments.length ) { - cookie.push( active === false ? -1 : active ); - cookie.push( this.options.cookie ); - } - return $.cookie.apply( null, cookie ); - }, - _refresh: function() { - this._super(); - if ( this.options.cookie ) { - this._cookie( this.options.active, this.options.cookie ); - } - }, - _eventHandler: function() { - this._superApply( arguments ); - if ( this.options.cookie ) { - this._cookie( this.options.active, this.options.cookie ); - } - }, - _destroy: function() { - this._super(); - if ( this.options.cookie ) { - this._cookie( null, this.options.cookie ); - } - } - }); - - })(); - - // load event - $.widget( "ui.tabs", $.ui.tabs, { - _trigger: function( type, event, data ) { - var _data = $.extend( {}, data ); - if ( type === "load" ) { - _data.panel = _data.panel[ 0 ]; - _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ]; - } - return this._super( type, event, _data ); - } - }); - - // fx option - // The new animation options (show, hide) conflict with the old show callback. - // The old fx option wins over show/hide anyway (always favor back-compat). - // If a user wants to use the new animation API, they must give up the old API. - $.widget( "ui.tabs", $.ui.tabs, { - options: { - fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 } - }, - - _getFx: function() { - var hide, show, - fx = this.options.fx; - - if ( fx ) { - if ( $.isArray( fx ) ) { - hide = fx[ 0 ]; - show = fx[ 1 ]; - } else { - hide = show = fx; - } - } - - return fx ? { show: show, hide: hide } : null; - }, - - _toggle: function( event, eventData ) { - var that = this, - toShow = eventData.newPanel, - toHide = eventData.oldPanel, - fx = this._getFx(); - - if ( !fx ) { - return this._super( event, eventData ); - } - - that.running = true; - - function complete() { - that.running = false; - that._trigger( "activate", event, eventData ); - } - - function show() { - eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); - - if ( toShow.length && fx.show ) { - toShow - .animate( fx.show, fx.show.duration, function() { - complete(); - }); - } else { - toShow.show(); - complete(); - } - } - - // start out by hiding, then showing, then completing - if ( toHide.length && fx.hide ) { - toHide.animate( fx.hide, fx.hide.duration, function() { - eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); - show(); - }); - } else { - eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); - toHide.hide(); - show(); - } - } - }); -} - -})( jQuery ); -(function( $ ) { - -var increments = 0; - -function addDescribedBy( elem, id ) { - var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); - describedby.push( id ); - elem - .data( "ui-tooltip-id", id ) - .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); -} - -function removeDescribedBy( elem ) { - var id = elem.data( "ui-tooltip-id" ), - describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), - index = $.inArray( id, describedby ); - if ( index !== -1 ) { - describedby.splice( index, 1 ); - } - - elem.removeData( "ui-tooltip-id" ); - describedby = $.trim( describedby.join( " " ) ); - if ( describedby ) { - elem.attr( "aria-describedby", describedby ); - } else { - elem.removeAttr( "aria-describedby" ); - } -} - -$.widget( "ui.tooltip", { - version: "1.9.2", - options: { - content: function() { - return $( this ).attr( "title" ); - }, - hide: true, - // Disabled elements have inconsistent behavior across browsers (#8661) - items: "[title]:not([disabled])", - position: { - my: "left top+15", - at: "left bottom", - collision: "flipfit flip" - }, - show: true, - tooltipClass: null, - track: false, - - // callbacks - close: null, - open: null - }, - - _create: function() { - this._on({ - mouseover: "open", - focusin: "open" - }); - - // IDs of generated tooltips, needed for destroy - this.tooltips = {}; - // IDs of parent tooltips where we removed the title attribute - this.parents = {}; - - if ( this.options.disabled ) { - this._disable(); - } - }, - - _setOption: function( key, value ) { - var that = this; - - if ( key === "disabled" ) { - this[ value ? "_disable" : "_enable" ](); - this.options[ key ] = value; - // disable element style changes - return; - } - - this._super( key, value ); - - if ( key === "content" ) { - $.each( this.tooltips, function( id, element ) { - that._updateContent( element ); - }); - } - }, - - _disable: function() { - var that = this; - - // close open tooltips - $.each( this.tooltips, function( id, element ) { - var event = $.Event( "blur" ); - event.target = event.currentTarget = element[0]; - that.close( event, true ); - }); - - // remove title attributes to prevent native tooltips - this.element.find( this.options.items ).andSelf().each(function() { - var element = $( this ); - if ( element.is( "[title]" ) ) { - element - .data( "ui-tooltip-title", element.attr( "title" ) ) - .attr( "title", "" ); - } - }); - }, - - _enable: function() { - // restore title attributes - this.element.find( this.options.items ).andSelf().each(function() { - var element = $( this ); - if ( element.data( "ui-tooltip-title" ) ) { - element.attr( "title", element.data( "ui-tooltip-title" ) ); - } - }); - }, - - open: function( event ) { - var that = this, - target = $( event ? event.target : this.element ) - // we need closest here due to mouseover bubbling, - // but always pointing at the same event target - .closest( this.options.items ); - - // No element to show a tooltip for or the tooltip is already open - if ( !target.length || target.data( "ui-tooltip-id" ) ) { - return; - } - - if ( target.attr( "title" ) ) { - target.data( "ui-tooltip-title", target.attr( "title" ) ); - } - - target.data( "ui-tooltip-open", true ); - - // kill parent tooltips, custom or native, for hover - if ( event && event.type === "mouseover" ) { - target.parents().each(function() { - var parent = $( this ), - blurEvent; - if ( parent.data( "ui-tooltip-open" ) ) { - blurEvent = $.Event( "blur" ); - blurEvent.target = blurEvent.currentTarget = this; - that.close( blurEvent, true ); - } - if ( parent.attr( "title" ) ) { - parent.uniqueId(); - that.parents[ this.id ] = { - element: this, - title: parent.attr( "title" ) - }; - parent.attr( "title", "" ); - } - }); - } - - this._updateContent( target, event ); - }, - - _updateContent: function( target, event ) { - var content, - contentOption = this.options.content, - that = this, - eventType = event ? event.type : null; - - if ( typeof contentOption === "string" ) { - return this._open( event, target, contentOption ); - } - - content = contentOption.call( target[0], function( response ) { - // ignore async response if tooltip was closed already - if ( !target.data( "ui-tooltip-open" ) ) { - return; - } - // IE may instantly serve a cached response for ajax requests - // delay this call to _open so the other call to _open runs first - that._delay(function() { - // jQuery creates a special event for focusin when it doesn't - // exist natively. To improve performance, the native event - // object is reused and the type is changed. Therefore, we can't - // rely on the type being correct after the event finished - // bubbling, so we set it back to the previous value. (#8740) - if ( event ) { - event.type = eventType; - } - this._open( event, target, response ); - }); - }); - if ( content ) { - this._open( event, target, content ); - } - }, - - _open: function( event, target, content ) { - var tooltip, events, delayedShow, - positionOption = $.extend( {}, this.options.position ); - - if ( !content ) { - return; - } - - // Content can be updated multiple times. If the tooltip already - // exists, then just update the content and bail. - tooltip = this._find( target ); - if ( tooltip.length ) { - tooltip.find( ".ui-tooltip-content" ).html( content ); - return; - } - - // if we have a title, clear it to prevent the native tooltip - // we have to check first to avoid defining a title if none exists - // (we don't want to cause an element to start matching [title]) - // - // We use removeAttr only for key events, to allow IE to export the correct - // accessible attributes. For mouse events, set to empty string to avoid - // native tooltip showing up (happens only when removing inside mouseover). - if ( target.is( "[title]" ) ) { - if ( event && event.type === "mouseover" ) { - target.attr( "title", "" ); - } else { - target.removeAttr( "title" ); - } - } - - tooltip = this._tooltip( target ); - addDescribedBy( target, tooltip.attr( "id" ) ); - tooltip.find( ".ui-tooltip-content" ).html( content ); - - function position( event ) { - positionOption.of = event; - if ( tooltip.is( ":hidden" ) ) { - return; - } - tooltip.position( positionOption ); - } - if ( this.options.track && event && /^mouse/.test( event.type ) ) { - this._on( this.document, { - mousemove: position - }); - // trigger once to override element-relative positioning - position( event ); - } else { - tooltip.position( $.extend({ - of: target - }, this.options.position ) ); - } - - tooltip.hide(); - - this._show( tooltip, this.options.show ); - // Handle tracking tooltips that are shown with a delay (#8644). As soon - // as the tooltip is visible, position the tooltip using the most recent - // event. - if ( this.options.show && this.options.show.delay ) { - delayedShow = setInterval(function() { - if ( tooltip.is( ":visible" ) ) { - position( positionOption.of ); - clearInterval( delayedShow ); - } - }, $.fx.interval ); - } - - this._trigger( "open", event, { tooltip: tooltip } ); - - events = { - keyup: function( event ) { - if ( event.keyCode === $.ui.keyCode.ESCAPE ) { - var fakeEvent = $.Event(event); - fakeEvent.currentTarget = target[0]; - this.close( fakeEvent, true ); - } - }, - remove: function() { - this._removeTooltip( tooltip ); - } - }; - if ( !event || event.type === "mouseover" ) { - events.mouseleave = "close"; - } - if ( !event || event.type === "focusin" ) { - events.focusout = "close"; - } - this._on( true, target, events ); - }, - - close: function( event ) { - var that = this, - target = $( event ? event.currentTarget : this.element ), - tooltip = this._find( target ); - - // disabling closes the tooltip, so we need to track when we're closing - // to avoid an infinite loop in case the tooltip becomes disabled on close - if ( this.closing ) { - return; - } - - // only set title if we had one before (see comment in _open()) - if ( target.data( "ui-tooltip-title" ) ) { - target.attr( "title", target.data( "ui-tooltip-title" ) ); - } - - removeDescribedBy( target ); - - tooltip.stop( true ); - this._hide( tooltip, this.options.hide, function() { - that._removeTooltip( $( this ) ); - }); - - target.removeData( "ui-tooltip-open" ); - this._off( target, "mouseleave focusout keyup" ); - // Remove 'remove' binding only on delegated targets - if ( target[0] !== this.element[0] ) { - this._off( target, "remove" ); - } - this._off( this.document, "mousemove" ); - - if ( event && event.type === "mouseleave" ) { - $.each( this.parents, function( id, parent ) { - $( parent.element ).attr( "title", parent.title ); - delete that.parents[ id ]; - }); - } - - this.closing = true; - this._trigger( "close", event, { tooltip: tooltip } ); - this.closing = false; - }, - - _tooltip: function( element ) { - var id = "ui-tooltip-" + increments++, - tooltip = $( "
    " ) - .attr({ - id: id, - role: "tooltip" - }) - .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + - ( this.options.tooltipClass || "" ) ); - $( "
    " ) - .addClass( "ui-tooltip-content" ) - .appendTo( tooltip ); - tooltip.appendTo( this.document[0].body ); - if ( $.fn.bgiframe ) { - tooltip.bgiframe(); - } - this.tooltips[ id ] = element; - return tooltip; - }, - - _find: function( target ) { - var id = target.data( "ui-tooltip-id" ); - return id ? $( "#" + id ) : $(); - }, - - _removeTooltip: function( tooltip ) { - tooltip.remove(); - delete this.tooltips[ tooltip.attr( "id" ) ]; - }, - - _destroy: function() { - var that = this; - - // close open tooltips - $.each( this.tooltips, function( id, element ) { - // Delegate to close method to handle common cleanup - var event = $.Event( "blur" ); - event.target = event.currentTarget = element[0]; - that.close( event, true ); - - // Remove immediately; destroying an open tooltip doesn't use the - // hide animation - $( "#" + id ).remove(); - - // Restore the title - if ( element.data( "ui-tooltip-title" ) ) { - element.attr( "title", element.data( "ui-tooltip-title" ) ); - element.removeData( "ui-tooltip-title" ); - } - }); - } -}); - -}( jQuery ) ); \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js deleted file mode 100644 index 434724d9..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js +++ /dev/null @@ -1,6086 +0,0 @@ -/** - * @preserve - * jquery.layout 1.4.3 - * $Date: 2015/03/13 22:37:04 $ - * $Rev: 1.0403 $ - * - * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com) - * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net) - * - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. - * - * SEE: http://layout.jquery-dev.com/LICENSE.txt - * - * Changelog: http://layout.jquery-dev.com/changelog.cfm - * - * Docs: http://layout.jquery-dev.com/documentation.html - * Tips: http://layout.jquery-dev.com/tips.html - * Help: http://groups.google.com/group/jquery-ui-layout - */ - -/* JavaDoc Info: http://code.google.com/closure/compiler/docs/js-for-compiler.html - * {!Object} non-nullable type (never NULL) - * {?string} nullable type (sometimes NULL) - default for {Object} - * {number=} optional parameter - * {*} ALL types - */ -/* TODO for jQ 2.0 - * change .andSelf() to .addBack() - * check $.fn.disableSelection - this is in jQuery UI 1.9.x - */ - -// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars - -;(function ($) { - -// alias Math methods - used a lot! -var min = Math.min -, max = Math.max -, round = Math.floor - -, isStr = function (v) { return $.type(v) === "string"; } - - /** - * @param {!Object} Instance - * @param {Array.} a_fn - */ -, runPluginCallbacks = function (Instance, a_fn) { - if ($.isArray(a_fn)) - for (var i=0, c=a_fn.length; i
    ').appendTo("body") - , d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight }; - $c.remove(); - window.scrollbarWidth = d.width; - window.scrollbarHeight = d.height; - return dim.match(/^(width|height)$/) ? d[dim] : d; - } - - -, disableTextSelection: function () { - var $d = $(document) - , s = 'textSelectionDisabled' - , x = 'textSelectionInitialized' - ; - if ($.fn.disableSelection) { - if (!$d.data(x)) // document hasn't been initialized yet - $d.on('mouseup', $.layout.enableTextSelection ).data(x, true); - if (!$d.data(s)) - $d.disableSelection().data(s, true); - } - } -, enableTextSelection: function () { - var $d = $(document) - , s = 'textSelectionDisabled'; - if ($.fn.enableSelection && $d.data(s)) - $d.enableSelection().data(s, false); - } - - - /** - * Returns hash container 'display' and 'visibility' - * - * @see $.swap() - swaps CSS, runs callback, resets CSS - * @param {!Object} $E jQuery element - * @param {boolean=} [force=false] Run even if display != none - * @return {!Object} Returns current style props, if applicable - */ -, showInvisibly: function ($E, force) { - if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden* - var s = $E[0].style - // save ONLY the 'style' props because that is what we must restore - , CSS = { display: s.display || '', visibility: s.visibility || '' }; - // show element 'invisibly' so can be measured - $E.css({ display: "block", visibility: "hidden" }); - return CSS; - } - return {}; - } - - /** - * Returns data for setting size of an element (container or a pane). - * - * @see _create(), onWindowResize() for container, plus others for pane - * @return JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc - */ -, getElementDimensions: function ($E, inset) { - var - // dimensions hash - start with current data IF passed - d = { css: {}, inset: {} } - , x = d.css // CSS hash - , i = { bottom: 0 } // TEMP insets (bottom = complier hack) - , N = $.layout.cssNum - , R = Math.round - , off = $E.offset() - , b, p, ei // TEMP border, padding - ; - d.offsetLeft = off.left; - d.offsetTop = off.top; - - if (!inset) inset = {}; // simplify logic below - - $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { // e = edge - b = x["border" + e] = $.layout.borderWidth($E, e); - p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e); - ei = e.toLowerCase(); - d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any missing insetX value = paddingX - i[ei] = d.inset[ei] + b; // total offset of content from outer side - }); - - x.width = R($E.width()); - x.height = R($E.height()); - x.top = N($E,"top",true); - x.bottom = N($E,"bottom",true); - x.left = N($E,"left",true); - x.right = N($E,"right",true); - - d.outerWidth = R($E.outerWidth()); - d.outerHeight = R($E.outerHeight()); - // calc the TRUE inner-dimensions, even in quirks-mode! - d.innerWidth = max(0, d.outerWidth - i.left - i.right); - d.innerHeight = max(0, d.outerHeight - i.top - i.bottom); - // layoutWidth/Height is used in calcs for manual resizing - // layoutW/H only differs from innerW/H when in quirks-mode - then is like outerW/H - d.layoutWidth = R($E.innerWidth()); - d.layoutHeight = R($E.innerHeight()); - - //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG - - //d.visible = $E.is(":visible");// && x.width > 0 && x.height > 0; - - return d; - } - -, getElementStyles: function ($E, list) { - var - CSS = {} - , style = $E[0].style - , props = list.split(",") - , sides = "Top,Bottom,Left,Right".split(",") - , attrs = "Color,Style,Width".split(",") - , p, s, a, i, j, k - ; - for (i=0; i < props.length; i++) { - p = props[i]; - if (p.match(/(border|padding|margin)$/)) - for (j=0; j < 4; j++) { - s = sides[j]; - if (p === "border") - for (k=0; k < 3; k++) { - a = attrs[k]; - CSS[p+s+a] = style[p+s+a]; - } - else - CSS[p+s] = style[p+s]; - } - else - CSS[p] = style[p]; - }; - return CSS - } - - /** - * Return the innerWidth for the current browser/doctype - * - * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles() - * @param {Array.} $E Must pass a jQuery object - first element is processed - * @param {number=} outerWidth (optional) Can pass a width, allowing calculations BEFORE element is resized - * @return {number} Returns the innerWidth of the elem by subtracting padding and borders - */ -, cssWidth: function ($E, outerWidth) { - // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed - if (outerWidth <= 0) return 0; - - var lb = $.layout.browser - , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box" - , b = $.layout.borderWidth - , n = $.layout.cssNum - , W = outerWidth - ; - // strip border and/or padding from outerWidth to get CSS Width - if (bs !== "border-box") - W -= (b($E, "Left") + b($E, "Right")); - if (bs === "content-box") - W -= (n($E, "paddingLeft") + n($E, "paddingRight")); - return max(0,W); - } - - /** - * Return the innerHeight for the current browser/doctype - * - * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles() - * @param {Array.} $E Must pass a jQuery object - first element is processed - * @param {number=} outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized - * @return {number} Returns the innerHeight of the elem by subtracting padding and borders - */ -, cssHeight: function ($E, outerHeight) { - // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed - if (outerHeight <= 0) return 0; - - var lb = $.layout.browser - , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box" - , b = $.layout.borderWidth - , n = $.layout.cssNum - , H = outerHeight - ; - // strip border and/or padding from outerHeight to get CSS Height - if (bs !== "border-box") - H -= (b($E, "Top") + b($E, "Bottom")); - if (bs === "content-box") - H -= (n($E, "paddingTop") + n($E, "paddingBottom")); - return max(0,H); - } - - /** - * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist - * - * @see Called by many methods - * @param {Array.} $E Must pass a jQuery object - first element is processed - * @param {string} prop The name of the CSS property, eg: top, width, etc. - * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0 - * @return {(string|number)} Usually used to get an integer value for position (top, left) or size (height, width) - */ -, cssNum: function ($E, prop, allowAuto) { - if (!$E.jquery) $E = $($E); - var CSS = $.layout.showInvisibly($E) - , p = $.css($E[0], prop, true) - , v = allowAuto && p=="auto" ? p : Math.round(parseFloat(p) || 0); - $E.css( CSS ); // RESET - return v; - } - -, borderWidth: function (el, side) { - if (el.jquery) el = el[0]; - var b = "border"+ side.substr(0,1).toUpperCase() + side.substr(1); // left => Left - return $.css(el, b+"Style", true) === "none" ? 0 : Math.round(parseFloat($.css(el, b+"Width", true)) || 0); - } - - /** - * Mouse-tracking utility - FUTURE REFERENCE - * - * init: if (!window.mouse) { - * window.mouse = { x: 0, y: 0 }; - * $(document).mousemove( $.layout.trackMouse ); - * } - * - * @param {Object} evt - * -, trackMouse: function (evt) { - window.mouse = { x: evt.clientX, y: evt.clientY }; - } - */ - - /** - * SUBROUTINE for preventPrematureSlideClose option - * - * @param {Object} evt - * @param {Object=} el - */ -, isMouseOverElem: function (evt, el) { - var - $E = $(el || this) - , d = $E.offset() - , T = d.top - , L = d.left - , R = L + $E.outerWidth() - , B = T + $E.outerHeight() - , x = evt.pageX // evt.clientX ? - , y = evt.pageY // evt.clientY ? - ; - // if X & Y are < 0, probably means is over an open SELECT - return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && x <= R) && (y >= T && y <= B)); - } - - /** - * Message/Logging Utility - * - * @example $.layout.msg("My message"); // log text - * @example $.layout.msg("My message", true); // alert text - * @example $.layout.msg({ foo: "bar" }, "Title"); // log hash-data, with custom title - * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false }); -OR- - * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, display: true }); // alert hash-data - * - * @param {(Object|string)} info String message OR Hash/Array - * @param {(Boolean|string|Object)=} [popup=false] True means alert-box - can be skipped - * @param {(Object|string)=} [debugTitle=""] Title for Hash data - can be skipped - * @param {Object=} [debugOpts] Extra options for debug output - */ -, msg: function (info, popup, debugTitle, debugOpts) { - if ($.isPlainObject(info) && window.debugData) { - if (typeof popup === "string") { - debugOpts = debugTitle; - debugTitle = popup; - } - else if (typeof debugTitle === "object") { - debugOpts = debugTitle; - debugTitle = null; - } - var t = debugTitle || "log( )" - , o = $.extend({ sort: false, returnHTML: false, display: false }, debugOpts); - if (popup === true || o.display) - debugData( info, t, o ); - else if (window.console) - console.log(debugData( info, t, o )); - } - else if (popup) - alert(info); - else if (window.console) - console.log(info); - else { - var id = "#layoutLogger" - , $l = $(id); - if (!$l.length) - $l = createLog(); - $l.children("ul").append('
  • '+ info.replace(/\/g,">") +'
  • '); - } - - function createLog () { - var pos = $.support.fixedPosition ? 'fixed' : 'absolute' - , $e = $('
    ' - + '
    ' - + 'XLayout console.log
    ' - + '
      ' - + '
      ' - ).appendTo("body"); - $e.css('left', $(window).width() - $e.outerWidth() - 5) - if ($.ui.draggable) $e.draggable({ handle: ':first-child' }); - return $e; - }; - } - -}; - - -/* - * $.layout.browser REPLACES removed $.browser, with extra data - * Parsing code here adapted from jQuery 1.8 $.browse - */ -(function(){ - var u = navigator.userAgent.toLowerCase() - , m = /(chrome)[ \/]([\w.]+)/.exec( u ) - || /(webkit)[ \/]([\w.]+)/.exec( u ) - || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u ) - || /(msie) ([\w.]+)/.exec( u ) - || u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u ) - || [] - , b = m[1] || "" - , v = m[2] || 0 - , ie = b === "msie" - , cm = document.compatMode - , $s = $.support - , bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable - , bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false - , lb = $.layout.browser = { - version: v - , safari: b === "webkit" // webkit (NOT chrome) = safari - , webkit: b === "chrome" // chrome = webkit - , msie: ie - , isIE6: ie && v == 6 - // ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8 - , boxModel: bm - , boxSizing: !!(typeof bs === "function" ? bs() : bs) - }; - ; - if (b) lb[b] = true; // set CURRENT browser - /* OLD versions of jQuery only set $.support.boxModel after page is loaded - * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */ - if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; }); -})(); - - -// DEFAULT OPTIONS -$.layout.defaults = { -/* - * LAYOUT & LAYOUT-CONTAINER OPTIONS - * - none of these options are applicable to individual panes - */ - name: "" // Not required, but useful for buttons and used for the state-cookie -, containerClass: "ui-layout-container" // layout-container element -, inset: null // custom container-inset values (override padding) -, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark) -, resizeWithWindow: true // bind thisLayout.resizeAll() to the window.resize event -, resizeWithWindowDelay: 200 // delay calling resizeAll because makes window resizing very jerky -, resizeWithWindowMaxDelay: 0 // 0 = none - force resize every XX ms while window is being resized -, maskPanesEarly: false // true = create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart -, onresizeall_start: null // CALLBACK when resizeAll() STARTS - NOT pane-specific -, onresizeall_end: null // CALLBACK when resizeAll() ENDS - NOT pane-specific -, onload_start: null // CALLBACK when Layout inits - after options initialized, but before elements -, onload_end: null // CALLBACK when Layout inits - after EVERYTHING has been initialized -, onunload_start: null // CALLBACK when Layout is destroyed OR onWindowUnload -, onunload_end: null // CALLBACK when Layout is destroyed OR onWindowUnload -, initPanes: true // false = DO NOT initialize the panes onLoad - will init later -, showErrorMessages: true // enables fatal error messages to warn developers of common errors -, showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has_ debugging code! -// Changing this zIndex value will cause other zIndex values to automatically change -, zIndex: null // the PANE zIndex - resizers and masks will be +1 -// DO NOT CHANGE the zIndex values below unless you clearly understand their relationships -, zIndexes: { // set _default_ z-index values here... - pane_normal: 0 // normal z-index for panes - , content_mask: 1 // applied to overlays used to mask content INSIDE panes during resizing - , resizer_normal: 2 // normal z-index for resizer-bars - , pane_sliding: 100 // applied to *BOTH* the pane and its resizer when a pane is 'slid open' - , pane_animate: 1000 // applied to the pane when being animated - not applied to the resizer - , resizer_drag: 10000 // applied to the CLONED resizer-bar when being 'dragged' - } -, errors: { - pane: "pane" // description of "layout pane element" - used only in error messages - , selector: "selector" // description of "jQuery-selector" - used only in error messages - , addButtonError: "Error Adding Button\nInvalid " - , containerMissing: "UI Layout Initialization Error\nThe specified layout-container does not exist." - , centerPaneMissing: "UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element." - , noContainerHeight: "UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!" - , callbackError: "UI Layout Callback Error\nThe EVENT callback is not a valid function." - } -/* - * PANE DEFAULT SETTINGS - * - settings under the 'panes' key become the default settings for *all panes* - * - ALL pane-options can also be set specifically for each panes, which will override these 'default values' - */ -, panes: { // default options for 'all panes' - will be overridden by 'per-pane settings' - applyDemoStyles: false // NOTE: renamed from applyDefaultStyles for clarity - , closable: true // pane can open & close - , resizable: true // when open, pane can be resized - , slidable: true // when closed, pane can 'slide open' over other panes - closes on mouse-out - , initClosed: false // true = init pane as 'closed' - , initHidden: false // true = init pane as 'hidden' - no resizer-bar/spacing - // SELECTORS - //, paneSelector: "" // MUST be pane-specific - jQuery selector for pane - , contentSelector: ".ui-layout-content" // INNER div/element to auto-size so only it scrolls, not the entire pane! - , contentIgnoreSelector: ".ui-layout-ignore" // element(s) to 'ignore' when measuring 'content' - , findNestedContent: false // true = $P.find(contentSelector), false = $P.children(contentSelector) - // GENERIC ROOT-CLASSES - for auto-generated classNames - , paneClass: "ui-layout-pane" // Layout Pane - , resizerClass: "ui-layout-resizer" // Resizer Bar - , togglerClass: "ui-layout-toggler" // Toggler Button - , buttonClass: "ui-layout-button" // CUSTOM Buttons - eg: '[ui-layout-button]-toggle/-open/-close/-pin' - // ELEMENT SIZE & SPACING - //, size: 100 // MUST be pane-specific -initial size of pane - , minSize: 0 // when manually resizing a pane - , maxSize: 0 // ditto, 0 = no limit - , spacing_open: 6 // space between pane and adjacent panes - when pane is 'open' - , spacing_closed: 6 // ditto - when pane is 'closed' - , togglerLength_open: 50 // Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west sides - , togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden' - , togglerAlign_open: "center" // top/left, bottom/right, center, OR... - , togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right - , togglerContent_open: "" // text or HTML to put INSIDE the toggler - , togglerContent_closed: "" // ditto - // RESIZING OPTIONS - , resizerDblClickToggle: true // - , autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout resizes - , autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? False = leave it closed - , resizerDragOpacity: 1 // option for ui.draggable - //, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar - , maskContents: false // true = add DIV-mask over-or-inside this pane so can 'drag' over IFRAMES - , maskObjects: false // true = add IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask will overlay this mask - , maskZindex: null // will override zIndexes.content_mask if specified - not applicable to iframe-panes - , resizingGrid: false // grid size that the resizers will snap-to during resizing, eg: [20,20] - , livePaneResizing: false // true = LIVE Resizing as resizer is dragged - , liveContentResizing: false // true = re-measure header/footer heights as resizer is dragged - , liveResizingTolerance: 1 // how many px change before pane resizes, to control performance - // SLIDING OPTIONS - , sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding' - , slideTrigger_open: "click" // click, dblclick, mouseenter - , slideTrigger_close: "mouseleave"// click, mouseleave - , slideDelay_open: 300 // applies only for mouseenter event - 0 = instant open - , slideDelay_close: 300 // applies only for mouseleave event (300ms is the minimum!) - , hideTogglerOnSlide: false // when pane is slid-open, should the toggler show? - , preventQuickSlideClose: $.layout.browser.webkit // Chrome triggers slideClosed as it is opening - , preventPrematureSlideClose: false // handle incorrect mouseleave trigger, like when over a SELECT-list in IE - // PANE-SPECIFIC TIPS & MESSAGES - , tips: { - Open: "Open" // eg: "Open Pane" - , Close: "Close" - , Resize: "Resize" - , Slide: "Slide Open" - , Pin: "Pin" - , Unpin: "Un-Pin" - , noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that cannot - , minSizeWarning: "Panel has reached its minimum size" // displays in browser statusbar - , maxSizeWarning: "Panel has reached its maximum size" // ditto - } - // HOT-KEYS & MISC - , showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver - , enableCursorHotkey: true // enabled 'cursor' hotkeys - //, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character - , customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT' - // PANE ANIMATION - // NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not passed - , fxName: "slide" // ('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 'size' - , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration - , fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 } - , fxOpacityFix: true // tries to fix opacity in IE to restore anti-aliasing after animation - , animatePaneSizing: false // true = animate resizing after dragging resizer-bar OR sizePane() is called - /* NOTE: Action-specific FX options are auto-generated from the options above if not specifically set: - fxName_open: "slide" // 'Open' pane animation - fnName_close: "slide" // 'Close' pane animation - fxName_size: "slide" // 'Size' pane animation - when animatePaneSizing = true - fxSpeed_open: null - fxSpeed_close: null - fxSpeed_size: null - fxSettings_open: {} - fxSettings_close: {} - fxSettings_size: {} - */ - // CHILD/NESTED LAYOUTS - , children: null // Layout-options for nested/child layout - even {} is valid as options - , containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can have more than one child layout!) - , initChildren: true // true = child layout will be created as soon as _this_ layout completes initialization - , destroyChildren: true // true = destroy child-layout if this pane is destroyed - , resizeChildren: true // true = trigger child-layout.resizeAll() when this pane is resized - // EVENT TRIGGERING - , triggerEventsOnLoad: false // true = trigger onopen OR onclose callbacks when layout initializes - , triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneResizing==true - // PANE CALLBACKS - , onshow_start: null // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start - , onshow_end: null // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end - , onhide_start: null // CALLBACK when pane STARTS to Close - BEFORE onclose_start - , onhide_end: null // CALLBACK when pane ENDS being Closed - AFTER onclose_end - , onopen_start: null // CALLBACK when pane STARTS to Open - , onopen_end: null // CALLBACK when pane ENDS being Opened - , onclose_start: null // CALLBACK when pane STARTS to Close - , onclose_end: null // CALLBACK when pane ENDS being Closed - , onresize_start: null // CALLBACK when pane STARTS being Resized ***FOR ANY REASON*** - , onresize_end: null // CALLBACK when pane ENDS being Resized ***FOR ANY REASON*** - , onsizecontent_start: null // CALLBACK when sizing of content-element STARTS - , onsizecontent_end: null // CALLBACK when sizing of content-element ENDS - , onswap_start: null // CALLBACK when pane STARTS to Swap - , onswap_end: null // CALLBACK when pane ENDS being Swapped - , ondrag_start: null // CALLBACK when pane STARTS being ***MANUALLY*** Resized - , ondrag_end: null // CALLBACK when pane ENDS being ***MANUALLY*** Resized - } -/* - * PANE-SPECIFIC SETTINGS - * - options listed below MUST be specified per-pane - they CANNOT be set under 'panes' - * - all options under the 'panes' key can also be set specifically for any pane - * - most options under the 'panes' key apply only to 'border-panes' - NOT the the center-pane - */ -, north: { - paneSelector: ".ui-layout-north" - , size: "auto" // eg: "auto", "30%", .30, 200 - , resizerCursor: "n-resize" // custom = url(myCursor.cur) - , customHotkey: "" // EITHER a charCode (43) OR a character ("o") - } -, south: { - paneSelector: ".ui-layout-south" - , size: "50%"//"auto" - , resizerCursor: "s-resize" - , customHotkey: "" - , initClosed: true - } -, east: { - paneSelector: ".ui-layout-east" - , size: "5%"//200 - , resizerCursor: "e-resize" - , customHotkey: "" - } -, west: { - paneSelector: ".ui-layout-west" - , size: "70%" //200 - , resizerCursor: "w-resize" - , customHotkey: "" - , initClosed: true - } -, center: { - paneSelector: ".ui-layout-center" - , size: "30%"//"auto" - , minWidth: 0 - , minHeight: 0 - } -}; - -$.layout.optionsMap = { - // layout/global options - NOT pane-options - layout: ("name,instanceKey,stateManagement,effects,inset,zIndexes,errors," - + "zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly," - + "outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay," - + "onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",") -// borderPanes: [ ALL options that are NOT specified as 'layout' ] - // default.panes options that apply to the center-pane (most options apply _only_ to border-panes) -, center: ("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad," - + "showOverflowOnHover,maskContents,maskObjects,liveContentResizing," - + "containerSelector,children,initChildren,resizeChildren,destroyChildren," - + "onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",") - // options that MUST be specifically set 'per-pane' - CANNOT set in the panes (defaults) key -, noDefault: ("paneSelector,resizerCursor,customHotkey").split(",") -}; - -/** - * Processes options passed in converts flat-format data into subkey (JSON) format - * In flat-format, subkeys are _currently_ separated with 2 underscores, like north__optName - * Plugins may also call this method so they can transform their own data - * - * @param {!Object} hash Data/options passed by user - may be a single level or nested levels - * @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do not exist? - * @return {Object} Returns hash of minWidth & minHeight - */ -$.layout.transformData = function (hash, addKeys) { - var json = addKeys ? { panes: {}, center: {} } : {} // init return object - , branch, optKey, keys, key, val, i, c; - - if (typeof hash !== "object") return json; // no options passed - - // convert all 'flat-keys' to 'sub-key' format - for (optKey in hash) { - branch = json; - val = hash[ optKey ]; - keys = optKey.split("__"); // eg: west__size or north__fxSettings__duration - c = keys.length - 1; - // convert underscore-delimited to subkeys - for (i=0; i <= c; i++) { - key = keys[i]; - if (i === c) { // last key = value - if ($.isPlainObject( val )) - branch[key] = $.layout.transformData( val ); // RECURSE - else - branch[key] = val; - } - else { - if (!branch[key]) - branch[key] = {}; // create the subkey - // recurse to sub-key for next loop - if not done - branch = branch[key]; - } - } - } - return json; -}; - -// INTERNAL CONFIG DATA - DO NOT CHANGE THIS! -$.layout.backwardCompatibility = { - // data used by renameOldOptions() - map: { - // OLD Option Name: NEW Option Name - applyDefaultStyles: "applyDemoStyles" - // CHILD/NESTED LAYOUTS - , childOptions: "children" - , initChildLayout: "initChildren" - , destroyChildLayout: "destroyChildren" - , resizeChildLayout: "resizeChildren" - , resizeNestedLayout: "resizeChildren" - // MISC Options - , resizeWhileDragging: "livePaneResizing" - , resizeContentWhileDragging: "liveContentResizing" - , triggerEventsWhileDragging: "triggerEventsDuringLiveResize" - , maskIframesOnResize: "maskContents" - // STATE MANAGEMENT - , useStateCookie: "stateManagement.enabled" - , "cookie.autoLoad": "stateManagement.autoLoad" - , "cookie.autoSave": "stateManagement.autoSave" - , "cookie.keys": "stateManagement.stateKeys" - , "cookie.name": "stateManagement.cookie.name" - , "cookie.domain": "stateManagement.cookie.domain" - , "cookie.path": "stateManagement.cookie.path" - , "cookie.expires": "stateManagement.cookie.expires" - , "cookie.secure": "stateManagement.cookie.secure" - // OLD Language options - , noRoomToOpenTip: "tips.noRoomToOpen" - , togglerTip_open: "tips.Close" // open = Close - , togglerTip_closed: "tips.Open" // closed = Open - , resizerTip: "tips.Resize" - , sliderTip: "tips.Slide" - } - -/** -* @param {Object} opts -*/ -, renameOptions: function (opts) { - var map = $.layout.backwardCompatibility.map - , oldData, newData, value - ; - for (var itemPath in map) { - oldData = getBranch( itemPath ); - value = oldData.branch[ oldData.key ]; - if (value !== undefined) { - newData = getBranch( map[itemPath], true ); - newData.branch[ newData.key ] = value; - delete oldData.branch[ oldData.key ]; - } - } - - /** - * @param {string} path - * @param {boolean=} [create=false] Create path if does not exist - */ - function getBranch (path, create) { - var a = path.split(".") // split keys into array - , c = a.length - 1 - , D = { branch: opts, key: a[c] } // init branch at top & set key (last item) - , i = 0, k, undef; - for (; i 0) { - if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) { - $E.show().data('autoHidden', false); - if (!browser.mozilla) // FireFox refreshes iframes - IE does not - // make hidden, then visible to 'refresh' display after animation - $E.css(_c.hidden).css(_c.visible); - } - } - else if (autoHide && !$E.data('autoHidden')) - $E.hide().data('autoHidden', true); - } - - /** - * @param {(string|!Object)} el - * @param {number=} outerHeight - * @param {boolean=} [autoHide=false] - */ -, setOuterHeight = function (el, outerHeight, autoHide) { - var $E = el, h; - if (isStr(el)) $E = $Ps[el]; // west - else if (!el.jquery) $E = $(el); - h = cssH($E, outerHeight); - $E.css({ height: h, visibility: "visible" }); // may have been 'hidden' by sizeContent - if (h > 0 && $E.innerWidth() > 0) { - if (autoHide && $E.data('autoHidden')) { - $E.show().data('autoHidden', false); - if (!browser.mozilla) // FireFox refreshes iframes - IE does not - $E.css(_c.hidden).css(_c.visible); - } - } - else if (autoHide && !$E.data('autoHidden')) - $E.hide().data('autoHidden', true); - } - - - /** - * Converts any 'size' params to a pixel/integer size, if not already - * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated - * - /** - * @param {string} pane - * @param {(string|number)=} size - * @param {string=} [dir] - * @return {number} - */ -, _parseSize = function (pane, size, dir) { - if (!dir) dir = _c[pane].dir; - - if (isStr(size) && size.match(/%/)) - size = (size === '100%') ? -1 : parseInt(size, 10) / 100; // convert % to decimal - - if (size === 0) - return 0; - else if (size >= 1) - return parseInt(size, 10); - - var o = options, avail = 0; - if (dir=="horz") // north or south or center.minHeight - avail = sC.innerHeight - ($Ps.north ? o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0); - else if (dir=="vert") // east or west or center.minWidth - avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open : 0) - ($Ps.east ? o.east.spacing_open : 0); - - if (size === -1) // -1 == 100% - return avail; - else if (size > 0) // percentage, eg: .25 - return round(avail * size); - else if (pane=="center") - return 0; - else { // size < 0 || size=='auto' || size==Missing || size==Invalid - // auto-size the pane - var dim = (dir === "horz" ? "height" : "width") - , $P = $Ps[pane] - , $C = dim === 'height' ? $Cs[pane] : false - , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden - , szP = $P.css(dim) // SAVE current pane size - , szC = $C ? $C.css(dim) : 0 // SAVE current content size - ; - $P.css(dim, "auto"); - if ($C) $C.css(dim, "auto"); - size = (dim === "height") ? $P.outerHeight() : $P.outerWidth(); // MEASURE - $P.css(dim, szP).css(vis); // RESET size & visibility - if ($C) $C.css(dim, szC); - return size; - } - } - - /** - * Calculates current 'size' (outer-width or outer-height) of a border-pane - optionally with 'pane-spacing' added - * - * @param {(string|!Object)} pane - * @param {boolean=} [inclSpace=false] - * @return {number} Returns EITHER Width for east/west panes OR Height for north/south panes - */ -, getPaneSize = function (pane, inclSpace) { - var - $P = $Ps[pane] - , o = options[pane] - , s = state[pane] - , oSp = (inclSpace ? o.spacing_open : 0) - , cSp = (inclSpace ? o.spacing_closed : 0) - ; - if (!$P || s.isHidden) - return 0; - else if (s.isClosed || (s.isSliding && inclSpace)) - return cSp; - else if (_c[pane].dir === "horz") - return $P.outerHeight() + oSp; - else // dir === "vert" - return $P.outerWidth() + oSp; - } - - /** - * Calculate min/max pane dimensions and limits for resizing - * - * @param {string} pane - * @param {boolean=} [slide=false] - */ -, setSizeLimits = function (pane, slide) { - if (!isInitialized()) return; - var - o = options[pane] - , s = state[pane] - , c = _c[pane] - , dir = c.dir - , type = c.sizeType.toLowerCase() - , isSliding = (slide != undefined ? slide : s.isSliding) // only open() passes 'slide' param - , $P = $Ps[pane] - , paneSpacing = o.spacing_open - // measure the pane on the *opposite side* from this pane - , altPane = _c.oppositeEdge[pane] - , altS = state[altPane] - , $altP = $Ps[altPane] - , altPaneSize = (!$altP || altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? $altP.outerHeight() : $altP.outerWidth())) - , altPaneSpacing = ((!$altP || altS.isHidden ? 0 : options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" ]) || 0) - // limitSize prevents this pane from 'overlapping' opposite pane - , containerSize = (dir=="horz" ? sC.innerHeight : sC.innerWidth) - , minCenterDims = cssMinDims("center") - , minCenterSize = dir=="horz" ? max(options.center.minHeight, minCenterDims.minHeight) : max(options.center.minWidth, minCenterDims.minWidth) - // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them - , limitSize = (containerSize - paneSpacing - (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + altPaneSpacing))) - , minSize = s.minSize = max( _parseSize(pane, o.minSize), cssMinDims(pane).minSize ) - , maxSize = s.maxSize = min( (o.maxSize ? _parseSize(pane, o.maxSize) : 100000), limitSize ) - , r = s.resizerPosition = {} // used to set resizing limits - , top = sC.inset.top - , left = sC.inset.left - , W = sC.innerWidth - , H = sC.innerHeight - , rW = o.spacing_open // subtract resizer-width to get top/left position for south/east - ; - switch (pane) { - case "north": r.min = top + minSize; - r.max = top + maxSize; - break; - case "west": r.min = left + minSize; - r.max = left + maxSize; - break; - case "south": r.min = top + H - maxSize - rW; - r.max = top + H - minSize - rW; - break; - case "east": r.min = left + W - maxSize - rW; - r.max = left + W - minSize - rW; - break; - }; - } - - /** - * Returns data for setting the size/position of center pane. Also used to set Height for east/west panes - * - * @return JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height - */ -, calcNewCenterPaneDims = function () { - var d = { - top: getPaneSize("north", true) // true = include 'spacing' value for pane - , bottom: getPaneSize("south", true) - , left: getPaneSize("west", true) - , right: getPaneSize("east", true) - , width: 0 - , height: 0 - }; - - // NOTE: sC = state.container - // calc center-pane outer dimensions - d.width = sC.innerWidth - d.left - d.right; // outerWidth - d.height = sC.innerHeight - d.bottom - d.top; // outerHeight - // add the 'container border/padding' to get final positions relative to the container - d.top += sC.inset.top; - d.bottom += sC.inset.bottom; - d.left += sC.inset.left; - d.right += sC.inset.right; - - return d; - } - - - /** - * @param {!Object} el - * @param {boolean=} [allStates=false] - */ -, getHoverClasses = function (el, allStates) { - var - $El = $(el) - , type = $El.data("layoutRole") - , pane = $El.data("layoutEdge") - , o = options[pane] - , root = o[type +"Class"] - , _pane = "-"+ pane // eg: "-west" - , _open = "-open" - , _closed = "-closed" - , _slide = "-sliding" - , _hover = "-hover " // NOTE the trailing space - , _state = $El.hasClass(root+_closed) ? _closed : _open - , _alt = _state === _closed ? _open : _closed - , classes = (root+_hover) + (root+_pane+_hover) + (root+_state+_hover) + (root+_pane+_state+_hover) - ; - if (allStates) // when 'removing' classes, also remove alternate-state classes - classes += (root+_alt+_hover) + (root+_pane+_alt+_hover); - - if (type=="resizer" && $El.hasClass(root+_slide)) - classes += (root+_slide+_hover) + (root+_pane+_slide+_hover); - - return $.trim(classes); - } -, addHover = function (evt, el) { - var $E = $(el || this); - if (evt && $E.data("layoutRole") === "toggler") - evt.stopPropagation(); // prevent triggering 'slide' on Resizer-bar - $E.addClass( getHoverClasses($E) ); - } -, removeHover = function (evt, el) { - var $E = $(el || this); - $E.removeClass( getHoverClasses($E, true) ); - } - -, onResizerEnter = function (evt) { // ALSO called by toggler.mouseenter - var pane = $(this).data("layoutEdge") - , s = state[pane] - , $d = $(document) - ; - // ignore closed-panes and mouse moving back & forth over resizer! - // also ignore if ANY pane is currently resizing - if ( s.isResizing || state.paneResizing ) return; - - if (options.maskPanesEarly) - showMasks( pane, { resizing: true }); - } -, onResizerLeave = function (evt, el) { - var e = el || this // el is only passed when called by the timer - , pane = $(e).data("layoutEdge") - , name = pane +"ResizerLeave" - , $d = $(document) - ; - timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set - timer.clear(name); // cancel enableSelection timer - may re/set below - // this method calls itself on a timer because it needs to allow - // enough time for dragging to kick-in and set the isResizing flag - // dragging has a 100ms delay set, so this delay must be >100 - if (!el) // 1st call - mouseleave event - timer.set(name, function(){ onResizerLeave(evt, e); }, 200); - // if user is resizing, dragStop will reset everything, so skip it here - else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer - hideMasks(); - } - -/* - * ########################### - * INITIALIZATION METHODS - * ########################### - */ - - /** - * Initialize the layout - called automatically whenever an instance of layout is created - * - * @see none - triggered onInit - * @return mixed true = fully initialized | false = panes not initialized (yet) | 'cancel' = abort - */ -, _create = function () { - // initialize config/options - initOptions(); - var o = options - , s = state; - - // TEMP state so isInitialized returns true during init process - s.creatingLayout = true; - - // init plugins for this layout, if there are any (eg: stateManagement) - runPluginCallbacks( Instance, $.layout.onCreate ); - - // options & state have been initialized, so now run beforeLoad callback - // onload will CANCEL layout creation if it returns false - if (false === _runCallbacks("onload_start")) - return 'cancel'; - - // initialize the container element - _initContainer(); - - // bind hotkey function - keyDown - if required - initHotkeys(); - - // bind window.onunload - $(window).bind("unload."+ sID, unload); - - // init plugins for this layout, if there are any (eg: customButtons) - runPluginCallbacks( Instance, $.layout.onLoad ); - - // if layout elements are hidden, then layout WILL NOT complete initialization! - // initLayoutElements will set initialized=true and run the onload callback IF successful - if (o.initPanes) _initLayoutElements(); - - delete s.creatingLayout; - - return state.initialized; - } - - /** - * Initialize the layout IF not already - * - * @see All methods in Instance run this test - * @return boolean true = layoutElements have been initialized | false = panes are not initialized (yet) - */ -, isInitialized = function () { - if (state.initialized || state.creatingLayout) return true; // already initialized - else return _initLayoutElements(); // try to init panes NOW - } - - /** - * Initialize the layout - called automatically whenever an instance of layout is created - * - * @see _create() & isInitialized - * @param {boolean=} [retry=false] // indicates this is a 2nd try - * @return An object pointer to the instance created - */ -, _initLayoutElements = function (retry) { - // initialize config/options - var o = options; - // CANNOT init panes inside a hidden container! - if (!$N.is(":visible")) { - // handle Chrome bug where popup window 'has no height' - // if layout is BODY element, try again in 50ms - // SEE: http://layout.jquery-dev.com/samples/test_popup_window.html - if ( !retry && browser.webkit && $N[0].tagName === "BODY" ) - setTimeout(function(){ _initLayoutElements(true); }, 50); - return false; - } - - // a center pane is required, so make sure it exists - if (!getPane("center").length) { - return _log( o.errors.centerPaneMissing ); - } - - // TEMP state so isInitialized returns true during init process - state.creatingLayout = true; - - // update Container dims - $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values - - // initialize all layout elements - initPanes(); // size & position panes - calls initHandles() - which calls initResizable() - - if (o.scrollToBookmarkOnLoad) { - var l = self.location; - if (l.hash) l.replace( l.hash ); // scrollTo Bookmark - } - - // check to see if this layout 'nested' inside a pane - if (Instance.hasParentLayout) - o.resizeWithWindow = false; - // bind resizeAll() for 'this layout instance' to window.resize event - else if (o.resizeWithWindow) - $(window).bind("resize."+ sID, windowResize); - - delete state.creatingLayout; - state.initialized = true; - - // init plugins for this layout, if there are any - runPluginCallbacks( Instance, $.layout.onReady ); - - // now run the onload callback, if exists - _runCallbacks("onload_end"); - - return true; // elements initialized successfully - } - - /** - * Initialize nested layouts for a specific pane - can optionally pass layout-options - * - * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west - * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children - * @return An object pointer to the layout instance created - or null - */ -, createChildren = function (evt_or_pane, opts) { - var pane = evtPane.call(this, evt_or_pane) - , $P = $Ps[pane] - ; - if (!$P) return; - var $C = $Cs[pane] - , s = state[pane] - , o = options[pane] - , sm = options.stateManagement || {} - , cos = opts ? (o.children = opts) : o.children - ; - if ( $.isPlainObject( cos ) ) - cos = [ cos ]; // convert a hash to a 1-elem array - else if (!cos || !$.isArray( cos )) - return; - - $.each( cos, function (idx, co) { - if ( !$.isPlainObject( co ) ) return; - - // determine which element is supposed to be the 'child container' - // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane - var $containers = co.containerSelector ? $P.find( co.containerSelector ) : ($C || $P); - - $containers.each(function(){ - var $cont = $(this) - , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element - ; - // if no layout exists, but children are set, try to create the layout now - if (!child) { - // TODO: see about moving this to the stateManagement plugin, as a method - // set a unique child-instance key for this layout, if not already set - setInstanceKey({ container: $cont, options: co }, s ); - // If THIS layout has a hash in stateManagement.autoLoad, - // then see if it also contains state-data for this child-layout - // If so, copy the stateData to child.options.stateManagement.autoLoad - if ( sm.includeChildren && state.stateData[pane] ) { - // THIS layout's state was cached when its state was loaded - var paneChildren = state.stateData[pane].children || {} - , childState = paneChildren[ co.instanceKey ] - , co_sm = co.stateManagement || (co.stateManagement = { autoLoad: true }) - ; - // COPY the stateData into the autoLoad key - if ( co_sm.autoLoad === true && childState ) { - co_sm.autoSave = false; // disable autoSave because saving handled by parent-layout - co_sm.includeChildren = true; // cascade option - FOR NOW - co_sm.autoLoad = $.extend(true, {}, childState); // COPY the state-hash - } - } - - // create the layout - child = $cont.layout( co ); - - // if successful, update data - if (child) { - // add the child and update all layout-pointers - // MAY have already been done by child-layout calling parent.refreshChildren() - refreshChildren( pane, child ); - } - } - }); - }); - } - -, setInstanceKey = function (child, parentPaneState) { - // create a named key for use in state and instance branches - var $c = child.container - , o = child.options - , sm = o.stateManagement - , key = o.instanceKey || $c.data("layoutInstanceKey") - ; - if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key - if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one - else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); // ensure is valid as a hash key - o.instanceKey = key; - $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated - return key; - } - - /** - * @param {string} pane The pane being opened, ie: north, south, east, or west - * @param {Object=} newChild New child-layout Instance to add to this pane - */ -, refreshChildren = function (pane, newChild) { - var $P = $Ps[pane] - , pC = children[pane] - , s = state[pane] - , o - ; - // check for destroy()ed layouts and update the child pointers & arrays - if ($.isPlainObject( pC )) { - $.each( pC, function (key, child) { - if (child.destroyed) delete pC[key] - }); - // if no more children, remove the children hash - if ($.isEmptyObject( pC )) - pC = children[pane] = null; // clear children hash - } - - // see if there is a directly-nested layout inside this pane - // if there is, then there can be only ONE child-layout, so check that... - if (!newChild && !pC) { - newChild = $P.data("layout"); - } - - // if a newChild instance was passed, add it to children[pane] - if (newChild) { - // update child.state - newChild.hasParentLayout = true; // set parent-flag in child - // instanceKey is a key-name used in both state and children - o = newChild.options; - // set a unique child-instance key for this layout, if not already set - setInstanceKey( newChild, s ); - // add pointer to pane.children hash - if (!pC) pC = children[pane] = {}; // create an empty children hash - pC[ o.instanceKey ] = newChild.container.data("layout"); // add childLayout instance - } - - // ALWAYS refresh the pane.children alias, even if null - Instance[pane].children = children[pane]; - - // if newChild was NOT passed - see if there is a child layout NOW - if (!newChild) { - createChildren(pane); // MAY create a child and re-call this method - } - } - -, windowResize = function () { - var o = options - , delay = Number(o.resizeWithWindowDelay); - if (delay < 10) delay = 100; // MUST have a delay! - // resizing uses a delay-loop because the resize event fires repeatly - except in FF, but delay anyway - timer.clear("winResize"); // if already running - timer.set("winResize", function(){ - timer.clear("winResize"); - timer.clear("winResizeRepeater"); - var dims = elDims( $N, o.inset ); - // only trigger resizeAll() if container has changed size - if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight) - resizeAll(); - }, delay); - // ALSO set fixed-delay timer, if not already running - if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater(); - } - -, setWindowResizeRepeater = function () { - var delay = Number(options.resizeWithWindowMaxDelay); - if (delay > 0) - timer.set("winResizeRepeater", function(){ setWindowResizeRepeater(); resizeAll(); }, delay); - } - -, unload = function () { - var o = options; - - _runCallbacks("onunload_start"); - - // trigger plugin callabacks for this layout (eg: stateManagement) - runPluginCallbacks( Instance, $.layout.onUnload ); - - _runCallbacks("onunload_end"); - } - - /** - * Validate and initialize container CSS and events - * - * @see _create() - */ -, _initContainer = function () { - var - N = $N[0] - , $H = $("html") - , tag = sC.tagName = N.tagName - , id = sC.id = N.id - , cls = sC.className = N.className - , o = options - , name = o.name - , props = "position,margin,padding,border" - , css = "layoutCSS" - , CSS = {} - , hid = "hidden" // used A LOT! - // see if this container is a 'pane' inside an outer-layout - , parent = $N.data("parentLayout") // parent-layout Instance - , pane = $N.data("layoutEdge") // pane-name in parent-layout - , isChild = parent && pane - , num = $.layout.cssNum - , $parent, n - ; - // sC = state.container - sC.selector = $N.selector.split(".slice")[0]; - sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages - sC.isBody = (tag === "BODY"); - - // try to find a parent-layout - if (!isChild && !sC.isBody) { - $parent = $N.closest("."+ $.layout.defaults.panes.paneClass); - parent = $parent.data("parentLayout"); - pane = $parent.data("layoutEdge"); - isChild = parent && pane; - } - - $N .data({ - layout: Instance - , layoutContainer: sID // FLAG to indicate this is a layout-container - contains unique internal ID - }) - .addClass(o.containerClass) - ; - var layoutMethods = { - destroy: '' - , initPanes: '' - , resizeAll: 'resizeAll' - , resize: 'resizeAll' - }; - // loop hash and bind all methods - include layoutID namespacing - for (name in layoutMethods) { - $N.bind("layout"+ name.toLowerCase() +"."+ sID, Instance[ layoutMethods[name] || name ]); - } - - // if this container is another layout's 'pane', then set child/parent pointers - if (isChild) { - // update parent flag - Instance.hasParentLayout = true; - // set pointers to THIS child-layout (Instance) in parent-layout - parent.refreshChildren( pane, Instance ); - } - - // SAVE original container CSS for use in destroy() - if (!$N.data(css)) { - // handle props like overflow different for BODY & HTML - has 'system default' values - if (sC.isBody) { - // SAVE CSS - $N.data(css, $.extend( styles($N, props), { - height: $N.css("height") - , overflow: $N.css("overflow") - , overflowX: $N.css("overflowX") - , overflowY: $N.css("overflowY") - })); - // ALSO SAVE CSS - $H.data(css, $.extend( styles($H, 'padding'), { - height: "auto" // FF would return a fixed px-size! - , overflow: $H.css("overflow") - , overflowX: $H.css("overflowX") - , overflowY: $H.css("overflowY") - })); - } - else // handle props normally for non-body elements - $N.data(css, styles($N, props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") ); - } - - try { - // common container CSS - CSS = { - overflow: hid - , overflowX: hid - , overflowY: hid - }; - $N.css( CSS ); - - if (o.inset && !$.isPlainObject(o.inset)) { - // can specify a single number for equal outset all-around - n = parseInt(o.inset, 10) || 0 - o.inset = { - top: n - , bottom: n - , left: n - , right: n - }; - } - - // format html & body if this is a full page layout - if (sC.isBody) { - // if HTML has padding, use this as an outer-spacing around BODY - if (!o.outset) { - // use padding from parent-elem (HTML) as outset - o.outset = { - top: num($H, "paddingTop") - , bottom: num($H, "paddingBottom") - , left: num($H, "paddingLeft") - , right: num($H, "paddingRight") - }; - } - else if (!$.isPlainObject(o.outset)) { - // can specify a single number for equal outset all-around - n = parseInt(o.outset, 10) || 0 - o.outset = { - top: n - , bottom: n - , left: n - , right: n - }; - } - // HTML - $H.css( CSS ).css({ - height: "100%" - , border: "none" // no border or padding allowed when using height = 100% - , padding: 0 // ditto - , margin: 0 - }); - // BODY - if (browser.isIE6) { - // IE6 CANNOT use the trick of setting absolute positioning on all 4 sides - must have 'height' - $N.css({ - width: "100%" - , height: "100%" - , border: "none" // no border or padding allowed when using height = 100% - , padding: 0 // ditto - , margin: 0 - , position: "relative" - }); - // convert body padding to an inset option - the border cannot be measured in IE6! - if (!o.inset) o.inset = elDims( $N ).inset; - } - else { // use absolute positioning for BODY to allow borders & padding without overflow - $N.css({ - width: "auto" - , height: "auto" - , margin: 0 - , position: "absolute" // allows for border and padding on BODY - }); - // apply edge-positioning created above - $N.css( o.outset ); - } - // set current layout-container dimensions - $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values - } - else { - // container MUST have 'position' - var p = $N.css("position"); - if (!p || !p.match(/(fixed|absolute|relative)/)) - $N.css("position","relative"); - - // set current layout-container dimensions - if ( $N.is(":visible") ) { - $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT change insetX (padding) values - if (sC.innerHeight < 1) // container has no 'height' - warn developer - _log( o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) ); - } - } - - // if container has min-width/height, then enable scrollbar(s) - if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto"); - if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto"); - - } catch (ex) {} - } - - /** - * Bind layout hotkeys - if options enabled - * - * @see _create() and addPane() - * @param {string=} [panes=""] The edge(s) to process - */ -, initHotkeys = function (panes) { - panes = panes ? panes.split(",") : _c.borderPanes; - // bind keyDown to capture hotkeys, if option enabled for ANY pane - $.each(panes, function (i, pane) { - var o = options[pane]; - if (o.enableCursorHotkey || o.customHotkey) { - $(document).bind("keydown."+ sID, keyDown); // only need to bind this ONCE - return false; // BREAK - binding was done - } - }); - } - - /** - * Build final OPTIONS data - * - * @see _create() - */ -, initOptions = function () { - var data, d, pane, key, val, i, c, o; - - // reprocess user's layout-options to have correct options sub-key structure - opts = $.layout.transformData( opts, true ); // panes = default subkey - - // auto-rename old options for backward compatibility - opts = $.layout.backwardCompatibility.renameAllOptions( opts ); - - // if user-options has 'panes' key (pane-defaults), clean it... - if (!$.isEmptyObject(opts.panes)) { - // REMOVE any pane-defaults that MUST be set per-pane - data = $.layout.optionsMap.noDefault; - for (i=0, c=data.length; i 0) { - z.pane_normal = zo; - z.content_mask = max(zo+1, z.content_mask); // MIN = +1 - z.resizer_normal = max(zo+2, z.resizer_normal); // MIN = +2 - } - - // DELETE 'panes' key now that we are done - values were copied to EACH pane - delete options.panes; - - - function createFxOptions ( pane ) { - var o = options[pane] - , d = options.panes; - // ensure fxSettings key to avoid errors - if (!o.fxSettings) o.fxSettings = {}; - if (!d.fxSettings) d.fxSettings = {}; - - $.each(["_open","_close","_size"], function (i,n) { - var - sName = "fxName"+ n - , sSpeed = "fxSpeed"+ n - , sSettings = "fxSettings"+ n - // recalculate fxName according to specificity rules - , fxName = o[sName] = - o[sName] // options.west.fxName_open - || d[sName] // options.panes.fxName_open - || o.fxName // options.west.fxName - || d.fxName // options.panes.fxName - || "none" // MEANS $.layout.defaults.panes.fxName == "" || false || null || 0 - , fxExists = $.effects && ($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName])) - ; - // validate fxName to ensure is valid effect - MUST have effect-config data in options.effects - if (fxName === "none" || !options.effects[fxName] || !fxExists) - fxName = o[sName] = "none"; // effect not loaded OR unrecognized fxName - - // set vars for effects subkeys to simplify logic - var fx = options.effects[fxName] || {} // effects.slide - , fx_all = fx.all || null // effects.slide.all - , fx_pane = fx[pane] || null // effects.slide.west - ; - // create fxSpeed[_open|_close|_size] - o[sSpeed] = - o[sSpeed] // options.west.fxSpeed_open - || d[sSpeed] // options.west.fxSpeed_open - || o.fxSpeed // options.west.fxSpeed - || d.fxSpeed // options.panes.fxSpeed - || null // DEFAULT - let fxSetting.duration control speed - ; - // create fxSettings[_open|_close|_size] - o[sSettings] = $.extend( - true - , {} - , fx_all // effects.slide.all - , fx_pane // effects.slide.west - , d.fxSettings // options.panes.fxSettings - , o.fxSettings // options.west.fxSettings - , d[sSettings] // options.panes.fxSettings_open - , o[sSettings] // options.west.fxSettings_open - ); - }); - - // DONE creating action-specific-settings for this pane, - // so DELETE generic options - are no longer meaningful - delete o.fxName; - delete o.fxSpeed; - delete o.fxSettings; - } - } - - /** - * Initialize module objects, styling, size and position for all panes - * - * @see _initElements() - * @param {string} pane The pane to process - */ -, getPane = function (pane) { - var sel = options[pane].paneSelector - if (sel.substr(0,1)==="#") // ID selector - // NOTE: elements selected 'by ID' DO NOT have to be 'children' - return $N.find(sel).eq(0); - else { // class or other selector - var $P = $N.children(sel).eq(0); - // look for the pane nested inside a 'form' element - return $P.length ? $P : $N.children("form:first").children(sel).eq(0); - } - } - - /** - * @param {Object=} evt - */ -, initPanes = function (evt) { - // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility - evtPane(evt); - - // NOTE: do north & south FIRST so we can measure their height - do center LAST - $.each(_c.allPanes, function (idx, pane) { - addPane( pane, true ); - }); - - // init the pane-handles NOW in case we have to hide or close the pane below - initHandles(); - - // now that all panes have been initialized and initially-sized, - // make sure there is really enough space available for each pane - $.each(_c.borderPanes, function (i, pane) { - if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN - setSizeLimits(pane); - makePaneFit(pane); // pane may be Closed, Hidden or Resized by makePaneFit() - } - }); - // size center-pane AGAIN in case we 'closed' a border-pane in loop above - sizeMidPanes("center"); - - // Chrome/Webkit sometimes fires callbacks BEFORE it completes resizing! - // Before RC30.3, there was a 10ms delay here, but that caused layout - // to load asynchrously, which is BAD, so try skipping delay for now - - // process pane contents and callbacks, and init/resize child-layout if exists - $.each(_c.allPanes, function (idx, pane) { - afterInitPane(pane); - }); - } - - /** - * Add a pane to the layout - subroutine of initPanes() - * - * @see initPanes() - * @param {string} pane The pane to process - * @param {boolean=} [force=false] Size content after init - */ -, addPane = function (pane, force) { - if ( !force && !isInitialized() ) return; - var - o = options[pane] - , s = state[pane] - , c = _c[pane] - , dir = c.dir - , fx = s.fx - , spacing = o.spacing_open || 0 - , isCenter = (pane === "center") - , CSS = {} - , $P = $Ps[pane] - , size, minSize, maxSize, child - ; - // if pane-pointer already exists, remove the old one first - if ($P) - removePane( pane, false, true, false ); - else - $Cs[pane] = false; // init - - $P = $Ps[pane] = getPane(pane); - if (!$P.length) { - $Ps[pane] = false; // logic - return; - } - - // SAVE original Pane CSS - if (!$P.data("layoutCSS")) { - var props = "position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border"; - $P.data("layoutCSS", styles($P, props)); - } - - // create alias for pane data in Instance - initHandles will add more - Instance[pane] = { - name: pane - , pane: $Ps[pane] - , content: $Cs[pane] - , options: options[pane] - , state: state[pane] - , children: children[pane] - }; - - // add classes, attributes & events - $P .data({ - parentLayout: Instance // pointer to Layout Instance - , layoutPane: Instance[pane] // NEW pointer to pane-alias-object - , layoutEdge: pane - , layoutRole: "pane" - }) - .css(c.cssReq).css("zIndex", options.zIndexes.pane_normal) - .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles - .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector' - .bind("mouseenter."+ sID, addHover ) - .bind("mouseleave."+ sID, removeHover ) - ; - var paneMethods = { - hide: '' - , show: '' - , toggle: '' - , close: '' - , open: '' - , slideOpen: '' - , slideClose: '' - , slideToggle: '' - , size: 'sizePane' - , sizePane: 'sizePane' - , sizeContent: '' - , sizeHandles: '' - , enableClosable: '' - , disableClosable: '' - , enableSlideable: '' - , disableSlideable: '' - , enableResizable: '' - , disableResizable: '' - , swapPanes: 'swapPanes' - , swap: 'swapPanes' - , move: 'swapPanes' - , removePane: 'removePane' - , remove: 'removePane' - , createChildren: '' - , resizeChildren: '' - , resizeAll: 'resizeAll' - , resizeLayout: 'resizeAll' - } - , name; - // loop hash and bind all methods - include layoutID namespacing - for (name in paneMethods) { - $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, Instance[ paneMethods[name] || name ]); - } - - // see if this pane has a 'scrolling-content element' - initContent(pane, false); // false = do NOT sizeContent() - called later - - if (!isCenter) { - // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden) - // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size' - size = s.size = _parseSize(pane, o.size); - minSize = _parseSize(pane,o.minSize) || 1; - maxSize = _parseSize(pane,o.maxSize) || 100000; - if (size > 0) size = max(min(size, maxSize), minSize); - s.autoResize = o.autoResize; // used with percentage sizes - - // state for border-panes - s.isClosed = false; // true = pane is closed - s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes - s.isResizing= false; // true = pane is in process of being resized - s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible! - - // array for 'pin buttons' whose classNames are auto-updated on pane-open/-close - if (!s.pins) s.pins = []; - } - // states common to ALL panes - s.tagName = $P[0].tagName; - s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or is going) - s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically - s.isVisible = true; // false = pane is invisible - closed OR hidden - simplify logic - - // init pane positioning - setPanePosition( pane ); - - // if pane is not visible, - if (dir === "horz") // north or south pane - CSS.height = cssH($P, size); - else if (dir === "vert") // east or west pane - CSS.width = cssW($P, size); - //else if (isCenter) {} - - $P.css(CSS); // apply size -- top, bottom & height will be set by sizeMidPanes - if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback - - // if manually adding a pane AFTER layout initialization, then... - if (state.initialized) { - initHandles( pane ); - initHotkeys( pane ); - } - - // close or hide the pane if specified in settings - if (o.initClosed && o.closable && !o.initHidden) - close(pane, true, true); // true, true = force, noAnimation - else if (o.initHidden || o.initClosed) - hide(pane); // will be completely invisible - no resizer or spacing - else if (!s.noRoom) - // make the pane visible - in case was initially hidden - $P.css("display","block"); - // ELSE setAsOpen() - called later by initHandles() - - // RESET visibility now - pane will appear IF display:block - $P.css("visibility","visible"); - - // check option for auto-handling of pop-ups & drop-downs - if (o.showOverflowOnHover) - $P.hover( allowOverflow, resetOverflow ); - - // if manually adding a pane AFTER layout initialization, then... - if (state.initialized) { - afterInitPane( pane ); - } - } - -, afterInitPane = function (pane) { - var $P = $Ps[pane] - , s = state[pane] - , o = options[pane] - ; - if (!$P) return; - - // see if there is a directly-nested layout inside this pane - if ($P.data("layout")) - refreshChildren( pane, $P.data("layout") ); - - // process pane contents and callbacks, and init/resize child-layout if exists - if (s.isVisible) { // pane is OPEN - if (state.initialized) // this pane was added AFTER layout was created - resizeAll(); // will also sizeContent - else - sizeContent(pane); - - if (o.triggerEventsOnLoad) - _runCallbacks("onresize_end", pane); - else // automatic if onresize called, otherwise call it specifically - // resize child - IF inner-layout already exists (created before this layout) - resizeChildren(pane, true); // a previously existing childLayout - } - - // init childLayouts - even if pane is not visible - if (o.initChildren && o.children) - createChildren(pane); - } - - /** - * @param {string=} panes The pane(s) to process - */ -, setPanePosition = function (panes) { - panes = panes ? panes.split(",") : _c.borderPanes; - - // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV - $.each(panes, function (i, pane) { - var $P = $Ps[pane] - , $R = $Rs[pane] - , o = options[pane] - , s = state[pane] - , side = _c[pane].side - , CSS = {} - ; - if (!$P) return; // pane does not exist - skip - - // set css-position to account for container borders & padding - switch (pane) { - case "north": CSS.top = sC.inset.top; - CSS.left = sC.inset.left; - CSS.right = sC.inset.right; - break; - case "south": CSS.bottom = sC.inset.bottom; - CSS.left = sC.inset.left; - CSS.right = sC.inset.right; - break; - case "west": CSS.left = sC.inset.left; // top, bottom & height set by sizeMidPanes() - break; - case "east": CSS.right = sC.inset.right; // ditto - break; - case "center": // top, left, width & height set by sizeMidPanes() - } - // apply position - $P.css(CSS); - - // update resizer position - if ($R && s.isClosed) - $R.css(side, sC.inset[side]); - else if ($R && !s.isHidden) - $R.css(side, sC.inset[side] + getPaneSize(pane)); - }); - } - - /** - * Initialize module objects, styling, size and position for all resize bars and toggler buttons - * - * @see _create() - * @param {string=} [panes=""] The edge(s) to process - */ -, initHandles = function (panes) { - panes = panes ? panes.split(",") : _c.borderPanes; - - // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV - $.each(panes, function (i, pane) { - var $P = $Ps[pane]; - $Rs[pane] = false; // INIT - $Ts[pane] = false; - if (!$P) return; // pane does not exist - skip - - var o = options[pane] - , s = state[pane] - , c = _c[pane] - , paneId = o.paneSelector.substr(0,1) === "#" ? o.paneSelector.substr(1) : "" - , rClass = o.resizerClass - , tClass = o.togglerClass - , spacing = (s.isVisible ? o.spacing_open : o.spacing_closed) - , _pane = "-"+ pane // used for classNames - , _state = (s.isVisible ? "-open" : "-closed") // used for classNames - , I = Instance[pane] - // INIT RESIZER BAR - , $R = I.resizer = $Rs[pane] = $("
      ") - // INIT TOGGLER BUTTON - , $T = I.toggler = (o.closable ? $Ts[pane] = $("
      ") : false) - ; - - //if (s.isVisible && o.resizable) ... handled by initResizable - if (!s.isVisible && o.slidable) - $R.attr("title", o.tips.Slide).css("cursor", o.sliderCursor); - - $R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer" - .attr("id", paneId ? paneId +"-resizer" : "" ) - .data({ - parentLayout: Instance - , layoutPane: Instance[pane] // NEW pointer to pane-alias-object - , layoutEdge: pane - , layoutRole: "resizer" - }) - .css(_c.resizers.cssReq).css("zIndex", options.zIndexes.resizer_normal) - .css(o.applyDemoStyles ? _c.resizers.cssDemo : {}) // add demo styles - .addClass(rClass +" "+ rClass+_pane) - .hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handle with CSS instead - .hover(onResizerEnter, onResizerLeave) // ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter - .mousedown($.layout.disableTextSelection) // prevent text-selection OUTSIDE resizer - .mouseup($.layout.enableTextSelection) // not really necessary, but just in case - .appendTo($N) // append DIV to container - ; - if ($.fn.disableSelection) - $R.disableSelection(); // prevent text-selection INSIDE resizer - if (o.resizerDblClickToggle) - $R.bind("dblclick."+ sID, toggle ); - - if ($T) { - $T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler" - .attr("id", paneId ? paneId +"-toggler" : "" ) - .data({ - parentLayout: Instance - , layoutPane: Instance[pane] // NEW pointer to pane-alias-object - , layoutEdge: pane - , layoutRole: "toggler" - }) - .css(_c.togglers.cssReq) // add base/required styles - .css(o.applyDemoStyles ? _c.togglers.cssDemo : {}) // add demo styles - .addClass(tClass +" "+ tClass+_pane) - .hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handle with CSS instead - .bind("mouseenter", onResizerEnter) // NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer - .appendTo($R) // append SPAN to resizer DIV - ; - // ADD INNER-SPANS TO TOGGLER - if (o.togglerContent_open) // ui-layout-open - $(""+ o.togglerContent_open +"") - .data({ - layoutEdge: pane - , layoutRole: "togglerContent" - }) - .data("layoutRole", "togglerContent") - .data("layoutEdge", pane) - .addClass("content content-open") - .css("display","none") - .appendTo( $T ) - //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-open instead! - ; - if (o.togglerContent_closed) // ui-layout-closed - $(""+ o.togglerContent_closed +"") - .data({ - layoutEdge: pane - , layoutRole: "togglerContent" - }) - .addClass("content content-closed") - .css("display","none") - .appendTo( $T ) - //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-closed instead! - ; - // ADD TOGGLER.click/.hover - enableClosable(pane); - } - - // add Draggable events - initResizable(pane); - - // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer resizer-west resizer-open" - if (s.isVisible) - setAsOpen(pane); // onOpen will be called, but NOT onResize - else { - setAsClosed(pane); // onClose will be called - bindStartSlidingEvents(pane, true); // will enable events IF option is set - } - - }); - - // SET ALL HANDLE DIMENSIONS - sizeHandles(); - } - - - /** - * Initialize scrolling ui-layout-content div - if exists - * - * @see initPane() - or externally after an Ajax injection - * @param {string} pane The pane to process - * @param {boolean=} [resize=true] Size content after init - */ -, initContent = function (pane, resize) { - if (!isInitialized()) return; - var - o = options[pane] - , sel = o.contentSelector - , I = Instance[pane] - , $P = $Ps[pane] - , $C - ; - if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent) - ? $P.find(sel).eq(0) // match 1-element only - : $P.children(sel).eq(0) - ; - if ($C && $C.length) { - $C.data("layoutRole", "content"); - // SAVE original Content CSS - if (!$C.data("layoutCSS")) - $C.data("layoutCSS", styles($C, "height")); - $C.css( _c.content.cssReq ); - if (o.applyDemoStyles) { - $C.css( _c.content.cssDemo ); // add padding & overflow: auto to content-div - $P.css( _c.content.cssDemoPane ); // REMOVE padding/scrolling from pane - } - // ensure no vertical scrollbar on pane - will mess up measurements - if ($P.css("overflowX").match(/(scroll|auto)/)) { - $P.css("overflow", "hidden"); - } - state[pane].content = {}; // init content state - if (resize !== false) sizeContent(pane); - // sizeContent() is called AFTER init of all elements - } - else - I.content = $Cs[pane] = false; - } - - - /** - * Add resize-bars to all panes that specify it in options - * -dependancy: $.fn.resizable - will skip if not found - * - * @see _create() - * @param {string=} [panes=""] The edge(s) to process - */ -, initResizable = function (panes) { - var draggingAvailable = $.layout.plugins.draggable - , side // set in start() - ; - panes = panes ? panes.split(",") : _c.borderPanes; - - $.each(panes, function (idx, pane) { - var o = options[pane]; - if (!draggingAvailable || !$Ps[pane] || !o.resizable) { - o.resizable = false; - return true; // skip to next - } - - var s = state[pane] - , z = options.zIndexes - , c = _c[pane] - , side = c.dir=="horz" ? "top" : "left" - , $P = $Ps[pane] - , $R = $Rs[pane] - , base = o.resizerClass - , lastPos = 0 // used when live-resizing - , r, live // set in start because may change - // 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process - , resizerClass = base+"-drag" // resizer-drag - , resizerPaneClass = base+"-"+pane+"-drag" // resizer-north-drag - // 'helper' class is applied to the CLONED resizer-bar while it is being dragged - , helperClass = base+"-dragging" // resizer-dragging - , helperPaneClass = base+"-"+pane+"-dragging" // resizer-north-dragging - , helperLimitClass = base+"-dragging-limit" // resizer-drag - , helperPaneLimitClass = base+"-"+pane+"-dragging-limit" // resizer-north-drag - , helperClassesSet = false // logic var - ; - - if (!s.isClosed) - $R.attr("title", o.tips.Resize) - .css("cursor", o.resizerCursor); // n-resize, s-resize, etc - - $R.draggable({ - containment: $N[0] // limit resizing to layout container - , axis: (c.dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis - , delay: 0 - , distance: 1 - , grid: o.resizingGrid - // basic format for helper - style it using class: .ui-draggable-dragging - , helper: "clone" - , opacity: o.resizerDragOpacity - , addClasses: false // avoid ui-state-disabled class when disabled - //, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed - , zIndex: z.resizer_drag - - , start: function (e, ui) { - // REFRESH options & state pointers in case we used swapPanes - o = options[pane]; - s = state[pane]; - // re-read options - live = o.livePaneResizing; - - // ondrag_start callback - will CANCEL hide if returns false - // TODO: dragging CANNOT be cancelled like this, so see if there is a way? - if (false === _runCallbacks("ondrag_start", pane)) return false; - - s.isResizing = true; // prevent pane from closing while resizing - state.paneResizing = pane; // easy to see if ANY pane is resizing - timer.clear(pane+"_closeSlider"); // just in case already triggered - - // SET RESIZER LIMITS - used in drag() - setSizeLimits(pane); // update pane/resizer state - r = s.resizerPosition; - lastPos = ui.position[ side ] - - $R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes - helperClassesSet = false; // reset logic var - see drag() - - // MASK PANES CONTAINING IFRAMES, APPLETS OR OTHER TROUBLESOME ELEMENTS - showMasks( pane, { resizing: true }); - } - - , drag: function (e, ui) { - if (!helperClassesSet) { // can only add classes after clone has been added to the DOM - //$(".ui-draggable-dragging") - ui.helper - .addClass( helperClass +" "+ helperPaneClass ) // add helper classes - .css({ right: "auto", bottom: "auto" }) // fix dir="rtl" issue - .children().css("visibility","hidden") // hide toggler inside dragged resizer-bar - ; - helperClassesSet = true; - // draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane! - if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding); - } - // CONTAIN RESIZER-BAR TO RESIZING LIMITS - var limit = 0; - if (ui.position[side] < r.min) { - ui.position[side] = r.min; - limit = -1; - } - else if (ui.position[side] > r.max) { - ui.position[side] = r.max; - limit = 1; - } - // ADD/REMOVE dragging-limit CLASS - if (limit) { - ui.helper.addClass( helperLimitClass +" "+ helperPaneLimitClass ); // at dragging-limit - window.defaultStatus = (limit>0 && pane.match(/(north|west)/)) || (limit<0 && pane.match(/(south|east)/)) ? o.tips.maxSizeWarning : o.tips.minSizeWarning; - } - else { - ui.helper.removeClass( helperLimitClass +" "+ helperPaneLimitClass ); // not at dragging-limit - window.defaultStatus = ""; - } - // DYNAMICALLY RESIZE PANES IF OPTION ENABLED - // won't trigger unless resizer has actually moved! - if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) { - lastPos = ui.position[side]; - resizePanes(e, ui, pane) - } - } - - , stop: function (e, ui) { - $('body').enableSelection(); // RE-ENABLE TEXT SELECTION - window.defaultStatus = ""; // clear 'resizing limit' message from statusbar - $R.removeClass( resizerClass +" "+ resizerPaneClass ); // remove drag classes from Resizer - s.isResizing = false; - state.paneResizing = false; // easy to see if ANY pane is resizing - resizePanes(e, ui, pane, true); // true = resizingDone - } - - }); - }); - - /** - * resizePanes - * - * Sub-routine called from stop() - and drag() if livePaneResizing - * - * @param {!Object} evt - * @param {!Object} ui - * @param {string} pane - * @param {boolean=} [resizingDone=false] - */ - var resizePanes = function (evt, ui, pane, resizingDone) { - var dragPos = ui.position - , c = _c[pane] - , o = options[pane] - , s = state[pane] - , resizerPos - ; - switch (pane) { - case "north": resizerPos = dragPos.top; break; - case "west": resizerPos = dragPos.left; break; - case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break; - case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break; - }; - // remove container margin from resizer position to get the pane size - var newSize = resizerPos - sC.inset[c.side]; - - // Disable OR Resize Mask(s) created in drag.start - if (!resizingDone) { - // ensure we meet liveResizingTolerance criteria - if (Math.abs(newSize - s.size) < o.liveResizingTolerance) - return; // SKIP resize this time - // resize the pane - manualSizePane(pane, newSize, false, true); // true = noAnimation - sizeMasks(); // resize all visible masks - } - else { // resizingDone - // ondrag_end callback - if (false !== _runCallbacks("ondrag_end", pane)) - manualSizePane(pane, newSize, false, true); // true = noAnimation - hideMasks(true); // true = force hiding all masks even if one is 'sliding' - if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane - showMasks( pane, { resizing: true }); - } - }; - } - - /** - * sizeMask - * - * Needed to overlay a DIV over an IFRAME-pane because mask CANNOT be *inside* the pane - * Called when mask created, and during livePaneResizing - */ -, sizeMask = function () { - var $M = $(this) - , pane = $M.data("layoutMask") // eg: "west" - , s = state[pane] - ; - // only masks over an IFRAME-pane need manual resizing - if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes - $M.css({ - top: s.offsetTop - , left: s.offsetLeft - , width: s.outerWidth - , height: s.outerHeight - }); - /* ALT Method... - var $P = $Ps[pane]; - $M.css( $P.position() ).css({ width: $P[0].offsetWidth, height: $P[0].offsetHeight }); - */ - } -, sizeMasks = function () { - $Ms.each( sizeMask ); // resize all 'visible' masks - } - - /** - * @param {string} pane The pane being resized, animated or isSliding - * @param {Object=} [args] (optional) Options: which masks to apply, and to which panes - */ -, showMasks = function (pane, args) { - var c = _c[pane] - , panes = ["center"] - , z = options.zIndexes - , a = $.extend({ - objectsOnly: false - , animation: false - , resizing: true - , sliding: state[pane].isSliding - }, args ) - , o, s - ; - if (a.resizing) - panes.push( pane ); - if (a.sliding) - panes.push( _c.oppositeEdge[pane] ); // ADD the oppositeEdge-pane - - if (c.dir === "horz") { - panes.push("west"); - panes.push("east"); - } - - $.each(panes, function(i,p){ - s = state[p]; - o = options[p]; - if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) { - getMasks(p).each(function(){ - sizeMask.call(this); - this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1 - this.style.display = "block"; - }); - } - }); - } - - /** - * @param {boolean=} force Hide masks even if a pane is sliding - */ -, hideMasks = function (force) { - // ensure no pane is resizing - could be a timing issue - if (force || !state.paneResizing) { - $Ms.hide(); // hide ALL masks - } - // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled - else if (!force && !$.isEmptyObject( state.panesSliding )) { - var i = $Ms.length - 1 - , p, $M; - for (; i >= 0; i--) { - $M = $Ms.eq(i); - p = $M.data("layoutMask"); - if (!options[p].maskObjects) { - $M.hide(); - } - } - } - } - - /** - * @param {string} pane - */ -, getMasks = function (pane) { - var $Masks = $([]) - , $M, i = 0, c = $Ms.length - ; - for (; i CSS - if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET CSS - $N.css( $N.data(css) ).removeData(css); - - // trigger plugins for this layout, if there are any - runPluginCallbacks( Instance, $.layout.onDestroy ); - - // trigger state-management and onunload callback - unload(); - - // clear the Instance of everything except for container & options (so could recreate) - // RE-CREATE: myLayout = myLayout.container.layout( myLayout.options ); - for (var n in Instance) - if (!n.match(/^(container|options)$/)) delete Instance[ n ]; - // add a 'destroyed' flag to make it easy to check - Instance.destroyed = true; - - // if this is a child layout, CLEAR the child-pointer in the parent - /* for now the pointer REMAINS, but with only container, options and destroyed keys - if (parentPane) { - var layout = parentPane.pane.data("parentLayout") - , key = layout.options.instanceKey || 'error'; - // THIS SYNTAX MAY BE WRONG! - parentPane.children[key] = layout.children[ parentPane.name ].children[key] = null; - } - */ - - return Instance; // for coding convenience - } - - /** - * Remove a pane from the layout - subroutine of destroy() - * - * @see destroy() - * @param {(string|Object)} evt_or_pane The pane to process - * @param {boolean=} [remove=false] Remove the DOM element? - * @param {boolean=} [skipResize=false] Skip calling resizeAll()? - * @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options setting - */ -, removePane = function (evt_or_pane, remove, skipResize, destroyChild) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $P = $Ps[pane] - , $C = $Cs[pane] - , $R = $Rs[pane] - , $T = $Ts[pane] - ; - // NOTE: elements can still exist even after remove() - // so check for missing data(), which is cleared by removed() - if ($P && $.isEmptyObject( $P.data() )) $P = false; - if ($C && $.isEmptyObject( $C.data() )) $C = false; - if ($R && $.isEmptyObject( $R.data() )) $R = false; - if ($T && $.isEmptyObject( $T.data() )) $T = false; - - if ($P) $P.stop(true, true); - - var o = options[pane] - , s = state[pane] - , d = "layout" - , css = "layoutCSS" - , pC = children[pane] - , hasChildren = $.isPlainObject( pC ) && !$.isEmptyObject( pC ) - , destroy = destroyChild !== undefined ? destroyChild : o.destroyChildren - ; - // FIRST destroy the child-layout(s) - if (hasChildren && destroy) { - $.each( pC, function (key, child) { - if (!child.destroyed) - child.destroy(true);// tell child-layout to destroy ALL its child-layouts too - if (child.destroyed) // destroy was successful - delete pC[key]; - }); - // if no more children, remove the children hash - if ($.isEmptyObject( pC )) { - pC = children[pane] = null; // clear children hash - hasChildren = false; - } - } - - // Note: can't 'remove' a pane element with non-destroyed children - if ($P && remove && !hasChildren) - $P.remove(); // remove the pane-element and everything inside it - else if ($P && $P[0]) { - // create list of ALL pane-classes that need to be removed - var root = o.paneClass // default="ui-layout-pane" - , pRoot = root +"-"+ pane // eg: "ui-layout-pane-west" - , _open = "-open" - , _sliding= "-sliding" - , _closed = "-closed" - , classes = [ root, root+_open, root+_closed, root+_sliding, // generic classes - pRoot, pRoot+_open, pRoot+_closed, pRoot+_sliding ] // pane-specific classes - ; - $.merge(classes, getHoverClasses($P, true)); // ADD hover-classes - // remove all Layout classes from pane-element - $P .removeClass( classes.join(" ") ) // remove ALL pane-classes - .removeData("parentLayout") - .removeData("layoutPane") - .removeData("layoutRole") - .removeData("layoutEdge") - .removeData("autoHidden") // in case set - .unbind("."+ sID) // remove ALL Layout events - // TODO: remove these extra unbind commands when jQuery is fixed - //.unbind("mouseenter"+ sID) - //.unbind("mouseleave"+ sID) - ; - // do NOT reset CSS if this pane/content is STILL the container of a nested layout! - // the nested layout will reset its 'container' CSS when/if it is destroyed - if (hasChildren && $C) { - // a content-div may not have a specific width, so give it one to contain the Layout - $C.width( $C.width() ); - $.each( pC, function (key, child) { - child.resizeAll(); // resize the Layout - }); - } - else if ($C) - $C.css( $C.data(css) ).removeData(css).removeData("layoutRole"); - // remove pane AFTER content in case there was a nested layout - if (!$P.data(d)) - $P.css( $P.data(css) ).removeData(css); - } - - // REMOVE pane resizer and toggler elements - if ($T) $T.remove(); - if ($R) $R.remove(); - - // CLEAR all pointers and state data - Instance[pane] = $Ps[pane] = $Cs[pane] = $Rs[pane] = $Ts[pane] = false; - s = { removed: true }; - - if (!skipResize) - resizeAll(); - } - - -/* - * ########################### - * ACTION METHODS - * ########################### - */ - - /** - * @param {string} pane - */ -, _hidePane = function (pane) { - var $P = $Ps[pane] - , o = options[pane] - , s = $P[0].style - ; - if (o.useOffscreenClose) { - if (!$P.data(_c.offscreenReset)) - $P.data(_c.offscreenReset, { left: s.left, right: s.right }); - $P.css( _c.offscreenCSS ); - } - else - $P.hide().removeData(_c.offscreenReset); - } - - /** - * @param {string} pane - */ -, _showPane = function (pane) { - var $P = $Ps[pane] - , o = options[pane] - , off = _c.offscreenCSS - , old = $P.data(_c.offscreenReset) - , s = $P[0].style - ; - $P .show() // ALWAYS show, just in case - .removeData(_c.offscreenReset); - if (o.useOffscreenClose && old) { - if (s.left == off.left) - s.left = old.left; - if (s.right == off.right) - s.right = old.right; - } - } - - - /** - * Completely 'hides' a pane, including its spacing - as if it does not exist - * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it - * - * @param {(string|Object)} evt_or_pane The pane being hidden, ie: north, south, east, or west - * @param {boolean=} [noAnimation=false] - */ -, hide = function (evt_or_pane, noAnimation) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , o = options[pane] - , s = state[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - ; - if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden - - // onhide_start callback - will CANCEL hide if returns false - if (state.initialized && false === _runCallbacks("onhide_start", pane)) return; - - s.isSliding = false; // just in case - delete state.panesSliding[pane]; - - // now hide the elements - if ($R) $R.hide(); // hide resizer-bar - if (!state.initialized || s.isClosed) { - s.isClosed = true; // to trigger open-animation on show() - s.isHidden = true; - s.isVisible = false; - if (!state.initialized) - _hidePane(pane); // no animation when loading page - sizeMidPanes(_c[pane].dir === "horz" ? "" : "center"); - if (state.initialized || o.triggerEventsOnLoad) - _runCallbacks("onhide_end", pane); - } - else { - s.isHiding = true; // used by onclose - close(pane, false, noAnimation); // adjust all panes to fit - } - } - - /** - * Show a hidden pane - show as 'closed' by default unless openPane = true - * - * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west - * @param {boolean=} [openPane=false] - * @param {boolean=} [noAnimation=false] - * @param {boolean=} [noAlert=false] - */ -, show = function (evt_or_pane, openPane, noAnimation, noAlert) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , o = options[pane] - , s = state[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - ; - if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden - - // onshow_start callback - will CANCEL show if returns false - if (false === _runCallbacks("onshow_start", pane)) return; - - s.isShowing = true; // used by onopen/onclose - //s.isHidden = false; - will be set by open/close - if not cancelled - s.isSliding = false; // just in case - delete state.panesSliding[pane]; - - // now show the elements - //if ($R) $R.show(); - will be shown by open/close - if (openPane === false) - close(pane, true); // true = force - else - open(pane, false, noAnimation, noAlert); // adjust all panes to fit - } - - - /** - * Toggles a pane open/closed by calling either open or close - * - * @param {(string|Object)} evt_or_pane The pane being toggled, ie: north, south, east, or west - * @param {boolean=} [slide=false] - */ -, toggle = function (evt_or_pane, slide) { - if (!isInitialized()) return; - var evt = evtObj(evt_or_pane) - , pane = evtPane.call(this, evt_or_pane) - , s = state[pane] - ; - if (evt) // called from to $R.dblclick OR triggerPaneEvent - evt.stopImmediatePropagation(); - if (s.isHidden) - show(pane); // will call 'open' after unhiding it - else if (s.isClosed) - open(pane, !!slide); - else - close(pane); - } - - - /** - * Utility method used during init or other auto-processes - * - * @param {string} pane The pane being closed - * @param {boolean=} [setHandles=false] - */ -, _closePane = function (pane, setHandles) { - var - $P = $Ps[pane] - , s = state[pane] - ; - _hidePane(pane); - s.isClosed = true; - s.isVisible = false; - if (setHandles) setAsClosed(pane); - } - - /** - * Close the specified pane (animation optional), and resize all other panes as needed - * - * @param {(string|Object)} evt_or_pane The pane being closed, ie: north, south, east, or west - * @param {boolean=} [force=false] - * @param {boolean=} [noAnimation=false] - * @param {boolean=} [skipCallback=false] - */ -, close = function (evt_or_pane, force, noAnimation, skipCallback) { - var pane = evtPane.call(this, evt_or_pane); - if (pane === "center") return; // validate - // if pane has been initialized, but NOT the complete layout, close pane instantly - if (!state.initialized && $Ps[pane]) { - _closePane(pane, true); // INIT pane as closed - return; - } - if (!isInitialized()) return; - - var - $P = $Ps[pane] - , $R = $Rs[pane] - , $T = $Ts[pane] - , o = options[pane] - , s = state[pane] - , c = _c[pane] - , doFX, isShowing, isHiding, wasSliding; - - // QUEUE in case another action/animation is in progress - $N.queue(function( queueNext ){ - - if ( !$P - || (!o.closable && !s.isShowing && !s.isHiding) // invalid request // (!o.resizable && !o.closable) ??? - || (!force && s.isClosed && !s.isShowing) // already closed - ) return queueNext(); - - // onclose_start callback - will CANCEL hide if returns false - // SKIP if just 'showing' a hidden pane as 'closed' - var abort = !s.isShowing && false === _runCallbacks("onclose_start", pane); - - // transfer logic vars to temp vars - isShowing = s.isShowing; - isHiding = s.isHiding; - wasSliding = s.isSliding; - // now clear the logic vars (REQUIRED before aborting) - delete s.isShowing; - delete s.isHiding; - - if (abort) return queueNext(); - - doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none"); - s.isMoving = true; - s.isClosed = true; - s.isVisible = false; - // update isHidden BEFORE sizing panes - if (isHiding) s.isHidden = true; - else if (isShowing) s.isHidden = false; - - if (s.isSliding) // pane is being closed, so UNBIND trigger events - bindStopSlidingEvents(pane, false); // will set isSliding=false - else // resize panes adjacent to this one - sizeMidPanes(_c[pane].dir === "horz" ? "" : "center", false); // false = NOT skipCallback - - // if this pane has a resizer bar, move it NOW - before animation - setAsClosed(pane); - - // CLOSE THE PANE - if (doFX) { // animate the close - lockPaneForFX(pane, true); // need to set left/top so animation will work - $P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () { - lockPaneForFX(pane, false); // undo - if (s.isClosed) close_2(); - queueNext(); - }); - } - else { // hide the pane without animation - _hidePane(pane); - close_2(); - queueNext(); - }; - }); - - // SUBROUTINE - function close_2 () { - s.isMoving = false; - bindStartSlidingEvents(pane, true); // will enable if o.slidable = true - - // if opposite-pane was autoClosed, see if it can be autoOpened now - var altPane = _c.oppositeEdge[pane]; - if (state[ altPane ].noRoom) { - setSizeLimits( altPane ); - makePaneFit( altPane ); - } - - if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) { - // onclose callback - UNLESS just 'showing' a hidden pane as 'closed' - if (!isShowing) _runCallbacks("onclose_end", pane); - // onhide OR onshow callback - if (isShowing) _runCallbacks("onshow_end", pane); - if (isHiding) _runCallbacks("onhide_end", pane); - } - } - } - - /** - * @param {string} pane The pane just closed, ie: north, south, east, or west - */ -, setAsClosed = function (pane) { - if (!$Rs[pane]) return; // handles not initialized yet! - var - $P = $Ps[pane] - , $R = $Rs[pane] - , $T = $Ts[pane] - , o = options[pane] - , s = state[pane] - , side = _c[pane].side - , rClass = o.resizerClass - , tClass = o.togglerClass - , _pane = "-"+ pane // used for classNames - , _open = "-open" - , _sliding= "-sliding" - , _closed = "-closed" - ; - $R - .css(side, sC.inset[side]) // move the resizer - .removeClass( rClass+_open +" "+ rClass+_pane+_open ) - .removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding ) - .addClass( rClass+_closed +" "+ rClass+_pane+_closed ) - ; - // handle already-hidden panes in case called by swap() or a similar method - if (s.isHidden) $R.hide(); // hide resizer-bar - - // DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvents? - if (o.resizable && $.layout.plugins.draggable) - $R - .draggable("disable") - .removeClass("ui-state-disabled") // do NOT apply disabled styling - not suitable here - .css("cursor", "default") - .attr("title","") - ; - - // if pane has a toggler button, adjust that too - if ($T) { - $T - .removeClass( tClass+_open +" "+ tClass+_pane+_open ) - .addClass( tClass+_closed +" "+ tClass+_pane+_closed ) - .attr("title", o.tips.Open) // may be blank - ; - // toggler-content - if exists - $T.children(".content-open").hide(); - $T.children(".content-closed").css("display","block"); - } - - // sync any 'pin buttons' - syncPinBtns(pane, false); - - if (state.initialized) { - // resize 'length' and position togglers for adjacent panes - sizeHandles(); - } - } - - /** - * Open the specified pane (animation optional), and resize all other panes as needed - * - * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west - * @param {boolean=} [slide=false] - * @param {boolean=} [noAnimation=false] - * @param {boolean=} [noAlert=false] - */ -, open = function (evt_or_pane, slide, noAnimation, noAlert) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $P = $Ps[pane] - , $R = $Rs[pane] - , $T = $Ts[pane] - , o = options[pane] - , s = state[pane] - , c = _c[pane] - , doFX, isShowing - ; - if (pane === "center") return; // validate - // QUEUE in case another action/animation is in progress - $N.queue(function( queueNext ){ - - if ( !$P - || (!o.resizable && !o.closable && !s.isShowing) // invalid request - || (s.isVisible && !s.isSliding) // already open - ) return queueNext(); - - // pane can ALSO be unhidden by just calling show(), so handle this scenario - if (s.isHidden && !s.isShowing) { - queueNext(); // call before show() because it needs the queue free - show(pane, true); - return; - } - - if (s.autoResize && s.size != o.size) // resize pane to original size set in options - sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize - else - // make sure there is enough space available to open the pane - setSizeLimits(pane, slide); - - // onopen_start callback - will CANCEL open if returns false - var cbReturn = _runCallbacks("onopen_start", pane); - - if (cbReturn === "abort") - return queueNext(); - - // update pane-state again in case options were changed in onopen_start - if (cbReturn !== "NC") // NC = "No Callback" - setSizeLimits(pane, slide); - - if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN! - syncPinBtns(pane, false); // make sure pin-buttons are reset - if (!noAlert && o.tips.noRoomToOpen) - alert(o.tips.noRoomToOpen); - return queueNext(); // ABORT - } - - if (slide) // START Sliding - will set isSliding=true - bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane - else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead - bindStopSlidingEvents(pane, false); // UNBIND trigger events - will set isSliding=false - else if (o.slidable) - bindStartSlidingEvents(pane, false); // UNBIND trigger events - - s.noRoom = false; // will be reset by makePaneFit if 'noRoom' - makePaneFit(pane); - - // transfer logic var to temp var - isShowing = s.isShowing; - // now clear the logic var - delete s.isShowing; - - doFX = !noAnimation && s.isClosed && (o.fxName_open != "none"); - s.isMoving = true; - s.isVisible = true; - s.isClosed = false; - // update isHidden BEFORE sizing panes - WHY??? Old? - if (isShowing) s.isHidden = false; - - if (doFX) { // ANIMATE - // mask adjacent panes with objects - lockPaneForFX(pane, true); // need to set left/top so animation will work - $P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() { - lockPaneForFX(pane, false); // undo - if (s.isVisible) open_2(); // continue - queueNext(); - }); - } - else { // no animation - _showPane(pane);// just show pane and... - open_2(); // continue - queueNext(); - }; - }); - - // SUBROUTINE - function open_2 () { - s.isMoving = false; - - // cure iframe display issues - _fixIframe(pane); - - // NOTE: if isSliding, then other panes are NOT 'resized' - if (!s.isSliding) { // resize all panes adjacent to this one - sizeMidPanes(_c[pane].dir=="vert" ? "center" : "", false); // false = NOT skipCallback - } - - // set classes, position handles and execute callbacks... - setAsOpen(pane); - }; - - } - - /** - * @param {string} pane The pane just opened, ie: north, south, east, or west - * @param {boolean=} [skipCallback=false] - */ -, setAsOpen = function (pane, skipCallback) { - var - $P = $Ps[pane] - , $R = $Rs[pane] - , $T = $Ts[pane] - , o = options[pane] - , s = state[pane] - , side = _c[pane].side - , rClass = o.resizerClass - , tClass = o.togglerClass - , _pane = "-"+ pane // used for classNames - , _open = "-open" - , _closed = "-closed" - , _sliding= "-sliding" - ; - $R - .css(side, sC.inset[side] + getPaneSize(pane)) // move the resizer - .removeClass( rClass+_closed +" "+ rClass+_pane+_closed ) - .addClass( rClass+_open +" "+ rClass+_pane+_open ) - ; - if (s.isSliding) - $R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding ) - else // in case 'was sliding' - $R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding ) - - removeHover( 0, $R ); // remove hover classes - if (o.resizable && $.layout.plugins.draggable) - $R .draggable("enable") - .css("cursor", o.resizerCursor) - .attr("title", o.tips.Resize); - else if (!s.isSliding) - $R.css("cursor", "default"); // n-resize, s-resize, etc - - // if pane also has a toggler button, adjust that too - if ($T) { - $T .removeClass( tClass+_closed +" "+ tClass+_pane+_closed ) - .addClass( tClass+_open +" "+ tClass+_pane+_open ) - .attr("title", o.tips.Close); // may be blank - removeHover( 0, $T ); // remove hover classes - // toggler-content - if exists - $T.children(".content-closed").hide(); - $T.children(".content-open").css("display","block"); - } - - // sync any 'pin buttons' - syncPinBtns(pane, !s.isSliding); - - // update pane-state dimensions - BEFORE resizing content - $.extend(s, elDims($P)); - - if (state.initialized) { - // resize resizer & toggler sizes for all panes - sizeHandles(); - // resize content every time pane opens - to be sure - sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving' - } - - if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) { - // onopen callback - _runCallbacks("onopen_end", pane); - // onshow callback - TODO: should this be here? - if (s.isShowing) _runCallbacks("onshow_end", pane); - - // ALSO call onresize because layout-size *may* have changed while pane was closed - if (state.initialized) - _runCallbacks("onresize_end", pane); - } - - // TODO: Somehow sizePane("north") is being called after this point??? - } - - - /** - * slideOpen / slideClose / slideToggle - * - * Pass-though methods for sliding - */ -, slideOpen = function (evt_or_pane) { - if (!isInitialized()) return; - var evt = evtObj(evt_or_pane) - , pane = evtPane.call(this, evt_or_pane) - , s = state[pane] - , delay = options[pane].slideDelay_open - ; - if (pane === "center") return; // validate - // prevent event from triggering on NEW resizer binding created below - if (evt) evt.stopImmediatePropagation(); - - if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0) - // trigger = mouseenter - use a delay - timer.set(pane+"_openSlider", open_NOW, delay); - else - open_NOW(); // will unbind events if is already open - - /** - * SUBROUTINE for timed open - */ - function open_NOW () { - if (!s.isClosed) // skip if no longer closed! - bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane - else if (!s.isMoving) - open(pane, true); // true = slide - open() will handle binding - }; - } - -, slideClose = function (evt_or_pane) { - if (!isInitialized()) return; - var evt = evtObj(evt_or_pane) - , pane = evtPane.call(this, evt_or_pane) - , o = options[pane] - , s = state[pane] - , delay = s.isMoving ? 1000 : 300 // MINIMUM delay - option may override - ; - if (pane === "center") return; // validate - if (s.isClosed || s.isResizing) - return; // skip if already closed OR in process of resizing - else if (o.slideTrigger_close === "click") - close_NOW(); // close immediately onClick - else if (o.preventQuickSlideClose && s.isMoving) - return; // handle Chrome quick-close on slide-open - else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane])) - return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE - else if (evt) // trigger = mouseleave - use a delay - // 1 sec delay if 'opening', else .3 sec - timer.set(pane+"_closeSlider", close_NOW, max(o.slideDelay_close, delay)); - else // called programically - close_NOW(); - - /** - * SUBROUTINE for timed close - */ - function close_NOW () { - if (s.isClosed) // skip 'close' if already closed! - bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here? - else if (!s.isMoving) - close(pane); // close will handle unbinding - }; - } - - /** - * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west - */ -, slideToggle = function (evt_or_pane) { - var pane = evtPane.call(this, evt_or_pane); - toggle(pane, true); - } - - - /** - * Must set left/top on East/South panes so animation will work properly - * - * @param {string} pane The pane to lock, 'east' or 'south' - any other is ignored! - * @param {boolean} doLock true = set left/top, false = remove - */ -, lockPaneForFX = function (pane, doLock) { - var $P = $Ps[pane] - , s = state[pane] - , o = options[pane] - , z = options.zIndexes - ; - if (doLock) { - showMasks( pane, { animation: true, objectsOnly: true }); - $P.css({ zIndex: z.pane_animate }); // overlay all elements during animation - if (pane=="south") - $P.css({ top: sC.inset.top + sC.innerHeight - $P.outerHeight() }); - else if (pane=="east") - $P.css({ left: sC.inset.left + sC.innerWidth - $P.outerWidth() }); - } - else { // animation DONE - RESET CSS - hideMasks(); - $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) }); - if (pane=="south") - $P.css({ top: "auto" }); - // if pane is positioned 'off-screen', then DO NOT screw with it! - else if (pane=="east" && !$P.css("left").match(/\-99999/)) - $P.css({ left: "auto" }); - // fix anti-aliasing in IE - only needed for animations that change opacity - if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opacity") == 1) - $P[0].style.removeAttribute('filter'); - } - } - - - /** - * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger - * - * @see open(), close() - * @param {string} pane The pane to enable/disable, 'north', 'south', etc. - * @param {boolean} enable Enable or Disable sliding? - */ -, bindStartSlidingEvents = function (pane, enable) { - var o = options[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - , evtName = o.slideTrigger_open.toLowerCase() - ; - if (!$R || (enable && !o.slidable)) return; - - // make sure we have a valid event - if (evtName.match(/mouseover/)) - evtName = o.slideTrigger_open = "mouseenter"; - else if (!evtName.match(/(click|dblclick|mouseenter)/)) - evtName = o.slideTrigger_open = "click"; - - // must remove double-click-toggle when using dblclick-slide - if (o.resizerDblClickToggle && evtName.match(/click/)) { - $R[enable ? "unbind" : "bind"]('dblclick.'+ sID, toggle) - } - - $R - // add or remove event - [enable ? "bind" : "unbind"](evtName +'.'+ sID, slideOpen) - // set the appropriate cursor & title/tip - .css("cursor", enable ? o.sliderCursor : "default") - .attr("title", enable ? o.tips.Slide : "") - ; - } - - /** - * Add or remove 'mouseleave' events to 'slide close' when pane is 'sliding' open or closed - * Also increases zIndex when pane is sliding open - * See bindStartSlidingEvents for code to control 'slide open' - * - * @see slideOpen(), slideClose() - * @param {string} pane The pane to process, 'north', 'south', etc. - * @param {boolean} enable Enable or Disable events? - */ -, bindStopSlidingEvents = function (pane, enable) { - var o = options[pane] - , s = state[pane] - , c = _c[pane] - , z = options.zIndexes - , evtName = o.slideTrigger_close.toLowerCase() - , action = (enable ? "bind" : "unbind") - , $P = $Ps[pane] - , $R = $Rs[pane] - ; - timer.clear(pane+"_closeSlider"); // just in case - - if (enable) { - s.isSliding = true; - state.panesSliding[pane] = true; - // remove 'slideOpen' event from resizer - // ALSO will raise the zIndex of the pane & resizer - bindStartSlidingEvents(pane, false); - } - else { - s.isSliding = false; - delete state.panesSliding[pane]; - } - - // RE/SET zIndex - increases when pane is sliding-open, resets to normal when not - $P.css("zIndex", enable ? z.pane_sliding : z.pane_normal); - $R.css("zIndex", enable ? z.pane_sliding+2 : z.resizer_normal); // NOTE: mask = pane_sliding+1 - - // make sure we have a valid event - if (!evtName.match(/(click|mouseleave)/)) - evtName = o.slideTrigger_close = "mouseleave"; // also catches 'mouseout' - - // add/remove slide triggers - $R[action](evtName, slideClose); // base event on resize - // need extra events for mouseleave - if (evtName === "mouseleave") { - // also close on pane.mouseleave - $P[action]("mouseleave."+ sID, slideClose); - // cancel timer when mouse moves between 'pane' and 'resizer' - $R[action]("mouseenter."+ sID, cancelMouseOut); - $P[action]("mouseenter."+ sID, cancelMouseOut); - } - - if (!enable) - timer.clear(pane+"_closeSlider"); - else if (evtName === "click" && !o.resizable) { - // IF pane is not resizable (which already has a cursor and tip) - // then set the a cursor & title/tip on resizer when sliding - $R.css("cursor", enable ? o.sliderCursor : "default"); - $R.attr("title", enable ? o.tips.Close : ""); // use Toggler-tip, eg: "Close Pane" - } - - // SUBROUTINE for mouseleave timer clearing - function cancelMouseOut (evt) { - timer.clear(pane+"_closeSlider"); - evt.stopPropagation(); - } - } - - - /** - * Hides/closes a pane if there is insufficient room - reverses this when there is room again - * MUST have already called setSizeLimits() before calling this method - * - * @param {string} pane The pane being resized - * @param {boolean=} [isOpening=false] Called from onOpen? - * @param {boolean=} [skipCallback=false] Should the onresize callback be run? - * @param {boolean=} [force=false] - */ -, makePaneFit = function (pane, isOpening, skipCallback, force) { - var o = options[pane] - , s = state[pane] - , c = _c[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - , isSidePane = c.dir==="vert" - , hasRoom = false - ; - // special handling for center & east/west panes - if (pane === "center" || (isSidePane && s.noVerticalRoom)) { - // see if there is enough room to display the pane - // ERROR: hasRoom = s.minHeight <= s.maxHeight && (isSidePane || s.minWidth <= s.maxWidth); - hasRoom = (s.maxHeight >= 0); - if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now - _showPane(pane); - if ($R) $R.show(); - s.isVisible = true; - s.noRoom = false; - if (isSidePane) s.noVerticalRoom = false; - _fixIframe(pane); - } - else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now - _hidePane(pane); - if ($R) $R.hide(); - s.isVisible = false; - s.noRoom = true; - } - } - - // see if there is enough room to fit the border-pane - if (pane === "center") { - // ignore center in this block - } - else if (s.minSize <= s.maxSize) { // pane CAN fit - hasRoom = true; - if (s.size > s.maxSize) // pane is too big - shrink it - sizePane(pane, s.maxSize, skipCallback, true, force); // true = noAnimation - else if (s.size < s.minSize) // pane is too small - enlarge it - sizePane(pane, s.minSize, skipCallback, true, force); // true = noAnimation - // need s.isVisible because new pseudoClose method keeps pane visible, but off-screen - else if ($R && s.isVisible && $P.is(":visible")) { - // make sure resizer-bar is positioned correctly - // handles situation where nested layout was 'hidden' when initialized - var pos = s.size + sC.inset[c.side]; - if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos ); - } - - // if was previously hidden due to noRoom, then RESET because NOW there is room - if (s.noRoom) { - // s.noRoom state will be set by open or show - if (s.wasOpen && o.closable) { - if (o.autoReopen) - open(pane, false, true, true); // true = noAnimation, true = noAlert - else // leave the pane closed, so just update state - s.noRoom = false; - } - else - show(pane, s.wasOpen, true, true); // true = noAnimation, true = noAlert - } - } - else { // !hasRoom - pane CANNOT fit - if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now... - s.noRoom = true; // update state - s.wasOpen = !s.isClosed && !s.isSliding; - if (s.isClosed){} // SKIP - else if (o.closable) // 'close' if possible - close(pane, true, true); // true = force, true = noAnimation - else // 'hide' pane if cannot just be closed - hide(pane, true); // true = noAnimation - } - } - } - - - /** - * manualSizePane is an exposed flow-through method allowing extra code when pane is 'manually resized' - * - * @param {(string|Object)} evt_or_pane The pane being resized - * @param {number} size The *desired* new size for this pane - will be validated - * @param {boolean=} [skipCallback=false] Should the onresize callback be run? - * @param {boolean=} [noAnimation=false] - * @param {boolean=} [force=false] Force resizing even if does not seem necessary - */ -, manualSizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , o = options[pane] - , s = state[pane] - // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete... - , forceResize = force || (o.livePaneResizing && !s.isResizing) - ; - if (pane === "center") return; // validate - // ANY call to manualSizePane disables autoResize - ie, percentage sizing - s.autoResize = false; - // flow-through... - sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option enabled - } - - /** - * sizePane is called only by internal methods whenever a pane needs to be resized - * - * @param {(string|Object)} evt_or_pane The pane being resized - * @param {number} size The *desired* new size for this pane - will be validated - * @param {boolean=} [skipCallback=false] Should the onresize callback be run? - * @param {boolean=} [noAnimation=false] - * @param {boolean=} [force=false] Force resizing even if does not seem necessary - */ -, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event? - , o = options[pane] - , s = state[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - , side = _c[pane].side - , dimName = _c[pane].sizeType.toLowerCase() - , skipResizeWhileDragging = s.isResizing && !o.triggerEventsDuringLiveResize - , doFX = noAnimation !== true && o.animatePaneSizing - , oldSize, newSize - ; - if (pane === "center") return; // validate - // QUEUE in case another action/animation is in progress - $N.queue(function( queueNext ){ - // calculate 'current' min/max sizes - setSizeLimits(pane); // update pane-state - oldSize = s.size; - size = _parseSize(pane, size); // handle percentages & auto - size = max(size, _parseSize(pane, o.minSize)); - size = min(size, s.maxSize); - if (size < s.minSize) { // not enough room for pane! - queueNext(); // call before makePaneFit() because it needs the queue free - makePaneFit(pane, false, skipCallback); // will hide or close pane - return; - } - - // IF newSize is same as oldSize, then nothing to do - abort - if (!force && size === oldSize) - return queueNext(); - - s.newSize = size; - - // onresize_start callback CANNOT cancel resizing because this would break the layout! - if (!skipCallback && state.initialized && s.isVisible) - _runCallbacks("onresize_start", pane); - - // resize the pane, and make sure its visible - newSize = cssSize(pane, size); - - if (doFX && $P.is(":visible")) { // ANIMATE - var fx = $.layout.effects.size[pane] || $.layout.effects.size.all - , easing = o.fxSettings_size.easing || fx.easing - , z = options.zIndexes - , props = {}; - props[ dimName ] = newSize +'px'; - s.isMoving = true; - // overlay all elements during animation - $P.css({ zIndex: z.pane_animate }) - .show().animate( props, o.fxSpeed_size, easing, function(){ - // reset zIndex after animation - $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) }); - s.isMoving = false; - delete s.newSize; - sizePane_2(); // continue - queueNext(); - }); - } - else { // no animation - $P.css( dimName, newSize ); // resize pane - delete s.newSize; - // if pane is visible, then - if ($P.is(":visible")) - sizePane_2(); // continue - else { - // pane is NOT VISIBLE, so just update state data... - // when pane is *next opened*, it will have the new size - s.size = size; // update state.size - //$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible! } - } - queueNext(); - }; - - }); - - // SUBROUTINE - function sizePane_2 () { - /* Panes are sometimes not sized precisely in some browsers!? - * This code will resize the pane up to 3 times to nudge the pane to the correct size - */ - var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight() - , tries = [{ - pane: pane - , count: 1 - , target: size - , actual: actual - , correct: (size === actual) - , attempt: size - , cssSize: newSize - }] - , lastTry = tries[0] - , thisTry = {} - , msg = 'Inaccurate size after resizing the '+ pane +'-pane.' - ; - while ( !lastTry.correct ) { - thisTry = { pane: pane, count: lastTry.count+1, target: size }; - - if (lastTry.actual > size) - thisTry.attempt = max(0, lastTry.attempt - (lastTry.actual - size)); - else // lastTry.actual < size - thisTry.attempt = max(0, lastTry.attempt + (size - lastTry.actual)); - - thisTry.cssSize = cssSize(pane, thisTry.attempt); - $P.css( dimName, thisTry.cssSize ); - - thisTry.actual = dimName=='width' ? $P.outerWidth() : $P.outerHeight(); - thisTry.correct = (size === thisTry.actual); - - // log attempts and alert the user of this *non-fatal error* (if showDebugMessages) - if ( tries.length === 1) { - _log(msg, false, true); - _log(lastTry, false, true); - } - _log(thisTry, false, true); - // after 4 tries, is as close as its gonna get! - if (tries.length > 3) break; - - tries.push( thisTry ); - lastTry = tries[ tries.length - 1 ]; - } - // END TESTING CODE - - // update pane-state dimensions - s.size = size; - $.extend(s, elDims($P)); - - if (s.isVisible && $P.is(":visible")) { - // reposition the resizer-bar - if ($R) $R.css( side, size + sC.inset[side] ); - // resize the content-div - sizeContent(pane); - } - - if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible) - _runCallbacks("onresize_end", pane); - - // resize all the adjacent panes, and adjust their toggler buttons - // when skipCallback passed, it means the controlling method will handle 'other panes' - if (!skipCallback) { - // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize - if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, force); - sizeHandles(); - } - - // if opposite-pane was autoClosed, see if it can be autoOpened now - var altPane = _c.oppositeEdge[pane]; - if (size < oldSize && state[ altPane ].noRoom) { - setSizeLimits( altPane ); - makePaneFit( altPane, false, skipCallback ); - } - - // DEBUG - ALERT user/developer so they know there was a sizing problem - if (tries.length > 1) - _log(msg +'\nSee the Error Console for details.', true, true); - } - } - - /** - * @see initPanes(), sizePane(), resizeAll(), open(), close(), hide() - * @param {(Array.|string)} panes The pane(s) being resized, comma-delmited string - * @param {boolean=} [skipCallback=false] Should the onresize callback be run? - * @param {boolean=} [force=false] - */ -, sizeMidPanes = function (panes, skipCallback, force) { - panes = (panes ? panes : "east,west,center").split(","); - - $.each(panes, function (i, pane) { - if (!$Ps[pane]) return; // NO PANE - skip - var - o = options[pane] - , s = state[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - , isCenter= (pane=="center") - , hasRoom = true - , CSS = {} - // if pane is not visible, show it invisibly NOW rather than for *each call* in this script - , visCSS = $.layout.showInvisibly($P) - - , newCenter = calcNewCenterPaneDims() - ; - - // update pane-state dimensions - $.extend(s, elDims($P)); - - if (pane === "center") { - if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeight) { - $P.css(visCSS); - return true; // SKIP - pane already the correct size - } - // set state for makePaneFit() logic - $.extend(s, cssMinDims(pane), { - maxWidth: newCenter.width - , maxHeight: newCenter.height - }); - CSS = newCenter; - s.newWidth = CSS.width; - s.newHeight = CSS.height; - // convert OUTER width/height to CSS width/height - CSS.width = cssW($P, CSS.width); - // NEW - allow pane to extend 'below' visible area rather than hide it - CSS.height = cssH($P, CSS.height); - hasRoom = CSS.width >= 0 && CSS.height >= 0; // height >= 0 = ALWAYS TRUE NOW - - // during layout init, try to shrink east/west panes to make room for center - if (!state.initialized && o.minWidth > newCenter.width) { - var - reqPx = o.minWidth - s.outerWidth - , minE = options.east.minSize || 0 - , minW = options.west.minSize || 0 - , sizeE = state.east.size - , sizeW = state.west.size - , newE = sizeE - , newW = sizeW - ; - if (reqPx > 0 && state.east.isVisible && sizeE > minE) { - newE = max( sizeE-minE, sizeE-reqPx ); - reqPx -= sizeE-newE; - } - if (reqPx > 0 && state.west.isVisible && sizeW > minW) { - newW = max( sizeW-minW, sizeW-reqPx ); - reqPx -= sizeW-newW; - } - // IF we found enough extra space, then resize the border panes as calculated - if (reqPx === 0) { - if (sizeE && sizeE != minE) - sizePane('east', newE, true, true, force); // true = skipCallback/noAnimation - initPanes will handle when done - if (sizeW && sizeW != minW) - sizePane('west', newW, true, true, force); // true = skipCallback/noAnimation - // now start over! - sizeMidPanes('center', skipCallback, force); - $P.css(visCSS); - return; // abort this loop - } - } - } - else { // for east and west, set only the height, which is same as center height - // set state.min/maxWidth/Height for makePaneFit() logic - if (s.isVisible && !s.noVerticalRoom) - $.extend(s, elDims($P), cssMinDims(pane)) - if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) { - $P.css(visCSS); - return true; // SKIP - pane already the correct size - } - // east/west have same top, bottom & height as center - CSS.top = newCenter.top; - CSS.bottom = newCenter.bottom; - s.newSize = newCenter.height - // NEW - allow pane to extend 'below' visible area rather than hide it - CSS.height = cssH($P, newCenter.height); - s.maxHeight = CSS.height; - hasRoom = (s.maxHeight >= 0); // ALWAYS TRUE NOW - if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic - } - - if (hasRoom) { - // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized - if (!skipCallback && state.initialized) - _runCallbacks("onresize_start", pane); - - $P.css(CSS); // apply the CSS to pane - if (pane !== "center") - sizeHandles(pane); // also update resizer length - if (s.noRoom && !s.isClosed && !s.isHidden) - makePaneFit(pane); // will re-open/show auto-closed/hidden pane - if (s.isVisible) { - $.extend(s, elDims($P)); // update pane dimensions - if (state.initialized) sizeContent(pane); // also resize the contents, if exists - } - } - else if (!s.noRoom && s.isVisible) // no room for pane - makePaneFit(pane); // will hide or close pane - - // reset visibility, if necessary - $P.css(visCSS); - - delete s.newSize; - delete s.newWidth; - delete s.newHeight; - - if (!s.isVisible) - return true; // DONE - next pane - - /* - * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes - * Normally these panes have only 'left' & 'right' positions so pane auto-sizes - * ALSO required when pane is an IFRAME because will NOT default to 'full width' - * TODO: Can I use width:100% for a north/south iframe? - * TODO: Sounds like a job for $P.outerWidth( sC.innerWidth ) SETTER METHOD - */ - if (pane === "center") { // finished processing midPanes - var fix = browser.isIE6 || !browser.boxModel; - if ($Ps.north && (fix || state.north.tagName=="IFRAME")) - $Ps.north.css("width", cssW($Ps.north, sC.innerWidth)); - if ($Ps.south && (fix || state.south.tagName=="IFRAME")) - $Ps.south.css("width", cssW($Ps.south, sC.innerWidth)); - } - - // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized - if (!skipCallback && state.initialized) - _runCallbacks("onresize_end", pane); - }); - } - - - /** - * @see window.onresize(), callbacks or custom code - * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning - */ -, resizeAll = function (evt_or_refresh) { - var oldW = sC.innerWidth - , oldH = sC.innerHeight - ; - // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility - evtPane(evt_or_refresh); - - // cannot size layout when 'container' is hidden or collapsed - if (!$N.is(":visible")) return; - - if (!state.initialized) { - _initLayoutElements(); - return; // no need to resize since we just initialized! - } - - if (evt_or_refresh === true && $.isPlainObject(options.outset)) { - // update container CSS in case outset option has changed - $N.css( options.outset ); - } - // UPDATE container dimensions - $.extend(sC, elDims( $N, options.inset )); - if (!sC.outerHeight) return; - - // if 'true' passed, refresh pane & handle positioning too - if (evt_or_refresh === true) { - setPanePosition(); - } - - // onresizeall_start will CANCEL resizing if returns false - // state.container has already been set, so user can access this info for calcuations - if (false === _runCallbacks("onresizeall_start")) return false; - - var // see if container is now 'smaller' than before - shrunkH = (sC.innerHeight < oldH) - , shrunkW = (sC.innerWidth < oldW) - , $P, o, s - ; - // NOTE special order for sizing: S-N-E-W - $.each(["south","north","east","west"], function (i, pane) { - if (!$Ps[pane]) return; // no pane - SKIP - o = options[pane]; - s = state[pane]; - if (s.autoResize && s.size != o.size) // resize pane to original size set in options - sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize - else { - setSizeLimits(pane); - makePaneFit(pane, false, true, true); // true=skipCallback/forceResize - } - }); - - sizeMidPanes("", true, true); // true=skipCallback/forceResize - sizeHandles(); // reposition the toggler elements - - // trigger all individual pane callbacks AFTER layout has finished resizing - $.each(_c.allPanes, function (i, pane) { - $P = $Ps[pane]; - if (!$P) return; // SKIP - if (state[pane].isVisible) // undefined for non-existent panes - _runCallbacks("onresize_end", pane); // callback - if exists - }); - - _runCallbacks("onresizeall_end"); - //_triggerLayoutEvent(pane, 'resizeall'); - } - - /** - * Whenever a pane resizes or opens that has a nested layout, trigger resizeAll - * - * @param {(string|Object)} evt_or_pane The pane just resized or opened - */ -, resizeChildren = function (evt_or_pane, skipRefresh) { - var pane = evtPane.call(this, evt_or_pane); - - if (!options[pane].resizeChildren) return; - - // ensure the pane-children are up-to-date - if (!skipRefresh) refreshChildren( pane ); - var pC = children[pane]; - if ($.isPlainObject( pC )) { - // resize one or more children - $.each( pC, function (key, child) { - if (!child.destroyed) child.resizeAll(); - }); - } - } - - /** - * IF pane has a content-div, then resize all elements inside pane to fit pane-height - * - * @param {(string|Object)} evt_or_panes The pane(s) being resized - * @param {boolean=} [remeasure=false] Should the content (header/footer) be remeasured? - */ -, sizeContent = function (evt_or_panes, remeasure) { - if (!isInitialized()) return; - - var panes = evtPane.call(this, evt_or_panes); - panes = panes ? panes.split(",") : _c.allPanes; - - $.each(panes, function (idx, pane) { - var - $P = $Ps[pane] - , $C = $Cs[pane] - , o = options[pane] - , s = state[pane] - , m = s.content // m = measurements - ; - if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip - - // if content-element was REMOVED, update OR remove the pointer - if (!$C.length) { - initContent(pane, false); // false = do NOT sizeContent() - already there! - if (!$C) return; // no replacement element found - pointer have been removed - } - - // onsizecontent_start will CANCEL resizing if returns false - if (false === _runCallbacks("onsizecontent_start", pane)) return; - - // skip re-measuring offsets if live-resizing - if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) { - _measure(); - // if any footers are below pane-bottom, they may not measure correctly, - // so allow pane overflow and re-measure - if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") { - $P.css("overflow", "visible"); - _measure(); // remeasure while overflowing - $P.css("overflow", "hidden"); - } - } - // NOTE: spaceAbove/Below *includes* the pane paddingTop/Bottom, but not pane.borders - var newH = s.innerHeight - (m.spaceAbove - s.css.paddingTop) - (m.spaceBelow - s.css.paddingBottom); - - if (!$C.is(":visible") || m.height != newH) { - // size the Content element to fit new pane-size - will autoHide if not enough room - setOuterHeight($C, newH, true); // true=autoHide - m.height = newH; // save new height - }; - - if (state.initialized) - _runCallbacks("onsizecontent_end", pane); - - function _below ($E) { - return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0)); - }; - - function _measure () { - var - ignore = options[pane].contentIgnoreSelector - , $Fs = $C.nextAll().not(".ui-layout-mask").not(ignore || ":lt(0)") // not :lt(0) = ALL - , $Fs_vis = $Fs.filter(':visible') - , $F = $Fs_vis.filter(':last') - ; - m = { - top: $C[0].offsetTop - , height: $C.outerHeight() - , numFooters: $Fs.length - , hiddenFooters: $Fs.length - $Fs_vis.length - , spaceBelow: 0 // correct if no content footer ($E) - } - m.spaceAbove = m.top; // just for state - not used in calc - m.bottom = m.top + m.height; - if ($F.length) - //spaceBelow = (LastFooter.top + LastFooter.height) [footerBottom] - Content.bottom + max(LastFooter.marginBottom, pane.paddingBotom) - m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F); - else // no footer - check marginBottom on Content element itself - m.spaceBelow = _below($C); - }; - }); - } - - - /** - * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary - * - * @see initHandles(), open(), close(), resizeAll() - * @param {(string|Object)=} evt_or_panes The pane(s) being resized - */ -, sizeHandles = function (evt_or_panes) { - var panes = evtPane.call(this, evt_or_panes) - panes = panes ? panes.split(",") : _c.borderPanes; - - $.each(panes, function (i, pane) { - var - o = options[pane] - , s = state[pane] - , $P = $Ps[pane] - , $R = $Rs[pane] - , $T = $Ts[pane] - , $TC - ; - if (!$P || !$R) return; - - var - dir = _c[pane].dir - , _state = (s.isClosed ? "_closed" : "_open") - , spacing = o["spacing"+ _state] - , togAlign = o["togglerAlign"+ _state] - , togLen = o["togglerLength"+ _state] - , paneLen - , left - , offset - , CSS = {} - ; - - if (spacing === 0) { - $R.hide(); - return; - } - else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason - $R.show(); // in case was previously hidden - - // Resizer Bar is ALWAYS same width/height of pane it is attached to - if (dir === "horz") { // north/south - //paneLen = $P.outerWidth(); // s.outerWidth || - paneLen = sC.innerWidth; // handle offscreen-panes - s.resizerLength = paneLen; - left = $.layout.cssNum($P, "left") - $R.css({ - width: cssW($R, paneLen) // account for borders & padding - , height: cssH($R, spacing) // ditto - , left: left > -9999 ? left : sC.inset.left // handle offscreen-panes - }); - } - else { // east/west - paneLen = $P.outerHeight(); // s.outerHeight || - s.resizerLength = paneLen; - $R.css({ - height: cssH($R, paneLen) // account for borders & padding - , width: cssW($R, spacing) // ditto - , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane? - //, top: $.layout.cssNum($Ps["center"], "top") - }); - } - - // remove hover classes - removeHover( o, $R ); - - if ($T) { - if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) { - $T.hide(); // always HIDE the toggler when 'sliding' - return; - } - else - $T.show(); // in case was previously hidden - - if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) { - togLen = paneLen; - offset = 0; - } - else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed - if (isStr(togAlign)) { - switch (togAlign) { - case "top": - case "left": offset = 0; - break; - case "bottom": - case "right": offset = paneLen - togLen; - break; - case "middle": - case "center": - default: offset = round((paneLen - togLen) / 2); // 'default' catches typos - } - } - else { // togAlign = number - var x = parseInt(togAlign, 10); // - if (togAlign >= 0) offset = x; - else offset = paneLen - togLen + x; // NOTE: x is negative! - } - } - - if (dir === "horz") { // north/south - var width = cssW($T, togLen); - $T.css({ - width: width // account for borders & padding - , height: cssH($T, spacing) // ditto - , left: offset // TODO: VERIFY that toggler positions correctly for ALL values - , top: 0 - }); - // CENTER the toggler content SPAN - $T.children(".content").each(function(){ - $TC = $(this); - $TC.css("marginLeft", round((width-$TC.outerWidth())/2)); // could be negative - }); - } - else { // east/west - var height = cssH($T, togLen); - $T.css({ - height: height // account for borders & padding - , width: cssW($T, spacing) // ditto - , top: offset // POSITION the toggler - , left: 0 - }); - // CENTER the toggler content SPAN - $T.children(".content").each(function(){ - $TC = $(this); - $TC.css("marginTop", round((height-$TC.outerHeight())/2)); // could be negative - }); - } - - // remove ALL hover classes - removeHover( 0, $T ); - } - - // DONE measuring and sizing this resizer/toggler, so can be 'hidden' now - if (!state.initialized && (o.initHidden || s.isHidden)) { - $R.hide(); - if ($T) $T.hide(); - } - }); - } - - - /** - * @param {(string|Object)} evt_or_pane - */ -, enableClosable = function (evt_or_pane) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $T = $Ts[pane] - , o = options[pane] - ; - if (!$T) return; - o.closable = true; - $T .bind("click."+ sID, function(evt){ evt.stopPropagation(); toggle(pane); }) - .css("visibility", "visible") - .css("cursor", "pointer") - .attr("title", state[pane].isClosed ? o.tips.Open : o.tips.Close) // may be blank - .show(); - } - /** - * @param {(string|Object)} evt_or_pane - * @param {boolean=} [hide=false] - */ -, disableClosable = function (evt_or_pane, hide) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $T = $Ts[pane] - ; - if (!$T) return; - options[pane].closable = false; - // is closable is disable, then pane MUST be open! - if (state[pane].isClosed) open(pane, false, true); - $T .unbind("."+ sID) - .css("visibility", hide ? "hidden" : "visible") // instead of hide(), which creates logic issues - .css("cursor", "default") - .attr("title", ""); - } - - - /** - * @param {(string|Object)} evt_or_pane - */ -, enableSlidable = function (evt_or_pane) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $R = $Rs[pane] - ; - if (!$R || !$R.data('draggable')) return; - options[pane].slidable = true; - if (state[pane].isClosed) - bindStartSlidingEvents(pane, true); - } - /** - * @param {(string|Object)} evt_or_pane - */ -, disableSlidable = function (evt_or_pane) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $R = $Rs[pane] - ; - if (!$R) return; - options[pane].slidable = false; - if (state[pane].isSliding) - close(pane, false, true); - else { - bindStartSlidingEvents(pane, false); - $R .css("cursor", "default") - .attr("title", ""); - removeHover(null, $R[0]); // in case currently hovered - } - } - - - /** - * @param {(string|Object)} evt_or_pane - */ -, enableResizable = function (evt_or_pane) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $R = $Rs[pane] - , o = options[pane] - ; - if (!$R || !$R.data('draggable')) return; - o.resizable = true; - $R.draggable("enable"); - if (!state[pane].isClosed) - $R .css("cursor", o.resizerCursor) - .attr("title", o.tips.Resize); - } - /** - * @param {(string|Object)} evt_or_pane - */ -, disableResizable = function (evt_or_pane) { - if (!isInitialized()) return; - var pane = evtPane.call(this, evt_or_pane) - , $R = $Rs[pane] - ; - if (!$R || !$R.data('draggable')) return; - options[pane].resizable = false; - $R .draggable("disable") - .css("cursor", "default") - .attr("title", ""); - removeHover(null, $R[0]); // in case currently hovered - } - - - /** - * Move a pane from source-side (eg, west) to target-side (eg, east) - * If pane exists on target-side, move that to source-side, ie, 'swap' the panes - * - * @param {(string|Object)} evt_or_pane1 The pane/edge being swapped - * @param {string} pane2 ditto - */ -, swapPanes = function (evt_or_pane1, pane2) { - if (!isInitialized()) return; - var pane1 = evtPane.call(this, evt_or_pane1); - // change state.edge NOW so callbacks can know where pane is headed... - state[pane1].edge = pane2; - state[pane2].edge = pane1; - // run these even if NOT state.initialized - if (false === _runCallbacks("onswap_start", pane1) - || false === _runCallbacks("onswap_start", pane2) - ) { - state[pane1].edge = pane1; // reset - state[pane2].edge = pane2; - return; - } - - var - oPane1 = copy( pane1 ) - , oPane2 = copy( pane2 ) - , sizes = {} - ; - sizes[pane1] = oPane1 ? oPane1.state.size : 0; - sizes[pane2] = oPane2 ? oPane2.state.size : 0; - - // clear pointers & state - $Ps[pane1] = false; - $Ps[pane2] = false; - state[pane1] = {}; - state[pane2] = {}; - - // ALWAYS remove the resizer & toggler elements - if ($Ts[pane1]) $Ts[pane1].remove(); - if ($Ts[pane2]) $Ts[pane2].remove(); - if ($Rs[pane1]) $Rs[pane1].remove(); - if ($Rs[pane2]) $Rs[pane2].remove(); - $Rs[pane1] = $Rs[pane2] = $Ts[pane1] = $Ts[pane2] = false; - - // transfer element pointers and data to NEW Layout keys - move( oPane1, pane2 ); - move( oPane2, pane1 ); - - // cleanup objects - oPane1 = oPane2 = sizes = null; - - // make panes 'visible' again - if ($Ps[pane1]) $Ps[pane1].css(_c.visible); - if ($Ps[pane2]) $Ps[pane2].css(_c.visible); - - // fix any size discrepancies caused by swap - resizeAll(); - - // run these even if NOT state.initialized - _runCallbacks("onswap_end", pane1); - _runCallbacks("onswap_end", pane2); - - return; - - function copy (n) { // n = pane - var - $P = $Ps[n] - , $C = $Cs[n] - ; - return !$P ? false : { - pane: n - , P: $P ? $P[0] : false - , C: $C ? $C[0] : false - , state: $.extend(true, {}, state[n]) - , options: $.extend(true, {}, options[n]) - } - }; - - function move (oPane, pane) { - if (!oPane) return; - var - P = oPane.P - , C = oPane.C - , oldPane = oPane.pane - , c = _c[pane] - // save pane-options that should be retained - , s = $.extend(true, {}, state[pane]) - , o = options[pane] - // RETAIN side-specific FX Settings - more below - , fx = { resizerCursor: o.resizerCursor } - , re, size, pos - ; - $.each("fxName,fxSpeed,fxSettings".split(","), function (i, k) { - fx[k +"_open"] = o[k +"_open"]; - fx[k +"_close"] = o[k +"_close"]; - fx[k +"_size"] = o[k +"_size"]; - }); - - // update object pointers and attributes - $Ps[pane] = $(P) - .data({ - layoutPane: Instance[pane] // NEW pointer to pane-alias-object - , layoutEdge: pane - }) - .css(_c.hidden) - .css(c.cssReq) - ; - $Cs[pane] = C ? $(C) : false; - - // set options and state - options[pane] = $.extend(true, {}, oPane.options, fx); - state[pane] = $.extend(true, {}, oPane.state); - - // change classNames on the pane, eg: ui-layout-pane-east ==> ui-layout-pane-west - re = new RegExp(o.paneClass +"-"+ oldPane, "g"); - P.className = P.className.replace(re, o.paneClass +"-"+ pane); - - // ALWAYS regenerate the resizer & toggler elements - initHandles(pane); // create the required resizer & toggler - - // if moving to different orientation, then keep 'target' pane size - if (c.dir != _c[oldPane].dir) { - size = sizes[pane] || 0; - setSizeLimits(pane); // update pane-state - size = max(size, state[pane].minSize); - // use manualSizePane to disable autoResize - not useful after panes are swapped - manualSizePane(pane, size, true, true); // true/true = skipCallback/noAnimation - } - else // move the resizer here - $Rs[pane].css(c.side, sC.inset[c.side] + (state[pane].isVisible ? getPaneSize(pane) : 0)); - - - // ADD CLASSNAMES & SLIDE-BINDINGS - if (oPane.state.isVisible && !s.isVisible) - setAsOpen(pane, true); // true = skipCallback - else { - setAsClosed(pane); - bindStartSlidingEvents(pane, true); // will enable events IF option is set - } - - // DESTROY the object - oPane = null; - }; - } - - - /** - * INTERNAL method to sync pin-buttons when pane is opened or closed - * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes - * - * @see open(), setAsOpen(), setAsClosed() - * @param {string} pane These are the params returned to callbacks by layout() - * @param {boolean} doPin True means set the pin 'down', False means 'up' - */ -, syncPinBtns = function (pane, doPin) { - if ($.layout.plugins.buttons) - $.each(state[pane].pins, function (i, selector) { - $.layout.buttons.setPinState(Instance, $(selector), pane, doPin); - }); - } - -; // END var DECLARATIONS - - /** - * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed - * - * @see document.keydown() - */ - function keyDown (evt) { - if (!evt) return true; - var code = evt.keyCode; - if (code < 33) return true; // ignore special keys: ENTER, TAB, etc - - var - PANE = { - 38: "north" // Up Cursor - $.ui.keyCode.UP - , 40: "south" // Down Cursor - $.ui.keyCode.DOWN - , 37: "west" // Left Cursor - $.ui.keyCode.LEFT - , 39: "east" // Right Cursor - $.ui.keyCode.RIGHT - } - , ALT = evt.altKey // no worky! - , SHIFT = evt.shiftKey - , CTRL = evt.ctrlKey - , CURSOR = (CTRL && code >= 37 && code <= 40) - , o, k, m, pane - ; - - if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey - pane = PANE[code]; - else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey - $.each(_c.borderPanes, function (i, p) { // loop each pane to check its hotkey - o = options[p]; - k = o.customHotkey; - m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT" - if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches - if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches - pane = p; - return false; // BREAK - } - } - }); - - // validate pane - if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden) - return true; - - toggle(pane); - - evt.stopPropagation(); - evt.returnValue = false; // CANCEL key - return false; - }; - - -/* - * ###################################### - * UTILITY METHODS - * called externally or by initButtons - * ###################################### - */ - - /** - * Change/reset a pane overflow setting & zIndex to allow popups/drop-downs to work - * - * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event - */ - function allowOverflow (el) { - if (!isInitialized()) return; - if (this && this.tagName) el = this; // BOUND to element - var $P; - if (isStr(el)) - $P = $Ps[el]; - else if ($(el).data("layoutRole")) - $P = $(el); - else - $(el).parents().each(function(){ - if ($(this).data("layoutRole")) { - $P = $(this); - return false; // BREAK - } - }); - if (!$P || !$P.length) return; // INVALID - - var - pane = $P.data("layoutEdge") - , s = state[pane] - ; - - // if pane is already raised, then reset it before doing it again! - // this would happen if allowOverflow is attached to BOTH the pane and an element - if (s.cssSaved) - resetOverflow(pane); // reset previous CSS before continuing - - // if pane is raised by sliding or resizing, or its closed, then abort - if (s.isSliding || s.isResizing || s.isClosed) { - s.cssSaved = false; - return; - } - - var - newCSS = { zIndex: (options.zIndexes.resizer_normal + 1) } - , curCSS = {} - , of = $P.css("overflow") - , ofX = $P.css("overflowX") - , ofY = $P.css("overflowY") - ; - // determine which, if any, overflow settings need to be changed - if (of != "visible") { - curCSS.overflow = of; - newCSS.overflow = "visible"; - } - if (ofX && !ofX.match(/(visible|auto)/)) { - curCSS.overflowX = ofX; - newCSS.overflowX = "visible"; - } - if (ofY && !ofY.match(/(visible|auto)/)) { - curCSS.overflowY = ofX; - newCSS.overflowY = "visible"; - } - - // save the current overflow settings - even if blank! - s.cssSaved = curCSS; - - // apply new CSS to raise zIndex and, if necessary, make overflow 'visible' - $P.css( newCSS ); - - // make sure the zIndex of all other panes is normal - $.each(_c.allPanes, function(i, p) { - if (p != pane) resetOverflow(p); - }); - - }; - /** - * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event - */ - function resetOverflow (el) { - if (!isInitialized()) return; - if (this && this.tagName) el = this; // BOUND to element - var $P; - if (isStr(el)) - $P = $Ps[el]; - else if ($(el).data("layoutRole")) - $P = $(el); - else - $(el).parents().each(function(){ - if ($(this).data("layoutRole")) { - $P = $(this); - return false; // BREAK - } - }); - if (!$P || !$P.length) return; // INVALID - - var - pane = $P.data("layoutEdge") - , s = state[pane] - , CSS = s.cssSaved || {} - ; - // reset the zIndex - if (!s.isSliding && !s.isResizing) - $P.css("zIndex", options.zIndexes.pane_normal); - - // reset Overflow - if necessary - $P.css( CSS ); - - // clear var - s.cssSaved = false; - }; - -/* - * ##################### - * CREATE/RETURN LAYOUT - * ##################### - */ - - // validate that container exists - var $N = $(this).eq(0); // FIRST matching Container element - if (!$N.length) { - return _log( options.errors.containerMissing ); - }; - - // Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout") - // return the Instance-pointer if layout has already been initialized - if ($N.data("layoutContainer") && $N.data("layout")) - return $N.data("layout"); // cached pointer - - // init global vars - var - $Ps = {} // Panes x5 - set in initPanes() - , $Cs = {} // Content x5 - set in initPanes() - , $Rs = {} // Resizers x4 - set in initHandles() - , $Ts = {} // Togglers x4 - set in initHandles() - , $Ms = $([]) // Masks - up to 2 masks per pane (IFRAME + DIV) - // aliases for code brevity - , sC = state.container // alias for easy access to 'container dimensions' - , sID = state.id // alias for unique layout ID/namespace - eg: "layout435" - ; - - // create Instance object to expose data & option Properties, and primary action Methods - var Instance = { - // layout data - options: options // property - options hash - , state: state // property - dimensions hash - // object pointers - , container: $N // property - object pointers for layout container - , panes: $Ps // property - object pointers for ALL Panes: panes.north, panes.center - , contents: $Cs // property - object pointers for ALL Content: contents.north, contents.center - , resizers: $Rs // property - object pointers for ALL Resizers, eg: resizers.north - , togglers: $Ts // property - object pointers for ALL Togglers, eg: togglers.north - // border-pane open/close - , hide: hide // method - ditto - , show: show // method - ditto - , toggle: toggle // method - pass a 'pane' ("north", "west", etc) - , open: open // method - ditto - , close: close // method - ditto - , slideOpen: slideOpen // method - ditto - , slideClose: slideClose // method - ditto - , slideToggle: slideToggle // method - ditto - // pane actions - , setSizeLimits: setSizeLimits // method - pass a 'pane' - update state min/max data - , _sizePane: sizePane // method -intended for user by plugins only! - , sizePane: manualSizePane // method - pass a 'pane' AND an 'outer-size' in pixels or percent, or 'auto' - , sizeContent: sizeContent // method - pass a 'pane' - , swapPanes: swapPanes // method - pass TWO 'panes' - will swap them - , showMasks: showMasks // method - pass a 'pane' OR list of panes - default = all panes with mask option set - , hideMasks: hideMasks // method - ditto' - // pane element methods - , initContent: initContent // method - ditto - , addPane: addPane // method - pass a 'pane' - , removePane: removePane // method - pass a 'pane' to remove from layout, add 'true' to delete the pane-elem - , createChildren: createChildren // method - pass a 'pane' and (optional) layout-options (OVERRIDES options[pane].children - , refreshChildren: refreshChildren // method - pass a 'pane' and a layout-instance - // special pane option setting - , enableClosable: enableClosable // method - pass a 'pane' - , disableClosable: disableClosable // method - ditto - , enableSlidable: enableSlidable // method - ditto - , disableSlidable: disableSlidable // method - ditto - , enableResizable: enableResizable // method - ditto - , disableResizable: disableResizable// method - ditto - // utility methods for panes - , allowOverflow: allowOverflow // utility - pass calling element (this) - , resetOverflow: resetOverflow // utility - ditto - // layout control - , destroy: destroy // method - no parameters - , initPanes: isInitialized // method - no parameters - , resizeAll: resizeAll // method - no parameters - // callback triggering - , runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("onopen", "west") - // alias collections of options, state and children - created in addPane and extended elsewhere - , hasParentLayout: false // set by initContainer() - , children: children // pointers to child-layouts, eg: Instance.children.west.layoutName - , north: false // alias group: { name: pane, pane: $Ps[pane], options: options[pane], state: state[pane], children: children[pane] } - , south: false // ditto - , west: false // ditto - , east: false // ditto - , center: false // ditto - }; - - // create the border layout NOW - if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation - return null; - else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init later - return Instance; // return the Instance object - -} - - -})( jQuery ); - - - - -/** - * jquery.layout.state 1.2 - * $Date: 2015/03/13 22:37:04 $ - * - * Copyright (c) 2014 - * Kevin Dalman (http://allpro.net) - * - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. - * - * @requires: UI Layout 1.4.0 or higher - * @requires: $.ui.cookie (above) - * - * @see: http://groups.google.com/group/jquery-ui-layout - */ -;(function ($) { - -if (!$.layout) return; - - -/** - * UI COOKIE UTILITY - * - * A $.cookie OR $.ui.cookie namespace *should be standard*, but until then... - * This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin - * NOTE: This utility is REQUIRED by the layout.state plugin - * - * Cookie methods in Layout are created as part of State Management - */ -if (!$.ui) $.ui = {}; -$.ui.cookie = { - - // cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6 - acceptsCookies: !!navigator.cookieEnabled - -, read: function (name) { - var - c = document.cookie - , cs = c ? c.split(';') : [] - , pair, data, i - ; - for (i=0; pair=cs[i]; i++) { - data = $.trim(pair).split('='); // name=value => [ name, value ] - if (data[0] == name) // found the layout cookie - return decodeURIComponent(data[1]); - } - return null; - } - -, write: function (name, val, cookieOpts) { - var params = "" - , date = "" - , clear = false - , o = cookieOpts || {} - , x = o.expires || null - , t = $.type(x) - ; - if (t === "date") - date = x; - else if (t === "string" && x > 0) { - x = parseInt(x,10); - t = "number"; - } - if (t === "number") { - date = new Date(); - if (x > 0) - date.setDate(date.getDate() + x); - else { - date.setFullYear(1970); - clear = true; - } - } - if (date) params += ";expires="+ date.toUTCString(); - if (o.path) params += ";path="+ o.path; - if (o.domain) params += ";domain="+ o.domain; - if (o.secure) params += ";secure"; - document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie - } - -, clear: function (name) { - $.ui.cookie.write(name, "", {expires: -1}); - } - -}; -// if cookie.jquery.js is not loaded, create an alias to replicate it -// this may be useful to other plugins or code dependent on that plugin -if (!$.cookie) $.cookie = function (k, v, o) { - var C = $.ui.cookie; - if (v === null) - C.clear(k); - else if (v === undefined) - return C.read(k); - else - C.write(k, v, o); -}; - - - -/** - * State-management options stored in options.stateManagement, which includes a .cookie hash - * Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden - * - * // STATE/COOKIE OPTIONS - * @example $(el).layout({ - stateManagement: { - enabled: true - , stateKeys: "east.size,west.size,east.isClosed,west.isClosed" - , cookie: { name: "appLayout", path: "/" } - } - }) - * @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies - * @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } }) - * @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" }) - * - * // STATE/COOKIE METHODS - * @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} ); - * @example myLayout.loadCookie(); - * @example myLayout.deleteCookie(); - * @example var JSON = myLayout.readState(); // CURRENT Layout State - * @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie) - * @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash) - * - * CUSTOM STATE-MANAGEMENT (eg, saved in a database) - * @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" ); - * @example myLayout.loadState( JSON ); - */ - -// tell Layout that the state plugin is available -$.layout.plugins.stateManagement = true; - -// Add State-Management options to layout.defaults -$.layout.defaults.stateManagement = { - enabled: false // true = enable state-management, even if not using cookies -, autoSave: true // Save a state-cookie when page exits? -, autoLoad: true // Load the state-cookie when Layout inits? -, animateLoad: true // animate panes when loading state into an active layout -, includeChildren: true // recurse into child layouts to include their state as well - // List state-data to save - must be pane-specific -, stateKeys: "north.size,south.size,east.size,west.size,"+ - "north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+ - "north.isHidden,south.isHidden,east.isHidden,west.isHidden" -, cookie: { - name: "" // If not specified, will use Layout.name, else just "Layout" - , domain: "" // blank = current domain - , path: "" // blank = current page, "/" = entire website - , expires: "" // 'days' to keep cookie - leave blank for 'session cookie' - , secure: false - } -}; - -// Set stateManagement as a 'layout-option', NOT a 'pane-option' -$.layout.optionsMap.layout.push("stateManagement"); -// Update config so layout does not move options into the pane-default branch (panes) -$.layout.config.optionRootKeys.push("stateManagement"); - -/* - * State Management methods - */ -$.layout.state = { - - /** - * Get the current layout state and save it to a cookie - * - * myLayout.saveCookie( keys, cookieOpts ) - * - * @param {Object} inst - * @param {(string|Array)=} keys - * @param {Object=} cookieOpts - */ - saveCookie: function (inst, keys, cookieOpts) { - var o = inst.options - , sm = o.stateManagement - , oC = $.extend(true, {}, sm.cookie, cookieOpts || null) - , data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state - ; - $.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC ); - return $.extend(true, {}, data); // return COPY of state.stateData data - } - - /** - * Remove the state cookie - * - * @param {Object} inst - */ -, deleteCookie: function (inst) { - var o = inst.options; - $.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" ); - } - - /** - * Read & return data from the cookie - as JSON - * - * @param {Object} inst - */ -, readCookie: function (inst) { - var o = inst.options; - var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" ); - // convert cookie string back to a hash and return it - return c ? $.layout.state.decodeJSON(c) : {}; - } - - /** - * Get data from the cookie and USE IT to loadState - * - * @param {Object} inst - */ -, loadCookie: function (inst) { - var c = $.layout.state.readCookie(inst); // READ the cookie - if (c && !$.isEmptyObject( c )) { - inst.state.stateData = $.extend(true, {}, c); // SET state.stateData - inst.loadState(c); // LOAD the retrieved state - } - return c; - } - - /** - * Update layout options from the cookie, if one exists - * - * @param {Object} inst - * @param {Object=} stateData - * @param {boolean=} animate - */ -, loadState: function (inst, data, opts) { - if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return; - - // normalize data & cache in the state object - data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey - - // add missing/default state-restore options - var smo = inst.options.stateManagement; - opts = $.extend({ - animateLoad: false //smo.animateLoad - , includeChildren: smo.includeChildren - }, opts ); - - if (!inst.state.initialized) { - /* - * layout NOT initialized, so just update its options - */ - // MUST remove pane.children keys before applying to options - // use a copy so we don't remove keys from original data - var o = $.extend(true, {}, data); - //delete o.center; // center has no state-data - only children - $.each($.layout.config.allPanes, function (idx, pane) { - if (o[pane]) delete o[pane].children; - }); - // update CURRENT layout-options with saved state data - $.extend(true, inst.options, o); - } - else { - /* - * layout already initialized, so modify layout's configuration - */ - var noAnimate = !opts.animateLoad - , o, c, h, state, open - ; - $.each($.layout.config.borderPanes, function (idx, pane) { - o = data[ pane ]; - if (!$.isPlainObject( o )) return; // no key, skip pane - - s = o.size; - c = o.initClosed; - h = o.initHidden; - ar = o.autoResize - state = inst.state[pane]; - open = state.isVisible; - - // reset autoResize - if (ar) - state.autoResize = ar; - // resize BEFORE opening - if (!open) - inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize - // open/close as necessary - DO NOT CHANGE THIS ORDER! - if (h === true) inst.hide(pane, noAnimate); - else if (c === true) inst.close(pane, false, noAnimate); - else if (c === false) inst.open (pane, false, noAnimate); - else if (h === false) inst.show (pane, false, noAnimate); - // resize AFTER any other actions - if (open) - inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed - }); - - /* - * RECURSE INTO CHILD-LAYOUTS - */ - if (opts.includeChildren) { - var paneStateChildren, childState; - $.each(inst.children, function (pane, paneChildren) { - paneStateChildren = data[pane] ? data[pane].children : 0; - if (paneStateChildren && paneChildren) { - $.each(paneChildren, function (stateKey, child) { - childState = paneStateChildren[stateKey]; - if (child && childState) - child.loadState( childState ); - }); - } - }); - } - } - } - - /** - * Get the *current layout state* and return it as a hash - * - * @param {Object=} inst // Layout instance to get state for - * @param {object=} [opts] // State-Managements override options - */ -, readState: function (inst, opts) { - // backward compatility - if ($.type(opts) === 'string') opts = { keys: opts }; - if (!opts) opts = {}; - var sm = inst.options.stateManagement - , ic = opts.includeChildren - , recurse = ic !== undefined ? ic : sm.includeChildren - , keys = opts.stateKeys || sm.stateKeys - , alt = { isClosed: 'initClosed', isHidden: 'initHidden' } - , state = inst.state - , panes = $.layout.config.allPanes - , data = {} - , pair, pane, key, val - , ps, pC, child, array, count, branch - ; - if ($.isArray(keys)) keys = keys.join(","); - // convert keys to an array and change delimiters from '__' to '.' - keys = keys.replace(/__/g, ".").split(','); - // loop keys and create a data hash - for (var i=0, n=keys.length; i < n; i++) { - pair = keys[i].split("."); - pane = pair[0]; - key = pair[1]; - if ($.inArray(pane, panes) < 0) continue; // bad pane! - val = state[ pane ][ key ]; - if (val == undefined) continue; - if (key=="isClosed" && state[pane]["isSliding"]) - val = true; // if sliding, then *really* isClosed - ( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val; - } - - // recurse into the child-layouts for each pane - if (recurse) { - $.each(panes, function (idx, pane) { - pC = inst.children[pane]; - ps = state.stateData[pane]; - if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) { - // ensure a key exists for this 'pane', eg: branch = data.center - branch = data[pane] || (data[pane] = {}); - if (!branch.children) branch.children = {}; - $.each( pC, function (key, child) { - // ONLY read state from an initialize layout - if ( child.state.initialized ) - branch.children[ key ] = $.layout.state.readState( child ); - // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT! - else if ( ps && ps.children && ps.children[ key ] ) { - branch.children[ key ] = $.extend(true, {}, ps.children[ key ] ); - } - }); - } - }); - } - - return data; - } - - /** - * Stringify a JSON hash so can save in a cookie or db-field - */ -, encodeJSON: function (json) { - var local = window.JSON || {}; - return (local.stringify || stringify)(json); - - function stringify (h) { - var D=[], i=0, k, v, t // k = key, v = value - , a = $.isArray(h) - ; - for (k in h) { - v = h[k]; - t = typeof v; - if (t == 'string') // STRING - add quotes - v = '"'+ v +'"'; - else if (t == 'object') // SUB-KEY - recurse into it - v = parse(v); - D[i++] = (!a ? '"'+ k +'":' : '') + v; - } - return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}'); - }; - } - - /** - * Convert stringified JSON back to a hash object - * @see $.parseJSON(), adding in jQuery 1.4.1 - */ -, decodeJSON: function (str) { - try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; } - catch (e) { return {}; } - } - - -, _create: function (inst) { - var s = $.layout.state - , o = inst.options - , sm = o.stateManagement - ; - // ADD State-Management plugin methods to inst - $.extend( inst, { - // readCookie - update options from cookie - returns hash of cookie data - readCookie: function () { return s.readCookie(inst); } - // deleteCookie - , deleteCookie: function () { s.deleteCookie(inst); } - // saveCookie - optionally pass keys-list and cookie-options (hash) - , saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); } - // loadCookie - readCookie and use to loadState() - returns hash of cookie data - , loadCookie: function () { return s.loadCookie(inst); } - // loadState - pass a hash of state to use to update options - , loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); } - // readState - returns hash of current layout-state - , readState: function (keys) { return s.readState(inst, keys); } - // add JSON utility methods too... - , encodeJSON: s.encodeJSON - , decodeJSON: s.decodeJSON - }); - - // init state.stateData key, even if plugin is initially disabled - inst.state.stateData = {}; - - // autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE - if ( !sm.autoLoad ) return; - - // When state-data exists in the autoLoad key USE IT, - // even if stateManagement.enabled == false - if ($.isPlainObject( sm.autoLoad )) { - if (!$.isEmptyObject( sm.autoLoad )) { - inst.loadState( sm.autoLoad ); - } - } - else if ( sm.enabled ) { - // update the options from cookie or callback - // if options is a function, call it to get stateData - if ($.isFunction( sm.autoLoad )) { - var d = {}; - try { - d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn - } catch (e) {} - if (d && $.isPlainObject( d ) && !$.isEmptyObject( d )) - inst.loadState(d); - } - else // any other truthy value will trigger loadCookie - inst.loadCookie(); - } - } - -, _unload: function (inst) { - var sm = inst.options.stateManagement; - if (sm.enabled && sm.autoSave) { - // if options is a function, call it to save the stateData - if ($.isFunction( sm.autoSave )) { - try { - sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn - } catch (e) {} - } - else // any truthy value will trigger saveCookie - inst.saveCookie(); - } - } - -}; - -// add state initialization method to Layout's onCreate array of functions -$.layout.onCreate.push( $.layout.state._create ); -$.layout.onUnload.push( $.layout.state._unload ); - -})( jQuery ); - - - -/** - * @preserve jquery.layout.buttons 1.0 - * $Date: 2015/03/13 22:37:04 $ - * - * Copyright (c) 2011 - * Kevin Dalman (http://allpro.net) - * - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. - * - * @dependancies: UI Layout 1.3.0.rc30.1 or higher - * - * @support: http://groups.google.com/group/jquery-ui-layout - * - * Docs: [ to come ] - * Tips: [ to come ] - */ -;(function ($) { - -if (!$.layout) return; - - -// tell Layout that the state plugin is available -$.layout.plugins.buttons = true; - -// Add State-Management options to layout.defaults -$.layout.defaults.autoBindCustomButtons = false; -// Set stateManagement as a layout-option, NOT a pane-option -$.layout.optionsMap.layout.push("autoBindCustomButtons"); - -var lang = $.layout.language; - -/* - * Button methods - */ -$.layout.buttons = { - // set data used by multiple methods below - config: { - borderPanes: "north,south,west,east" - } - - /** - * Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons - * - * @see _create() - */ -, init: function (inst) { - var pre = "ui-layout-button-" - , layout = inst.options.name || "" - , name; - $.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) { - $.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) { - $("."+pre+action+"-"+pane).each(function(){ - // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name' - name = $(this).data("layoutName") || $(this).attr("layoutName"); - if (name == undefined || name === layout) - inst.bindButton(this, action, pane); - }); - }); - }); - } - - /** - * Helper function to validate params received by addButton utilities - * - * Two classes are added to the element, based on the buttonClass... - * The type of button is appended to create the 2nd className: - * - ui-layout-button-pin - * - ui-layout-pane-button-toggle - * - ui-layout-pane-button-open - * - ui-layout-pane-button-close - * - * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button" - * @param {string} pane Name of the pane the button is for: 'north', 'south', etc. - * @return {Array.} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null - */ -, get: function (inst, selector, pane, action) { - var $E = $(selector) - , o = inst.options - , err = o.showErrorMessages - ; - if (!$E.length) { // element not found - if (err) alert(lang.errButton + lang.selector +": "+ selector); - } - else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified - if (err) alert(lang.errButton + lang.pane +": "+ pane); - $E = $(""); // NO BUTTON - } - else { // VALID - var btn = o[pane].buttonClass +"-"+ action; - $E .addClass( btn +" "+ btn +"-"+ pane ) - .data("layoutName", o.name); // add layout identifier - even if blank! - } - return $E; - } - - - /** - * NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc. - * - * @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button" - * @param {string} action - * @param {string} pane - */ -, bind: function (inst, sel, action, pane) { - var _ = $.layout.buttons; - switch (action.toLowerCase()) { - case "toggle": _.addToggle (inst, sel, pane); break; - case "open": _.addOpen (inst, sel, pane); break; - case "close": _.addClose (inst, sel, pane); break; - case "pin": _.addPin (inst, sel, pane); break; - case "toggle-slide": _.addToggle (inst, sel, pane, true); break; - case "open-slide": _.addOpen (inst, sel, pane, true); break; - } - return inst; - } - - /** - * Add a custom Toggler button for a pane - * - * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button" - * @param {string} pane Name of the pane the button is for: 'north', 'south', etc. - * @param {boolean=} slide true = slide-open, false = pin-open - */ -, addToggle: function (inst, selector, pane, slide) { - $.layout.buttons.get(inst, selector, pane, "toggle") - .click(function(evt){ - inst.toggle(pane, !!slide); - evt.stopPropagation(); - }); - return inst; - } - - /** - * Add a custom Open button for a pane - * - * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button" - * @param {string} pane Name of the pane the button is for: 'north', 'south', etc. - * @param {boolean=} slide true = slide-open, false = pin-open - */ -, addOpen: function (inst, selector, pane, slide) { - $.layout.buttons.get(inst, selector, pane, "open") - .attr("title", lang.Open) - .click(function (evt) { - inst.open(pane, !!slide); - evt.stopPropagation(); - }); - return inst; - } - - /** - * Add a custom Close button for a pane - * - * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button" - * @param {string} pane Name of the pane the button is for: 'north', 'south', etc. - */ -, addClose: function (inst, selector, pane) { - $.layout.buttons.get(inst, selector, pane, "close") - .attr("title", lang.Close) - .click(function (evt) { - inst.close(pane); - evt.stopPropagation(); - }); - return inst; - } - - /** - * Add a custom Pin button for a pane - * - * Four classes are added to the element, based on the paneClass for the associated pane... - * Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin: - * - ui-layout-pane-pin - * - ui-layout-pane-west-pin - * - ui-layout-pane-pin-up - * - ui-layout-pane-west-pin-up - * - * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button" - * @param {string} pane Name of the pane the pin is for: 'north', 'south', etc. - */ -, addPin: function (inst, selector, pane) { - var $E = $.layout.buttons.get(inst, selector, pane, "pin"); - if ($E.length) { - var s = inst.state[pane]; - $E.click(function (evt) { - $.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed)); - if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open - else inst.close( pane ); // slide-closed - evt.stopPropagation(); - }); - // add up/down pin attributes and classes - $.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding)); - // add this pin to the pane data so we can 'sync it' automatically - // PANE.pins key is an array so we can store multiple pins for each pane - s.pins.push( selector ); // just save the selector string - } - return inst; - } - - /** - * Change the class of the pin button to make it look 'up' or 'down' - * - * @see addPin(), syncPins() - * @param {Array.} $Pin The pin-span element in a jQuery wrapper - * @param {string} pane These are the params returned to callbacks by layout() - * @param {boolean} doPin true = set the pin 'down', false = set it 'up' - */ -, setPinState: function (inst, $Pin, pane, doPin) { - var updown = $Pin.attr("pin"); - if (updown && doPin === (updown=="down")) return; // already in correct state - var - pin = inst.options[pane].buttonClass +"-pin" - , side = pin +"-"+ pane - , UP = pin +"-up "+ side +"-up" - , DN = pin +"-down "+side +"-down" - ; - $Pin - .attr("pin", doPin ? "down" : "up") // logic - .attr("title", doPin ? lang.Unpin : lang.Pin) - .removeClass( doPin ? UP : DN ) - .addClass( doPin ? DN : UP ) - ; - } - - /** - * INTERNAL function to sync 'pin buttons' when pane is opened or closed - * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes - * - * @see open(), close() - * @param {string} pane These are the params returned to callbacks by layout() - * @param {boolean} doPin True means set the pin 'down', False means 'up' - */ -, syncPinBtns: function (inst, pane, doPin) { - // REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE - $.each(state[pane].pins, function (i, selector) { - $.layout.buttons.setPinState(inst, $(selector), pane, doPin); - }); - } - - -, _load: function (inst) { - // ADD Button methods to Layout Instance - $.extend( inst, { - bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); } - // DEPRECATED METHODS... - , addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); } - , addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); } - , addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); } - , addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); } - }); - - // init state array to hold pin-buttons - for (var i=0; i<4; i++) { - var pane = $.layout.buttons.config.borderPanes[i]; - inst.state[pane].pins = []; - } - - // auto-init buttons onLoad if option is enabled - if ( inst.options.autoBindCustomButtons ) - $.layout.buttons.init(inst); - } - -, _unload: function (inst) { - // TODO: unbind all buttons??? - } - -}; - -// add initialization method to Layout's onLoad array of functions -$.layout.onLoad.push( $.layout.buttons._load ); -//$.layout.onUnload.push( $.layout.buttons._unload ); - -})( jQuery ); - - - - -/** - * jquery.layout.browserZoom 1.0 - * $Date: 2015/03/13 22:37:04 $ - * - * Copyright (c) 2012 - * Kevin Dalman (http://allpro.net) - * - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. - * - * @requires: UI Layout 1.3.0.rc30.1 or higher - * - * @see: http://groups.google.com/group/jquery-ui-layout - * - * TODO: Extend logic to handle other problematic zooming in browsers - * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event - */ -(function ($) { - -// tell Layout that the plugin is available -$.layout.plugins.browserZoom = true; - -$.layout.defaults.browserZoomCheckInterval = 1000; -$.layout.optionsMap.layout.push("browserZoomCheckInterval"); - -/* - * browserZoom methods - */ -$.layout.browserZoom = { - - _init: function (inst) { - // abort if browser does not need this check - if ($.layout.browserZoom.ratio() !== false) - $.layout.browserZoom._setTimer(inst); - } - -, _setTimer: function (inst) { - // abort if layout destroyed or browser does not need this check - if (inst.destroyed) return; - var o = inst.options - , s = inst.state - // don't need check if inst has parentLayout, but check occassionally in case parent destroyed! - // MINIMUM 100ms interval, for performance - , ms = inst.hasParentLayout ? 5000 : Math.max( o.browserZoomCheckInterval, 100 ) - ; - // set the timer - setTimeout(function(){ - if (inst.destroyed || !o.resizeWithWindow) return; - var d = $.layout.browserZoom.ratio(); - if (d !== s.browserZoom) { - s.browserZoom = d; - inst.resizeAll(); - } - // set a NEW timeout - $.layout.browserZoom._setTimer(inst); - } - , ms ); - } - -, ratio: function () { - var w = window - , s = screen - , d = document - , dE = d.documentElement || d.body - , b = $.layout.browser - , v = b.version - , r, sW, cW - ; - // we can ignore all browsers that fire window.resize event onZoom - if (!b.msie || v > 8) - return false; // don't need to track zoom - if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack - return calc(s.deviceXDPI, s.systemXDPI); - // everything below is just for future reference! - if (b.webkit && (r = d.body.getBoundingClientRect)) - return calc((r.left - r.right), d.body.offsetWidth); - if (b.webkit && (sW = w.outerWidth)) - return calc(sW, w.innerWidth); - if ((sW = s.width) && (cW = dE.clientWidth)) - return calc(sW, cW); - return false; // no match, so cannot - or don't need to - track zoom - - function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); } - } - -}; -// add initialization method to Layout's onLoad array of functions -$.layout.onReady.push( $.layout.browserZoom._init ); - - -})( jQuery ); - - - - -/** - * UI Layout Plugin: Slide-Offscreen Animation - * - * Prevent panes from being 'hidden' so that an iframes/objects - * does not reload/refresh when pane 'opens' again. - * This plug-in adds a new animation called "slideOffscreen". - * It is identical to the normal "slide" effect, but avoids hiding the element - * - * Requires Layout 1.3.0.RC30.1 or later for Close offscreen - * Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen - * - * Version: 1.1 - 2012-11-18 - * Author: Kevin Dalman (kevin@jquery-dev.com) - * @preserve jquery.layout.slideOffscreen-1.1.js - */ -;(function ($) { - -// Add a new "slideOffscreen" effect -if ($.effects) { - - // add an option so initClosed and initHidden will work - $.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed - /* set the new animation as the default for all panes - $.layout.defaults.panes.fxName = "slideOffscreen"; - */ - - if ($.layout.plugins) - $.layout.plugins.effects.slideOffscreen = true; - - // dupe 'slide' effect defaults as new effect defaults - $.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide); - - // add new effect to jQuery UI - $.effects.slideOffscreen = function(o) { - return this.queue(function(){ - - var fx = $.effects - , opt = o.options - , $el = $(this) - , pane = $el.data('layoutEdge') - , state = $el.data('parentLayout').state - , dist = state[pane].size - , s = this.style - , props = ['top','bottom','left','right'] - // Set options - , mode = fx.setMode($el, opt.mode || 'show') // Set Mode - , show = (mode == 'show') - , dir = opt.direction || 'left' // Default Direction - , ref = (dir == 'up' || dir == 'down') ? 'top' : 'left' - , pos = (dir == 'up' || dir == 'left') - , offscrn = $.layout.config.offscreenCSS || {} - , keyLR = $.layout.config.offscreenReset - , keyTB = 'offscreenResetTop' // only used internally - , animation = {} - ; - // Animation settings - animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist; - - if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden' - $el.data(keyTB, { top: s.top, bottom: s.bottom }); - - // set the top or left offset in preparation for animation - // Note: ALL animations work by shifting the top or left edges - if (pos) { // top (north) or left (west) - $el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge - } - else { // bottom (south) or right (east) - shift all the way across container - if (dir === 'right') - $el.css({ left: state.container.layoutWidth, right: 'auto' }); - else // dir === bottom - $el.css({ top: state.container.layoutHeight, bottom: 'auto' }); - } - // restore the left/right setting if is a top/bottom animation - if (ref === 'top') - $el.css( $el.data( keyLR ) || {} ); - } - else { // hide() animation, so save ALL CSS - $el.data(keyTB, { top: s.top, bottom: s.bottom }); - $el.data(keyLR, { left: s.left, right: s.right }); - } - - // Animate - $el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){ - // Restore top/bottom - if ($el.data( keyTB )) - $el.css($el.data( keyTB )).removeData( keyTB ); - if (show) // Restore left/right too - $el.css($el.data( keyLR ) || {}).removeData( keyLR ); - else // Move the pane off-screen (left: -99999, right: 'auto') - $el.css( offscrn ); - - if (o.callback) o.callback.apply(this, arguments); // Callback - $el.dequeue(); - }}); - - }); - }; - -} - -})( jQuery ); \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/modalService.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/modalService.js deleted file mode 100644 index 74c848e8..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/modalService.js +++ /dev/null @@ -1,185 +0,0 @@ -angular.module("modalServices",[]).service('modalService', ['$modal', function ($modal) { - - - this.showSuccess = function(heading, messageBody){ - var modalInstance = $modal.open({ - templateUrl: 'modal_informative.html', - controller: 'modalpopupController', - resolve: { - message: function () { - $(".overlayed").css("display","none"); - $(".loadingId").css("display","none"); - var message = { - title: heading, - text: messageBody - }; - return message; - } - } - }); - }; - this.showFailure = function(heading, messageBody){ - var modalInstance = $modal.open({ - templateUrl: 'modal_warning.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: heading, - text: messageBody - }; - return message; - } - } - }); - }; - - this.showMessage = function(heading, messageBody){ - var modalInstance = $modal.open({ - templateUrl: 'modal_message.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: heading, - text: messageBody - }; - return message; - } - } - }); - }; - - this.showWarning = function(heading, messageBody){ - var modalInstance = $modal.open({ - templateUrl: 'modal_warning_message.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: heading, - text: messageBody - }; - return message; - } - } - }); - }; - - this.popupConfirmWin = function(title, msgBody, callback){ - var modalInstance = $modal.open({ - templateUrl: 'confirmation_informative.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: title, - text: msgBody - }; - return message; - } - } - }); - var args = Array.prototype.slice.call( arguments, 0 ); - args.splice( 0, 3); - modalInstance.result.then(function(){ - callback.apply(null, args); - }, function() { - })['finally'](function(){ - modalInstance = undefined; - }); - - }; - this.popupConfirmWinWithCancel = function(title, msgBody, callback,dismissCallback){ - var modalInstance = $modal.open({ - templateUrl: 'confirmation_informative.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: title, - text: msgBody - }; - return message; - } - } - }); - var args = Array.prototype.slice.call( arguments, 0 ); - args.splice( 0, 3); - modalInstance.result.then(function(){ - callback.apply(null, args); - }, function() { - dismissCallback(); - })['finally'](function(){ - modalInstance = undefined; - }); - - }; - this.popupDeleteConfirmWin = function(title, msgBody, callback, argForCallBack){ - var modalInstance = $modal.open({ - templateUrl: 'confirmation_for_delete.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: title, - text: msgBody - }; - return message; - } - } - }); - - modalInstance.result.then(function(){ - callback(argForCallBack); - }, function() { - })['finally'](function(){ - modalInstance = undefined; - }); - - }; - - this.popupSuccessRedirectWin = function(title, msgBody, redirectUrl){ - var modalInstance = $modal.open({ - templateUrl: 'modal_informative.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: title, - text: msgBody - }; - return message; - } - } - }); - modalInstance.result.then(function() { - }, function() { - window.location.href=redirectUrl; - })['finally'](function(){ - modalInstance = undefined; - }); - }; - - this.popupWarningRedirectWin = function(title, msgBody, redirectUrl){ - var modalInstance = $modal.open({ - templateUrl: 'modal_warning_message.html', - controller: 'modalpopupController', - resolve: { - message: function () { - var message = { - title: title, - text: msgBody - }; - return message; - } - } - }); - modalInstance.result.then(function() { - }, function() { - window.location.href=redirectUrl; - })['finally'](function(){ - modalInstance = undefined; - }); - }; - }]); \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/moment.min.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/moment.min.js deleted file mode 100644 index 62b1697b..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/moment.min.js +++ /dev/null @@ -1,6 +0,0 @@ -// moment.js -// version : 2.1.0 -// author : Tim Wood -// license : MIT -// momentjs.com -!function(t){function e(t,e){return function(n){return u(t.call(this,n),e)}}function n(t,e){return function(n){return this.lang().ordinal(t.call(this,n),e)}}function s(){}function i(t){a(this,t)}function r(t){var e=t.years||t.year||t.y||0,n=t.months||t.month||t.M||0,s=t.weeks||t.week||t.w||0,i=t.days||t.day||t.d||0,r=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,o=t.seconds||t.second||t.s||0,u=t.milliseconds||t.millisecond||t.ms||0;this._input=t,this._milliseconds=u+1e3*o+6e4*a+36e5*r,this._days=i+7*s,this._months=n+12*e,this._data={},this._bubble()}function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function o(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";n.lengthn;n++)~~t[n]!==~~e[n]&&r++;return r+i}function f(t){return t?ie[t]||t.toLowerCase().replace(/(.)s$/,"$1"):t}function l(t,e){return e.abbr=t,x[t]||(x[t]=new s),x[t].set(e),x[t]}function _(t){if(!t)return H.fn._lang;if(!x[t]&&A)try{require("./lang/"+t)}catch(e){return H.fn._lang}return x[t]}function m(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,s=t.match(E);for(e=0,n=s.length;n>e;e++)s[e]=ue[s[e]]?ue[s[e]]:m(s[e]);return function(i){var r="";for(e=0;n>e;e++)r+=s[e]instanceof Function?s[e].call(i,t):s[e];return r}}function M(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var s=5;s--&&N.test(e);)e=e.replace(N,n);return re[e]||(re[e]=y(e)),re[e](t)}function g(t,e){switch(t){case"DDDD":return V;case"YYYY":return X;case"YYYYY":return $;case"S":case"SS":case"SSS":case"DDD":return I;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return R;case"a":case"A":return _(e._l)._meridiemParse;case"X":return B;case"Z":case"ZZ":return j;case"T":return q;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return J;default:return new RegExp(t.replace("\\",""))}}function p(t){var e=(j.exec(t)||[])[0],n=(e+"").match(ee)||["-",0,0],s=+(60*n[1])+~~n[2];return"+"===n[0]?-s:s}function D(t,e,n){var s,i=n._a;switch(t){case"M":case"MM":i[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":s=_(n._l).monthsParse(e),null!=s?i[1]=s:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(i[2]=~~e);break;case"YY":i[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~e;break;case"a":case"A":n._isPm=_(n._l).isPM(e);break;case"H":case"HH":case"h":case"hh":i[3]=~~e;break;case"m":case"mm":i[4]=~~e;break;case"s":case"ss":i[5]=~~e;break;case"S":case"SS":case"SSS":i[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=p(e)}null==e&&(n._isValid=!1)}function Y(t){var e,n,s=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];s[3]+=~~((t._tzm||0)/60),s[4]+=~~((t._tzm||0)%60),n=new Date(0),t._useUTC?(n.setUTCFullYear(s[0],s[1],s[2]),n.setUTCHours(s[3],s[4],s[5],s[6])):(n.setFullYear(s[0],s[1],s[2]),n.setHours(s[3],s[4],s[5],s[6])),t._d=n}}function w(t){var e,n,s=t._f.match(E),i=t._i;for(t._a=[],e=0;eo&&(u=o,s=n);a(t,s)}function v(t){var e,n=t._i,s=K.exec(n);if(s){for(t._f="YYYY-MM-DD"+(s[2]||" "),e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}j.exec(n)&&(t._f+=" Z"),w(t)}else t._d=new Date(n)}function T(e){var n=e._i,s=G.exec(n);n===t?e._d=new Date:s?e._d=new Date(+s[1]):"string"==typeof n?v(e):d(n)?(e._a=n.slice(0),Y(e)):e._d=n instanceof Date?new Date(+n):new Date(n)}function b(t,e,n,s,i){return i.relativeTime(e||1,!!n,t,s)}function S(t,e,n){var s=W(Math.abs(t)/1e3),i=W(s/60),r=W(i/60),a=W(r/24),o=W(a/365),u=45>s&&["s",s]||1===i&&["m"]||45>i&&["mm",i]||1===r&&["h"]||22>r&&["hh",r]||1===a&&["d"]||25>=a&&["dd",a]||45>=a&&["M"]||345>a&&["MM",W(a/30)]||1===o&&["y"]||["yy",o];return u[2]=e,u[3]=t>0,u[4]=n,b.apply({},u)}function F(t,e,n){var s,i=n-e,r=n-t.day();return r>i&&(r-=7),i-7>r&&(r+=7),s=H(t).add("d",r),{week:Math.ceil(s.dayOfYear()/7),year:s.year()}}function O(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=_().preparse(e)),H.isMoment(e)?(t=a({},e),t._d=new Date(+e._d)):n?d(n)?k(t):w(t):T(t),new i(t))}function z(t,e){H.fn[t]=H.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),H.updateOffset(this),this):this._d["get"+n+e]()}}function C(t){H.duration.fn[t]=function(){return this._data[t]}}function L(t,e){H.duration.fn["as"+t]=function(){return+this/e}}for(var H,P,U="2.1.0",W=Math.round,x={},A="undefined"!=typeof module&&module.exports,G=/^\/?Date\((\-?\d+)/i,Z=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,E=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,J=/\d\d?/,I=/\d{1,3}/,V=/\d{3}/,X=/\d{1,4}/,$=/[+\-]?\d{1,6}/,R=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j=/Z|[\+\-]\d\d:?\d\d/i,q=/T/i,B=/[\+\-]?\d+(\.\d{1,3})?/,K=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,Q="YYYY-MM-DDTHH:mm:ssZ",te=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ee=/([\+\-]|\d\d)/gi,ne="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),se={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ie={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},re={},ae="DDD w W M D d".split(" "),oe="M D H h m s w W".split(" "),ue={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},gg:function(){return u(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return u(this.weekYear(),5)},GG:function(){return u(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return u(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ae.length;)P=ae.pop(),ue[P+"o"]=n(ue[P],P);for(;oe.length;)P=oe.pop(),ue[P+P]=e(ue[P],2);for(ue.DDDD=e(ue.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,s;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=H([2e3,e]),s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(s.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,s;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=H([2e3,1]).day(e),s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(s.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,s){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,s):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return F(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},H=function(t,e,n){return O({_i:t,_f:e,_l:n,_isUTC:!1})},H.utc=function(t,e,n){return O({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},H.unix=function(t){return H(1e3*t)},H.duration=function(t,e){var n,s,i=H.isDuration(t),a="number"==typeof t,o=i?t._input:a?{}:t,u=Z.exec(t);return a?e?o[e]=t:o.milliseconds=t:u&&(n="-"===u[1]?-1:1,o={y:0,d:~~u[2]*n,h:~~u[3]*n,m:~~u[4]*n,s:~~u[5]*n,ms:~~u[6]*n}),s=new r(o),i&&t.hasOwnProperty("_lang")&&(s._lang=t._lang),s},H.version=U,H.defaultFormat=Q,H.updateOffset=function(){},H.lang=function(t,e){return t?(e?l(t,e):x[t]||_(t),H.duration.fn._lang=H.fn._lang=_(t),void 0):H.fn._lang._abbr},H.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),_(t)},H.isMoment=function(t){return t instanceof i},H.isDuration=function(t){return t instanceof r},H.fn=i.prototype={clone:function(){return H(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return M(H(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!c(this._a,(this._isUTC?H.utc(this._a):H(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(t){var e=M(this,t||H.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,-1),this},diff:function(t,e,n){var s,i,r=this._isUTC?H(t).zone(this._offset||0):H(t).local(),a=6e4*(this.zone()-r.zone());return e=f(e),"year"===e||"month"===e?(s=432e5*(this.daysInMonth()+r.daysInMonth()),i=12*(this.year()-r.year())+(this.month()-r.month()),i+=(this-H(this).startOf("month")-(r-H(r).startOf("month")))/s,i-=6e4*(this.zone()-H(this).startOf("month").zone()-(r.zone()-H(r).startOf("month").zone()))/s,"year"===e&&(i/=12)):(s=this-r,i="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-a)/864e5:"week"===e?(s-a)/6048e5:s),n?i:o(i)},from:function(t,e){return H.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(H(),t)},calendar:function(){var t=this.diff(H().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()+H(t).startOf(e)},isBefore:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)<+H(t).startOf(e)},isSame:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)===+H(t).startOf(e)},min:function(t){return t=H.apply(null,arguments),this>t?this:t},max:function(t){return t=H.apply(null,arguments),t>this?this:t},zone:function(t){var e=this._offset||0;return null==t?this._isUTC?e:this._d.getTimezoneOffset():("string"==typeof t&&(t=p(t)),Math.abs(t)<16&&(t=60*t),this._offset=t,this._isUTC=!0,e!==t&&h(this,H.duration(e-t,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return H.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=W((H(this).startOf("day")-H(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},weekYear:function(t){var e=F(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==t?e:this.add("y",t-e)},isoWeekYear:function(t){var e=F(this,1,4).year;return null==t?e:this.add("y",t-e)},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},isoWeek:function(t){var e=F(this,1,4).week;return null==t?e:this.add("d",7*(t-e))},weekday:function(t){var e=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==t?e:this.add("d",t-e)},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},lang:function(e){return e===t?this._lang:(this._lang=_(e),this)}},P=0;PERROR: ' + evt.data); -} - -function writeToScreen(message) { - var pre = document.createElement("p"); - pre.style.wordWrap = "break-word"; - pre.innerHTML = message; - output.append(pre); -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js deleted file mode 100644 index 8449ecfc..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js +++ /dev/null @@ -1,95 +0,0 @@ -function loadjscssfile(filename, filetype){ - if (filetype=="js"){ //if filename is a external JavaScript file - var done = false; - var script = document.createElement('script'); - script.src = filename; - script.async = false; - document.head.appendChild(script); - }else if (filetype=="css"){ //if filename is an external CSS file - var fileref=document.createElement("link") - fileref.setAttribute("rel", "stylesheet") - fileref.setAttribute("type", "text/css") - fileref.setAttribute("async", false) - fileref.setAttribute("href", filename) - document.head.appendChild(fileref); - } -} - -function loadResource(){ - //css - loadjscssfile("app/fusion/external/ebz/fn-ebz.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/demo.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/base.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/btn.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/dtpk.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/frms.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/sldr.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/style.css", "css"); - loadjscssfile("app/fusion/external/ebz/sandbox/styles/tbs.css", "css"); - loadjscssfile("app/fusion/external/ebz/ebz_header/portal_ebz_header.css", "css"); - loadjscssfile("static/fusion/css/jquery-ui.css", "css"); - - - loadjscssfile("app/fusion/external/ebz/ebz_header/header.css", "css"); - loadjscssfile("app/fusion/external/ebz/ebz_header/footer.css", "css"); - // Basic AngularJS --> - loadjscssfile("app/fusion/external/ebz/angular_js/angular.js", "js"); - loadjscssfile("app/fusion/external/ebz/angular_js/angular-sanitize.js", "js"); - loadjscssfile("app/fusion/external/ebz/angular_js/angular-route.min.js", "js"); - loadjscssfile("app/fusion/external/ebz/angular_js/angular-cookies.js", "js"); - loadjscssfile("app/fusion/external/ebz/angular_js/gestures.js", "js"); - loadjscssfile("app/fusion/external/ebz/angular_js/app.js", "js"); - - loadjscssfile("app/fusion/external/ebz/sandbox/att-abs-tpls.js", "js"); - - // jQuery --> - loadjscssfile("static/js/jquery-1.10.2.js", "js"); - loadjscssfile("static/js/jquery.mask.min.js", "js"); - loadjscssfile("static/js/jquery-ui.js", "js"); - - // AngularJS Gridster --> - loadjscssfile("static/fusion/js/att_angular_gridster/ui-gridster-tpls.js", "js"); - loadjscssfile("static/fusion/js/att_angular_gridster/angular-gridster.js", "js"); - - // AngularJS Config --> - loadjscssfile("app/fusion/external/ebz/angular_js/checklist-model.js", "js"); - - // Utility --> - loadjscssfile("app/fusion/scripts/modalService.js", "js"); - loadjscssfile("app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js", "js"); - - // Controller js --> - loadjscssfile("app/fusion/scripts/controllers/profile-search-controller.js", "js"); - loadjscssfile("app/fusion/scripts/controllers/profile-controller.js", "js"); - loadjscssfile("app/fusion/scripts/controllers/post-search-controller.js", "js"); - loadjscssfile("app/fusion/scripts/controllers/self-profile-controller.js", "js"); - loadjscssfile("app/fusion/scripts/controllers/rolefunctionpopupController.js", "js"); - loadjscssfile("app/fusion/scripts/controllers/modelpopupController.js", "js"); - - // Header and Footer --> - loadjscssfile("app/fusion/scripts/directives/footer.js", "js"); - loadjscssfile("app/fusion/external/ebz/js/footer.js", "js"); - loadjscssfile("app/fusion/scripts/directives/header.js", "js"); - loadjscssfile("app/fusion/scripts/directives/leftMenu.js", "js"); - - // Services --> - loadjscssfile("app/fusion/scripts/services/profileService.js", "js"); - loadjscssfile("app/fusion/scripts/services/userInfoService.js", "js"); - loadjscssfile("app/fusion/scripts/services/leftMenuService.js", "js"); - loadjscssfile("app/fusion/scripts/controllers/profileController.js", "js"); -} - -window.onload = loadResource(); -window.onload = function(){ - var appLoadingInterval = setInterval(function(){ loadApp() }, 500); - var count=0; - function loadApp(){ - count++ - if(typeof angular !== 'undefined') { - angular.bootstrap(document, ['abs']); - clearInterval(appLoadingInterval); - }else if(count>10){ - clearInterval(appLoadingInterval); - } - } -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html deleted file mode 100644 index d04eba9c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/admin.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/admin.html deleted file mode 100644 index f83888d9..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/admin.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -
      -
      -
      -
      -
      -
      -
      - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/profile.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/profile.html deleted file mode 100644 index 56c06ebc..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/admin-page/profile.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
      -
      -
      -
      -
      -
      - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/footer.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/footer.html deleted file mode 100644 index 56148731..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/footer.html +++ /dev/null @@ -1,42 +0,0 @@ - - -
      - -
      -
      - -
      - -
      -
      -
      - - -
      -
      - -
      -
      -
      -
      -
      -
      - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/header.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/header.html deleted file mode 100644 index adb5be35..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/header.html +++ /dev/null @@ -1,186 +0,0 @@ - -
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
    • -
      - ECOMP Portal -
    • -
      -
      - - -
      - - -
      - -
      -
      -
      -
    • - Unable to load menus -
    • -
      -
    • -
      - - -
      -
    • -
    •  
    • -
      - -
      - -
      -
      -
      -
      -
      -
      -
      -
      - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/left_menu.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/left_menu.html deleted file mode 100644 index 84ee6ead..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/left_menu.html +++ /dev/null @@ -1,41 +0,0 @@ - -
      - - - -     {{app_name}} - -
      -
      -
      -
      - - - - - -
      -
      -
      -
      -
      \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_menu_edit.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_menu_edit.html deleted file mode 100644 index ee23635f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_menu_edit.html +++ /dev/null @@ -1,175 +0,0 @@ - - -
      -
      -
      -

      Admin Menu Items

      -
      -
      - Add menu item here: -
      -
      - -
      -
      -
      - Existing menu items: -
      -
      - - - -
      -
    - -
    -
    - - - -
    Number of records to show: -
    - -
    -
    - - - - - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html deleted file mode 100644 index a14da056..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html +++ /dev/null @@ -1,61 +0,0 @@ - -
    -
    -

    Broadcast Message Edit

    -
    - -
    - Please edit the broadcast message details below: 

    -
    -
    - -
    -
    -
    -
    - - -
    - -
    -
    - - -
    - -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html deleted file mode 100644 index e9c4c291..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html +++ /dev/null @@ -1,71 +0,0 @@ - -
    - -
    - -

    Broadcast Messages

    -
    -
    - {{location.label}} Messages -
    - - - - - - - - - - - - - - - - - {{message.id}} - - - - - - - - - - - -
    No.Message TextStart DateEnd DateSort OrderServerActive?Delete?
    {{$index+1}}{{message.messageText}} - {{message.displayStartDate}} - {{message.displayEndDate}}{{message.sortOrder}}{{message.siteCd}} -
    - -
    -
    -
    -
    -
    - -


    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/collaborate_list.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/collaborate_list.html deleted file mode 100644 index 5f07a47b..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/collaborate_list.html +++ /dev/null @@ -1,57 +0,0 @@ - -
    -
    -

    User List

    -
    - - - - - - - - - - - - - - - - - - - - - - -
    User IDLast NameFirst NameEmailUser IDOnline/Offline
    {{rowData.id}}{{rowData.lastName}}{{rowData.firstName}}{{rowData.email}}{{rowData.orgUserId}} - Offline - Online -
    -
    -
    - - - - Add the Chrome Extension for DescktopCapture and refresh page -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/jcs_admin.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/jcs_admin.html deleted file mode 100644 index 7da45780..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/jcs_admin.html +++ /dev/null @@ -1,87 +0,0 @@ - -
    - -

    Cache Regions

    -
    -
    - These are the regions which are currently defined in the cache. 'Items' and 'Bytes' refer to the elements currently in memory (not spooled). - You can clear all items for a region by clicking on the Clear icon next to the desired region below. You can also clear all regions - which empties the entire cache. -
    - -
    -
    -
    Cache Name
    -
    # of Items
    -
    Bytes
    -
    Status
    -
    Memory Hits
    -
    Aux Hits
    -
    Not Found Misses
    -
    Expired Misses
    -
    Clear?
    -
    Items
    -
    -
    -
    - -
    {{region.size}}
    -
    {{region.byteCount}}
    -
    {{region.status}}
    -
    {{region.hitCountRam}}
    -
    {{region.hitCountAux}}
    -
    {{region.missCountNotFound}}
    -
    {{region.missCountExpired}}
    -
    -
    -
    -
    - - -
    -
    -
    - -
    Key
    -
    Eternal?
    -
    Created
    -
    Max Life
    -
    Expires
    -
    Clear?
    -
    -
    -
    - - -
    {{item.eternal}}
    -
    {{item.createTime}}
    -
    {{item.maxLifeSeconds}}
    -
    {{item.expiresInSeconds}}
    -
    -
    -
    -
    -
    -
    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html deleted file mode 100644 index 3cde902c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html deleted file mode 100644 index 760f10b5..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html deleted file mode 100644 index 4c23ba6f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html deleted file mode 100644 index 4663bd46..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html deleted file mode 100644 index b9e8ef0e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/post_search.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/post_search.html deleted file mode 100644 index 2c4846dd..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/post_search.html +++ /dev/null @@ -1,139 +0,0 @@ - -
    -

    User Search

    -
    - Please enter search criteria below:
    - -
    - Last Name:
    - -
    - -
    - First Name:
    - -
    - -
    - User ID:
    - -
    - -
    - Manager User ID:
    - -
    -
    -
    - Organization:
    - -
    - -
    - Email:
    - -
    -
    -
    - - - -
    -
    - - {{noResultsString}} - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNameOrgUserIdOrganizationPhoneEmailImport?
    - {{$index + 1}} - -
    - {{profile.lastName}}, {{profile.firstName}} -
    - - -
    - {{profile.orgUserId}} - - {{profile.orgCode}} - - {{profile.phone}} - - {{profile.email}} - -
    -
    - -
    -
    -
    - Exists -
    -
    -
    - Rows Per Page: - -
    -
    - Current Page: - -
    -
    - Total Page(s): - -
    - -
    - -
    - -
    - -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_detail.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_detail.html deleted file mode 100644 index c5ef97a7..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_detail.html +++ /dev/null @@ -1,188 +0,0 @@ - -
    -
    -

    Profile Edit

    -
    - Please edit the profile details below: 

    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -   -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    - -
    - -
    -
    - - - -
    - - - - - - - - - - - - - - - - -
    NameRemove?
    {{ role.name }} - -
    - - - - - - -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_search.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_search.html deleted file mode 100644 index 9f49a80f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/profile_search.html +++ /dev/null @@ -1,72 +0,0 @@ - -
    - -

    Profile Search

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    User IDLast NameFirst NameEmailUser IDManager User IDEditActive?
    -
    - -
    -
    - -
    - Records Per Page: - -
    - - - - -
    - -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role.html deleted file mode 100644 index c312f5b7..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role.html +++ /dev/null @@ -1,118 +0,0 @@ - -
    -
    - -
    -

    Role Edit

    -
    -
    - Please edit the role details below: 
    - -
    -
    - -
    - -
    -
    - -
    - -
    - -
    - -
    -
    - - -
    - - - - - - - - - - - - - - -
    NameRemove?
    {{ roleFunction.name }} -
    -
    - Manage Role Functions

    - -
    - - -
    - - - - - - - - - - - - - - -
    NameRemove?
    {{ role.name }} -
    -
    - -
    - - - - - - - - - - - - - - -
    Role
    -
    - -
    -
    {{ availableRole.name }}
    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_function_list.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_function_list.html deleted file mode 100644 index b0851036..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_function_list.html +++ /dev/null @@ -1,88 +0,0 @@ - -
    -
    - -

    Role Functions

    -
    - -
    - -
    -

    - -
    - -
    -
    - Click on the edit icon to update a role function, the plus icon to add additional role functions, or the delete icon to remove them. -
    -
    -
    - - - - - - - - - - - - - - - - - -
    NameCodeEdit?Delete?
    - -
    -
    - -
    -
    -
    - - -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - - -
    - -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_list.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_list.html deleted file mode 100644 index 1100cbb0..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/role_list.html +++ /dev/null @@ -1,61 +0,0 @@ - -
    - -

    Roles

    -
    -
    -Click on a Role to view its details. - -
    -
    - - - - - - - - - - - - - - - - - - -
    NamePriorityActive?Delete?
    {{ availableRole.name }}{{ availableRole.priority }} -
    - -
    -
    -
    -
    -
    - -
    - -
    - -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/self_profile.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/self_profile.html deleted file mode 100644 index bc8ddd2f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/self_profile.html +++ /dev/null @@ -1,183 +0,0 @@ - - - -

    Self Profile

    -
    - Please edit the profile details below: 

    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    - -
    - -
    -
    - - - -
    - - - - - - - - - - - - - - - - -
    NameRemove?
    {{ role.name }} - -
    - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/usage_list.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/usage_list.html deleted file mode 100644 index 27ae72b5..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/profile-page/usage_list.html +++ /dev/null @@ -1,64 +0,0 @@ - -
    -
    -

    Users

    -
    - -
    - The following shows all users currently logged into the application. Click the icon to expel a user from the application. -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Current User Sessions
    User IdUser NameEmailLast Access Time (minutes)Time Remaining (minutes)Expire User Session?
    {{user.id}}{{user.lastName}}{{user.email}}{{user.lastAccess}}{{user.remaining}}
    Current Session
    - -
    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-landing.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-landing.html deleted file mode 100644 index 2b5e3b60..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-landing.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-listing.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-listing.html deleted file mode 100644 index ceb88677..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-listing.html +++ /dev/null @@ -1,85 +0,0 @@ - -
    -
    -
    -
    -

    -

    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IdNameKeyDescriptionWorkflow Server URLViewActiveCreated Created ByActionScheduleEditDelete?
    {{workflow.id}}{{workflow.name}}{{workflow.workflowKey}}{{workflow.description}}{{workflow.runLink}}
    {{workflow.active}}{{workflow.created}}{{workflow.createdBy}}
    -
    - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-new.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-new.html deleted file mode 100644 index 4622b928..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-new.html +++ /dev/null @@ -1,108 +0,0 @@ - -
    - -
    -
    - -
    - - -
    - - -
    - Workflow Name is required !!! -
    - -
    -
    - - -
    - -
    - - -
    - Workflow Key is required !!! -
    - -
    -
    - - -
    - - -
    - -
    -
    - -
    - -
    - -
    - -
    - Run Link is required !!! - Not valid url! -
    - -
    - - - -
    - -
    - - - Active - Inactive - - -
    -
    - - -
    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-preview.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-preview.html deleted file mode 100644 index 80fece4e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-preview.html +++ /dev/null @@ -1,36 +0,0 @@ - -
    - -
    -
    - -
    - -
    - -
    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-remove.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-remove.html deleted file mode 100644 index e21efad8..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-remove.html +++ /dev/null @@ -1,38 +0,0 @@ - -
    - -
    -
    - -
    - -
    - - -
    -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-schedule.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-schedule.html deleted file mode 100644 index aebc04fb..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/view-models/workflows/workflow-schedule.html +++ /dev/null @@ -1,116 +0,0 @@ - -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - - - - - - -
    - - -
    -
    -
    - - -Pick a date: - -Hour: - -Minute: -
    -
    - -
    -
    - - - -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    -
    - - - -
    -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js deleted file mode 100644 index 449e8d59..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js +++ /dev/null @@ -1,6788 +0,0 @@ -// Last time updated at Monday, December 21st, 2015, 5:25:26 PM - -// Quick-Demo for newbies: http://jsfiddle.net/c46de0L8/ -// Another simple demo: http://jsfiddle.net/zar6fg60/ - -// Latest file can be found here: https://cdn.webrtc-experiment.com/RTCMultiConnection.js - -// Muaz Khan - www.MuazKhan.com -// MIT License - www.WebRTC-Experiment.com/licence -// Documentation - www.RTCMultiConnection.org/docs -// FAQ - www.RTCMultiConnection.org/FAQ -// Changes log - www.RTCMultiConnection.org/changes-log/ -// Demos - www.WebRTC-Experiment.com/RTCMultiConnection - -// _________________________ -// RTCMultiConnection-v2.2.2 - -(function() { - - // RMC == RTCMultiConnection - // usually page-URL is used as channel-id - // you can always override it! - // www.RTCMultiConnection.org/docs/channel-id/ - window.RMCDefaultChannel = location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g, '').split('\n').join('').split('\r').join(''); - - // www.RTCMultiConnection.org/docs/constructor/ - window.RTCMultiConnection = function(channel) { - // an instance of constructor - var connection = this; - - // a reference to RTCMultiSession - var rtcMultiSession; - - // setting default channel or channel passed through constructor - connection.channel = channel || RMCDefaultChannel; - - // to allow single user to join multiple rooms; - // you can change this property at runtime! - connection.isAcceptNewSession = true; - - // www.RTCMultiConnection.org/docs/open/ - connection.open = function(args) { - connection.isAcceptNewSession = false; - - // www.RTCMultiConnection.org/docs/session-initiator/ - // you can always use this property to determine room owner! - connection.isInitiator = true; - - var dontTransmit = false; - - // a channel can contain multiple rooms i.e. sessions - if (args) { - if (isString(args)) { - connection.sessionid = args; - } else { - if (!isNull(args.transmitRoomOnce)) { - connection.transmitRoomOnce = args.transmitRoomOnce; - } - - if (!isNull(args.dontTransmit)) { - dontTransmit = args.dontTransmit; - } - - if (!isNull(args.sessionid)) { - connection.sessionid = args.sessionid; - } - } - } - - // if firebase && if session initiator - if (connection.socket && connection.socket.remove) { - connection.socket.remove(); - } - - if (!connection.sessionid) connection.sessionid = connection.channel; - connection.sessionDescription = { - sessionid: connection.sessionid, - userid: connection.userid, - session: connection.session, - extra: connection.extra - }; - - if (!connection.sessionDescriptions[connection.sessionDescription.sessionid]) { - connection.numberOfSessions++; - connection.sessionDescriptions[connection.sessionDescription.sessionid] = connection.sessionDescription; - } - - // connect with signaling channel - initRTCMultiSession(function() { - // "captureUserMediaOnDemand" is disabled by default. - // invoke "getUserMedia" only when first participant found. - rtcMultiSession.captureUserMediaOnDemand = args ? !!args.captureUserMediaOnDemand : false; - - if (args && args.onMediaCaptured) { - connection.onMediaCaptured = args.onMediaCaptured; - } - - // for session-initiator, user-media is captured as soon as "open" is invoked. - if (!rtcMultiSession.captureUserMediaOnDemand) captureUserMedia(function() { - rtcMultiSession.initSession({ - sessionDescription: connection.sessionDescription, - dontTransmit: dontTransmit - }); - - invokeMediaCaptured(connection); - }); - - if (rtcMultiSession.captureUserMediaOnDemand) { - rtcMultiSession.initSession({ - sessionDescription: connection.sessionDescription, - dontTransmit: dontTransmit - }); - } - }); - return connection.sessionDescription; - }; - - // www.RTCMultiConnection.org/docs/connect/ - connection.connect = function(sessionid) { - // a channel can contain multiple rooms i.e. sessions - if (sessionid) { - connection.sessionid = sessionid; - } - - // connect with signaling channel - initRTCMultiSession(function() { - log('Signaling channel is ready.'); - }); - - return this; - }; - - // www.RTCMultiConnection.org/docs/join/ - connection.join = joinSession; - - // www.RTCMultiConnection.org/docs/send/ - connection.send = function(data, _channel) { - if (connection.numberOfConnectedUsers <= 0) { - // no connections - setTimeout(function() { - // try again - connection.send(data, _channel); - }, 1000); - return; - } - - // send file/data or /text - if (!data) - throw 'No file, data or text message to share.'; - - // connection.send([file1, file2, file3]) - // you can share multiple files, strings or data objects using "send" method! - if (data instanceof Array && !isNull(data[0].size) && !isNull(data[0].type)) { - // this mechanism can cause failure for subsequent packets/data - // on Firefox especially; and on chrome as well! - // todo: need to use setTimeout instead. - for (var i = 0; i < data.length; i++) { - data[i].size && data[i].type && connection.send(data[i], _channel); - } - return; - } - - // File or Blob object MUST have "type" and "size" properties - if (!isNull(data.size) && !isNull(data.type)) { - if (!connection.enableFileSharing) { - throw '"enableFileSharing" boolean MUST be "true" to support file sharing.'; - } - - if (!rtcMultiSession.fileBufferReader) { - initFileBufferReader(connection, function(fbr) { - rtcMultiSession.fileBufferReader = fbr; - connection.send(data, _channel); - }); - return; - } - - var extra = merge({ - userid: connection.userid - }, data.extra || connection.extra); - - rtcMultiSession.fileBufferReader.readAsArrayBuffer(data, function(uuid) { - rtcMultiSession.fileBufferReader.getNextChunk(uuid, function(nextChunk, isLastChunk, extra) { - if (_channel) _channel.send(nextChunk); - else rtcMultiSession.send(nextChunk); - }); - }, extra); - } else { - // to allow longest string messages - // and largest data objects - // or anything of any size! - // to send multiple data objects concurrently! - - TextSender.send({ - text: data, - channel: rtcMultiSession, - _channel: _channel, - connection: connection - }); - } - }; - - function initRTCMultiSession(onSignalingReady) { - if (screenFrame) { - loadScreenFrame(); - } - - // RTCMultiSession is the backbone object; - // this object MUST be initialized once! - if (rtcMultiSession) return onSignalingReady(); - - // your everything is passed over RTCMultiSession constructor! - rtcMultiSession = new RTCMultiSession(connection, onSignalingReady); - } - - connection.disconnect = function() { - if (rtcMultiSession) rtcMultiSession.disconnect(); - rtcMultiSession = null; - }; - - function joinSession(session, joinAs) { - if (isString(session)) { - connection.skipOnNewSession = true; - } - - if (!rtcMultiSession) { - log('Signaling channel is not ready. Connecting...'); - // connect with signaling channel - initRTCMultiSession(function() { - log('Signaling channel is connected. Joining the session again...'); - setTimeout(function() { - joinSession(session, joinAs); - }, 1000); - }); - return; - } - - // connection.join('sessionid'); - if (isString(session)) { - if (connection.sessionDescriptions[session]) { - session = connection.sessionDescriptions[session]; - } else - return setTimeout(function() { - log('Session-Descriptions not found. Rechecking..'); - joinSession(session, joinAs); - }, 1000); - } - - // connection.join('sessionid', { audio: true }); - if (joinAs) { - return captureUserMedia(function() { - session.oneway = true; - joinSession(session); - }, joinAs); - } - - if (!session || !session.userid || !session.sessionid) { - error('missing arguments', arguments); - - var error = 'Invalid data passed over "connection.join" method.'; - connection.onstatechange({ - userid: 'browser', - extra: {}, - name: 'Unexpected data detected.', - reason: error - }); - - throw error; - } - - if (!connection.dontOverrideSession) { - connection.session = session.session; - } - - var extra = connection.extra || session.extra || {}; - - // todo: need to verify that if-block statement works as expected. - // expectations: if it is oneway streaming; or if it is data-only connection - // then, it shouldn't capture user-media on participant's side. - if (session.oneway || isData(session)) { - rtcMultiSession.joinSession(session, extra); - } else { - captureUserMedia(function() { - rtcMultiSession.joinSession(session, extra); - }); - } - } - - var isFirstSession = true; - - // www.RTCMultiConnection.org/docs/captureUserMedia/ - - function captureUserMedia(callback, _session, dontCheckChromExtension) { - // capture user's media resources - var session = _session || connection.session; - - if (isEmpty(session)) { - if (callback) callback(); - return; - } - - // you can force to skip media capturing! - if (connection.dontCaptureUserMedia) { - return callback(); - } - - // if it is data-only connection - // if it is one-way connection and current user is participant - if (isData(session) || (!connection.isInitiator && session.oneway)) { - // www.RTCMultiConnection.org/docs/attachStreams/ - connection.attachStreams = []; - return callback(); - } - - var constraints = { - audio: !!session.audio ? { - mandatory: {}, - optional: [{ - chromeRenderToAssociatedSink: true - }] - } : false, - video: !!session.video - }; - - // if custom audio device is selected - if (connection._mediaSources.audio) { - constraints.audio.optional.push({ - sourceId: connection._mediaSources.audio - }); - } - - // if custom video device is selected - if (connection._mediaSources.video) { - constraints.video = { - optional: [{ - sourceId: connection._mediaSources.video - }] - }; - } - - // for connection.session = {}; - if (!session.screen && !constraints.audio && !constraints.video) { - return callback(); - } - - var screen_constraints = { - audio: false, - video: { - mandatory: { - chromeMediaSource: DetectRTC.screen.chromeMediaSource, - maxWidth: screen.width > 1920 ? screen.width : 1920, - maxHeight: screen.height > 1080 ? screen.height : 1080 - }, - optional: [] - } - }; - - if (isFirefox && session.screen) { - if (location.protocol !== 'https:') { - return error(SCREEN_COMMON_FAILURE); - } - warn(Firefox_Screen_Capturing_Warning); - - screen_constraints.video = merge(screen_constraints.video.mandatory, { - mozMediaSource: 'window', // mozMediaSource is redundant here - mediaSource: 'window' // 'screen' || 'window' - }); - - // Firefox is supporting audio+screen from single getUserMedia request - // audio+video+screen will become audio+screen for Firefox - // because Firefox isn't supporting multi-streams feature version < 38 - // version >38 supports multi-stream sharing. - // we can use: firefoxVersion < 38 - // however capturing audio and screen using single getUserMedia is a better option - if (constraints.audio /* && !session.video */ ) { - screen_constraints.audio = true; - constraints = {}; - } - - delete screen_constraints.video.chromeMediaSource; - } - - // if screen is prompted - if (session.screen) { - if (isChrome && DetectRTC.screen.extensionid != ReservedExtensionID) { - useCustomChromeExtensionForScreenCapturing = true; - } - - if (isChrome && !useCustomChromeExtensionForScreenCapturing && !dontCheckChromExtension && !DetectRTC.screen.sourceId) { - listenEventHandler('message', onIFrameCallback); - - function onIFrameCallback(event) { - if (event.data && event.data.chromeMediaSourceId) { - // this event listener is no more needed - window.removeEventListener('message', onIFrameCallback); - - var sourceId = event.data.chromeMediaSourceId; - - DetectRTC.screen.sourceId = sourceId; - DetectRTC.screen.chromeMediaSource = 'desktop'; - - if (sourceId == 'PermissionDeniedError') { - var mediaStreamError = { - message: location.protocol == 'https:' ? 'User denied to share content of his screen.' : SCREEN_COMMON_FAILURE, - name: 'PermissionDeniedError', - constraintName: screen_constraints, - session: session - }; - currentUserMediaRequest.mutex = false; - DetectRTC.screen.sourceId = null; - return connection.onMediaError(mediaStreamError); - } - - captureUserMedia(callback, _session); - } - - if (event.data && event.data.chromeExtensionStatus) { - warn('Screen capturing extension status is:', event.data.chromeExtensionStatus); - DetectRTC.screen.chromeMediaSource = 'screen'; - captureUserMedia(callback, _session, true); - } - } - - if (!screenFrame) { - loadScreenFrame(); - } - - screenFrame.postMessage(); - return; - } - - // check if screen capturing extension is installed. - if (isChrome && useCustomChromeExtensionForScreenCapturing && !dontCheckChromExtension && DetectRTC.screen.chromeMediaSource == 'screen' && DetectRTC.screen.extensionid) { - if (DetectRTC.screen.extensionid == ReservedExtensionID && document.domain.indexOf('webrtc-experiment.com') == -1) { - return captureUserMedia(callback, _session, true); - } - - log('checking if chrome extension is installed.'); - DetectRTC.screen.getChromeExtensionStatus(function(status) { - if (status == 'installed-enabled') { - DetectRTC.screen.chromeMediaSource = 'desktop'; - } - - captureUserMedia(callback, _session, true); - log('chrome extension is installed?', DetectRTC.screen.chromeMediaSource == 'desktop'); - }); - return; - } - - if (isChrome && useCustomChromeExtensionForScreenCapturing && DetectRTC.screen.chromeMediaSource == 'desktop' && !DetectRTC.screen.sourceId) { - DetectRTC.screen.getSourceId(function(sourceId) { - if (sourceId == 'PermissionDeniedError') { - var mediaStreamError = { - message: 'User denied to share content of his screen.', - name: 'PermissionDeniedError', - constraintName: screen_constraints, - session: session - }; - currentUserMediaRequest.mutex = false; - DetectRTC.screen.chromeMediaSource = 'desktop'; - return connection.onMediaError(mediaStreamError); - } - - if (sourceId == 'No-Response') { - error('Chrome extension seems not available. Make sure that manifest.json#L16 has valid content-script matches pointing to your URL.'); - DetectRTC.screen.chromeMediaSource = 'screen'; - return captureUserMedia(callback, _session, true); - } - - captureUserMedia(callback, _session, true); - }); - return; - } - - if (isChrome && DetectRTC.screen.chromeMediaSource == 'desktop') { - screen_constraints.video.mandatory.chromeMediaSourceId = DetectRTC.screen.sourceId; - } - - var _isFirstSession = isFirstSession; - - _captureUserMedia(screen_constraints, constraints.audio || constraints.video ? function() { - - if (_isFirstSession) isFirstSession = true; - - _captureUserMedia(constraints, callback); - } : callback); - } else _captureUserMedia(constraints, callback, session.audio && !session.video); - - function _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, dontPreventSSLAutoAllowed) { - connection.onstatechange({ - userid: 'browser', - extra: {}, - name: 'fetching-usermedia', - reason: 'About to capture user-media with constraints: ' + toStr(forcedConstraints) - }); - - - if (connection.preventSSLAutoAllowed && !dontPreventSSLAutoAllowed && isChrome) { - // if navigator.customGetUserMediaBar.js is missing - if (!navigator.customGetUserMediaBar) { - loadScript(connection.resources.customGetUserMediaBar, function() { - _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, dontPreventSSLAutoAllowed); - }); - return; - } - - navigator.customGetUserMediaBar(forcedConstraints, function() { - _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, true); - }, function() { - connection.onMediaError({ - name: 'PermissionDeniedError', - message: 'User denied permission.', - constraintName: forcedConstraints, - session: session - }); - }); - return; - } - - var mediaConfig = { - onsuccess: function(stream, returnBack, idInstance, streamid) { - onStreamSuccessCallback(stream, returnBack, idInstance, streamid, forcedConstraints, forcedCallback, isRemoveVideoTracks, screen_constraints, constraints, session); - }, - onerror: function(e, constraintUsed) { - // http://goo.gl/hrwF1a - if (isFirefox) { - if (e == 'PERMISSION_DENIED') { - e = { - message: '', - name: 'PermissionDeniedError', - constraintName: constraintUsed, - session: session - }; - } - } - - if (isFirefox && constraintUsed.video && constraintUsed.video.mozMediaSource) { - mediaStreamError = { - message: Firefox_Screen_Capturing_Warning, - name: e.name || 'PermissionDeniedError', - constraintName: constraintUsed, - session: session - }; - - connection.onMediaError(mediaStreamError); - return; - } - - if (isString(e)) { - return connection.onMediaError({ - message: 'Unknown Error', - name: e, - constraintName: constraintUsed, - session: session - }); - } - - // it seems that chrome 35+ throws "DevicesNotFoundError" exception - // when any of the requested media is either denied or absent - if (e.name && (e.name == 'PermissionDeniedError' || e.name == 'DevicesNotFoundError')) { - var mediaStreamError = 'Either: '; - mediaStreamError += '\n Media resolutions are not permitted.'; - mediaStreamError += '\n Another application is using same media device.'; - mediaStreamError += '\n Media device is not attached or drivers not installed.'; - mediaStreamError += '\n You denied access once and it is still denied.'; - - if (e.message && e.message.length) { - mediaStreamError += '\n ' + e.message; - } - - mediaStreamError = { - message: mediaStreamError, - name: e.name, - constraintName: constraintUsed, - session: session - }; - - connection.onMediaError(mediaStreamError); - - if (isChrome && (session.audio || session.video)) { - // todo: this snippet fails if user has two or more - // microphone/webcam attached. - DetectRTC.load(function() { - // it is possible to check presence of the microphone before using it! - if (session.audio && !DetectRTC.hasMicrophone) { - warn('It seems that you have no microphone attached to your device/system.'); - session.audio = session.audio = false; - - if (!session.video) { - alert('It seems that you are capturing microphone and there is no device available or access is denied. Reloading...'); - location.reload(); - } - } - - // it is possible to check presence of the webcam before using it! - if (session.video && !DetectRTC.hasWebcam) { - warn('It seems that you have no webcam attached to your device/system.'); - session.video = session.video = false; - - if (!session.audio) { - alert('It seems that you are capturing webcam and there is no device available or access is denied. Reloading...'); - location.reload(); - } - } - - if (!DetectRTC.hasMicrophone && !DetectRTC.hasWebcam) { - alert('It seems that either both microphone/webcam are not available or access is denied. Reloading...'); - location.reload(); - } else if (!connection.getUserMediaPromptedOnce) { - // make maximum two tries! - connection.getUserMediaPromptedOnce = true; - captureUserMedia(callback, session); - } - }); - } - } - - if (e.name && e.name == 'ConstraintNotSatisfiedError') { - var mediaStreamError = 'Either: '; - mediaStreamError += '\n You are prompting unknown media resolutions.'; - mediaStreamError += '\n You are using invalid media constraints.'; - - if (e.message && e.message.length) { - mediaStreamError += '\n ' + e.message; - } - - mediaStreamError = { - message: mediaStreamError, - name: e.name, - constraintName: constraintUsed, - session: session - }; - - connection.onMediaError(mediaStreamError); - } - - if (session.screen) { - if (isFirefox) { - error(Firefox_Screen_Capturing_Warning); - } else if (location.protocol !== 'https:') { - if (!isNodeWebkit && (location.protocol == 'file:' || location.protocol == 'http:')) { - error('You cannot use HTTP or file protocol for screen capturing. You must either use HTTPs or chrome extension page or Node-Webkit page.'); - } - } else { - error('Unable to detect actual issue. Maybe "deprecated" screen capturing flag was not set using command line or maybe you clicked "No" button or maybe chrome extension returned invalid "sourceId". Please install chrome-extension: http://bit.ly/webrtc-screen-extension'); - } - } - - currentUserMediaRequest.mutex = false; - - // to make sure same stream can be captured again! - var idInstance = JSON.stringify(constraintUsed); - if (currentUserMediaRequest.streams[idInstance]) { - delete currentUserMediaRequest.streams[idInstance]; - } - }, - mediaConstraints: connection.mediaConstraints || {} - }; - - mediaConfig.constraints = forcedConstraints || constraints; - mediaConfig.connection = connection; - getUserMedia(mediaConfig); - } - } - - function onStreamSuccessCallback(stream, returnBack, idInstance, streamid, forcedConstraints, forcedCallback, isRemoveVideoTracks, screen_constraints, constraints, session) { - if (!streamid) streamid = getRandomString(); - - connection.onstatechange({ - userid: 'browser', - extra: {}, - name: 'usermedia-fetched', - reason: 'Captured user media using constraints: ' + toStr(forcedConstraints) - }); - - if (isRemoveVideoTracks) { - stream = convertToAudioStream(stream); - } - - connection.localStreamids.push(streamid); - stream.onended = function() { - if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode && document.getElementById(stream.streamid)) { - streamedObject.mediaElement = document.getElementById(stream.streamid); - } - - // when a stream is stopped; it must be removed from "attachStreams" array - connection.attachStreams.forEach(function(_stream, index) { - if (_stream == stream) { - delete connection.attachStreams[index]; - connection.attachStreams = swap(connection.attachStreams); - } - }); - - onStreamEndedHandler(streamedObject, connection); - - if (connection.streams[streamid]) { - connection.removeStream(streamid); - } - - // if user clicks "stop" button to close screen sharing - var _stream = connection.streams[streamid]; - if (_stream && _stream.sockets.length) { - _stream.sockets.forEach(function(socket) { - socket.send({ - streamid: _stream.streamid, - stopped: true - }); - }); - } - - currentUserMediaRequest.mutex = false; - // to make sure same stream can be captured again! - if (currentUserMediaRequest.streams[idInstance]) { - delete currentUserMediaRequest.streams[idInstance]; - } - - // to allow re-capturing of the screen - DetectRTC.screen.sourceId = null; - }; - - if (!isIE) { - stream.streamid = streamid; - stream.isScreen = forcedConstraints == screen_constraints; - stream.isVideo = forcedConstraints == constraints && !!constraints.video; - stream.isAudio = forcedConstraints == constraints && !!constraints.audio && !constraints.video; - - // if muted stream is negotiated - stream.preMuted = { - audio: stream.getAudioTracks().length && !stream.getAudioTracks()[0].enabled, - video: stream.getVideoTracks().length && !stream.getVideoTracks()[0].enabled - }; - } - - var mediaElement = createMediaElement(stream, session); - mediaElement.muted = true; - - var streamedObject = { - stream: stream, - streamid: streamid, - mediaElement: mediaElement, - blobURL: mediaElement.mozSrcObject ? URL.createObjectURL(stream) : mediaElement.src, - type: 'local', - userid: connection.userid, - extra: connection.extra, - session: session, - isVideo: !!stream.isVideo, - isAudio: !!stream.isAudio, - isScreen: !!stream.isScreen, - isInitiator: !!connection.isInitiator, - rtcMultiConnection: connection - }; - - if (isFirstSession) { - connection.attachStreams.push(stream); - } - isFirstSession = false; - - connection.streams[streamid] = connection._getStream(streamedObject); - - if (!returnBack) { - connection.onstream(streamedObject); - } - - if (connection.setDefaultEventsForMediaElement) { - connection.setDefaultEventsForMediaElement(mediaElement, streamid); - } - - if (forcedCallback) forcedCallback(stream, streamedObject); - - if (connection.onspeaking) { - initHark({ - stream: stream, - streamedObject: streamedObject, - connection: connection - }); - } - } - - // www.RTCMultiConnection.org/docs/captureUserMedia/ - connection.captureUserMedia = captureUserMedia; - - // www.RTCMultiConnection.org/docs/leave/ - connection.leave = function(userid) { - if (!rtcMultiSession) return; - - isFirstSession = true; - - if (userid) { - connection.eject(userid); - return; - } - - rtcMultiSession.leave(); - }; - - // www.RTCMultiConnection.org/docs/eject/ - connection.eject = function(userid) { - if (!connection.isInitiator) throw 'Only session-initiator can eject a user.'; - if (!connection.peers[userid]) throw 'You ejected invalid user.'; - connection.peers[userid].sendCustomMessage({ - ejected: true - }); - }; - - // www.RTCMultiConnection.org/docs/close/ - connection.close = function() { - // close entire session - connection.autoCloseEntireSession = true; - connection.leave(); - }; - - // www.RTCMultiConnection.org/docs/renegotiate/ - connection.renegotiate = function(stream, session) { - if (connection.numberOfConnectedUsers <= 0) { - // no connections - setTimeout(function() { - // try again - connection.renegotiate(stream, session); - }, 1000); - return; - } - - rtcMultiSession.addStream({ - renegotiate: session || merge({ - oneway: true - }, connection.session), - stream: stream - }); - }; - - connection.attachExternalStream = function(stream, isScreen) { - var constraints = {}; - if (stream.getAudioTracks && stream.getAudioTracks().length) { - constraints.audio = true; - } - if (stream.getVideoTracks && stream.getVideoTracks().length) { - constraints.video = true; - } - - var screen_constraints = { - video: { - chromeMediaSource: 'fake' - } - }; - var forcedConstraints = isScreen ? screen_constraints : constraints; - onStreamSuccessCallback(stream, false, '', null, forcedConstraints, false, false, screen_constraints, constraints, constraints); - }; - - // www.RTCMultiConnection.org/docs/addStream/ - connection.addStream = function(session, socket) { - // www.RTCMultiConnection.org/docs/renegotiation/ - - if (connection.numberOfConnectedUsers <= 0) { - // no connections - setTimeout(function() { - // try again - connection.addStream(session, socket); - }, 1000); - return; - } - - // renegotiate new media stream - if (session) { - var isOneWayStreamFromParticipant; - if (!connection.isInitiator && session.oneway) { - session.oneway = false; - isOneWayStreamFromParticipant = true; - } - - captureUserMedia(function(stream) { - if (isOneWayStreamFromParticipant) { - session.oneway = true; - } - addStream(stream); - }, session); - } else addStream(); - - function addStream(stream) { - rtcMultiSession.addStream({ - stream: stream, - renegotiate: session || connection.session, - socket: socket - }); - } - }; - - // www.RTCMultiConnection.org/docs/removeStream/ - connection.removeStream = function(streamid, dontRenegotiate) { - if (connection.numberOfConnectedUsers <= 0) { - // no connections - setTimeout(function() { - // try again - connection.removeStream(streamid, dontRenegotiate); - }, 1000); - return; - } - - if (!streamid) streamid = 'all'; - if (!isString(streamid) || streamid.search(/all|audio|video|screen/gi) != -1) { - function _detachStream(_stream, config) { - if (config.local && _stream.type != 'local') return; - if (config.remote && _stream.type != 'remote') return; - - // connection.removeStream({screen:true}); - if (config.screen && !!_stream.isScreen) { - connection.detachStreams.push(_stream.streamid); - } - - // connection.removeStream({audio:true}); - if (config.audio && !!_stream.isAudio) { - connection.detachStreams.push(_stream.streamid); - } - - // connection.removeStream({video:true}); - if (config.video && !!_stream.isVideo) { - connection.detachStreams.push(_stream.streamid); - } - - // connection.removeStream({}); - if (!config.audio && !config.video && !config.screen) { - connection.detachStreams.push(_stream.streamid); - } - - if (connection.detachStreams.indexOf(_stream.streamid) != -1) { - log('removing stream', _stream.streamid); - onStreamEndedHandler(_stream, connection); - - if (config.stop) { - connection.stopMediaStream(_stream.stream); - } - } - } - - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - _stream = connection.streams[stream]; - - if (streamid == 'all') _detachStream(_stream, { - audio: true, - video: true, - screen: true - }); - - else if (isString(streamid)) { - // connection.removeStream('screen'); - var config = {}; - config[streamid] = true; - _detachStream(_stream, config); - } else _detachStream(_stream, streamid); - } - } - - if (!dontRenegotiate && connection.detachStreams.length) { - connection.renegotiate(); - } - - return; - } - - var stream = connection.streams[streamid]; - - // detach pre-attached streams - if (!stream) return warn('No such stream exists. Stream-id:', streamid); - - // www.RTCMultiConnection.org/docs/detachStreams/ - connection.detachStreams.push(stream.streamid); - - log('removing stream', stream.streamid); - onStreamEndedHandler(stream, connection); - - // todo: how to allow "stop" function? - // connection.stopMediaStream(stream.stream) - - if (!dontRenegotiate) { - connection.renegotiate(); - } - }; - - connection.switchStream = function(session) { - if (connection.numberOfConnectedUsers <= 0) { - // no connections - setTimeout(function() { - // try again - connection.switchStream(session); - }, 1000); - return; - } - - connection.removeStream('all', true); - connection.addStream(session); - }; - - // www.RTCMultiConnection.org/docs/sendCustomMessage/ - connection.sendCustomMessage = function(message) { - if (!rtcMultiSession || !rtcMultiSession.defaultSocket) { - return setTimeout(function() { - connection.sendCustomMessage(message); - }, 1000); - } - - rtcMultiSession.defaultSocket.send({ - customMessage: true, - message: message - }); - }; - - // set RTCMultiConnection defaults on constructor invocation - setDefaults(connection); - }; - - function RTCMultiSession(connection, callbackForSignalingReady) { - var socketObjects = {}; - var sockets = []; - var rtcMultiSession = this; - var participants = {}; - - if (!rtcMultiSession.fileBufferReader && connection.session.data && connection.enableFileSharing) { - initFileBufferReader(connection, function(fbr) { - rtcMultiSession.fileBufferReader = fbr; - }); - } - - var textReceiver = new TextReceiver(connection); - - function onDataChannelMessage(e) { - if (e.data.checkingPresence && connection.channels[e.userid]) { - connection.channels[e.userid].send({ - presenceDetected: true - }); - return; - } - - if (e.data.presenceDetected && connection.peers[e.userid]) { - connection.peers[e.userid].connected = true; - return; - } - - if (e.data.type === 'text') { - textReceiver.receive(e.data, e.userid, e.extra); - } else { - if (connection.autoTranslateText) { - e.original = e.data; - connection.Translator.TranslateText(e.data, function(translatedText) { - e.data = translatedText; - connection.onmessage(e); - }); - } else connection.onmessage(e); - } - } - - function onNewSession(session) { - if (connection.skipOnNewSession) return; - - if (!session.session) session.session = {}; - if (!session.extra) session.extra = {}; - - // todo: make sure this works as expected. - // i.e. "onNewSession" should be fired only for - // sessionid that is passed over "connect" method. - if (connection.sessionid && session.sessionid != connection.sessionid) return; - - if (connection.onNewSession) { - session.join = function(forceSession) { - if (!forceSession) return connection.join(session); - - for (var f in forceSession) { - session.session[f] = forceSession[f]; - } - - // keeping previous state - var isDontCaptureUserMedia = connection.dontCaptureUserMedia; - - connection.dontCaptureUserMedia = false; - connection.captureUserMedia(function() { - connection.dontCaptureUserMedia = true; - connection.join(session); - - // returning back previous state - connection.dontCaptureUserMedia = isDontCaptureUserMedia; - }, forceSession); - }; - if (!session.extra) session.extra = {}; - - return connection.onNewSession(session); - } - - connection.join(session); - } - - function updateSocketForLocalStreams(socket) { - for (var i = 0; i < connection.localStreamids.length; i++) { - var streamid = connection.localStreamids[i]; - if (connection.streams[streamid]) { - // using "sockets" array to keep references of all sockets using - // this media stream; so we can fire "onStreamEndedHandler" among all users. - connection.streams[streamid].sockets.push(socket); - } - } - } - - function newPrivateSocket(_config) { - var socketConfig = { - channel: _config.channel, - onmessage: socketResponse, - onopen: function(_socket) { - if (_socket) socket = _socket; - - if (isofferer && !peer) { - peerConfig.session = connection.session; - if (!peer) peer = new PeerConnection(); - peer.create('offer', peerConfig); - } - - _config.socketIndex = socket.index = sockets.length; - socketObjects[socketConfig.channel] = socket; - sockets[_config.socketIndex] = socket; - - updateSocketForLocalStreams(socket); - - if (!socket.__push) { - socket.__push = socket.send; - socket.send = function(message) { - message.userid = message.userid || connection.userid; - message.extra = message.extra || connection.extra || {}; - - socket.__push(message); - }; - } - } - }; - - socketConfig.callback = function(_socket) { - socket = _socket; - socketConfig.onopen(); - }; - - var socket = connection.openSignalingChannel(socketConfig); - if (socket) socketConfig.onopen(socket); - - var isofferer = _config.isofferer, - peer; - - var peerConfig = { - onopen: onChannelOpened, - onicecandidate: function(candidate) { - if (!connection.candidates) throw 'ICE candidates are mandatory.'; - if (!connection.iceProtocols) throw 'At least one must be true; UDP or TCP.'; - - var iceCandidates = connection.candidates; - - var stun = iceCandidates.stun; - var turn = iceCandidates.turn; - - if (!isNull(iceCandidates.reflexive)) stun = iceCandidates.reflexive; - if (!isNull(iceCandidates.relay)) turn = iceCandidates.relay; - - if (!iceCandidates.host && !!candidate.candidate.match(/a=candidate.*typ host/g)) return; - if (!turn && !!candidate.candidate.match(/a=candidate.*typ relay/g)) return; - if (!stun && !!candidate.candidate.match(/a=candidate.*typ srflx/g)) return; - - var protocol = connection.iceProtocols; - - if (!protocol.udp && !!candidate.candidate.match(/a=candidate.* udp/g)) return; - if (!protocol.tcp && !!candidate.candidate.match(/a=candidate.* tcp/g)) return; - - if (!window.selfNPObject) window.selfNPObject = candidate; - - socket && socket.send({ - candidate: JSON.stringify({ - candidate: candidate.candidate, - sdpMid: candidate.sdpMid, - sdpMLineIndex: candidate.sdpMLineIndex - }) - }); - }, - onmessage: function(data) { - if (!data) return; - - var abToStr = ab2str(data); - if (abToStr.indexOf('"userid":') != -1) { - abToStr = JSON.parse(abToStr); - onDataChannelMessage(abToStr); - } else if (data instanceof ArrayBuffer || data instanceof DataView) { - if (!connection.enableFileSharing) { - throw 'It seems that receiving data is either "Blob" or "File" but file sharing is disabled.'; - } - - if (!rtcMultiSession.fileBufferReader) { - var that = this; - initFileBufferReader(connection, function(fbr) { - rtcMultiSession.fileBufferReader = fbr; - that.onmessage(data); - }); - return; - } - - var fileBufferReader = rtcMultiSession.fileBufferReader; - - fileBufferReader.convertToObject(data, function(chunk) { - if (chunk.maxChunks || chunk.readyForNextChunk) { - // if target peer requested next chunk - if (chunk.readyForNextChunk) { - fileBufferReader.getNextChunk(chunk.uuid, function(nextChunk, isLastChunk, extra) { - rtcMultiSession.send(nextChunk); - }); - return; - } - - // if chunk is received - fileBufferReader.addChunk(chunk, function(promptNextChunk) { - // request next chunk - rtcMultiSession.send(promptNextChunk); - }); - return; - } - - connection.onmessage({ - data: chunk, - userid: _config.userid, - extra: _config.extra - }); - }); - return; - } - }, - onaddstream: function(stream, session) { - session = session || _config.renegotiate || connection.session; - - // if it is data-only connection; then return. - if (isData(session)) return; - - if (session.screen && (session.audio || session.video)) { - if (!_config.gotAudioOrVideo) { - // audio/video are fired earlier than screen - _config.gotAudioOrVideo = true; - session.screen = false; - } else { - // screen stream is always fired later - session.audio = false; - session.video = false; - } - } - - var preMuted = {}; - - if (_config.streaminfo) { - var streaminfo = _config.streaminfo.split('----'); - var strInfo = JSON.parse(streaminfo[streaminfo.length - 1]); - - if (!isIE) { - stream.streamid = strInfo.streamid; - stream.isScreen = !!strInfo.isScreen; - stream.isVideo = !!strInfo.isVideo; - stream.isAudio = !!strInfo.isAudio; - preMuted = strInfo.preMuted; - } - - streaminfo.pop(); - _config.streaminfo = streaminfo.join('----'); - } - - var mediaElement = createMediaElement(stream, merge({ - remote: true - }, session)); - - if (connection.setDefaultEventsForMediaElement) { - connection.setDefaultEventsForMediaElement(mediaElement, stream.streamid); - } - - if (!isPluginRTC && !stream.getVideoTracks().length) { - function eventListener() { - setTimeout(function() { - mediaElement.muted = false; - afterRemoteStreamStartedFlowing({ - mediaElement: mediaElement, - session: session, - stream: stream, - preMuted: preMuted - }); - }, 3000); - - mediaElement.removeEventListener('play', eventListener); - } - return mediaElement.addEventListener('play', eventListener, false); - } - - waitUntilRemoteStreamStartsFlowing({ - mediaElement: mediaElement, - session: session, - stream: stream, - preMuted: preMuted - }); - }, - - onremovestream: function(stream) { - if (stream && stream.streamid) { - stream = connection.streams[stream.streamid]; - if (stream) { - log('on:stream:ended via on:remove:stream', stream); - onStreamEndedHandler(stream, connection); - } - } else log('on:remove:stream', stream); - }, - - onclose: function(e) { - e.extra = _config.extra; - e.userid = _config.userid; - connection.onclose(e); - - // suggested in #71 by "efaj" - if (connection.channels[e.userid]) { - delete connection.channels[e.userid]; - } - }, - onerror: function(e) { - e.extra = _config.extra; - e.userid = _config.userid; - connection.onerror(e); - }, - - oniceconnectionstatechange: function(event) { - log('oniceconnectionstatechange', toStr(event)); - - if (peer.connection && peer.connection.iceConnectionState == 'connected' && peer.connection.iceGatheringState == 'complete' && peer.connection.signalingState == 'stable' && connection.numberOfConnectedUsers == 1) { - connection.onconnected({ - userid: _config.userid, - extra: _config.extra, - peer: connection.peers[_config.userid], - targetuser: _config.userinfo - }); - } - - if (!connection.isInitiator && peer.connection && peer.connection.iceConnectionState == 'connected' && peer.connection.iceGatheringState == 'complete' && peer.connection.signalingState == 'stable' && connection.numberOfConnectedUsers == 1) { - connection.onstatechange({ - userid: _config.userid, - extra: _config.extra, - name: 'connected-with-initiator', - reason: 'ICE connection state seems connected; gathering state is completed; and signaling state is stable.' - }); - } - - if (connection.peers[_config.userid] && connection.peers[_config.userid].oniceconnectionstatechange) { - connection.peers[_config.userid].oniceconnectionstatechange(event); - } - - // if ICE connectivity check is failed; renegotiate or redial - if (connection.peers[_config.userid] && connection.peers[_config.userid].peer.connection.iceConnectionState == 'failed') { - connection.onfailed({ - userid: _config.userid, - extra: _config.extra, - peer: connection.peers[_config.userid], - targetuser: _config.userinfo - }); - } - - if (connection.peers[_config.userid] && connection.peers[_config.userid].peer.connection.iceConnectionState == 'disconnected') { - !peer.connection.renegotiate && connection.ondisconnected({ - userid: _config.userid, - extra: _config.extra, - peer: connection.peers[_config.userid], - targetuser: _config.userinfo - }); - peer.connection.renegotiate = false; - } - - if (!connection.autoReDialOnFailure) return; - - if (connection.peers[_config.userid]) { - if (connection.peers[_config.userid].peer.connection.iceConnectionState != 'disconnected') { - _config.redialing = false; - } - - if (connection.peers[_config.userid].peer.connection.iceConnectionState == 'disconnected' && !_config.redialing) { - _config.redialing = true; - warn('Peer connection is closed.', toStr(connection.peers[_config.userid].peer.connection), 'ReDialing..'); - connection.peers[_config.userid].socket.send({ - redial: true - }); - - // to make sure all old "remote" streams are also removed! - connection.streams.remove({ - remote: true, - userid: _config.userid - }); - } - } - }, - - onsignalingstatechange: function(event) { - log('onsignalingstatechange', toStr(event)); - }, - - attachStreams: connection.dontAttachStream ? [] : connection.attachStreams, - iceServers: connection.iceServers, - rtcConfiguration: connection.rtcConfiguration, - bandwidth: connection.bandwidth, - sdpConstraints: connection.sdpConstraints, - optionalArgument: connection.optionalArgument, - disableDtlsSrtp: connection.disableDtlsSrtp, - dataChannelDict: connection.dataChannelDict, - preferSCTP: connection.preferSCTP, - - onSessionDescription: function(sessionDescription, streaminfo) { - sendsdp({ - sdp: sessionDescription, - socket: socket, - streaminfo: streaminfo - }); - }, - trickleIce: connection.trickleIce, - processSdp: connection.processSdp, - sendStreamId: function(stream) { - socket && socket.send({ - streamid: stream.streamid, - isScreen: !!stream.isScreen, - isAudio: !!stream.isAudio, - isVideo: !!stream.isVideo - }); - }, - rtcMultiConnection: connection - }; - - function waitUntilRemoteStreamStartsFlowing(args) { - // chrome for android may have some features missing - if (isMobileDevice || isPluginRTC || (isNull(connection.waitUntilRemoteStreamStartsFlowing) || !connection.waitUntilRemoteStreamStartsFlowing)) { - return afterRemoteStreamStartedFlowing(args); - } - - if (!args.numberOfTimes) args.numberOfTimes = 0; - args.numberOfTimes++; - - if (!(args.mediaElement.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA || args.mediaElement.paused || args.mediaElement.currentTime <= 0)) { - return afterRemoteStreamStartedFlowing(args); - } - - if (args.numberOfTimes >= 60) { // wait 60 seconds while video is delivered! - return socket.send({ - failedToReceiveRemoteVideo: true, - streamid: args.stream.streamid - }); - } - - setTimeout(function() { - log('Waiting for incoming remote stream to be started flowing: ' + args.numberOfTimes + ' seconds.'); - waitUntilRemoteStreamStartsFlowing(args); - }, 900); - } - - function initFakeChannel() { - if (!connection.fakeDataChannels || connection.channels[_config.userid]) return; - - // for non-data connections; allow fake data sender! - if (!connection.session.data) { - var fakeChannel = { - send: function(data) { - socket.send({ - fakeData: data - }); - }, - readyState: 'open' - }; - // connection.channels['user-id'].send(data); - connection.channels[_config.userid] = { - channel: fakeChannel, - send: function(data) { - this.channel.send(data); - } - }; - peerConfig.onopen(fakeChannel); - } - } - - function afterRemoteStreamStartedFlowing(args) { - var mediaElement = args.mediaElement; - var session = args.session; - var stream = args.stream; - - stream.onended = function() { - if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode && document.getElementById(stream.streamid)) { - streamedObject.mediaElement = document.getElementById(stream.streamid); - } - - onStreamEndedHandler(streamedObject, connection); - }; - - var streamedObject = { - mediaElement: mediaElement, - - stream: stream, - streamid: stream.streamid, - session: session || connection.session, - - blobURL: isPluginRTC ? '' : mediaElement.mozSrcObject ? URL.createObjectURL(stream) : mediaElement.src, - type: 'remote', - - extra: _config.extra, - userid: _config.userid, - - isVideo: isPluginRTC ? !!session.video : !!stream.isVideo, - isAudio: isPluginRTC ? !!session.audio && !session.video : !!stream.isAudio, - isScreen: !!stream.isScreen, - isInitiator: !!_config.isInitiator, - - rtcMultiConnection: connection, - socket: socket - }; - - // connection.streams['stream-id'].mute({audio:true}) - connection.streams[stream.streamid] = connection._getStream(streamedObject); - connection.onstream(streamedObject); - - if (!isEmpty(args.preMuted) && (args.preMuted.audio || args.preMuted.video)) { - var fakeObject = merge({}, streamedObject); - fakeObject.session = merge(fakeObject.session, args.preMuted); - - fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video; - fakeObject.isVideo = !!fakeObject.session.video; - fakeObject.isScreen = false; - - connection.onmute(fakeObject); - } - - log('on:add:stream', streamedObject); - - onSessionOpened(); - - if (connection.onspeaking) { - initHark({ - stream: stream, - streamedObject: streamedObject, - connection: connection - }); - } - } - - function onChannelOpened(channel) { - _config.channel = channel; - - // connection.channels['user-id'].send(data); - connection.channels[_config.userid] = { - channel: _config.channel, - send: function(data) { - connection.send(data, this.channel); - } - }; - - connection.onopen({ - extra: _config.extra, - userid: _config.userid, - channel: channel - }); - - // fetch files from file-queue - for (var q in connection.fileQueue) { - connection.send(connection.fileQueue[q], channel); - } - - if (isData(connection.session)) onSessionOpened(); - - if (connection.partOfScreen && connection.partOfScreen.sharing) { - connection.peers[_config.userid].sharePartOfScreen(connection.partOfScreen); - } - } - - function updateSocket() { - // todo: need to check following {if-block} MUST not affect "redial" process - if (socket.userid == _config.userid) - return; - - socket.userid = _config.userid; - sockets[_config.socketIndex] = socket; - - connection.numberOfConnectedUsers++; - // connection.peers['user-id'].addStream({audio:true}) - connection.peers[_config.userid] = { - socket: socket, - peer: peer, - userid: _config.userid, - extra: _config.extra, - userinfo: _config.userinfo, - addStream: function(session00) { - // connection.peers['user-id'].addStream({audio: true, video: true); - - connection.addStream(session00, this.socket); - }, - removeStream: function(streamid) { - if (!connection.streams[streamid]) - return warn('No such stream exists. Stream-id:', streamid); - - this.peer.connection.removeStream(connection.streams[streamid].stream); - this.renegotiate(); - }, - renegotiate: function(stream, session) { - // connection.peers['user-id'].renegotiate(); - - connection.renegotiate(stream, session); - }, - changeBandwidth: function(bandwidth) { - // connection.peers['user-id'].changeBandwidth(); - - if (!bandwidth) throw 'You MUST pass bandwidth object.'; - if (isString(bandwidth)) throw 'Pass object for bandwidth instead of string; e.g. {audio:10, video:20}'; - - // set bandwidth for self - this.peer.bandwidth = bandwidth; - - // ask remote user to synchronize bandwidth - this.socket.send({ - changeBandwidth: true, - bandwidth: bandwidth - }); - }, - sendCustomMessage: function(message) { - // connection.peers['user-id'].sendCustomMessage(); - - this.socket.send({ - customMessage: true, - message: message - }); - }, - onCustomMessage: function(message) { - log('Received "private" message from', this.userid, - isString(message) ? message : toStr(message)); - }, - drop: function(dontSendMessage) { - // connection.peers['user-id'].drop(); - - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - stream = connection.streams[stream]; - - if (stream.userid == connection.userid && stream.type == 'local') { - this.peer.connection.removeStream(stream.stream); - onStreamEndedHandler(stream, connection); - } - - if (stream.type == 'remote' && stream.userid == this.userid) { - onStreamEndedHandler(stream, connection); - } - } - } - - !dontSendMessage && this.socket.send({ - drop: true - }); - }, - hold: function(holdMLine) { - // connection.peers['user-id'].hold(); - - if (peer.prevCreateType == 'answer') { - this.socket.send({ - unhold: true, - holdMLine: holdMLine || 'both', - takeAction: true - }); - return; - } - - this.socket.send({ - hold: true, - holdMLine: holdMLine || 'both' - }); - - this.peer.hold = true; - this.fireHoldUnHoldEvents({ - kind: holdMLine, - isHold: true, - userid: connection.userid, - remoteUser: this.userid - }); - }, - unhold: function(holdMLine) { - // connection.peers['user-id'].unhold(); - - if (peer.prevCreateType == 'answer') { - this.socket.send({ - unhold: true, - holdMLine: holdMLine || 'both', - takeAction: true - }); - return; - } - - this.socket.send({ - unhold: true, - holdMLine: holdMLine || 'both' - }); - - this.peer.hold = false; - this.fireHoldUnHoldEvents({ - kind: holdMLine, - isHold: false, - userid: connection.userid, - remoteUser: this.userid - }); - }, - fireHoldUnHoldEvents: function(e) { - // this method is for inner usages only! - - var isHold = e.isHold; - var kind = e.kind; - var userid = e.remoteUser || e.userid; - - // hold means inactive a specific media line! - // a media line can contain multiple synced sources (ssrc) - // i.e. a media line can reference multiple tracks! - // that's why hold will affect all relevant tracks in a specific media line! - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - stream = connection.streams[stream]; - - if (stream.userid == userid) { - // www.RTCMultiConnection.org/docs/onhold/ - if (isHold) - connection.onhold(merge({ - kind: kind - }, stream)); - - // www.RTCMultiConnection.org/docs/onunhold/ - if (!isHold) - connection.onunhold(merge({ - kind: kind - }, stream)); - } - } - } - }, - redial: function() { - // connection.peers['user-id'].redial(); - - // 1st of all; remove all relevant remote media streams - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - stream = connection.streams[stream]; - - if (stream.userid == this.userid && stream.type == 'remote') { - onStreamEndedHandler(stream, connection); - } - } - } - - log('ReDialing...'); - - socket.send({ - recreatePeer: true - }); - - peer = new PeerConnection(); - peer.create('offer', peerConfig); - }, - sharePartOfScreen: function(args) { - // www.RTCMultiConnection.org/docs/onpartofscreen/ - var that = this; - var lastScreenshot = ''; - - function partOfScreenCapturer() { - // if stopped - if (that.stopPartOfScreenSharing) { - that.stopPartOfScreenSharing = false; - - if (connection.onpartofscreenstopped) { - connection.onpartofscreenstopped(); - } - return; - } - - // if paused - if (that.pausePartOfScreenSharing) { - if (connection.onpartofscreenpaused) { - connection.onpartofscreenpaused(); - } - - return setTimeout(partOfScreenCapturer, args.interval || 200); - } - - capturePartOfScreen({ - element: args.element, - connection: connection, - callback: function(screenshot) { - if (!connection.channels[that.userid]) { - throw 'No such data channel exists.'; - } - - // don't share repeated content - if (screenshot != lastScreenshot) { - lastScreenshot = screenshot; - connection.channels[that.userid].send({ - screenshot: screenshot, - isPartOfScreen: true - }); - } - - // "once" can be used to share single screenshot - !args.once && setTimeout(partOfScreenCapturer, args.interval || 200); - } - }); - } - - partOfScreenCapturer(); - }, - getConnectionStats: function(callback, interval) { - if (!callback) throw 'callback is mandatory.'; - - if (!window.getConnectionStats) { - loadScript(connection.resources.getConnectionStats, invoker); - } else invoker(); - - function invoker() { - RTCPeerConnection.prototype.getConnectionStats = window.getConnectionStats; - peer.connection && peer.connection.getConnectionStats(callback, interval); - } - }, - takeSnapshot: function(callback) { - takeSnapshot({ - userid: this.userid, - connection: connection, - callback: callback - }); - } - }; - } - - function onSessionOpened() { - // original conferencing infrastructure! - if (connection.isInitiator && getLength(participants) && getLength(participants) <= connection.maxParticipantsAllowed) { - if (!connection.session.oneway && !connection.session.broadcast) { - defaultSocket.send({ - sessionid: connection.sessionid, - newParticipant: _config.userid || socket.channel, - userData: { - userid: _config.userid || socket.channel, - extra: _config.extra - } - }); - } - } - - // 1st: renegotiation is supported only on chrome - // 2nd: must not renegotiate same media multiple times - // 3rd: todo: make sure that target-user has no such "renegotiated" media. - if (_config.userinfo.browser == 'chrome' && !_config.renegotiatedOnce) { - // this code snippet is added to make sure that "previously-renegotiated" streams are also - // renegotiated to this new user - for (var rSession in connection.renegotiatedSessions) { - _config.renegotiatedOnce = true; - - if (connection.renegotiatedSessions[rSession] && connection.renegotiatedSessions[rSession].stream) { - connection.peers[_config.userid].renegotiate(connection.renegotiatedSessions[rSession].stream, connection.renegotiatedSessions[rSession].session); - } - } - } - } - - function socketResponse(response) { - if (isRMSDeleted) return; - - if (response.userid == connection.userid) - return; - - if (response.sdp) { - _config.userid = response.userid; - _config.extra = response.extra || {}; - _config.renegotiate = response.renegotiate; - _config.streaminfo = response.streaminfo; - _config.isInitiator = response.isInitiator; - _config.userinfo = response.userinfo; - - var sdp = JSON.parse(response.sdp); - - if (sdp.type == 'offer') { - // to synchronize SCTP or RTP - peerConfig.preferSCTP = !!response.preferSCTP; - connection.fakeDataChannels = !!response.fakeDataChannels; - } - - // initializing fake channel - initFakeChannel(); - - sdpInvoker(sdp, response.labels); - } - - if (response.candidate) { - peer && peer.addIceCandidate(JSON.parse(response.candidate)); - } - - if (response.streamid) { - if (!rtcMultiSession.streamids) { - rtcMultiSession.streamids = {}; - } - if (!rtcMultiSession.streamids[response.streamid]) { - rtcMultiSession.streamids[response.streamid] = response.streamid; - connection.onstreamid(response); - } - } - - if (response.mute || response.unmute) { - if (response.promptMuteUnmute) { - if (!connection.privileges.canMuteRemoteStream) { - connection.onstatechange({ - userid: response.userid, - extra: response.extra, - name: 'mute-request-denied', - reason: response.userid + ' tried to mute your stream; however "privileges.canMuteRemoteStream" is "false".' - }); - return; - } - - if (connection.streams[response.streamid]) { - if (response.mute && !connection.streams[response.streamid].muted) { - connection.streams[response.streamid].mute(response.session); - } - if (response.unmute && connection.streams[response.streamid].muted) { - connection.streams[response.streamid].unmute(response.session); - } - } - } else { - var streamObject = {}; - if (connection.streams[response.streamid]) { - streamObject = connection.streams[response.streamid]; - } - - var session = response.session; - var fakeObject = merge({}, streamObject); - fakeObject.session = session; - - fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video; - fakeObject.isVideo = !!fakeObject.session.video; - fakeObject.isScreen = !!fakeObject.session.screen; - - if (response.mute) connection.onmute(fakeObject || response); - if (response.unmute) connection.onunmute(fakeObject || response); - } - } - - if (response.isVolumeChanged) { - log('Volume of stream: ' + response.streamid + ' has changed to: ' + response.volume); - if (connection.streams[response.streamid]) { - var mediaElement = connection.streams[response.streamid].mediaElement; - if (mediaElement) mediaElement.volume = response.volume; - } - } - - // to stop local stream - if (response.stopped) { - if (connection.streams[response.streamid]) { - onStreamEndedHandler(connection.streams[response.streamid], connection); - } - } - - // to stop remote stream - if (response.promptStreamStop /* && !connection.isInitiator */ ) { - if (!connection.privileges.canStopRemoteStream) { - connection.onstatechange({ - userid: response.userid, - extra: response.extra, - name: 'stop-request-denied', - reason: response.userid + ' tried to stop your stream; however "privileges.canStopRemoteStream" is "false".' - }); - return; - } - warn('Remote stream has been manually stopped!'); - if (connection.streams[response.streamid]) { - connection.streams[response.streamid].stop(); - } - } - - if (response.left) { - // firefox is unable to stop remote streams - // firefox doesn't auto stop streams when peer.close() is called. - if (isFirefox) { - var userLeft = response.userid; - for (var stream in connection.streams) { - stream = connection.streams[stream]; - if (stream.userid == userLeft) { - connection.stopMediaStream(stream); - onStreamEndedHandler(stream, connection); - } - } - } - - if (peer && peer.connection) { - // todo: verify if-block's 2nd condition - if (peer.connection.signalingState != 'closed' && peer.connection.iceConnectionState.search(/disconnected|failed/gi) == -1) { - peer.connection.close(); - } - peer.connection = null; - } - - if (participants[response.userid]) delete participants[response.userid]; - - if (response.closeEntireSession) { - connection.onSessionClosed(response); - connection.leave(); - return; - } - - connection.remove(response.userid); - - onLeaveHandler({ - userid: response.userid, - extra: response.extra || {}, - entireSessionClosed: !!response.closeEntireSession - }, connection); - } - - // keeping session active even if initiator leaves - if (response.playRoleOfBroadcaster) { - if (response.extra) { - // clone extra-data from initial moderator - connection.extra = merge(connection.extra, response.extra); - } - if (response.participants) { - participants = response.participants; - - // make sure that if 2nd initiator leaves; control is shifted to 3rd person. - if (participants[connection.userid]) { - delete participants[connection.userid]; - } - - if (sockets[0] && sockets[0].userid == response.userid) { - delete sockets[0]; - sockets = swap(sockets); - } - - if (socketObjects[response.userid]) { - delete socketObjects[response.userid]; - } - } - - setTimeout(connection.playRoleOfInitiator, 2000); - } - - if (response.changeBandwidth) { - if (!connection.peers[response.userid]) throw 'No such peer exists.'; - - // synchronize bandwidth - connection.peers[response.userid].peer.bandwidth = response.bandwidth; - - // renegotiate to apply bandwidth - connection.peers[response.userid].renegotiate(); - } - - if (response.customMessage) { - if (!connection.peers[response.userid]) throw 'No such peer exists.'; - if (response.message.ejected) { - if (connection.sessionDescriptions[connection.sessionid].userid != response.userid) { - throw 'only initiator can eject a user.'; - } - // initiator ejected this user - connection.leave(); - - connection.onSessionClosed({ - userid: response.userid, - extra: response.extra || _config.extra, - isEjected: true - }); - } else connection.peers[response.userid].onCustomMessage(response.message); - } - - if (response.drop) { - if (!connection.peers[response.userid]) throw 'No such peer exists.'; - connection.peers[response.userid].drop(true); - connection.peers[response.userid].renegotiate(); - - connection.ondrop(response.userid); - } - - if (response.hold || response.unhold) { - if (!connection.peers[response.userid]) throw 'No such peer exists.'; - - if (response.takeAction) { - connection.peers[response.userid][!!response.hold ? 'hold' : 'unhold'](response.holdMLine); - return; - } - - connection.peers[response.userid].peer.hold = !!response.hold; - connection.peers[response.userid].peer.holdMLine = response.holdMLine; - - socket.send({ - isRenegotiate: true - }); - - connection.peers[response.userid].fireHoldUnHoldEvents({ - kind: response.holdMLine, - isHold: !!response.hold, - userid: response.userid - }); - } - - if (response.isRenegotiate) { - connection.peers[response.userid].renegotiate(null, connection.peers[response.userid].peer.session); - } - - // fake data channels! - if (response.fakeData) { - peerConfig.onmessage(response.fakeData); - } - - // sometimes we don't need to renegotiate e.g. when peers are disconnected - // or if it is firefox - if (response.recreatePeer) { - peer = new PeerConnection(); - } - - // remote video failed either out of ICE gathering process or ICE connectivity check-up - // or IceAgent was unable to locate valid candidates/ports. - if (response.failedToReceiveRemoteVideo) { - log('Remote peer hasn\'t received stream: ' + response.streamid + '. Renegotiating...'); - if (connection.peers[response.userid]) { - connection.peers[response.userid].renegotiate(); - } - } - - if (response.redial) { - if (connection.peers[response.userid]) { - if (connection.peers[response.userid].peer.connection.iceConnectionState != 'disconnected') { - _config.redialing = false; - } - - if (connection.peers[response.userid].peer.connection.iceConnectionState == 'disconnected' && !_config.redialing) { - _config.redialing = true; - - warn('Peer connection is closed.', toStr(connection.peers[response.userid].peer.connection), 'ReDialing..'); - connection.peers[response.userid].redial(); - } - } - } - } - - connection.playRoleOfInitiator = function() { - connection.dontCaptureUserMedia = true; - connection.open(); - sockets = swap(sockets); - connection.dontCaptureUserMedia = false; - }; - - connection.askToShareParticipants = function() { - defaultSocket && defaultSocket.send({ - askToShareParticipants: true - }); - }; - - connection.shareParticipants = function(args) { - var message = { - joinUsers: participants, - userid: connection.userid, - extra: connection.extra - }; - - if (args) { - if (args.dontShareWith) message.dontShareWith = args.dontShareWith; - if (args.shareWith) message.shareWith = args.shareWith; - } - - defaultSocket.send(message); - }; - - function sdpInvoker(sdp, labels) { - if (sdp.type == 'answer') { - peer.setRemoteDescription(sdp); - updateSocket(); - return; - } - if (!_config.renegotiate && sdp.type == 'offer') { - peerConfig.offerDescription = sdp; - - peerConfig.session = connection.session; - if (!peer) peer = new PeerConnection(); - peer.create('answer', peerConfig); - - updateSocket(); - return; - } - - var session = _config.renegotiate; - // detach streams - detachMediaStream(labels, peer.connection); - - if (session.oneway || isData(session)) { - createAnswer(); - delete _config.renegotiate; - } else { - if (_config.capturing) - return; - - _config.capturing = true; - - connection.captureUserMedia(function(stream) { - _config.capturing = false; - - peer.addStream(stream); - - connection.renegotiatedSessions[JSON.stringify(_config.renegotiate)] = { - session: _config.renegotiate, - stream: stream - }; - - delete _config.renegotiate; - - createAnswer(); - }, _config.renegotiate); - } - - function createAnswer() { - peer.recreateAnswer(sdp, session, function(_sdp, streaminfo) { - sendsdp({ - sdp: _sdp, - socket: socket, - streaminfo: streaminfo - }); - connection.detachStreams = []; - }); - } - } - } - - function detachMediaStream(labels, peer) { - if (!labels) return; - for (var i = 0; i < labels.length; i++) { - var label = labels[i]; - if (connection.streams[label]) { - peer.removeStream(connection.streams[label].stream); - } - } - } - - function sendsdp(e) { - e.socket.send({ - sdp: JSON.stringify({ - sdp: e.sdp.sdp, - type: e.sdp.type - }), - renegotiate: !!e.renegotiate ? e.renegotiate : false, - streaminfo: e.streaminfo || '', - labels: e.labels || [], - preferSCTP: !!connection.preferSCTP, - fakeDataChannels: !!connection.fakeDataChannels, - isInitiator: !!connection.isInitiator, - userinfo: { - browser: isFirefox ? 'firefox' : 'chrome' - } - }); - } - - // sharing new user with existing participants - - function onNewParticipant(response) { - var channel = response.newParticipant; - - if (!channel || !!participants[channel] || channel == connection.userid) - return; - - var new_channel = connection.token(); - newPrivateSocket({ - channel: new_channel, - extra: response.userData ? response.userData.extra : response.extra, - userid: response.userData ? response.userData.userid : response.userid - }); - - defaultSocket.send({ - participant: true, - targetUser: channel, - channel: new_channel - }); - } - - // if a user leaves - - function clearSession() { - connection.numberOfConnectedUsers--; - - var alertMessage = { - left: true, - extra: connection.extra || {}, - userid: connection.userid, - sessionid: connection.sessionid - }; - - if (connection.isInitiator) { - // if initiator wants to close entire session - if (connection.autoCloseEntireSession) { - alertMessage.closeEntireSession = true; - } else if (sockets[0]) { - // shift initiation control to another user - sockets[0].send({ - playRoleOfBroadcaster: true, - userid: connection.userid, - extra: connection.extra, - participants: participants - }); - } - } - - sockets.forEach(function(socket, i) { - socket.send(alertMessage); - - if (socketObjects[socket.channel]) { - delete socketObjects[socket.channel]; - } - - delete sockets[i]; - }); - - sockets = swap(sockets); - - connection.refresh(); - - webAudioMediaStreamSources.forEach(function(mediaStreamSource) { - // if source is connected; then chrome will crash on unload. - mediaStreamSource.disconnect(); - }); - - webAudioMediaStreamSources = []; - } - - // www.RTCMultiConnection.org/docs/remove/ - connection.remove = function(userid) { - if (rtcMultiSession.requestsFrom && rtcMultiSession.requestsFrom[userid]) delete rtcMultiSession.requestsFrom[userid]; - - if (connection.peers[userid]) { - if (connection.peers[userid].peer && connection.peers[userid].peer.connection) { - if (connection.peers[userid].peer.connection.signalingState != 'closed') { - connection.peers[userid].peer.connection.close(); - } - connection.peers[userid].peer.connection = null; - } - delete connection.peers[userid]; - } - if (participants[userid]) { - delete participants[userid]; - } - - for (var stream in connection.streams) { - stream = connection.streams[stream]; - if (stream.userid == userid) { - onStreamEndedHandler(stream, connection); - delete connection.streams[stream]; - } - } - - if (socketObjects[userid]) { - delete socketObjects[userid]; - } - }; - - // www.RTCMultiConnection.org/docs/refresh/ - connection.refresh = function() { - // if firebase; remove data from firebase servers - if (connection.isInitiator && !!connection.socket && !!connection.socket.remove) { - connection.socket.remove(); - } - - participants = {}; - - // to stop/remove self streams - for (var i = 0; i < connection.attachStreams.length; i++) { - connection.stopMediaStream(connection.attachStreams[i]); - } - - // to allow capturing of identical streams - currentUserMediaRequest = { - streams: [], - mutex: false, - queueRequests: [] - }; - - rtcMultiSession.isOwnerLeaving = true; - - connection.isInitiator = false; - connection.isAcceptNewSession = true; - connection.attachMediaStreams = []; - connection.sessionDescription = null; - connection.sessionDescriptions = {}; - connection.localStreamids = []; - connection.preRecordedMedias = {}; - connection.snapshots = {}; - - connection.numberOfConnectedUsers = 0; - connection.numberOfSessions = 0; - - connection.attachStreams = []; - connection.detachStreams = []; - connection.fileQueue = {}; - connection.channels = {}; - connection.renegotiatedSessions = {}; - - for (var peer in connection.peers) { - if (peer != connection.userid) { - delete connection.peers[peer]; - } - } - - // to make sure remote streams are also removed! - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - onStreamEndedHandler(connection.streams[stream], connection); - delete connection.streams[stream]; - } - } - - socketObjects = {}; - sockets = []; - participants = {}; - }; - - // www.RTCMultiConnection.org/docs/reject/ - connection.reject = function(userid) { - if (!isString(userid)) userid = userid.userid; - defaultSocket.send({ - rejectedRequestOf: userid - }); - - // remove relevant data to allow him join again - connection.remove(userid); - }; - - rtcMultiSession.leaveHandler = function(e) { - if (!connection.leaveOnPageUnload) return; - - if (isNull(e.keyCode)) { - return clearSession(); - } - - if (e.keyCode == 116) { - clearSession(); - } - }; - - listenEventHandler('beforeunload', rtcMultiSession.leaveHandler); - listenEventHandler('keyup', rtcMultiSession.leaveHandler); - - rtcMultiSession.onLineOffLineHandler = function() { - if (!navigator.onLine) { - rtcMultiSession.isOffLine = true; - } else if (rtcMultiSession.isOffLine) { - rtcMultiSession.isOffLine = !navigator.onLine; - - // defaultSocket = getDefaultSocketRef(); - - // pending tasks should be resumed? - // sockets should be reconnected? - // peers should be re-established? - } - }; - - listenEventHandler('load', rtcMultiSession.onLineOffLineHandler); - listenEventHandler('online', rtcMultiSession.onLineOffLineHandler); - listenEventHandler('offline', rtcMultiSession.onLineOffLineHandler); - - function onSignalingReady() { - if (rtcMultiSession.signalingReady) return; - rtcMultiSession.signalingReady = true; - - setTimeout(callbackForSignalingReady, 1000); - - if (!connection.isInitiator) { - // as soon as signaling gateway is connected; - // user should check existing rooms! - defaultSocket && defaultSocket.send({ - searchingForRooms: true - }); - } - } - - function joinParticipants(joinUsers) { - for (var user in joinUsers) { - if (!participants[joinUsers[user]]) { - onNewParticipant({ - sessionid: connection.sessionid, - newParticipant: joinUsers[user], - userid: connection.userid, - extra: connection.extra - }); - } - } - } - - function getDefaultSocketRef() { - return connection.openSignalingChannel({ - onmessage: function(response) { - // RMS == RTCMultiSession - if (isRMSDeleted) return; - - // if message is sent by same user - if (response.userid == connection.userid) return; - - if (response.sessionid && response.userid) { - if (!connection.sessionDescriptions[response.sessionid]) { - connection.numberOfSessions++; - connection.sessionDescriptions[response.sessionid] = response; - - // fire "onNewSession" only if: - // 1) "isAcceptNewSession" boolean is true - // 2) "sessionDescriptions" object isn't having same session i.e. to prevent duplicate invocations - if (connection.isAcceptNewSession) { - - if (!connection.dontOverrideSession) { - connection.session = response.session; - } - - onNewSession(response); - } - } - } - - if (response.newParticipant && !connection.isAcceptNewSession && rtcMultiSession.broadcasterid === response.userid) { - if (response.newParticipant != connection.userid) { - onNewParticipant(response); - } - } - - if (getLength(participants) < connection.maxParticipantsAllowed && response.targetUser == connection.userid && response.participant) { - if (connection.peers[response.userid] && !connection.peers[response.userid].peer) { - delete participants[response.userid]; - delete connection.peers[response.userid]; - connection.isAcceptNewSession = true; - return acceptRequest(response); - } - - if (!participants[response.userid]) { - acceptRequest(response); - } - } - - if (response.acceptedRequestOf == connection.userid) { - connection.onstatechange({ - userid: response.userid, - extra: response.extra, - name: 'request-accepted', - reason: response.userid + ' accepted your participation request.' - }); - } - - if (response.rejectedRequestOf == connection.userid) { - connection.onstatechange({ - userid: response.userid, - extra: response.extra, - name: 'request-rejected', - reason: response.userid + ' rejected your participation request.' - }); - } - - if (response.customMessage) { - if (response.message.drop) { - connection.ondrop(response.userid); - - connection.attachStreams = []; - // "drop" should detach all local streams - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - stream = connection.streams[stream]; - if (stream.type == 'local') { - connection.detachStreams.push(stream.streamid); - onStreamEndedHandler(stream, connection); - } else onStreamEndedHandler(stream, connection); - } - } - - if (response.message.renegotiate) { - // renegotiate; so "peer.removeStream" happens. - connection.renegotiate(); - } - } else if (connection.onCustomMessage) { - connection.onCustomMessage(response.message); - } - } - - if (connection.isInitiator && response.searchingForRooms) { - defaultSocket && defaultSocket.send({ - sessionDescription: connection.sessionDescription, - responseFor: response.userid - }); - } - - if (response.sessionDescription && response.responseFor == connection.userid) { - var sessionDescription = response.sessionDescription; - if (!connection.sessionDescriptions[sessionDescription.sessionid]) { - connection.numberOfSessions++; - connection.sessionDescriptions[sessionDescription.sessionid] = sessionDescription; - } - } - - if (connection.isInitiator && response.askToShareParticipants && defaultSocket) { - connection.shareParticipants({ - shareWith: response.userid - }); - } - - // participants are shared with single user - if (response.shareWith == connection.userid && response.dontShareWith != connection.userid && response.joinUsers) { - joinParticipants(response.joinUsers); - } - - // participants are shared with all users - if (!response.shareWith && response.joinUsers) { - if (response.dontShareWith) { - if (connection.userid != response.dontShareWith) { - joinParticipants(response.joinUsers); - } - } else joinParticipants(response.joinUsers); - } - - if (response.messageFor == connection.userid && response.presenceState) { - if (response.presenceState == 'checking') { - defaultSocket.send({ - messageFor: response.userid, - presenceState: 'available', - _config: response._config - }); - log('participant asked for availability'); - } - - if (response.presenceState == 'available') { - rtcMultiSession.presenceState = 'available'; - - connection.onstatechange({ - userid: 'browser', - extra: {}, - name: 'room-available', - reason: 'Initiator is available and room is active.' - }); - - joinSession(response._config); - } - } - - if (response.donotJoin && response.messageFor == connection.userid) { - log(response.userid, 'is not joining your room.'); - } - - // if initiator disconnects sockets, participants should also disconnect - if (response.isDisconnectSockets) { - log('Disconnecting your sockets because initiator also disconnected his sockets.'); - connection.disconnect(); - } - }, - callback: function(socket) { - socket && this.onopen(socket); - }, - onopen: function(socket) { - if (socket) defaultSocket = socket; - if (onSignalingReady) onSignalingReady(); - - rtcMultiSession.defaultSocket = defaultSocket; - - if (!defaultSocket.__push) { - defaultSocket.__push = defaultSocket.send; - defaultSocket.send = function(message) { - message.userid = message.userid || connection.userid; - message.extra = message.extra || connection.extra || {}; - - defaultSocket.__push(message); - }; - } - } - }); - } - - // default-socket is a common socket shared among all users in a specific channel; - // to share participation requests; room descriptions; and other stuff. - var defaultSocket = getDefaultSocketRef(); - - rtcMultiSession.defaultSocket = defaultSocket; - - if (defaultSocket && onSignalingReady) setTimeout(onSignalingReady, 2000); - - if (connection.session.screen) { - loadScreenFrame(); - } - // CUSTOM CODE // - - /* Commenting this - connection.getExternalIceServers && loadIceFrame(function(iceServers) - { - connection.iceServers = connection.iceServers.concat(iceServers); - }); - */ - - // CUSTOM CODE // - - if (connection.log == false) connection.skipLogs(); - if (connection.onlog) { - log = warn = error = function() { - var log = {}; - var index = 0; - Array.prototype.slice.call(arguments).forEach(function(argument) { - log[index++] = toStr(argument); - }); - toStr = function(str) { - return str; - }; - connection.onlog(log); - }; - } - - function setDirections() { - var userMaxParticipantsAllowed = 0; - - // if user has set a custom max participant setting, remember it - if (connection.maxParticipantsAllowed != 256) { - userMaxParticipantsAllowed = connection.maxParticipantsAllowed; - } - - if (connection.direction == 'one-way') connection.session.oneway = true; - if (connection.direction == 'one-to-one') connection.maxParticipantsAllowed = 1; - if (connection.direction == 'one-to-many') connection.session.broadcast = true; - if (connection.direction == 'many-to-many') { - if (!connection.maxParticipantsAllowed || connection.maxParticipantsAllowed == 1) { - connection.maxParticipantsAllowed = 256; - } - } - - // if user has set a custom max participant setting, set it back - if (userMaxParticipantsAllowed && connection.maxParticipantsAllowed != 1) { - connection.maxParticipantsAllowed = userMaxParticipantsAllowed; - } - } - - // open new session - this.initSession = function(args) { - rtcMultiSession.isOwnerLeaving = false; - - setDirections(); - participants = {}; - - rtcMultiSession.isOwnerLeaving = false; - - if (!isNull(args.transmitRoomOnce)) { - connection.transmitRoomOnce = args.transmitRoomOnce; - } - - function transmit() { - if (defaultSocket && getLength(participants) < connection.maxParticipantsAllowed && !rtcMultiSession.isOwnerLeaving) { - defaultSocket.send(connection.sessionDescription); - } - - if (!connection.transmitRoomOnce && !rtcMultiSession.isOwnerLeaving) - setTimeout(transmit, connection.interval || 3000); - } - - // todo: test and fix next line. - if (!args.dontTransmit /* || connection.transmitRoomOnce */ ) transmit(); - }; - - function joinSession(_config, skipOnStateChange) { - if (rtcMultiSession.donotJoin && rtcMultiSession.donotJoin == _config.sessionid) { - return; - } - - // dontOverrideSession allows you force RTCMultiConnection - // to not override default session for participants; - // by default, session is always overridden and set to the session coming from initiator! - if (!connection.dontOverrideSession) { - connection.session = _config.session || {}; - } - - // make sure that inappropriate users shouldn't receive onNewSession event - rtcMultiSession.broadcasterid = _config.userid; - - if (_config.sessionid) { - // used later to prevent external rooms messages to be used by this user! - connection.sessionid = _config.sessionid; - } - - connection.isAcceptNewSession = false; - - var channel = getRandomString(); - newPrivateSocket({ - channel: channel, - extra: _config.extra || {}, - userid: _config.userid - }); - - var offers = {}; - if (connection.attachStreams.length) { - var stream = connection.attachStreams[connection.attachStreams.length - 1]; - if (!!stream.getAudioTracks && stream.getAudioTracks().length) { - offers.audio = true; - } - if (stream.getVideoTracks().length) { - offers.video = true; - } - } - - if (!isEmpty(offers)) { - log(toStr(offers)); - } else log('Seems data-only connection.'); - - connection.onstatechange({ - userid: _config.userid, - extra: {}, - name: 'connecting-with-initiator', - reason: 'Checking presence of the initiator; and the room.' - }); - - defaultSocket.send({ - participant: true, - channel: channel, - targetUser: _config.userid, - session: connection.session, - offers: { - audio: !!offers.audio, - video: !!offers.video - } - }); - - connection.skipOnNewSession = false; - invokeMediaCaptured(connection); - } - - // join existing session - this.joinSession = function(_config) { - if (!defaultSocket) - return setTimeout(function() { - warn('Default-Socket is not yet initialized.'); - rtcMultiSession.joinSession(_config); - }, 1000); - - _config = _config || {}; - participants = {}; - - rtcMultiSession.presenceState = 'checking'; - - connection.onstatechange({ - userid: _config.userid, - extra: _config.extra || {}, - name: 'detecting-room-presence', - reason: 'Checking presence of the room.' - }); - - function contactInitiator() { - defaultSocket.send({ - messageFor: _config.userid, - presenceState: rtcMultiSession.presenceState, - _config: { - userid: _config.userid, - extra: _config.extra || {}, - sessionid: _config.sessionid, - session: _config.session || false - } - }); - } - contactInitiator(); - - function checker() { - if (rtcMultiSession.presenceState == 'checking') { - warn('Unable to reach initiator. Trying again...'); - contactInitiator(); - setTimeout(function() { - if (rtcMultiSession.presenceState == 'checking') { - connection.onstatechange({ - userid: _config.userid, - extra: _config.extra || {}, - name: 'room-not-available', - reason: 'Initiator seems absent. Waiting for someone to open the room.' - }); - - connection.isAcceptNewSession = true; - setTimeout(checker, 2000); - } - }, 2000); - } - } - - setTimeout(checker, 3000); - }; - - connection.donotJoin = function(sessionid) { - rtcMultiSession.donotJoin = sessionid; - - var session = connection.sessionDescriptions[sessionid]; - if (!session) return; - - defaultSocket.send({ - donotJoin: true, - messageFor: session.userid, - sessionid: sessionid - }); - - participants = {}; - connection.isAcceptNewSession = true; - connection.sessionid = null; - }; - - // send file/data or text message - this.send = function(message, _channel) { - if (!(message instanceof ArrayBuffer || message instanceof DataView)) { - message = str2ab({ - extra: connection.extra, - userid: connection.userid, - data: message - }); - } - - if (_channel) { - if (_channel.readyState == 'open') { - _channel.send(message); - } - return; - } - - for (var dataChannel in connection.channels) { - var channel = connection.channels[dataChannel].channel; - if (channel.readyState == 'open') { - channel.send(message); - } - } - }; - - // leave session - this.leave = function() { - clearSession(); - }; - - // renegotiate new stream - this.addStream = function(e) { - var session = e.renegotiate; - - if (!connection.renegotiatedSessions[JSON.stringify(e.renegotiate)]) { - connection.renegotiatedSessions[JSON.stringify(e.renegotiate)] = { - session: e.renegotiate, - stream: e.stream - }; - } - - if (e.socket) { - if (e.socket.userid != connection.userid) { - addStream(connection.peers[e.socket.userid]); - } - } else { - for (var peer in connection.peers) { - if (peer != connection.userid) { - addStream(connection.peers[peer]); - } - } - } - - function addStream(_peer) { - var socket = _peer.socket; - - if (!socket) { - warn(_peer, 'doesn\'t has socket.'); - return; - } - - updateSocketForLocalStreams(socket); - - if (!_peer || !_peer.peer) { - throw 'No peer to renegotiate.'; - } - - var peer = _peer.peer; - - if (e.stream) { - if (!peer.attachStreams) { - peer.attachStreams = []; - } - - peer.attachStreams.push(e.stream); - } - - // detaching old streams - detachMediaStream(connection.detachStreams, peer.connection); - - if (e.stream && (session.audio || session.video || session.screen)) { - peer.addStream(e.stream); - } - - peer.recreateOffer(session, function(sdp, streaminfo) { - sendsdp({ - sdp: sdp, - socket: socket, - renegotiate: session, - labels: connection.detachStreams, - streaminfo: streaminfo - }); - connection.detachStreams = []; - }); - } - }; - - // www.RTCMultiConnection.org/docs/request/ - connection.request = function(userid, extra) { - connection.captureUserMedia(function() { - // open private socket that will be used to receive offer-sdp - newPrivateSocket({ - channel: connection.userid, - extra: extra || {}, - userid: userid - }); - - // ask other user to create offer-sdp - defaultSocket.send({ - participant: true, - targetUser: userid - }); - }); - }; - - function acceptRequest(response) { - if (!rtcMultiSession.requestsFrom) rtcMultiSession.requestsFrom = {}; - if (rtcMultiSession.requestsFrom[response.userid]) return; - - var obj = { - userid: response.userid, - extra: response.extra, - channel: response.channel || response.userid, - session: response.session || connection.session - }; - - // check how participant is willing to join - if (response.offers) { - if (response.offers.audio && response.offers.video) { - log('target user has both audio/video streams.'); - } else if (response.offers.audio && !response.offers.video) { - log('target user has only audio stream.'); - } else if (!response.offers.audio && response.offers.video) { - log('target user has only video stream.'); - } else { - log('target user has no stream; it seems one-way streaming or data-only connection.'); - } - - var mandatory = connection.sdpConstraints.mandatory; - if (isNull(mandatory.OfferToReceiveAudio)) { - connection.sdpConstraints.mandatory.OfferToReceiveAudio = !!response.offers.audio; - } - if (isNull(mandatory.OfferToReceiveVideo)) { - connection.sdpConstraints.mandatory.OfferToReceiveVideo = !!response.offers.video; - } - - log('target user\'s SDP has?', toStr(connection.sdpConstraints.mandatory)); - } - - rtcMultiSession.requestsFrom[response.userid] = obj; - - // www.RTCMultiConnection.org/docs/onRequest/ - if (connection.onRequest && connection.isInitiator) { - connection.onRequest(obj); - } else _accept(obj); - } - - function _accept(e) { - if (rtcMultiSession.captureUserMediaOnDemand) { - rtcMultiSession.captureUserMediaOnDemand = false; - connection.captureUserMedia(function() { - _accept(e); - - invokeMediaCaptured(connection); - }); - return; - } - - log('accepting request from', e.userid); - participants[e.userid] = e.userid; - newPrivateSocket({ - isofferer: true, - userid: e.userid, - channel: e.channel, - extra: e.extra || {}, - session: e.session || connection.session - }); - } - - // www.RTCMultiConnection.org/docs/accept/ - connection.accept = function(e) { - // for backward compatibility - if (arguments.length > 1 && isString(arguments[0])) { - e = {}; - if (arguments[0]) e.userid = arguments[0]; - if (arguments[1]) e.extra = arguments[1]; - if (arguments[2]) e.channel = arguments[2]; - } - - connection.captureUserMedia(function() { - _accept(e); - }); - }; - - var isRMSDeleted = false; - this.disconnect = function() { - this.isOwnerLeaving = true; - - if (!connection.keepStreamsOpened) { - for (var streamid in connection.localStreams) { - connection.localStreams[streamid].stop(); - } - connection.localStreams = {}; - - currentUserMediaRequest = { - streams: [], - mutex: false, - queueRequests: [] - }; - } - - if (connection.isInitiator) { - defaultSocket.send({ - isDisconnectSockets: true - }); - } - - connection.refresh(); - - rtcMultiSession.defaultSocket = defaultSocket = null; - isRMSDeleted = true; - - connection.ondisconnected({ - userid: connection.userid, - extra: connection.extra, - peer: connection.peers[connection.userid], - isSocketsDisconnected: true - }); - - // if there is any peer still opened; close it. - connection.close(); - - window.removeEventListener('beforeunload', rtcMultiSession.leaveHandler); - window.removeEventListener('keyup', rtcMultiSession.leaveHandler); - - // it will not work, though :) - delete this; - - log('Disconnected your sockets, peers, streams and everything except RTCMultiConnection object.'); - }; - } - - var webAudioMediaStreamSources = []; - - function convertToAudioStream(mediaStream) { - if (!mediaStream) throw 'MediaStream is mandatory.'; - - if (mediaStream.getVideoTracks && !mediaStream.getVideoTracks().length) { - return mediaStream; - } - - var context = new AudioContext(); - var mediaStreamSource = context.createMediaStreamSource(mediaStream); - - var destination = context.createMediaStreamDestination(); - mediaStreamSource.connect(destination); - - webAudioMediaStreamSources.push(mediaStreamSource); - - return destination.stream; - } - - var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; - var isFirefox = typeof window.InstallTrigger !== 'undefined'; - var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; - var isChrome = !!window.chrome && !isOpera; - var isIE = !!document.documentMode; - - var isPluginRTC = isSafari || isIE; - - var isMobileDevice = !!navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i); - - // detect node-webkit - var isNodeWebkit = !!(window.process && (typeof window.process == 'object') && window.process.versions && window.process.versions['node-webkit']); - - window.MediaStream = window.MediaStream || window.webkitMediaStream; - window.AudioContext = window.AudioContext || window.webkitAudioContext; - - function getRandomString() { - // suggested by @rvulpescu from #154 - if (window.crypto && crypto.getRandomValues && navigator.userAgent.indexOf('Safari') == -1) { - var a = window.crypto.getRandomValues(new Uint32Array(3)), - token = ''; - for (var i = 0, l = a.length; i < l; i++) { - token += a[i].toString(36); - } - return token; - } else { - return (Math.random() * new Date().getTime()).toString(36).replace(/\./g, ''); - } - } - - var chromeVersion = 50; - var matchArray = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); - if (isChrome && matchArray && matchArray[2]) { - chromeVersion = parseInt(matchArray[2], 10); - } - - var firefoxVersion = 50; - matchArray = navigator.userAgent.match(/Firefox\/(.*)/); - if (isFirefox && matchArray && matchArray[1]) { - firefoxVersion = parseInt(matchArray[1], 10); - } - - function isData(session) { - return !session.audio && !session.video && !session.screen && session.data; - } - - function isNull(obj) { - return typeof obj == 'undefined'; - } - - function isString(obj) { - return typeof obj == 'string'; - } - - function isEmpty(session) { - var length = 0; - for (var s in session) { - length++; - } - return length == 0; - } - - // this method converts array-buffer into string - function ab2str(buf) { - var result = ''; - try { - result = String.fromCharCode.apply(null, new Uint16Array(buf)); - } catch (e) {} - return result; - } - - // this method converts string into array-buffer - function str2ab(str) { - if (!isString(str)) str = JSON.stringify(str); - - var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char - var bufView = new Uint16Array(buf); - for (var i = 0, strLen = str.length; i < strLen; i++) { - bufView[i] = str.charCodeAt(i); - } - return buf; - } - - function swap(arr) { - var swapped = [], - length = arr.length; - for (var i = 0; i < length; i++) - if (arr[i] && arr[i] !== true) - swapped.push(arr[i]); - return swapped; - } - - function forEach(obj, callback) { - for (var item in obj) { - callback(obj[item], item); - } - } - - var console = window.console || { - log: function() {}, - error: function() {}, - warn: function() {} - }; - - function log() { - console.log(arguments); - } - - function error() { - console.error(arguments); - } - - function warn() { - console.warn(arguments); - } - - if (isChrome || isFirefox || isSafari) { - var log = console.log.bind(console); - var error = console.error.bind(console); - var warn = console.warn.bind(console); - } - - function toStr(obj) { - return JSON.stringify(obj, function(key, value) { - if (value && value.sdp) { - log(value.sdp.type, '\t', value.sdp.sdp); - return ''; - } else return value; - }, '\t'); - } - - function getLength(obj) { - var length = 0; - for (var o in obj) - if (o) length++; - return length; - } - - // Get HTMLAudioElement/HTMLVideoElement accordingly - - function createMediaElement(stream, session) { - var mediaElement = document.createElement(stream.isAudio ? 'audio' : 'video'); - mediaElement.id = stream.streamid; - - if (isPluginRTC) { - var body = (document.body || document.documentElement); - body.insertBefore(mediaElement, body.firstChild); - - setTimeout(function() { - Plugin.attachMediaStream(mediaElement, stream) - }, 1000); - - return Plugin.attachMediaStream(mediaElement, stream); - } - - // "mozSrcObject" is always preferred over "src"!! - mediaElement[isFirefox ? 'mozSrcObject' : 'src'] = isFirefox ? stream : (window.URL || window.webkitURL).createObjectURL(stream); - - mediaElement.controls = true; - mediaElement.autoplay = !!session.remote; - mediaElement.muted = session.remote ? false : true; - - // http://goo.gl/WZ5nFl - // Firefox don't yet support onended for any stream (remote/local) - isFirefox && mediaElement.addEventListener('ended', function() { - stream.onended(); - }, false); - - mediaElement.play(); - - return mediaElement; - } - - var onStreamEndedHandlerFiredFor = {}; - - function onStreamEndedHandler(streamedObject, connection) { - if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode) return; - - if (onStreamEndedHandlerFiredFor[streamedObject.streamid]) return; - onStreamEndedHandlerFiredFor[streamedObject.streamid] = streamedObject; - connection.onstreamended(streamedObject); - } - - var onLeaveHandlerFiredFor = {}; - - function onLeaveHandler(event, connection) { - if (onLeaveHandlerFiredFor[event.userid]) return; - onLeaveHandlerFiredFor[event.userid] = event; - connection.onleave(event); - } - - function takeSnapshot(args) { - var userid = args.userid; - var connection = args.connection; - - function _takeSnapshot(video) { - var canvas = document.createElement('canvas'); - canvas.width = video.videoWidth || video.clientWidth; - canvas.height = video.videoHeight || video.clientHeight; - - var context = canvas.getContext('2d'); - context.drawImage(video, 0, 0, canvas.width, canvas.height); - - connection.snapshots[userid] = canvas.toDataURL('image/png'); - args.callback && args.callback(connection.snapshots[userid]); - } - - if (args.mediaElement) return _takeSnapshot(args.mediaElement); - - for (var stream in connection.streams) { - stream = connection.streams[stream]; - if (stream.userid == userid && stream.stream && stream.stream.getVideoTracks && stream.stream.getVideoTracks().length) { - _takeSnapshot(stream.mediaElement); - continue; - } - } - } - - function invokeMediaCaptured(connection) { - // to let user know that media resource has been captured - // now, he can share "sessionDescription" using sockets - if (connection.onMediaCaptured) { - connection.onMediaCaptured(); - delete connection.onMediaCaptured; - } - } - - function merge(mergein, mergeto) { - if (!mergein) mergein = {}; - if (!mergeto) return mergein; - - for (var item in mergeto) { - mergein[item] = mergeto[item]; - } - return mergein; - } - - function loadScript(src, onload) { - var script = document.createElement('script'); - script.src = src; - script.onload = function() { - log('loaded resource:', src); - if (onload) onload(); - }; - document.documentElement.appendChild(script); - } - - function capturePartOfScreen(args) { - var connection = args.connection; - var element = args.element; - - if (!window.html2canvas) { - return loadScript(connection.resources.html2canvas, function() { - capturePartOfScreen(args); - }); - } - - if (isString(element)) { - element = document.querySelector(element); - if (!element) element = document.getElementById(element); - } - if (!element) throw 'HTML DOM Element is not accessible!'; - - // todo: store DOM element somewhere to minimize DOM querying issues - - // html2canvas.js is used to take screenshots - html2canvas(element, { - onrendered: function(canvas) { - args.callback(canvas.toDataURL()); - } - }); - } - - function initFileBufferReader(connection, callback) { - if (!window.FileBufferReader) { - loadScript(connection.resources.FileBufferReader, function() { - initFileBufferReader(connection, callback); - }); - return; - } - - function _private(chunk) { - chunk.userid = chunk.extra.userid; - return chunk; - } - - var fileBufferReader = new FileBufferReader(); - fileBufferReader.onProgress = function(chunk) { - connection.onFileProgress(_private(chunk), chunk.uuid); - }; - - fileBufferReader.onBegin = function(file) { - connection.onFileStart(_private(file)); - }; - - fileBufferReader.onEnd = function(file) { - connection.onFileEnd(_private(file)); - }; - - callback(fileBufferReader); - } - - var screenFrame, loadedScreenFrame; - - function loadScreenFrame(skip) { - if (DetectRTC.screen.extensionid != ReservedExtensionID) { - return; - } - - if (loadedScreenFrame) return; - if (!skip) return loadScreenFrame(true); - - loadedScreenFrame = true; - - var iframe = document.createElement('iframe'); - iframe.onload = function() { - iframe.isLoaded = true; - log('Screen Capturing frame is loaded.'); - }; - //iframe.src = 'https://www.webrtc-experiment.com/getSourceId/'; - // CUSTOM CODE // - iframe.src = 'app/fusion/scripts/webrtc/getSourceId.html'; - // CUSTOM CODE // - iframe.style.display = 'none'; - (document.body || document.documentElement).appendChild(iframe); - - screenFrame = { - postMessage: function() { - if (!iframe.isLoaded) { - setTimeout(screenFrame.postMessage, 100); - return; - } - iframe.contentWindow.postMessage({ - captureSourceId: true - }, '*'); - } - }; - } - - var iceFrame, loadedIceFrame; - - function loadIceFrame(callback, skip) { - if (loadedIceFrame) return; - if (!skip) return loadIceFrame(callback, true); - - loadedIceFrame = true; - - var iframe = document.createElement('iframe'); - iframe.onload = function() { - iframe.isLoaded = true; - - listenEventHandler('message', iFrameLoaderCallback); - - function iFrameLoaderCallback(event) { - if (!event.data || !event.data.iceServers) return; - callback(event.data.iceServers); - - // this event listener is no more needed - window.removeEventListener('message', iFrameLoaderCallback); - } - - iframe.contentWindow.postMessage('get-ice-servers', '*'); - }; - iframe.src = 'https://cdn.webrtc-experiment.com/getIceServers/'; - iframe.style.display = 'none'; - (document.body || document.documentElement).appendChild(iframe); - } - - function muteOrUnmute(e) { - var stream = e.stream, - root = e.root, - session = e.session || {}, - enabled = e.enabled; - - if (!session.audio && !session.video) { - if (!isString(session)) { - session = merge(session, { - audio: true, - video: true - }); - } else { - session = { - audio: true, - video: true - }; - } - } - - // implementation from #68 - if (session.type) { - if (session.type == 'remote' && root.type != 'remote') return; - if (session.type == 'local' && root.type != 'local') return; - } - - log(enabled ? 'Muting' : 'UnMuting', 'session', toStr(session)); - - // enable/disable audio/video tracks - - if (root.type == 'local' && session.audio && !!stream.getAudioTracks) { - var audioTracks = stream.getAudioTracks()[0]; - if (audioTracks) - audioTracks.enabled = !enabled; - } - - if (root.type == 'local' && (session.video || session.screen) && !!stream.getVideoTracks) { - var videoTracks = stream.getVideoTracks()[0]; - if (videoTracks) - videoTracks.enabled = !enabled; - } - - root.sockets.forEach(function(socket) { - if (root.type == 'local') { - socket.send({ - streamid: root.streamid, - mute: !!enabled, - unmute: !enabled, - session: session - }); - } - - if (root.type == 'remote') { - socket.send({ - promptMuteUnmute: true, - streamid: root.streamid, - mute: !!enabled, - unmute: !enabled, - session: session - }); - } - }); - - if (root.type == 'remote') return; - - // According to issue #135, onmute/onumute must be fired for self - // "fakeObject" is used because we need to keep session for renegotiated streams; - // and MUST pass exact session over onStreamEndedHandler/onmute/onhold/etc. events. - var fakeObject = merge({}, root); - fakeObject.session = session; - - fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video; - fakeObject.isVideo = !!fakeObject.session.video; - fakeObject.isScreen = !!fakeObject.session.screen; - - if (!!enabled) { - // if muted stream is negotiated - stream.preMuted = { - audio: stream.getAudioTracks().length && !stream.getAudioTracks()[0].enabled, - video: stream.getVideoTracks().length && !stream.getVideoTracks()[0].enabled - }; - root.rtcMultiConnection.onmute(fakeObject); - } - - if (!enabled) { - stream.preMuted = {}; - root.rtcMultiConnection.onunmute(fakeObject); - } - } - - var Firefox_Screen_Capturing_Warning = 'Make sure that you are using Firefox Nightly and you enabled: media.getusermedia.screensharing.enabled flag from about:config page. You also need to add your domain in "media.getusermedia.screensharing.allowed_domains" flag. If you are using WinXP then also enable "media.getusermedia.screensharing.allow_on_old_platforms" flag. NEVER forget to use "only" HTTPs for screen capturing!'; - var SCREEN_COMMON_FAILURE = 'HTTPs i.e. SSL-based URI is mandatory to use screen capturing.'; - // CUSTOM CODE // - var ReservedExtensionID = 'icgmlogfeajbfdffajhoebcfbibfhaen'; - //var ReservedExtensionID = 'ajhifddimkapgcifgcodmmfdlknahffk'; - - // if application-developer deployed his own extension on Google App Store - var useCustomChromeExtensionForScreenCapturing = document.domain.indexOf('webrtc-experiment.com') != -1; - - function initHark(args) { - if (!window.hark) { - loadScript(args.connection.resources.hark, function() { - initHark(args); - }); - return; - } - - var connection = args.connection; - var streamedObject = args.streamedObject; - var stream = args.stream; - - var options = {}; - var speechEvents = hark(stream, options); - - speechEvents.on('speaking', function() { - if (connection.onspeaking) { - connection.onspeaking(streamedObject); - } - }); - - speechEvents.on('stopped_speaking', function() { - if (connection.onsilence) { - connection.onsilence(streamedObject); - } - }); - - speechEvents.on('volume_change', function(volume, threshold) { - if (connection.onvolumechange) { - connection.onvolumechange(merge({ - volume: volume, - threshold: threshold - }, streamedObject)); - } - }); - } - - attachEventListener = function(video, type, listener, useCapture) { - video.addEventListener(type, listener, useCapture); - }; - - var Plugin = window.PluginRTC || {}; - window.onPluginRTCInitialized = function(pluginRTCObject) { - Plugin = pluginRTCObject; - MediaStreamTrack = Plugin.MediaStreamTrack; - RTCPeerConnection = Plugin.RTCPeerConnection; - RTCIceCandidate = Plugin.RTCIceCandidate; - RTCSessionDescription = Plugin.RTCSessionDescription; - - log(isPluginRTC ? 'Java-Applet' : 'ActiveX', 'plugin has been loaded.'); - }; - if (!isEmpty(Plugin)) window.onPluginRTCInitialized(Plugin); - - // if IE or Safari - if (isPluginRTC) { - loadScript('https://cdn.webrtc-experiment.com/Plugin.EveryWhere.js'); - // loadScript('https://cdn.webrtc-experiment.com/Plugin.Temasys.js'); - } - - var MediaStream = window.MediaStream; - - if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') { - MediaStream = webkitMediaStream; - } - - /*global MediaStream:true */ - if (typeof MediaStream !== 'undefined' && !('stop' in MediaStream.prototype)) { - MediaStream.prototype.stop = function() { - this.getAudioTracks().forEach(function(track) { - track.stop(); - }); - - this.getVideoTracks().forEach(function(track) { - track.stop(); - }); - }; - } - - var defaultConstraints = { - mandatory: {}, - optional: [] - }; - - /* by @FreCap pull request #41 */ - var currentUserMediaRequest = { - streams: [], - mutex: false, - queueRequests: [] - }; - - function getUserMedia(options) { - if (isPluginRTC) { - if (!Plugin.getUserMedia) { - setTimeout(function() { - getUserMedia(options); - }, 1000); - return; - } - - return Plugin.getUserMedia(options.constraints || { - audio: true, - video: true - }, options.onsuccess, options.onerror); - } - - if (currentUserMediaRequest.mutex === true) { - currentUserMediaRequest.queueRequests.push(options); - return; - } - currentUserMediaRequest.mutex = true; - - var connection = options.connection; - - // tools.ietf.org/html/draft-alvestrand-constraints-resolution-00 - var mediaConstraints = options.mediaConstraints || {}; - var videoConstraints = typeof mediaConstraints.video == 'boolean' ? mediaConstraints.video : mediaConstraints.video || mediaConstraints; - var audioConstraints = typeof mediaConstraints.audio == 'boolean' ? mediaConstraints.audio : mediaConstraints.audio || defaultConstraints; - - var n = navigator; - var hints = options.constraints || { - audio: defaultConstraints, - video: defaultConstraints - }; - - if (hints.video && hints.video.mozMediaSource) { - // "mozMediaSource" is redundant - // need to check "mediaSource" instead. - videoConstraints = {}; - } - - if (hints.video == true) hints.video = defaultConstraints; - if (hints.audio == true) hints.audio = defaultConstraints; - - // connection.mediaConstraints.audio = false; - if (typeof audioConstraints == 'boolean' && hints.audio) { - hints.audio = audioConstraints; - } - - // connection.mediaConstraints.video = false; - if (typeof videoConstraints == 'boolean' && hints.video) { - hints.video = videoConstraints; - } - - // connection.mediaConstraints.audio.mandatory = {prop:true}; - var audioMandatoryConstraints = audioConstraints.mandatory; - if (!isEmpty(audioMandatoryConstraints)) { - hints.audio.mandatory = merge(hints.audio.mandatory, audioMandatoryConstraints); - } - - // connection.media.min(320,180); - // connection.media.max(1920,1080); - var videoMandatoryConstraints = videoConstraints.mandatory; - if (videoMandatoryConstraints) { - var mandatory = {}; - - if (videoMandatoryConstraints.minWidth) { - mandatory.minWidth = videoMandatoryConstraints.minWidth; - } - - if (videoMandatoryConstraints.minHeight) { - mandatory.minHeight = videoMandatoryConstraints.minHeight; - } - - if (videoMandatoryConstraints.maxWidth) { - mandatory.maxWidth = videoMandatoryConstraints.maxWidth; - } - - if (videoMandatoryConstraints.maxHeight) { - mandatory.maxHeight = videoMandatoryConstraints.maxHeight; - } - - if (videoMandatoryConstraints.minAspectRatio) { - mandatory.minAspectRatio = videoMandatoryConstraints.minAspectRatio; - } - - if (videoMandatoryConstraints.maxFrameRate) { - mandatory.maxFrameRate = videoMandatoryConstraints.maxFrameRate; - } - - if (videoMandatoryConstraints.minFrameRate) { - mandatory.minFrameRate = videoMandatoryConstraints.minFrameRate; - } - - if (mandatory.minWidth && mandatory.minHeight) { - // http://goo.gl/IZVYsj - var allowed = ['1920:1080', '1280:720', '960:720', '640:360', '640:480', '320:240', '320:180']; - - if (allowed.indexOf(mandatory.minWidth + ':' + mandatory.minHeight) == -1 || - allowed.indexOf(mandatory.maxWidth + ':' + mandatory.maxHeight) == -1) { - error('The min/max width/height constraints you passed "seems" NOT supported.', toStr(mandatory)); - } - - if (mandatory.minWidth > mandatory.maxWidth || mandatory.minHeight > mandatory.maxHeight) { - error('Minimum value must not exceed maximum value.', toStr(mandatory)); - } - - if (mandatory.minWidth >= 1280 && mandatory.minHeight >= 720) { - warn('Enjoy HD video! min/' + mandatory.minWidth + ':' + mandatory.minHeight + ', max/' + mandatory.maxWidth + ':' + mandatory.maxHeight); - } - } - - hints.video.mandatory = merge(hints.video.mandatory, mandatory); - } - - if (videoMandatoryConstraints) { - hints.video.mandatory = merge(hints.video.mandatory, videoMandatoryConstraints); - } - - // videoConstraints.optional = [{prop:true}]; - if (videoConstraints.optional && videoConstraints.optional instanceof Array && videoConstraints.optional.length) { - hints.video.optional = hints.video.optional ? hints.video.optional.concat(videoConstraints.optional) : videoConstraints.optional; - } - - // audioConstraints.optional = [{prop:true}]; - if (audioConstraints.optional && audioConstraints.optional instanceof Array && audioConstraints.optional.length) { - hints.audio.optional = hints.audio.optional ? hints.audio.optional.concat(audioConstraints.optional) : audioConstraints.optional; - } - - if (hints.video.mandatory && !isEmpty(hints.video.mandatory) && connection._mediaSources.video) { - hints.video.optional.forEach(function(video, index) { - if (video.sourceId == connection._mediaSources.video) { - delete hints.video.optional[index]; - } - }); - - hints.video.optional = swap(hints.video.optional); - - hints.video.optional.push({ - sourceId: connection._mediaSources.video - }); - } - - if (hints.audio.mandatory && !isEmpty(hints.audio.mandatory) && connection._mediaSources.audio) { - hints.audio.optional.forEach(function(audio, index) { - if (audio.sourceId == connection._mediaSources.audio) { - delete hints.audio.optional[index]; - } - }); - - hints.audio.optional = swap(hints.audio.optional); - - hints.audio.optional.push({ - sourceId: connection._mediaSources.audio - }); - } - - if (hints.video && !hints.video.mozMediaSource && hints.video.optional && hints.video.mandatory) { - if (!hints.video.optional.length && isEmpty(hints.video.mandatory)) { - hints.video = true; - } - } - - if (isMobileDevice) { - // Android fails for some constraints - // so need to force {audio:true,video:true} - hints = { - audio: !!hints.audio, - video: !!hints.video - }; - } - - // connection.mediaConstraints always overrides constraints - // passed from "captureUserMedia" function. - // todo: need to verify all possible situations - log('invoked getUserMedia with constraints:', toStr(hints)); - - // easy way to match - var idInstance = JSON.stringify(hints); - - function streaming(stream, returnBack, streamid) { - if (!streamid) streamid = getRandomString(); - - // localStreams object will store stream - // until it is removed using native-stop method. - connection.localStreams[streamid] = stream; - - var video = options.video; - if (video) { - video[isFirefox ? 'mozSrcObject' : 'src'] = isFirefox ? stream : (window.URL || window.webkitURL).createObjectURL(stream); - video.play(); - } - - options.onsuccess(stream, returnBack, idInstance, streamid); - currentUserMediaRequest.streams[idInstance] = { - stream: stream, - streamid: streamid - }; - currentUserMediaRequest.mutex = false; - if (currentUserMediaRequest.queueRequests.length) - getUserMedia(currentUserMediaRequest.queueRequests.shift()); - } - - if (currentUserMediaRequest.streams[idInstance]) { - streaming(currentUserMediaRequest.streams[idInstance].stream, true, currentUserMediaRequest.streams[idInstance].streamid); - } else { - n.getMedia = n.webkitGetUserMedia || n.mozGetUserMedia; - - // http://goo.gl/eETIK4 - n.getMedia(hints, streaming, function(error) { - options.onerror(error, hints); - }); - } - } - - var RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription; - var RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate; - - var RTCPeerConnection; - if (typeof mozRTCPeerConnection !== 'undefined') { - RTCPeerConnection = mozRTCPeerConnection; - } else if (typeof webkitRTCPeerConnection !== 'undefined') { - RTCPeerConnection = webkitRTCPeerConnection; - } else if (typeof window.RTCPeerConnection !== 'undefined') { - RTCPeerConnection = window.RTCPeerConnection; - } else { - console.error('WebRTC 1.0 (RTCPeerConnection) API seems NOT available in this browser.'); - } - - function setSdpConstraints(config) { - var sdpConstraints; - - var sdpConstraints_mandatory = { - OfferToReceiveAudio: !!config.OfferToReceiveAudio, - OfferToReceiveVideo: !!config.OfferToReceiveVideo - }; - - sdpConstraints = { - mandatory: sdpConstraints_mandatory, - optional: [{ - VoiceActivityDetection: false - }] - }; - - if (!!navigator.mozGetUserMedia && firefoxVersion > 34) { - sdpConstraints = { - OfferToReceiveAudio: !!config.OfferToReceiveAudio, - OfferToReceiveVideo: !!config.OfferToReceiveVideo - }; - } - - return sdpConstraints; - } - - function PeerConnection() { - return { - create: function(type, options) { - merge(this, options); - - var self = this; - - this.type = type; - this.init(); - this.attachMediaStreams(); - - if (isFirefox && this.session.data) { - if (this.session.data && type == 'offer') { - this.createDataChannel(); - } - - this.getLocalDescription(type); - - if (this.session.data && type == 'answer') { - this.createDataChannel(); - } - } else self.getLocalDescription(type); - - return this; - }, - getLocalDescription: function(createType) { - log('(getLocalDescription) peer createType is', createType); - - if (this.session.inactive && isNull(this.rtcMultiConnection.waitUntilRemoteStreamStartsFlowing)) { - // inactive session returns blank-stream - this.rtcMultiConnection.waitUntilRemoteStreamStartsFlowing = false; - } - - var self = this; - - if (createType == 'answer') { - this.setRemoteDescription(this.offerDescription, createDescription); - } else createDescription(); - - function createDescription() { - self.connection[createType == 'offer' ? 'createOffer' : 'createAnswer'](function(sessionDescription) { - sessionDescription.sdp = self.serializeSdp(sessionDescription.sdp, createType); - self.connection.setLocalDescription(sessionDescription); - - if (self.trickleIce) { - self.onSessionDescription(sessionDescription, self.streaminfo); - } - - if (sessionDescription.type == 'offer') { - log('offer sdp', sessionDescription.sdp); - } - - self.prevCreateType = createType; - }, self.onSdpError, self.constraints); - } - }, - serializeSdp: function(sdp, createType) { - // it is "connection.processSdp=function(sdp){return sdp;}" - sdp = this.processSdp(sdp); - - if (isFirefox) return sdp; - - if (this.session.inactive && !this.holdMLine) { - this.hold = true; - if ((this.session.screen || this.session.video) && this.session.audio) { - this.holdMLine = 'both'; - } else if (this.session.screen || this.session.video) { - this.holdMLine = 'video'; - } else if (this.session.audio) { - this.holdMLine = 'audio'; - } - } - - sdp = this.setBandwidth(sdp); - if (this.holdMLine == 'both') { - if (this.hold) { - this.prevSDP = sdp; - sdp = sdp.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive'); - } else if (this.prevSDP) { - if (!this.session.inactive) { - // it means that DTSL key exchange already happened for single or multiple media lines. - // this block checks, key-exchange must be happened for all media lines. - sdp = this.prevSDP; - - // todo: test it: makes sense? - if (chromeVersion <= 35) { - return sdp; - } - } - } - } else if (this.holdMLine == 'audio' || this.holdMLine == 'video') { - sdp = sdp.split('m='); - - var audio = ''; - var video = ''; - - if (sdp[1] && sdp[1].indexOf('audio') == 0) { - audio = 'm=' + sdp[1]; - } - if (sdp[2] && sdp[2].indexOf('audio') == 0) { - audio = 'm=' + sdp[2]; - } - - if (sdp[1] && sdp[1].indexOf('video') == 0) { - video = 'm=' + sdp[1]; - } - if (sdp[2] && sdp[2].indexOf('video') == 0) { - video = 'm=' + sdp[2]; - } - - if (this.holdMLine == 'audio') { - if (this.hold) { - this.prevSDP = sdp[0] + audio + video; - sdp = sdp[0] + audio.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive') + video; - } else if (this.prevSDP) { - sdp = this.prevSDP; - } - } - - if (this.holdMLine == 'video') { - if (this.hold) { - this.prevSDP = sdp[0] + audio + video; - sdp = sdp[0] + audio + video.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive'); - } else if (this.prevSDP) { - sdp = this.prevSDP; - } - } - } - - if (!this.hold && this.session.inactive) { - // transport.cc&l=852 - http://goo.gl/0FxxqG - // dtlstransport.h&l=234 - http://goo.gl/7E4sYF - // http://tools.ietf.org/html/rfc4340 - - // From RFC 4145, SDP setup attribute values. - // http://goo.gl/xETJEp && http://goo.gl/3Wgcau - if (createType == 'offer') { - sdp = sdp.replace(/a=setup:passive|a=setup:active|a=setup:holdconn/g, 'a=setup:actpass'); - } else { - sdp = sdp.replace(/a=setup:actpass|a=setup:passive|a=setup:holdconn/g, 'a=setup:active'); - } - - // whilst doing handshake, either media lines were "inactive" - // or no media lines were present - sdp = sdp.replace(/a=inactive/g, 'a=sendrecv'); - } - // this.session.inactive = false; - return sdp; - }, - init: function() { - this.setConstraints(); - this.connection = new RTCPeerConnection(this.iceServers, this.optionalArgument); - - if (this.session.data) { - log('invoked: createDataChannel'); - this.createDataChannel(); - } - - this.connection.onicecandidate = function(event) { - if (!event.candidate) { - if (!self.trickleIce) { - returnSDP(); - } - - return; - } - - if (!self.trickleIce) return; - - self.onicecandidate(event.candidate); - }; - - function returnSDP() { - if (self.returnedSDP) { - self.returnedSDP = false; - return; - }; - self.returnedSDP = true; - - self.onSessionDescription(self.connection.localDescription, self.streaminfo); - } - - this.connection.onaddstream = function(e) { - log('onaddstream', isPluginRTC ? e.stream : toStr(e.stream)); - - self.onaddstream(e.stream, self.session); - }; - - this.connection.onremovestream = function(e) { - self.onremovestream(e.stream); - }; - - this.connection.onsignalingstatechange = function() { - self.connection && self.oniceconnectionstatechange({ - iceConnectionState: self.connection.iceConnectionState, - iceGatheringState: self.connection.iceGatheringState, - signalingState: self.connection.signalingState - }); - }; - - this.connection.oniceconnectionstatechange = function() { - if (!self.connection) return; - - self.oniceconnectionstatechange({ - iceConnectionState: self.connection.iceConnectionState, - iceGatheringState: self.connection.iceGatheringState, - signalingState: self.connection.signalingState - }); - - if (self.trickleIce) return; - - if (self.connection.iceGatheringState == 'complete') { - log('iceGatheringState', self.connection.iceGatheringState); - returnSDP(); - } - }; - - var self = this; - }, - setBandwidth: function(sdp) { - if (isMobileDevice || isFirefox || !this.bandwidth) return sdp; - - var bandwidth = this.bandwidth; - - if (this.session.screen) { - if (!bandwidth.screen) { - warn('It seems that you are not using bandwidth for screen. Screen sharing is expected to fail.'); - } else if (bandwidth.screen < 300) { - warn('It seems that you are using wrong bandwidth value for screen. Screen sharing is expected to fail.'); - } - } - - // if screen; must use at least 300kbs - if (bandwidth.screen && this.session.screen) { - sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, ''); - sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + bandwidth.screen + '\r\n'); - } - - // remove existing bandwidth lines - if (bandwidth.audio || bandwidth.video || bandwidth.data) { - sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, ''); - } - - if (bandwidth.audio) { - sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:' + bandwidth.audio + '\r\n'); - } - - if (bandwidth.video) { - sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + (this.session.screen ? bandwidth.screen : bandwidth.video) + '\r\n'); - } - - if (bandwidth.data && !this.preferSCTP) { - sdp = sdp.replace(/a=mid:data\r\n/g, 'a=mid:data\r\nb=AS:' + bandwidth.data + '\r\n'); - } - - return sdp; - }, - setConstraints: function() { - var sdpConstraints = setSdpConstraints({ - OfferToReceiveAudio: !!this.session.audio, - OfferToReceiveVideo: !!this.session.video || !!this.session.screen - }); - - if (this.sdpConstraints.mandatory) { - sdpConstraints = setSdpConstraints(this.sdpConstraints.mandatory); - } - - this.constraints = sdpConstraints; - - if (this.constraints) { - log('sdp-constraints', toStr(this.constraints)); - } - - this.optionalArgument = { - optional: this.optionalArgument.optional || [], - mandatory: this.optionalArgument.mandatory || {} - }; - - if (!this.preferSCTP) { - this.optionalArgument.optional.push({ - RtpDataChannels: true - }); - } - - log('optional-argument', toStr(this.optionalArgument)); - - if (!isNull(this.iceServers)) { - var iceCandidates = this.rtcMultiConnection.candidates; - - var stun = iceCandidates.stun; - var turn = iceCandidates.turn; - var host = iceCandidates.host; - - if (!isNull(iceCandidates.reflexive)) stun = iceCandidates.reflexive; - if (!isNull(iceCandidates.relay)) turn = iceCandidates.relay; - - if (!host && !stun && turn) { - this.rtcConfiguration.iceTransports = 'relay'; - } else if (!host && !stun && !turn) { - this.rtcConfiguration.iceTransports = 'none'; - } - - this.iceServers = { - iceServers: this.iceServers, - iceTransports: this.rtcConfiguration.iceTransports - }; - } else this.iceServers = null; - - log('rtc-configuration', toStr(this.iceServers)); - }, - onSdpError: function(e) { - var message = toStr(e); - - if (message && message.indexOf('RTP/SAVPF Expects at least 4 fields') != -1) { - message = 'It seems that you are trying to interop RTP-datachannels with SCTP. It is not supported!'; - } - error('onSdpError:', message); - }, - onSdpSuccess: function() { - log('sdp success'); - }, - onMediaError: function(err) { - error(toStr(err)); - }, - setRemoteDescription: function(sessionDescription, onSdpSuccess) { - if (!sessionDescription) throw 'Remote session description should NOT be NULL.'; - - if (!this.connection) return; - - log('setting remote description', sessionDescription.type, sessionDescription.sdp); - - var self = this; - this.connection.setRemoteDescription( - new RTCSessionDescription(sessionDescription), - onSdpSuccess || this.onSdpSuccess, - function(error) { - if (error.search(/STATE_SENTINITIATE|STATE_INPROGRESS/gi) == -1) { - self.onSdpError(error); - } - } - ); - }, - addIceCandidate: function(candidate) { - var self = this; - if (isPluginRTC) { - RTCIceCandidate(candidate, function(iceCandidate) { - onAddIceCandidate(iceCandidate); - }); - } else onAddIceCandidate(new RTCIceCandidate(candidate)); - - function onAddIceCandidate(iceCandidate) { - self.connection.addIceCandidate(iceCandidate, function() { - log('added:', candidate.sdpMid, candidate.candidate); - }, function() { - error('onIceFailure', arguments, candidate.candidate); - }); - } - }, - createDataChannel: function(channelIdentifier) { - // skip 2nd invocation of createDataChannel - if (this.channels && this.channels.length) return; - - var self = this; - - if (!this.channels) this.channels = []; - - // protocol: 'text/chat', preset: true, stream: 16 - // maxRetransmits:0 && ordered:false && outOfOrderAllowed: false - var dataChannelDict = {}; - - if (this.dataChannelDict) dataChannelDict = this.dataChannelDict; - - if (isChrome && !this.preferSCTP) { - dataChannelDict.reliable = false; // Deprecated! - } - - log('dataChannelDict', toStr(dataChannelDict)); - - if (this.type == 'answer' || isFirefox) { - this.connection.ondatachannel = function(event) { - self.setChannelEvents(event.channel); - }; - } - - if ((isChrome && this.type == 'offer') || isFirefox) { - this.setChannelEvents( - this.connection.createDataChannel(channelIdentifier || 'channel', dataChannelDict) - ); - } - }, - setChannelEvents: function(channel) { - var self = this; - - channel.binaryType = 'arraybuffer'; - - if (this.dataChannelDict.binaryType) { - channel.binaryType = this.dataChannelDict.binaryType; - } - - channel.onmessage = function(event) { - self.onmessage(event.data); - }; - - var numberOfTimes = 0; - channel.onopen = function() { - channel.push = channel.send; - channel.send = function(data) { - if (self.connection.iceConnectionState == 'disconnected') { - return; - } - - if (channel.readyState.search(/closing|closed/g) != -1) { - return; - } - - if (channel.readyState.search(/connecting|open/g) == -1) { - return; - } - - if (channel.readyState == 'connecting') { - numberOfTimes++; - return setTimeout(function() { - if (numberOfTimes < 20) { - channel.send(data); - } else throw 'Number of times exceeded to wait for WebRTC data connection to be opened.'; - }, 1000); - } - try { - channel.push(data); - } catch (e) { - numberOfTimes++; - warn('Data transmission failed. Re-transmitting..', numberOfTimes, toStr(e)); - if (numberOfTimes >= 20) throw 'Number of times exceeded to resend data packets over WebRTC data channels.'; - setTimeout(function() { - channel.send(data); - }, 100); - } - }; - self.onopen(channel); - }; - - channel.onerror = function(event) { - self.onerror(event); - }; - - channel.onclose = function(event) { - self.onclose(event); - }; - - this.channels.push(channel); - }, - addStream: function(stream) { - if (!stream.streamid && !isIE) { - stream.streamid = getRandomString(); - } - - // todo: maybe need to add isAudio/isVideo/isScreen if missing? - - log('attaching stream:', stream.streamid, isPluginRTC ? stream : toStr(stream)); - - this.connection.addStream(stream); - - this.sendStreamId(stream); - this.getStreamInfo(); - }, - attachMediaStreams: function() { - var streams = this.attachStreams; - for (var i = 0; i < streams.length; i++) { - this.addStream(streams[i]); - } - }, - getStreamInfo: function() { - this.streaminfo = ''; - var streams = this.connection.getLocalStreams(); - for (var i = 0; i < streams.length; i++) { - if (i == 0) { - this.streaminfo = JSON.stringify({ - streamid: streams[i].streamid || '', - isScreen: !!streams[i].isScreen, - isAudio: !!streams[i].isAudio, - isVideo: !!streams[i].isVideo, - preMuted: streams[i].preMuted || {} - }); - } else { - this.streaminfo += '----' + JSON.stringify({ - streamid: streams[i].streamid || '', - isScreen: !!streams[i].isScreen, - isAudio: !!streams[i].isAudio, - isVideo: !!streams[i].isVideo, - preMuted: streams[i].preMuted || {} - }); - } - } - }, - recreateOffer: function(renegotiate, callback) { - log('recreating offer'); - - this.type = 'offer'; - this.session = renegotiate; - - // todo: make sure this doesn't affect renegotiation scenarios - // this.setConstraints(); - - this.onSessionDescription = callback; - this.getStreamInfo(); - - // one can renegotiate data connection in existing audio/video/screen connection! - if (this.session.data) { - this.createDataChannel(); - } - - this.getLocalDescription('offer'); - }, - recreateAnswer: function(sdp, session, callback) { - // if(isFirefox) this.create(this.type, this); - - log('recreating answer'); - - this.type = 'answer'; - this.session = session; - - // todo: make sure this doesn't affect renegotiation scenarios - // this.setConstraints(); - - this.onSessionDescription = callback; - this.offerDescription = sdp; - this.getStreamInfo(); - - // one can renegotiate data connection in existing audio/video/screen connection! - if (this.session.data) { - this.createDataChannel(); - } - - this.getLocalDescription('answer'); - } - }; - } - - var FileSaver = { - SaveToDisk: invokeSaveAsDialog - }; - - - function invokeSaveAsDialog(fileUrl, fileName) { - /* - if (typeof navigator.msSaveOrOpenBlob !== 'undefined') { - return navigator.msSaveOrOpenBlob(file, fileFullName); - } else if (typeof navigator.msSaveBlob !== 'undefined') { - return navigator.msSaveBlob(file, fileFullName); - } - */ - - var hyperlink = document.createElement('a'); - hyperlink.href = fileUrl; - hyperlink.target = '_blank'; - hyperlink.download = fileName || fileUrl; - - if (!!navigator.mozGetUserMedia) { - hyperlink.onclick = function() { - (document.body || document.documentElement).removeChild(hyperlink); - }; - (document.body || document.documentElement).appendChild(hyperlink); - } - - var evt = new MouseEvent('click', { - view: window, - bubbles: true, - cancelable: true - }); - - hyperlink.dispatchEvent(evt); - - if (!navigator.mozGetUserMedia) { - URL.revokeObjectURL(hyperlink.href); - } - } - - var TextSender = { - send: function(config) { - var connection = config.connection; - - if (config.text instanceof ArrayBuffer || config.text instanceof DataView) { - return config.channel.send(config.text, config._channel); - } - - var channel = config.channel, - _channel = config._channel, - initialText = config.text, - packetSize = connection.chunkSize || 1000, - textToTransfer = '', - isobject = false; - - if (!isString(initialText)) { - isobject = true; - initialText = JSON.stringify(initialText); - } - - // uuid is used to uniquely identify sending instance - var uuid = getRandomString(); - var sendingTime = new Date().getTime(); - - sendText(initialText); - - function sendText(textMessage, text) { - var data = { - type: 'text', - uuid: uuid, - sendingTime: sendingTime - }; - - if (textMessage) { - text = textMessage; - data.packets = parseInt(text.length / packetSize); - } - - if (text.length > packetSize) - data.message = text.slice(0, packetSize); - else { - data.message = text; - data.last = true; - data.isobject = isobject; - } - - channel.send(data, _channel); - - textToTransfer = text.slice(data.message.length); - - if (textToTransfer.length) { - setTimeout(function() { - sendText(null, textToTransfer); - }, connection.chunkInterval || 100); - } - } - } - }; - - function TextReceiver(connection) { - var content = {}; - - function receive(data, userid, extra) { - // uuid is used to uniquely identify sending instance - var uuid = data.uuid; - if (!content[uuid]) content[uuid] = []; - - content[uuid].push(data.message); - if (data.last) { - var message = content[uuid].join(''); - if (data.isobject) message = JSON.parse(message); - - // latency detection - var receivingTime = new Date().getTime(); - var latency = receivingTime - data.sendingTime; - - var e = { - data: message, - userid: userid, - extra: extra, - latency: latency - }; - - if (message.preRecordedMediaChunk) { - if (!connection.preRecordedMedias[message.streamerid]) { - connection.shareMediaFile(null, null, message.streamerid); - } - connection.preRecordedMedias[message.streamerid].onData(message.chunk); - } else if (connection.autoTranslateText) { - e.original = e.data; - connection.Translator.TranslateText(e.data, function(translatedText) { - e.data = translatedText; - connection.onmessage(e); - }); - } else if (message.isPartOfScreen) { - connection.onpartofscreen(message); - } else connection.onmessage(e); - - delete content[uuid]; - } - } - - return { - receive: receive - }; - } - - // Last time updated at Sep 25, 2015, 08:32:23 - - // Latest file can be found here: https://cdn.webrtc-experiment.com/DetectRTC.js - - // Muaz Khan - www.MuazKhan.com - // MIT License - www.WebRTC-Experiment.com/licence - // Documentation - github.com/muaz-khan/DetectRTC - // ____________ - // DetectRTC.js - - // DetectRTC.hasWebcam (has webcam device!) - // DetectRTC.hasMicrophone (has microphone device!) - // DetectRTC.hasSpeakers (has speakers!) - - (function() { - - 'use strict'; - - var navigator = window.navigator; - - if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) { - // Firefox 38+ seems having support of enumerateDevices - // Thanks @xdumaine/enumerateDevices - navigator.enumerateDevices = function(callback) { - navigator.mediaDevices.enumerateDevices().then(callback); - }; - } - - if (typeof navigator !== 'undefined') { - if (typeof navigator.webkitGetUserMedia !== 'undefined') { - navigator.getUserMedia = navigator.webkitGetUserMedia; - } - - if (typeof navigator.mozGetUserMedia !== 'undefined') { - navigator.getUserMedia = navigator.mozGetUserMedia; - } - } else { - navigator = { - getUserMedia: function() {} - }; - } - - var isMobileDevice = !!navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i); - var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob); - - // this one can also be used: - // https://www.websocket.org/js/stuff.js (DetectBrowser.js) - - function getBrowserInfo() { - var nVer = navigator.appVersion; - var nAgt = navigator.userAgent; - var browserName = navigator.appName; - var fullVersion = '' + parseFloat(navigator.appVersion); - var majorVersion = parseInt(navigator.appVersion, 10); - var nameOffset, verOffset, ix; - - // In Opera, the true version is after 'Opera' or after 'Version' - if ((verOffset = nAgt.indexOf('Opera')) !== -1) { - browserName = 'Opera'; - fullVersion = nAgt.substring(verOffset + 6); - - if ((verOffset = nAgt.indexOf('Version')) !== -1) { - fullVersion = nAgt.substring(verOffset + 8); - } - } - // In MSIE, the true version is after 'MSIE' in userAgent - else if ((verOffset = nAgt.indexOf('MSIE')) !== -1) { - browserName = 'IE'; - fullVersion = nAgt.substring(verOffset + 5); - } - // In Chrome, the true version is after 'Chrome' - else if ((verOffset = nAgt.indexOf('Chrome')) !== -1) { - browserName = 'Chrome'; - fullVersion = nAgt.substring(verOffset + 7); - } - // In Safari, the true version is after 'Safari' or after 'Version' - else if ((verOffset = nAgt.indexOf('Safari')) !== -1) { - browserName = 'Safari'; - fullVersion = nAgt.substring(verOffset + 7); - - if ((verOffset = nAgt.indexOf('Version')) !== -1) { - fullVersion = nAgt.substring(verOffset + 8); - } - } - // In Firefox, the true version is after 'Firefox' - else if ((verOffset = nAgt.indexOf('Firefox')) !== -1) { - browserName = 'Firefox'; - fullVersion = nAgt.substring(verOffset + 8); - } - - // In most other browsers, 'name/version' is at the end of userAgent - else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) { - browserName = nAgt.substring(nameOffset, verOffset); - fullVersion = nAgt.substring(verOffset + 1); - - if (browserName.toLowerCase() === browserName.toUpperCase()) { - browserName = navigator.appName; - } - } - - if (isEdge) { - browserName = 'Edge'; - // fullVersion = navigator.userAgent.split('Edge/')[1]; - fullVersion = parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10); - } - - // trim the fullVersion string at semicolon/space if present - if ((ix = fullVersion.indexOf(';')) !== -1) { - fullVersion = fullVersion.substring(0, ix); - } - - if ((ix = fullVersion.indexOf(' ')) !== -1) { - fullVersion = fullVersion.substring(0, ix); - } - - majorVersion = parseInt('' + fullVersion, 10); - - if (isNaN(majorVersion)) { - fullVersion = '' + parseFloat(navigator.appVersion); - majorVersion = parseInt(navigator.appVersion, 10); - } - - return { - fullVersion: fullVersion, - version: majorVersion, - name: browserName - }; - } - - var isMobile = { - Android: function() { - return navigator.userAgent.match(/Android/i); - }, - BlackBerry: function() { - return navigator.userAgent.match(/BlackBerry/i); - }, - iOS: function() { - return navigator.userAgent.match(/iPhone|iPad|iPod/i); - }, - Opera: function() { - return navigator.userAgent.match(/Opera Mini/i); - }, - Windows: function() { - return navigator.userAgent.match(/IEMobile/i); - }, - any: function() { - return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); - }, - getOsName: function() { - var osName = 'Unknown OS'; - if (isMobile.Android()) { - osName = 'Android'; - } - - if (isMobile.BlackBerry()) { - osName = 'BlackBerry'; - } - - if (isMobile.iOS()) { - osName = 'iOS'; - } - - if (isMobile.Opera()) { - osName = 'Opera Mini'; - } - - if (isMobile.Windows()) { - osName = 'Windows'; - } - - return osName; - } - }; - - var osName = 'Unknown OS'; - - if (isMobile.any()) { - osName = isMobile.getOsName(); - } else { - if (navigator.appVersion.indexOf('Win') !== -1) { - osName = 'Windows'; - } - - if (navigator.appVersion.indexOf('Mac') !== -1) { - osName = 'MacOS'; - } - - if (navigator.appVersion.indexOf('X11') !== -1) { - osName = 'UNIX'; - } - - if (navigator.appVersion.indexOf('Linux') !== -1) { - osName = 'Linux'; - } - } - - - var isCanvasSupportsStreamCapturing = false; - var isVideoSupportsStreamCapturing = false; - ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function(item) { - // asdf - if (item in document.createElement('canvas')) { - isCanvasSupportsStreamCapturing = true; - } - - if (item in document.createElement('video')) { - isVideoSupportsStreamCapturing = true; - } - }); - - // via: https://github.com/diafygi/webrtc-ips - function DetectLocalIPAddress(callback) { - getIPs(function(ip) { - //local IPs - if (ip.match(/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/)) { - callback('Local: ' + ip); - } - - //assume the rest are public IPs - else { - callback('Public: ' + ip); - } - }); - } - - //get the IP addresses associated with an account - function getIPs(callback) { - var ipDuplicates = {}; - - //compatibility for firefox and chrome - var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; - var useWebKit = !!window.webkitRTCPeerConnection; - - // bypass naive webrtc blocking using an iframe - if (!RTCPeerConnection) { - var iframe = document.getElementById('iframe'); - if (!iframe) { - // - throw 'NOTE: you need to have an iframe in the page right above the script tag.'; - } - var win = iframe.contentWindow; - RTCPeerConnection = win.RTCPeerConnection || win.mozRTCPeerConnection || win.webkitRTCPeerConnection; - useWebKit = !!win.webkitRTCPeerConnection; - } - - //minimal requirements for data connection - var mediaConstraints = { - optional: [{ - RtpDataChannels: true - }] - }; - - //firefox already has a default stun server in about:config - // media.peerconnection.default_iceservers = - // [{"url": "stun:stun.services.mozilla.com"}] - var servers; - - //add same stun server for chrome - if (useWebKit) { - servers = { - iceServers: [{ - urls: 'stun:stun.services.mozilla.com' - }] - }; - - if (typeof DetectRTC !== 'undefined' && DetectRTC.browser.isFirefox && DetectRTC.browser.version <= 38) { - servers[0] = { - url: servers[0].urls - }; - } - } - - //construct a new RTCPeerConnection - var pc = new RTCPeerConnection(servers, mediaConstraints); - - function handleCandidate(candidate) { - //match just the IP address - var ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3})/; - var ipAddress = ipRegex.exec(candidate)[1]; - - //remove duplicates - if (ipDuplicates[ipAddress] === undefined) { - callback(ipAddress); - } - - ipDuplicates[ipAddress] = true; - } - - //listen for candidate events - pc.onicecandidate = function(ice) { - //skip non-candidate events - if (ice.candidate) { - handleCandidate(ice.candidate.candidate); - } - }; - - //create a bogus data channel - pc.createDataChannel(''); - - //create an offer sdp - pc.createOffer(function(result) { - - //trigger the stun server request - pc.setLocalDescription(result, function() {}, function() {}); - - }, function() {}); - - //wait for a while to let everything done - setTimeout(function() { - //read candidate info from local description - var lines = pc.localDescription.sdp.split('\n'); - - lines.forEach(function(line) { - if (line.indexOf('a=candidate:') === 0) { - handleCandidate(line); - } - }); - }, 1000); - } - - var MediaDevices = []; - - // ---------- Media Devices detection - var canEnumerate = false; - - /*global MediaStreamTrack:true */ - if (typeof MediaStreamTrack !== 'undefined' && 'getSources' in MediaStreamTrack) { - canEnumerate = true; - } else if (navigator.mediaDevices && !!navigator.mediaDevices.enumerateDevices) { - canEnumerate = true; - } - - var hasMicrophone = canEnumerate; - var hasSpeakers = canEnumerate; - var hasWebcam = canEnumerate; - - // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediadevices - // todo: switch to enumerateDevices when landed in canary. - function checkDeviceSupport(callback) { - // This method is useful only for Chrome! - - if (!navigator.enumerateDevices && window.MediaStreamTrack && window.MediaStreamTrack.getSources) { - navigator.enumerateDevices = window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack); - } - - if (!navigator.enumerateDevices && navigator.enumerateDevices) { - navigator.enumerateDevices = navigator.enumerateDevices.bind(navigator); - } - - if (!navigator.enumerateDevices) { - if (callback) { - callback(); - } - return; - } - - MediaDevices = []; - navigator.enumerateDevices(function(devices) { - devices.forEach(function(_device) { - var device = {}; - for (var d in _device) { - device[d] = _device[d]; - } - - var skip; - MediaDevices.forEach(function(d) { - if (d.id === device.id) { - skip = true; - } - }); - - if (skip) { - return; - } - - // if it is MediaStreamTrack.getSources - if (device.kind === 'audio') { - device.kind = 'audioinput'; - } - - if (device.kind === 'video') { - device.kind = 'videoinput'; - } - - if (!device.deviceId) { - device.deviceId = device.id; - } - - if (!device.id) { - device.id = device.deviceId; - } - - if (!device.label) { - device.label = 'Please invoke getUserMedia once.'; - if (!isHTTPs) { - device.label = 'HTTPs is required to get label of this ' + device.kind + ' device.'; - } - } - - if (device.kind === 'audioinput' || device.kind === 'audio') { - hasMicrophone = true; - } - - if (device.kind === 'audiooutput') { - hasSpeakers = true; - } - - if (device.kind === 'videoinput' || device.kind === 'video') { - hasWebcam = true; - } - - // there is no 'videoouput' in the spec. - - MediaDevices.push(device); - }); - - if (typeof DetectRTC !== 'undefined') { - DetectRTC.MediaDevices = MediaDevices; - DetectRTC.hasMicrophone = hasMicrophone; - DetectRTC.hasSpeakers = hasSpeakers; - DetectRTC.hasWebcam = hasWebcam; - } - - if (callback) { - callback(); - } - }); - } - - // check for microphone/camera support! - checkDeviceSupport(); - - var DetectRTC = {}; - - // ---------- - // DetectRTC.browser.name || DetectRTC.browser.version || DetectRTC.browser.fullVersion - DetectRTC.browser = getBrowserInfo(); - - // DetectRTC.isChrome || DetectRTC.isFirefox || DetectRTC.isEdge - DetectRTC.browser['is' + DetectRTC.browser.name] = true; - - var isHTTPs = location.protocol === 'https:'; - var isNodeWebkit = !!(window.process && (typeof window.process === 'object') && window.process.versions && window.process.versions['node-webkit']); - - // --------- Detect if system supports WebRTC 1.0 or WebRTC 1.1. - var isWebRTCSupported = false; - ['webkitRTCPeerConnection', 'mozRTCPeerConnection', 'RTCIceGatherer'].forEach(function(item) { - if (item in window) { - isWebRTCSupported = true; - } - }); - DetectRTC.isWebRTCSupported = isWebRTCSupported; - - //------- - DetectRTC.isORTCSupported = typeof RTCIceGatherer !== 'undefined'; - - // --------- Detect if system supports screen capturing API - var isScreenCapturingSupported = false; - if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 35) { - isScreenCapturingSupported = true; - } else if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 34) { - isScreenCapturingSupported = true; - } - - if (!isHTTPs) { - isScreenCapturingSupported = false; - } - DetectRTC.isScreenCapturingSupported = isScreenCapturingSupported; - - // --------- Detect if WebAudio API are supported - var webAudio = {}; - ['AudioContext', 'webkitAudioContext', 'mozAudioContext', 'msAudioContext'].forEach(function(item) { - if (webAudio.isSupported && webAudio.isCreateMediaStreamSourceSupported) { - return; - } - if (item in window) { - webAudio.isSupported = true; - - if ('createMediaStreamSource' in window[item].prototype) { - webAudio.isCreateMediaStreamSourceSupported = true; - } - } - }); - DetectRTC.isAudioContextSupported = webAudio.isSupported; - DetectRTC.isCreateMediaStreamSourceSupported = webAudio.isCreateMediaStreamSourceSupported; - - // ---------- Detect if SCTP/RTP channels are supported. - - var isRtpDataChannelsSupported = false; - if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 31) { - isRtpDataChannelsSupported = true; - } - DetectRTC.isRtpDataChannelsSupported = isRtpDataChannelsSupported; - - var isSCTPSupportd = false; - if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 28) { - isSCTPSupportd = true; - } else if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 25) { - isSCTPSupportd = true; - } else if (DetectRTC.browser.isOpera && DetectRTC.browser.version >= 11) { - isSCTPSupportd = true; - } - DetectRTC.isSctpDataChannelsSupported = isSCTPSupportd; - - // --------- - - DetectRTC.isMobileDevice = isMobileDevice; // "isMobileDevice" boolean is defined in "getBrowserInfo.js" - - // ------ - - DetectRTC.isWebSocketsSupported = 'WebSocket' in window && 2 === window.WebSocket.CLOSING; - DetectRTC.isWebSocketsBlocked = 'Checking'; - - if (DetectRTC.isWebSocketsSupported) { - /* CUSTOM CODE */ - var href = window.location.href; - var hostPatt = new RegExp(window.location.host +"/[^/]*"); - var res = hostPatt.exec(href); - var protocol = window.location.protocol.replace("http","ws"); - - var signalingServerPath = protocol + "//" + res + "/contact"; - var websocket = new WebSocket(signalingServerPath) - // var websocket = new WebSocket('wss://echo.websocket.org:443/'); - /* CUSTOM CODE */ - websocket.onopen = function() { - DetectRTC.isWebSocketsBlocked = false; - - if (DetectRTC.loadCallback) { - DetectRTC.loadCallback(); - } - }; - websocket.onerror = function() { - DetectRTC.isWebSocketsBlocked = true; - - if (DetectRTC.loadCallback) { - DetectRTC.loadCallback(); - } - }; - } - - // ------ - var isGetUserMediaSupported = false; - if (navigator.getUserMedia) { - isGetUserMediaSupported = true; - } else if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { - isGetUserMediaSupported = true; - } - if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 47 && !isHTTPs) { - DetectRTC.isGetUserMediaSupported = 'Requires HTTPs'; - } - DetectRTC.isGetUserMediaSupported = isGetUserMediaSupported; - - // ----------- - DetectRTC.osName = osName; // "osName" is defined in "detectOSName.js" - - // ---------- - DetectRTC.isCanvasSupportsStreamCapturing = isCanvasSupportsStreamCapturing; - DetectRTC.isVideoSupportsStreamCapturing = isVideoSupportsStreamCapturing; - - // ------ - DetectRTC.DetectLocalIPAddress = DetectLocalIPAddress; - - // ------- - DetectRTC.load = function(callback) { - this.loadCallback = callback; - - checkDeviceSupport(callback); - }; - - DetectRTC.MediaDevices = MediaDevices; - DetectRTC.hasMicrophone = hasMicrophone; - DetectRTC.hasSpeakers = hasSpeakers; - DetectRTC.hasWebcam = hasWebcam; - - // ------ - var isSetSinkIdSupported = false; - if ('setSinkId' in document.createElement('video')) { - isSetSinkIdSupported = true; - } - DetectRTC.isSetSinkIdSupported = isSetSinkIdSupported; - - // ----- - var isRTPSenderReplaceTracksSupported = false; - if (DetectRTC.browser.isFirefox /*&& DetectRTC.browser.version > 39*/ ) { - /*global mozRTCPeerConnection:true */ - if ('getSenders' in mozRTCPeerConnection.prototype) { - isRTPSenderReplaceTracksSupported = true; - } - } else if (DetectRTC.browser.isChrome) { - /*global webkitRTCPeerConnection:true */ - if ('getSenders' in webkitRTCPeerConnection.prototype) { - isRTPSenderReplaceTracksSupported = true; - } - } - DetectRTC.isRTPSenderReplaceTracksSupported = isRTPSenderReplaceTracksSupported; - - //------ - var isRemoteStreamProcessingSupported = false; - if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) { - isRemoteStreamProcessingSupported = true; - } - DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported; - - //------- - var isApplyConstraintsSupported = false; - - /*global MediaStreamTrack:true */ - if (typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) { - isApplyConstraintsSupported = true; - } - DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported; - - //------- - var isMultiMonitorScreenCapturingSupported = false; - if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) { - // version 43 merely supports platforms for multi-monitors - // version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing. - isMultiMonitorScreenCapturingSupported = true; - } - DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported; - - window.DetectRTC = DetectRTC; - - })(); - - // DetectRTC extender - var screenCallback; - - DetectRTC.screen = { - chromeMediaSource: 'screen', - extensionid: ReservedExtensionID, - getSourceId: function(callback) { - if (!callback) throw '"callback" parameter is mandatory.'; - - // make sure that chrome extension is installed. - if (!!DetectRTC.screen.status) { - onstatus(DetectRTC.screen.status); - } else DetectRTC.screen.getChromeExtensionStatus(onstatus); - - function onstatus(status) { - if (status == 'installed-enabled') { - screenCallback = callback; - window.postMessage('get-sourceId', '*'); - return; - } - - DetectRTC.screen.chromeMediaSource = 'screen'; - callback('No-Response'); // chrome extension isn't available - } - }, - onMessageCallback: function(data) { - if (!(isString(data) || !!data.sourceId)) return; - - log('chrome message', data); - - // "cancel" button is clicked - if (data == 'PermissionDeniedError') { - DetectRTC.screen.chromeMediaSource = 'PermissionDeniedError'; - if (screenCallback) return screenCallback('PermissionDeniedError'); - else throw new Error('PermissionDeniedError'); - } - - // extension notified his presence - if (data == 'rtcmulticonnection-extension-loaded') { - DetectRTC.screen.chromeMediaSource = 'desktop'; - if (DetectRTC.screen.onScreenCapturingExtensionAvailable) { - DetectRTC.screen.onScreenCapturingExtensionAvailable(); - - // make sure that this event isn't fired multiple times - DetectRTC.screen.onScreenCapturingExtensionAvailable = null; - } - } - - // extension shared temp sourceId - if (data.sourceId) { - DetectRTC.screen.sourceId = data.sourceId; - if (screenCallback) screenCallback(DetectRTC.screen.sourceId); - } - }, - getChromeExtensionStatus: function(extensionid, callback) { - function _callback(status) { - DetectRTC.screen.status = status; - callback(status); - } - - if (isFirefox) return _callback('not-chrome'); - - if (arguments.length != 2) { - callback = extensionid; - extensionid = this.extensionid; - } - - var image = document.createElement('img'); - image.src = 'chrome-extension://' + extensionid + '/icon.png'; - image.onload = function() { - DetectRTC.screen.chromeMediaSource = 'screen'; - window.postMessage('are-you-there', '*'); - setTimeout(function() { - if (DetectRTC.screen.chromeMediaSource == 'screen') { - _callback( - DetectRTC.screen.chromeMediaSource == 'desktop' ? 'installed-enabled' : 'installed-disabled' /* if chrome extension isn't permitted for current domain, then it will be installed-disabled all the time even if extension is enabled. */ - ); - } else _callback('installed-enabled'); - }, 2000); - }; - image.onerror = function() { - _callback('not-installed'); - }; - } - }; - - // if IE - if (!window.addEventListener) { - window.addEventListener = function(el, eventName, eventHandler) { - if (!el.attachEvent) return; - el.attachEvent('on' + eventName, eventHandler); - }; - } - - function listenEventHandler(eventName, eventHandler) { - window.removeEventListener(eventName, eventHandler); - window.addEventListener(eventName, eventHandler, false); - } - - window.addEventListener('message', function(event) { - if (event.origin != window.location.origin) { - return; - } - - DetectRTC.screen.onMessageCallback(event.data); - }); - - function setDefaults(connection) { - var DetectRTC = window.DetectRTC || {}; - - // www.RTCMultiConnection.org/docs/userid/ - connection.userid = getRandomString(); - - // www.RTCMultiConnection.org/docs/session/ - connection.session = { - audio: true, - video: true - }; - - // www.RTCMultiConnection.org/docs/maxParticipantsAllowed/ - connection.maxParticipantsAllowed = 256; - - // www.RTCMultiConnection.org/docs/direction/ - // 'many-to-many' / 'one-to-many' / 'one-to-one' / 'one-way' - connection.direction = 'many-to-many'; - - // www.RTCMultiConnection.org/docs/mediaConstraints/ - connection.mediaConstraints = { - mandatory: {}, // kept for backward compatibility - optional: [], // kept for backward compatibility - audio: { - mandatory: {}, - optional: [] - }, - video: { - mandatory: {}, - optional: [] - } - }; - - // www.RTCMultiConnection.org/docs/candidates/ - connection.candidates = { - host: true, - stun: true, - turn: true - }; - - connection.sdpConstraints = {}; - - // as @serhanters proposed in #225 - // it will auto fix "all" renegotiation scenarios - connection.sdpConstraints.mandatory = { - OfferToReceiveAudio: true, - OfferToReceiveVideo: true - }; - - connection.privileges = { - canStopRemoteStream: false, // user can stop remote streams - canMuteRemoteStream: false // user can mute remote streams - }; - - connection.iceProtocols = { - tcp: true, - udp: true - }; - - // www.RTCMultiConnection.org/docs/preferSCTP/ - connection.preferSCTP = isFirefox || chromeVersion >= 32 ? true : false; - connection.chunkInterval = isFirefox || chromeVersion >= 32 ? 100 : 500; // 500ms for RTP and 100ms for SCTP - connection.chunkSize = isFirefox || chromeVersion >= 32 ? 13 * 1000 : 1000; // 1000 chars for RTP and 13000 chars for SCTP - - // www.RTCMultiConnection.org/docs/fakeDataChannels/ - connection.fakeDataChannels = false; - - connection.waitUntilRemoteStreamStartsFlowing = null; // NULL == true - - // auto leave on page unload - connection.leaveOnPageUnload = true; - - // get ICE-servers from XirSys - connection.getExternalIceServers = isChrome; - - // www.RTCMultiConnection.org/docs/UA/ - connection.UA = { - isFirefox: isFirefox, - isChrome: isChrome, - isMobileDevice: isMobileDevice, - version: isChrome ? chromeVersion : firefoxVersion, - isNodeWebkit: isNodeWebkit, - isSafari: isSafari, - isIE: isIE, - isOpera: isOpera - }; - - // file queue: to store previous file objects in memory; - // and stream over newly connected peers - // www.RTCMultiConnection.org/docs/fileQueue/ - connection.fileQueue = {}; - - // this array is aimed to store all renegotiated streams' session-types - connection.renegotiatedSessions = {}; - - // www.RTCMultiConnection.org/docs/channels/ - connection.channels = {}; - - // www.RTCMultiConnection.org/docs/extra/ - connection.extra = {}; - - // www.RTCMultiConnection.org/docs/bandwidth/ - connection.bandwidth = { - screen: 300 // 300kbps (dirty workaround) - }; - - // www.RTCMultiConnection.org/docs/caniuse/ - connection.caniuse = { - RTCPeerConnection: DetectRTC.isWebRTCSupported, - getUserMedia: !!navigator.webkitGetUserMedia || !!navigator.mozGetUserMedia, - AudioContext: DetectRTC.isAudioContextSupported, - - // there is no way to check whether "getUserMedia" flag is enabled or not! - ScreenSharing: DetectRTC.isScreenCapturingSupported, - RtpDataChannels: DetectRTC.isRtpDataChannelsSupported, - SctpDataChannels: DetectRTC.isSctpDataChannelsSupported - }; - - // www.RTCMultiConnection.org/docs/snapshots/ - connection.snapshots = {}; - - // www.WebRTC-Experiment.com/demos/MediaStreamTrack.getSources.html - connection._mediaSources = {}; - - // www.RTCMultiConnection.org/docs/devices/ - connection.devices = {}; - - // www.RTCMultiConnection.org/docs/language/ (to see list of all supported languages) - connection.language = 'en'; - - // www.RTCMultiConnection.org/docs/autoTranslateText/ - connection.autoTranslateText = false; - - // please use your own Google Translate API key - // Google Translate is a paid service. - connection.googKey = 'AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE'; - - connection.localStreamids = []; - connection.localStreams = {}; - - // this object stores pre-recorded media streaming uids - // multiple pre-recorded media files can be streamed concurrently. - connection.preRecordedMedias = {}; - - // www.RTCMultiConnection.org/docs/attachStreams/ - connection.attachStreams = []; - - // www.RTCMultiConnection.org/docs/detachStreams/ - connection.detachStreams = []; - - connection.optionalArgument = { - optional: [{ - DtlsSrtpKeyAgreement: true - }, { - googImprovedWifiBwe: true - }, { - googScreencastMinBitrate: 300 - }], - mandatory: {} - }; - - connection.dataChannelDict = {}; - - // www.RTCMultiConnection.org/docs/dontAttachStream/ - connection.dontAttachStream = false; - - // www.RTCMultiConnection.org/docs/dontCaptureUserMedia/ - connection.dontCaptureUserMedia = false; - - // this feature added to keep users privacy and - // make sure HTTPs pages NEVER auto capture users media - // isChrome && location.protocol == 'https:' - connection.preventSSLAutoAllowed = false; - - connection.autoReDialOnFailure = true; - connection.isInitiator = false; - - // access DetectRTC.js features directly! - connection.DetectRTC = DetectRTC; - - // you can falsify it to merge all ICE in SDP and share only SDP! - // such mechanism is useful for SIP/XMPP and XMLHttpRequest signaling - // bug: renegotiation fails if "trickleIce" is false - connection.trickleIce = true; - - // this object stores list of all sessions in current channel - connection.sessionDescriptions = {}; - - // this object stores current user's session-description - // it is set only for initiator - // it is set as soon as "open" method is invoked. - connection.sessionDescription = null; - - // resources used in RTCMultiConnection - connection.resources = { - // CUSTOM CODE // - /* Commenting this block as we do not wasnt external dependencies - * - RecordRTC: 'https://cdn.webrtc-experiment.com/RecordRTC.js', - PreRecordedMediaStreamer: 'https://cdn.webrtc-experiment.com/PreRecordedMediaStreamer.js', - customGetUserMediaBar: 'https://cdn.webrtc-experiment.com/navigator.customGetUserMediaBar.js', - html2canvas: 'https://cdn.webrtc-experiment.com/screenshot.js', - hark: 'https://cdn.webrtc-experiment.com/hark.js', - firebase: 'https://cdn.webrtc-experiment.com/firebase.js', - firebaseio: 'https://webrtc-signaling.firebaseio.com/', - - - - getConnectionStats: 'https://cdn.webrtc-experiment.com/getConnectionStats.js', - FileBufferReader: 'https://cdn.webrtc-experiment.com/FileBufferReader.js' - */ - - // CUSTOM CODE // - - - }; - - // www.RTCMultiConnection.org/docs/body/ - connection.body = document.body || document.documentElement; - connection.screenbody = null;// document.body || document.documentElement; - connection.videobody = null;//document.body || document.documentElement; - - // www.RTCMultiConnection.org/docs/peers/ - connection.peers = {}; - - // www.RTCMultiConnection.org/docs/firebase/ - connection.firebase = 'chat'; - - connection.numberOfSessions = 0; - connection.numberOfConnectedUsers = 0; - - // by default, data-connections will always be getting - // FileBufferReader.js if absent. - connection.enableFileSharing = true; - - // www.RTCMultiConnection.org/docs/autoSaveToDisk/ - // to make sure file-saver dialog is not invoked. - connection.autoSaveToDisk = false; - - connection.processSdp = function(sdp) { - // process sdp here - return sdp; - }; - - // www.RTCMultiConnection.org/docs/onmessage/ - connection.onmessage = function(e) { - log('onmessage', toStr(e)); - }; - - // www.RTCMultiConnection.org/docs/onopen/ - connection.onopen = function(e) { - log('Data connection is opened between you and', e.userid); - }; - - // www.RTCMultiConnection.org/docs/onerror/ - connection.onerror = function(e) { - error(onerror, toStr(e)); - }; - - // www.RTCMultiConnection.org/docs/onclose/ - connection.onclose = function(e) { - warn('onclose', toStr(e)); - - // todo: should we use "stop" or "remove"? - // BTW, it is remote user! - connection.streams.remove({ - userid: e.userid - }); - }; - - var progressHelper = {}; - - // www.RTCMultiConnection.org/docs/onFileStart/ - connection.onFileStart = function(file) { - var div = document.createElement('div'); - div.title = file.name; - div.innerHTML = ' '; - connection.body.insertBefore(div, connection.body.firstChild); - progressHelper[file.uuid] = { - div: div, - progress: div.querySelector('progress'), - label: div.querySelector('label') - }; - progressHelper[file.uuid].progress.max = file.maxChunks; - }; - - // www.RTCMultiConnection.org/docs/onFileProgress/ - connection.onFileProgress = function(chunk) { - var helper = progressHelper[chunk.uuid]; - if (!helper) return; - helper.progress.value = chunk.currentPosition || chunk.maxChunks || helper.progress.max; - updateLabel(helper.progress, helper.label); - }; - - // www.RTCMultiConnection.org/docs/onFileEnd/ - connection.onFileEnd = function(file) { - if (progressHelper[file.uuid]) progressHelper[file.uuid].div.innerHTML = '' + file.name + ''; - - // for backward compatibility - if (connection.onFileSent || connection.onFileReceived) { - if (connection.onFileSent) connection.onFileSent(file, file.uuid); - if (connection.onFileReceived) connection.onFileReceived(file.name, file); - } - }; - - function updateLabel(progress, label) { - if (progress.position == -1) return; - var position = +progress.position.toFixed(2).split('.')[1] || 100; - label.innerHTML = position + '%'; - } - - // www.RTCMultiConnection.org/docs/onstream/ - connection.onstream = function(e) { - // CUSTOM CODE // - - if(e.isVideo || e.isAudio) - { - var videoTag = e.mediaElement; - var videoType = e.type; - var parentDiv = connection.videobody; - - if(videoType == "local") - { - videoTag.style.top = "auto"; - videoTag.style.position = "absolute"; - //videoTag.style.left = (parentDiv.offsetWidth - 160) + "px"; - videoTag.style.height = "150px"; - videoTag.style.width = "150px"; - videoTag.style.zIndex = 1; - - } - else if(videoType == "remote") - { - videoTag.style.top = "auto"; - videoTag.style.position = "absolute"; - videoTag.style.zIndex = -1; - } - - parentDiv.appendChild(videoTag); - } - else if(e.isScreen) - { - var screenTag = e.mediaElement; - var screenType = e.type; - var parentDiv = connection.screenbody; - - if(screenType == "local") - { - // no need to display this because the person sharing his/her screen doesn't have to see whats being shared - // enabled for demo purposes - parentDiv.appendChild(screenTag); - } - else if(screenType == "remote") - { - parentDiv.appendChild(screenTag); - } - - - } - - else - connection.body.insertBefore(e.mediaElement, connection.body.firstChild); - - // CUSTOM CODE // - }; - - // www.RTCMultiConnection.org/docs/onStreamEndedHandler/ - connection.onstreamended = function(e) { - log('onStreamEndedHandler:', e); - - if (!e.mediaElement) { - return warn('Event.mediaElement is undefined', e); - } - if (!e.mediaElement.parentNode) { - e.mediaElement = document.getElementById(e.streamid); - - if (!e.mediaElement) { - return warn('Event.mediaElement is undefined', e); - } - - if (!e.mediaElement.parentNode) { - return warn('Event.mediElement.parentNode is null.', e); - } - } - - e.mediaElement.parentNode.removeChild(e.mediaElement); - }; - - // todo: need to write documentation link - connection.onSessionClosed = function(session) { - if (session.isEjected) { - warn(session.userid, 'ejected you.'); - } else warn('Session has been closed.', session); - }; - - // www.RTCMultiConnection.org/docs/onmute/ - connection.onmute = function(e) { - if (e.isVideo && e.mediaElement) { - e.mediaElement.pause(); - e.mediaElement.setAttribute('poster', e.snapshot || connection.resources.muted); - } - if (e.isAudio && e.mediaElement) { - e.mediaElement.muted = true; - } - }; - - // www.RTCMultiConnection.org/docs/onunmute/ - connection.onunmute = function(e) { - if (e.isVideo && e.mediaElement) { - e.mediaElement.play(); - e.mediaElement.removeAttribute('poster'); - } - if (e.isAudio && e.mediaElement) { - e.mediaElement.muted = false; - } - }; - - // www.RTCMultiConnection.org/docs/onleave/ - connection.onleave = function(e) { - log('onleave', toStr(e)); - }; - - connection.token = getRandomString; - - connection.peers[connection.userid] = { - drop: function() { - connection.drop(); - }, - renegotiate: function() {}, - addStream: function() {}, - hold: function() {}, - unhold: function() {}, - changeBandwidth: function() {}, - sharePartOfScreen: function() {} - }; - - connection._skip = ['stop', 'mute', 'unmute', '_private', '_selectStreams', 'selectFirst', 'selectAll', 'remove']; - - // www.RTCMultiConnection.org/docs/streams/ - connection.streams = { - mute: function(session) { - this._private(session, true); - }, - unmute: function(session) { - this._private(session, false); - }, - _private: function(session, enabled) { - if (session && !isString(session)) { - for (var stream in this) { - if (connection._skip.indexOf(stream) == -1) { - _muteOrUnMute(this[stream], session, enabled); - } - } - - function _muteOrUnMute(stream, session, isMute) { - if (session.local && stream.type != 'local') return; - if (session.remote && stream.type != 'remote') return; - - if (session.isScreen && !stream.isScreen) return; - if (session.isAudio && !stream.isAudio) return; - if (session.isVideo && !stream.isVideo) return; - - if (isMute) stream.mute(session); - else stream.unmute(session); - } - return; - } - - // implementation from #68 - for (var stream in this) { - if (connection._skip.indexOf(stream) == -1) { - this[stream]._private(session, enabled); - } - } - }, - stop: function(type) { - var _stream; - for (var stream in this) { - if (connection._skip.indexOf(stream) == -1) { - _stream = this[stream]; - - if (!type) _stream.stop(); - - else if (isString(type)) { - // connection.streams.stop('screen'); - var config = {}; - config[type] = true; - _stopStream(_stream, config); - } else _stopStream(_stream, type); - } - } - - function _stopStream(_stream, config) { - // connection.streams.stop({ remote: true, userid: 'remote-userid' }); - if (config.userid && _stream.userid != config.userid) return; - - if (config.local && _stream.type != 'local') return; - if (config.remote && _stream.type != 'remote') return; - - if (config.screen && !!_stream.isScreen) { - _stream.stop(); - } - - if (config.audio && !!_stream.isAudio) { - _stream.stop(); - } - - if (config.video && !!_stream.isVideo) { - _stream.stop(); - } - - // connection.streams.stop('local'); - if (!config.audio && !config.video && !config.screen) { - _stream.stop(); - } - } - }, - remove: function(type) { - var _stream; - for (var stream in this) { - if (connection._skip.indexOf(stream) == -1) { - _stream = this[stream]; - - if (!type) _stopAndRemoveStream(_stream, { - local: true, - remote: true - }); - - else if (isString(type)) { - // connection.streams.stop('screen'); - var config = {}; - config[type] = true; - _stopAndRemoveStream(_stream, config); - } else _stopAndRemoveStream(_stream, type); - } - } - - function _stopAndRemoveStream(_stream, config) { - // connection.streams.remove({ remote: true, userid: 'remote-userid' }); - if (config.userid && _stream.userid != config.userid) return; - - if (config.local && _stream.type != 'local') return; - if (config.remote && _stream.type != 'remote') return; - - if (config.screen && !!_stream.isScreen) { - endStream(_stream); - } - - if (config.audio && !!_stream.isAudio) { - endStream(_stream); - } - - if (config.video && !!_stream.isVideo) { - endStream(_stream); - } - - // connection.streams.remove('local'); - if (!config.audio && !config.video && !config.screen) { - endStream(_stream); - } - } - - function endStream(_stream) { - onStreamEndedHandler(_stream, connection); - delete connection.streams[_stream.streamid]; - } - }, - selectFirst: function(args) { - return this._selectStreams(args, false); - }, - selectAll: function(args) { - return this._selectStreams(args, true); - }, - _selectStreams: function(args, all) { - if (!args || isString(args) || isEmpty(args)) throw 'Invalid arguments.'; - - // if userid is used then both local/remote shouldn't be auto-set - if (isNull(args.local) && isNull(args.remote) && isNull(args.userid)) { - args.local = args.remote = true; - } - - if (!args.isAudio && !args.isVideo && !args.isScreen) { - args.isAudio = args.isVideo = args.isScreen = true; - } - - var selectedStreams = []; - for (var stream in this) { - if (connection._skip.indexOf(stream) == -1 && (stream = this[stream]) && ((args.local && stream.type == 'local') || (args.remote && stream.type == 'remote') || (args.userid && stream.userid == args.userid))) { - if (args.isVideo && stream.isVideo) { - selectedStreams.push(stream); - } - - if (args.isAudio && stream.isAudio) { - selectedStreams.push(stream); - } - - if (args.isScreen && stream.isScreen) { - selectedStreams.push(stream); - } - } - } - - return !!all ? selectedStreams : selectedStreams[0]; - } - }; - - var iceServers = []; - - // CUSTOM CODE // - // these servers are provided by research - iceServers.push({ - url: '' /*TODO To test this WebRTC with some open stun and turn test servers*/ - }); - - iceServers.push({ - url: 'turn:207.140.168.120:3478', - credential: 'xxx', - username: 'xxx' - }); - - iceServers.push({ - url: 'turn:207.140.168.120:443?transport=tcp', - credential: 'harmfulmustard', - username: 'ambient' - }); - - /* CHANGED: Fusion: These are servers for testing purposes - - iceServers.push({ - url: 'stun:stun.l.google.com:19302' - }); - - iceServers.push({ - url: 'stun:stun.anyfirewall.com:3478' - }); - - iceServers.push({ - url: 'turn:turn.bistri.com:80', - credential: 'homeo', - username: 'homeo' - }); - - iceServers.push({ - url: 'turn:turn.anyfirewall.com:443?transport=tcp', - credential: 'webrtc', - username: 'webrtc' - }); - - */ - // CUSTOM CODE // - connection.iceServers = iceServers; - - connection.rtcConfiguration = { - iceServers: null, - iceTransports: 'all', // none || relay || all - ref: http://goo.gl/40I39K - peerIdentity: false - }; - - // www.RTCMultiConnection.org/docs/media/ - connection.media = { - min: function(width, height) { - if (!connection.mediaConstraints.video) return; - - if (!connection.mediaConstraints.video.mandatory) { - connection.mediaConstraints.video.mandatory = {}; - } - connection.mediaConstraints.video.mandatory.minWidth = width; - connection.mediaConstraints.video.mandatory.minHeight = height; - }, - max: function(width, height) { - if (!connection.mediaConstraints.video) return; - - if (!connection.mediaConstraints.video.mandatory) { - connection.mediaConstraints.video.mandatory = {}; - } - - connection.mediaConstraints.video.mandatory.maxWidth = width; - connection.mediaConstraints.video.mandatory.maxHeight = height; - } - }; - - connection._getStream = function(event) { - var resultingObject = merge({ - sockets: event.socket ? [event.socket] : [] - }, event); - - resultingObject.stop = function() { - var self = this; - - self.sockets.forEach(function(socket) { - if (self.type == 'local') { - socket.send({ - streamid: self.streamid, - stopped: true - }); - } - - if (self.type == 'remote') { - socket.send({ - promptStreamStop: true, - streamid: self.streamid - }); - } - }); - - if (self.type == 'remote') return; - - var stream = self.stream; - if (stream) self.rtcMultiConnection.stopMediaStream(stream); - }; - - resultingObject.mute = function(session) { - this.muted = true; - this._private(session, true); - }; - - resultingObject.unmute = function(session) { - this.muted = false; - this._private(session, false); - }; - - function muteOrUnmuteLocally(session, isPause, mediaElement) { - if (!mediaElement) return; - var lastPauseState = mediaElement.onpause; - var lastPlayState = mediaElement.onplay; - mediaElement.onpause = mediaElement.onplay = function() {}; - - if (isPause) mediaElement.pause(); - else mediaElement.play(); - - mediaElement.onpause = lastPauseState; - mediaElement.onplay = lastPlayState; - } - - resultingObject._private = function(session, enabled) { - if (session && !isNull(session.sync) && session.sync == false) { - muteOrUnmuteLocally(session, enabled, this.mediaElement); - return; - } - - muteOrUnmute({ - root: this, - session: session, - enabled: enabled, - stream: this.stream - }); - }; - - resultingObject.startRecording = function(session) { - var self = this; - - if (!session) { - session = { - audio: true, - video: true - }; - } - - if (isString(session)) { - session = { - audio: session == 'audio', - video: session == 'video' - }; - } - - if (!window.RecordRTC) { - return loadScript(self.rtcMultiConnection.resources.RecordRTC, function() { - self.startRecording(session); - }); - } - - log('started recording session', session); - - self.videoRecorder = self.audioRecorder = null; - - if (isFirefox) { - // firefox supports both audio/video recording in single webm file - if (session.video) { - self.videoRecorder = RecordRTC(self.stream, { - type: 'video' - }); - } else if (session.audio) { - self.audioRecorder = RecordRTC(self.stream, { - type: 'audio' - }); - } - } else if (isChrome) { - // chrome supports recording in two separate files: WAV and WebM - if (session.video) { - self.videoRecorder = RecordRTC(self.stream, { - type: 'video' - }); - } - - if (session.audio) { - self.audioRecorder = RecordRTC(self.stream, { - type: 'audio' - }); - } - } - - if (self.audioRecorder) { - self.audioRecorder.startRecording(); - } - - if (self.videoRecorder) self.videoRecorder.startRecording(); - }; - - resultingObject.stopRecording = function(callback, session) { - if (!session) { - session = { - audio: true, - video: true - }; - } - - if (isString(session)) { - session = { - audio: session == 'audio', - video: session == 'video' - }; - } - - log('stopped recording session', session); - - var self = this; - - if (session.audio && self.audioRecorder) { - self.audioRecorder.stopRecording(function() { - if (session.video && self.videoRecorder) { - self.videoRecorder.stopRecording(function() { - callback({ - audio: self.audioRecorder.getBlob(), - video: self.videoRecorder.getBlob() - }); - }); - } else callback({ - audio: self.audioRecorder.getBlob() - }); - }); - } else if (session.video && self.videoRecorder) { - self.videoRecorder.stopRecording(function() { - callback({ - video: self.videoRecorder.getBlob() - }); - }); - } - }; - - resultingObject.takeSnapshot = function(callback) { - takeSnapshot({ - mediaElement: this.mediaElement, - userid: this.userid, - connection: connection, - callback: callback - }); - }; - - // redundant: kept only for backward compatibility - resultingObject.streamObject = resultingObject; - - return resultingObject; - }; - - // new RTCMultiConnection().set({properties}).connect() - connection.set = function(properties) { - for (var property in properties) { - this[property] = properties[property]; - } - return this; - }; - - // www.RTCMultiConnection.org/docs/onMediaError/ - connection.onMediaError = function(event) { - error('name', event.name); - error('constraintName', toStr(event.constraintName)); - error('message', event.message); - error('original session', event.session); - }; - - // www.RTCMultiConnection.org/docs/takeSnapshot/ - connection.takeSnapshot = function(userid, callback) { - takeSnapshot({ - userid: userid, - connection: connection, - callback: callback - }); - }; - - connection.saveToDisk = function(blob, fileName) { - if (blob.size && blob.type) FileSaver.SaveToDisk(URL.createObjectURL(blob), fileName || blob.name || blob.type.replace('/', '-') + blob.type.split('/')[1]); - else FileSaver.SaveToDisk(blob, fileName); - }; - - // www.RTCMultiConnection.org/docs/selectDevices/ - connection.selectDevices = function(device1, device2) { - if (device1) select(this.devices[device1]); - if (device2) select(this.devices[device2]); - - function select(device) { - if (!device) return; - connection._mediaSources[device.kind] = device.id; - } - }; - - // www.RTCMultiConnection.org/docs/getDevices/ - connection.getDevices = function(callback) { - // if, not yet fetched. - if (!DetectRTC.MediaDevices.length) { - return setTimeout(function() { - connection.getDevices(callback); - }, 1000); - } - - // loop over all audio/video input/output devices - DetectRTC.MediaDevices.forEach(function(device) { - connection.devices[device.deviceId] = device; - }); - - if (callback) callback(connection.devices); - }; - - connection.getMediaDevices = connection.enumerateDevices = function(callback) { - if (!callback) throw 'callback is mandatory.'; - connection.getDevices(function() { - callback(connection.DetectRTC.MediaDevices); - }); - }; - - // www.RTCMultiConnection.org/docs/onCustomMessage/ - connection.onCustomMessage = function(message) { - log('Custom message', message); - }; - - // www.RTCMultiConnection.org/docs/ondrop/ - connection.ondrop = function(droppedBy) { - log('Media connection is dropped by ' + droppedBy); - }; - - // www.RTCMultiConnection.org/docs/drop/ - connection.drop = function(config) { - config = config || {}; - connection.attachStreams = []; - - // "drop" should detach all local streams - for (var stream in connection.streams) { - if (connection._skip.indexOf(stream) == -1) { - stream = connection.streams[stream]; - if (stream.type == 'local') { - connection.detachStreams.push(stream.streamid); - onStreamEndedHandler(stream, connection); - } else onStreamEndedHandler(stream, connection); - } - } - - // www.RTCMultiConnection.org/docs/sendCustomMessage/ - connection.sendCustomMessage({ - drop: true, - dontRenegotiate: isNull(config.renegotiate) ? true : config.renegotiate - }); - }; - - // www.RTCMultiConnection.org/docs/Translator/ - connection.Translator = { - TranslateText: function(text, callback) { - // if(location.protocol === 'https:') return callback(text); - - var newScript = document.createElement('script'); - newScript.type = 'text/javascript'; - - var sourceText = encodeURIComponent(text); // escape - - var randomNumber = 'method' + connection.token(); - window[randomNumber] = function(response) { - if (response.data && response.data.translations[0] && callback) { - callback(response.data.translations[0].translatedText); - } - - if (response.error && response.error.message == 'Daily Limit Exceeded') { - warn('Text translation failed. Error message: "Daily Limit Exceeded."'); - - // returning original text - callback(text); - } - }; - - var source = 'https://www.googleapis.com/language/translate/v2?key=' + connection.googKey + '&target=' + (connection.language || 'en-US') + '&callback=window.' + randomNumber + '&q=' + sourceText; - newScript.src = source; - document.getElementsByTagName('head')[0].appendChild(newScript); - } - }; - - // you can easily override it by setting it NULL! - connection.setDefaultEventsForMediaElement = function(mediaElement, streamid) { - mediaElement.onpause = function() { - if (connection.streams[streamid] && !connection.streams[streamid].muted) { - connection.streams[streamid].mute(); - } - }; - - // todo: need to make sure that "onplay" EVENT doesn't play self-voice! - mediaElement.onplay = function() { - if (connection.streams[streamid] && connection.streams[streamid].muted) { - connection.streams[streamid].unmute(); - } - }; - - var volumeChangeEventFired = false; - mediaElement.onvolumechange = function() { - if (!volumeChangeEventFired) { - volumeChangeEventFired = true; - connection.streams[streamid] && setTimeout(function() { - var root = connection.streams[streamid]; - connection.streams[streamid].sockets.forEach(function(socket) { - socket.send({ - streamid: root.streamid, - isVolumeChanged: true, - volume: mediaElement.volume - }); - }); - volumeChangeEventFired = false; - }, 2000); - } - }; - }; - - // www.RTCMultiConnection.org/docs/onMediaFile/ - connection.onMediaFile = function(e) { - log('onMediaFile', e); - connection.body.appendChild(e.mediaElement); - }; - - // www.RTCMultiConnection.org/docs/shareMediaFile/ - // this method handles pre-recorded media streaming - connection.shareMediaFile = function(file, video, streamerid) { - streamerid = streamerid || connection.token(); - - if (!PreRecordedMediaStreamer) { - loadScript(connection.resources.PreRecordedMediaStreamer, function() { - connection.shareMediaFile(file, video, streamerid); - }); - return streamerid; - } - - return PreRecordedMediaStreamer.shareMediaFile({ - file: file, - video: video, - streamerid: streamerid, - connection: connection - }); - }; - - // www.RTCMultiConnection.org/docs/onpartofscreen/ - connection.onpartofscreen = function(e) { - var image = document.createElement('img'); - image.src = e.screenshot; - connection.body.appendChild(image); - }; - - connection.skipLogs = function() { - log = error = warn = function() {}; - }; - - // www.RTCMultiConnection.org/docs/hold/ - connection.hold = function(mLine) { - for (var peer in connection.peers) { - connection.peers[peer].hold(mLine); - } - }; - - // www.RTCMultiConnection.org/docs/onhold/ - connection.onhold = function(track) { - log('onhold', track); - - if (track.kind != 'audio') { - track.mediaElement.pause(); - track.mediaElement.setAttribute('poster', track.screenshot || connection.resources.muted); - } - if (track.kind == 'audio') { - track.mediaElement.muted = true; - } - }; - - // www.RTCMultiConnection.org/docs/unhold/ - connection.unhold = function(mLine) { - for (var peer in connection.peers) { - connection.peers[peer].unhold(mLine); - } - }; - - // www.RTCMultiConnection.org/docs/onunhold/ - connection.onunhold = function(track) { - log('onunhold', track); - - if (track.kind != 'audio') { - track.mediaElement.play(); - track.mediaElement.removeAttribute('poster'); - } - if (track.kind != 'audio') { - track.mediaElement.muted = false; - } - }; - - connection.sharePartOfScreen = function(args) { - var lastScreenshot = ''; - - function partOfScreenCapturer() { - // if stopped - if (connection.partOfScreen && !connection.partOfScreen.sharing) { - return; - } - - capturePartOfScreen({ - element: args.element, - connection: connection, - callback: function(screenshot) { - // don't share repeated content - if (screenshot != lastScreenshot) { - lastScreenshot = screenshot; - - for (var channel in connection.channels) { - connection.channels[channel].send({ - screenshot: screenshot, - isPartOfScreen: true - }); - } - } - - // "once" can be used to share single screenshot - !args.once && setTimeout(partOfScreenCapturer, args.interval || 200); - } - }); - } - - partOfScreenCapturer(); - - connection.partOfScreen = merge({ - sharing: true - }, args); - }; - - connection.pausePartOfScreenSharing = function() { - for (var peer in connection.peers) { - connection.peers[peer].pausePartOfScreenSharing = true; - } - - if (connection.partOfScreen) { - connection.partOfScreen.sharing = false; - } - }; - - connection.resumePartOfScreenSharing = function() { - for (var peer in connection.peers) { - connection.peers[peer].pausePartOfScreenSharing = false; - } - - if (connection.partOfScreen) { - connection.partOfScreen.sharing = true; - } - }; - - connection.stopPartOfScreenSharing = function() { - for (var peer in connection.peers) { - connection.peers[peer].stopPartOfScreenSharing = true; - } - - if (connection.partOfScreen) { - connection.partOfScreen.sharing = false; - } - }; - - connection.takeScreenshot = function(element, callback) { - if (!element || !callback) throw 'Invalid number of arguments.'; - - if (!window.html2canvas) { - return loadScript(connection.resources.html2canvas, function() { - connection.takeScreenshot(element); - }); - } - - if (isString(element)) { - element = document.querySelector(element); - if (!element) element = document.getElementById(element); - } - if (!element) throw 'HTML Element is inaccessible!'; - - // html2canvas.js is used to take screenshots - html2canvas(element, { - onrendered: function(canvas) { - callback(canvas.toDataURL()); - } - }); - }; - - // this event is fired when RTCMultiConnection detects that chrome extension - // for screen capturing is installed and available - connection.onScreenCapturingExtensionAvailable = function() { - log('It seems that screen capturing extension is installed and available on your system!'); - }; - - if (!isPluginRTC && DetectRTC.screen.onScreenCapturingExtensionAvailable) { - DetectRTC.screen.onScreenCapturingExtensionAvailable = function() { - connection.onScreenCapturingExtensionAvailable(); - }; - } - - connection.changeBandwidth = function(bandwidth) { - for (var peer in connection.peers) { - connection.peers[peer].changeBandwidth(bandwidth); - } - }; - - connection.convertToAudioStream = function(mediaStream) { - convertToAudioStream(mediaStream); - }; - - connection.onstatechange = function(state) { - log('on:state:change (' + state.userid + '):', state.name + ':', state.reason || ''); - }; - - connection.onfailed = function(event) { - if (!event.peer.numOfRetries) event.peer.numOfRetries = 0; - event.peer.numOfRetries++; - - error('ICE connectivity check is failed. Renegotiating peer connection.'); - event.peer.numOfRetries < 2 && event.peer.renegotiate(); - - if (event.peer.numOfRetries >= 2) event.peer.numOfRetries = 0; - }; - - connection.onconnected = function(event) { - // event.peer.addStream || event.peer.getConnectionStats - log('Peer connection has been established between you and', event.userid); - }; - - connection.ondisconnected = function(event) { - error('Peer connection seems has been disconnected between you and', event.userid); - - if (isEmpty(connection.channels)) return; - if (!connection.channels[event.userid]) return; - - // use WebRTC data channels to detect user's presence - connection.channels[event.userid].send({ - checkingPresence: true - }); - - // wait 5 seconds, if target peer didn't response, simply disconnect - setTimeout(function() { - // iceConnectionState == 'disconnected' occurred out of low-bandwidth - // or internet connectivity issues - if (connection.peers[event.userid].connected) { - delete connection.peers[event.userid].connected; - return; - } - - // to make sure this user's all remote streams are removed. - connection.streams.remove({ - remote: true, - userid: event.userid - }); - - connection.remove(event.userid); - }, 3000); - }; - - connection.onstreamid = function(event) { - // event.isScreen || event.isVideo || event.isAudio - log('got remote streamid', event.streamid, 'from', event.userid); - }; - - connection.stopMediaStream = function(mediaStream) { - if (!mediaStream) throw 'MediaStream argument is mandatory.'; - - if (connection.keepStreamsOpened) { - if (mediaStream.onended) mediaStream.onended(); - return; - } - - // remove stream from "localStreams" object - // when native-stop method invoked. - if (connection.localStreams[mediaStream.streamid]) { - delete connection.localStreams[mediaStream.streamid]; - } - - if (isFirefox) { - // Firefox don't yet support onended for any stream (remote/local) - if (mediaStream.onended) mediaStream.onended(); - } - - // Latest firefox does support mediaStream.getAudioTrack but doesn't support stop on MediaStreamTrack - var checkForMediaStreamTrackStop = Boolean( - (mediaStream.getAudioTracks || mediaStream.getVideoTracks) && ( - (mediaStream.getAudioTracks()[0] && !mediaStream.getAudioTracks()[0].stop) || - (mediaStream.getVideoTracks()[0] && !mediaStream.getVideoTracks()[0].stop) - ) - ); - - if (!mediaStream.getAudioTracks || checkForMediaStreamTrackStop) { - if (mediaStream.stop) { - mediaStream.stop(); - } - return; - } - - if (mediaStream.getAudioTracks().length && mediaStream.getAudioTracks()[0].stop) { - mediaStream.getAudioTracks().forEach(function(track) { - track.stop(); - }); - } - - if (mediaStream.getVideoTracks().length && mediaStream.getVideoTracks()[0].stop) { - mediaStream.getVideoTracks().forEach(function(track) { - track.stop(); - }); - } - }; - - connection.changeBandwidth = function(bandwidth) { - if (!bandwidth || isString(bandwidth) || isEmpty(bandwidth)) { - throw 'Invalid "bandwidth" arguments.'; - } - - forEach(connection.peers, function(peer) { - peer.peer.bandwidth = bandwidth; - }); - - connection.renegotiate(); - }; - - // www.RTCMultiConnection.org/docs/openSignalingChannel/ - // http://goo.gl/uvoIcZ - - // CUSTOM CODE - var href = window.location.href; - var hostPatt = new RegExp(window.location.host +"/[^/]*"); - var res = hostPatt.exec(href); - var protocol = window.location.protocol.replace("http","ws"); - - var signalingServerPath = protocol + "//" + res + "/webrtc"; - var SIGNALING_SERVER = signalingServerPath; //"ws://localhost:80/quantum/webrtc"; //"wss://localhost:80/quantum/webrtc"; --> ws for http and wss for https - - connection.openSignalingChannel = function(config) { - - - config.channel = config.channel || this.channel; - var websocket = new WebSocket(SIGNALING_SERVER); - websocket.channel = config.channel; - websocket.onopen = function() { - websocket.push(JSON.stringify({ - open: true, - channel: config.channel - })); - if (config.callback) - config.callback(websocket); - }; - websocket.onmessage = function(event) { - config.onmessage(JSON.parse(event.data)); - }; - websocket.push = websocket.send; - websocket.send = function(data) { - websocket.push(JSON.stringify({ - data: data, - channel: config.channel - })); - }; - - /* - // make sure firebase.js is loaded - if (!window.Firebase) { - return loadScript(connection.resources.firebase, function() { - connection.openSignalingChannel(config); - }); - } - - var channel = config.channel || connection.channel; - - if (connection.firebase) { - // for custom firebase instances - connection.resources.firebaseio = connection.resources.firebaseio.replace('//chat.', '//' + connection.firebase + '.'); - } - - var firebase = new Firebase(connection.resources.firebaseio + channel); - firebase.channel = channel; - firebase.on('child_added', function(data) { - config.onmessage(data.val()); - }); - - firebase.send = function(data) { - // a quick dirty workaround to make sure firebase - // shouldn't fail for NULL values. - for (var prop in data) { - if (isNull(data[prop]) || typeof data[prop] == 'function') { - data[prop] = false; - } - } - - this.push(data); - }; - - if (!connection.socket) - connection.socket = firebase; - - firebase.onDisconnect().remove(); - - setTimeout(function() { - config.callback(firebase); - }, 1); - - */ - // CUSTOM CODE // - - }; - - connection.Plugin = Plugin; - } - -})(); \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html deleted file mode 100644 index 6f660025..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html +++ /dev/null @@ -1,78 +0,0 @@ - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css deleted file mode 100644 index a9edba8f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css +++ /dev/null @@ -1,173 +0,0 @@ -.gridster { - position: relative; - margin: auto; - /* height: 0 - */} - -.gridster>ul { - margin: 0; - list-style: none; - padding: 0 -} - -.gridster-item { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - list-style: none; - z-index: 2; - position: absolute; - display: none -} - -.gridster-loaded { - -webkit-transition: height .3s; - -moz-transition: height .3s; - -o-transition: height .3s; - transition: height .3s -} - -.gridster-loaded .gridster-item { - display: block; - position: absolute; - -webkit-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s; - -moz-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s; - -o-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s; - transition: opacity .3s, left .3s, top .3s, width .3s, height .3s; - -webkit-transition-delay: 50ms; - -moz-transition-delay: 50ms; - -o-transition-delay: 50ms; - transition-delay: 50ms -} - -.gridster-loaded .gridster-preview-holder { - display: none; - z-index: 1; - position: absolute; - background-color: #067ab4; - /* - background-color: rgb(6, 122, 180); - -ms-filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#067ab4', endColorstr='#067ab4'); IE - opacity: 0.2; - */ - border-color: #fff; - -webkit-transition: width .2s, height .3s; - -moz-transition: width .2s, height .3s; - -o-transition: width .2s, height .3s; - transition: width .2s, height .3s; - -webkit-transition-delay: 50ms; - -moz-transition-delay: 50ms; - -o-transition-delay: 50ms; - transition-delay: 50ms -} - -.gridster-loaded .gridster-item.gridster-item-moving { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; - opacity: 0.9; -} - -.gridster-mobile { - height: auto !important -} - -.gridster-mobile .gridster-item { - height: auto; - position: static; - float: none -} - -.gridster-item.ng-leave.ng-leave-active { - opacity: 0 -} - -.gridster-item.ng-enter { - opacity: 1 -} - -.gridster-item-moving { - z-index: 3 -} - -.gridster-item-resizable-handler { - position: absolute; - font-size: 1px; - display: block -} - -.handle-se { - cursor: se-resize; - width: 0; - height: 0; - right: 1px; - bottom: 1px; - border-style: solid; - border-width: 0 0 12px 12px; - border-color: transparent -} - -.handle-ne { - cursor: ne-resize; - width: 12px; - height: 12px; - right: 1px; - top: 1px -} - -.handle-nw { - cursor: nw-resize; - width: 12px; - height: 12px; - left: 1px; - top: 1px -} - -.handle-sw { - cursor: sw-resize; - width: 12px; - height: 12px; - left: 1px; - bottom: 1px -} - -.handle-e { - cursor: e-resize; - width: 12px; - bottom: 0; - right: 1px; - top: 0 -} - -.handle-s { - cursor: s-resize; - height: 12px; - right: 0; - bottom: 1px; - left: 0 -} - -.handle-n { - cursor: n-resize; - height: 12px; - right: 0; - top: 1px; - left: 0 -} - -.handle-w { - cursor: w-resize; - width: 12px; - left: 1px; - top: 0; - bottom: 0 -} - -.gridster .gridster-item:hover .gridster-box { - border: 1.5px solid #B3B2B3 -} - -.gridster .gridster-item:hover .handle-se { - border-color: transparent transparent #ccc -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css deleted file mode 100644 index 827e354e..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css +++ /dev/null @@ -1,116 +0,0 @@ -/* ui-gridster.css */ -.gridster-container { - background-color: #EFEFEF; - color: #fff; - border: 1px dashed; - overflow-y: auto; - overflow-x: hidden; } - -/* app css for attGridtser */ -.gridster-item-container { - background-color: #FFFFFF; - position: relative; - margin-left: auto; - margin-right: auto; - min-height: 79px; - height: 100%; } - .gridster-item-container .gridster-item-header { - /* gridster-item Header */ - position: relative; - height: 50px !important; - border: 1px solid #d3d3d3; - border-bottom: 0; - background-color: #E5E5E5; - white-space: nowrap; - text-overflow: ellipsis; - z-index: 1; - -webkit-border-radius: 2px 2px 0 0; - -moz-border-radius: 2px 2px 0 0; - -ms-border-radius: 2px 2px 0 0; - -o-border-radius: 2px 2px 0 0; - border-radius: 2px 2px 0 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - overflow: hidden; - /* IE6-8 */ } - .gridster-item-container .gridster-item-header .gridster-item-handle { - cursor: move; - margin: 12px; - position: absolute; - top: 0; - left: 0; - border: 0; - vertical-align: middle; - -ms-interpolation-mode: bicubic; - display: block; } - .gridster-item-container .gridster-item-header .gridster-item-header-content { - line-height: 44px; - margin-left: 26px; - font-family: clearviewatt; - font-size: 18px; - color: #444444; - float: left; } - .gridster-item-container .gridster-item-header .gridster-item-sub-header-content { - position: absolute; - top: 29.5px; - left: 26px; - font-family: clearviewatt; - font-size: 12px; - color: #444444; } - .gridster-item-container .gridster-item-header .gridster-item-header-buttons-container { - position: absolute; - right: 10px; - top: 10px; - overflow: hidden; - text-align: right; - height: 30px; - color: #444444; } - .gridster-item-container .gridster-item-body { - /* gridster-item Body */ - position: absolute; - width: 100%; - top: 50px; - left: 0; - right: 0; - bottom: 29px; - border: 1px solid #d3d3d3; - box-sizing: border-box; - overflow: auto; - color: #444444; - /* text-align: center; */ } - .gridster-item-container .gridster-item-footer { - /* gridster-item Footer */ - position: absolute; - bottom: 0; - width: 100%; - height: 29px !important; - text-align: left; - cursor: pointer; - border: 1px solid #d3d3d3; - border-top: 0; - background-color: #F2F2F2; - -webkit-border-radius: 0 0 2px 2px; - -moz-border-radius: 0 0 2px 2px; - -ms-border-radius: 0 0 2px 2px; - -o-border-radius: 0 0 2px 2px; - border-radius: 0 0 2px 2px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - text-decoration: none; - /* IE6-8 */ } - .gridster-item-container .gridster-item-footer:hover { - background-color: #E5E5E5; - color: #565656; - text-decoration: underline; } - .gridster-item-container .gridster-item-footer .gridster-item-footer-content { - line-height: 30px; - font-family: clearviewatt; - font-size: 12px; - color: #565656; - margin: 20px; - text-decoration: none; } - .gridster-item-container .gridster-item-footer .gridster-item-footer-content:hover { - color: #199ddf; - text-decoration: underline; } diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/fusion-sunny.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/fusion-sunny.css deleted file mode 100644 index c8306156..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/fusion-sunny.css +++ /dev/null @@ -1,362 +0,0 @@ - input, textarea, select, div { - font-family: Arial; - font-size: 11px; - font-weight: normal; - } - - form { - margin-top: 5px; - } - - - .applicationWindow { border-width: 0px 0px 1px 0px; - border-style: solid; - border-color: #959595; - box-shadow: inset 0 0 10px #000000; - margin-top: 10px; - margin-bottom: 10px; - margin-left: 10px; - margin-right: 10px; - } - - .feedbackMessage { width: 99%; - font-family: Arial; - font-size: 11px; - color: #1f1f1f; - padding: 3px; - border: 1px #eeb420 solid; - margin: 3px; - background: #fff9e5; - } - - .menubar { - border-width: 0px 0px 0px 1px; border-style: solid; border-color: #959595; - } - - .footer { - /*clear: both;*/ - border-width: 0px 1px 0px 1px; border-style: solid; border-color: #959595; - font-family: Verdana,Arial,Helvetica, sans-serif; - font-size: 9px; - padding: 10px 10px 30px 10px; - background: white; - } - - .pageTitle { - font-family: Arial; - font-size: 18px; - font-weight: bold; - margin-top: 5px; - } - - .content { - border-width: 0px 1px 0px 1px; - border-style: solid; - border-color: #959595; - font-family: Arial; - font-size: 11px; - padding: 5px; - background: white; - /*height: 600px;*/ - } - - .popupContent { - font-family: Arial; - font-size: 11px; - padding: 3px; - } - - .logo { - border-width: 0px 1px 0px 1px; - border-style: solid; - border-color: #959595; - text-align: right; - } - - .sep { - border: 1px solid black - } - - .attLogo { /*position: relative;*/ - float:left; - padding-top: 25px; - padding-left: 25px; - } - - .applicationLogo { float:right; - padding-top: 25px; - padding-right: 25px; - } - - .applinkWhite { font-family: Arial; - font-size: 13px; - font-weight: 900; - color: #FFFFFF; - text-decoration: none; } - - .terms { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 9px; - } - - .broadcastMessage { color: red; } - .broadcastMessageList { color: red; } - - .button { - margin: 5px 1px 5px 1px; - padding: 3px; } - - .toolbarbutton:hover { - color:#005491; - } - - .headerText { font-family: Arial; - font-size: 15px; - font-weight: 700; - color: #000000; } - - .headerBackground { background: #336699; } - - .errorMessageText { font-family: Arial; - font-size: 11px; - font-weight: bold; - color: red; } - - - .normalText { font-family: Arial; - font-size: 11px; - color: #000000; } - - .normalTextRed { font-family: Arial; - font-size: 11px; - color: red; } - - - .smallNormalText { font-family: Arial; - font-size: 9px; - color: #000000; } - - .tableBorder { border:1px outset teal } - - .validationError { background: #b9eaff; } - - .templatebody { - background: url(../images/body_graphic.jpg) repeat-x; - /*margin: 40px 80px 40px 80px;*/ - } - - /*--------------------- General Content ------------------------------------*/ - - .relative { - position:relative; - } - - .clear{ - clear:both; - } - - .left { - float: left; - } - - .leftCentered{ - float: left; - text-align: center; - } - - .right { - float: right; - } - - .rightAligned{ - text-align: right; - } - - .centered { - text-align: center; - align: center; - } - - - .noWrap{ - white-space:nowrap; - } - - .disabled { - color:gray; - cursor:hand; - } - - /*--------------------- Tab styles -------------------------------------*/ - - .current { - font-weight: bold; - border-width: 1px 1px 1px 1px; - border-color: silver; - border-style: solid; - } - - .subTab { - font-weight:bold; - font-family: Arial; - font-size: 11px; - color: #0F3B82; - } - - - /*--------------------- Grid styles ------------------------------------*/ - - /* Grid navigation and header styles */ - .gridFilterLabel {font-size: 7pt; - font-align: justify; - font-weight: bold; - display: block;} - - .gridFilterText {height: 17px; - font-size: 8pt; - width: 60%; - font-align: justify;} - - .gridNavigationBar { font-family:Arial,Verdana; - font-size:11px; - font-weight:normal; - color:#000; - margin: 0px; - width: 100%; - vertical-align: middle; - } - - .gridNavigationBar .navLinks { float: left; - margin-right:15px; - padding-top: 2px; - height: 19px; - line-height: 19px; - } - - .gridNavigationBar .pageControls { float: left; - margin-right: 15px; - height: 19px; - line-height: 19px; - } - - .gridNavigationBar .pageControls input { font-size: 8pt; - height: 17px; - vertical-align: middle; - } - - .gridNavigationBar .pageInfo { float: right; - vertical-align: middle; - height: 19px; - line-height: 19px; - } - - .gridNavigationBar .pageInfo input { font-size: 8pt; - height: 17px; - vertical-align: middle; - } - - - .gridNavigationBar span { padding: 3px; } - - .gridNavigationBar a { - text-decoration:underline; - color:#000; - font-weight:normal; - } - - .gridNavigationBar img { vertical-align: middle; } - - .gridBulkUpdateRow { - height: 35px; - line-height: 35px; - } - - .gridBulkUpdateRow input { - vertical-align: middle; - } - - - /* dummy class used to lock the form elements of a grid - ex. bulk transaction processing */ - .alwaysEnabled {} - - .hidden { - display: none; - } - - .selectedPage { - background-color:#C4DFFB; - color: white; - border-style: solid; - border-width: 1px; - border-color: gray; - padding-left: 3px; - padding-right: 3px; - vertical-align: middle; - } - - .selectedRow{ - /*background-color:#C4DFFB;*/ - } - - /* Action Item styles */ - .actionList { - margin-left: -20px; - margin-right: -10px; - padding-left: 5px; - } - - .actionList li { - float:left; - padding-left: 3px; - padding-right: 3px; - } - - .actionList li a { - text-decoration:none; - color:#000; - } - - /* Filter Operator List styles */ - - .filterList { - margin: 0px; - } - - .filterList li { - list-style-type: none; - padding:3px 3px 3px 2px; - cursor:hand; - font-size:11px; - } - - .filterList li:hover { - background: #404040; - } - - .filterList li a { - color: #000; - text-decoration: none; - } - - .filterList li:hover a { - color: white; - } - - .filterList li a:hover { - text-decoration: none; - color: white; - } - - .filterListItem a { - text-decoration:none; - padding:3px 2px 3px 2px; - } - - - /*---------------------- Customized ZK Styles ------------------------------*/ - - .z-datebox input, .z-timebox input { - font-family: Arial; - font-size: 11px; - height: 15px; - margin-top:1px; - } diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/jquery-ui.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/jquery-ui.css deleted file mode 100644 index 1c22746c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/jquery-ui.css +++ /dev/null @@ -1,1225 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2015-03-11 -* http://jqueryui.com -* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px -* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { - display: none; -} -.ui-helper-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} -.ui-helper-reset { - margin: 0; - padding: 0; - border: 0; - outline: 0; - line-height: 1.3; - text-decoration: none; - font-size: 100%; - list-style: none; -} -.ui-helper-clearfix:before, -.ui-helper-clearfix:after { - content: ""; - display: table; - border-collapse: collapse; -} -.ui-helper-clearfix:after { - clear: both; -} -.ui-helper-clearfix { - min-height: 0; /* support: IE7 */ -} -.ui-helper-zfix { - width: 100%; - height: 100%; - top: 0; - left: 0; - position: absolute; - opacity: 0; - filter:Alpha(Opacity=0); /* support: IE8 */ -} - -.ui-front { - z-index: 100; -} - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { - cursor: default !important; -} - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - display: block; - text-indent: -99999px; - overflow: hidden; - background-repeat: no-repeat; -} - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.ui-accordion .ui-accordion-header { - display: block; - cursor: pointer; - position: relative; - margin: 2px 0 0 0; - padding: .5em .5em .5em .7em; - min-height: 0; /* support: IE7 */ - font-size: 100%; -} -.ui-accordion .ui-accordion-icons { - padding-left: 2.2em; -} -.ui-accordion .ui-accordion-icons .ui-accordion-icons { - padding-left: 2.2em; -} -.ui-accordion .ui-accordion-header .ui-accordion-header-icon { - position: absolute; - left: .5em; - top: 50%; - margin-top: -8px; -} -.ui-accordion .ui-accordion-content { - padding: 1em 2.2em; - border-top: 0; - overflow: auto; -} -.ui-autocomplete { - position: absolute; - top: 0; - left: 0; - cursor: default; -} -.ui-button { - display: inline-block; - position: relative; - padding: 0; - line-height: normal; - margin-right: .1em; - cursor: pointer; - vertical-align: middle; - text-align: center; - overflow: visible; /* removes extra width in IE */ -} -.ui-button, -.ui-button:link, -.ui-button:visited, -.ui-button:hover, -.ui-button:active { - text-decoration: none; -} -/* to make room for the icon, a width needs to be set here */ -.ui-button-icon-only { - width: 2.2em; -} -/* button elements seem to need a little more width */ -button.ui-button-icon-only { - width: 2.4em; -} -.ui-button-icons-only { - width: 3.4em; -} -button.ui-button-icons-only { - width: 3.7em; -} - -/* button text element */ -.ui-button .ui-button-text { - display: block; - line-height: normal; -} -.ui-button-text-only .ui-button-text { - padding: .4em 1em; -} -.ui-button-icon-only .ui-button-text, -.ui-button-icons-only .ui-button-text { - padding: .4em; - text-indent: -9999999px; -} -.ui-button-text-icon-primary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: .4em 1em .4em 2.1em; -} -.ui-button-text-icon-secondary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: .4em 2.1em .4em 1em; -} -.ui-button-text-icons .ui-button-text { - padding-left: 2.1em; - padding-right: 2.1em; -} -/* no icon support for input elements, provide padding by default */ -input.ui-button { - padding: .4em 1em; -} - -/* button icon element(s) */ -.ui-button-icon-only .ui-icon, -.ui-button-text-icon-primary .ui-icon, -.ui-button-text-icon-secondary .ui-icon, -.ui-button-text-icons .ui-icon, -.ui-button-icons-only .ui-icon { - position: absolute; - top: 50%; - margin-top: -8px; -} -.ui-button-icon-only .ui-icon { - left: 50%; - margin-left: -8px; -} -.ui-button-text-icon-primary .ui-button-icon-primary, -.ui-button-text-icons .ui-button-icon-primary, -.ui-button-icons-only .ui-button-icon-primary { - left: .5em; -} -.ui-button-text-icon-secondary .ui-button-icon-secondary, -.ui-button-text-icons .ui-button-icon-secondary, -.ui-button-icons-only .ui-button-icon-secondary { - right: .5em; -} - -/* button sets */ -.ui-buttonset { - margin-right: 7px; -} -.ui-buttonset .ui-button { - margin-left: 0; - margin-right: -.3em; -} - -/* workarounds */ -/* reset extra padding in Firefox, see h5bp.com/l */ -input.ui-button::-moz-focus-inner, -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; -} -.ui-datepicker { - width: 17em; - padding: .2em .2em 0; - display: none; -} -.ui-datepicker .ui-datepicker-header { - position: relative; - padding: .2em 0; -} -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-next { - position: absolute; - top: 2px; - width: 1.8em; - height: 1.8em; -} -.ui-datepicker .ui-datepicker-prev-hover, -.ui-datepicker .ui-datepicker-next-hover { - top: 1px; -} -.ui-datepicker .ui-datepicker-prev { - left: 2px; -} -.ui-datepicker .ui-datepicker-next { - right: 2px; -} -.ui-datepicker .ui-datepicker-prev-hover { - left: 1px; -} -.ui-datepicker .ui-datepicker-next-hover { - right: 1px; -} -.ui-datepicker .ui-datepicker-prev span, -.ui-datepicker .ui-datepicker-next span { - display: block; - position: absolute; - left: 50%; - margin-left: -8px; - top: 50%; - margin-top: -8px; -} -.ui-datepicker .ui-datepicker-title { - margin: 0 2.3em; - line-height: 1.8em; - text-align: center; -} -.ui-datepicker .ui-datepicker-title select { - font-size: 1em; - margin: 1px 0; -} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { - width: 45%; -} -.ui-datepicker table { - width: 100%; - font-size: .9em; - border-collapse: collapse; - margin: 0 0 .4em; -} -.ui-datepicker th { - padding: .7em .3em; - text-align: center; - font-weight: bold; - border: 0; -} -.ui-datepicker td { - border: 0; - padding: 1px; -} -.ui-datepicker td span, -.ui-datepicker td a { - display: block; - padding: .2em; - text-align: right; - text-decoration: none; -} -.ui-datepicker .ui-datepicker-buttonpane { - background-image: none; - margin: .7em 0 0 0; - padding: 0 .2em; - border-left: 0; - border-right: 0; - border-bottom: 0; -} -.ui-datepicker .ui-datepicker-buttonpane button { - float: right; - margin: .5em .2em .4em; - cursor: pointer; - padding: .2em .6em .3em .6em; - width: auto; - overflow: visible; -} -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { - float: left; -} - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { - width: auto; -} -.ui-datepicker-multi .ui-datepicker-group { - float: left; -} -.ui-datepicker-multi .ui-datepicker-group table { - width: 95%; - margin: 0 auto .4em; -} -.ui-datepicker-multi-2 .ui-datepicker-group { - width: 50%; -} -.ui-datepicker-multi-3 .ui-datepicker-group { - width: 33.3%; -} -.ui-datepicker-multi-4 .ui-datepicker-group { - width: 25%; -} -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { - border-left-width: 0; -} -.ui-datepicker-multi .ui-datepicker-buttonpane { - clear: left; -} -.ui-datepicker-row-break { - clear: both; - width: 100%; - font-size: 0; -} - -/* RTL support */ -.ui-datepicker-rtl { - direction: rtl; -} -.ui-datepicker-rtl .ui-datepicker-prev { - right: 2px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next { - left: 2px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-prev:hover { - right: 1px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next:hover { - left: 1px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane { - clear: right; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button { - float: left; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, -.ui-datepicker-rtl .ui-datepicker-group { - float: right; -} -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} -.ui-dialog { - overflow: hidden; - position: absolute; - top: 0; - left: 0; - padding: .2em; - outline: 0; -} -.ui-dialog .ui-dialog-titlebar { - padding: .4em 1em; - position: relative; -} -.ui-dialog .ui-dialog-title { - float: left; - margin: .1em 0; - white-space: nowrap; - width: 90%; - overflow: hidden; - text-overflow: ellipsis; -} -.ui-dialog .ui-dialog-titlebar-close { - position: absolute; - right: .3em; - top: 50%; - width: 20px; - margin: -10px 0 0 0; - padding: 1px; - height: 20px; -} -.ui-dialog .ui-dialog-content { - position: relative; - border: 0; - padding: .5em 1em; - background: none; - overflow: auto; -} -.ui-dialog .ui-dialog-buttonpane { - text-align: left; - border-width: 1px 0 0 0; - background-image: none; - margin-top: .5em; - padding: .3em 1em .5em .4em; -} -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { - float: right; -} -.ui-dialog .ui-dialog-buttonpane button { - margin: .5em .4em .5em 0; - cursor: pointer; -} -.ui-dialog .ui-resizable-se { - width: 12px; - height: 12px; - right: -5px; - bottom: -5px; - background-position: 16px 16px; -} -.ui-draggable .ui-dialog-titlebar { - cursor: move; -} -.ui-draggable-handle { - -ms-touch-action: none; - touch-action: none; -} -.ui-menu { - list-style: none; - padding: 0; - margin: 0; - display: block; - outline: none; -} -.ui-menu .ui-menu { - position: absolute; -} -.ui-menu .ui-menu-item { - position: relative; - margin: 0; - padding: 3px 1em 3px .4em; - cursor: pointer; - min-height: 0; /* support: IE7 */ - /* support: IE10, see #8844 */ - list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); -} -.ui-menu .ui-menu-divider { - margin: 5px 0; - height: 0; - font-size: 0; - line-height: 0; - border-width: 1px 0 0 0; -} -.ui-menu .ui-state-focus, -.ui-menu .ui-state-active { - margin: -1px; -} - -/* icon support */ -.ui-menu-icons { - position: relative; -} -.ui-menu-icons .ui-menu-item { - padding-left: 2em; -} - -/* left-aligned */ -.ui-menu .ui-icon { - position: absolute; - top: 0; - bottom: 0; - left: .2em; - margin: auto 0; -} - -/* right-aligned */ -.ui-menu .ui-menu-icon { - left: auto; - right: 0; -} -.ui-progressbar { - height: 2em; - text-align: left; - overflow: hidden; -} -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; -} -.ui-progressbar .ui-progressbar-overlay { - background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); - height: 100%; - filter: alpha(opacity=25); /* support: IE8 */ - opacity: 0.25; -} -.ui-progressbar-indeterminate .ui-progressbar-value { - background-image: none; -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; - -ms-touch-action: none; - touch-action: none; -} -.ui-resizable-disabled .ui-resizable-handle, -.ui-resizable-autohide .ui-resizable-handle { - display: none; -} -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.ui-selectable { - -ms-touch-action: none; - touch-action: none; -} -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} -.ui-selectmenu-menu { - padding: 0; - margin: 0; - position: absolute; - top: 0; - left: 0; - display: none; -} -.ui-selectmenu-menu .ui-menu { - overflow: auto; - /* Support: IE7 */ - overflow-x: hidden; - padding-bottom: 1px; -} -.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { - font-size: 1em; - font-weight: bold; - line-height: 1.5; - padding: 2px 0.4em; - margin: 0.5em 0 0 0; - height: auto; - border: 0; -} -.ui-selectmenu-open { - display: block; -} -.ui-selectmenu-button { - display: inline-block; - overflow: hidden; - position: relative; - text-decoration: none; - cursor: pointer; -} -.ui-selectmenu-button span.ui-icon { - right: 0.5em; - left: auto; - margin-top: -8px; - position: absolute; - top: 50%; -} -.ui-selectmenu-button span.ui-selectmenu-text { - text-align: left; - padding: 0.4em 2.1em 0.4em 1em; - display: block; - line-height: 1.4; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.ui-slider { - position: relative; - text-align: left; -} -.ui-slider .ui-slider-handle { - position: absolute; - z-index: 2; - width: 1.2em; - height: 1.2em; - cursor: default; - -ms-touch-action: none; - touch-action: none; -} -.ui-slider .ui-slider-range { - position: absolute; - z-index: 1; - font-size: .7em; - display: block; - border: 0; - background-position: 0 0; -} - -/* support: IE8 - See #6727 */ -.ui-slider.ui-state-disabled .ui-slider-handle, -.ui-slider.ui-state-disabled .ui-slider-range { - filter: inherit; -} - -.ui-slider-horizontal { - height: .8em; -} -.ui-slider-horizontal .ui-slider-handle { - top: -.3em; - margin-left: -.6em; -} -.ui-slider-horizontal .ui-slider-range { - top: 0; - height: 100%; -} -.ui-slider-horizontal .ui-slider-range-min { - left: 0; -} -.ui-slider-horizontal .ui-slider-range-max { - right: 0; -} - -.ui-slider-vertical { - width: .8em; - height: 100px; -} -.ui-slider-vertical .ui-slider-handle { - left: -.3em; - margin-left: 0; - margin-bottom: -.6em; -} -.ui-slider-vertical .ui-slider-range { - left: 0; - width: 100%; -} -.ui-slider-vertical .ui-slider-range-min { - bottom: 0; -} -.ui-slider-vertical .ui-slider-range-max { - top: 0; -} -.ui-sortable-handle { - -ms-touch-action: none; - touch-action: none; -} -.ui-spinner { - position: relative; - display: inline-block; - overflow: hidden; - padding: 0; - vertical-align: middle; -} -.ui-spinner-input { - border: none; - background: none; - color: inherit; - padding: 0; - margin: .2em 0; - vertical-align: middle; - margin-left: .4em; - margin-right: 22px; -} -.ui-spinner-button { - width: 16px; - height: 50%; - font-size: .5em; - padding: 0; - margin: 0; - text-align: center; - position: absolute; - cursor: default; - display: block; - overflow: hidden; - right: 0; -} -/* more specificity required here to override default borders */ -.ui-spinner a.ui-spinner-button { - border-top: none; - border-bottom: none; - border-right: none; -} -/* vertically center icon */ -.ui-spinner .ui-icon { - position: absolute; - margin-top: -8px; - top: 50%; - left: 0; -} -.ui-spinner-up { - top: 0; -} -.ui-spinner-down { - bottom: 0; -} - -/* TR overrides */ -.ui-spinner .ui-icon-triangle-1-s { - /* need to fix icons sprite */ - background-position: -65px -16px; -} -.ui-tabs { - position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ - padding: .2em; -} -.ui-tabs .ui-tabs-nav { - margin: 0; - padding: .2em .2em 0; -} -.ui-tabs .ui-tabs-nav li { - list-style: none; - float: left; - position: relative; - top: 0; - margin: 1px .2em 0 0; - border-bottom-width: 0; - padding: 0; - white-space: nowrap; -} -.ui-tabs .ui-tabs-nav .ui-tabs-anchor { - float: left; - padding: .5em 1em; - text-decoration: none; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active { - margin-bottom: -1px; - padding-bottom: 1px; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, -.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, -.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { - cursor: text; -} -.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { - cursor: pointer; -} -.ui-tabs .ui-tabs-panel { - display: block; - border-width: 0; - padding: 1em 1.4em; - background: none; -} -.ui-tooltip { - padding: 8px; - position: absolute; - z-index: 9999; - max-width: 300px; - -webkit-box-shadow: 0 0 5px #aaa; - box-shadow: 0 0 5px #aaa; -} -body .ui-tooltip { - border-width: 2px; -} - -/* Component containers -----------------------------------*/ -.ui-widget { - font-family: Verdana,Arial,sans-serif; - font-size: 1.1em; -} -.ui-widget .ui-widget { - font-size: 1em; -} -.ui-widget input, -.ui-widget select, -.ui-widget textarea, -.ui-widget button { - font-family: Verdana,Arial,sans-serif; - font-size: 1em; -} -.ui-widget-content { - border: 1px solid #aaaaaa; - background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x; - color: #222222; -} -.ui-widget-content a { - color: #222222; -} -.ui-widget-header { - border: 1px solid #aaaaaa; - background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x; - color: #222222; - font-weight: bold; -} -.ui-widget-header a { - color: #222222; -} - -/* Interaction states -----------------------------------*/ -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default { - border: 1px solid #d3d3d3; - background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x; - font-weight: normal; - color: #555555; -} -.ui-state-default a, -.ui-state-default a:link, -.ui-state-default a:visited { - color: #555555; - text-decoration: none; -} -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus { - border: 1px solid #999999; - background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x; - font-weight: normal; - color: #212121; -} -.ui-state-hover a, -.ui-state-hover a:hover, -.ui-state-hover a:link, -.ui-state-hover a:visited, -.ui-state-focus a, -.ui-state-focus a:hover, -.ui-state-focus a:link, -.ui-state-focus a:visited { - color: #212121; - text-decoration: none; -} -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active { - border: 1px solid #aaaaaa; - background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; - font-weight: normal; - color: #212121; -} -.ui-state-active a, -.ui-state-active a:link, -.ui-state-active a:visited { - color: #212121; - text-decoration: none; -} - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, -.ui-widget-content .ui-state-highlight, -.ui-widget-header .ui-state-highlight { - border: 1px solid #fcefa1; - background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x; - color: #363636; -} -.ui-state-highlight a, -.ui-widget-content .ui-state-highlight a, -.ui-widget-header .ui-state-highlight a { - color: #363636; -} -.ui-state-error, -.ui-widget-content .ui-state-error, -.ui-widget-header .ui-state-error { - border: 1px solid #cd0a0a; - background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x; - color: #cd0a0a; -} -.ui-state-error a, -.ui-widget-content .ui-state-error a, -.ui-widget-header .ui-state-error a { - color: #cd0a0a; -} -.ui-state-error-text, -.ui-widget-content .ui-state-error-text, -.ui-widget-header .ui-state-error-text { - color: #cd0a0a; -} -.ui-priority-primary, -.ui-widget-content .ui-priority-primary, -.ui-widget-header .ui-priority-primary { - font-weight: bold; -} -.ui-priority-secondary, -.ui-widget-content .ui-priority-secondary, -.ui-widget-header .ui-priority-secondary { - opacity: .7; - filter:Alpha(Opacity=70); /* support: IE8 */ - font-weight: normal; -} -.ui-state-disabled, -.ui-widget-content .ui-state-disabled, -.ui-widget-header .ui-state-disabled { - opacity: .35; - filter:Alpha(Opacity=35); /* support: IE8 */ - background-image: none; -} -.ui-state-disabled .ui-icon { - filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ -} - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - width: 16px; - height: 16px; -} -.ui-icon, -.ui-widget-content .ui-icon { - background-image: url("images/ui-icons_222222_256x240.png"); -} -.ui-widget-header .ui-icon { - background-image: url("images/ui-icons_222222_256x240.png"); -} -.ui-state-default .ui-icon { - background-image: url("images/ui-icons_888888_256x240.png"); -} -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon { - background-image: url("images/ui-icons_454545_256x240.png"); -} -.ui-state-active .ui-icon { - background-image: url("images/ui-icons_454545_256x240.png"); -} -.ui-state-highlight .ui-icon { - background-image: url("images/ui-icons_2e83ff_256x240.png"); -} -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon { - background-image: url("images/ui-icons_cd0a0a_256x240.png"); -} - -/* positioning */ -.ui-icon-blank { background-position: 16px 16px; } -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-on { background-position: -96px -144px; } -.ui-icon-radio-off { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, -.ui-corner-top, -.ui-corner-left, -.ui-corner-tl { - border-top-left-radius: 4px; -} -.ui-corner-all, -.ui-corner-top, -.ui-corner-right, -.ui-corner-tr { - border-top-right-radius: 4px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-left, -.ui-corner-bl { - border-bottom-left-radius: 4px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-right, -.ui-corner-br { - border-bottom-right-radius: 4px; -} - -/* Overlays */ -.ui-widget-overlay { - background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; - opacity: .3; - filter: Alpha(Opacity=30); /* support: IE8 */ -} -.ui-widget-shadow { - margin: -8px 0 0 -8px; - padding: 8px; - background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; - opacity: .3; - filter: Alpha(Opacity=30); /* support: IE8 */ - border-radius: 8px; -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css deleted file mode 100644 index aa382de3..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Default Layout Theme - * - * Created for jquery.layout - * - * Copyright (c) 2010 - * Fabrizio Balliano (http://www.fabrizioballiano.net) - * Kevin Dalman (http://allpro.net) - * - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. - * - * Last Updated: 2010-02-10 - * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars - */ - -/* - * DEFAULT FONT - * Just to make demo-pages look better - not actually relevant to Layout! - */ -body { - font-family: Geneva, Arial, Helvetica, sans-serif; - font-size: 100%; - *font-size: 80%; -} - -/* - * PANES & CONTENT-DIVs - */ -.ui-layout-pane { /* all 'panes' */ - background: #FFF; - border: 1px solid #BBB; - padding: 10px; - overflow: auto; - /* DO NOT add scrolling (or padding) to 'panes' that have a content-div, - otherwise you may get double-scrollbars - on the pane AND on the content-div - - use ui-layout-wrapper class if pane has a content-div - - use ui-layout-container if pane has an inner-layout - */ - } - /* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */ - .ui-layout-content { - padding: 10px; - position: relative; /* contain floated or positioned elements */ - overflow: auto; /* add scrolling to content-div */ - } - -/* - * UTILITY CLASSES - * Must come AFTER pane-class above so will override - * These classes are NOT auto-generated and are NOT used by Layout - */ -.layout-child-container, -.layout-content-container { - padding: 0; - overflow: hidden; -} -.layout-child-container { - border: 0; /* remove border because inner-layout-panes probably have borders */ -} -.layout-scroll { - overflow: auto; -} -.layout-hide { - display: none; -} - -/* - * RESIZER-BARS - */ -.ui-layout-resizer { /* all 'resizer-bars' */ - background: #DDD; - border: 1px solid #BBB; - border-width: 0; - } - .ui-layout-resizer-drag { /* REAL resizer while resize in progress */ - } - .ui-layout-resizer-hover { /* affects both open and closed states */ - } - /* NOTE: It looks best when 'hover' and 'dragging' are set to the same color, - otherwise color shifts while dragging when bar can't keep up with mouse */ - .ui-layout-resizer-open-hover , /* hover-color to 'resize' */ - .ui-layout-resizer-dragging { /* resizer beging 'dragging' */ - background: #C4E1A4; - } - .ui-layout-resizer-dragging { /* CLONED resizer being dragged */ - border: 1px solid #BBB; - } - .ui-layout-resizer-north-dragging, - .ui-layout-resizer-south-dragging { - border-width: 1px 0; - } - .ui-layout-resizer-west-dragging, - .ui-layout-resizer-east-dragging { - border-width: 0 1px; - } - /* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */ - .ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */ - background: #E1A4A4; /* red */ - } - - .ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */ - background: #EBD5AA; - } - .ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */ - opacity: .10; /* show only a slight shadow */ - filter: alpha(opacity=10); - } - .ui-layout-resizer-sliding-hover { /* sliding resizer - hover */ - opacity: 1.00; /* on-hover, show the resizer-bar normally */ - filter: alpha(opacity=100); - } - /* sliding resizer - add 'outside-border' to resizer on-hover - * this sample illustrates how to target specific panes and states */ - .ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; } - .ui-layout-resizer-south-sliding-hover { border-top-width: 1px; } - .ui-layout-resizer-west-sliding-hover { border-right-width: 1px; } - .ui-layout-resizer-east-sliding-hover { border-left-width: 1px; } - -/* - * TOGGLER-BUTTONS - */ -.ui-layout-toggler { - border: 1px solid #BBB; /* match pane-border */ - background-color: #BBB; - } - .ui-layout-resizer-hover .ui-layout-toggler { - opacity: .60; - filter: alpha(opacity=60); - } - .ui-layout-toggler-hover , /* need when NOT resizable */ - .ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */ - background-color: #FC6; - opacity: 1.00; - filter: alpha(opacity=100); - } - .ui-layout-toggler-north , - .ui-layout-toggler-south { - border-width: 0 1px; /* left/right borders */ - } - .ui-layout-toggler-west , - .ui-layout-toggler-east { - border-width: 1px 0; /* top/bottom borders */ - } - /* hide the toggler-button when the pane is 'slid open' */ - .ui-layout-resizer-sliding .ui-layout-toggler { - display: none; - } - /* - * style the text we put INSIDE the togglers - */ - .ui-layout-toggler .content { - color: #666; - font-size: 12px; - font-weight: bold; - width: 100%; - padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */ - } - -/* - * PANE-MASKS - * these styles are hard-coded on mask elems, but are also - * included here as !important to ensure will overrides any generic styles - */ -.ui-layout-mask { - border: none !important; - padding: 0 !important; - margin: 0 !important; - overflow: hidden !important; - position: absolute !important; - opacity: 0 !important; - filter: Alpha(Opacity="0") !important; -} -.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */ - top: 0 !important; - left: 0 !important; - width: 100% !important; - height: 100% !important; -} -div.ui-layout-mask {} /* standard mask for iframes */ -iframe.ui-layout-mask {} /* extra mask for objects/applets */ - -/* - * Default printing styles - */ -@media print { - /* - * Unless you want to print the layout as it appears onscreen, - * these html/body styles are needed to allow the content to 'flow' - */ - html { - height: auto !important; - overflow: visible !important; - } - body.ui-layout-container { - position: static !important; - top: auto !important; - bottom: auto !important; - left: auto !important; - right: auto !important; - /* only IE6 has container width & height set by Layout */ - _width: auto !important; - _height: auto !important; - } - .ui-layout-resizer, .ui-layout-toggler { - display: none !important; - } - /* - * Default pane print styles disables positioning, borders and backgrounds. - * You can modify these styles however it suit your needs. - */ - .ui-layout-pane { - border: none !important; - background: transparent !important; - position: relative !important; - top: auto !important; - bottom: auto !important; - left: auto !important; - right: auto !important; - width: auto !important; - height: auto !important; - overflow: visible !important; - } -} \ No newline at end of file diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/workflows/workflows.css b/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/workflows/workflows.css deleted file mode 100644 index b9d0146c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusion/styles/workflows/workflows.css +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -.scrolling-table{ - width: 1200px; -} -.scrolling-table .scroll-viewport { - height: 200px !important; - width: 99.5% !important; - background-color:white; -} - -.scrolling-table .scroll-overview{ - margin-top:-14px !important; -} - -.scrolling-table .scroll-viewport:hover{ - background-color:white; -} - -.scrolling-table #att-scroll-table-content{ - height:200px; - position: absolute !important; - width:700px; - padding-left: 0px; - padding-top: 0px; - padding-bottom: 0px; - padding-right:5px; -} - -.workflow-popup-body{ - position: relative; - padding: 30px; -} diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js deleted file mode 100644 index 4e624345..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller("droolsListController", function ($scope,$http,droolsService, modalService, $modal) { - // Table Data - droolsService.getDrools().then(function(data){ - - var j = data; - $scope.tableData = JSON.parse(j.data); - //$scope.resetMenu(); - - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.viewPerPage = 20; - $scope.scrollViewsPerPage = 2; - $scope.currentPage = 1; - $scope.totalPage; - $scope.searchCategory = ""; - $scope.searchString = ""; - /* modalService.showSuccess('','Modal Sample') ; */ - for(x in $scope.tableData){ - if($scope.tableData[x].active_yn=='Y') - $scope.tableData[x].active_yn=true; - else - $scope.tableData[x].active_yn=false; - } - $scope.openDialog = function(droolFile){ - droolsService.setSelectedFile(droolFile); - $modal.open({ - templateUrl: 'app/fusionapp/drools/view-models/droolsView.html', - controller: 'droolsViewController' - - }) - } - - - -}); - -function openInNewTab(url) { - var win = window.open(url, '_blank'); - win.focus(); -}; diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js deleted file mode 100644 index c475e175..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('droolsViewController', function ($scope,modalService,droolsService){ - - - $scope.resultsString = ""; - // Table Data - droolsService.getDroolDetails(droolsService.getSelectedFile()).then(function(data){ - - var j = data; - $scope.postDroolsBean = JSON.parse(j.data); - //execute($scope.postDroolsBean); - - },function(error){ - console.log("failed"); - //reloadPageOnce(); - }); - - - - $scope.execute = function(postDroolsBean) { - console.log(postDroolsBean); - var uuu = "post_drools/execute"; - var postData={postDroolsBean:postDroolsBean}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.resultsString=data.resultsString; - console.log($scope.resultsString); - }); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while executing: "+ data.responseText); - } - }); - - }; - - - - }); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/droolsController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/droolsController.js deleted file mode 100644 index f9c0e234..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/droolsController.js +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.config(function($routeProvider) { - $routeProvider - .when('/view', { - templateUrl: 'app/fusionapp/drools/view-models/droolsView.html', - controller : "droolsViewController" - }) - .otherwise({ - templateUrl: 'app/fusionapp/drools/view-models/droolsList.html', - controller : "droolsListController" - }); -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/controller/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/directives/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/directives/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/services/droolsService.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/services/droolsService.js deleted file mode 100644 index d1dbfa6c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/services/droolsService.js +++ /dev/null @@ -1,76 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.factory('droolsService', function ($http, $q) { - return { - getDrools: function() { - return $http.get('getDrools') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getDroolDetails: function(selectedFile) { - return $http.get('getDroolDetails'+'?selectedFile=' + selectedFile ) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getRole: function(roleId) { - - return $http.get('get_role?role_id=' + roleId) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getSelectedFile: function() { - return this.selectedFile; - }, - - setSelectedFile: function(_selectedFile) { - this.selectedFile = _selectedFile; - } - }; -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/utils/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/utils/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html deleted file mode 100644 index ca06b3c3..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html +++ /dev/null @@ -1,47 +0,0 @@ - -
    -
    -

    Drools List

    -
    - - - - - - - - - - - - - - - - - - -
    Drools File NameClass NameRun Rule
    {{rowData.droolsFile}}{{rowData.className}} -
    -
    -
    -
    - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html deleted file mode 100644 index 1d4f1bfd..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html deleted file mode 100644 index dbe9121a..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/external/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/external/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/fonts/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/fonts/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/images/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/images/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js deleted file mode 100644 index 0ea98a9c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js +++ /dev/null @@ -1,80 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('samplePageController', function($scope, $http,ProfileService,modalService){ - $scope.tableData=[]; - $scope.viewPerPage=20; - $scope.scrollViewPerPage=2; - $scope.currentPage=1; - $scope.totalPage; - $scope.searchCategory; - $scope.searchString=""; - $scope.currentPageNum=1; - ProfileService.getProfilePagination(1,$scope.viewPerPage).then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.tableData =JSON.parse($scope.data.profileList); - $scope.totalPages =JSON.parse($scope.data.totalPage); - for(x in $scope.tableData){ - if($scope.tableData[x].active_yn=='Y') - $scope.tableData[x].active_yn=true; - else - $scope.tableData[x].active_yn=false; - } - //$scope.resetMenu(); - },function(error){ - console.log("failed"); - reloadPageOnce(); - }); - - $scope.$watch('currentPageNum', function(val) { - - ProfileService.getProfilePagination(val,$scope.viewPerPage).then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.tableData =JSON.parse($scope.data.profileList); - $scope.totalPages =JSON.parse($scope.data.totalPage); - for(x in $scope.tableData){ - if($scope.tableData[x].active_yn=='Y') - $scope.tableData[x].active_yn=true; - else - $scope.tableData[x].active_yn=false; - } - //$scope.resetMenu(); - },function(error){ - console.log("failed"); - }); - - }); - - $scope.editRow = function(profileId){ - window.location = 'userProfile#/profile/' + profileId; - } - - $scope.toggleProfileActive = function(rowData) { - modalService.popupConfirmWinWithCancel("Confirm","You are about to change user's active status. Do you want to continue?", - function(){ - $http.get("profile/toggleProfileActive?profile_id="+rowData.id).success(function(){}); - }, - function(){ - rowData.active=!rowData.active; - }) - }; - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js deleted file mode 100644 index 4ff99cb4..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js +++ /dev/null @@ -1,23 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.controller('samplePageWithIframeController', function($scope, $http,ProfileService,modalService){ - - -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js deleted file mode 100644 index 3d3daf5f..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -app.config(function($routeProvider) { - $routeProvider - .when('/iframe', { - templateUrl: 'app/fusionapp/scripts/view-models/sampleWithIframe.html', - controller : "samplePageWithIframeController" - }) - .otherwise({ - templateUrl: 'app/fusionapp/scripts/view-models/sample.html', - controller : "samplePageController" - }); -}); diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sample.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sample.html deleted file mode 100644 index 5b555aa4..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sample.html +++ /dev/null @@ -1,60 +0,0 @@ - -
    - -

    Profile Search

    - - - - - - - - - - - - - - - - - - - - - - - -
    User IDLast NameFirst NameEmailUser IDManager User ID
    - -
    - Rows Per Page: - -
    -
    - Current Page: - -
    -
    - Total Page(s): - -
    -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html deleted file mode 100644 index 612e6a8c..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html +++ /dev/null @@ -1,22 +0,0 @@ - -
    - -
    diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/singlePageSample.html b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/singlePageSample.html deleted file mode 100644 index 7bded9d6..00000000 --- a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/scripts/view-models/singlePageSample.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - diff --git a/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/styles/dummy.txt b/ecomp-sdk/sdk-app/src/main/webapp/app/fusionapp/styles/dummy.txt deleted file mode 100644 index e69de29b..00000000 -- cgit 1.2.3-korg