Permalink
Browse files

Menubar/Popup: Remove both to streamline the 1.9 release. Will revert…

… this delete on the menubar branch, while development on master can continue without them.
  • Loading branch information...
1 parent f0007ec commit 85348eeebed3521b5eea78d8930ee086c08cd62e @jzaefferer jzaefferer committed Jan 4, 2012
View
@@ -20,8 +20,6 @@
<script src="../ui/jquery.ui.draggable.js"></script>
<script src="../ui/jquery.ui.droppable.js"></script>
<script src="../ui/jquery.ui.menu.js"></script>
- <script src="../ui/jquery.ui.menubar.js"></script>
- <script src="../ui/jquery.ui.popup.js"></script>
<script src="../ui/jquery.ui.position.js"></script>
<script src="../ui/jquery.ui.progressbar.js"></script>
<script src="../ui/jquery.ui.resizable.js"></script>
@@ -111,28 +109,28 @@
<script src="../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
<script>
$(function() {
-
+
$('.left-nav a').click(function(ev) {
window.location.hash = this.href.replace(/.+\/([^\/]+)\/index\.html/,'$1') + '|default';
loadPage(this.href);
$('.left-nav a.selected').removeClass('selected');
$(this).addClass('selected');
ev.preventDefault();
});
-
+
if (window.location.hash) {
if (window.location.hash.indexOf('|') === -1) {
- window.location.hash += '|default';
- }
+ window.location.hash += '|default';
+ }
var path = window.location.href.replace(/(index\.html)?#/,'');
path = path.replace('\|','/') + '.html';
loadPage(path);
- }
+ }
- function loadPage(path) {
+ function loadPage(path) {
var section = path.replace(/\/[^\/]+\.html/,'');
var header = section.replace(/.+\/([^\/]+)/,'$1').replace(/_/, ' ');
-
+
$('td.normal div.normal')
.empty()
.append('<h4 class="demo-subheader">Functional demo:</h4>')
@@ -148,7 +146,7 @@
$(this).click(function() {
resetDemos();
-
+
$(this).parents('ul').find('li').removeClass('demo-config-on');
$(this).parent().addClass('demo-config-on');
$('#demo-notes').fadeOut();
@@ -167,8 +165,8 @@
$('#demo-config-menu a').each(function(){
if (this.href.indexOf(demo + '.html') !== -1) {
$(this).parents('ul').find('li').removeClass('demo-config-on');
- $(this).parent().addClass('demo-config-on');
- loadDemo(this.href);
+ $(this).parent().addClass('demo-config-on');
+ loadDemo(this.href);
}
});
}
@@ -184,10 +182,10 @@
.end()
.end()
;
-
+
resetDemos();
}
-
+
function loadDemo(path) {
var directory = path.match(/([^\/]+)\/[^\/\.]+\.html$/)[1];
$.get(path, function(data) {
@@ -207,7 +205,7 @@
$('#demo-link a').attr('href', path);
updateDemoNotes();
updateDemoSource(source);
-
+
if (/default.html$/.test(path)) {
$.get("documentation/docs-" + path.match(/demos\/(.+)\//)[1] + ".html", function(html) {
$("#demo-source").after(html);
@@ -241,7 +239,7 @@
$('#demo-notes').show();
notes.hide();
}
-
+
function updateDemoSource(source) {
if ($('#demo-source').length == 0) {
$('<div id="demo-source"><a href="#" class="source-closed">View Source</a><div><pre><code></code></pre></div></div>').insertAfter('#demo-notes');
@@ -257,12 +255,12 @@
$('#demo-source code').empty().text(cleanedSource);
}
-
+
function resetDemos() {
$.datepicker.setDefaults($.extend({showMonthAfterYear: false}, $.datepicker.regional['']));
- $(".ui-dialog-content").remove();
+ $(".ui-dialog-content").remove();
}
-
+
});
</script>
</head>
@@ -285,8 +283,6 @@
<dd><a href="datepicker/index.html">Datepicker</a></dd>
<dd><a href="dialog/index.html">Dialog</a></dd>
<dd><a href="menu/index.html">Menu</a></dd>
- <dd><a href="menubar/index.html">Menubar</a></dd>
- <dd><a href="popup/index.html">Popup</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd>
<dd><a href="slider/index.html">Slider</a></dd>
<dd><a href="spinner/index.html">Spinner</a></dd>
@@ -307,7 +303,7 @@
<dd><a href="widget/index.html">Widget</a></dd>
<dt>About jQuery UI</dt>
<dd><a href="http://jqueryui.com/docs/Getting_Started">Getting Started</a></dd>
- <dd><a href="http://jqueryui.com/docs/Upgrade_Guide">Upgrade Guide</a></dd>
+ <dd><a href="http://jqueryui.com/docs/Upgrade_Guide">Upgrade Guide</a></dd>
<dd><a href="http://jqueryui.com/docs/Changelog">Changelog</a></dd>
<dd><a href="http://jqueryui.com/docs/Roadmap">Roadmap</a></dd>
<dd><a href="http://jqueryui.com/docs/Subversion">Subversion Access</a></dd>
@@ -328,7 +324,7 @@
<p>
These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them.
</p>
-
+
</div>
</td>
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>jQuery UI Menu - Contextmenu demo</title>
- <link href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script src="../../jquery-1.7.1.js"></script>
- <script src="../../ui/jquery.ui.core.js"></script>
- <script src="../../ui/jquery.ui.position.js"></script>
- <script src="../../ui/jquery.ui.widget.js"></script>
- <script src="../../ui/jquery.ui.menu.js"></script>
- <script src="../../ui/jquery.ui.button.js"></script>
- <script src="../../ui/jquery.ui.popup.js"></script>
- <link href="../demos.css" rel="stylesheet" />
- <script>
- $(function() {
- var btn = $(".demo button").button({
- icons: {
- primary: "ui-icon-home",
- secondary: "ui-icon-triangle-1-s"
- }
- });
- $("#cities").menu({
- select: function(event, ui) {
- $("#log").append("<div>Selected " + ui.item.text() + "</div>");
- },
- trigger : btn});
- });
- </script>
- <style>
- .ui-menu { width: 200px; position: absolute; }
- </style>
-</head>
-<body>
-
-<div class="demo">
-
- <button>Select a city</button>
- <ul id="cities">
- <li><a href="#Amsterdam">Amsterdam</a></li>
- <li><a href="#Anaheim">Anaheim</a></li>
- <li><a href="#Cologne">Cologne</a></li>
- <li><a href="#Frankfurt">Frankfurt</a></li>
- <li><a href="#Magdeburg">Magdeburg</a></li>
- <li><a href="#Munich">Munich</a></li>
- <li><a href="#Utrecht">Utrecht</a></li>
- <li><a href="#Zurich">Zurich</a></li>
- </ul>
-
- <div id="log"></div>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-
-<p>A simple contextmenu: Click the button, or tab to it and hit space to open the menu. Use the mouse or cursor keys to select an item, click it or hit enter to select it.</p>
-
-<p>The keyboard handling is part of the menu. Using the input option to menu is configured to add the key event handlers to the button, as that button gets focused when clicked.</p>
-
-</div><!-- End demo-description -->
-
-
-
-</body>
-</html>
Oops, something went wrong.

0 comments on commit 85348ee

Please sign in to comment.