Remove animation on extension buttons

This commit is contained in:
benweet 2014-05-06 22:57:44 +01:00
parent 2e5d6d7b51
commit 858afa997d
8 changed files with 25 additions and 59 deletions

View File

@ -104,7 +104,7 @@ define([
connect(task);
authenticate(task);
task.onRun(function() {
var url = settings.teamserverURL + '/repo/' + repo + '/changes';
var url = settings.teamserverURL + '/repo/' + repo + '/changes/';
var type = 'GET';
if(lastChangeId) {
url += lastChangeId;

View File

@ -2,6 +2,6 @@
<i class="icon-code"></i>
</button>
<div class="dropdown-menu pull-right">
<h3>HTML code</h3>
<h2>HTML code</h2>
<textarea id="input-html-code" class="form-control"></textarea>
</div>

View File

@ -2,16 +2,16 @@
<i class="icon-help-circled"></i>
</button>
<div class="dropdown-menu pull-right">
<h3>Markdown syntax</h3>
<h2>Markdown syntax</h2>
<hr>
<div class="markdown-syntax">
<h4>Phrase Emphasis</h4>
<h3>Phrase Emphasis</h3>
<pre><code>*italic* **bold**
_italic_ __bold__
</code></pre>
<h4>Links</h4>
<h3>Links</h3>
<p>Inline:</p>
@ -26,7 +26,7 @@ else in the doc, define the link:
[id]: http://example.com/ "Title"
</code></pre>
<h4>Images</h4>
<h3>Images</h3>
<p>Inline (titles are optional):</p>
@ -40,7 +40,7 @@ else in the doc, define the link:
[id]: /url/to/img.jpg "Title"
</code></pre>
<h4>Headers</h4>
<h3>Headers</h3>
<p>Setext-style:</p>
@ -60,7 +60,7 @@ Header 2
###### Header 6
</code></pre>
<h4>Lists</h4>
<h3>Lists</h3>
<p>Ordered, without paragraphs:</p>
@ -89,7 +89,7 @@ Header 2
* Cunning
</code></pre>
<h4>Blockquotes</h4>
<h3>Blockquotes</h3>
<pre><code>&gt; Email-style angle brackets
&gt; are used for blockquotes.
@ -102,7 +102,7 @@ Header 2
&gt; * Etc.
</code></pre>
<h4>Code Spans</h4>
<h3>Code Spans</h3>
<pre><code>`&lt;code&gt;` spans are delimited
by backticks.
@ -111,7 +111,7 @@ You can include literal backticks
like `` `this` ``.
</code></pre>
<h4>Preformatted Code Blocks</h4>
<h3>Preformatted Code Blocks</h3>
<p>Indent every line of a code block by at least 4 spaces or 1 tab.</p>
@ -121,7 +121,7 @@ like `` `this` ``.
code block.
</code></pre>
<h4>Horizontal Rules</h4>
<h3>Horizontal Rules</h3>
<p>Three or more dashes or asterisks:</p>
@ -132,7 +132,7 @@ like `` `this` ``.
- - - -
</code></pre>
<h4>Manual Line Breaks</h4>
<h3>Manual Line Breaks</h3>
<p>End a line with two or more spaces:</p>

View File

@ -3,7 +3,7 @@
<span class="value"></span>
</button>
<div class="dropdown-menu pull-right stat-button-dropdown">
<h3>Statistics</h3>
<h2>Statistics</h2>
<hr>
<div class="stat">
<div>

View File

@ -2,7 +2,7 @@
<i class="icon-list"></i>
</button>
<div class="dropdown-menu pull-right">
<h3>Table of contents</h3>
<h2>Table of contents</h2>
<hr>
<div class="table-of-contents">
</div>

View File

@ -518,9 +518,6 @@ define([
previewButtons.initHammer(true);
previewButtons.adjustPosition = function() {
if(!previewButtons.isDragged) {
return;
}
var minX = -windowSize.width + previewButtons.elt.offsetWidth;
var minY = -windowSize.height + previewButtons.elt.offsetHeight;
this.x < minX && (this.x = minX);
@ -533,8 +530,6 @@ define([
var buttonsInitialCoord;
previewButtons.hammer.on('dragstart', function() {
previewButtons.isDragged = true;
previewButtons.$elt.removeClass('animate');
wrapperL2.$elt.addClass('dragging');
buttonsInitialCoord = {
x: previewButtons.x,
@ -607,36 +602,6 @@ define([
previewButtons.y = previewButtonsOffset.y;
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) {
var $btnGroupElt = $(btnGroupElt);
$btnGroupElt.on('shown.bs.dropdown', function() {

View File

@ -114,6 +114,7 @@ h6 { font-size: @title-base-size * 0.85; }
h1, h2, h3, h4, h5, h6 {
margin: 1.3em 0;
font-weight: 300;
}
pre {

View File

@ -130,14 +130,14 @@
@popover-arrow-outer-color: @secondary-border-color;
@popover-title-bg: @transparent;
@alert-border-radius: 0;
@label-warning-bg: spin(darken(@logo-yellow, 4%), -6);
@label-danger-bg: spin(darken(@logo-orange, 4%), -4);
@state-warning-text: spin(darken(@logo-yellow, 14%), -6);
@state-warning-bg: fade(spin(@logo-yellow, -6), 12%);
@state-warning-border: fade(spin(@logo-yellow, -6), 24%);
@state-danger-text: spin(darken(@logo-orange, 18%), -4);
@state-danger-bg: fade(spin(@logo-orange, -4), 10%);
@state-danger-border: fade(spin(@logo-orange, -4), 20%);
@label-warning-bg: spin(darken(@logo-yellow, 4%), -10);
@state-warning-text: spin(darken(@logo-yellow, 14%), -10);
@state-warning-bg: fade(spin(@logo-yellow, -10), 12%);
@state-warning-border: fade(spin(@logo-yellow, -10), 24%);
@label-danger-bg: spin(darken(@logo-orange, 4%), -8);
@state-danger-text: spin(darken(@logo-orange, 18%), -8);
@state-danger-bg: fade(spin(@logo-orange, -8), 10%);
@state-danger-border: fade(spin(@logo-orange, -8), 20%);
body {
@ -1371,7 +1371,7 @@ div.dropdown-menu, {
color: @link-hover-color;
}
h1, h2, h3, h4, h5, h6 {
margin: 1em 0;
margin: 0.8em 0;
}
}