Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Updated files inconjunction with wv components changes

ZachTRice9f13f2d6bf5a
diff --git a/web/index.html b/web/index.html
index 36e3662f6..45afdbdc8 100644
--- a/web/index.html
+++ b/web/index.html
@@ -277,6 +277,8 @@
<div data-role="content">
<ul id="wv-toolbar">
+ <li id="wv-dialog-button" class="wv-toolbar-button"></li>
+ <li id="wv-share-button" class="wv-toolbar-button"></li>
<li id="wv-link-button" class="wv-toolbar-button"></li>
<li id="wv-proj-button" class="wv-toolbar-button"></li>
<li id="wv-image-button" class="wv-toolbar-button"></li>
@@ -405,5 +407,35 @@
<div id="wv-image-right" class="wv-image-coords"></div>
<div id="wv-image-bottom" class="wv-image-coords"></div>
<div id="wv-image-left" class="wv-image-coords"></div>
+
+ <style>
+ /*.backdrop {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 100%;
+ height: 100%;
+ z-index: 9998;
+ background: rgba(0, 0, 0, 0.3);
+ }*/
+ </style>
+
+ <div class="backdrop"></div>
+
+ <style>
+ /*.modal {
+ width: 300px;
+ height: 300px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin-top: -150px;
+ margin-left: -150px;
+ z-index: 9999;
+ background: yellow;
+ }*/
+ </style>
+
+ <div class="modal"></div>
</body>
</html>
diff --git a/web/js/link/wv.link.ui.js b/web/js/link/wv.link.ui.js
index 4cd2dc05e..04f09a24d 100644
--- a/web/js/link/wv.link.ui.js
+++ b/web/js/link/wv.link.ui.js
@@ -17,10 +17,23 @@ wv.link.ui = wv.link.ui || function(models, config) {
var self = {};
var id = "wv-link-button";
var selector = "#" + id;
+ var widgetFactory = React.createFactory(WVC.Share);
+ var widgetCreate = React.createElement(WVC.Share);
+
+ var dialogCreate = React.createElement(WVC.Dialog);
var $button;
var $label;
var init = function() {
+
+ self.reactComponent = ReactDOM.render(dialogCreate, $('#wv-dialog-button')[0]);
+
+ var Widget;
+ Widget = self.initWidget();
+ //mount react component
+ self.reactComponent = ReactDOM.render(widgetCreate, $('#wv-share-button')[0]);
+
+
$button = $("<input></input>")
.attr("type", "checkbox")
.attr("id", "wv-link-button-check");
@@ -49,6 +62,12 @@ wv.link.ui = wv.link.ui || function(models, config) {
models.link.events.on("update", replaceHistoryState);
};
+ // NOTE: Not being used yet... until I set variables within react component
+ self.initWidget = function() {
+ return widgetFactory({
+ });
+ };
+
//Calls toQueryString to fetch updated state and returns URL
var replaceHistoryState = _.throttle(function() {
if ( wv.util.browser.history ) {
@@ -58,6 +77,7 @@ wv.link.ui = wv.link.ui || function(models, config) {
}, 2000, {leading: true, trailing: true});
self.show = function() {
+
var $dialog = wv.ui.getDialog();
var item = "<div id='wv-link' >" +
"<input type='text' value='' name='permalink_content' id='permalink_content' readonly/>";
@@ -130,7 +150,7 @@ wv.link.ui = wv.link.ui || function(models, config) {
models.link.events.on("update", updateLink);
$dialog.dialog({
- dialogClass: "wv-panel",
+ dialogClass: "wv-panel wv-link-panel",
title: "Copy this link to share:",
show: { effect: "slide", direction: "up" },
width: 300,