Reverted layout modifications

This commit is contained in:
benweet 2014-05-09 19:01:03 +01:00
parent 858afa997d
commit d4e10d4590
5 changed files with 59 additions and 16 deletions

View File

@ -1,4 +1,3 @@
/*global gapi, google */
define([ define([
"underscore", "underscore",
"jquery", "jquery",
@ -33,7 +32,7 @@ define([
return task.chain(); return task.chain();
} }
$.ajax({ $.ajax({
url: settings.teamserverURL + '/ping', url: constants.TEAM_SERVER_URL + 'ping',
timeout: constants.AJAX_TIMEOUT timeout: constants.AJAX_TIMEOUT
}).fail(function(jqXHR) { }).fail(function(jqXHR) {
var error = { var error = {

View File

@ -117,6 +117,10 @@
class="icon-provider-gdrive"></i> Open from Google Drive<br><small>(3rd account)</small></a></li> class="icon-provider-gdrive"></i> Open from Google Drive<br><small>(3rd account)</small></a></li>
<li><a href="#" class="submenu-sync-gdriveter action-sync-export-dialog-gdriveter"><i <li><a href="#" class="submenu-sync-gdriveter action-sync-export-dialog-gdriveter"><i
class="icon-provider-gdrive"></i> Save on Google Drive<br><small>(3rd account)</small></a></li> class="icon-provider-gdrive"></i> Save on Google Drive<br><small>(3rd account)</small></a></li>
<li><a href="#" class="submenu-sync-teamserver action-sync-import-teamserver"><i
class="icon-provider-stackedit"></i> Open from Team Server</a></li>
<li><a href="#" class="submenu-sync-teamserver action-sync-export-teamserver"><i
class="icon-provider-stackedit"></i> Save on Team Server</a></li>
</ul> </ul>
</div> </div>
<a href="#" data-toggle="collapse" data-target=".collapse-publish-on" <a href="#" data-toggle="collapse" data-target=".collapse-publish-on"

View File

@ -518,6 +518,9 @@ define([
previewButtons.initHammer(true); previewButtons.initHammer(true);
previewButtons.adjustPosition = function() { previewButtons.adjustPosition = function() {
if(!previewButtons.isDragged) {
return;
}
var minX = -windowSize.width + previewButtons.elt.offsetWidth; var minX = -windowSize.width + previewButtons.elt.offsetWidth;
var minY = -windowSize.height + previewButtons.elt.offsetHeight; var minY = -windowSize.height + previewButtons.elt.offsetHeight;
this.x < minX && (this.x = minX); this.x < minX && (this.x = minX);
@ -530,6 +533,8 @@ define([
var buttonsInitialCoord; var buttonsInitialCoord;
previewButtons.hammer.on('dragstart', function() { previewButtons.hammer.on('dragstart', function() {
previewButtons.isDragged = true;
previewButtons.$elt.removeClass('animate');
wrapperL2.$elt.addClass('dragging'); wrapperL2.$elt.addClass('dragging');
buttonsInitialCoord = { buttonsInitialCoord = {
x: previewButtons.x, x: previewButtons.x,
@ -602,6 +607,36 @@ define([
previewButtons.y = previewButtonsOffset.y; previewButtons.y = previewButtonsOffset.y;
previewButtons.applyCss(); previewButtons.applyCss();
function openPreviewButtons() {
clearTimeout(closeTimeoutId);
if(!previewButtons.isDragged) {
previewButtons.x = previewButtonsOffset.x;
previewButtons.applyCss();
}
}
var closeTimeoutId;
var dropdownOpen = false;
function closePreviewButtons() {
clearTimeout(closeTimeoutId);
closeTimeoutId = setTimeout(function() {
if(!previewButtons.isDragged && !dropdownOpen) {
previewButtons.$elt.addClass('animate');
previewButtons.x = previewButtonsOffset.x + previewButtons.elt.offsetWidth;
previewButtons.applyCss();
}
}, 3000);
}
closePreviewButtons();
previewButtons.$elt.hover(openPreviewButtons, closePreviewButtons).on('show.bs.dropdown', function() {
dropdownOpen = true;
}).on('hidden.bs.dropdown', function() {
dropdownOpen = false;
closePreviewButtons();
});
_.each(previewButtons.elt.querySelectorAll('.btn-group'), function(btnGroupElt) { _.each(previewButtons.elt.querySelectorAll('.btn-group'), function(btnGroupElt) {
var $btnGroupElt = $(btnGroupElt); var $btnGroupElt = $(btnGroupElt);
$btnGroupElt.on('shown.bs.dropdown', function() { $btnGroupElt.on('shown.bs.dropdown', function() {

View File

@ -56,7 +56,6 @@ define([
'</html>' '</html>'
].join(""), ].join(""),
pdfPageSize: 'A4', pdfPageSize: 'A4',
teamserverURL: constants.TEAM_SERVER_URL,
sshProxy: constants.SSH_PROXY_URL, sshProxy: constants.SSH_PROXY_URL,
extensionSettings: {} extensionSettings: {}
}; };

View File

@ -244,6 +244,8 @@ a {
.list-group-item { .list-group-item {
padding: 10px 15px; padding: 10px 15px;
border-left-width: 0;
border-right-width: 0;
margin-bottom: 0; margin-bottom: 0;
.list-group & { .list-group & {
border-radius: 0; border-radius: 0;
@ -251,9 +253,24 @@ a {
a&:hover, a&:hover,
a&:focus { a&:focus {
color: darken(@secondary, 30%); color: darken(@secondary, 30%);
border-top-color: @list-group-hover-border-color; border-color: @list-group-hover-border-color;
border-bottom-color: @list-group-hover-border-color;
} }
.checkbox {
float: right;
margin: 0;
padding: 0;
cursor: pointer;
input {
cursor: pointer;
margin: 0 16px;
height: @input-height-slim;
}
}
}
.form-group {
margin-bottom: 1px;
padding: 5px;
} }
.text-danger:hover { .text-danger:hover {
@ -765,17 +782,6 @@ a {
font-size: 15px; font-size: 15px;
border-top-color: @modal-content-separator-color; border-top-color: @modal-content-separator-color;
} }
.checkbox {
float: right;
margin: 0;
padding: 0;
cursor: pointer;
input {
cursor: pointer;
margin: 0 16px;
height: @input-height-slim;
}
}
.input-rename { .input-rename {
width: 220px; width: 220px;
height: @input-height-slim; height: @input-height-slim;