created map prompt
This commit is contained in:
parent
fcdc6d57b2
commit
cd4474a0f0
7 changed files with 81 additions and 16 deletions
BIN
app/assets/images/homepage-bg.png
Normal file
BIN
app/assets/images/homepage-bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 KiB |
|
@ -2826,6 +2826,7 @@ var Canvas;
|
|||
this.getPos(true);
|
||||
this.translateOffsetX = this.translateOffsetY = 0;
|
||||
this.scaleOffsetX = this.scaleOffsetY = 1;
|
||||
|
||||
for(var i=0, l=this.canvases.length; i<l; i++) {
|
||||
this.canvases[i].resize(width, height);
|
||||
}
|
||||
|
@ -3025,6 +3026,7 @@ var Canvas;
|
|||
canvas.height = height;
|
||||
styles.width = width + "px";
|
||||
styles.height = height + "px";
|
||||
|
||||
//small ExCanvas fix
|
||||
if(!supportsCanvas) {
|
||||
this.translateToCenter(size);
|
||||
|
@ -3035,6 +3037,7 @@ var Canvas;
|
|||
this.translateOffsetY = 0;
|
||||
this.scaleOffsetX =
|
||||
this.scaleOffsetY = 1;
|
||||
|
||||
this.clear();
|
||||
this.viz.resize(width, height, this);
|
||||
},
|
||||
|
|
|
@ -186,13 +186,18 @@ Metamaps.GlobalUI.CreateMap = {
|
|||
// bind permission changer events on the createMap form
|
||||
$('.permIcon').unbind().bind('click', self.switchPermission);
|
||||
},
|
||||
closeSuccess: function () {
|
||||
$('#mapCreatedSuccess').fadeOut(300, function(){
|
||||
$(this).remove();
|
||||
});
|
||||
},
|
||||
generateSuccessMessage: function (id) {
|
||||
var stringStart = "Success! Do you want to <br> <a href='/maps/";
|
||||
var stringStart = "<div id='mapCreatedSuccess'><h6>SUCCESS!</h6>Your map has been created. Do you want to: <a id='mapGo' href='/maps/";
|
||||
stringStart += id;
|
||||
stringStart += "'>Go to your new map?</a>";
|
||||
stringStart += "<br>or<br><a href='#' onclick='Metamaps.GlobalUI.closeLightbox(); return false;'>Stay on this ";
|
||||
stringStart += "' onclick='Metamaps.GlobalUI.CreateMap.closeSuccess();'>Go to your new map</a>";
|
||||
stringStart += "<span>OR</span><a id='mapStay' href='#' onclick='Metamaps.GlobalUI.CreateMap.closeSuccess(); return false;'>Stay on this ";
|
||||
var page = Metamaps.Active.Map ? 'map' : 'page';
|
||||
var stringEnd = "?</a>";
|
||||
var stringEnd = "</a></div>";
|
||||
return stringStart + page + stringEnd;
|
||||
},
|
||||
switchPermission: function () {
|
||||
|
@ -239,9 +244,8 @@ Metamaps.GlobalUI.CreateMap = {
|
|||
// TODO add error message
|
||||
});
|
||||
|
||||
if (Metamaps.GlobalUI.lightbox === 'forkmap') {
|
||||
form.html('Working...');
|
||||
}
|
||||
Metamaps.GlobalUI.closeLightbox();
|
||||
Metamaps.GlobalUI.notifyUser('Working...');
|
||||
},
|
||||
success: function (model) {
|
||||
var self = Metamaps.GlobalUI.CreateMap;
|
||||
|
@ -249,9 +253,9 @@ Metamaps.GlobalUI.CreateMap = {
|
|||
var formId = Metamaps.GlobalUI.lightbox === 'forkmap' ? '#fork_map' : '#new_map';
|
||||
var form = $(formId);
|
||||
|
||||
form.html(self.generateSuccessMessage(model.id));
|
||||
Metamaps.GlobalUI.clearNotify();
|
||||
$('#wrapper').append(self.generateSuccessMessage(model.id));
|
||||
|
||||
$('#lightbox_main').css('margin-top', '-' + ($('#lightbox_main').height() / 2) + 'px');
|
||||
},
|
||||
reset: function (id) {
|
||||
var self = Metamaps.GlobalUI.CreateMap;
|
||||
|
|
|
@ -937,6 +937,7 @@ Metamaps.JIT = {
|
|||
Metamaps.Create.newTopic.open();
|
||||
} else if (!Metamaps.Mouse.didPan) {
|
||||
// SINGLE CLICK, no pan
|
||||
Metamaps.Filter.close();
|
||||
Metamaps.TopicCard.hideCard();
|
||||
Metamaps.SynapseCard.hideCard();
|
||||
Metamaps.Create.newTopic.hide();
|
||||
|
|
|
@ -2512,10 +2512,6 @@ Metamaps.Filter = {
|
|||
var self = Metamaps.Filter;
|
||||
|
||||
$('.sidebarFilterIcon').click(self.toggleBox);
|
||||
$('.sidebarFilterBox').click(function(event){
|
||||
event.stopPropagation();
|
||||
});
|
||||
$('body').click(self.close);
|
||||
|
||||
$('.sidebarFilterBox .showAllMetacodes').click(self.filterNoMetacodes);
|
||||
$('.sidebarFilterBox .showAllSynapses').click(self.filterNoSynapses);
|
||||
|
|
|
@ -70,8 +70,8 @@ body,
|
|||
.wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
.wrapper.homePage {
|
||||
/*background: url('mm-homepage-bg-image.png') no-repeat center -249px;*/
|
||||
.homePage .famousYield {
|
||||
background: url(homepage-bg.png) no-repeat -515px -40px;
|
||||
}
|
||||
.wrapper.mapPage {
|
||||
overflow: hidden;
|
||||
|
@ -853,6 +853,67 @@ label[for="user_remember_me"] {
|
|||
}
|
||||
/* end Save To New Map */
|
||||
|
||||
/* Map Created */
|
||||
#mapCreatedSuccess {
|
||||
width: 332px;
|
||||
height: 182px;
|
||||
top: 50%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-top: -107px;
|
||||
margin-left: -182px;
|
||||
background-color: #E0E0E0;
|
||||
padding: 16px;
|
||||
box-shadow: 0px 3px 3px rgba(0,0,0,0.12), 0 3px 3px rgba(0,0,0,0.24);
|
||||
font-size: 14px;
|
||||
font-family: 'din-regular', helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#mapCreatedSuccess h6 {
|
||||
font-size: 18px;
|
||||
font-family: 'din-medium', helvetica, sans-serif;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
#mapCreatedSuccess span {
|
||||
margin: 8px auto;
|
||||
display: block;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#mapCreatedSuccess a {
|
||||
display: block;
|
||||
width: 220px;
|
||||
height: 14px;
|
||||
padding: 16px 0;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
box-shadow: 0px 1px 1.5px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
font-family: 'din-medium', helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#mapGo {
|
||||
background-color: #4fc059;
|
||||
margin-top: 16px;
|
||||
}
|
||||
#mapGo:hover {
|
||||
background-color: #49ad4e;
|
||||
}
|
||||
#mapStay {
|
||||
background-color: #a354cd;
|
||||
}
|
||||
#mapStay:hover {
|
||||
background-color: #9150bc;
|
||||
}
|
||||
|
||||
|
||||
/* Filter */
|
||||
|
||||
.sidebarFilter {
|
||||
|
|
|
@ -5,7 +5,7 @@ var t = {};
|
|||
t.logoContent = '<div class="logo">METAMAPS</div>';
|
||||
t.logoContent += '<ul class="bottomLinks">';
|
||||
t.logoContent += '<li onclick="Metamaps.GlobalUI.openLightbox(\'about\')">About / </li>';
|
||||
t.logoContent += '<li><a href="/maps/blank">Terms of Use / </a></li>';
|
||||
t.logoContent += '<li><a href="http://metamaps.cc/maps/331" data-bypass="true">Terms of Use / </a></li>';
|
||||
t.logoContent += '<li onclick="Metamaps.GlobalUI.openLightbox(\'colophon\')">Colophon / </li>';
|
||||
t.logoContent += '<li onclick="Metamaps.GlobalUI.openLightbox(\'getInvolved\')">Get Involved!</li>';
|
||||
t.logoContent += '</ul>';
|
||||
|
|
Loading…
Reference in a new issue