Browse files

clean up white space/tabs

  • Loading branch information...
1 parent 231f574 commit 1c208b6e1f3fc02f7a2cd4e782d7c5cd479fb251 @clarkbox clarkbox committed Jan 24, 2012
Showing with 45 additions and 45 deletions.
  1. +33 −33 demos/popup/popup-menu-table.html
  2. +12 −12 ui/jquery.ui.popup.js
View
66 demos/popup/popup-menu-table.html
@@ -19,15 +19,15 @@
$(this).popup("close");
}
};
-
- $(".myMenu").menu(selected).popup({ trigger: $(".myButtons").button() });
-
- $('#openButton').on('click', function(event){
- $(".myMenu").popup('open');
- event.preventDefault();
- event.stopPropagation();
- }).button();
-
+
+ $(".myMenu").menu(selected).popup({ trigger: $(".myButtons").button() });
+
+ $('#openButton').on('click', function(event){
+ $(".myMenu").popup('open');
+ event.preventDefault();
+ event.stopPropagation();
+ }).button();
+
});
</script>
<style type="text/css">
@@ -40,9 +40,9 @@
.demo th, .demo td {
padding: 0.5em;
}
-
- #openButton{margin-top:20px;}
- </style>
+
+ #openButton{margin-top:20px;}
+ </style>
</head>
<body>
@@ -72,7 +72,7 @@
<td class="ui-widget-content">Rod Stewart: Storyteller 1984-1991</td>
<td class="ui-widget-content">1991</td>
<td class="ui-widget-content">3.1</td>
- <td class="ui-widget-content">
+ <td class="ui-widget-content">
<div class="menubar">
<a href="#" class="myButtons">Options</a>
</div>
@@ -82,7 +82,7 @@
<td class="ui-widget-content">Stevie Ray Vaughan and Double Trouble: Live at the El Mocambo 1983</td>
<td class="ui-widget-content">1991</td>
<td class="ui-widget-content">3.9</td>
- <td class="ui-widget-content">
+ <td class="ui-widget-content">
<div class="menubar">
<a href="#" class="myButtons">Options</a>
</div>
@@ -92,32 +92,32 @@
<td class="ui-widget-content">Spike and Mike's Sick &amp; Twisted Festival of Animation</td>
<td class="ui-widget-content">1997</td>
<td class="ui-widget-content">2.6</td>
- <td class="ui-widget-content">
+ <td class="ui-widget-content">
<div class="menubar">
<a href="#" class="myButtons">Options</a>
</div>
</td>
</tr>
</tbody>
</table>
-
- <a href="#" id="openButton">Programtically open popup()</a>
-
- <ul class="myMenu">
- <li><a href="#">Order...</a></li>
- <li class="ui-state-disabled">Write a Review...</li>
- <li><a href="#">Find Similar Movies...</a></li>
- <li>
- <a href="#">Rate</a>
- <ul>
- <li><a href="#">5 stars</a></li>
- <li><a href="#">4 stars</a></li>
- <li><a href="#">3 stars</a></li>
- <li><a href="#">2 stars</a></li>
- <li><a href="#">1 stars</a></li>
- </ul>
- </li>
- </ul>
+
+ <a href="#" id="openButton">Programtically open popup()</a>
+
+ <ul class="myMenu">
+ <li><a href="#">Order...</a></li>
+ <li class="ui-state-disabled">Write a Review...</li>
+ <li><a href="#">Find Similar Movies...</a></li>
+ <li>
+ <a href="#">Rate</a>
+ <ul>
+ <li><a href="#">5 stars</a></li>
+ <li><a href="#">4 stars</a></li>
+ <li><a href="#">3 stars</a></li>
+ <li><a href="#">2 stars</a></li>
+ <li><a href="#">1 stars</a></li>
+ </ul>
+ </li>
+ </ul>
<div id="log"></div>
</div>
View
24 ui/jquery.ui.popup.js
@@ -103,17 +103,17 @@ $.widget( "ui.popup", {
},
mousedown: function( event ) {
var noFocus = false,
- target = $( event.target );
+ target = $( event.target );
/* TODO: Determine in which cases focus should stay on the trigger after the popup opens
(should apply for any trigger that has other interaction besides opening the popup, e.g. a text field) */
if ( target.is( "input" ) ) {
noFocus = true;
}
-
- //clicking on the same trigger twice should close the popup
+
+ //clicking on the same trigger twice should close the popup
if (this.isOpen && target.is( this.triggeredBy ) ) {
suppressExpandOnFocus = true;
- this.close();
+ this.close();
return;
}
this.open( event );
@@ -220,17 +220,17 @@ $.widget( "ui.popup", {
},
open: function( event ) {
- //keep state of the target that triggered this event - required in the case of a shared popup element
- this.triggeredBy = event ? event.target : this.options.trigger;
+ //keep state of the target that triggered this event - required in the case of a shared popup element
+ this.triggeredBy = event ? event.target : this.options.trigger;
var position = $.extend( {}, {
of: this.triggeredBy
}, this.options.position );
-
- //in the case this is a shared popup (aka has more than one trigger) we need to hide this so the following _show() effect will appear
- if( this.isOpen ){
- this.element.css('display','none');
- }
-
+
+ //in the case this is a shared popup (aka has more than one trigger) we need to hide this so the following _show() effect will appear
+ if( this.isOpen ){
+ this.element.css('display','none');
+ }
+
this._show( this.element, this.options.show );
this.element
.attr( "aria-hidden", "false" )

0 comments on commit 1c208b6

Please sign in to comment.