From dc992dd9e519094f52af7b270946e86f66427be9 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 15 Feb 2018 19:26:12 +0100 Subject: [PATCH] Actualizacinnn de plantilla de items --- app/anorgatarrak.js | 4 +- app/catalog/catalog.component.js | 34 +- app/catalog/catalog.config.js | 20 +- app/catalog/catalog.module.js | 2 +- app/catalog/item.component.js | 2 +- css/anorgatarrak.css | 6 + functions.php | 4 + .../angular-loading-bar/.editorconfig | 21 + node_modules/angular-loading-bar/.jshintrc | 93 + node_modules/angular-loading-bar/.npmignore | 3 + node_modules/angular-loading-bar/CHANGELOG.md | 81 + .../angular-loading-bar/CONTRIBUTING.md | 17 + node_modules/angular-loading-bar/Gruntfile.js | 102 + .../angular-loading-bar/ISSUE_TEMPLATE.md | 14 + node_modules/angular-loading-bar/LICENSE | 20 + .../PULL_REQUEST_TEMPLATE.md | 13 + node_modules/angular-loading-bar/README.md | 190 + node_modules/angular-loading-bar/bower.json | 31 + .../angular-loading-bar/build/loading-bar.css | 110 + .../angular-loading-bar/build/loading-bar.js | 341 + .../build/loading-bar.min.css | 1 + .../build/loading-bar.min.js | 7 + .../angular-loading-bar/example/app.css | 180 + .../angular-loading-bar/example/app.js | 49 + .../angular-loading-bar/example/index.html | 64 + node_modules/angular-loading-bar/index.js | 2 + node_modules/angular-loading-bar/package.json | 70 + .../angular-loading-bar/src/loading-bar.css | 104 + .../angular-loading-bar/src/loading-bar.js | 335 + .../test/karma-angular-1.2.conf.js | 82 + .../test/karma-angular-1.3.conf.js | 82 + .../test/karma-angular-1.4.conf.js | 82 + .../loading-bar-interceptor-config.coffee | 114 + .../test/loading-bar-interceptor.coffee | 554 ++ node_modules/dom-walk/.npmignore | 3 + node_modules/dom-walk/LICENCE | 19 + node_modules/dom-walk/Makefile | 2 + node_modules/dom-walk/README.md | 23 + node_modules/dom-walk/example/index.js | 5 + .../dom-walk/example/static/bundle.js | 211 + .../dom-walk/example/static/index.html | 16 + node_modules/dom-walk/index.js | 24 + node_modules/dom-walk/package.json | 61 + node_modules/global/.npmignore | 15 + node_modules/global/.travis.yml | 4 + node_modules/global/LICENSE | 19 + node_modules/global/README.md | 30 + node_modules/global/console.js | 1 + node_modules/global/document.js | 17 + node_modules/global/package.json | 94 + node_modules/global/process.js | 1 + node_modules/global/window.js | 13 + node_modules/mediaelement/.babelrc | 10 + node_modules/mediaelement/.eslintrc | 20 + node_modules/mediaelement/.gitattributes | 13 + node_modules/mediaelement/.npmignore | 20 + node_modules/mediaelement/.stylelintrc | 35 + node_modules/mediaelement/.travis.yml | 6 + node_modules/mediaelement/.versions | 5 + node_modules/mediaelement/Gruntfile.js | 230 + node_modules/mediaelement/README.md | 127 + node_modules/mediaelement/TODO.md | 17 + node_modules/mediaelement/bower.json | 26 + node_modules/mediaelement/build/lang/ca.js | 89 + node_modules/mediaelement/build/lang/cs.js | 90 + node_modules/mediaelement/build/lang/de.js | 90 + node_modules/mediaelement/build/lang/es.js | 90 + node_modules/mediaelement/build/lang/fa.js | 90 + node_modules/mediaelement/build/lang/fr.js | 91 + node_modules/mediaelement/build/lang/hr.js | 87 + node_modules/mediaelement/build/lang/hu.js | 90 + node_modules/mediaelement/build/lang/it.js | 90 + node_modules/mediaelement/build/lang/ja.js | 90 + node_modules/mediaelement/build/lang/ko.js | 90 + node_modules/mediaelement/build/lang/nl.js | 91 + node_modules/mediaelement/build/lang/pl.js | 90 + node_modules/mediaelement/build/lang/pt.js | 92 + node_modules/mediaelement/build/lang/ro.js | 90 + node_modules/mediaelement/build/lang/ru.js | 90 + node_modules/mediaelement/build/lang/sk.js | 90 + node_modules/mediaelement/build/lang/sv.js | 89 + node_modules/mediaelement/build/lang/uk.js | 89 + node_modules/mediaelement/build/lang/zh-cn.js | 90 + node_modules/mediaelement/build/lang/zh.js | 91 + .../build/mediaelement-and-player.js | 8508 +++++++++++++++++ .../build/mediaelement-and-player.min.js | 12 + .../build/mediaelement-flash-audio-ogg.swf | Bin 0 -> 303972 bytes .../build/mediaelement-flash-audio.swf | Bin 0 -> 4556 bytes .../build/mediaelement-flash-video-hls.swf | Bin 0 -> 92955 bytes .../build/mediaelement-flash-video-mdash.swf | Bin 0 -> 401613 bytes .../build/mediaelement-flash-video.swf | Bin 0 -> 8471 bytes .../mediaelement/build/mediaelement.js | 3974 ++++++++ .../mediaelement/build/mediaelement.min.js | 12 + .../build/mediaelementplayer-legacy.css | 774 ++ .../build/mediaelementplayer-legacy.min.css | 1 + .../mediaelement/build/mediaelementplayer.css | 774 ++ .../build/mediaelementplayer.min.css | 1 + .../mediaelement/build/mejs-controls.png | Bin 0 -> 2883 bytes .../mediaelement/build/mejs-controls.svg | 1 + .../build/renderers/dailymotion.js | 415 + .../build/renderers/dailymotion.min.js | 12 + .../mediaelement/build/renderers/facebook.js | 361 + .../build/renderers/facebook.min.js | 12 + .../build/renderers/soundcloud.js | 307 + .../build/renderers/soundcloud.min.js | 12 + .../mediaelement/build/renderers/twitch.js | 374 + .../build/renderers/twitch.min.js | 12 + .../mediaelement/build/renderers/vimeo.js | 411 + .../mediaelement/build/renderers/vimeo.min.js | 12 + node_modules/mediaelement/changelog.md | 1396 +++ node_modules/mediaelement/compile_swf.sh | 37 + node_modules/mediaelement/demo/chapters.vtt | 21 + node_modules/mediaelement/demo/demo.js | 126 + node_modules/mediaelement/demo/favicon.ico | Bin 0 -> 1150 bytes node_modules/mediaelement/demo/index.html | 263 + .../mediaelement/demo/mediaelement.vtt | 63 + node_modules/mediaelement/docs/api.md | 212 + node_modules/mediaelement/docs/guidelines.md | 468 + .../mediaelement/docs/installation.md | 503 + node_modules/mediaelement/docs/resources.md | 29 + node_modules/mediaelement/docs/usage.md | 498 + node_modules/mediaelement/docs/utils.md | 101 + node_modules/mediaelement/full.js | 1 + node_modules/mediaelement/media/README | 3 + node_modules/mediaelement/package.js | 60 + node_modules/mediaelement/package.json | 114 + .../src/css/mediaelementplayer-legacy.css | 711 ++ .../src/css/mediaelementplayer.css | 711 ++ .../mediaelement/src/css/mejs-controls.ai | 7861 +++++++++++++++ .../mediaelement/src/css/mejs-controls.png | Bin 0 -> 2883 bytes .../mediaelement/src/css/mejs-controls.svg | 1 + .../flash/flash-audio-ogg/OggMediaElement.as | 1 + .../audio/audiodecoder/AudioDecoder.as | 84 + .../audio/audiodecoder/decoders/AudioInfo.as | 52 + .../audio/audiodecoder/decoders/IDecoder.as | 13 + .../audiodecoder/decoders/OggVorbisDecoder.as | 221 + .../audio/audiodecoder/decoders/WAVDecoder.as | 325 + .../audiodecoder/events/AudioDecoderEvent.as | 13 + .../data/riff/RIFFChunkInfo.as | 6 + .../automatastudios/data/riff/RIFFParser.as | 175 + .../flash/flash-audio-ogg/flacc/oggvorbis.c | 440 + .../src/flash/flash-audio-ogg/oggvorbis.swc | Bin 0 -> 251290 bytes .../AudioStreamMediaElement_simple.as | 1 + .../flash/flash-audio/AudioMediaElement.as | 1 + .../flash-video-dash/DashMediaElement.as | 446 + .../src/flash/flash-video-dash/OSMF.swc | Bin 0 -> 343355 bytes .../com/castlabs/dash/DashContext.as | 367 + .../com/castlabs/dash/DashNetLoader.as | 101 + .../com/castlabs/dash/DashNetStream.as | 377 + .../com/castlabs/dash/DashPlugin.as | 42 + .../com/castlabs/dash/DashPluginInfo.as | 19 + .../com/castlabs/dash/DashSeekTrait.as | 27 + .../com/castlabs/dash/DashTimeTrait.as | 44 + .../com/castlabs/dash/boxes/Box.as | 53 + .../com/castlabs/dash/boxes/FLVTag.as | 59 + .../com/castlabs/dash/boxes/FullBox.as | 57 + .../dash/boxes/HandlerReferenceBox.as | 35 + .../com/castlabs/dash/boxes/MediaBox.as | 70 + .../com/castlabs/dash/boxes/MediaHeaderBox.as | 67 + .../dash/boxes/MediaInformationBox.as | 39 + .../com/castlabs/dash/boxes/MovieBox.as | 56 + .../castlabs/dash/boxes/MovieExtendsBox.as | 41 + .../castlabs/dash/boxes/MovieFragmentBox.as | 47 + .../com/castlabs/dash/boxes/Muxer.as | 143 + .../com/castlabs/dash/boxes/NalUnit.as | 127 + .../dash/boxes/SampleDescriptionBox.as | 44 + .../com/castlabs/dash/boxes/SampleEntry.as | 158 + .../com/castlabs/dash/boxes/SampleTableBox.as | 39 + .../com/castlabs/dash/boxes/TrackBox.as | 55 + .../castlabs/dash/boxes/TrackExtendsBox.as | 44 + .../castlabs/dash/boxes/TrackFragmentBox.as | 56 + .../dash/boxes/TrackFragmentHeaderBox.as | 70 + .../dash/boxes/TrackFragmentRunBox.as | 144 + .../com/castlabs/dash/boxes/TrackHeaderBox.as | 49 + .../dash/descriptors/Representation.as | 78 + .../dash/descriptors/index/SegmentIndex.as | 26 + .../descriptors/index/SegmentIndexFactory.as | 63 + .../dash/descriptors/index/SegmentList.as | 168 + .../dash/descriptors/index/SegmentRange.as | 126 + .../dash/descriptors/index/SegmentTemplate.as | 270 + .../dash/descriptors/index/SegmentTimeline.as | 188 + .../dash/descriptors/segments/DataSegment.as | 34 + .../descriptors/segments/MediaDataSegment.as | 35 + .../dash/descriptors/segments/NullSegment.as | 15 + .../descriptors/segments/ReflexiveSegment.as | 22 + .../dash/descriptors/segments/Segment.as | 26 + .../dash/descriptors/segments/WaitSegment.as | 15 + .../com/castlabs/dash/events/FragmentEvent.as | 35 + .../com/castlabs/dash/events/ManifestEvent.as | 35 + .../com/castlabs/dash/events/SegmentEvent.as | 43 + .../com/castlabs/dash/events/StreamEvent.as | 40 + .../dash/handlers/AudioSegmentHandler.as | 38 + .../dash/handlers/IndexSegmentHandler.as | 107 + .../InitializationAudioSegmentHandler.as | 42 + .../handlers/InitializationSegmentHandler.as | 105 + .../InitializationVideoSegmentHandler.as | 46 + .../castlabs/dash/handlers/ManifestHandler.as | 190 + .../dash/handlers/MediaSegmentHandler.as | 138 + .../castlabs/dash/handlers/SegmentHandler.as | 64 + .../dash/handlers/VideoSegmentHandler.as | 54 + .../dash/loaders/DataSegmentLoader.as | 108 + .../castlabs/dash/loaders/FragmentLoader.as | 351 + .../castlabs/dash/loaders/ManifestLoader.as | 72 + .../dash/loaders/NullSegmentLoader.as | 25 + .../dash/loaders/ReflexiveSegmentLoader.as | 29 + .../castlabs/dash/loaders/SegmentLoader.as | 33 + .../dash/utils/AdaptiveSegmentDispatcher.as | 61 + .../castlabs/dash/utils/BandwidthMonitor.as | 84 + .../com/castlabs/dash/utils/Bytes.as | 28 + .../com/castlabs/dash/utils/Console.as | 121 + .../com/castlabs/dash/utils/Manifest.as | 115 + .../com/castlabs/dash/utils/SmoothMonitor.as | 49 + .../flash/flash-video-hls/HlsMediaElement.as | 479 + .../src/flash/flash-video-hls/flashls.swc | Bin 0 -> 132431 bytes .../flash/flash-video/VideoMediaElement.as | 1 + node_modules/mediaelement/src/js/core/i18n.js | 345 + .../mediaelement/src/js/core/mediaelement.js | 546 ++ node_modules/mediaelement/src/js/core/mejs.js | 55 + .../mediaelement/src/js/core/renderer.js | 122 + .../src/js/features/fullscreen.js | 364 + .../mediaelement/src/js/features/playpause.js | 110 + .../mediaelement/src/js/features/progress.js | 649 ++ .../mediaelement/src/js/features/time.js | 166 + .../mediaelement/src/js/features/tracks.js | 987 ++ .../mediaelement/src/js/features/volume.js | 454 + node_modules/mediaelement/src/js/header.js | 11 + .../mediaelement/src/js/languages/ca.js | 107 + .../mediaelement/src/js/languages/cs.js | 108 + .../mediaelement/src/js/languages/de.js | 108 + .../mediaelement/src/js/languages/en.js | 104 + .../mediaelement/src/js/languages/es.js | 108 + .../mediaelement/src/js/languages/fa.js | 92 + .../mediaelement/src/js/languages/fr.js | 109 + .../mediaelement/src/js/languages/hr.js | 107 + .../mediaelement/src/js/languages/hu.js | 108 + .../mediaelement/src/js/languages/it.js | 108 + .../mediaelement/src/js/languages/ja.js | 108 + .../mediaelement/src/js/languages/ko.js | 108 + .../mediaelement/src/js/languages/nl.js | 109 + .../mediaelement/src/js/languages/pl.js | 108 + .../mediaelement/src/js/languages/pt.js | 108 + .../mediaelement/src/js/languages/ro.js | 108 + .../mediaelement/src/js/languages/ru.js | 108 + .../mediaelement/src/js/languages/sk.js | 108 + .../mediaelement/src/js/languages/sv.js | 107 + .../mediaelement/src/js/languages/uk.js | 107 + .../mediaelement/src/js/languages/zh-cn.js | 108 + .../mediaelement/src/js/languages/zh.js | 109 + node_modules/mediaelement/src/js/player.js | 2034 ++++ .../mediaelement/src/js/player/default.js | 135 + .../mediaelement/src/js/player/library.js | 40 + .../src/js/renderers/dailymotion.js | 486 + .../mediaelement/src/js/renderers/dash.js | 284 + .../mediaelement/src/js/renderers/facebook.js | 415 + .../mediaelement/src/js/renderers/flash.js | 571 ++ .../mediaelement/src/js/renderers/flv.js | 271 + .../mediaelement/src/js/renderers/hls.js | 315 + .../mediaelement/src/js/renderers/html5.js | 161 + .../src/js/renderers/soundcloud.js | 338 + .../mediaelement/src/js/renderers/twitch.js | 450 + .../mediaelement/src/js/renderers/vimeo.js | 446 + .../mediaelement/src/js/renderers/youtube.js | 633 ++ .../mediaelement/src/js/utils/constants.js | 181 + node_modules/mediaelement/src/js/utils/dom.js | 200 + .../mediaelement/src/js/utils/general.js | 158 + .../mediaelement/src/js/utils/media.js | 143 + .../mediaelement/src/js/utils/polyfill.js | 185 + .../mediaelement/src/js/utils/time.js | 282 + node_modules/mediaelement/standalone.js | 1 + node_modules/mediaelement/test/player.html | 85 + .../mediaelement/test/player.tests.js | 101 + .../mediaelement/test/unit/i18n.spec.js | 126 + .../mediaelement/test/unit/renderer.spec.js | 139 + .../mediaelement/test/unit/utils.spec.js | 491 + node_modules/min-document/.jshintrc | 30 + node_modules/min-document/.npmignore | 15 + node_modules/min-document/.testem.json | 14 + node_modules/min-document/.travis.yml | 6 + node_modules/min-document/CONTRIBUTION.md | 48 + node_modules/min-document/LICENCE | 19 + node_modules/min-document/README.md | 43 + node_modules/min-document/docs.mli | 156 + node_modules/min-document/document.js | 72 + node_modules/min-document/dom-comment.js | 19 + node_modules/min-document/dom-element.js | 209 + node_modules/min-document/dom-fragment.js | 28 + node_modules/min-document/dom-text.js | 27 + node_modules/min-document/event.js | 13 + .../min-document/event/add-event-listener.js | 17 + .../min-document/event/dispatch-event.js | 31 + .../event/remove-event-listener.js | 19 + node_modules/min-document/index.js | 3 + node_modules/min-document/package.json | 89 + node_modules/min-document/serialize.js | 139 + node_modules/min-document/test/cleanup.js | 13 + node_modules/min-document/test/index.js | 14 + .../min-document/test/static/index.html | 11 + .../min-document/test/static/test-adapter.js | 49 + .../min-document/test/test-document.js | 564 ++ .../min-document/test/test-dom-comment.js | 20 + .../min-document/test/test-dom-element.js | 219 + node_modules/process/LICENSE | 22 + node_modules/process/README.md | 15 + node_modules/process/browser.js | 53 + node_modules/process/index.js | 2 + node_modules/process/package.json | 50 + package-lock.json | 40 + partials/content.template.html | 5 +- partials/item-detail.template.html | 12 +- 309 files changed, 59605 insertions(+), 37 deletions(-) create mode 100644 node_modules/angular-loading-bar/.editorconfig create mode 100644 node_modules/angular-loading-bar/.jshintrc create mode 100644 node_modules/angular-loading-bar/.npmignore create mode 100644 node_modules/angular-loading-bar/CHANGELOG.md create mode 100644 node_modules/angular-loading-bar/CONTRIBUTING.md create mode 100644 node_modules/angular-loading-bar/Gruntfile.js create mode 100644 node_modules/angular-loading-bar/ISSUE_TEMPLATE.md create mode 100644 node_modules/angular-loading-bar/LICENSE create mode 100644 node_modules/angular-loading-bar/PULL_REQUEST_TEMPLATE.md create mode 100644 node_modules/angular-loading-bar/README.md create mode 100644 node_modules/angular-loading-bar/bower.json create mode 100644 node_modules/angular-loading-bar/build/loading-bar.css create mode 100644 node_modules/angular-loading-bar/build/loading-bar.js create mode 100644 node_modules/angular-loading-bar/build/loading-bar.min.css create mode 100644 node_modules/angular-loading-bar/build/loading-bar.min.js create mode 100644 node_modules/angular-loading-bar/example/app.css create mode 100644 node_modules/angular-loading-bar/example/app.js create mode 100644 node_modules/angular-loading-bar/example/index.html create mode 100644 node_modules/angular-loading-bar/index.js create mode 100644 node_modules/angular-loading-bar/package.json create mode 100644 node_modules/angular-loading-bar/src/loading-bar.css create mode 100644 node_modules/angular-loading-bar/src/loading-bar.js create mode 100644 node_modules/angular-loading-bar/test/karma-angular-1.2.conf.js create mode 100644 node_modules/angular-loading-bar/test/karma-angular-1.3.conf.js create mode 100644 node_modules/angular-loading-bar/test/karma-angular-1.4.conf.js create mode 100644 node_modules/angular-loading-bar/test/loading-bar-interceptor-config.coffee create mode 100644 node_modules/angular-loading-bar/test/loading-bar-interceptor.coffee create mode 100644 node_modules/dom-walk/.npmignore create mode 100644 node_modules/dom-walk/LICENCE create mode 100644 node_modules/dom-walk/Makefile create mode 100644 node_modules/dom-walk/README.md create mode 100644 node_modules/dom-walk/example/index.js create mode 100644 node_modules/dom-walk/example/static/bundle.js create mode 100644 node_modules/dom-walk/example/static/index.html create mode 100644 node_modules/dom-walk/index.js create mode 100644 node_modules/dom-walk/package.json create mode 100644 node_modules/global/.npmignore create mode 100644 node_modules/global/.travis.yml create mode 100644 node_modules/global/LICENSE create mode 100644 node_modules/global/README.md create mode 100644 node_modules/global/console.js create mode 100644 node_modules/global/document.js create mode 100644 node_modules/global/package.json create mode 100644 node_modules/global/process.js create mode 100644 node_modules/global/window.js create mode 100644 node_modules/mediaelement/.babelrc create mode 100644 node_modules/mediaelement/.eslintrc create mode 100644 node_modules/mediaelement/.gitattributes create mode 100644 node_modules/mediaelement/.npmignore create mode 100644 node_modules/mediaelement/.stylelintrc create mode 100644 node_modules/mediaelement/.travis.yml create mode 100644 node_modules/mediaelement/.versions create mode 100644 node_modules/mediaelement/Gruntfile.js create mode 100644 node_modules/mediaelement/README.md create mode 100644 node_modules/mediaelement/TODO.md create mode 100644 node_modules/mediaelement/bower.json create mode 100644 node_modules/mediaelement/build/lang/ca.js create mode 100644 node_modules/mediaelement/build/lang/cs.js create mode 100644 node_modules/mediaelement/build/lang/de.js create mode 100644 node_modules/mediaelement/build/lang/es.js create mode 100644 node_modules/mediaelement/build/lang/fa.js create mode 100644 node_modules/mediaelement/build/lang/fr.js create mode 100644 node_modules/mediaelement/build/lang/hr.js create mode 100644 node_modules/mediaelement/build/lang/hu.js create mode 100644 node_modules/mediaelement/build/lang/it.js create mode 100644 node_modules/mediaelement/build/lang/ja.js create mode 100644 node_modules/mediaelement/build/lang/ko.js create mode 100644 node_modules/mediaelement/build/lang/nl.js create mode 100644 node_modules/mediaelement/build/lang/pl.js create mode 100644 node_modules/mediaelement/build/lang/pt.js create mode 100644 node_modules/mediaelement/build/lang/ro.js create mode 100644 node_modules/mediaelement/build/lang/ru.js create mode 100644 node_modules/mediaelement/build/lang/sk.js create mode 100644 node_modules/mediaelement/build/lang/sv.js create mode 100644 node_modules/mediaelement/build/lang/uk.js create mode 100644 node_modules/mediaelement/build/lang/zh-cn.js create mode 100644 node_modules/mediaelement/build/lang/zh.js create mode 100644 node_modules/mediaelement/build/mediaelement-and-player.js create mode 100644 node_modules/mediaelement/build/mediaelement-and-player.min.js create mode 100644 node_modules/mediaelement/build/mediaelement-flash-audio-ogg.swf create mode 100644 node_modules/mediaelement/build/mediaelement-flash-audio.swf create mode 100644 node_modules/mediaelement/build/mediaelement-flash-video-hls.swf create mode 100644 node_modules/mediaelement/build/mediaelement-flash-video-mdash.swf create mode 100644 node_modules/mediaelement/build/mediaelement-flash-video.swf create mode 100644 node_modules/mediaelement/build/mediaelement.js create mode 100644 node_modules/mediaelement/build/mediaelement.min.js create mode 100644 node_modules/mediaelement/build/mediaelementplayer-legacy.css create mode 100644 node_modules/mediaelement/build/mediaelementplayer-legacy.min.css create mode 100644 node_modules/mediaelement/build/mediaelementplayer.css create mode 100644 node_modules/mediaelement/build/mediaelementplayer.min.css create mode 100644 node_modules/mediaelement/build/mejs-controls.png create mode 100644 node_modules/mediaelement/build/mejs-controls.svg create mode 100644 node_modules/mediaelement/build/renderers/dailymotion.js create mode 100644 node_modules/mediaelement/build/renderers/dailymotion.min.js create mode 100644 node_modules/mediaelement/build/renderers/facebook.js create mode 100644 node_modules/mediaelement/build/renderers/facebook.min.js create mode 100644 node_modules/mediaelement/build/renderers/soundcloud.js create mode 100644 node_modules/mediaelement/build/renderers/soundcloud.min.js create mode 100644 node_modules/mediaelement/build/renderers/twitch.js create mode 100644 node_modules/mediaelement/build/renderers/twitch.min.js create mode 100644 node_modules/mediaelement/build/renderers/vimeo.js create mode 100644 node_modules/mediaelement/build/renderers/vimeo.min.js create mode 100644 node_modules/mediaelement/changelog.md create mode 100755 node_modules/mediaelement/compile_swf.sh create mode 100644 node_modules/mediaelement/demo/chapters.vtt create mode 100644 node_modules/mediaelement/demo/demo.js create mode 100644 node_modules/mediaelement/demo/favicon.ico create mode 100644 node_modules/mediaelement/demo/index.html create mode 100644 node_modules/mediaelement/demo/mediaelement.vtt create mode 100644 node_modules/mediaelement/docs/api.md create mode 100644 node_modules/mediaelement/docs/guidelines.md create mode 100644 node_modules/mediaelement/docs/installation.md create mode 100644 node_modules/mediaelement/docs/resources.md create mode 100644 node_modules/mediaelement/docs/usage.md create mode 100644 node_modules/mediaelement/docs/utils.md create mode 100644 node_modules/mediaelement/full.js create mode 100644 node_modules/mediaelement/media/README create mode 100644 node_modules/mediaelement/package.js create mode 100644 node_modules/mediaelement/package.json create mode 100644 node_modules/mediaelement/src/css/mediaelementplayer-legacy.css create mode 100644 node_modules/mediaelement/src/css/mediaelementplayer.css create mode 100644 node_modules/mediaelement/src/css/mejs-controls.ai create mode 100644 node_modules/mediaelement/src/css/mejs-controls.png create mode 100644 node_modules/mediaelement/src/css/mejs-controls.svg create mode 100644 node_modules/mediaelement/src/flash/flash-audio-ogg/OggMediaElement.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/audio/audiodecoder/AudioDecoder.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/audio/audiodecoder/decoders/AudioInfo.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/audio/audiodecoder/decoders/IDecoder.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/audio/audiodecoder/decoders/OggVorbisDecoder.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/audio/audiodecoder/decoders/WAVDecoder.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/audio/audiodecoder/events/AudioDecoderEvent.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/data/riff/RIFFChunkInfo.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/com/automatastudios/data/riff/RIFFParser.as create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/flacc/oggvorbis.c create mode 100755 node_modules/mediaelement/src/flash/flash-audio-ogg/oggvorbis.swc create mode 100644 node_modules/mediaelement/src/flash/flash-audio-stream/AudioStreamMediaElement_simple.as create mode 100644 node_modules/mediaelement/src/flash/flash-audio/AudioMediaElement.as create mode 100644 node_modules/mediaelement/src/flash/flash-video-dash/DashMediaElement.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/OSMF.swc create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashContext.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashNetLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashNetStream.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashPlugin.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashPluginInfo.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashSeekTrait.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/DashTimeTrait.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/Box.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/FLVTag.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/FullBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/HandlerReferenceBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/MediaBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/MediaHeaderBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/MediaInformationBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/MovieBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/MovieExtendsBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/MovieFragmentBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/Muxer.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/NalUnit.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/SampleDescriptionBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/SampleEntry.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/SampleTableBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/TrackBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/TrackExtendsBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/TrackFragmentBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/TrackFragmentHeaderBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/TrackFragmentRunBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/boxes/TrackHeaderBox.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/Representation.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/index/SegmentIndex.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/index/SegmentIndexFactory.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/index/SegmentList.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/index/SegmentRange.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/index/SegmentTemplate.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/index/SegmentTimeline.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/segments/DataSegment.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/segments/MediaDataSegment.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/segments/NullSegment.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/segments/ReflexiveSegment.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/segments/Segment.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/descriptors/segments/WaitSegment.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/events/FragmentEvent.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/events/ManifestEvent.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/events/SegmentEvent.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/events/StreamEvent.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/AudioSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/IndexSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/InitializationAudioSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/InitializationSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/InitializationVideoSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/ManifestHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/MediaSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/SegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/handlers/VideoSegmentHandler.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/loaders/DataSegmentLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/loaders/FragmentLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/loaders/ManifestLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/loaders/NullSegmentLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/loaders/ReflexiveSegmentLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/loaders/SegmentLoader.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/utils/AdaptiveSegmentDispatcher.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/utils/BandwidthMonitor.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/utils/Bytes.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/utils/Console.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/utils/Manifest.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-dash/com/castlabs/dash/utils/SmoothMonitor.as create mode 100644 node_modules/mediaelement/src/flash/flash-video-hls/HlsMediaElement.as create mode 100755 node_modules/mediaelement/src/flash/flash-video-hls/flashls.swc create mode 100644 node_modules/mediaelement/src/flash/flash-video/VideoMediaElement.as create mode 100644 node_modules/mediaelement/src/js/core/i18n.js create mode 100644 node_modules/mediaelement/src/js/core/mediaelement.js create mode 100644 node_modules/mediaelement/src/js/core/mejs.js create mode 100644 node_modules/mediaelement/src/js/core/renderer.js create mode 100644 node_modules/mediaelement/src/js/features/fullscreen.js create mode 100644 node_modules/mediaelement/src/js/features/playpause.js create mode 100644 node_modules/mediaelement/src/js/features/progress.js create mode 100644 node_modules/mediaelement/src/js/features/time.js create mode 100644 node_modules/mediaelement/src/js/features/tracks.js create mode 100644 node_modules/mediaelement/src/js/features/volume.js create mode 100644 node_modules/mediaelement/src/js/header.js create mode 100644 node_modules/mediaelement/src/js/languages/ca.js create mode 100644 node_modules/mediaelement/src/js/languages/cs.js create mode 100644 node_modules/mediaelement/src/js/languages/de.js create mode 100644 node_modules/mediaelement/src/js/languages/en.js create mode 100644 node_modules/mediaelement/src/js/languages/es.js create mode 100644 node_modules/mediaelement/src/js/languages/fa.js create mode 100644 node_modules/mediaelement/src/js/languages/fr.js create mode 100644 node_modules/mediaelement/src/js/languages/hr.js create mode 100644 node_modules/mediaelement/src/js/languages/hu.js create mode 100644 node_modules/mediaelement/src/js/languages/it.js create mode 100644 node_modules/mediaelement/src/js/languages/ja.js create mode 100644 node_modules/mediaelement/src/js/languages/ko.js create mode 100644 node_modules/mediaelement/src/js/languages/nl.js create mode 100644 node_modules/mediaelement/src/js/languages/pl.js create mode 100644 node_modules/mediaelement/src/js/languages/pt.js create mode 100644 node_modules/mediaelement/src/js/languages/ro.js create mode 100644 node_modules/mediaelement/src/js/languages/ru.js create mode 100644 node_modules/mediaelement/src/js/languages/sk.js create mode 100644 node_modules/mediaelement/src/js/languages/sv.js create mode 100644 node_modules/mediaelement/src/js/languages/uk.js create mode 100644 node_modules/mediaelement/src/js/languages/zh-cn.js create mode 100644 node_modules/mediaelement/src/js/languages/zh.js create mode 100644 node_modules/mediaelement/src/js/player.js create mode 100644 node_modules/mediaelement/src/js/player/default.js create mode 100644 node_modules/mediaelement/src/js/player/library.js create mode 100644 node_modules/mediaelement/src/js/renderers/dailymotion.js create mode 100644 node_modules/mediaelement/src/js/renderers/dash.js create mode 100644 node_modules/mediaelement/src/js/renderers/facebook.js create mode 100644 node_modules/mediaelement/src/js/renderers/flash.js create mode 100644 node_modules/mediaelement/src/js/renderers/flv.js create mode 100644 node_modules/mediaelement/src/js/renderers/hls.js create mode 100644 node_modules/mediaelement/src/js/renderers/html5.js create mode 100644 node_modules/mediaelement/src/js/renderers/soundcloud.js create mode 100644 node_modules/mediaelement/src/js/renderers/twitch.js create mode 100644 node_modules/mediaelement/src/js/renderers/vimeo.js create mode 100644 node_modules/mediaelement/src/js/renderers/youtube.js create mode 100644 node_modules/mediaelement/src/js/utils/constants.js create mode 100644 node_modules/mediaelement/src/js/utils/dom.js create mode 100644 node_modules/mediaelement/src/js/utils/general.js create mode 100644 node_modules/mediaelement/src/js/utils/media.js create mode 100644 node_modules/mediaelement/src/js/utils/polyfill.js create mode 100644 node_modules/mediaelement/src/js/utils/time.js create mode 100644 node_modules/mediaelement/standalone.js create mode 100644 node_modules/mediaelement/test/player.html create mode 100644 node_modules/mediaelement/test/player.tests.js create mode 100644 node_modules/mediaelement/test/unit/i18n.spec.js create mode 100644 node_modules/mediaelement/test/unit/renderer.spec.js create mode 100644 node_modules/mediaelement/test/unit/utils.spec.js create mode 100644 node_modules/min-document/.jshintrc create mode 100644 node_modules/min-document/.npmignore create mode 100644 node_modules/min-document/.testem.json create mode 100644 node_modules/min-document/.travis.yml create mode 100644 node_modules/min-document/CONTRIBUTION.md create mode 100644 node_modules/min-document/LICENCE create mode 100644 node_modules/min-document/README.md create mode 100644 node_modules/min-document/docs.mli create mode 100644 node_modules/min-document/document.js create mode 100644 node_modules/min-document/dom-comment.js create mode 100644 node_modules/min-document/dom-element.js create mode 100644 node_modules/min-document/dom-fragment.js create mode 100644 node_modules/min-document/dom-text.js create mode 100644 node_modules/min-document/event.js create mode 100644 node_modules/min-document/event/add-event-listener.js create mode 100644 node_modules/min-document/event/dispatch-event.js create mode 100644 node_modules/min-document/event/remove-event-listener.js create mode 100644 node_modules/min-document/index.js create mode 100644 node_modules/min-document/package.json create mode 100644 node_modules/min-document/serialize.js create mode 100644 node_modules/min-document/test/cleanup.js create mode 100644 node_modules/min-document/test/index.js create mode 100644 node_modules/min-document/test/static/index.html create mode 100644 node_modules/min-document/test/static/test-adapter.js create mode 100644 node_modules/min-document/test/test-document.js create mode 100644 node_modules/min-document/test/test-dom-comment.js create mode 100644 node_modules/min-document/test/test-dom-element.js create mode 100644 node_modules/process/LICENSE create mode 100644 node_modules/process/README.md create mode 100644 node_modules/process/browser.js create mode 100644 node_modules/process/index.js create mode 100644 node_modules/process/package.json diff --git a/app/anorgatarrak.js b/app/anorgatarrak.js index 46ea0f36..69cc1033 100644 --- a/app/anorgatarrak.js +++ b/app/anorgatarrak.js @@ -7,7 +7,9 @@ angular.module('anApp',[ ]); jQuery(document).ready(function() { - //console.log('ready'); + console.log('ready'); + //$('video, audio').mediaelementplayer(); + // //var slsh; //var slsh = new SlideShow('.slideshow', {timeout: 5000}); /*jQuery(document) diff --git a/app/catalog/catalog.component.js b/app/catalog/catalog.component.js index 8d082acc..bc4a0089 100644 --- a/app/catalog/catalog.component.js +++ b/app/catalog/catalog.component.js @@ -5,30 +5,11 @@ angular. //'', controller : function($scope, $http, $routeParams) { - $http.get('wp-json/wp/v2/entrevista').then(function(res) { - console.log(res.data); - $scope.entrevistas = res.data; + $http.get('wp-json/wp/v2/entrevista/?per_page=100').then(function(res) { + $scope.entrevistas = res.data; + console.log(res); }); } - /*function anListController() { - this.catalog = [ - { id: '1', title: 'Item 1', description: 'Description 1', img: 'assets/anorga1.jpg'}, - { id: '2',title: 'Item 2', description: 'Description 2', img: 'assets/anorga2.jpg'}, - { id: '3', title: 'Item 2', description: 'Description 2', img: 'assets/anorga3.jpg'}, - { id: '4', title: 'Item 2', description: 'Description 2', img: 'assets/anorga4.jpg'}, - { id: '5', title: 'Item 2', description: 'Description 2', img: 'assets/anorga5.jpg'}, - { id: '6', title: 'Item 2', description: 'Description 2', img: 'assets/anorga6.jpg'}, - { id: '7', title: 'Item 2', description: 'Description 2', img: 'assets/anorga7.jpg'}, - { id: '8', title: 'Item 2', description: 'Description 2', img: 'assets/anorga8.jpg'}, - { id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga9.jpg'}, - { id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga.jpg'}, - { id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga1.jpg'}, - { id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga3.jpg'}, - { id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga5.jpg'}, - { id: '9', title: 'Item 2', description: 'Description 2', img: 'assets/anorga2.jpg'}, - { id: '10', title: 'Item 2', description: 'Description 2', img: 'assets/anorga10.jpg'} - ] - }*/ }); @@ -63,9 +44,14 @@ angular .module('catalog') .component('anContent',{ templateUrl: localized.partials + 'content.template.html', - controller: function($scope, $http, $routeParams, $sce) { + controller: function($scope, $http, $routeParams, $sce,$rootScope) { + $rootScope.startLoading(); console.log($routeParams.slug); window.scrollTo(0,0); - $http.get('wp-json/wp/v2/pages/?slug='+$routeParams.slug).then(function(res) { $scope.post = res.data[0]; $scope.content = $sce.trustAsHtml($scope.post.content.rendered); }); + $http.get('wp-json/wp/v2/pages/?slug='+$routeParams.slug).then(function(res) { + $scope.post = res.data[0]; + $scope.content = $sce.trustAsHtml($scope.post.content.rendered); + $rootScope.stopLoading(); + }); } }); diff --git a/app/catalog/catalog.config.js b/app/catalog/catalog.config.js index 6a667374..81065662 100644 --- a/app/catalog/catalog.config.js +++ b/app/catalog/catalog.config.js @@ -1,12 +1,14 @@ angular. module('catalog'). - config(['$locationProvider', '$routeProvider', - function config($locationProvider, $routeProvider) { - //$locationProvider.hashPrefix('!'); + config(['$locationProvider', '$routeProvider','cfpLoadingBarProvider', + function config($locationProvider, $routeProvider,cfpLoadingBarProvider) { + cfpLoadingBarProvider.includeSpinner = false; + cfpLoadingBarProvider.parentSelector = 'header'; $locationProvider.html5Mode(true); var a = window.location.host.split('.')[0]; - $routeProvider + $routeProvider .when('/',{ template: ''}) + .when('/catalog2', { redirectTo: '/catalog'}) .when('/catalog', { template: '' }) @@ -14,11 +16,19 @@ angular. template: '' }) .when('/info', {template: ''}) - //.when('/contact', {template: ''}) .when('/:slug',{template: ''}) .otherwise({ redirectTo: '/'}); + } ]). run(function($rootScope) { + $rootScope.$on('$stateChangeStart', + function(event,toState,toParams,fromState,fromParams) { console.log('statechangestart'); }); $rootScope.loading = false; + $rootScope.startLoading = function() { + console.log('start'); + } + $rootScope.stopLoading = function() { + console.log('stop'); + } }); diff --git a/app/catalog/catalog.module.js b/app/catalog/catalog.module.js index 4fb7c848..28abea87 100644 --- a/app/catalog/catalog.module.js +++ b/app/catalog/catalog.module.js @@ -1,3 +1,3 @@ angular.module('catalog', [ - 'ngRoute']); + 'ngRoute','angular-loading-bar']); diff --git a/app/catalog/item.component.js b/app/catalog/item.component.js index 3c993417..3cfb82cd 100644 --- a/app/catalog/item.component.js +++ b/app/catalog/item.component.js @@ -6,7 +6,7 @@ angular. //console.log($routeParams.slug); $scope.lang = SubdomainService.subdomain; $http.get('wp-json/wp/v2/entrevista/?slug='+$routeParams.slug).then(function(res) { - //console.log(res.data[0]); + console.log(res.data[0]); $scope.post = res.data[0]; }); } diff --git a/css/anorgatarrak.css b/css/anorgatarrak.css index 440f2afb..316de169 100644 --- a/css/anorgatarrak.css +++ b/css/anorgatarrak.css @@ -110,3 +110,9 @@ h2 {font-weight:bold; color: rgba(255,153,51.255);} .slideshow-static { padding:0; } .slideshow-static li { list-style:none;} + +#loading-bar .bar { + background: #ff9933 !important; +} + +div.post-header div.row { background:rgba(0,0,0,0.8);} diff --git a/functions.php b/functions.php index f8831cec..b2a544bc 100644 --- a/functions.php +++ b/functions.php @@ -6,15 +6,19 @@ function anorgatarrak_scripts() { wp_enqueue_style( 'anorgatarrak', get_template_directory_uri() . '/css/anorgatarrak.css',false,'1.1','all'); wp_enqueue_style( 'slideshow', get_template_directory_uri() . '/node_modules/simple-slideshow/src/slideshow.css',false,'1.1','all'); wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css?family=Montserrat|Nothing+You+Could+Do|Roboto',false,'1.1','all'); + wp_enqueue_style('angular-loading-bar', get_template_directory_uri() . '/node_modules/angular-loading-bar/src/loading-bar.css'); + wp_enqueue_style('mediaelement', get_template_directory_uri() . '/node_modules/mediaelement/build/mediaelementplayer.min.css'); //Scripts wp_enqueue_script('html5shiv', 'https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js'); wp_enqueue_script('respond', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js'); + wp_enqueue_script('mediaelement', get_template_directory_uri().'/node_modules/mediaelement/build/mediaelement-and-player.min.js'); wp_enqueue_script('slideshow', get_template_directory_uri() .'/node_modules/simple-slideshow/src/slideshow.js'); wp_enqueue_script('jquery', get_template_directory_uri() .'/node_modules/jquery/dist/jquery.min.js'); wp_enqueue_script('bootstrap', get_template_directory_uri() .'/node_modules/bootstrap/dist/js/bootstrap.min.js'); wp_enqueue_script('angularjs', get_template_directory_uri() .'/node_modules/angular/angular.js'); wp_enqueue_script('angularjs-route', get_template_directory_uri() .'/node_modules/angular-route/angular-route.js'); wp_enqueue_script('angularjs-sanitize', get_stylesheet_directory_uri() . '/node_modules/angular-sanitize/angular-sanitize.min.js'); + wp_enqueue_script('angular-loading-bar', get_stylesheet_directory_uri() . '/node_modules/angular-loading-bar/src/loading-bar.js'); wp_enqueue_script('anorgatarrak', get_template_directory_uri() .'/app/anorgatarrak.js'); wp_enqueue_script('catalog-module', get_template_directory_uri() .'/app/catalog/catalog.module.js'); wp_enqueue_script('catalog-config', get_template_directory_uri() .'/app/catalog/catalog.config.js'); diff --git a/node_modules/angular-loading-bar/.editorconfig b/node_modules/angular-loading-bar/.editorconfig new file mode 100644 index 00000000..c2cdfb8a --- /dev/null +++ b/node_modules/angular-loading-bar/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 2 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/angular-loading-bar/.jshintrc b/node_modules/angular-loading-bar/.jshintrc new file mode 100644 index 00000000..9f78ce61 --- /dev/null +++ b/node_modules/angular-loading-bar/.jshintrc @@ -0,0 +1,93 @@ +{ + "globals": { + "angular": false + }, + + "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). + "curly" : true, // Require {} for every new block or scope. + "eqeqeq" : true, // Require triple equals i.e. `===`. + "forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : true, // Prohibit variable use before definition. + "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "noempty" : true, // Prohibit use of empty blocks. + "nonew" : true, // Prohibit use of constructors for side-effects. + "plusplus" : false, // Prohibit use of `++` & `--`. + "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. + "undef" : true, // Require all non-global variables be declared before they are used. + "strict" : false, // Require `use strict` pragma in every file. + "trailing" : true, // Prohibit trailing whitespaces. + + + // Relaxing options: + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "eqnull" : false, // Tolerate use of `== null`. + "es5" : false, // Allow EcmaScript 5 syntax. + "esnext" : false, // Allow ES.next specific features such as `const` and `let`. + "evil" : false, // Tolerate use of `eval`. + "expr" : false, // Tolerate `ExpressionStatement` as Programs. + "funcscope" : false, // Tolerate declarations of variables inside of control structures while accessing them later from the outside. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + "iterator" : false, // Allow usage of __iterator__ property. + "lastsemic" : false, // Tolerat missing semicolons when the it is omitted for the last statement in a one-line block. + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "laxcomma" : false, // Suppress warnings about comma-first coding style. + "loopfunc" : false, // Allow functions to be defined within loops. + "multistr" : false, // Tolerate multi-line strings. + "onecase" : false, // Tolerate switches with just one case. + "proto" : false, // Tolerate __proto__ property. This property is deprecated. + "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. + "scripturl" : false, // Tolerate script-targeted URLs. + "smarttabs" : false, // Tolerate mixed tabs and spaces when the latter are used for alignmnent only. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "validthis" : false, // Tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function. + + // == Environments ==================================================== + // + // These options pre-define global variables that are exposed by + // popular JavaScript libraries and runtime environments—such as + // browser or node.js. + + "browser" : true, // Standard browser globals e.g. `window`, `document`. + "couch" : false, // Enable globals exposed by CouchDB. + "devel" : false, // Allow development statements e.g. `console.log();`. + "dojo" : false, // Enable globals exposed by Dojo Toolkit. + "jquery" : false, // Enable globals exposed by jQuery JavaScript library. + "mootools" : false, // Enable globals exposed by MooTools JavaScript framework. + "node" : false, // Enable globals available when code is running inside of the NodeJS runtime environment. + "nonstandard" : false, // Define non-standard but widely adopted globals such as escape and unescape. + "prototypejs" : false, // Enable globals exposed by Prototype JavaScript framework. + "rhino" : false, // Enable globals available when your code is running inside of the Rhino runtime environment. + "wsh" : false, // Enable globals available when your code is running as a script for the Windows Script Host. + + // == JSLint Legacy =================================================== + // + // These options are legacy from JSLint. Aside from bug fixes they will + // not be improved in any way and might be removed at any point. + + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "onevar" : false, // Allow only one `var` statement per function. + "passfail" : false, // Stop on first error. + "white" : false, // Check against strict whitespace and indentation rules. + + // == Undocumented Options ============================================ + // + // While I've found these options in [example1][2] and [example2][3] + // they are not described in the [JSHint Options documentation][4]. + // + // [4]: http://www.jshint.com/options/ + + "maxerr" : 100, // Maximum errors before stopping. + "predef" : [ // Extra globals. + //"exampleVar", + //"anotherCoolGlobal", + //"iLoveDouglas" + ], + "indent" : 2 // Specify indentation spacing + +} diff --git a/node_modules/angular-loading-bar/.npmignore b/node_modules/angular-loading-bar/.npmignore new file mode 100644 index 00000000..27a2a312 --- /dev/null +++ b/node_modules/angular-loading-bar/.npmignore @@ -0,0 +1,3 @@ +node_modules +test/coverage +bower_components diff --git a/node_modules/angular-loading-bar/CHANGELOG.md b/node_modules/angular-loading-bar/CHANGELOG.md new file mode 100644 index 00000000..8d124d0c --- /dev/null +++ b/node_modules/angular-loading-bar/CHANGELOG.md @@ -0,0 +1,81 @@ +Changelog +========== +## 0.9.0 +- resolved issue with parentSelector when parent has no children +([#244](https://github.com/chieffancypants/angular-loading-bar/pull/244)) +([#251](https://github.com/chieffancypants/angular-loading-bar/issues/251)) +([#239](https://github.com/chieffancypants/angular-loading-bar/issues/239)) +([#179](https://github.com/chieffancypants/angular-loading-bar/issues/179)) +- added style property to package.json +([#271](https://github.com/chieffancypants/angular-loading-bar/pull/271)) +([#231](https://github.com/chieffancypants/angular-loading-bar/pull/231)) +- Removed duplicated property declaration in CSS +([#226](https://github.com/chieffancypants/angular-loading-bar/pull/226)) + + + +## 0.8.0 +- auto incrementing is now configurable +([#209](https://github.com/chieffancypants/angular-loading-bar/pull/209)) +- removed `version` from bower.json +([#207](https://github.com/chieffancypants/angular-loading-bar/pull/207)) +- added support for webpack and browserify +([#200](https://github.com/chieffancypants/angular-loading-bar/pull/200)) +- spinner border radius 10px -> 50% +([#184](https://github.com/chieffancypants/angular-loading-bar/issues/184)) + + +## 0.7.1 +- Merge correct PR for broken interceptor detection ([#133](https://github.com/chieffancypants/angular-loading-bar/pull/133), [#50](https://github.com/chieffancypants/angular-loading-bar/pull/50)) + +## 0.7.0 +- Changes for animate.enter compatibility for 1.2 and 1.3 ([#170](https://github.com/chieffancypants/angular-loading-bar/pull/170)) +- Detect errors with other interceptors ([#133](https://github.com/chieffancypants/angular-loading-bar/pull/133), [#50](https://github.com/chieffancypants/angular-loading-bar/pull/50)) +- Provide more detail on response/responseError events ([#128](https://github.com/chieffancypants/angular-loading-bar/pull/128)) +- Change angular dependency in bower ([#126](https://github.com/chieffancypants/angular-loading-bar/issues/126)) + +## 0.6.0 +- Customize progress bar template: ([#111](https://github.com/chieffancypants/angular-loading-bar/pull/111)) +- Only append bar to first parent found ([#108](https://github.com/chieffancypants/angular-loading-bar/pull/108)) + +## 0.5.2: +Fixes for Angular 1.3 breaking changes: +- Circular dependencies: ([#98](https://github.com/chieffancypants/angular-loading-bar/issues/98)), ([#101](https://github.com/chieffancypants/angular-loading-bar/pull/101)) +- $animate no longer accepts callbacks: ([#102](https://github.com/chieffancypants/angular-loading-bar/pull/102)) + +## 0.5.1 +- Reworked cache logic to allow cache:true ([#96](https://github.com/chieffancypants/angular-loading-bar/pull/96)) + +## 0.5.0 +- Added spinner template configuration ([#82](https://github.com/chieffancypants/angular-loading-bar/pull/82)) +- $timeout was not canceled properly ([#79](https://github.com/chieffancypants/angular-loading-bar/pull/79)) + +## 0.4.3 +- update z-index to work with other css frameworks ([#69](https://github.com/chieffancypants/angular-loading-bar/pull/69)) +- ignoreLoadingBar not ignored when calculating percentage complete ([#70](https://github.com/chieffancypants/angular-loading-bar/pull/70)) + +## 0.4.2 +- Split loading bar into different modules so they can be included separately ([#46](https://github.com/chieffancypants/angular-loading-bar/issues/46)) + +## 0.4.1 +- Fix for route views defined on body where loading bar is also attached ([#56](https://github.com/chieffancypants/angular-loading-bar/issues/56)) + +## 0.4.0 +- Initial load percentage is now configurable ([#47](https://github.com/chieffancypants/angular-loading-bar/issues/47)) +- Peg graphic reworked so the loadingbar does not require CSS changes when not at the very top of the page ([#42](https://github.com/chieffancypants/angular-loading-bar/issues/42), [#45](https://github.com/chieffancypants/angular-loading-bar/issues/45), [#10](https://github.com/chieffancypants/angular-loading-bar/issues/10)) +- z-index of spinner increased to work with Bootstrap 3 z-indexes ([#53](https://github.com/chieffancypants/angular-loading-bar/issues/53)) + +## 0.3.0 +- Loading bar only appears on XHR requests with high latency ([#27](https://github.com/chieffancypants/angular-loading-bar/issues/27)) + +## 0.2.0 +- Progression bar not calculated correctly for consecutive calls within the 500ms delay ([#29](https://github.com/chieffancypants/angular-loading-bar/issues/29), [#32](https://github.com/chieffancypants/angular-loading-bar/issues/32)) +- Event broadcasts when loading (#31) + +## 0.1.1 +- Alias chieffancypants.loadingbar to angular-loading-bar (#25, #19) + +## 0.1.0 +- Fixed issues with Angular 1.2-rc3+ +- Ability to ignore particular XHR requests (#21) +- Broadcasting of events (#18) diff --git a/node_modules/angular-loading-bar/CONTRIBUTING.md b/node_modules/angular-loading-bar/CONTRIBUTING.md new file mode 100644 index 00000000..aada2ccb --- /dev/null +++ b/node_modules/angular-loading-bar/CONTRIBUTING.md @@ -0,0 +1,17 @@ +### Submitting a PR +Excellent! You've chosen to help advance the project by either fixing a bug, or implementing a new feature. Before you put forth any work on a PR, please follow these steps: + +1. Ensure a similar PR has not already been opened or closed. +1. Clearly define the intent of the PR. The more detail, the more likelihood of it getting merged. +1. Is this a feature that would benefit the **majority** of users? This is a small library, and it intends to stay that way. If you do not believe most users of the project will benefit from your work, it should probably be added in your own application. +1. Be sure to include test cases that cover all newly introduced code. This part is essential, as any PRs without tests will be closed. +1. Link any [issues](https://github.com/chieffancypants/angular-loading-bar/issues) that are addressed by the PR. + +### Submitting a bug report +If you believe you've found a bug in the source code, and are unable to fix it yourself (by submitting a PR) please follow these steps: + +1. Ensure the bug has not already been reported by searching the [issues](https://github.com/chieffancypants/angular-loading-bar/issues) +1. Submit a reduced test case that clearly demonstrates the bug. This means submitting a plunker or jsfiddle with the bare minimum of code necessary to reproduce the bug. Without this, your issue may be closed as invalid. +1. Include any relevant browser information +1. If you're unable to fix this bug yourself, but can point to why it is occuring, please send that information along (line# or commit) + diff --git a/node_modules/angular-loading-bar/Gruntfile.js b/node_modules/angular-loading-bar/Gruntfile.js new file mode 100644 index 00000000..d23ddf1b --- /dev/null +++ b/node_modules/angular-loading-bar/Gruntfile.js @@ -0,0 +1,102 @@ +/*global module:false*/ +module.exports = function(grunt) { + + grunt.initConfig({ + + // Metadata. + pkg: grunt.file.readJSON('package.json'), + banner: '/*! \n * <%= pkg.title || pkg.name %> v<%= pkg.version %>\n' + + ' * <%= pkg.homepage %>\n' + + ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + + ' * License: <%= pkg.license %>\n' + + ' */\n', + + // Task configuration. + uglify: { + options: { + banner: '<%= banner %>', + report: 'gzip' + }, + build: { + src: 'src/loading-bar.js', + dest: 'build/loading-bar.min.js' + } + }, + + cssmin: { + options: { + banner: '<%= banner %>', + report: 'gzip' + }, + minify: { + src: 'src/loading-bar.css', + dest: 'build/loading-bar.min.css' + } + }, + + karma: { + unit: { + configFile: 'test/karma-angular-1.2.conf.js', + singleRun: true, + coverageReporter: { + type: 'text', + dir: 'coverage/' + } + }, + unit13: { + configFile: 'test/karma-angular-1.3.conf.js', + singleRun: true, + coverageReporter: { + type: 'text', + dir: 'coverage/' + } + }, + unit14: { + configFile: 'test/karma-angular-1.4.conf.js', + singleRun: true, + coverageReporter: { + type: 'text', + dir: 'coverage/' + } + }, + watch: { + configFile: 'test/karma-angular-1.2.conf.js', + singleRun: false, + reporters: ['progress'] // Don't display coverage + } + }, + + jshint: { + jshintrc: '.jshintrc', + gruntfile: { + src: 'Gruntfile.js' + }, + src: { + src: ['src/*.js'] + } + }, + + concat: { + build: { + options: { + banner: '<%= banner %>' + }, + files: { + 'build/loading-bar.css': 'src/loading-bar.css', + 'build/loading-bar.js': 'src/loading-bar.js', + } + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-karma'); + + grunt.registerTask('default', ['jshint', 'karma:unit', 'karma:unit13', 'karma:unit14', 'uglify', 'cssmin', 'concat:build']); + grunt.registerTask('test', ['karma:watch']); + grunt.registerTask('build', ['default']); + +}; diff --git a/node_modules/angular-loading-bar/ISSUE_TEMPLATE.md b/node_modules/angular-loading-bar/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..436af93a --- /dev/null +++ b/node_modules/angular-loading-bar/ISSUE_TEMPLATE.md @@ -0,0 +1,14 @@ +#### Description of bug: + + +#### Expected result: + + +#### Actual result: + + +#### Browsers affected: + + +#### URL of reduced test case: + diff --git a/node_modules/angular-loading-bar/LICENSE b/node_modules/angular-loading-bar/LICENSE new file mode 100644 index 00000000..252c23aa --- /dev/null +++ b/node_modules/angular-loading-bar/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013-2014 Wes Cruver + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/angular-loading-bar/PULL_REQUEST_TEMPLATE.md b/node_modules/angular-loading-bar/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..a37ca3f5 --- /dev/null +++ b/node_modules/angular-loading-bar/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +#### Summary: + +Provide a general description of the code changes in your pull +request. If bugs were fixed, please document the changes and why +they were introduced. + +Please ensure that your PR contains test cases that cover all new +code and any changes to existing code. Without tests, your PR is +likely to be closed without merging. + +#### Related issues: +Please review the [issues](https://github.com/chieffancypants/angular-loading-bar/issues) +page, and link any issues that are addressed or related to this PR. diff --git a/node_modules/angular-loading-bar/README.md b/node_modules/angular-loading-bar/README.md new file mode 100644 index 00000000..b195785f --- /dev/null +++ b/node_modules/angular-loading-bar/README.md @@ -0,0 +1,190 @@ +angular-loading-bar +=================== + +The idea is simple: Add a loading bar / progress bar whenever an XHR request goes out in angular. Multiple requests within the same time period get bundled together such that each response increments the progress bar by the appropriate amount. + +This is mostly cool because you simply include it in your app, and it works. There's no complicated setup, and no need to maintain the state of the loading bar; it's all handled automatically by the interceptor. + +**Requirements:** AngularJS 1.2+ + +**File Size:** 2.4Kb minified, 0.5Kb gzipped + + +## Usage: + +1. include the loading bar as a dependency for your app. If you want animations, include `ngAnimate` as well. *note: ngAnimate is optional* + + ```js + angular.module('myApp', ['angular-loading-bar', 'ngAnimate']) + ``` + +2. include the supplied JS and CSS file (or create your own CSS to override defaults). + + ```html + + + ``` + +3. That's it -- you're done! + +#### via bower: +``` +$ bower install angular-loading-bar +``` +#### via npm: +``` +$ npm install angular-loading-bar +``` + +#### via CDN: +```html + + +``` + +## Why I created this +There are a couple projects similar to this out there, but none were ideal for me. All implementations I've seen require that you maintain state on behalf of the loading bar. In other words, you're setting the value of the loading/progress bar manually from potentially many different locations. This becomes complicated when you have a very large application with several services all making independent XHR requests. It becomes even more complicated if you want these services to be loosly coupled. + +Additionally, Angular was created as a highly testable framework, so it pains me to see Angular modules without tests. That is not the case here as this loading bar ships with 100% code coverage. + + +**Goals for this project:** + +1. Make it automatic +2. Unit tests, 100% coverage +3. Must work well with ngAnimate +4. Must be styled via external CSS (not inline) +5. No jQuery dependencies + + +## Configuration + +#### Turn the spinner on or off: +The insertion of the spinner can be controlled through configuration. It's on by default, but if you'd like to turn it off, simply configure the service: + +```js +angular.module('myApp', ['angular-loading-bar']) + .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) { + cfpLoadingBarProvider.includeSpinner = false; + }]) +``` + +#### Turn the loading bar on or off: +Like the spinner configuration above, the loading bar can also be turned off for cases where you only want the spinner: + +```js +angular.module('myApp', ['angular-loading-bar']) + .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) { + cfpLoadingBarProvider.includeBar = false; + }]) +``` + +#### Customize the template: +If you'd like to replace the default HTML template you can configure it by providing inline HTML as a string: + +```js +angular.module('myApp', ['angular-loading-bar']) + .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) { + cfpLoadingBarProvider.spinnerTemplate = '
Loading...
'; + }]) +``` + +#### Latency Threshold +By default, the loading bar will only display after it has been waiting for a response for over 100ms. This helps keep things feeling snappy, and avoids the annoyingness of showing a loading bar every few seconds on really chatty applications. This threshold is totally configurable: + +```js +angular.module('myApp', ['angular-loading-bar']) + .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) { + cfpLoadingBarProvider.latencyThreshold = 500; + }]) +``` + +#### Ignoring particular XHR requests: +The loading bar can also be forced to ignore certain requests, for example, when long-polling or periodically sending debugging information back to the server. + +```js +// ignore a particular $http GET: +$http.get('/status', { + ignoreLoadingBar: true +}); + +// ignore a particular $http POST. Note: POST and GET have different +// method signatures: +$http.post('/save', data, { + ignoreLoadingBar: true +}); + +``` + + +```js +// ignore particular $resource requests: +.factory('Restaurant', function($resource) { + return $resource('/api/restaurant/:id', {id: '@id'}, { + query: { + method: 'GET', + isArray: true, + ignoreLoadingBar: true + } + }); +}); + +``` + + + + +## How it works: +This library is split into two modules, an $http `interceptor`, and a `service`: + +**Interceptor** +The interceptor simply listens for all outgoing XHR requests, and then instructs the loadingBar service to start, stop, and increment accordingly. There is no public API for the interceptor. It can be used stand-alone by including `cfp.loadingBarInterceptor` as a dependency for your module. + +**Service** +The service is responsible for the presentation of the loading bar. It injects the loading bar into the DOM, adjusts the width whenever `set()` is called, and `complete()`s the whole show by removing the loading bar from the DOM. + +## Service API (advanced usage) +Under normal circumstances you won't need to use this. However, if you wish to use the loading bar without the interceptor, you can do that as well. Simply include the loading bar service as a dependency instead of the main `angular-loading-bar` module: + +```js +angular.module('myApp', ['cfp.loadingBar']) +``` + + +```js + +cfpLoadingBar.start(); +// will insert the loading bar into the DOM, and display its progress at 1%. +// It will automatically call `inc()` repeatedly to give the illusion that the page load is progressing. + +cfpLoadingBar.inc(); +// increments the loading bar by a random amount. +// It is important to note that the auto incrementing will begin to slow down as +// the progress increases. This is to prevent the loading bar from appearing +// completed (or almost complete) before the XHR request has responded. + +cfpLoadingBar.set(0.3) // Set the loading bar to 30% +cfpLoadingBar.status() // Returns the loading bar's progress. +// -> 0.3 + +cfpLoadingBar.complete() +// Set the loading bar's progress to 100%, and then remove it from the DOM. + +``` + +## Events +The loading bar broadcasts the following events over $rootScope allowing further customization: + +**`cfpLoadingBar:loading`** triggered upon each XHR request that is not already cached + +**`cfpLoadingBar:loaded`** triggered each time an XHR request recieves a response (either successful or error) + +**`cfpLoadingBar:started`** triggered once upon the first XHR request. Will trigger again if another request goes out after `cfpLoadingBar:completed` has triggered. + +**`cfpLoadingBar:completed`** triggered once when the all XHR requests have returned (either successfully or not) + +## Credits: +Credit goes to [rstacruz](https://github.com/rstacruz) for his excellent [nProgress](https://github.com/rstacruz/nprogress). + +## License: +Licensed under the MIT license diff --git a/node_modules/angular-loading-bar/bower.json b/node_modules/angular-loading-bar/bower.json new file mode 100644 index 00000000..f1d1f7a8 --- /dev/null +++ b/node_modules/angular-loading-bar/bower.json @@ -0,0 +1,31 @@ +{ + "name": "angular-loading-bar", + "main": [ + "build/loading-bar.js", + "build/loading-bar.css" + ], + "ignore": [ + "**/.*", + "node_modules", + "components", + "test", + "example" + ], + "dependencies": { + "angular": "^1.2.9" + }, + "devDependencies": { + "angular": "~1.2.23", + "angular-1.3": "angular#1.3", + "angular-1.4": "angular#1.4", + "angular-mocks": "~1.2.9", + "angular-mocks-1.3": "angular-mocks#1.3", + "angular-mocks-1.4": "angular-mocks#1.4", + "angular-animate": "~1.2.9", + "angular-animate-1.3": "angular-animate#1.3", + "angular-animate-1.4": "angular-animate#1.4" + }, + "resolutions": { + "angular": "~1.2.23" + } +} diff --git a/node_modules/angular-loading-bar/build/loading-bar.css b/node_modules/angular-loading-bar/build/loading-bar.css new file mode 100644 index 00000000..72408d1a --- /dev/null +++ b/node_modules/angular-loading-bar/build/loading-bar.css @@ -0,0 +1,110 @@ +/*! + * angular-loading-bar v0.9.0 + * https://chieffancypants.github.io/angular-loading-bar + * Copyright (c) 2016 Wes Cruver + * License: MIT + */ + +/* Make clicks pass-through */ +#loading-bar, +#loading-bar-spinner { + pointer-events: none; + -webkit-pointer-events: none; + -webkit-transition: 350ms linear all; + -moz-transition: 350ms linear all; + -o-transition: 350ms linear all; + transition: 350ms linear all; +} + +#loading-bar.ng-enter, +#loading-bar.ng-leave.ng-leave-active, +#loading-bar-spinner.ng-enter, +#loading-bar-spinner.ng-leave.ng-leave-active { + opacity: 0; +} + +#loading-bar.ng-enter.ng-enter-active, +#loading-bar.ng-leave, +#loading-bar-spinner.ng-enter.ng-enter-active, +#loading-bar-spinner.ng-leave { + opacity: 1; +} + +#loading-bar .bar { + -webkit-transition: width 350ms; + -moz-transition: width 350ms; + -o-transition: width 350ms; + transition: width 350ms; + + background: #29d; + position: fixed; + z-index: 10002; + top: 0; + left: 0; + width: 100%; + height: 2px; + border-bottom-right-radius: 1px; + border-top-right-radius: 1px; +} + +/* Fancy blur effect */ +#loading-bar .peg { + position: absolute; + width: 70px; + right: 0; + top: 0; + height: 2px; + opacity: .45; + -moz-box-shadow: #29d 1px 0 6px 1px; + -ms-box-shadow: #29d 1px 0 6px 1px; + -webkit-box-shadow: #29d 1px 0 6px 1px; + box-shadow: #29d 1px 0 6px 1px; + -moz-border-radius: 100%; + -webkit-border-radius: 100%; + border-radius: 100%; +} + +#loading-bar-spinner { + display: block; + position: fixed; + z-index: 10002; + top: 10px; + left: 10px; +} + +#loading-bar-spinner .spinner-icon { + width: 14px; + height: 14px; + + border: solid 2px transparent; + border-top-color: #29d; + border-left-color: #29d; + border-radius: 50%; + + -webkit-animation: loading-bar-spinner 400ms linear infinite; + -moz-animation: loading-bar-spinner 400ms linear infinite; + -ms-animation: loading-bar-spinner 400ms linear infinite; + -o-animation: loading-bar-spinner 400ms linear infinite; + animation: loading-bar-spinner 400ms linear infinite; +} + +@-webkit-keyframes loading-bar-spinner { + 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } +} +@-moz-keyframes loading-bar-spinner { + 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } +} +@-o-keyframes loading-bar-spinner { + 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } +} +@-ms-keyframes loading-bar-spinner { + 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } +} +@keyframes loading-bar-spinner { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} diff --git a/node_modules/angular-loading-bar/build/loading-bar.js b/node_modules/angular-loading-bar/build/loading-bar.js new file mode 100644 index 00000000..358a3687 --- /dev/null +++ b/node_modules/angular-loading-bar/build/loading-bar.js @@ -0,0 +1,341 @@ +/*! + * angular-loading-bar v0.9.0 + * https://chieffancypants.github.io/angular-loading-bar + * Copyright (c) 2016 Wes Cruver + * License: MIT + */ +/* + * angular-loading-bar + * + * intercepts XHR requests and creates a loading bar. + * Based on the excellent nprogress work by rstacruz (more info in readme) + * + * (c) 2013 Wes Cruver + * License: MIT + */ + + +(function() { + +'use strict'; + +// Alias the loading bar for various backwards compatibilities since the project has matured: +angular.module('angular-loading-bar', ['cfp.loadingBarInterceptor']); +angular.module('chieffancypants.loadingBar', ['cfp.loadingBarInterceptor']); + + +/** + * loadingBarInterceptor service + * + * Registers itself as an Angular interceptor and listens for XHR requests. + */ +angular.module('cfp.loadingBarInterceptor', ['cfp.loadingBar']) + .config(['$httpProvider', function ($httpProvider) { + + var interceptor = ['$q', '$cacheFactory', '$timeout', '$rootScope', '$log', 'cfpLoadingBar', function ($q, $cacheFactory, $timeout, $rootScope, $log, cfpLoadingBar) { + + /** + * The total number of requests made + */ + var reqsTotal = 0; + + /** + * The number of requests completed (either successfully or not) + */ + var reqsCompleted = 0; + + /** + * The amount of time spent fetching before showing the loading bar + */ + var latencyThreshold = cfpLoadingBar.latencyThreshold; + + /** + * $timeout handle for latencyThreshold + */ + var startTimeout; + + + /** + * calls cfpLoadingBar.complete() which removes the + * loading bar from the DOM. + */ + function setComplete() { + $timeout.cancel(startTimeout); + cfpLoadingBar.complete(); + reqsCompleted = 0; + reqsTotal = 0; + } + + /** + * Determine if the response has already been cached + * @param {Object} config the config option from the request + * @return {Boolean} retrns true if cached, otherwise false + */ + function isCached(config) { + var cache; + var defaultCache = $cacheFactory.get('$http'); + var defaults = $httpProvider.defaults; + + // Choose the proper cache source. Borrowed from angular: $http service + if ((config.cache || defaults.cache) && config.cache !== false && + (config.method === 'GET' || config.method === 'JSONP')) { + cache = angular.isObject(config.cache) ? config.cache + : angular.isObject(defaults.cache) ? defaults.cache + : defaultCache; + } + + var cached = cache !== undefined ? + cache.get(config.url) !== undefined : false; + + if (config.cached !== undefined && cached !== config.cached) { + return config.cached; + } + config.cached = cached; + return cached; + } + + + return { + 'request': function(config) { + // Check to make sure this request hasn't already been cached and that + // the requester didn't explicitly ask us to ignore this request: + if (!config.ignoreLoadingBar && !isCached(config)) { + $rootScope.$broadcast('cfpLoadingBar:loading', {url: config.url}); + if (reqsTotal === 0) { + startTimeout = $timeout(function() { + cfpLoadingBar.start(); + }, latencyThreshold); + } + reqsTotal++; + cfpLoadingBar.set(reqsCompleted / reqsTotal); + } + return config; + }, + + 'response': function(response) { + if (!response || !response.config) { + $log.error('Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50'); + return response; + } + + if (!response.config.ignoreLoadingBar && !isCached(response.config)) { + reqsCompleted++; + $rootScope.$broadcast('cfpLoadingBar:loaded', {url: response.config.url, result: response}); + if (reqsCompleted >= reqsTotal) { + setComplete(); + } else { + cfpLoadingBar.set(reqsCompleted / reqsTotal); + } + } + return response; + }, + + 'responseError': function(rejection) { + if (!rejection || !rejection.config) { + $log.error('Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50'); + return $q.reject(rejection); + } + + if (!rejection.config.ignoreLoadingBar && !isCached(rejection.config)) { + reqsCompleted++; + $rootScope.$broadcast('cfpLoadingBar:loaded', {url: rejection.config.url, result: rejection}); + if (reqsCompleted >= reqsTotal) { + setComplete(); + } else { + cfpLoadingBar.set(reqsCompleted / reqsTotal); + } + } + return $q.reject(rejection); + } + }; + }]; + + $httpProvider.interceptors.push(interceptor); + }]); + + +/** + * Loading Bar + * + * This service handles adding and removing the actual element in the DOM. + * Generally, best practices for DOM manipulation is to take place in a + * directive, but because the element itself is injected in the DOM only upon + * XHR requests, and it's likely needed on every view, the best option is to + * use a service. + */ +angular.module('cfp.loadingBar', []) + .provider('cfpLoadingBar', function() { + + this.autoIncrement = true; + this.includeSpinner = true; + this.includeBar = true; + this.latencyThreshold = 100; + this.startSize = 0.02; + this.parentSelector = 'body'; + this.spinnerTemplate = '
'; + this.loadingBarTemplate = '
'; + + this.$get = ['$injector', '$document', '$timeout', '$rootScope', function ($injector, $document, $timeout, $rootScope) { + var $animate; + var $parentSelector = this.parentSelector, + loadingBarContainer = angular.element(this.loadingBarTemplate), + loadingBar = loadingBarContainer.find('div').eq(0), + spinner = angular.element(this.spinnerTemplate); + + var incTimeout, + completeTimeout, + started = false, + status = 0; + + var autoIncrement = this.autoIncrement; + var includeSpinner = this.includeSpinner; + var includeBar = this.includeBar; + var startSize = this.startSize; + + /** + * Inserts the loading bar element into the dom, and sets it to 2% + */ + function _start() { + if (!$animate) { + $animate = $injector.get('$animate'); + } + + $timeout.cancel(completeTimeout); + + // do not continually broadcast the started event: + if (started) { + return; + } + + var document = $document[0]; + var parent = document.querySelector ? + document.querySelector($parentSelector) + : $document.find($parentSelector)[0] + ; + + if (! parent) { + parent = document.getElementsByTagName('body')[0]; + } + + var $parent = angular.element(parent); + var $after = parent.lastChild && angular.element(parent.lastChild); + + $rootScope.$broadcast('cfpLoadingBar:started'); + started = true; + + if (includeBar) { + $animate.enter(loadingBarContainer, $parent, $after); + } + + if (includeSpinner) { + $animate.enter(spinner, $parent, loadingBarContainer); + } + + _set(startSize); + } + + /** + * Set the loading bar's width to a certain percent. + * + * @param n any value between 0 and 1 + */ + function _set(n) { + if (!started) { + return; + } + var pct = (n * 100) + '%'; + loadingBar.css('width', pct); + status = n; + + // increment loadingbar to give the illusion that there is always + // progress but make sure to cancel the previous timeouts so we don't + // have multiple incs running at the same time. + if (autoIncrement) { + $timeout.cancel(incTimeout); + incTimeout = $timeout(function() { + _inc(); + }, 250); + } + } + + /** + * Increments the loading bar by a random amount + * but slows down as it progresses + */ + function _inc() { + if (_status() >= 1) { + return; + } + + var rnd = 0; + + // TODO: do this mathmatically instead of through conditions + + var stat = _status(); + if (stat >= 0 && stat < 0.25) { + // Start out between 3 - 6% increments + rnd = (Math.random() * (5 - 3 + 1) + 3) / 100; + } else if (stat >= 0.25 && stat < 0.65) { + // increment between 0 - 3% + rnd = (Math.random() * 3) / 100; + } else if (stat >= 0.65 && stat < 0.9) { + // increment between 0 - 2% + rnd = (Math.random() * 2) / 100; + } else if (stat >= 0.9 && stat < 0.99) { + // finally, increment it .5 % + rnd = 0.005; + } else { + // after 99%, don't increment: + rnd = 0; + } + + var pct = _status() + rnd; + _set(pct); + } + + function _status() { + return status; + } + + function _completeAnimation() { + status = 0; + started = false; + } + + function _complete() { + if (!$animate) { + $animate = $injector.get('$animate'); + } + + $rootScope.$broadcast('cfpLoadingBar:completed'); + _set(1); + + $timeout.cancel(completeTimeout); + + // Attempt to aggregate any start/complete calls within 500ms: + completeTimeout = $timeout(function() { + var promise = $animate.leave(loadingBarContainer, _completeAnimation); + if (promise && promise.then) { + promise.then(_completeAnimation); + } + $animate.leave(spinner); + }, 500); + } + + return { + start : _start, + set : _set, + status : _status, + inc : _inc, + complete : _complete, + autoIncrement : this.autoIncrement, + includeSpinner : this.includeSpinner, + latencyThreshold : this.latencyThreshold, + parentSelector : this.parentSelector, + startSize : this.startSize + }; + + + }]; // + }); // wtf javascript. srsly +})(); // diff --git a/node_modules/angular-loading-bar/build/loading-bar.min.css b/node_modules/angular-loading-bar/build/loading-bar.min.css new file mode 100644 index 00000000..0f9f1067 --- /dev/null +++ b/node_modules/angular-loading-bar/build/loading-bar.min.css @@ -0,0 +1 @@ +#loading-bar,#loading-bar-spinner{pointer-events:none;-webkit-pointer-events:none;-webkit-transition:350ms linear all;-moz-transition:350ms linear all;-o-transition:350ms linear all;transition:350ms linear all}#loading-bar-spinner.ng-enter,#loading-bar-spinner.ng-leave.ng-leave-active,#loading-bar.ng-enter,#loading-bar.ng-leave.ng-leave-active{opacity:0}#loading-bar-spinner.ng-enter.ng-enter-active,#loading-bar-spinner.ng-leave,#loading-bar.ng-enter.ng-enter-active,#loading-bar.ng-leave{opacity:1}#loading-bar .bar{-webkit-transition:width 350ms;-moz-transition:width 350ms;-o-transition:width 350ms;transition:width 350ms;background:#29d;position:fixed;z-index:10002;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}#loading-bar .peg{position:absolute;width:70px;right:0;top:0;height:2px;opacity:.45;-moz-box-shadow:#29d 1px 0 6px 1px;-ms-box-shadow:#29d 1px 0 6px 1px;-webkit-box-shadow:#29d 1px 0 6px 1px;box-shadow:#29d 1px 0 6px 1px;-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%}#loading-bar-spinner{display:block;position:fixed;z-index:10002;top:10px;left:10px}#loading-bar-spinner .spinner-icon{width:14px;height:14px;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:loading-bar-spinner 400ms linear infinite;-moz-animation:loading-bar-spinner 400ms linear infinite;-ms-animation:loading-bar-spinner 400ms linear infinite;-o-animation:loading-bar-spinner 400ms linear infinite;animation:loading-bar-spinner 400ms linear infinite}@-webkit-keyframes loading-bar-spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes loading-bar-spinner{0%{-moz-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes loading-bar-spinner{0%{-o-transform:rotate(0);transform:rotate(0)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes loading-bar-spinner{0%{-ms-transform:rotate(0);transform:rotate(0)}100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loading-bar-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} \ No newline at end of file diff --git a/node_modules/angular-loading-bar/build/loading-bar.min.js b/node_modules/angular-loading-bar/build/loading-bar.min.js new file mode 100644 index 00000000..b6628f4a --- /dev/null +++ b/node_modules/angular-loading-bar/build/loading-bar.min.js @@ -0,0 +1,7 @@ +/*! + * angular-loading-bar v0.9.0 + * https://chieffancypants.github.io/angular-loading-bar + * Copyright (c) 2016 Wes Cruver + * License: MIT + */ +!function(){"use strict";angular.module("angular-loading-bar",["cfp.loadingBarInterceptor"]),angular.module("chieffancypants.loadingBar",["cfp.loadingBarInterceptor"]),angular.module("cfp.loadingBarInterceptor",["cfp.loadingBar"]).config(["$httpProvider",function(a){var b=["$q","$cacheFactory","$timeout","$rootScope","$log","cfpLoadingBar",function(b,c,d,e,f,g){function h(){d.cancel(j),g.complete(),l=0,k=0}function i(b){var d,e=c.get("$http"),f=a.defaults;!b.cache&&!f.cache||b.cache===!1||"GET"!==b.method&&"JSONP"!==b.method||(d=angular.isObject(b.cache)?b.cache:angular.isObject(f.cache)?f.cache:e);var g=void 0!==d?void 0!==d.get(b.url):!1;return void 0!==b.cached&&g!==b.cached?b.cached:(b.cached=g,g)}var j,k=0,l=0,m=g.latencyThreshold;return{request:function(a){return a.ignoreLoadingBar||i(a)||(e.$broadcast("cfpLoadingBar:loading",{url:a.url}),0===k&&(j=d(function(){g.start()},m)),k++,g.set(l/k)),a},response:function(a){return a&&a.config?(a.config.ignoreLoadingBar||i(a.config)||(l++,e.$broadcast("cfpLoadingBar:loaded",{url:a.config.url,result:a}),l>=k?h():g.set(l/k)),a):(f.error("Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"),a)},responseError:function(a){return a&&a.config?(a.config.ignoreLoadingBar||i(a.config)||(l++,e.$broadcast("cfpLoadingBar:loaded",{url:a.config.url,result:a}),l>=k?h():g.set(l/k)),b.reject(a)):(f.error("Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"),b.reject(a))}}}];a.interceptors.push(b)}]),angular.module("cfp.loadingBar",[]).provider("cfpLoadingBar",function(){this.autoIncrement=!0,this.includeSpinner=!0,this.includeBar=!0,this.latencyThreshold=100,this.startSize=.02,this.parentSelector="body",this.spinnerTemplate='
',this.loadingBarTemplate='
',this.$get=["$injector","$document","$timeout","$rootScope",function(a,b,c,d){function e(){if(k||(k=a.get("$animate")),c.cancel(m),!r){var e=b[0],g=e.querySelector?e.querySelector(n):b.find(n)[0];g||(g=e.getElementsByTagName("body")[0]);var h=angular.element(g),i=g.lastChild&&angular.element(g.lastChild);d.$broadcast("cfpLoadingBar:started"),r=!0,v&&k.enter(o,h,i),u&&k.enter(q,h,o),f(w)}}function f(a){if(r){var b=100*a+"%";p.css("width",b),s=a,t&&(c.cancel(l),l=c(function(){g()},250))}}function g(){if(!(h()>=1)){var a=0,b=h();a=b>=0&&.25>b?(3*Math.random()+3)/100:b>=.25&&.65>b?3*Math.random()/100:b>=.65&&.9>b?2*Math.random()/100:b>=.9&&.99>b?.005:0;var c=h()+a;f(c)}}function h(){return s}function i(){s=0,r=!1}function j(){k||(k=a.get("$animate")),d.$broadcast("cfpLoadingBar:completed"),f(1),c.cancel(m),m=c(function(){var a=k.leave(o,i);a&&a.then&&a.then(i),k.leave(q)},500)}var k,l,m,n=this.parentSelector,o=angular.element(this.loadingBarTemplate),p=o.find("div").eq(0),q=angular.element(this.spinnerTemplate),r=!1,s=0,t=this.autoIncrement,u=this.includeSpinner,v=this.includeBar,w=this.startSize;return{start:e,set:f,status:h,inc:g,complete:j,autoIncrement:this.autoIncrement,includeSpinner:this.includeSpinner,latencyThreshold:this.latencyThreshold,parentSelector:this.parentSelector,startSize:this.startSize}}]})}(); \ No newline at end of file diff --git a/node_modules/angular-loading-bar/example/app.css b/node_modules/angular-loading-bar/example/app.css new file mode 100644 index 00000000..1bb2e893 --- /dev/null +++ b/node_modules/angular-loading-bar/example/app.css @@ -0,0 +1,180 @@ +body { + background-color: #ecf0f1; + /*padding: 25px;*/ + font-family: 'Oxygen', sans; + width: 85%; + margin: auto; + overflow-y: scroll; +} +.thumbnail { + width: 70px; + height: 70px; + /*border: 1px solid #F1C6C2;*/ + border: 1px solid #CE8982 +} +a { + font-size:16px; +} +.badge { + background-color: #428bca; +} +.meta, .meta-comments { + font-size:12px; + color: #333; + margin-bottom: 0; +} +.meta-comments { + font-weight: bold; +} + +footer.navbar { + height: 65px; + width: 100%; + border-top: 1px solid #ccc; + box-shadow: 0 -1px 4px rgba(0,0,0,0.15); + margin: 0; + border-radius: 0; +} + +.panel { + -webkit-transition: 0.75s ease-in-out all; + -moz-transition: 0.75s ease-in-out all; + -o-transition: 0.75s ease-in-out all; + transition: 0.75s ease-in-out all; + background-color: #fff; + border: none; + margin-bottom: 15px; +} + +.panel a { + color: #e74c3c; + font-weight: bold; +} + +.panel .badge { + background-color: #e74c3c; + color: #fff; +} + +.panel.ng-enter { + opacity: 0; +} +.panel.ng-enter-active { + opacity: 1; + transition-delay: 0.5s; +} + +.panel-body { + border: 1px solid #ccc; + /*box-shadow: 0 1px 3px rgba(0,0,0,0.1);*/ + border-radius: 5px; +} + +.examples { + margin-bottom: 25px; + transition-delay: 0.5s; +} + +.examples.ng-hide-add, +.examples.ng-hide-remove, +.loading-text.ng-hide-add, +.loading-text.ng-hide-remove { + -webkit-transition:all linear 0.5s; + -moz-transition:all linear 0.5s; + -o-transition:all linear 0.5s; + transition:all linear 0.5s; + display:block!important; +} +.examples.ng-hide-add, +.examples.ng-hide-remove { + transition-delay: 0.5s; +} + +.examples.ng-hide-add.ng-hide-add-active, +.examples.ng-hide-remove, +.loading-text.ng-hide-add.ng-hide-add-active, +.loading-text.ng-hide-remove { + opacity:0; +} + +.examples.ng-hide-add, +.examples.ng-hide-remove.ng-hide-remove-active, +.loading-text.ng-hide-add, +.loading-text.ng-hide-remove.ng-hide-remove-active { + opacity:1; +} + +.examples .btn i { + top: 2px; +} + +.examples span { + color: #A1FFC9; +} + +.btn-primary { + background-color: #2ecc71; + border: 1px solid #27ae60; +} +.btn-primary:hover { + background-color: #32B96C; + border: 1px solid #27ae60; +} + +.jumbotron { + color: #333; + background-color: #fff; + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + border-radius: 5px; + padding-top: 5px; + padding-bottom: 10px; + margin-top: 15px; + border: 1px solid #ccc; + -webkit-transition:all linear 0.5s; + -moz-transition:all linear 0.5s; + -o-transition:all linear 0.5s; + transition:all linear 0.5s; +} + +.jumbotron h1 { + color: #333; + letter-spacing: -2px; +} + +.jumbotron small { + color: #999; +} + +h1 { + font-family: 'Oxygen', sans; + /*padding-bottom: 10px;*/ +} + +h4 { + font-family: 'Oxygen', sans; + color: #888; + padding-bottom: 5px; + padding-top: 10px; +} +h4 span { + color: #e74c3c; +} + + +/* + * override the default CSS as an example + */ + +#loading-bar .bar { + background: #2c3e50; +} +#loading-bar-spinner .spinner-icon { + border-top-color: #2c3e50; + border-left-color: #2c3e50; +} +#loading-bar .peg { + -moz-box-shadow: #2c3e50 1px 0 6px 1px; + -ms-box-shadow: #2c3e50 1px 0 6px 1px; + -webkit-box-shadow: #2c3e50 1px 0 6px 1px; + box-shadow: #2c3e50 1px 0 6px 1px; +} diff --git a/node_modules/angular-loading-bar/example/app.js b/node_modules/angular-loading-bar/example/app.js new file mode 100644 index 00000000..b4a6b8b1 --- /dev/null +++ b/node_modules/angular-loading-bar/example/app.js @@ -0,0 +1,49 @@ + + +angular.module('LoadingBarExample', ['chieffancypants.loadingBar', 'ngAnimate']) + .config(function(cfpLoadingBarProvider) { + cfpLoadingBarProvider.includeSpinner = true; + }) + + .controller('ExampleCtrl', function ($scope, $http, $timeout, cfpLoadingBar) { + $scope.posts = []; + $scope.section = null; + $scope.subreddit = null; + $scope.subreddits = ['cats', 'pics', 'funny', 'gaming', 'AdviceAnimals', 'aww']; + + var getRandomSubreddit = function() { + var sub = $scope.subreddits[Math.floor(Math.random() * $scope.subreddits.length)]; + + // ensure we get a new subreddit each time. + if (sub == $scope.subreddit) { + return getRandomSubreddit(); + } + + return sub; + }; + + $scope.fetch = function() { + $scope.subreddit = getRandomSubreddit(); + $http.jsonp('http://www.reddit.com/r/' + $scope.subreddit + '.json?limit=50&jsonp=JSON_CALLBACK').success(function(data) { + $scope.posts = data.data.children; + }); + }; + + $scope.start = function() { + cfpLoadingBar.start(); + }; + + $scope.complete = function () { + cfpLoadingBar.complete(); + } + + + // fake the initial load so first time users can see it right away: + $scope.start(); + $scope.fakeIntro = true; + $timeout(function() { + $scope.complete(); + $scope.fakeIntro = false; + }, 750); + + }); diff --git a/node_modules/angular-loading-bar/example/index.html b/node_modules/angular-loading-bar/example/index.html new file mode 100644 index 00000000..ba46e391 --- /dev/null +++ b/node_modules/angular-loading-bar/example/index.html @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + +
+

Angular Loading Bar

+

An automatic loading bar using angular interceptors. It works automatically, so simply include it as a dependency and it will automatically display the progress of your $http requests.

+

+ +   Download + + +   Fork on GitHub + +

+
+ +
+ + +
+ +

Showing 100 results for: /r/{{subreddit}}...

+
+
+ {{post.data.score}} +
+ +
+
+
+ {{post.data.title}} +

by {{post.data.author}}

+

{{post.data.num_comments}} comments

+
+
+
+
+ + + diff --git a/node_modules/angular-loading-bar/index.js b/node_modules/angular-loading-bar/index.js new file mode 100644 index 00000000..411428d8 --- /dev/null +++ b/node_modules/angular-loading-bar/index.js @@ -0,0 +1,2 @@ +require('./build/loading-bar'); +module.exports = 'angular-loading-bar'; diff --git a/node_modules/angular-loading-bar/package.json b/node_modules/angular-loading-bar/package.json new file mode 100644 index 00000000..82711389 --- /dev/null +++ b/node_modules/angular-loading-bar/package.json @@ -0,0 +1,70 @@ +{ + "_from": "angular-loading-bar", + "_id": "angular-loading-bar@0.9.0", + "_inBundle": false, + "_integrity": "sha1-N+9Swl8QLCFuezzf0vxaXflijkU=", + "_location": "/angular-loading-bar", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "angular-loading-bar", + "name": "angular-loading-bar", + "escapedName": "angular-loading-bar", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/angular-loading-bar/-/angular-loading-bar-0.9.0.tgz", + "_shasum": "37ef52c25f102c216e7b3cdfd2fc5a5df9628e45", + "_spec": "angular-loading-bar", + "_where": "/home/lrullo/httpdocs/anorgatarrak.eus/wp-content/themes/anorgatarrak", + "author": { + "name": "Wes Cruver" + }, + "bugs": { + "url": "https://github.com/chieffancypants/angular-loading-bar/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "An automatic loading bar for AngularJS", + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-concat": "^0.5.0", + "grunt-contrib-cssmin": "~0.12.0", + "grunt-contrib-jshint": "~0.6.4", + "grunt-contrib-uglify": "^0.9.1", + "grunt-karma": "~0.11.0", + "karma": "~0.12.0", + "karma-coffee-preprocessor": "^0.2.0", + "karma-coverage": "^0.1.0", + "karma-jasmine": "^0.1.3", + "karma-phantomjs-launcher": "^0.1.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "homepage": "https://chieffancypants.github.io/angular-loading-bar", + "keywords": [ + "angular", + "angularjs", + "loading", + "loadingbar", + "progress", + "progressbar" + ], + "license": "MIT", + "main": "index.js", + "name": "angular-loading-bar", + "repository": { + "type": "git", + "url": "git://github.com/chieffancypants/angular-loading-bar.git" + }, + "style": "build/loading-bar.css", + "version": "0.9.0" +} diff --git a/node_modules/angular-loading-bar/src/loading-bar.css b/node_modules/angular-loading-bar/src/loading-bar.css new file mode 100644 index 00000000..3ee06188 --- /dev/null +++ b/node_modules/angular-loading-bar/src/loading-bar.css @@ -0,0 +1,104 @@ + +/* Make clicks pass-through */ +#loading-bar, +#loading-bar-spinner { + pointer-events: none; + -webkit-pointer-events: none; + -webkit-transition: 350ms linear all; + -moz-transition: 350ms linear all; + -o-transition: 350ms linear all; + transition: 350ms linear all; +} + +#loading-bar.ng-enter, +#loading-bar.ng-leave.ng-leave-active, +#loading-bar-spinner.ng-enter, +#loading-bar-spinner.ng-leave.ng-leave-active { + opacity: 0; +} + +#loading-bar.ng-enter.ng-enter-active, +#loading-bar.ng-leave, +#loading-bar-spinner.ng-enter.ng-enter-active, +#loading-bar-spinner.ng-leave { + opacity: 1; +} + +#loading-bar .bar { + -webkit-transition: width 350ms; + -moz-transition: width 350ms; + -o-transition: width 350ms; + transition: width 350ms; + + background: #29d; + position: fixed; + z-index: 10002; + top: 0; + left: 0; + width: 100%; + height: 2px; + border-bottom-right-radius: 1px; + border-top-right-radius: 1px; +} + +/* Fancy blur effect */ +#loading-bar .peg { + position: absolute; + width: 70px; + right: 0; + top: 0; + height: 2px; + opacity: .45; + -moz-box-shadow: #29d 1px 0 6px 1px; + -ms-box-shadow: #29d 1px 0 6px 1px; + -webkit-box-shadow: #29d 1px 0 6px 1px; + box-shadow: #29d 1px 0 6px 1px; + -moz-border-radius: 100%; + -webkit-border-radius: 100%; + border-radius: 100%; +} + +#loading-bar-spinner { + display: block; + position: fixed; + z-index: 10002; + top: 10px; + left: 10px; +} + +#loading-bar-spinner .spinner-icon { + width: 14px; + height: 14px; + + border: solid 2px transparent; + border-top-color: #29d; + border-left-color: #29d; + border-radius: 50%; + + -webkit-animation: loading-bar-spinner 400ms linear infinite; + -moz-animation: loading-bar-spinner 400ms linear infinite; + -ms-animation: loading-bar-spinner 400ms linear infinite; + -o-animation: loading-bar-spinner 400ms linear infinite; + animation: loading-bar-spinner 400ms linear infinite; +} + +@-webkit-keyframes loading-bar-spinner { + 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } +} +@-moz-keyframes loading-bar-spinner { + 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } +} +@-o-keyframes loading-bar-spinner { + 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } +} +@-ms-keyframes loading-bar-spinner { + 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } +} +@keyframes loading-bar-spinner { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} diff --git a/node_modules/angular-loading-bar/src/loading-bar.js b/node_modules/angular-loading-bar/src/loading-bar.js new file mode 100644 index 00000000..dc3fc73a --- /dev/null +++ b/node_modules/angular-loading-bar/src/loading-bar.js @@ -0,0 +1,335 @@ +/* + * angular-loading-bar + * + * intercepts XHR requests and creates a loading bar. + * Based on the excellent nprogress work by rstacruz (more info in readme) + * + * (c) 2013 Wes Cruver + * License: MIT + */ + + +(function() { + +'use strict'; + +// Alias the loading bar for various backwards compatibilities since the project has matured: +angular.module('angular-loading-bar', ['cfp.loadingBarInterceptor']); +angular.module('chieffancypants.loadingBar', ['cfp.loadingBarInterceptor']); + + +/** + * loadingBarInterceptor service + * + * Registers itself as an Angular interceptor and listens for XHR requests. + */ +angular.module('cfp.loadingBarInterceptor', ['cfp.loadingBar']) + .config(['$httpProvider', function ($httpProvider) { + + var interceptor = ['$q', '$cacheFactory', '$timeout', '$rootScope', '$log', 'cfpLoadingBar', function ($q, $cacheFactory, $timeout, $rootScope, $log, cfpLoadingBar) { + + /** + * The total number of requests made + */ + var reqsTotal = 0; + + /** + * The number of requests completed (either successfully or not) + */ + var reqsCompleted = 0; + + /** + * The amount of time spent fetching before showing the loading bar + */ + var latencyThreshold = cfpLoadingBar.latencyThreshold; + + /** + * $timeout handle for latencyThreshold + */ + var startTimeout; + + + /** + * calls cfpLoadingBar.complete() which removes the + * loading bar from the DOM. + */ + function setComplete() { + $timeout.cancel(startTimeout); + cfpLoadingBar.complete(); + reqsCompleted = 0; + reqsTotal = 0; + } + + /** + * Determine if the response has already been cached + * @param {Object} config the config option from the request + * @return {Boolean} retrns true if cached, otherwise false + */ + function isCached(config) { + var cache; + var defaultCache = $cacheFactory.get('$http'); + var defaults = $httpProvider.defaults; + + // Choose the proper cache source. Borrowed from angular: $http service + if ((config.cache || defaults.cache) && config.cache !== false && + (config.method === 'GET' || config.method === 'JSONP')) { + cache = angular.isObject(config.cache) ? config.cache + : angular.isObject(defaults.cache) ? defaults.cache + : defaultCache; + } + + var cached = cache !== undefined ? + cache.get(config.url) !== undefined : false; + + if (config.cached !== undefined && cached !== config.cached) { + return config.cached; + } + config.cached = cached; + return cached; + } + + + return { + 'request': function(config) { + // Check to make sure this request hasn't already been cached and that + // the requester didn't explicitly ask us to ignore this request: + if (!config.ignoreLoadingBar && !isCached(config)) { + $rootScope.$broadcast('cfpLoadingBar:loading', {url: config.url}); + if (reqsTotal === 0) { + startTimeout = $timeout(function() { + cfpLoadingBar.start(); + }, latencyThreshold); + } + reqsTotal++; + cfpLoadingBar.set(reqsCompleted / reqsTotal); + } + return config; + }, + + 'response': function(response) { + if (!response || !response.config) { + $log.error('Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50'); + return response; + } + + if (!response.config.ignoreLoadingBar && !isCached(response.config)) { + reqsCompleted++; + $rootScope.$broadcast('cfpLoadingBar:loaded', {url: response.config.url, result: response}); + if (reqsCompleted >= reqsTotal) { + setComplete(); + } else { + cfpLoadingBar.set(reqsCompleted / reqsTotal); + } + } + return response; + }, + + 'responseError': function(rejection) { + if (!rejection || !rejection.config) { + $log.error('Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50'); + return $q.reject(rejection); + } + + if (!rejection.config.ignoreLoadingBar && !isCached(rejection.config)) { + reqsCompleted++; + $rootScope.$broadcast('cfpLoadingBar:loaded', {url: rejection.config.url, result: rejection}); + if (reqsCompleted >= reqsTotal) { + setComplete(); + } else { + cfpLoadingBar.set(reqsCompleted / reqsTotal); + } + } + return $q.reject(rejection); + } + }; + }]; + + $httpProvider.interceptors.push(interceptor); + }]); + + +/** + * Loading Bar + * + * This service handles adding and removing the actual element in the DOM. + * Generally, best practices for DOM manipulation is to take place in a + * directive, but because the element itself is injected in the DOM only upon + * XHR requests, and it's likely needed on every view, the best option is to + * use a service. + */ +angular.module('cfp.loadingBar', []) + .provider('cfpLoadingBar', function() { + + this.autoIncrement = true; + this.includeSpinner = true; + this.includeBar = true; + this.latencyThreshold = 100; + this.startSize = 0.02; + this.parentSelector = 'body'; + this.spinnerTemplate = '
'; + this.loadingBarTemplate = '
'; + + this.$get = ['$injector', '$document', '$timeout', '$rootScope', function ($injector, $document, $timeout, $rootScope) { + var $animate; + var $parentSelector = this.parentSelector, + loadingBarContainer = angular.element(this.loadingBarTemplate), + loadingBar = loadingBarContainer.find('div').eq(0), + spinner = angular.element(this.spinnerTemplate); + + var incTimeout, + completeTimeout, + started = false, + status = 0; + + var autoIncrement = this.autoIncrement; + var includeSpinner = this.includeSpinner; + var includeBar = this.includeBar; + var startSize = this.startSize; + + /** + * Inserts the loading bar element into the dom, and sets it to 2% + */ + function _start() { + if (!$animate) { + $animate = $injector.get('$animate'); + } + + $timeout.cancel(completeTimeout); + + // do not continually broadcast the started event: + if (started) { + return; + } + + var document = $document[0]; + var parent = document.querySelector ? + document.querySelector($parentSelector) + : $document.find($parentSelector)[0] + ; + + if (! parent) { + parent = document.getElementsByTagName('body')[0]; + } + + var $parent = angular.element(parent); + var $after = parent.lastChild && angular.element(parent.lastChild); + + $rootScope.$broadcast('cfpLoadingBar:started'); + started = true; + + if (includeBar) { + $animate.enter(loadingBarContainer, $parent, $after); + } + + if (includeSpinner) { + $animate.enter(spinner, $parent, loadingBarContainer); + } + + _set(startSize); + } + + /** + * Set the loading bar's width to a certain percent. + * + * @param n any value between 0 and 1 + */ + function _set(n) { + if (!started) { + return; + } + var pct = (n * 100) + '%'; + loadingBar.css('width', pct); + status = n; + + // increment loadingbar to give the illusion that there is always + // progress but make sure to cancel the previous timeouts so we don't + // have multiple incs running at the same time. + if (autoIncrement) { + $timeout.cancel(incTimeout); + incTimeout = $timeout(function() { + _inc(); + }, 250); + } + } + + /** + * Increments the loading bar by a random amount + * but slows down as it progresses + */ + function _inc() { + if (_status() >= 1) { + return; + } + + var rnd = 0; + + // TODO: do this mathmatically instead of through conditions + + var stat = _status(); + if (stat >= 0 && stat < 0.25) { + // Start out between 3 - 6% increments + rnd = (Math.random() * (5 - 3 + 1) + 3) / 100; + } else if (stat >= 0.25 && stat < 0.65) { + // increment between 0 - 3% + rnd = (Math.random() * 3) / 100; + } else if (stat >= 0.65 && stat < 0.9) { + // increment between 0 - 2% + rnd = (Math.random() * 2) / 100; + } else if (stat >= 0.9 && stat < 0.99) { + // finally, increment it .5 % + rnd = 0.005; + } else { + // after 99%, don't increment: + rnd = 0; + } + + var pct = _status() + rnd; + _set(pct); + } + + function _status() { + return status; + } + + function _completeAnimation() { + status = 0; + started = false; + } + + function _complete() { + if (!$animate) { + $animate = $injector.get('$animate'); + } + + $rootScope.$broadcast('cfpLoadingBar:completed'); + _set(1); + + $timeout.cancel(completeTimeout); + + // Attempt to aggregate any start/complete calls within 500ms: + completeTimeout = $timeout(function() { + var promise = $animate.leave(loadingBarContainer, _completeAnimation); + if (promise && promise.then) { + promise.then(_completeAnimation); + } + $animate.leave(spinner); + }, 500); + } + + return { + start : _start, + set : _set, + status : _status, + inc : _inc, + complete : _complete, + autoIncrement : this.autoIncrement, + includeSpinner : this.includeSpinner, + latencyThreshold : this.latencyThreshold, + parentSelector : this.parentSelector, + startSize : this.startSize + }; + + + }]; // + }); // wtf javascript. srsly +})(); // diff --git a/node_modules/angular-loading-bar/test/karma-angular-1.2.conf.js b/node_modules/angular-loading-bar/test/karma-angular-1.2.conf.js new file mode 100644 index 00000000..7a6048f6 --- /dev/null +++ b/node_modules/angular-loading-bar/test/karma-angular-1.2.conf.js @@ -0,0 +1,82 @@ +// Karma configuration +// Generated on Sun Sep 15 2013 20:18:09 GMT-0400 (EDT) + +module.exports = function(config) { + config.set({ + + // base path, that will be used to resolve files and exclude + basePath: '', + + + // frameworks to use + frameworks: ['jasmine'], + + + // list of files / patterns to load in the browser + files: [ + '../bower_components/angular/angular.js', + '../bower_components/angular-animate/angular-animate.js', + '../bower_components/angular-mocks/angular-mocks.js', + '../src/*.js', + '*.coffee' + ], + + + // list of files to exclude + exclude: [ + + ], + + + // test results reporter to use + // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' + reporters: ['progress', 'coverage'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // Start these browsers, currently available: + // - Chrome + // - ChromeCanary + // - Firefox + // - Opera + // - Safari (only Mac) + // - PhantomJS + // - IE (only Windows) + browsers: ['PhantomJS'], + + coverageReporter: { + type : 'html', + dir : 'coverage/', + }, + + preprocessors: { + '../src/*.js': ['coverage'], + '*.coffee': 'coffee' + }, + + + // If browser does not capture in given timeout [ms], kill it + captureTimeout: 60000, + + + // Continuous Integration mode + // if true, it capture browsers, run tests and exit + singleRun: false + }); +}; diff --git a/node_modules/angular-loading-bar/test/karma-angular-1.3.conf.js b/node_modules/angular-loading-bar/test/karma-angular-1.3.conf.js new file mode 100644 index 00000000..36b76394 --- /dev/null +++ b/node_modules/angular-loading-bar/test/karma-angular-1.3.conf.js @@ -0,0 +1,82 @@ +// Karma configuration +// Generated on Sun Sep 15 2013 20:18:09 GMT-0400 (EDT) + +module.exports = function(config) { + config.set({ + + // base path, that will be used to resolve files and exclude + basePath: '', + + + // frameworks to use + frameworks: ['jasmine'], + + + // list of files / patterns to load in the browser + files: [ + '../bower_components/angular-1.3/angular.js', + '../bower_components/angular-animate-1.3/angular-animate.js', + '../bower_components/angular-mocks-1.3/angular-mocks.js', + '../src/*.js', + '*.coffee' + ], + + + // list of files to exclude + exclude: [ + + ], + + + // test results reporter to use + // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' + reporters: ['progress', 'coverage'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // Start these browsers, currently available: + // - Chrome + // - ChromeCanary + // - Firefox + // - Opera + // - Safari (only Mac) + // - PhantomJS + // - IE (only Windows) + browsers: ['PhantomJS'], + + coverageReporter: { + type : 'html', + dir : 'coverage/', + }, + + preprocessors: { + '../src/*.js': ['coverage'], + '*.coffee': 'coffee' + }, + + + // If browser does not capture in given timeout [ms], kill it + captureTimeout: 60000, + + + // Continuous Integration mode + // if true, it capture browsers, run tests and exit + singleRun: false + }); +}; diff --git a/node_modules/angular-loading-bar/test/karma-angular-1.4.conf.js b/node_modules/angular-loading-bar/test/karma-angular-1.4.conf.js new file mode 100644 index 00000000..8b0b8c5b --- /dev/null +++ b/node_modules/angular-loading-bar/test/karma-angular-1.4.conf.js @@ -0,0 +1,82 @@ +// Karma configuration +// Generated on Sun Sep 15 2013 20:18:09 GMT-0400 (EDT) + +module.exports = function(config) { + config.set({ + + // base path, that will be used to resolve files and exclude + basePath: '', + + + // frameworks to use + frameworks: ['jasmine'], + + + // list of files / patterns to load in the browser + files: [ + '../bower_components/angular-1.4/angular.js', + '../bower_components/angular-animate-1.4/angular-animate.js', + '../bower_components/angular-mocks-1.4/angular-mocks.js', + '../src/*.js', + '*.coffee' + ], + + + // list of files to exclude + exclude: [ + + ], + + + // test results reporter to use + // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' + reporters: ['progress', 'coverage'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // Start these browsers, currently available: + // - Chrome + // - ChromeCanary + // - Firefox + // - Opera + // - Safari (only Mac) + // - PhantomJS + // - IE (only Windows) + browsers: ['PhantomJS'], + + coverageReporter: { + type : 'html', + dir : 'coverage/', + }, + + preprocessors: { + '../src/*.js': ['coverage'], + '*.coffee': 'coffee' + }, + + + // If browser does not capture in given timeout [ms], kill it + captureTimeout: 60000, + + + // Continuous Integration mode + // if true, it capture browsers, run tests and exit + singleRun: false + }); +}; diff --git a/node_modules/angular-loading-bar/test/loading-bar-interceptor-config.coffee b/node_modules/angular-loading-bar/test/loading-bar-interceptor-config.coffee new file mode 100644 index 00000000..f29ab1e0 --- /dev/null +++ b/node_modules/angular-loading-bar/test/loading-bar-interceptor-config.coffee @@ -0,0 +1,114 @@ +describe 'loadingBarInterceptor Service - config options', -> + + it 'should hide the spinner if configured', -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.includeSpinner = false + return + inject ($timeout, cfpLoadingBar) -> + cfpLoadingBar.start() + spinner = document.getElementById('loading-bar-spinner') + expect(spinner).toBeNull + cfpLoadingBar.complete() + $timeout.flush() + + it 'should show the spinner if configured', -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.includeSpinner = true + return + inject ($timeout, cfpLoadingBar) -> + cfpLoadingBar.start() + spinner = document.getElementById('loading-bar-spinner') + expect(spinner).not.toBeNull + cfpLoadingBar.complete() + $timeout.flush() + + it 'should hide the loadingBar if configured', -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.includeBar = false + return + inject ($timeout, cfpLoadingBar) -> + cfpLoadingBar.start() + spinner = document.getElementById('loading-bar-spinner') + expect(spinner).toBeNull + cfpLoadingBar.complete() + $timeout.flush() + + it 'should show the loadingBar if configured', -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.includeBar = true + return + inject ($timeout, cfpLoadingBar) -> + cfpLoadingBar.start() + spinner = document.getElementById('loading-bar-spinner') + expect(spinner).not.toBeNull + cfpLoadingBar.complete() + $timeout.flush() + + it 'should not auto increment loadingBar if configured', (done) -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.autoIncrement = false + return + inject ($timeout, cfpLoadingBar) -> + flag = false + cfpLoadingBar.start() + cfpLoadingBar.set(.5) + runs -> + setTimeout -> + flag = true + , 500 + + waitsFor -> + return flag + , "500ms timeout" + , 1000 + + runs -> + expect(cfpLoadingBar.status()).toBe .5; + cfpLoadingBar.complete() + $timeout.flush() + + it 'should auto increment loadingBar if configured', -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.autoIncrement = true + return + inject ($timeout, cfpLoadingBar) -> + cfpLoadingBar.start() + $timeout.flush() + cfpLoadingBar.set(.5) + $timeout.flush() + expect(cfpLoadingBar.status()).toBeGreaterThan .5 + cfpLoadingBar.complete() + $timeout.flush() + + it 'should append the loadingbar as the first child of the parent container if empty', -> + emptyEl = angular.element '
' + angular.element(document).find('body').eq(0).append emptyEl + + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.parentSelector = '#empty' + return + inject ($timeout, $document, cfpLoadingBar) -> + cfpLoadingBar.start() + parent = $document[0].querySelector(cfpLoadingBar.parentSelector) + children = parent.childNodes + expect(children.length).toBe 2 + expect(children[0].id).toBe 'loading-bar' + expect(children[1].id).toBe 'loading-bar-spinner' + cfpLoadingBar.complete() + $timeout.flush() + + it 'should append the loading bar to the body if parentSelector is empty', -> + module 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + cfpLoadingBarProvider.parentSelector = '#doesnotexist' + return + inject ($timeout, $document, cfpLoadingBar) -> + parent = $document[0].querySelector(cfpLoadingBar.parentSelector) + expect(parent).toBeFalsy; + body = $document[0].querySelector 'body' + cfpLoadingBar.start() + bar = angular.element(body.querySelector '#loading-bar'); + spinner = angular.element(body.querySelector '#loading-bar-spinner'); + expect(bar.length).toBe 1 + expect(spinner.length).toBe 1 + cfpLoadingBar.complete() + $timeout.flush() diff --git a/node_modules/angular-loading-bar/test/loading-bar-interceptor.coffee b/node_modules/angular-loading-bar/test/loading-bar-interceptor.coffee new file mode 100644 index 00000000..f8e553db --- /dev/null +++ b/node_modules/angular-loading-bar/test/loading-bar-interceptor.coffee @@ -0,0 +1,554 @@ +isLoadingBarInjected = (doc) -> + injected = false + divs = angular.element(doc).find('div') + for i in divs + if angular.element(i).attr('id') is 'loading-bar' + injected = true + break + return injected + +flush = null + +describe 'loadingBarInterceptor Service', -> + + $http = $httpBackend = $document = $timeout = result = loadingBar = $animate = null + response = {message:'OK'} + endpoint = '/service' + + beforeEach -> + module 'ngAnimateMock', 'chieffancypants.loadingBar', (cfpLoadingBarProvider) -> + loadingBar = cfpLoadingBarProvider + return + + result = null + inject (_$http_, _$httpBackend_, _$document_, _$timeout_, _$animate_) -> + $http = _$http_ + $httpBackend = _$httpBackend_ + $document = _$document_ + $timeout = _$timeout_ + $animate = _$animate_ + + # Angular 1.4 removed triggerCalbacks(), so try them both: + flush = () -> + $animate.flush && $animate.flush() + $animate.triggerCallbacks && $animate.triggerCallbacks() + + beforeEach -> + this.addMatchers + toBeBetween: (high, low) -> + if low > high + temp = low + low = high + high = temp + return this.actual > low && this.actual < high + + + afterEach -> + $httpBackend.verifyNoOutstandingRequest() + $timeout.verifyNoPendingTasks() + + + it 'should not increment if the response is cached in a cacheFactory', inject (cfpLoadingBar, $cacheFactory) -> + cache = $cacheFactory('loading-bar') + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint, cache: cache).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 1 + cfpLoadingBar.complete() # set as complete + $timeout.flush() + flush() + + + $http.get(endpoint, cache: cache).then (data) -> + result = data + # no need to flush $httpBackend since the response is cached + expect(cfpLoadingBar.status()).toBe 0 + $httpBackend.verifyNoOutstandingRequest() + $timeout.flush() # loading bar is animated, so flush timeout + + it 'should not increment if the response is cached using $http.defaults.cache', inject (cfpLoadingBar, $cacheFactory) -> + $http.defaults.cache = $cacheFactory('loading-bar') + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 1 + cfpLoadingBar.complete() # set as complete + $timeout.flush() + flush() + + + $http.get(endpoint).then (data) -> + result = data + # no need to flush $httpBackend since the response is cached + expect(cfpLoadingBar.status()).toBe 0 + $httpBackend.verifyNoOutstandingRequest() + $timeout.flush() # loading bar is animated, so flush timeout + + it 'should not increment if the response is cached', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint, cache: true).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 1 + cfpLoadingBar.complete() # set as complete + $timeout.flush() + flush() + + + $http.get(endpoint, cache: true).then (data) -> + result = data + # no need to flush $httpBackend since the response is cached + expect(cfpLoadingBar.status()).toBe 0 + $httpBackend.verifyNoOutstandingRequest() + $timeout.flush() # loading bar is animated, so flush timeout + + it 'should use default cache when $http.defaults.cache is true', inject (cfpLoadingBar, $cacheFactory) -> + # $http.defaults.cache = $cacheFactory('loading-bar') + $http.defaults.cache = true + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 1 + cfpLoadingBar.complete() # set as complete + $timeout.flush() + flush() + + + $http.get(endpoint).then (data) -> + result = data + # no need to flush $httpBackend since the response is cached + expect(cfpLoadingBar.status()).toBe 0 + $httpBackend.verifyNoOutstandingRequest() + $timeout.flush() # loading bar is animated, so flush timeout + + it 'should not cache when the request is a POST', inject (cfpLoadingBar) -> + $httpBackend.expectPOST(endpoint).respond response + $http.post(endpoint, {message: 'post'}).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 1 + $timeout.flush() + flush() + + + $httpBackend.expectPOST(endpoint).respond response + $http.post(endpoint, {message: 'post'}).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush() + expect(cfpLoadingBar.status()).toBe 1 + $timeout.flush() + + + it 'should increment the loading bar when not all requests have been recieved', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint).then (data) -> + result = data + $http.get(endpoint).then (data) -> + result = data + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 0.5 + + $httpBackend.flush() + expect(cfpLoadingBar.status()).toBe 1 + $timeout.flush() # loading bar is animated, so flush timeout + + it 'should count http errors as responses so the loading bar can complete', inject (cfpLoadingBar) -> + # $httpBackend.expectGET(endpoint).respond response + $httpBackend.expectGET(endpoint).respond 401 + $httpBackend.expectGET(endpoint).respond 401 + $http.get(endpoint) + $http.get(endpoint) + + expect(cfpLoadingBar.status()).toBe 0 + $timeout.flush() + $timeout.flush() + $httpBackend.flush(1) + expect(cfpLoadingBar.status()).toBe 0.5 + $httpBackend.flush() + expect(cfpLoadingBar.status()).toBe 1 + + $timeout.flush() + + it 'should insert the loadingbar into the DOM when a request is sent', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint) + $http.get(endpoint) + + $httpBackend.flush(1) + $timeout.flush() # flush the latencyThreshold timeout + + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe true + + $httpBackend.flush() + $timeout.flush() + + it 'should insert the loadingbar as the last children of the parent container', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint) + $http.get(endpoint) + + $httpBackend.flush(1) + $timeout.flush() # flush the latencyThreshold timeout + + parent = $document.find(cfpLoadingBar.parentSelector)[0] + children = parent.childNodes + expect(children[children.length - 1].id).toBe 'loading-bar-spinner' + expect(children[children.length - 2].id).toBe 'loading-bar' + + $httpBackend.flush() + $timeout.flush() + + it 'should remove the loading bar when all requests have been received', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint) + $http.get(endpoint) + + $httpBackend.flush(1) + $timeout.flush() # flush the latencyThreshold timeout + + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe true + + $httpBackend.flush() + $timeout.flush() + + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe false + + it 'should get and set status', inject (cfpLoadingBar) -> + cfpLoadingBar.start() + $timeout.flush() + + cfpLoadingBar.set(0.4) + expect(cfpLoadingBar.status()).toBe 0.4 + + cfpLoadingBar.set(0.9) + expect(cfpLoadingBar.status()).toBe 0.9 + + + cfpLoadingBar.complete() + $timeout.flush() + + it 'should increment things randomly', inject (cfpLoadingBar) -> + cfpLoadingBar.start() + $timeout.flush() + + # increments between 3 - 6% + cfpLoadingBar.set(0.1) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBeBetween(3, 6) + + cfpLoadingBar.set(0.2) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBeBetween(3, 6) + + # increments between 0 - 3% + cfpLoadingBar.set(0.25) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBeBetween(0, 3) + + cfpLoadingBar.set(0.5) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBeBetween(0, 3) + + # increments between 0 - 2% + cfpLoadingBar.set(0.65) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBeBetween(0, 2) + + cfpLoadingBar.set(0.75) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBeBetween(0, 2) + + # increments 0.5% + cfpLoadingBar.set(0.9) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBe 0.5 + + cfpLoadingBar.set(0.97) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBeGreaterThan width + expect(width2 - width).toBe 0.5 + + # stops incrementing: + cfpLoadingBar.set(0.99) + lbar = angular.element(document.getElementById('loading-bar')) + width = lbar.children().css('width').slice(0, -1) + $timeout.flush() + width2 = lbar.children().css('width').slice(0, -1) + expect(width2).toBe width + + + cfpLoadingBar.complete() + $timeout.flush() + + it 'should not set the status if the loading bar has not yet been started', inject (cfpLoadingBar) -> + cfpLoadingBar.set(0.5) + expect(cfpLoadingBar.status()).toBe 0 + cfpLoadingBar.set(0.3) + expect(cfpLoadingBar.status()).toBe 0 + + cfpLoadingBar.start() + cfpLoadingBar.set(0.3) + expect(cfpLoadingBar.status()).toBe 0.3 + + cfpLoadingBar.complete() + $timeout.flush() + + it 'should broadcast started and completed events', inject (cfpLoadingBar, $rootScope) -> + startedEventCalled = false + completedEventCalled = false + + $rootScope.$on 'cfpLoadingBar:started', (event) -> + startedEventCalled = true + + $rootScope.$on 'cfpLoadingBar:completed', (event) -> + completedEventCalled = true + + expect(startedEventCalled).toBe false + expect(completedEventCalled).toBe false + + cfpLoadingBar.start() + expect(startedEventCalled).toBe true + + cfpLoadingBar.complete() + expect(completedEventCalled).toBe true + $timeout.flush() + + it 'should debounce the calls to start()', inject (cfpLoadingBar, $rootScope) -> + startedEventCalled = 0 + $rootScope.$on 'cfpLoadingBar:started', (event) -> + startedEventCalled += 1 + + cfpLoadingBar.start() + expect(startedEventCalled).toBe 1 + cfpLoadingBar.start() + expect(startedEventCalled).toBe 1 # Should still be one, as complete was never called: + cfpLoadingBar.complete() + $timeout.flush() + flush() + + + cfpLoadingBar.start() + expect(startedEventCalled).toBe 2 + cfpLoadingBar.complete() + $timeout.flush() + + it 'should ignore requests when ignoreLoadingBar is true', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $http.get(endpoint, {ignoreLoadingBar: true}) + $httpBackend.flush() + + injected = isLoadingBarInjected $document.find(cfpLoadingBar.parentSelector) + expect(injected).toBe false + + $timeout.flush() + + it 'should ignore responses when ignoreLoadingBar is true (#70)', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond response + $httpBackend.expectGET('/service2').respond response + + $http.get(endpoint, {ignoreLoadingBar: true}) + $http.get('/service2') + + expect(cfpLoadingBar.status()).toBe 0 + $httpBackend.flush(1) # flush only the ignored request + expect(cfpLoadingBar.status()).toBe 0 + + $timeout.flush() + $httpBackend.flush() + + expect(cfpLoadingBar.status()).toBe 1 + $timeout.flush() # loading bar is animated, so flush timeout + + it 'should ignore errors when ignoreLoadingBar is true (#70)', inject (cfpLoadingBar) -> + $httpBackend.expectGET(endpoint).respond 400 + $httpBackend.expectGET('/service2').respond 400 + + $http.get(endpoint, {ignoreLoadingBar: true}) + $http.get('/service2') + + expect(cfpLoadingBar.status()).toBe 0 + $httpBackend.flush(1) # flush only the ignored request + expect(cfpLoadingBar.status()).toBe 0 + + $timeout.flush() + $httpBackend.flush() + + expect(cfpLoadingBar.status()).toBe 1 + $timeout.flush() # loading bar is animated, so flush timeout + + + +describe 'LoadingBar only', -> + cfpLoadingBar = $document = $timeout = $animate = null + + beforeEach -> + module 'cfp.loadingBar', 'ngAnimateMock' + + inject (_$http_, _$httpBackend_, _$document_, _$timeout_, _$animate_, _cfpLoadingBar_) -> + $timeout = _$timeout_ + $document = _$document_ + $animate = _$animate_ + cfpLoadingBar = _cfpLoadingBar_ + + it 'should be capable of being used alone', -> + # just a simple quick test to make sure: + cfpLoadingBar.start() + $timeout.flush() + + # test setting progress + cfpLoadingBar.set(0.4) + expect(cfpLoadingBar.status()).toBe 0.4 + + # make sure it was injected into the DOM: + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe true + + cfpLoadingBar.set(0.9) + expect(cfpLoadingBar.status()).toBe 0.9 + + # test the complete call, which should remove it from the DOM + cfpLoadingBar.complete() + $timeout.flush() + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe false + + it 'should start after multiple calls to complete()', -> + cfpLoadingBar.start() + $timeout.flush() + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe true + + cfpLoadingBar.complete() + cfpLoadingBar.complete() + cfpLoadingBar.start() + $timeout.flush() + + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe true + + cfpLoadingBar.complete() + $timeout.flush() + flush() + + expect(isLoadingBarInjected($document.find(cfpLoadingBar.parentSelector))).toBe false + + +describe 'Interceptor tests', -> + provider = $http = $httpBackend = $log = null + endpoint = '/service' + response = {message:'OK'} + + describe 'Success response', -> + + beforeEach -> + module 'chieffancypants.loadingBar', ($httpProvider) -> + provider = $httpProvider + provider.interceptors.push -> + response: (resp) -> + return null + return + + inject (_$http_, _$httpBackend_, _$log_) -> + $http = _$http_ + $httpBackend = _$httpBackend_ + $log = _$log_ + + + it 'should detect poorly implemented interceptors and warn accordingly', -> + expect($log.error.logs.length).toBe 0 + + $httpBackend.expectGET(endpoint).respond 204 + $http.get(endpoint) + $httpBackend.flush() + + expect($log.error.logs.length).toBe 1 + expect($log.error.logs).toContain ['Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50'] + + describe 'Error response', -> + + beforeEach -> + module 'chieffancypants.loadingBar', ($httpProvider) -> + provider = $httpProvider + provider.interceptors.push ($q) -> + responseError: (resp) -> + delete resp.config + $q.reject(resp); + return + + inject (_$http_, _$httpBackend_, _$log_) -> + $http = _$http_ + $httpBackend = _$httpBackend_ + $log = _$log_ + + + it 'should detect poorly implemented interceptors and warn accordingly', -> + expect($log.error.logs.length).toBe 0 + + $httpBackend.expectGET(endpoint).respond 500 + $http.get(endpoint) + $httpBackend.flush() + + expect($log.error.logs.length).toBe 1 + expect($log.error.logs).toContain ['Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50'] diff --git a/node_modules/dom-walk/.npmignore b/node_modules/dom-walk/.npmignore new file mode 100644 index 00000000..062c11e8 --- /dev/null +++ b/node_modules/dom-walk/.npmignore @@ -0,0 +1,3 @@ +node_modules +*.log +*.err \ No newline at end of file diff --git a/node_modules/dom-walk/LICENCE b/node_modules/dom-walk/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/node_modules/dom-walk/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/dom-walk/Makefile b/node_modules/dom-walk/Makefile new file mode 100644 index 00000000..132d3a3d --- /dev/null +++ b/node_modules/dom-walk/Makefile @@ -0,0 +1,2 @@ +run: + ./node_modules/.bin/browserify-server --cwd example \ No newline at end of file diff --git a/node_modules/dom-walk/README.md b/node_modules/dom-walk/README.md new file mode 100644 index 00000000..9e33dd15 --- /dev/null +++ b/node_modules/dom-walk/README.md @@ -0,0 +1,23 @@ +# dom-walk + +iteratively walk a DOM node + +## Example + +``` js +var walk = require("dom-walk") + +walk(document.body.childNodes, function (node) { + console.log("node", node) +}) +``` + +## Installation + +`npm install dom-walk` + +## Contributors + + - Raynos + +## MIT Licenced \ No newline at end of file diff --git a/node_modules/dom-walk/example/index.js b/node_modules/dom-walk/example/index.js new file mode 100644 index 00000000..1824012d --- /dev/null +++ b/node_modules/dom-walk/example/index.js @@ -0,0 +1,5 @@ +var walk = require("../index") + +walk(document.body.childNodes, function (node) { + console.log("node", node) +}) \ No newline at end of file diff --git a/node_modules/dom-walk/example/static/bundle.js b/node_modules/dom-walk/example/static/bundle.js new file mode 100644 index 00000000..d11a2888 --- /dev/null +++ b/node_modules/dom-walk/example/static/bundle.js @@ -0,0 +1,211 @@ +(function(){var require = function (file, cwd) { + var resolved = require.resolve(file, cwd || '/'); + var mod = require.modules[resolved]; + if (!mod) throw new Error( + 'Failed to resolve module ' + file + ', tried ' + resolved + ); + var cached = require.cache[resolved]; + var res = cached? cached.exports : mod(); + return res; +}; + +require.paths = []; +require.modules = {}; +require.cache = {}; +require.extensions = [".js",".coffee"]; + +require._core = { + 'assert': true, + 'events': true, + 'fs': true, + 'path': true, + 'vm': true +}; + +require.resolve = (function () { + return function (x, cwd) { + if (!cwd) cwd = '/'; + + if (require._core[x]) return x; + var path = require.modules.path(); + cwd = path.resolve('/', cwd); + var y = cwd || '/'; + + if (x.match(/^(?:\.\.?\/|\/)/)) { + var m = loadAsFileSync(path.resolve(y, x)) + || loadAsDirectorySync(path.resolve(y, x)); + if (m) return m; + } + + var n = loadNodeModulesSync(x, y); + if (n) return n; + + throw new Error("Cannot find module '" + x + "'"); + + function loadAsFileSync (x) { + x = path.normalize(x); + if (require.modules[x]) { + return x; + } + + for (var i = 0; i < require.extensions.length; i++) { + var ext = require.extensions[i]; + if (require.modules[x + ext]) return x + ext; + } + } + + function loadAsDirectorySync (x) { + x = x.replace(/\/+$/, ''); + var pkgfile = path.normalize(x + '/package.json'); + if (require.modules[pkgfile]) { + var pkg = require.modules[pkgfile](); + var b = pkg.browserify; + if (typeof b === 'object' && b.main) { + var m = loadAsFileSync(path.resolve(x, b.main)); + if (m) return m; + } + else if (typeof b === 'string') { + var m = loadAsFileSync(path.resolve(x, b)); + if (m) return m; + } + else if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + } + } + + return loadAsFileSync(x + '/index'); + } + + function loadNodeModulesSync (x, start) { + var dirs = nodeModulesPathsSync(start); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(dir + '/' + x); + if (m) return m; + var n = loadAsDirectorySync(dir + '/' + x); + if (n) return n; + } + + var m = loadAsFileSync(x); + if (m) return m; + } + + function nodeModulesPathsSync (start) { + var parts; + if (start === '/') parts = [ '' ]; + else parts = path.normalize(start).split('/'); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === 'node_modules') continue; + var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; + dirs.push(dir); + } + + return dirs; + } + }; +})(); + +require.alias = function (from, to) { + var path = require.modules.path(); + var res = null; + try { + res = require.resolve(from + '/package.json', '/'); + } + catch (err) { + res = require.resolve(from, '/'); + } + var basedir = path.dirname(res); + + var keys = (Object.keys || function (obj) { + var res = []; + for (var key in obj) res.push(key); + return res; + })(require.modules); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key.slice(0, basedir.length + 1) === basedir + '/') { + var f = key.slice(basedir.length); + require.modules[to + f] = require.modules[basedir + f]; + } + else if (key === basedir) { + require.modules[to] = require.modules[basedir]; + } + } +}; + +(function () { + var process = {}; + + require.define = function (filename, fn) { + if (require.modules.__browserify_process) { + process = require.modules.__browserify_process(); + } + + var dirname = require._core[filename] + ? '' + : require.modules.path().dirname(filename) + ; + + var require_ = function (file) { + var requiredModule = require(file, dirname); + var cached = require.cache[require.resolve(file, dirname)]; + + if (cached && cached.parent === null) { + cached.parent = module_; + } + + return requiredModule; + }; + require_.resolve = function (name) { + return require.resolve(name, dirname); + }; + require_.modules = require.modules; + require_.define = require.define; + require_.cache = require.cache; + var module_ = { + id : filename, + filename: filename, + exports : {}, + loaded : false, + parent: null + }; + + require.modules[filename] = function () { + require.cache[filename] = module_; + fn.call( + module_.exports, + require_, + module_, + module_.exports, + dirname, + filename, + process + ); + module_.loaded = true; + return module_.exports; + }; + }; +})(); + + +require.define("path",Function(['require','module','exports','__dirname','__filename','process'],"function filter (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (fn(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length; i >= 0; i--) {\n var last = parts[i];\n if (last == '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Regex to split a filename into [*, dir, basename, ext]\n// posix version\nvar splitPathRe = /^(.+\\/(?!$)|\\/)?((?:.+?)?(\\.[^.]*)?)$/;\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\nvar resolvedPath = '',\n resolvedAbsolute = false;\n\nfor (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0)\n ? arguments[i]\n : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string' || !path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n}\n\n// At this point the path should be resolved to a full absolute path, but\n// handle relative paths to be safe (might happen when process.cwd() fails)\n\n// Normalize the path\nresolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\nvar isAbsolute = path.charAt(0) === '/',\n trailingSlash = path.slice(-1) === '/';\n\n// Normalize the path\npath = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n \n return (isAbsolute ? '/' : '') + path;\n};\n\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n return p && typeof p === 'string';\n }).join('/'));\n};\n\n\nexports.dirname = function(path) {\n var dir = splitPathRe.exec(path)[1] || '';\n var isWindows = false;\n if (!dir) {\n // No dirname\n return '.';\n } else if (dir.length === 1 ||\n (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) {\n // It is just a slash or a drive letter with a slash\n return dir;\n } else {\n // It is a full dirname, strip trailing slash\n return dir.substring(0, dir.length - 1);\n }\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPathRe.exec(path)[2] || '';\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPathRe.exec(path)[3] || '';\n};\n\n//@ sourceURL=path")); + +require.define("__browserify_process",Function(['require','module','exports','__dirname','__filename','process'],"var process = module.exports = {};\n\nprocess.nextTick = (function () {\n var queue = [];\n var canPost = typeof window !== 'undefined'\n && window.postMessage && window.addEventListener\n ;\n \n if (canPost) {\n window.addEventListener('message', function (ev) {\n if (ev.source === window && ev.data === 'browserify-tick') {\n ev.stopPropagation();\n if (queue.length > 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n }\n \n return function (fn) {\n if (canPost) {\n queue.push(fn);\n window.postMessage('browserify-tick', '*');\n }\n else setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nprocess.binding = function (name) {\n if (name === 'evals') return (require)('vm')\n else throw new Error('No such module. (Possibly not yet loaded)')\n};\n\n(function () {\n var cwd = '/';\n var path;\n process.cwd = function () { return cwd };\n process.chdir = function (dir) {\n if (!path) path = require('path');\n cwd = path.resolve(dir, cwd);\n };\n})();\n//@ sourceURL=__browserify_process")); + +require.define("vm",Function(['require','module','exports','__dirname','__filename','process'],"module.exports = require(\"vm-browserify\")\n//@ sourceURL=vm")); + +require.define("/node_modules/vm-browserify/package.json",Function(['require','module','exports','__dirname','__filename','process'],"module.exports = {\"main\":\"index.js\"}\n//@ sourceURL=/node_modules/vm-browserify/package.json")); + +require.define("/node_modules/vm-browserify/index.js",Function(['require','module','exports','__dirname','__filename','process'],"var Object_keys = function (obj) {\n if (Object.keys) return Object.keys(obj)\n else {\n var res = [];\n for (var key in obj) res.push(key)\n return res;\n }\n};\n\nvar forEach = function (xs, fn) {\n if (xs.forEach) return xs.forEach(fn)\n else for (var i = 0; i < xs.length; i++) {\n fn(xs[i], i, xs);\n }\n};\n\nvar Script = exports.Script = function NodeScript (code) {\n if (!(this instanceof Script)) return new Script(code);\n this.code = code;\n};\n\nScript.prototype.runInNewContext = function (context) {\n if (!context) context = {};\n \n var iframe = document.createElement('iframe');\n if (!iframe.style) iframe.style = {};\n iframe.style.display = 'none';\n \n document.body.appendChild(iframe);\n \n var win = iframe.contentWindow;\n \n forEach(Object_keys(context), function (key) {\n win[key] = context[key];\n });\n \n if (!win.eval && win.execScript) {\n // win.eval() magically appears when this is called in IE:\n win.execScript('null');\n }\n \n var res = win.eval(this.code);\n \n forEach(Object_keys(win), function (key) {\n context[key] = win[key];\n });\n \n document.body.removeChild(iframe);\n \n return res;\n};\n\nScript.prototype.runInThisContext = function () {\n return eval(this.code); // maybe...\n};\n\nScript.prototype.runInContext = function (context) {\n // seems to be just runInNewContext on magical context objects which are\n // otherwise indistinguishable from objects except plain old objects\n // for the parameter segfaults node\n return this.runInNewContext(context);\n};\n\nforEach(Object_keys(Script.prototype), function (name) {\n exports[name] = Script[name] = function (code) {\n var s = Script(code);\n return s[name].apply(s, [].slice.call(arguments, 1));\n };\n});\n\nexports.createScript = function (code) {\n return exports.Script(code);\n};\n\nexports.createContext = Script.createContext = function (context) {\n // not really sure what this one does\n // seems to just make a shallow copy\n var copy = {};\n if(typeof context === 'object') {\n forEach(Object_keys(context), function (key) {\n copy[key] = context[key];\n });\n }\n return copy;\n};\n\n//@ sourceURL=/node_modules/vm-browserify/index.js")); + +require.define("/package.json",Function(['require','module','exports','__dirname','__filename','process'],"module.exports = {\"main\":\"index\"}\n//@ sourceURL=/package.json")); + +require.define("/index.js",Function(['require','module','exports','__dirname','__filename','process'],"var slice = Array.prototype.slice\n\nmodule.exports = iterativelyWalk\n\nfunction iterativelyWalk(nodes, cb) {\n nodes = slice.call(nodes)\n\n while(nodes.length) {\n var node = nodes.shift(),\n ret = cb(node)\n\n if (ret) {\n return ret\n }\n\n if (node.childNodes.length) {\n nodes = slice.call(node.childNodes).concat(nodes)\n }\n }\n}\n//@ sourceURL=/index.js")); + +require.define("/example/index.js",Function(['require','module','exports','__dirname','__filename','process'],"var walk = require(\"../index\")\n\nwalk(document.body.childNodes, function (node) {\n console.log(\"node\", node)\n})\n//@ sourceURL=/example/index.js")); +require("/example/index.js"); +})(); diff --git a/node_modules/dom-walk/example/static/index.html b/node_modules/dom-walk/example/static/index.html new file mode 100644 index 00000000..825e1e2c --- /dev/null +++ b/node_modules/dom-walk/example/static/index.html @@ -0,0 +1,16 @@ + + + + Your title + + + + + + + + + \ No newline at end of file diff --git a/node_modules/dom-walk/index.js b/node_modules/dom-walk/index.js new file mode 100644 index 00000000..9c2402d4 --- /dev/null +++ b/node_modules/dom-walk/index.js @@ -0,0 +1,24 @@ +var slice = Array.prototype.slice + +module.exports = iterativelyWalk + +function iterativelyWalk(nodes, cb) { + if (!('length' in nodes)) { + nodes = [nodes] + } + + nodes = slice.call(nodes) + + while(nodes.length) { + var node = nodes.shift(), + ret = cb(node) + + if (ret) { + return ret + } + + if (node.childNodes && node.childNodes.length) { + nodes = slice.call(node.childNodes).concat(nodes) + } + } +} diff --git a/node_modules/dom-walk/package.json b/node_modules/dom-walk/package.json new file mode 100644 index 00000000..5eb782db --- /dev/null +++ b/node_modules/dom-walk/package.json @@ -0,0 +1,61 @@ +{ + "_from": "dom-walk@^0.1.0", + "_id": "dom-walk@0.1.1", + "_inBundle": false, + "_integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", + "_location": "/dom-walk", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "dom-walk@^0.1.0", + "name": "dom-walk", + "escapedName": "dom-walk", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/min-document" + ], + "_resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "_shasum": "672226dc74c8f799ad35307df936aba11acd6018", + "_spec": "dom-walk@^0.1.0", + "_where": "/home/lrullo/httpdocs/anorgatarrak.eus/wp-content/themes/anorgatarrak/node_modules/min-document", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/dom-walk/issues", + "email": "raynos2@gmail.com" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jake Verbaten" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "iteratively walk a DOM node", + "devDependencies": { + "browserify-server": "~0.5.6" + }, + "homepage": "https://github.com/Raynos/dom-walk", + "keywords": [], + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/dom-walk/raw/master/LICENSE" + } + ], + "main": "index", + "name": "dom-walk", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/dom-walk.git" + }, + "scripts": {}, + "version": "0.1.1" +} diff --git a/node_modules/global/.npmignore b/node_modules/global/.npmignore new file mode 100644 index 00000000..fd31f5ee --- /dev/null +++ b/node_modules/global/.npmignore @@ -0,0 +1,15 @@ +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +node_modules diff --git a/node_modules/global/.travis.yml b/node_modules/global/.travis.yml new file mode 100644 index 00000000..ed178f63 --- /dev/null +++ b/node_modules/global/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.9 diff --git a/node_modules/global/LICENSE b/node_modules/global/LICENSE new file mode 100644 index 00000000..822d880b --- /dev/null +++ b/node_modules/global/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Colingo. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/global/README.md b/node_modules/global/README.md new file mode 100644 index 00000000..289d305f --- /dev/null +++ b/node_modules/global/README.md @@ -0,0 +1,30 @@ +# global + + + +Require global variables + +## Example + +```js +var global = require("global") +var document = require("global/document") +var window = require("global/window") +``` + +## Installation + +`npm install global` + +## Contributors + + - Raynos + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Colingo/global.png + [2]: http://travis-ci.org/Colingo/global + [3]: http://ci.testling.com/Colingo/global.png + [4]: http://ci.testling.com/Colingo/global diff --git a/node_modules/global/console.js b/node_modules/global/console.js new file mode 100644 index 00000000..5cb1dfa1 --- /dev/null +++ b/node_modules/global/console.js @@ -0,0 +1 @@ +module.exports = console; diff --git a/node_modules/global/document.js b/node_modules/global/document.js new file mode 100644 index 00000000..7c0f50dc --- /dev/null +++ b/node_modules/global/document.js @@ -0,0 +1,17 @@ +var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} +var minDoc = require('min-document'); + +var doccy; + +if (typeof document !== 'undefined') { + doccy = document; +} else { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } +} + +module.exports = doccy; diff --git a/node_modules/global/package.json b/node_modules/global/package.json new file mode 100644 index 00000000..7a756014 --- /dev/null +++ b/node_modules/global/package.json @@ -0,0 +1,94 @@ +{ + "_from": "global@^4.3.1", + "_id": "global@4.3.2", + "_inBundle": false, + "_integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "_location": "/global", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "global@^4.3.1", + "name": "global", + "escapedName": "global", + "rawSpec": "^4.3.1", + "saveSpec": null, + "fetchSpec": "^4.3.1" + }, + "_requiredBy": [ + "/mediaelement" + ], + "_resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "_shasum": "e76989268a6c74c38908b1305b10fc0e394e9d0f", + "_spec": "global@^4.3.1", + "_where": "/home/lrullo/httpdocs/anorgatarrak.eus/wp-content/themes/anorgatarrak/node_modules/mediaelement", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "browser": { + "min-document": false, + "individual": false + }, + "bugs": { + "url": "https://github.com/Raynos/global/issues", + "email": "raynos2@gmail.com" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Raynos" + } + ], + "dependencies": { + "min-document": "^2.19.0", + "process": "~0.5.1" + }, + "deprecated": false, + "description": "Require global variables", + "devDependencies": { + "tape": "^2.12.0" + }, + "homepage": "https://github.com/Raynos/global", + "keywords": [], + "license": "MIT", + "main": "window.js", + "name": "global", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/global.git" + }, + "scripts": { + "build": "browserify test/index.js -o test/static/bundle.js", + "test": "node ./test", + "testem": "testem" + }, + "testling": { + "files": "test/index.js", + "browsers": { + "ie": [ + "8", + "9", + "10" + ], + "firefox": [ + "16", + "17", + "nightly" + ], + "chrome": [ + "22", + "23", + "canary" + ], + "opera": [ + "12", + "next" + ], + "safari": [ + "5.1" + ] + } + }, + "version": "4.3.2" +} diff --git a/node_modules/global/process.js b/node_modules/global/process.js new file mode 100644 index 00000000..00a8e377 --- /dev/null +++ b/node_modules/global/process.js @@ -0,0 +1 @@ +module.exports = require('process'); diff --git a/node_modules/global/window.js b/node_modules/global/window.js new file mode 100644 index 00000000..ae6c11c7 --- /dev/null +++ b/node_modules/global/window.js @@ -0,0 +1,13 @@ +var win; + +if (typeof window !== "undefined") { + win = window; +} else if (typeof global !== "undefined") { + win = global; +} else if (typeof self !== "undefined"){ + win = self; +} else { + win = {}; +} + +module.exports = win; diff --git a/node_modules/mediaelement/.babelrc b/node_modules/mediaelement/.babelrc new file mode 100644 index 00000000..45f733b3 --- /dev/null +++ b/node_modules/mediaelement/.babelrc @@ -0,0 +1,10 @@ +{ + "comments": false, + "presets": [ + ["env", { + "targets": { + "browsers": ["last 5 versions", "ie > 10", "ios > 7", "android > 3"] + } + }] + ] +} \ No newline at end of file diff --git a/node_modules/mediaelement/.eslintrc b/node_modules/mediaelement/.eslintrc new file mode 100644 index 00000000..2d65f4d7 --- /dev/null +++ b/node_modules/mediaelement/.eslintrc @@ -0,0 +1,20 @@ +{ + "env": { + "es6": true, + "browser": true, + "mocha": true, + "node": true, + "jquery": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "rules": { + "no-console": 0, + "no-undef" : 0, + "no-case-declarations": 0, + "no-empty": 0 + } +} \ No newline at end of file diff --git a/node_modules/mediaelement/.gitattributes b/node_modules/mediaelement/.gitattributes new file mode 100644 index 00000000..5d6debc1 --- /dev/null +++ b/node_modules/mediaelement/.gitattributes @@ -0,0 +1,13 @@ +* text=auto eol=lf + +*.jar binary +*.mp3 binary +*.mp4 binary +*.ogv binary +*.png binary +*.webm binary +*.swf binary +*.swc binary +*.fla binary +*.xap binary + diff --git a/node_modules/mediaelement/.npmignore b/node_modules/mediaelement/.npmignore new file mode 100644 index 00000000..f59844b3 --- /dev/null +++ b/node_modules/mediaelement/.npmignore @@ -0,0 +1,20 @@ +# silverlight stuff +src/silverlight/obj/* +src/silverlight/Bin/* +build/AppManifest.xaml +build/SilverlightMediaElementTestPage.html +build/SilverlightMediaElement.pdb +build/SilverlightMediaElement.dll +tests/* +newfeatures/* +/mejs3/ +node_modules +local-build +# PhpStorm/WebStorm configuration +.idea +media/* +!media/README +src/flash/flex_sdk_* +coverage +npm-debug.log +tmp \ No newline at end of file diff --git a/node_modules/mediaelement/.stylelintrc b/node_modules/mediaelement/.stylelintrc new file mode 100644 index 00000000..f17e0016 --- /dev/null +++ b/node_modules/mediaelement/.stylelintrc @@ -0,0 +1,35 @@ +{ + "plugins": [ + "stylelint-order" + ], + "rules": { + "color-hex-case": ["lower"], + "color-hex-length": "short", + "declaration-block-no-duplicate-properties": [ + true, + { + "ignore": [ + "consecutive-duplicates-with-different-values" + ] + } + ], + "function-comma-space-after": "always-single-line", + "function-comma-space-before": "never", + "indentation": 4, + "length-zero-no-unit": true, + "number-leading-zero": "always", + "number-no-trailing-zeros": true, + "order/order": [ + "custom-properties", + "declarations" + ], + "order/properties-alphabetical-order": true, + "property-case": "lower", + "property-no-unknown": true, + "selector-combinator-space-after": "always", + "selector-combinator-space-before": "always", + "selector-list-comma-newline-after": "always", + "shorthand-property-no-redundant-values": true, + "string-quotes": "single" + } +} diff --git a/node_modules/mediaelement/.travis.yml b/node_modules/mediaelement/.travis.yml new file mode 100644 index 00000000..a7d59a5e --- /dev/null +++ b/node_modules/mediaelement/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - node +before_install: + - "curl -L http://git.io/ejPSng | /bin/sh" +after_success: 'npm run coveralls' \ No newline at end of file diff --git a/node_modules/mediaelement/.versions b/node_modules/mediaelement/.versions new file mode 100644 index 00000000..34c8a142 --- /dev/null +++ b/node_modules/mediaelement/.versions @@ -0,0 +1,5 @@ +johndyer:mediaelement@4.2.8 +jquery@1.11.10 +meteor@1.7.1 +modules@0.10.0 +modules-runtime@0.8.0 diff --git a/node_modules/mediaelement/Gruntfile.js b/node_modules/mediaelement/Gruntfile.js new file mode 100644 index 00000000..9df2a822 --- /dev/null +++ b/node_modules/mediaelement/Gruntfile.js @@ -0,0 +1,230 @@ +module.exports = function (grunt) { + + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-postcss'); + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-shell'); + grunt.loadNpmTasks('grunt-text-replace'); + grunt.loadNpmTasks("grunt-remove-logging"); + grunt.loadNpmTasks('grunt-browserify'); + grunt.loadNpmTasks('grunt-eslint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-stylelint'); + + var rendererSources; + + // if commandline list of renderers, (e.g. --renderers=hls,dash,...) build only these + var rendererList = grunt.option('features'); + if (rendererList) { + rendererList = rendererList.split(','); + rendererSources = []; + rendererList.forEach(function (renderer) { + var path = 'src/js/renderers/' + renderer + '.js'; + if (grunt.file.isFile(path)) { + rendererSources.push(path); + } + }); + } + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + watch: { + scripts: { + files: ['src/js/**/*.js', 'test/core/*.js'], + tasks: ['eslint', 'browserify', 'concat', 'uglify', 'copy:translation'] + }, + stylesheet: { + files: ['src/css/**/*.css', 'src/css/**/*.png', 'src/css/**/*.svg', 'src/css/**/*.gif'], + tasks: ['postcss', 'copy:build'] + } + }, + + stylelint: { + all: ['src/css/*.css'] + }, + + eslint: { + target: [ + 'Gruntfile.js', + 'src/js/core/*.js', + 'src/js/features/*.js', + 'src/js/languages/*.js', + 'src/js/renderers/*.js', + 'src/js/utils/*.js', + 'src/js/library.js', + 'src/js/player.js', + 'src/js/index.js', + 'test/core/*.js' + ] + }, + browserify: { + dist: { + files: { + // core element + 'build/mediaelement.js': [ + 'src/js/utils/polyfill.js', + 'src/js/core/mediaelement.js', + 'src/js/core/i18n.js', + 'src/js/languages/en.js', + 'src/js/renderers/html5.js', + 'src/js/renderers/flash.js', + ].concat(rendererSources || [ + 'src/js/renderers/dash.js', + 'src/js/renderers/flv.js', + 'src/js/renderers/hls.js', + 'src/js/renderers/youtube.js', + ]), + // all bundle + 'build/mediaelement-and-player.js': [ + 'src/js/utils/polyfill.js', + 'src/js/core/mediaelement.js', + 'src/js/core/i18n.js', + 'src/js/languages/en.js', + 'src/js/renderers/html5.js', + 'src/js/renderers/flash.js', + ].concat(rendererSources || [ + 'src/js/renderers/dash.js', + 'src/js/renderers/flv.js', + 'src/js/renderers/hls.js', + 'src/js/renderers/youtube.js', + ]).concat([ + 'src/js/player.js', + 'src/js/player/library.js', + 'src/js/player/default.js', + 'src/js/features/fullscreen.js', + 'src/js/features/playpause.js', + 'src/js/features/progress.js', + 'src/js/features/time.js', + 'src/js/features/tracks.js', + 'src/js/features/volume.js' + ]), + + // new renderers + 'build/renderers/dailymotion.js': 'src/js/renderers/dailymotion.js', + 'build/renderers/facebook.js': 'src/js/renderers/facebook.js', + 'build/renderers/soundcloud.js': 'src/js/renderers/soundcloud.js', + 'build/renderers/twitch.js': 'src/js/renderers/twitch.js', + 'build/renderers/vimeo.js': 'src/js/renderers/vimeo.js' + }, + options: { + plugin: [ + 'browserify-derequire', 'bundle-collapser/plugin' + ] + } + } + }, + concat: { + dist: { + options: { + banner: grunt.file.read('src/js/header.js') + }, + expand: true, + src: ['build/**/*.js', '!build/lang/*.js', '!build/jquery.js', '!build/**/*.min.js'], + ext: '.js' + } + }, + removelogging: { + dist: { + src: ['build/**/*.js', '!build/lang/*.js', '!build/jquery.js', '!build/**/*.min.js'], + }, + options: { + // Keep `warn` and other methods from the console API + methods: ['log'] + } + }, + uglify: { + build: { + files: [{ + expand: true, + src: ['build/**/*.js', '!build/lang/*.js', '!build/jquery.js', '!build/**/*.min.js'], + ext: '.min.js' + }] + }, + options: { + output: {comments: false}, + banner: grunt.file.read('src/js/header.js') + } + }, + postcss: { + main: { + options: { + processors: [ + // Add vendor prefixes. + require('autoprefixer')({browsers: 'last 5 versions, ie > 10, ios > 7, android > 3'}) + ] + }, + src: 'src/css/mediaelementplayer.css', + dest: 'build/mediaelementplayer.css' + }, + legacy: { + options: { + processors: [ + // Add vendor prefixes. + require('autoprefixer')({browsers: 'last 5 versions, ie > 10, ios > 7, android > 3'}) + ] + }, + src: 'src/css/mediaelementplayer-legacy.css', + dest: 'build/mediaelementplayer-legacy.css' + }, + mainMin: { + options: { + processors: [ + // Add vendor prefixes. + require('autoprefixer')({browsers: 'last 5 versions, ie > 10, ios > 7, android > 3'}), + // Minify the result. + require('cssnano')() + ] + }, + src: 'build/mediaelementplayer.css', + dest: 'build/mediaelementplayer.min.css' + }, + legacyMin: { + options: { + processors: [ + // Add vendor prefixes. + require('autoprefixer')({browsers: 'last 5 versions, ie > 10, ios > 7, android > 3'}), + // Minify the result. + require('cssnano')() + ] + }, + src: 'build/mediaelementplayer-legacy.css', + dest: 'build/mediaelementplayer-legacy.min.css' + } + }, + copy: { + build: { + expand: true, + cwd: 'src/css/', + src: ['*.png', '*.svg', '*.gif'], + dest: 'build/', + flatten: true, + filter: 'isFile' + }, + translation: { + expand: true, + cwd: 'src/js/languages/', + src: ['*.js', '!*en.js'], + dest: 'build/lang/', + flatten: true, + filter: 'isFile', + options: { + processContent: function (content) { + content = content.replace(/\/\/.*?\.js/gm, ''); + return content.replace(/\n{2,}/gm, ''); + } + } + } + } + }); + + grunt.registerTask('default', ['eslint', 'stylelint', 'browserify', 'concat', 'removelogging', 'uglify', 'postcss', 'copy']); + grunt.registerTask('debug', ['eslint', 'stylelint', 'browserify', 'concat', 'uglify', 'postcss', 'copy']); + grunt.registerTask('flash', '', function () { + var exec = require('child_process').execSync; + var result = exec("sh compile_swf.sh", {encoding: 'utf8'}); + grunt.log.writeln(result); + }); +}; diff --git a/node_modules/mediaelement/README.md b/node_modules/mediaelement/README.md new file mode 100644 index 00000000..0dd05782 --- /dev/null +++ b/node_modules/mediaelement/README.md @@ -0,0 +1,127 @@ +# ![MediaElementJS](https://cloud.githubusercontent.com/assets/910829/22357262/e6cf32b4-e404-11e6-876b-59afa009f65c.png) + +One file. Any browser. Same UI. + +* Author: John Dyer [http://j.hn/](http://j.hn/) +* Website: [http://mediaelementjs.com/](http://mediaelementjs.com/) +* License: [MIT](http://mediaelement.mit-license.org/) +* Meaning: Use everywhere, keep copyright, it'd be swell if you'd link back here. +* Thanks: my employer, [Dallas Theological Seminary](http://www.dts.edu/) +* Contributors: [all contributors](https://github.com/mediaelement/mediaelement/graphs/contributors) + +[![GitHub Version](https://img.shields.io/npm/v/mediaelement.svg)](https://github.com/mediaelement/mediaelement) +[![Build Status](https://img.shields.io/travis/mediaelement/mediaelement.svg)](https://travis-ci.org/mediaelement/mediaelement) +[![Coverage Status](https://img.shields.io/coveralls/mediaelement/mediaelement.svg)](https://coveralls.io/github/mediaelement/mediaelement) +[![MIT License](https://img.shields.io/npm/l/mediaelement.svg)](https://mediaelement.mit-license.org/) +[![CDNJS](https://img.shields.io/cdnjs/v/mediaelement.svg)](https://cdnjs.com/libraries/mediaelement) +[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/mediaelement/badge?style=rounded)](https://www.jsdelivr.com/package/npm/mediaelement) + +# Table of Contents + +* [Introduction](#intro) +* [Migrating from `2.x` to `4.x` version](#migration) +* [Installation and Usage](#installation) +* [API and Configuration](#api) +* [Guidelines for Contributors](#guidelines) +* [Change Log](#changelog) +* [TODO list](#todo) + + +## Introduction + +_MediaElementPlayer: HTML5 `