Skip to content

Commit

Permalink
Used workaround for Firefox jquery error. Polymer/polymer#686
Browse files Browse the repository at this point in the history
  • Loading branch information
jmatsushita committed Aug 5, 2014
1 parent 9c6dfe5 commit 150ed7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions elements/openoil-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,14 @@ <h5>Zoom</h5>
case "nigeria_production":
case "nigeria_service":
case "nigeria_snepco":
$(this.$.iilab_graph).show();
$(this.$.iilab_map).hide();
this.$.iilab_graph.style.display = "block";
this.$.iilab_map.style.display = "none";
this.fire('stats', {i: window.location.href, t:"l"});
this.fire('load-graph-query', {id: id});
break;
case "bp_map":
$(this.$.iilab_graph).hide();
$(this.$.iilab_map).show();
this.$.iilab_graph.style.display = "none";
this.$.iilab_map.style.display = "block";
this.$.iilab_map.loadMap();
this.fire('stats', {i: window.location.href, t:"l"});
break;
Expand Down
2 changes: 1 addition & 1 deletion index-concat.html
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ <h5>Zoom</h5>
<!--<core-card id="core_card" layout vertical></core-card>-->
</core-scaffold>
</template>
<script>Polymer("openoil-app",{url:window.location.href=="http://localhost/"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/",zoom:0,zoomSlider:0,published:{title:""},ready:function(){this.addEventListener("set-slider",this.sliderSet);document.addEventListener("stats",this.statsReq)},domReady:function(){console.log(window.location.hash.replace(/^#/,""));this.url=window.location.href.split("/")[2]=="localhost"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/";this.loadURL(window.location.hash.replace(/^#/,""))},clickQuery:function(e){window.location.hash="#"+e.target.id;this.loadURL(e.target.id);this.fire("stats",{i:e.target.id,t:"c"})},loadURL:function(id){switch(id){case"bp_plc_1":case"bp_plc_2":case"bp_plc_3":case"nigeria_production":case"nigeria_service":case"nigeria_snepco":$(this.$.iilab_graph).show();$(this.$.iilab_map).hide();this.fire("stats",{i:window.location.href,t:"l"});this.fire("load-graph-query",{id:id});break;case"bp_map":$(this.$.iilab_graph).hide();$(this.$.iilab_map).show();this.$.iilab_map.loadMap();this.fire("stats",{i:window.location.href,t:"l"});break;default:this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle();break}},statsReq:function(e){document.querySelector("openoil-app").shadowRoot.querySelector("#xhr").request({url:"/",params:{i:e.detail.i,t:e.detail.t,_:(new Date).getTime()}})},homeClick:function(){window.location.hash="#";this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle()},buttonClick:function(e,detail,sender){},searchTextChanged:function(o,n){},stringsTextChanged:function(o,n){},zoomOut:function(){this.$.iilab_graph.zoom=0},sliderSet:function(e){console.log("openoil-app zoomChanged");console.log(e.detail.zoom);this.zoomSlider=Math.round(Math.log(e.detail.zoom)*20)/20},zoomSliderChanged:function(o,n){console.log("openoil-app zoomSliderChanged");console.log(n);console.log(Math.exp(Math.round(n*20)/20));this.fire("zoom-slider",{zoom:Math.exp(Math.round(n*20)/20)})}});</script>
<script>Polymer("openoil-app",{url:window.location.href=="http://localhost/"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/",zoom:0,zoomSlider:0,published:{title:""},ready:function(){this.addEventListener("set-slider",this.sliderSet);document.addEventListener("stats",this.statsReq)},domReady:function(){console.log(window.location.hash.replace(/^#/,""));this.url=window.location.href.split("/")[2]=="localhost"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/";this.loadURL(window.location.hash.replace(/^#/,""))},clickQuery:function(e){window.location.hash="#"+e.target.id;this.loadURL(e.target.id);this.fire("stats",{i:e.target.id,t:"c"})},loadURL:function(id){switch(id){case"bp_plc_1":case"bp_plc_2":case"bp_plc_3":case"nigeria_production":case"nigeria_service":case"nigeria_snepco":this.$.iilab_graph.style.display="block";this.$.iilab_map.style.display="none";this.fire("stats",{i:window.location.href,t:"l"});this.fire("load-graph-query",{id:id});break;case"bp_map":this.$.iilab_graph.style.display="none";this.$.iilab_map.style.display="block";this.$.iilab_map.loadMap();this.fire("stats",{i:window.location.href,t:"l"});break;default:this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle();break}},statsReq:function(e){document.querySelector("openoil-app").shadowRoot.querySelector("#xhr").request({url:"/",params:{i:e.detail.i,t:e.detail.t,_:(new Date).getTime()}})},homeClick:function(){window.location.hash="#";this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle()},buttonClick:function(e,detail,sender){},searchTextChanged:function(o,n){},stringsTextChanged:function(o,n){},zoomOut:function(){this.$.iilab_graph.zoom=0},sliderSet:function(e){console.log("openoil-app zoomChanged");console.log(e.detail.zoom);this.zoomSlider=Math.round(Math.log(e.detail.zoom)*20)/20},zoomSliderChanged:function(o,n){console.log("openoil-app zoomSliderChanged");console.log(n);console.log(Math.exp(Math.round(n*20)/20));this.fire("zoom-slider",{zoom:Math.exp(Math.round(n*20)/20)})}});</script>
</polymer-element></div><style>html,body{height:100%;margin:0;font-family:RobotoDraft,sans-serif}body.loading #loading{display:block;position:fixed;top:calc(50% - 18px);left:calc(50% - 200px);font-size:36px;color:#2a3e92;-webkit-animation:pulsate 2s ease-in-out;-webkit-animation-iteration-count:infinite;width:400px;text-align:center;z-index:10}@keyframes pulsate{0%{transform:scale(1,1);opacity:.1}50%{transform:scale(1.1,1.1);opacity:1}100%{transform:scale(1,1);opacity:0}}@-webkit-keyframes pulsate{0%{-webkit-transform:scale(1,1);opacity:.1}50%{-webkit-transform:scale(1.1,1.1);opacity:1}100%{-webkit-transform:scale(1,1);opacity:0}}</style></head>

<body unresolved="" touch-action="auto"><openoil-app></openoil-app><div id="loading">Please wait...</div></body>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ <h5>Zoom</h5>
<!--<core-card id="core_card" layout vertical></core-card>-->
</core-scaffold>
</template>
<script>Polymer("openoil-app",{url:window.location.href=="http://localhost/"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/",zoom:0,zoomSlider:0,published:{title:""},ready:function(){this.addEventListener("set-slider",this.sliderSet);document.addEventListener("stats",this.statsReq)},domReady:function(){console.log(window.location.hash.replace(/^#/,""));this.url=window.location.href.split("/")[2]=="localhost"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/";this.loadURL(window.location.hash.replace(/^#/,""))},clickQuery:function(e){window.location.hash="#"+e.target.id;this.loadURL(e.target.id);this.fire("stats",{i:e.target.id,t:"c"})},loadURL:function(id){switch(id){case"bp_plc_1":case"bp_plc_2":case"bp_plc_3":case"nigeria_production":case"nigeria_service":case"nigeria_snepco":$(this.$.iilab_graph).show();$(this.$.iilab_map).hide();this.fire("stats",{i:window.location.href,t:"l"});this.fire("load-graph-query",{id:id});break;case"bp_map":$(this.$.iilab_graph).hide();$(this.$.iilab_map).show();this.$.iilab_map.loadMap();this.fire("stats",{i:window.location.href,t:"l"});break;default:this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle();break}},statsReq:function(e){document.querySelector("openoil-app").shadowRoot.querySelector("#xhr").request({url:"/",params:{i:e.detail.i,t:e.detail.t,_:(new Date).getTime()}})},homeClick:function(){window.location.hash="#";this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle()},buttonClick:function(e,detail,sender){},searchTextChanged:function(o,n){},stringsTextChanged:function(o,n){},zoomOut:function(){this.$.iilab_graph.zoom=0},sliderSet:function(e){console.log("openoil-app zoomChanged");console.log(e.detail.zoom);this.zoomSlider=Math.round(Math.log(e.detail.zoom)*20)/20},zoomSliderChanged:function(o,n){console.log("openoil-app zoomSliderChanged");console.log(n);console.log(Math.exp(Math.round(n*20)/20));this.fire("zoom-slider",{zoom:Math.exp(Math.round(n*20)/20)})}});</script>
<script>Polymer("openoil-app",{url:window.location.href=="http://localhost/"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/",zoom:0,zoomSlider:0,published:{title:""},ready:function(){this.addEventListener("set-slider",this.sliderSet);document.addEventListener("stats",this.statsReq)},domReady:function(){console.log(window.location.hash.replace(/^#/,""));this.url=window.location.href.split("/")[2]=="localhost"?"http://db.localhost:7474/db/data/":"https://neo4j.openoil.net/db/data/";this.loadURL(window.location.hash.replace(/^#/,""))},clickQuery:function(e){window.location.hash="#"+e.target.id;this.loadURL(e.target.id);this.fire("stats",{i:e.target.id,t:"c"})},loadURL:function(id){switch(id){case"bp_plc_1":case"bp_plc_2":case"bp_plc_3":case"nigeria_production":case"nigeria_service":case"nigeria_snepco":this.$.iilab_graph.style.display="block";this.$.iilab_map.style.display="none";this.fire("stats",{i:window.location.href,t:"l"});this.fire("load-graph-query",{id:id});break;case"bp_map":this.$.iilab_graph.style.display="none";this.$.iilab_map.style.display="block";this.$.iilab_map.loadMap();this.fire("stats",{i:window.location.href,t:"l"});break;default:this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle();break}},statsReq:function(e){document.querySelector("openoil-app").shadowRoot.querySelector("#xhr").request({url:"/",params:{i:e.detail.i,t:e.detail.t,_:(new Date).getTime()}})},homeClick:function(){window.location.hash="#";this.fire("stats",{i:window.location.href,t:"h"});this.$.dialog.toggle()},buttonClick:function(e,detail,sender){},searchTextChanged:function(o,n){},stringsTextChanged:function(o,n){},zoomOut:function(){this.$.iilab_graph.zoom=0},sliderSet:function(e){console.log("openoil-app zoomChanged");console.log(e.detail.zoom);this.zoomSlider=Math.round(Math.log(e.detail.zoom)*20)/20},zoomSliderChanged:function(o,n){console.log("openoil-app zoomSliderChanged");console.log(n);console.log(Math.exp(Math.round(n*20)/20));this.fire("zoom-slider",{zoom:Math.exp(Math.round(n*20)/20)})}});</script>
</polymer-element></div><style>html,body{height:100%;margin:0;font-family:RobotoDraft,sans-serif}body.loading #loading{display:block;position:fixed;top:calc(50% - 18px);left:calc(50% - 200px);font-size:36px;color:#2a3e92;-webkit-animation:pulsate 2s ease-in-out;-webkit-animation-iteration-count:infinite;width:400px;text-align:center;z-index:10}@keyframes pulsate{0%{transform:scale(1,1);opacity:.1}50%{transform:scale(1.1,1.1);opacity:1}100%{transform:scale(1,1);opacity:0}}@-webkit-keyframes pulsate{0%{-webkit-transform:scale(1,1);opacity:.1}50%{-webkit-transform:scale(1.1,1.1);opacity:1}100%{-webkit-transform:scale(1,1);opacity:0}}</style></head>

<body unresolved="" touch-action="auto"><openoil-app></openoil-app><div id="loading">Please wait...</div></body>
Expand Down

0 comments on commit 150ed7c

Please sign in to comment.