]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
adds twipsy js to regular index for positioning
authorJacob Thornton <jacobthornton@gmail.com>
Sat, 10 Sep 2011 21:52:45 +0000 (14:52 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Sat, 10 Sep 2011 21:52:45 +0000 (14:52 -0700)
bootstrap-1.3.0.css
bootstrap-1.3.0.min.css
docs/assets/css/docs.css
docs/assets/js/application.js
docs/index.html
lib/patterns.less

index bf117ca81debdea6b652bdfa85b4bc2b4b65e507..3e5842749822080a502835520563643793a5483a 100644 (file)
@@ -6,7 +6,7 @@
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Designed and built with all the love in the world @twitter by @mdo and @fat.
- * Date: Sat Sep 10 13:17:50 PDT 2011
+ * Date: Sat Sep 10 14:46:06 PDT 2011
  */
 /* Reset.less
  * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here      that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
@@ -2030,6 +2030,12 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
   -moz-opacity: 0.8;
   opacity: 0.8;
 }
+.twipsy.fade.in {
+  filter: alpha(opacity=80);
+  -khtml-opacity: 0.8;
+  -moz-opacity: 0.8;
+  opacity: 0.8;
+}
 .twipsy.above .twipsy-arrow {
   bottom: 0;
   left: 50%;
index c4427af4faa3ab31bec0394246996af1f7f320d4..5ef9a22c0826e338a4d500cc188e7ca4b76d0d43 100644 (file)
@@ -280,7 +280,8 @@ button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;
 .modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;text-align:right;}.modal-footer:before,.modal-footer:after{display:table;content:"";}
 .modal-footer:after{clear:both;}
 .modal-footer .btn{margin-left:5px;}
-.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
+.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
 .twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
 .twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
 .twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
index 536446c234da6950393f414daa4dafb18c32f299..187fc7984c8bd89ddd31b05c23ed5ea395d3b95c 100644 (file)
@@ -46,7 +46,7 @@ section > .row {
   font-weight: bold;
 }
 #masthead {
-  margin-top: 40px;
+  padding-top: 40px;
 }
 #masthead h1,
 #masthead p {
@@ -175,6 +175,7 @@ section > .row {
           box-shadow: 0 1px 2px rgba(0,0,0,.075);
 }
 .diagram {
+  height: 140px;
   padding: 4px;
 }
 .mini-layout {
index db59c79f9c64180bc3710797ee4e084cd2799eec..86eefa89d1ce303d0ff366d2049914b28066cd66 100644 (file)
@@ -42,42 +42,15 @@ $(document).ready(function(){
   // POSITION STATIC TWIPSIES
   // ========================
 
-  $('.twipsies.well a').each(function () {
-    var type = this.title
-      , $anchor = $(this)
-      , $twipsy = $('.twipsy.' + type)
-
-      , twipsy = {
-          width: $twipsy.width() + 10
-        , height: $twipsy.height() + 10
-        }
-
-      , anchor = {
-          position: $anchor.position()
-        , width: $anchor.width()
-        , height: $anchor.height()
-        }
-
-      , offset = {
-          above: {
-            top: anchor.position.top - twipsy.height
-          , left: anchor.position.left + (anchor.width/2) - (twipsy.width/2)
-          }
-        , below: {
-            top: anchor.position.top + anchor.height
-          , left: anchor.position.left + (anchor.width/2) - (twipsy.width/2)
-          }
-        , left: {
-            top: anchor.position.top + (anchor.height/2) - (twipsy.height/2)
-          , left: anchor.position.left - twipsy.width - 5
-          }
-        , right: {
-            top: anchor.position.top + (anchor.height/2) - (twipsy.height/2)
-          , left: anchor.position.left + anchor.width + 5
-          }
-      }
-
-    $twipsy.css(offset[type])
-  });
+  $(".twipsies a").each(function () {
+     $(this)
+      .twipsy({
+        live: false
+      , placement: $(this).attr('title')
+      , trigger: 'manual'
+      , offset: 2
+      })
+      .trigger('twipsy:show')
+    })
 
 });
index 42c548ea3f6ce50e49ef95455220ee858cc530ee..224347ca8d55057152989310fb9848ae1738a4fb 100644 (file)
@@ -22,6 +22,7 @@
     <script src="assets/js/google-code-prettify/prettify.js"></script>
     <script>$(function () { prettyPrint() })</script>
     <script src="../js/bootstrap-dropdown.js"></script>
+    <script src="../js/bootstrap-twipsy.js"></script>
     <script src="assets/js/application.js"></script>
     <script src="assets/js/application-scrollspy.js"></script>
 
           <p class="muted" style="margin-bottom: 0">
 Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> veritatis aut iste perspiciatis iste voluptas natus illo quasi odit aut natus consequuntur consequuntur, aut natus illo voluptatem odit perspiciatis laudantium rem doloremque totam voluptas. <a href="#" title="right">Voluptasdicta</a> eaque beatae aperiam ut enim voluptatem explicabo explicabo, voluptas quia odit fugit accusantium totam totam architecto explicabo sit quasi fugit fugit, totam doloremque unde sunt <a href="#" title="left">sed</a> dicta quae accusantium fugit voluptas nemo voluptas voluptatem <a href="#" title="above">rem</a> quae aut veritatis quasi quae.
           </p>
-          <div class="twipsy below">
-            <div class="twipsy-arrow"></div>
-            <div class="twipsy-inner">below!</div>
-          </div>
-          <div class="twipsy right">
-            <div class="twipsy-arrow"></div>
-            <div class="twipsy-inner">right!</div>
-          </div>
-          <div class="twipsy left">
-            <div class="twipsy-arrow"></div>
-            <div class="twipsy-inner">left!</div>
-          </div>
-          <div class="twipsy above">
-            <div class="twipsy-arrow"></div>
-            <div class="twipsy-inner">above!</div>
-          </div>
         </div>
       </div>
     </div>
@@ -1437,15 +1422,15 @@ Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> verita
            </tr>
            <tr>
              <td><a href="./javascript.html#dropdowns">bootstrap-dropdown.js</a></td>
-             <td>This plugin is for adding dropdown to the bootstrap nav.</td>
+             <td>This plugin is for adding dropdowns to the bootstrap topbar or tabbed navigations.</td>
            </tr>
            <tr>
              <td><a href="./javascript.html#tabs">bootstrap-tabs.js</a></td>
-             <td>This plugin adds quick, dynamic tab and pill functionality.</td>
+             <td>This plugin adds quick, dynamic tab and pill functionality for cycling through local content.</td>
            </tr>
            <tr>
              <td><a href="./javascript.html#twipsy">bootstrap-twipsy.js</a></td>
-             <td>Based on the excellent jQuery.tipsy plugin written by Jason Frame; twipsy is an updated version, which doesn't rely on images, uses css3 for animations, and data-attributes for title storage!</td>
+             <td>Based on the excellent jQuery.tipsy plugin written by Jason Frame; twipsy is an updated version, which doesn't rely on images, uses css3 for animations, and data-attributes for local title storage!</td>
            </tr>
            <tr>
              <td><a href="./javascript.html#popover">bootstrap-popover.js</a></td>
index 0fb7193c2c0c9ca81f15beb01f70cee8de55fa37..3e0f56209bf06fe7476a7226ebf39708649f7a8c 100644 (file)
@@ -829,6 +829,9 @@ input[type=submit].btn {
   font-size: 11px;
   z-index: 1000;
   .opacity(80);
+  &.fade.in {
+    .opacity(80);
+  }
   &.above .twipsy-arrow   { #popoverArrow > .above(); }
   &.left .twipsy-arrow    { #popoverArrow > .left(); }
   &.below .twipsy-arrow   { #popoverArrow > .below(); }