From c23e9b12c42c180cdeda76be67ae3a27833efc36 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Tue, 1 May 2012 16:26:51 -0700 Subject: Styles Controller - Fix error when trying dispatch stylesheet change event --- js/controllers/styles-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index ec4314f9..62cbb574 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -795,7 +795,9 @@ var stylesController = exports.StylesController = Montage.create(Component, { ///// method to apply/test the new value dec.setProperty(property, value, priority); - this.styleSheetModified(rule.parentStyleSheet); + if(rule.parentStyleSheet) { + this.styleSheetModified(rule.parentStyleSheet); + } ///// Return browser value for value we just set return dec.getPropertyValue(property); -- cgit v1.2.3 From 4d9832acbd78f82a63fba59187bd82a5afad8240 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 9 May 2012 11:46:14 -0700 Subject: Squashed commit of google-components into master Signed-off-by: Valerio Virgillito --- js/document/templates/montage-html/package.json | 3 +- js/io/system/ninjalibrary.js | 28 +- js/io/system/ninjalibrary.json | 2 +- node_modules/components-data/feed-reader.json | 2 +- node_modules/components-data/map.json | 2 +- node_modules/components-data/picasa-carousel.json | 2 +- node_modules/components-data/youtube-channel.json | 2 +- node_modules/descriptor.json | 580 +++++++++++---------- .../feed-reader/feed-entry.reel/feed-entry.html | 89 ++++ .../feed-reader/feed-entry.reel/feed-entry.js | 21 + .../feed-reader/feed-reader.reel/feed-reader.html | 79 +++ .../feed-reader/feed-reader.reel/feed-reader.js | 179 +++++++ node_modules/montage-google/map.reel/map.css | 9 + node_modules/montage-google/map.reel/map.html | 46 ++ node_modules/montage-google/map.reel/map.js | 289 ++++++++++ node_modules/montage-google/package.json | 14 + .../picasa-carousel.reel/image.reel/image.html | 39 ++ .../picasa-carousel.reel/image.reel/image.js | 20 + .../picasa-carousel.reel/picasa-carousel.css | 41 ++ .../picasa-carousel.reel/picasa-carousel.html | 169 ++++++ .../picasa-carousel.reel/picasa-carousel.js | 151 ++++++ .../youtube-channel.reel/youtube-channel.html | 126 +++++ .../youtube-channel.reel/youtube-channel.js | 242 +++++++++ .../youtube-player.reel/youtube-player.html | 25 + .../youtube-player.reel/youtube-player.js | 216 ++++++++ .../ui/feed-reader/feed-entry.reel/feed-entry.html | 89 ---- .../ui/feed-reader/feed-entry.reel/feed-entry.js | 21 - .../feed-reader/feed-reader.reel/feed-reader.html | 79 --- .../ui/feed-reader/feed-reader.reel/feed-reader.js | 180 ------- node_modules/montage/ui/map.reel/map.css | 9 - node_modules/montage/ui/map.reel/map.html | 46 -- node_modules/montage/ui/map.reel/map.js | 289 ---------- .../ui/picasa-carousel.reel/image.reel/image.html | 39 -- .../ui/picasa-carousel.reel/image.reel/image.js | 20 - .../ui/picasa-carousel.reel/picasa-carousel.css | 41 -- .../ui/picasa-carousel.reel/picasa-carousel.html | 169 ------ .../ui/picasa-carousel.reel/picasa-carousel.js | 151 ------ .../ui/youtube-channel.reel/youtube-channel.html | 126 ----- .../ui/youtube-channel.reel/youtube-channel.js | 242 --------- .../ui/youtube-player.reel/youtube-player.html | 25 - .../ui/youtube-player.reel/youtube-player.js | 216 -------- 41 files changed, 2075 insertions(+), 2043 deletions(-) create mode 100644 node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html create mode 100644 node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.js create mode 100644 node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html create mode 100644 node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js create mode 100644 node_modules/montage-google/map.reel/map.css create mode 100644 node_modules/montage-google/map.reel/map.html create mode 100644 node_modules/montage-google/map.reel/map.js create mode 100755 node_modules/montage-google/package.json create mode 100644 node_modules/montage-google/picasa-carousel.reel/image.reel/image.html create mode 100644 node_modules/montage-google/picasa-carousel.reel/image.reel/image.js create mode 100755 node_modules/montage-google/picasa-carousel.reel/picasa-carousel.css create mode 100755 node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html create mode 100644 node_modules/montage-google/picasa-carousel.reel/picasa-carousel.js create mode 100644 node_modules/montage-google/youtube-channel.reel/youtube-channel.html create mode 100644 node_modules/montage-google/youtube-channel.reel/youtube-channel.js create mode 100644 node_modules/montage-google/youtube-player.reel/youtube-player.html create mode 100644 node_modules/montage-google/youtube-player.reel/youtube-player.js delete mode 100644 node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.html delete mode 100644 node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.js delete mode 100644 node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.html delete mode 100644 node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.js delete mode 100644 node_modules/montage/ui/map.reel/map.css delete mode 100644 node_modules/montage/ui/map.reel/map.html delete mode 100644 node_modules/montage/ui/map.reel/map.js delete mode 100644 node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html delete mode 100644 node_modules/montage/ui/picasa-carousel.reel/image.reel/image.js delete mode 100755 node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.css delete mode 100755 node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.html delete mode 100644 node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js delete mode 100644 node_modules/montage/ui/youtube-channel.reel/youtube-channel.html delete mode 100644 node_modules/montage/ui/youtube-channel.reel/youtube-channel.js delete mode 100644 node_modules/montage/ui/youtube-player.reel/youtube-player.html delete mode 100644 node_modules/montage/ui/youtube-player.reel/youtube-player.js diff --git a/js/document/templates/montage-html/package.json b/js/document/templates/montage-html/package.json index c8bc02fb..d1e839dc 100755 --- a/js/document/templates/montage-html/package.json +++ b/js/document/templates/montage-html/package.json @@ -3,6 +3,7 @@ "lib": "" }, "mappings": { - "montage": "../../../../node_modules/montage/" + "montage": "../../../../node_modules/montage/", + "montage-google": "../../../../node_modules/montage-google/" } } \ No newline at end of file diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index 201598fc..f4915a91 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -152,7 +152,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { // this.chromeApi = chrome; // - var i, l, libs, libjson, xhr = new XMLHttpRequest(), tocopylibs = [], copied; +// debugger; + var i, l, libs, libjson, xhr = new XMLHttpRequest(), tocopylibs = []; //Getting known json list of libraries to copy to chrome xhr.open("GET", '/js/io/system/ninjalibrary.json', false); xhr.send(); @@ -166,23 +167,18 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { if (chromeLibs.length > 0) { // for (i=0; chromeLibs[i]; i++) { - copied = false; for (var j in libs.libraries) { if (String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase() === chromeLibs[i]) { - copied = true; - } - } - // - if (!copied) { - if (libs.libraries[j].file) { - tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path, file: libs.libraries[j].file}); - } else { - tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path}); - } - } else { - //TODO: Remove, currently manually removing copied libraries - //this.chromeApi.directoryDelete(chromeLibs[i]); - } + //TODO: Remove, currently manually removing copied libraries + // //this.chromeApi.directoryDelete(chromeLibs[i]); + } else { + if (libs.libraries[j].file) { + tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path, file: libs.libraries[j].file}); + } else { + tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path}); + } + } + } } } else { diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index e236f2e0..f7b87a91 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,6 +1,6 @@ { "libraries": [ - {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.7.0.0"}, + {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.8.0.0"}, {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.5.0"} ] } \ No newline at end of file diff --git a/node_modules/components-data/feed-reader.json b/node_modules/components-data/feed-reader.json index 39da73f3..5e8ca527 100644 --- a/node_modules/components-data/feed-reader.json +++ b/node_modules/components-data/feed-reader.json @@ -1,7 +1,7 @@ { "component": "feedreader", - "module": "montage/ui/feed-reader/feed-reader.reel", + "module": "montage-google/feed-reader/feed-reader.reel", "name": "FeedReader", diff --git a/node_modules/components-data/map.json b/node_modules/components-data/map.json index 655d222d..e80fa510 100644 --- a/node_modules/components-data/map.json +++ b/node_modules/components-data/map.json @@ -1,7 +1,7 @@ { "component": "map", - "module": "montage/ui/map.reel", + "module": "montage-google/map.reel", "name": "Map", diff --git a/node_modules/components-data/picasa-carousel.json b/node_modules/components-data/picasa-carousel.json index 2eb601c7..b0711b12 100644 --- a/node_modules/components-data/picasa-carousel.json +++ b/node_modules/components-data/picasa-carousel.json @@ -1,7 +1,7 @@ { "component": "picasa-carousel", - "module": "montage/ui/picasa-carousel.reel", + "module": "montage-google/picasa-carousel.reel", "name": "PicasaCarousel", diff --git a/node_modules/components-data/youtube-channel.json b/node_modules/components-data/youtube-channel.json index c909fd1b..44180d72 100644 --- a/node_modules/components-data/youtube-channel.json +++ b/node_modules/components-data/youtube-channel.json @@ -1,7 +1,7 @@ { "component": "youtube-channel", - "module": "montage/ui/youtube-channel.reel", + "module": "montage-google/youtube-channel.reel", "name": "YoutubeChannel", diff --git a/node_modules/descriptor.json b/node_modules/descriptor.json index e5606655..a2e96aa3 100644 --- a/node_modules/descriptor.json +++ b/node_modules/descriptor.json @@ -1,285 +1,307 @@ { "copyright": "This file contains proprietary software owned by Motorola Mobility, Inc. No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder. (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.", "version": "0.0.0.0", - "root": "/node_modules/montage/", - "directories": [{"name": "core", - "children": [{"name": "converter"}, {"name": "event"}, {"name": "geometry"}, {"name": "shim"}] - }, - - {"name": "data", - "children": [{"name": "ldapaccess"}, {"name": "nosqlaccess"}, {"name": "restaccess"}, {"name": "sqlaccess"}] - }, - - {"name": "require"}, - - {"name": "service"}, - - {"name": "ui", - "children": [ {"name": "anchor.reel"}, - {"name": "bluemoon", - "children": [{"name": "button-group.reel"}, {"name": "button.reel"}, {"name": "checkbox.reel"}, {"name": "progress.reel"}, {"name": "slider.reel"}, {"name": "textarea.reel"}, {"name": "textfield.reel"}, {"name": "toggle.reel"}] - }, - {"name": "button.reel"}, - {"name": "checkbox.reel"}, - {"name": "component-group.reel"}, - {"name": "component-placeholder.reel"}, - {"name": "composer"}, - {"name": "condition.reel"}, - {"name": "controller"}, - {"name": "date-input.reel"}, - {"name": "dynamic-text.reel"}, - {"name": "flow.reel"}, - {"name": "image.reel"}, - {"name": "list.reel"}, - {"name": "loader.reel"}, - {"name": "loading-panel.reel"}, - {"name": "loading.reel"}, - {"name": "number-input.reel"}, - {"name": "popup", - "children": [{"name": "alert.reel"}, {"name": "confirm.reel"}, {"name": "notifier.reel"}, {"name": "popup.reel"}] - }, - {"name": "progress.reel"}, - {"name": "radio-button.reel"}, - {"name": "range-input.reel"}, - {"name": "repetition.reel"}, - {"name": "scroll-bars.reel"}, - {"name": "scroller.reel"}, - {"name": "scrollview.reel"}, - {"name": "select-input.reel"}, - {"name": "slot.reel"}, - {"name": "substitution.reel"}, - {"name": "tabs.reel"}, - {"name": "textarea.reel"}, - {"name": "textfield.reel"}, - {"name": "toggle-button.reel"}, - {"name": "toggle-switch.reel"}, - {"name": "video-player.reel", - "children": [{"name": "images"}] - } - ] - }], + "root": "/node_modules/", + "directories": [ + {"name": "montage", + "children": [ + {"name": "bin"}, + {"name": "core", + "children": [{"name": "converter"}, {"name": "event"}, {"name": "geometry"}, {"name": "shim"}] + }, + {"name": "data", + "children": [{"name": "ldapaccess"}, {"name": "nosqlaccess"}, {"name": "restaccess"}, {"name": "sqlaccess"}] + }, + {"name": "require"}, + {"name": "service"}, + {"name": "ui", + "children": [ + {"name": "anchor.reel"}, + {"name": "autocomplete", + "children": [{"name": "autocomplete.reel"}, {"name": "results-list.reel"}]}, + {"name": "bluemoon", + "children": [{"name": "button-group.reel"}, {"name": "button.reel"}, {"name": "checkbox.reel"}, {"name": "progress.reel"}, {"name": "slider.reel"}, {"name": "textarea.reel"}, {"name": "textfield.reel"}, {"name": "toggle.reel"}]}, + {"name": "button.reel"}, + {"name": "checkbox.reel"}, + {"name": "component-group.reel"}, + {"name": "component-placeholder.reel"}, + {"name": "composer"}, + {"name": "condition.reel"}, + {"name": "controller"}, + {"name": "date-input.reel"}, + {"name": "dynamic-element.reel"}, + {"name": "dynamic-text.reel"}, + {"name": "flow.reel"}, + {"name": "image.reel"}, + {"name": "list.reel"}, + {"name": "loader.reel"}, + {"name": "loading-panel.reel"}, + {"name": "loading.reel"}, + {"name": "number-input.reel"}, + {"name": "popup", + "children": [{"name": "alert.reel"}, {"name": "confirm.reel"}, {"name": "notifier.reel"}, {"name": "popup.reel"}] + }, + {"name": "progress.reel"}, + {"name": "radio-button.reel"}, + {"name": "range-input.reel"}, + {"name": "repetition.reel"}, + {"name": "scroll-bars.reel"}, + {"name": "scroller.reel"}, + {"name": "scrollview.reel"}, + {"name": "select-input.reel"}, + {"name": "slot.reel"}, + {"name": "substitution.reel"}, + {"name": "tabs.reel"}, + {"name": "textarea.reel"}, + {"name": "textfield.reel"}, + {"name": "toggle-button.reel"}, + {"name": "toggle-switch.reel"}, + {"name": "video-player.reel", + "children": [{"name": "images"}]} + ] + }] + }, + + {"name": "montage-google", + "children": [ + {"name": "feed-reader", + "children": [ + {"name": "feed-entry.reel"}, + {"name": "feed-reader.reel"} + ] + }, + {"name": "map.reel"}, + {"name": "picasa-carousel.reel", + "children": [ + {"name": "image.reel"} + ] + }, + {"name": "youtube-channel.reel"}, + {"name": "youtube-player.reel"} + ] + } + ], "files": [ - "core/bitfield.js", - "core/converter/bytes-converter.js", - "core/converter/converter.js", - "core/converter/currency-converter.js", - "core/converter/date-converter.js", - "core/converter/lower-case-converter.js", - "core/converter/new-line-to-br-converter.js", - "core/converter/number-converter.js", - "core/converter/trim-converter.js", - "core/converter/upper-case-converter.js", - "core/core.js", - "core/deserializer.js", - "core/enum.js", - "core/event/action-event-listener.js", - "core/event/binding.js", - "core/event/event-manager.js", - "core/event/mutable-event.js", - "core/exception.js", - "core/gate.js", - "core/geometry/cubic-bezier.js", - "core/geometry/point.js", - "core/jshint.js", - "core/logger.js", - "core/next-tick.js", - "core/promise.js", - "core/serializer.js", - "core/shim/array.js", - "core/shim/immediate.js", - "core/shim/string.js", - "core/shim/structures.js", - "core/shim/weak-map.js", - "core/shim.js", - "core/state-chart.js", - "core/undo-manager.js", - "core/url.js", - "core/uuid.js", - "data/blueprint.js", - "data/context.js", - "data/controllistener.js", - "data/ldapaccess/ldapblueprint.js", - "data/ldapaccess/ldapobjectid.js", - "data/ldapaccess/ldapselectorevaluator.js", - "data/ldapaccess/ldapstore.js", - "data/nosqlaccess/nosqlblueprint.js", - "data/nosqlaccess/nosqlobjectid.js", - "data/nosqlaccess/nosqlselectorevaluator.js", - "data/nosqlaccess/nosqlstore.js", - "data/objectid.js", - "data/objectproperty.js", - "data/pledge.js", - "data/query.js", - "data/restaccess/restblueprint.js", - "data/restaccess/restobjectid.js", - "data/restaccess/restselectorevaluator.js", - "data/restaccess/reststore.js", - "data/restriction.js", - "data/selector.js", - "data/sqlaccess/sqlblueprint.js", - "data/sqlaccess/sqlobjectid.js", - "data/sqlaccess/sqlselectorevaluator.js", - "data/sqlaccess/sqlstore.js", - "data/store.js", - "data/transactionid.js", - "examples/feed-reader/images/07-map-marker.png", - "examples/feed-reader/images/10-medical.png", - "examples/feed-reader/images/100-coffee.png", - "examples/feed-reader/images/107-widescreen.png", - "examples/feed-reader/images/125-food.png", - "examples/feed-reader/images/142-wine-bottle.png", - "examples/feed-reader/images/34-coffee.png", - "examples/feed-reader/images/35-shopping.png", - "examples/feed-reader/images/38-airplane.png", - "examples/feed-reader/images/41-picture-frame.png", - "examples/feed-reader/images/47-fuel.png", - "examples/feed-reader/images/48-fork-and-knife.png", - "examples/feed-reader/images/80-shopping-cart.png", - "examples/feed-reader/images/87-wine-glass.png", - "examples/feed-reader/images/88-beer-mug.png", - "examples/feed-reader/index.html", - "examples/feed-reader/main.reel/main.html", - "examples/feed-reader/main.reel/main.js", - "examples/feed-reader/map-example.reel/main.css", - "examples/feed-reader/map-example.reel/main.html", - "examples/feed-reader/map-example.reel/main.js", - "examples/feed-reader/package.json", - "examples/youtube-channel-example/index.html", - "examples/youtube-channel-example/package.json", - "examples/youtube-channel-example/style.css", - "examples/youtube-channel-example/youtube-channel-example.js", - "montage.js", - "node.js", - "package.json", - "require/browser.js", - "require/node.js", - "require/require.js", - "service/service.js", - "ui/anchor.reel/anchor.js", - "ui/application.js", - "ui/bluemoon/button-group.reel/button-group.css", - "ui/bluemoon/button-group.reel/button-group.html", - "ui/bluemoon/button-group.reel/button-group.js", - "ui/bluemoon/button.reel/button.css", - "ui/bluemoon/button.reel/button.html", - "ui/bluemoon/button.reel/button.js", - "ui/bluemoon/checkbox.reel/checkbox.css", - "ui/bluemoon/checkbox.reel/checkbox.html", - "ui/bluemoon/checkbox.reel/checkbox.js", - "ui/bluemoon/checkbox.reel/checkmark-dark-disabled.svg", - "ui/bluemoon/checkbox.reel/checkmark-dark.svg", - "ui/bluemoon/checkbox.reel/checkmark-light-disabled.svg", - "ui/bluemoon/checkbox.reel/checkmark.svg", - "ui/bluemoon/progress.reel/progress.css", - "ui/bluemoon/progress.reel/progress.html", - "ui/bluemoon/progress.reel/progress.js", - "ui/bluemoon/progress.reel/rule.png", - "ui/bluemoon/progress.reel/scroll.png", - "ui/bluemoon/slider.reel/slider.css", - "ui/bluemoon/slider.reel/slider.html", - "ui/bluemoon/slider.reel/slider.js", - "ui/bluemoon/textarea.reel/textarea.css", - "ui/bluemoon/textarea.reel/textarea.html", - "ui/bluemoon/textarea.reel/textarea.js", - "ui/bluemoon/textfield.reel/textfield.css", - "ui/bluemoon/textfield.reel/textfield.html", - "ui/bluemoon/textfield.reel/textfield.js", - "ui/bluemoon/toggle.reel/toggle.css", - "ui/bluemoon/toggle.reel/toggle.html", - "ui/bluemoon/toggle.reel/toggle.js", - "ui/button.reel/button.js", - "ui/check-input.js", - "ui/checkbox.reel/checkbox.js", - "ui/component-group.reel/component-group.js", - "ui/component-placeholder.reel/component-placeholder.js", - "ui/component.js", - "ui/composer/composer.js", - "ui/composer/long-press-composer.js", - "ui/composer/press-composer.js", - "ui/composer/swipe-composer.js", - "ui/composer/translate-composer.js", - "ui/condition.reel/condition.js", - "ui/controller/array-controller.js", - "ui/controller/media-controller.js", - "ui/controller/object-controller.js", - "ui/controller/paged-array-controller.js", - "ui/date-input.reel/date-input.js", - "ui/dom.js", - "ui/dynamic-text.reel/dynamic-text.js", - "ui/editable-text.js", - "ui/flow-path-cubic.js", - "ui/flow-path-lerp.js", - "ui/flow-path-linear.js", - "ui/flow-path-sigmoid.js", - "ui/flow-path.js", - "ui/flow.reel/flow.html", - "ui/flow.reel/flow.js", - "ui/image.reel/image.js", - "ui/list.reel/list.html", - "ui/list.reel/list.js", - "ui/loader.reel/loader.js", - "ui/loading-panel.reel/loading-panel.css", - "ui/loading-panel.reel/loading-panel.html", - "ui/loading-panel.reel/loading-panel.js", - "ui/loading.reel/loading-0.svg", - "ui/loading.reel/loading-1.svg", - "ui/loading.reel/loading-2.svg", - "ui/loading.reel/loading-3.svg", - "ui/loading.reel/loading-4.svg", - "ui/loading.reel/loading-5.svg", - "ui/loading.reel/loading-bg.svg", - "ui/loading.reel/loading.css", - "ui/loading.reel/loading.html", - "ui/loading.reel/loading.js", - "ui/native-control.js", - "ui/nearest-neighbor-component-search.js", - "ui/number-input.reel/number-input.js", - "ui/popup/alert.reel/alert.css", - "ui/popup/alert.reel/alert.html", - "ui/popup/alert.reel/alert.js", - "ui/popup/confirm.reel/confirm.css", - "ui/popup/confirm.reel/confirm.html", - "ui/popup/confirm.reel/confirm.js", - "ui/popup/notifier.reel/notifier.css", - "ui/popup/notifier.reel/notifier.html", - "ui/popup/notifier.reel/notifier.js", - "ui/popup/popup.reel/popup.css", - "ui/popup/popup.reel/popup.html", - "ui/popup/popup.reel/popup.js", - "ui/progress.reel/progress.js", - "ui/radio-button.reel/radio-button.js", - "ui/range-input.reel/range-input.js", - "ui/repetition.reel/repetition.js", - "ui/scroll-bars.reel/scroll-bars.html", - "ui/scroll-bars.reel/scroll-bars.js", - "ui/scroller.reel/scroller.html", - "ui/scroller.reel/scroller.js", - "ui/scrollview.reel/scrollview.js", - "ui/select-input.reel/select-input.js", - "ui/skeleton/range-input.reel/range-input.css", - "ui/skeleton/range-input.reel/range-input.html", - "ui/skeleton/range-input.reel/range-input.js", - "ui/slot.reel/slot.js", - "ui/substitution.reel/substitution.js", - "ui/tabs.reel/tabs.css", - "ui/tabs.reel/tabs.html", - "ui/tabs.reel/tabs.js", - "ui/template.js", - "ui/text-input.js", - "ui/textarea.reel/textarea.js", - "ui/textfield.reel/textfield.js", - "ui/toggle-button.reel/toggle-button.js", - "ui/toggle-switch.reel/toggle-switch.css", - "ui/toggle-switch.reel/toggle-switch.html", - "ui/toggle-switch.reel/toggle-switch.js", - "ui/video-player.reel/images/fullscreen-enter.png", - "ui/video-player.reel/images/fullscreen-exit.png", - "ui/video-player.reel/images/pause.png", - "ui/video-player.reel/images/play.png", - "ui/video-player.reel/images/volume-down.png", - "ui/video-player.reel/images/volume-up.png", - "ui/video-player.reel/video-player.css", - "ui/video-player.reel/video-player.html", - "ui/video-player.reel/video-player.js" + "montage/core/bitfield.js", + "montage/core/converter/bytes-converter.js", + "montage/core/converter/converter.js", + "montage/core/converter/currency-converter.js", + "montage/core/converter/date-converter.js", + "montage/core/converter/lower-case-converter.js", + "montage/core/converter/new-line-to-br-converter.js", + "montage/core/converter/number-converter.js", + "montage/core/converter/trim-converter.js", + "montage/core/converter/upper-case-converter.js", + "montage/core/core.js", + "montage/core/deserializer.js", + "montage/core/enum.js", + "montage/core/event/action-event-listener.js", + "montage/core/event/binding.js", + "montage/core/event/event-manager.js", + "montage/core/event/mutable-event.js", + "montage/core/exception.js", + "montage/core/gate.js", + "montage/core/geometry/cubic-bezier.js", + "montage/core/geometry/point.js", + "montage/core/jshint.js", + "montage/core/logger.js", + "montage/core/next-tick.js", + "montage/core/promise.js", + "montage/core/serializer.js", + "montage/core/shim/array.js", + "montage/core/shim/immediate.js", + "montage/core/shim/string.js", + "montage/core/shim/structures.js", + "montage/core/shim/weak-map.js", + "montage/core/shim.js", + "montage/core/state-chart.js", + "montage/core/undo-manager.js", + "montage/core/url.js", + "montage/core/uuid.js", + "montage/data/blueprint.js", + "montage/data/context.js", + "montage/data/controllistener.js", + "montage/data/ldapaccess/ldapblueprint.js", + "montage/data/ldapaccess/ldapobjectid.js", + "montage/data/ldapaccess/ldapselectorevaluator.js", + "montage/data/ldapaccess/ldapstore.js", + "montage/data/nosqlaccess/nosqlblueprint.js", + "montage/data/nosqlaccess/nosqlobjectid.js", + "montage/data/nosqlaccess/nosqlselectorevaluator.js", + "montage/data/nosqlaccess/nosqlstore.js", + "montage/data/objectid.js", + "montage/data/objectproperty.js", + "montage/data/pledge.js", + "montage/data/query.js", + "montage/data/restaccess/restblueprint.js", + "montage/data/restaccess/restobjectid.js", + "montage/data/restaccess/restselectorevaluator.js", + "montage/data/restaccess/reststore.js", + "montage/data/restriction.js", + "montage/data/selector.js", + "montage/data/sqlaccess/sqlblueprint.js", + "montage/data/sqlaccess/sqlobjectid.js", + "montage/data/sqlaccess/sqlselectorevaluator.js", + "montage/data/sqlaccess/sqlstore.js", + "montage/data/store.js", + "montage/data/transactionid.js", + "montage/montage.js", + "montage/node.js", + "montage/package.json", + "montage/require/browser.js", + "montage/require/node.js", + "montage/require/require.js", + "montage/service/service.js", + "montage/ui/anchor.reel/anchor.js", + "montage/ui/application.js", + "montage/ui/autocomplete/autocomplete.reel/autocomplete.css", + "montage/ui/autocomplete/autocomplete.reel/autocomplete.html", + "montage/ui/autocomplete/autocomplete.reel/autocomplete.js", + "montage/ui/autocomplete/autocomplete.reel/loading.gif", + "montage/ui/autocomplete/results-list.reel/results-list.css", + "montage/ui/autocomplete/results-list.reel/results-list.html", + "montage/ui/autocomplete/results-list.reel/results-list.js", + "montage/ui/bluemoon/button-group.reel/button-group.css", + "montage/ui/bluemoon/button-group.reel/button-group.html", + "montage/ui/bluemoon/button-group.reel/button-group.js", + "montage/ui/bluemoon/button.reel/button.css", + "montage/ui/bluemoon/button.reel/button.html", + "montage/ui/bluemoon/button.reel/button.js", + "montage/ui/bluemoon/checkbox.reel/checkbox.css", + "montage/ui/bluemoon/checkbox.reel/checkbox.html", + "montage/ui/bluemoon/checkbox.reel/checkbox.js", + "montage/ui/bluemoon/checkbox.reel/checkmark-dark-disabled.svg", + "montage/ui/bluemoon/checkbox.reel/checkmark-dark.svg", + "montage/ui/bluemoon/checkbox.reel/checkmark-light-disabled.svg", + "montage/ui/bluemoon/checkbox.reel/checkmark.svg", + "montage/ui/bluemoon/progress.reel/progress.css", + "montage/ui/bluemoon/progress.reel/progress.html", + "montage/ui/bluemoon/progress.reel/progress.js", + "montage/ui/bluemoon/progress.reel/rule.png", + "montage/ui/bluemoon/progress.reel/scroll.png", + "montage/ui/bluemoon/slider.reel/slider.css", + "montage/ui/bluemoon/slider.reel/slider.html", + "montage/ui/bluemoon/slider.reel/slider.js", + "montage/ui/bluemoon/textarea.reel/textarea.css", + "montage/ui/bluemoon/textarea.reel/textarea.html", + "montage/ui/bluemoon/textarea.reel/textarea.js", + "montage/ui/bluemoon/textfield.reel/textfield.css", + "montage/ui/bluemoon/textfield.reel/textfield.html", + "montage/ui/bluemoon/textfield.reel/textfield.js", + "montage/ui/bluemoon/toggle.reel/toggle.css", + "montage/ui/bluemoon/toggle.reel/toggle.html", + "montage/ui/bluemoon/toggle.reel/toggle.js", + "montage/ui/button.reel/button.js", + "montage/ui/check-input.js", + "montage/ui/checkbox.reel/checkbox.js", + "montage/ui/component-group.reel/component-group.js", + "montage/ui/component-placeholder.reel/component-placeholder.js", + "montage/ui/component.js", + "montage/ui/composer/composer.js", + "montage/ui/composer/press-composer.js", + "montage/ui/composer/swipe-composer.js", + "montage/ui/composer/translate-composer.js", + "montage/ui/condition.reel/condition.js", + "montage/ui/controller/array-controller.js", + "montage/ui/controller/media-controller.js", + "montage/ui/controller/object-controller.js", + "montage/ui/controller/paged-array-controller.js", + "montage/ui/date-input.reel/date-input.js", + "montage/ui/dom.js", + "montage/ui/dynamic-text.reel/dynamic-text.js", + "montage/ui/dynamic-element.reel/dynamic-element.js", + "montage/ui/editable-text.js", + "montage/ui/flow-bezier-spline.js", + "montage/ui/flow-path-cubic.js", + "montage/ui/flow-path-lerp.js", + "montage/ui/flow-path-linear.js", + "montage/ui/flow-path-sigmoid.js", + "montage/ui/flow-path.js", + "montage/ui/flow.reel/flow.html", + "montage/ui/flow.reel/flow.js", + "montage/ui/image.reel/image.js", + "montage/ui/list.reel/list.html", + "montage/ui/list.reel/list.js", + "montage/ui/loader.reel/loader.js", + "montage/ui/loading-panel.reel/loading-panel.css", + "montage/ui/loading-panel.reel/loading-panel.html", + "montage/ui/loading-panel.reel/loading-panel.js", + "montage/ui/loading.reel/loading-0.svg", + "montage/ui/loading.reel/loading-1.svg", + "montage/ui/loading.reel/loading-2.svg", + "montage/ui/loading.reel/loading-3.svg", + "montage/ui/loading.reel/loading-4.svg", + "montage/ui/loading.reel/loading-5.svg", + "montage/ui/loading.reel/loading-bg.svg", + "montage/ui/loading.reel/loading.css", + "montage/ui/loading.reel/loading.html", + "montage/ui/loading.reel/loading.js", + "montage/ui/native-control.js", + "montage/ui/nearest-neighbor-component-search.js", + "montage/ui/number-input.reel/number-input.js", + "montage/ui/popup/alert.reel/alert.css", + "montage/ui/popup/alert.reel/alert.html", + "montage/ui/popup/alert.reel/alert.js", + "montage/ui/popup/confirm.reel/confirm.css", + "montage/ui/popup/confirm.reel/confirm.html", + "montage/ui/popup/confirm.reel/confirm.js", + "montage/ui/popup/notifier.reel/notifier.css", + "montage/ui/popup/notifier.reel/notifier.html", + "montage/ui/popup/notifier.reel/notifier.js", + "montage/ui/popup/popup.reel/popup.css", + "montage/ui/popup/popup.reel/popup.html", + "montage/ui/popup/popup.reel/popup.js", + "montage/ui/progress.reel/progress.js", + "montage/ui/radio-button.reel/radio-button.js", + "montage/ui/range-input.reel/range-input.js", + "montage/ui/repetition.reel/repetition.js", + "montage/ui/scroll-bars.reel/scroll-bars.html", + "montage/ui/scroll-bars.reel/scroll-bars.js", + "montage/ui/scroller.reel/scroller.html", + "montage/ui/scroller.reel/scroller.js", + "montage/ui/scrollview.reel/scrollview.js", + "montage/ui/select-input.reel/select-input.js", + "montage/ui/skeleton/range-input.reel/range-input.css", + "montage/ui/skeleton/range-input.reel/range-input.html", + "montage/ui/skeleton/range-input.reel/range-input.js", + "montage/ui/slot.reel/slot.js", + "montage/ui/substitution.reel/substitution.js", + "montage/ui/tabs.reel/tabs.css", + "montage/ui/tabs.reel/tabs.html", + "montage/ui/tabs.reel/tabs.js", + "montage/ui/template.js", + "montage/ui/text-input.js", + "montage/ui/textarea.reel/textarea.js", + "montage/ui/textfield.reel/textfield.js", + "montage/ui/toggle-button.reel/toggle-button.js", + "montage/ui/toggle-switch.reel/toggle-switch.css", + "montage/ui/toggle-switch.reel/toggle-switch.html", + "montage/ui/toggle-switch.reel/toggle-switch.js", + "montage/ui/video-player.reel/images/fullscreen-enter.png", + "montage/ui/video-player.reel/images/fullscreen-exit.png", + "montage/ui/video-player.reel/images/pause.png", + "montage/ui/video-player.reel/images/play.png", + "montage/ui/video-player.reel/images/volume-down.png", + "montage/ui/video-player.reel/images/volume-up.png", + "montage/ui/video-player.reel/video-player.css", + "montage/ui/video-player.reel/video-player.html", + "montage/ui/video-player.reel/video-player.js", + "montage-google/feed-reader/feed-entry.reel/feed-entry.html", + "montage-google/feed-reader/feed-entry.reel/feed-entry.js", + "montage-google/feed-reader/feed-reader.reel/feed-reader.html", + "montage-google/feed-reader/feed-reader.reel/feed-reader.js", + "montage-google/map.reel/map.js", + "montage-google/map.reel/map.html", + "montage-google/map.reel/map.css", + "montage-google/picasa-carousel.reel/image.reel/image.html", + "montage-google/picasa-carousel.reel/image.reel/image.js", + "montage-google/picasa-carousel.reel/picasa-carousel.css", + "montage-google/picasa-carousel.reel/picasa-carousel.html", + "montage-google/picasa-carousel.reel/picasa-carousel.js", + "montage-google/youtube-channel.reel/youtube-channel.html", + "montage-google/youtube-channel.reel/youtube-channel.js", + "montage-google/youtube-player.reel/youtube-player.html", + "montage-google/youtube-player.reel/youtube-player.js", + "montage-google/package.json" ] } \ No newline at end of file diff --git a/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html b/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html new file mode 100644 index 00000000..6b2e51e2 --- /dev/null +++ b/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html @@ -0,0 +1,89 @@ + + + + + Feed Entry + + + + + + + +
+ +

+

+
+ + + diff --git a/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.js b/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.js new file mode 100644 index 00000000..8fdb3860 --- /dev/null +++ b/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.js @@ -0,0 +1,21 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +var Montage = require("montage").Montage, + Component = require("montage/ui/component").Component; + +exports.FeedEntry = Montage.create(Component, { + + _entry: {value: null}, + entry: { + get: function() { + return this._entry; + }, + set: function(value) { + this._entry = value; + } + } + +}); diff --git a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html new file mode 100644 index 00000000..28c0ed1f --- /dev/null +++ b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html @@ -0,0 +1,79 @@ + + + + + Feed Reader + + + + + + + + + + +
+ +
+
+
+ + +
+ + + diff --git a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js new file mode 100644 index 00000000..47a831eb --- /dev/null +++ b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js @@ -0,0 +1,179 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +var Montage = require("montage").Montage, + Component = require("montage/ui/component").Component; + +exports.FeedReader = Montage.create(Component, { + + didCreate: { + value: function() { + var self = this; + var apiInit = function() { + console.log('google api initialized'); + + google.load("feeds", "1", { + callback: function() { + console.log('google feeds api loaded'); + self.needsDraw = true; + window.initGoogleAPI = null; + } + }); + }; + + // set up a global function + window.initGoogleAPI = apiInit; + } + }, + + _feedURL: {value: null}, + feedURL: { + get: function() { + return this._feedURL; + }, + set: function(value) { + this._feedURL = value; + // execute the search and get the entries + this._fetchFeed(); + } + }, + + // time in ms between slides + interval: {value: 3, distinct: true}, + + maxEntries: {value: 10, distinct: true}, + + entries: {value: null}, + + _feedDisplayMode: {value: null}, + feedDisplayMode: { + get: function() { + return this._feedDisplayMode; + }, + set: function(value) { + + this.removeEntryAnimation(); + this._feedDisplayMode = value; + + this.addEntryAnimation(); + } + }, + + + feedEntryTimer: {enumerable: false, value: null}, + + + activeFeedEntry: {value: null}, + _activeIndex: {value: null}, + activeIndex: { + get: function() { + return this._activeIndex || 0; + }, + set: function(index) { + if(this.entries) { + var max = this.entries.length-1; + if(index > max) { + index = 0; + } + if(index < 0) { + index = 0; + } + this._activeIndex = index; + this.activeFeedEntry = this.entries[this._activeIndex]; + } else { + this._activeIndex = 0; + } + } + }, + + _fetchFeed: { + value: function() { + + var url = this.feedURL; + var feed = new google.feeds.Feed(url); + feed.setNumEntries(10); + + var self = this; + self.entries = []; + + feed.load(function(result) { + self.removeEntryAnimation(); + if(result.error) { + self.entries = []; + } else { + //console.log('entries: ', result.feed.entries); + self.addEntryAnimation(); + self.entries = result.feed.entries; + self.activeIndex = 0; + + } + + + }); + } + }, + + addEntryAnimation: { + value: function() { + var self = this; + if("animation" == this.feedDisplayMode) { + this.element.addEventListener('webkitAnimationStart', this); + this.element.addEventListener('webkitAnimationIteration', this); + this.element.addEventListener('webkitAnimationEnd', this); + } else { + // timer + this.feedEntryTimer = setInterval(function() { + self.activeIndex = self.activeIndex + 1; + }, (this.interval * 1000)); + } + } + }, + + removeEntryAnimation: { + value: function() { + if("animation" == this.feedDisplayMode) { + this.element.removeEventListener('webkitAnimationStart', this); + this.element.removeEventListener('webkitAnimationIteration', this); + this.element.removeEventListener('webkitAnimationEnd', this); + + } else { + if(this.feedEntryTimer) { + window.clearInterval(this.feedEntryTimer); + } + } + } + }, + + handleWebkitAnimationStart: { + value: function() { + console.log('animation start'); + } + }, + + handleWebkitAnimationIteration: { + value: function() { + console.log('animation iteration'); + this.activeIndex = this.activeIndex + 1; + } + }, + + handleWebkitAnimationEnd: { + value: function() { + console.log('animation end'); + } + }, + + prepareForDraw: { + value: function() { + } + }, + + draw: { + value: function() { + + } + } + +}); diff --git a/node_modules/montage-google/map.reel/map.css b/node_modules/montage-google/map.reel/map.css new file mode 100644 index 00000000..45307593 --- /dev/null +++ b/node_modules/montage-google/map.reel/map.css @@ -0,0 +1,9 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +.montage-google-map { + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/node_modules/montage-google/map.reel/map.html b/node_modules/montage-google/map.reel/map.html new file mode 100644 index 00000000..fee3a38e --- /dev/null +++ b/node_modules/montage-google/map.reel/map.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + +
+
MAP
+
+ + + diff --git a/node_modules/montage-google/map.reel/map.js b/node_modules/montage-google/map.reel/map.js new file mode 100644 index 00000000..3ba7fff7 --- /dev/null +++ b/node_modules/montage-google/map.reel/map.js @@ -0,0 +1,289 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +/** + + @requires montage/core/core + @requires montage/ui/component +*/ +var Montage = require("montage").Montage, + Component = require("montage/ui/component").Component; + +/** + @class module:"montage/ui/google/map.reel".Map + @extends module:montage/ui/component.Component + */ +var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/toggle-switch.reel".ToggleSwitch# */ { + + didCreate: { + value: function() { + var self = this; + window.initialize = function initialize() { + console.log('google maps api loaded'); + self._mapLoaded = true; + self._geoCoder = new google.maps.Geocoder(); + self.needsDraw = true; + }; + } + }, + + _geoCoder: {value: null}, + + // HTMLElement to load the Map into + mapEl: {value: null}, + + _mapLoaded: { + enumerable: false, + value: false + }, + _map: { + enumerable: false, + value: false + }, + + // Sunnyvale, CA + defaultLatLng: { + value: {lat: 37.37, lng: -122.03} + }, + + _latLng: { + value: this.defaultLatLng, + distinct: true + }, + latLng: { + get: function() { + return this._latLng; + }, + set: function(value) { + if(value) { + this._latLng = value; + // refresh the map + this.needsDraw = true; + } + } + }, + + // {lat, lon} Or a String representing the location (eg: Paris, France) + center: { + get: function() { + return this._center; + }, + set: function(value) { + if(value) { + var self = this, geocoder = this._geoCoder; + this._center = value; + if(this._mapLoaded) { + + if(String.isString(value)) { + // geocode + geocoder.geocode( { 'address': value}, function(results, status) { + if (status == google.maps.GeocoderStatus.OK) { + var loc = results[0].geometry.location; + self.latLng = {lat: loc.lat(), lng: loc.lng()}; + } else { + console.log('Geocode was not successful : ' + status); + } + }); + } else if(value.lat && value.lng) { + this.latLng = value; + } else { + // default location + this.latLng = this.defaultLatLng; + } + + } + + } + + } + }, + + category: { + get: function() { + return this._category; + }, + set: function(value) { + console.log('category set: ' + value); + if(value) { + this._category = value; + this._getPlaces(this._category); + this.needsDraw = true; + } + } + }, + + trafficLayer: {value: null}, + _traffic: {value: null}, + traffic: { + get: function() { + return this._traffic; + }, + set: function(value) { + if(value !== this._traffic) { + this._traffic = value; + this.needsDraw = true; + } + } + }, + + + zoomValue: { + value: 8 + }, + + __places: {value: null}, + _places: { + get: function() { + return this.__places; + }, + set: function(value) { + if(value) { + this.__places = value; + this.needsDraw = true; + } + } + }, + + _getPlaces: { + value: function(type, keyword) { + var self = this; + var request = { + location: new window.google.maps.LatLng(this.latLng.lat, this.latLng.lng), + radius: 5000, + types: [type] + }; + if(!this._infoWindow) { + this._infoWindow = new google.maps.InfoWindow(); + } + var service = new google.maps.places.PlacesService(this._map); + service.search(request, function(results, status) { + console.log('got places for ', self.category, status, results); + if (status == google.maps.places.PlacesServiceStatus.OK) { + self._places = results; + } else { + self._places = []; + } + }); + } + }, + + _infoWindow: {value: null}, + _markers: {value: null}, + _createMarker: { + value: function(place) { + var placeLoc = place.geometry.location, map = this._map; + var icon, image; + switch(this.category) { + case 'restaurant': + icon = '48-fork-and-knife.png'; + break; + case 'hospital': + icon = '10-medical.png'; + break; + case 'bar': + icon = '88-beer-mug.png'; + break; + case 'grocery_or_supermarket': + icon = '80-shopping-cart.png'; + break; + case 'museum': + icon = '41-picture-frame.png'; + break; + case 'gas_station': + icon = '47-fuel.png'; + break; + }; + if(icon) { + image = new google.maps.MarkerImage('images/' + icon); + } + var options = { + map: map, + position: place.geometry.location + }; + if(image) { + options.icon = image; + } + + var marker = new google.maps.Marker(options); + if(!this._markers) { + this._markers = []; + } + this._markers.push(marker); + + var infoWindow = this._infoWindow; + google.maps.event.addListener(marker, 'click', function() { + infoWindow.setContent(place.name + '
' + place.vicinity); + infoWindow.open(map, this); + }); + } + }, + + _removeAllMarkers: { + value: function() { + if(this._markers && this._markers.length > 0) { + var i=0, len = this._markers.length; + for(i; i< len; i++) { + this._markers[i].setMap(null); + } + this._markers = []; + } + } + }, + + +/** + Description TODO + @function + */ + draw: { + enumerable: false, + value: function () { + + if(this._mapLoaded) { + var latLng = this.latLng || this.defaultLatLng; + if(!this._map) { + var map; + var myOptions = { + zoom: this.zoomValue, + center: new window.google.maps.LatLng(latLng.lat, latLng.lng), + mapTypeId: window.google.maps.MapTypeId.ROADMAP + }; + + this._map = new window.google.maps.Map(this.mapEl, myOptions); + } else { + var map = this._map; + map.setZoom(10); + var latLng = new window.google.maps.LatLng(latLng.lat, latLng.lng); + map.setCenter(latLng); + var marker = new google.maps.Marker({ + map: map, + position: latLng + }); + + var places = this._places; + if(places && places.length > 0) { + map.setZoom(13); + this._removeAllMarkers(); + for (var i = 0; i < places.length; i++) { + this._createMarker(places[i]); + } + } + + if(this.traffic === true) { + this.trafficLayer = new google.maps.TrafficLayer(); + this.trafficLayer.setMap(map); + } else { + if(this.trafficLayer) { + this.trafficLayer.setMap(null); + } + } + } + + } + + //window.google.maps.event.addDomListener(window, 'load', initialize); + } + } +}); diff --git a/node_modules/montage-google/package.json b/node_modules/montage-google/package.json new file mode 100755 index 00000000..9cb96270 --- /dev/null +++ b/node_modules/montage-google/package.json @@ -0,0 +1,14 @@ + +{ + "name": "google-components", + "version": "0.1.0", + "description": "Google specific components", + "main": "google", + "mappings": { + "montage" : "../montage/" + }, + "dependency": { + "montage" : "0.8" + } + +} \ No newline at end of file diff --git a/node_modules/montage-google/picasa-carousel.reel/image.reel/image.html b/node_modules/montage-google/picasa-carousel.reel/image.reel/image.html new file mode 100644 index 00000000..368bd059 --- /dev/null +++ b/node_modules/montage-google/picasa-carousel.reel/image.reel/image.html @@ -0,0 +1,39 @@ + + + + + + + + +
+ + diff --git a/node_modules/montage-google/picasa-carousel.reel/image.reel/image.js b/node_modules/montage-google/picasa-carousel.reel/image.reel/image.js new file mode 100644 index 00000000..d5b9363e --- /dev/null +++ b/node_modules/montage-google/picasa-carousel.reel/image.reel/image.js @@ -0,0 +1,20 @@ +var Montage = require("montage").Montage, + Component = require("montage/ui/component").Component; + +var Image = exports.Image = Montage.create(Component, { + + _src: {value: null}, + + src: { + set: function(value) { + this._src = value; + this.needsDraw = true; + } + }, + + draw: { + value: function() { + this._element.style.backgroundImage = "url(" + this._src + ")"; + } + } +}); diff --git a/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.css b/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.css new file mode 100755 index 00000000..2494614b --- /dev/null +++ b/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.css @@ -0,0 +1,41 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +.montage-google-picasa-carousel { + width: 100%; + height: 100%; + display: -webkit-box; + -webkit-box-pack: center; + -webkit-box-align: center; + display: -moz-box; + -moz-box-pack: center; + -moz-box-align: center; + display: -ms-box; + -ms-box-pack: center; + -ms-box-align: center; + display: box; + box-pack: center; + box-align: center; +} + +.montage-google-picasa-carousel .flow { + width: 100%; + height: 100%; +/* top: 0; + left: 0; + right: 0; + bottom: 0; +*/ + background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#bbb)); +} +.image { + position: absolute; + /*-top: 50%;*/ + -webkit-box-shadow: 0 0 35px rgba(0,0,0,.5); +} + +.montage-google-picasa-carousel .flow .montage-flow-repetition { + margin: 10% 0; +} diff --git a/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html b/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html new file mode 100755 index 00000000..f7c8a766 --- /dev/null +++ b/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html @@ -0,0 +1,169 @@ + + + + + + + +