Merge branch 'master' of github.com:jquery/jquery-ui

This commit is contained in:
maggiewachs 2010-04-16 14:24:49 -04:00
commit 970ed9a67a
56 changed files with 2162 additions and 1058 deletions

View File

@ -22,22 +22,24 @@
<property name="release.filename" value="jquery-ui-${release.version}" /> <property name="release.filename" value="jquery-ui-${release.version}" />
<property name="dist.dir" value="dist/${release.filename}/" /> <property name="dist.dir" value="dist/${release.filename}/" />
<property name="cdndist.dir" value="dist/${release.filename}-googlecdn" />
<property name="build.dir" value="build" /> <property name="build.dir" value="build" />
<property name="ui.dir" value="../" /> <property name="ui.dir" value="../" />
<property name="src.dir" value="${ui.dir}/ui/" /> <property name="src.dir" value="${ui.dir}/ui/" />
<property name="theme.dir" value="${ui.dir}/themes/base/" /> <property name="theme.dir" value="${ui.dir}/themes/base/" />
<property name="docs.dir" value="${ui.dir}/docs/" /> <property name="docs.dir" value="${ui.dir}/docs/" />
<property name="min.folder" value="${dist.dir}/ui/minified" /> <property name="min.dir" value="${dist.dir}/ui/minified" />
<property name="concatenated" value="jquery-ui" /> <property name="concatenated" value="jquery-ui" />
<property name="concatenated.i18n" value="jquery-ui-i18n" /> <property name="concatenated.i18n" value="jquery-ui-i18n" />
<property name="core.files" value="jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js" /> <property name="core.files" value="jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js" />
<property name="core.files.min" value="jquery.ui.core.min.js, jquery.ui.widget.min.js, jquery.ui.mouse.min.js, jquery.ui.draggable.min.js, jquery.ui.droppable.min.js, jquery.ui.resizable.min.js, jquery.ui.selectable.min.js, jquery.ui.sortable.min.js, jquery.effects.core.min.js" />
<property description="Google Closure" name="closure-jar" value="${build.dir}/google-compiler-20091218.jar" /> <property description="Google Closure" name="closure-jar" value="${build.dir}/google-compiler-20091218.jar" />
<target name="deploy-release" depends="docs-download, concatenate, minify, copy, replace-version, prepend-header, zip" description="Release builder"> <target name="deploy-release" depends="clean, docs-download, concatenate, minify, copy, replace-version, prepend-header, zip, googlecdn" description="Release builder">
</target> </target>
<target name="replace-version"> <target name="replace-version">
@ -49,7 +51,6 @@
</target> </target>
<target name="prepend-header"> <target name="prepend-header">
<!-- TODO: refactor this ugly mess -->
<copy todir="${dist.dir}/headers/"> <copy todir="${dist.dir}/headers/">
<fileset dir="${dist.dir}/ui/" includes="*.js" /> <fileset dir="${dist.dir}/ui/" includes="*.js" />
</copy> </copy>
@ -57,7 +58,7 @@
<fileset dir="${dist.dir}/headers/" includes="*.js"/> <fileset dir="${dist.dir}/headers/" includes="*.js"/>
</replaceregexp> </replaceregexp>
<for param="file"> <for param="file">
<path><fileset dir="${dist.dir}/ui/minified/" includes="*.js" /></path> <path><fileset dir="${min.dir}/" includes="*.js" /></path>
<sequential> <sequential>
<propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/> <propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
<concat destfile="${dist.dir}/ui-headered/${target}.min.js"> <concat destfile="${dist.dir}/ui-headered/${target}.min.js">
@ -66,9 +67,33 @@
</concat> </concat>
</sequential> </sequential>
</for> </for>
<copy todir="${dist.dir}/ui/minified"> <copy todir="${min.dir}">
<fileset dir="${dist.dir}/ui-headered/" includes="*.js" /> <fileset dir="${dist.dir}/ui-headered/" includes="*.js" />
</copy> </copy>
<!-- once more for the i18n files -->
<!-- need to clean up headers in those files first
<copy todir="${dist.dir}/headers/i18n/">
<fileset dir="${dist.dir}/ui/i18n/" includes="*.js" />
</copy>
<replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
<fileset dir="${dist.dir}/headers/i18n/" includes="*.js"/>
</replaceregexp>
<for param="file">
<path><fileset dir="${min.dir}/i18n/" includes="*.js" /></path>
<sequential>
<propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
<concat destfile="${dist.dir}/ui-headered/i18n/${target}.min.js">
<header file="${dist.dir}/headers/i18n/${target}.js" />
<fileset file="@{file}" />
</concat>
</sequential>
</for>
<copy todir="${min.dir}/i18n/">
<fileset dir="${dist.dir}/ui-headered/i18n/" includes="*.js" />
</copy>
-->
<delete dir="${dist.dir}/headers/" /> <delete dir="${dist.dir}/headers/" />
<delete dir="${dist.dir}/ui-headered/" /> <delete dir="${dist.dir}/ui-headered/" />
</target> </target>
@ -108,44 +133,43 @@
<target name="minify" depends="concatenate" description="Remove all comments and whitespace, no compression, great in combination with GZip"> <target name="minify" depends="concatenate" description="Remove all comments and whitespace, no compression, great in combination with GZip">
<echo message="Building minified" /> <echo message="Building minified" />
<delete dir="${min.folder}/" /> <delete dir="${min.dir}/" />
<mkdir dir="${min.folder}" /> <mkdir dir="${min.dir}" />
<delete dir="${min.folder}/i18n/" /> <delete dir="${min.dir}/i18n/" />
<mkdir dir="${min.folder}/i18n/" /> <mkdir dir="${min.dir}/i18n/" />
<apply executable="java" parallel="false"> <apply executable="java" parallel="false">
<fileset dir="${src.dir}/" includes="jquery.ui.*.js, jquery.effects.*.js" /> <fileset dir="${src.dir}/" includes="jquery.ui.*.js, jquery.effects.*.js" />
<arg line="-jar" /> <arg line="-jar" />
<arg path="build/google-compiler-20091218.jar" /> <arg path="${closure-jar}" />
<arg value="--warning_level" /> <arg value="--warning_level" />
<arg value="QUIET" /> <arg value="QUIET" />
<arg value="--js_output_file" /> <arg value="--js_output_file" />
<targetfile /> <targetfile />
<arg value="--js" /> <arg value="--js" />
<mapper type="glob" from="*.js" to="${min.folder}/*.min.js" /> <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" />
</apply> </apply>
<apply executable="java" parallel="false" verbose="true" dest="${dist.dir}"> <concat destfile="${min.dir}/${concatenated}.min.js">
<filelist dir="${dist.dir}/ui/" files="${concatenated}.js" /> <filelist dir="${min.dir}" files="${core.files.min}" />
<fileset dir="${min.dir}" includes="jquery.ui.*.js, jquery.effects.*.js" excludes="${core.files.min}" />
</concat>
<apply executable="java" parallel="false">
<fileset dir="${src.dir}/i18n/" includes="jquery.ui.*.js" />
<arg line="-jar" /> <arg line="-jar" />
<arg path="build/google-compiler-20091218.jar" /> <arg path="${closure-jar}" />
<arg value="--warning_level" /> <arg value="--warning_level" />
<arg value="QUIET" /> <arg value="QUIET" />
<arg value="--js_output_file" /> <arg value="--js_output_file" />
<targetfile /> <targetfile />
<arg value="--js" /> <arg value="--js" />
<mapper type="glob" from="${concatenated}.js" to="tmpmin" /> <mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" />
</apply> </apply>
<concat destfile="${min.folder}/jquery-ui.min.js">
<filelist files="${src.dir}/jquery.ui.core.js, ${dist.dir}/tmpmin"/> <concat destfile="${min.dir}/i18n/${concatenated.i18n}.min.js">
<filterchain> <fileset dir="${min.dir}/i18n" includes="jquery.ui.*.js" />
<headfilter lines="9"/>
</filterchain>
</concat> </concat>
<concat destfile="${min.folder}/jquery-ui.min.js" append="yes">
<filelist files="${dist.dir}/tmpmin"/>
</concat>
<delete file="${dist.dir}/tmpmin"/>
<echo message="Minified ui/ built." /> <echo message="Minified ui/ built." />
</target> </target>
@ -258,4 +282,40 @@
<echo message="All trailing spaces removed." /> <echo message="All trailing spaces removed." />
</target> </target>
<target name="googlecdn">
<delete dir="${cdndist.dir}" />
<mkdir dir="${cdndist.dir}" />
<copy todir="${cdndist.dir}">
<fileset dir=".." includes="AUTHORS.txt, GPL-LICENSE.txt, MIT-LICENSE.txt, version.txt" />
</copy>
<copy todir="${cdndist.dir}">
<fileset dir="${dist.dir}ui" includes="jquery-ui.js" />
<fileset dir="${dist.dir}ui/minified" includes="jquery-ui.min.js" />
</copy>
<copy todir="${cdndist.dir}/i18n">
<fileset dir="${dist.dir}ui/i18n" />
<fileset dir="${dist.dir}ui/minified/i18n" />
</copy>
<copy todir="${cdndist.dir}/themes">
<fileset dir="${dist.dir}themes" />
</copy>
<checksum>
<fileset dir="${cdndist.dir}" />
</checksum>
<for param="file">
<path><fileset dir="${cdndist.dir}" includes="**/" excludes="**/*.MD5" /></path>
<sequential>
<!-- @{file} is an absolute path, use that ugly regexes to make it relative -->
<propertyregex override="yes" property="relativepath" input="@{file}" regexp=".+?googlecdn[\\/](.+)$" replace="\1"/>
<propertyregex override="yes" property="relativepath" input="${relativepath}" regexp="\\" replace="/" global="true" />
<concat destfile="${cdndist.dir}/MANIFEST" append="yes">${relativepath} </concat>
<concat destfile="${cdndist.dir}/MANIFEST" append="yes"><file file="@{file}.MD5" /></concat>
</sequential>
</for>
<delete dir="${cdndist.dir}" includes="**/*.MD5" />
<zip destfile="${dist.dir}/../${release.filename}-googlecdn.zip">
<zipfileset dir="${cdndist.dir}/" />
</zip>
</target>
</project> </project>

View File

@ -30,24 +30,23 @@
var matcher = new RegExp(request.term, "i"); var matcher = new RegExp(request.term, "i");
response(select.children("option").map(function() { response(select.children("option").map(function() {
var text = $(this).text(); var text = $(this).text();
if (!request.term || matcher.test(text)) if (this.value && (!request.term || matcher.test(text)))
return { return {
id: $(this).val(), id: this.value,
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"), label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
value: text value: text
}; };
})); }));
}, },
delay: 0, delay: 0,
select: function(e, ui) { change: function(event, ui) {
if (!ui.item) { if (!ui.item) {
// remove invalid value, as it didn't match anything // remove invalid value, as it didn't match anything
$(this).val(""); $(this).val("");
return false; return false;
} }
$(this).focus();
select.val(ui.item.id); select.val(ui.item.id);
self._trigger("selected", null, { self._trigger("selected", event, {
item: select.find("[value='" + ui.item.id + "']") item: select.find("[value='" + ui.item.id + "']")
}); });
@ -56,6 +55,7 @@
}) })
.addClass("ui-widget ui-widget-content ui-corner-left"); .addClass("ui-widget ui-widget-content ui-corner-left");
$("<button>&nbsp;</button>") $("<button>&nbsp;</button>")
.attr("tabIndex", -1)
.attr("title", "Show All Items") .attr("title", "Show All Items")
.insertAfter(input) .insertAfter(input)
.button({ .button({
@ -81,7 +81,10 @@
})(jQuery); })(jQuery);
$(function() { $(function() {
$("select").combobox(); $("#combobox").combobox();
$("#toggle").click(function() {
$("#combobox").toggle();
});
}); });
</script> </script>
</head> </head>
@ -91,7 +94,8 @@
<div class="ui-widget"> <div class="ui-widget">
<label>Your preferred programming language: </label> <label>Your preferred programming language: </label>
<select> <select id="combobox">
<option value="">Select one...</option>
<option value="a">asp</option> <option value="a">asp</option>
<option value="c">c</option> <option value="c">c</option>
<option value="cpp">c++</option> <option value="cpp">c++</option>
@ -107,6 +111,7 @@
<option value="s">scala</option> <option value="s">scala</option>
</select> </select>
</div> </div>
<button id="toggle">Show underlying select</button>
</div><!-- End demo --> </div><!-- End demo -->

View File

@ -16,6 +16,9 @@
<li><a href="combobox.html">Combobox</a></li> <li><a href="combobox.html">Combobox</a></li>
<li><a href="custom-data.html">Custom data and display</a></li> <li><a href="custom-data.html">Custom data and display</a></li>
<li><a href="xml.html">XML data parsed once</a></li> <li><a href="xml.html">XML data parsed once</a></li>
<li><a href="categories.html">Categories</a></li>
<li><a href="multiple.html">Multiple values</a></li>
<li><a href="multiple-remote.html">Multiple, remote</a></li>
</ul> </ul>
</div> </div>
</body> </body>

View File

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Autocomplete multiple demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
$("#birds").autocomplete({
source: function(request, response) {
$.getJSON("search.php", {
term: extractLast(request.term)
}, response);
},
search: function() {
// custom minLength
var term = extractLast(this.value);
if (term.length < 2) {
return false;
}
},
focus: function() {
// prevent value inserted on focus
return false;
},
select: function(event, ui) {
var terms = split( this.value );
// remove the current input
terms.pop();
// add the selected item
terms.push( ui.item.value );
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});
</script>
</head>
<body>
<div class="demo">
<div class="ui-widget">
<label for="birds">Birds: </label>
<input id="birds" size="50" />
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>
Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names.
</p>
<p>
This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.
</p>
</div><!-- End demo-description -->
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Autocomplete multiple demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
$("#tags").autocomplete({
minLength: 0,
source: function(request, response) {
// delegate back to autocomplete, but extract the last term
response($.ui.autocomplete.filter(availableTags, extractLast(request.term)));
},
focus: function() {
// prevent value inserted on focus
return false;
},
select: function(event, ui) {
var terms = split( this.value );
// remove the current input
terms.pop();
// add the selected item
terms.push( ui.item.value );
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});
</script>
</head>
<body>
<div class="demo">
<div class="ui-widget">
<label for="tags">Tag programming languages: </label>
<input id="tags" size="50" />
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>
Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more.
</p>
<p>
This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.
</p>
</div><!-- End demo-description -->
</body>
</html>

View File

@ -22,12 +22,11 @@
source: function(request, response) { source: function(request, response) {
if (cache.term == request.term && cache.content) { if (cache.term == request.term && cache.content) {
response(cache.content); response(cache.content);
return;
} }
if (new RegExp(cache.term).test(request.term) && cache.content && cache.content.length < 13) { if (new RegExp(cache.term).test(request.term) && cache.content && cache.content.length < 13) {
var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response($.ui.autocomplete.filter(cache.content, request.term));
response($.grep(cache.content, function(value) { return;
return matcher.test(value.value)
}));
} }
$.ajax({ $.ajax({
url: "search.php", url: "search.php",

View File

@ -18,7 +18,6 @@
} }
$("#birds").autocomplete({ $("#birds").autocomplete({
// TODO doesn't work when loaded from /demos/#autocomplete|remote
source: "search.php", source: "search.php",
minLength: 2, minLength: 2,
select: function(event, ui) { select: function(event, ui) {

View File

@ -11,18 +11,20 @@
<link type="text/css" href="../demos.css" rel="stylesheet" /> <link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$("#rerun").button().click(function() { $("#rerun")
alert("Running the last action"); .button()
.click( function() {
alert( "Running the last action" );
}) })
.next() .next()
.button({ .button( {
text: false, text: false,
icons: { icons: {
primary: "ui-icon-triangle-1-s" primary: "ui-icon-triangle-1-s"
} }
}) })
.click(function() { .click( function() {
alert("Could display a menu to select an action"); alert( "Could display a menu to select an action" );
}) })
.parent() .parent()
.buttonset(); .buttonset();

View File

@ -27,7 +27,7 @@
return $('<div class="ui-widget-header">I\'m a custom helper</div>'); return $('<div class="ui-widget-header">I\'m a custom helper</div>');
} }
}); });
$("#set div").draggable({ stack: { group: '#set div', min: 1 } }); $("#set div").draggable({ stack: '#set div' });
}); });
</script> </script>
</head> </head>

View File

@ -15,6 +15,7 @@
<li><a href="propagation.html">Prevent propagation</a></li> <li><a href="propagation.html">Prevent propagation</a></li>
<li><a href="visual-feedback.html">Visual feedback</a></li> <li><a href="visual-feedback.html">Visual feedback</a></li>
<li><a href="revert.html">Revert draggable position</a></li> <li><a href="revert.html">Revert draggable position</a></li>
<li><a href="shopping-cart.html">Shopping Cart</a></li>
<li><a href="photo-manager.html">Simple photo manager</a></li> <li><a href="photo-manager.html">Simple photo manager</a></li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,101 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Droppable - Shopping Cart Demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.accordion.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<style type="text/css">
h1 { padding: .2em; margin: 0; }
#products { float:left; width: 500px; margin-right: 2em; }
#cart { width: 200px; float: left; }
/* style the list to maximize the droppable hitarea */
#cart ol { margin: 0; padding: 1em 0 1em 3em; }
</style>
<script type="text/javascript">
$(function() {
$("#catalog").accordion();
$("#catalog li").draggable({
appendTo: "body",
helper: "clone"
});
$("#cart ol").droppable({
activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
accept: ":not(.ui-sortable-helper)",
drop: function(event, ui) {
$(this).find(".placeholder").remove();
$("<li></li>").text(ui.draggable.text()).appendTo(this);
}
}).sortable({
items: "li:not(.placeholder)",
sort: function() {
// gets added unintentionally by droppable interacting with sortable
// using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options
$(this).removeClass("ui-state-default");
}
});
});
</script>
</head>
<body>
<div class="demo">
<div id="products">
<h1 class="ui-widget-header">Products</h1>
<div id="catalog">
<h3><a href="#">T-Shirts</a></h3>
<div>
<ul>
<li>Lolcat Shirt</li>
<li>Cheezeburger Shirt</li>
<li>Buckit Shirt</li>
</ul>
</div>
<h3><a href="#">Bags</a></h3>
<div>
<ul>
<li>Zebra Striped</li>
<li>Black Leather</li>
<li>Alligator Leather</li>
</ul>
</div>
<h3><a href="#">Gadgets</a></h3>
<div>
<ul>
<li>iPhone</li>
<li>iPod</li>
<li>iPad</li>
</ul>
</div>
</div>
</div>
<div id="cart">
<h1 class="ui-widget-header">Shopping Cart</h1>
<div class="ui-widget-content">
<ol>
<li class="placeholder">Add your items here</li>
</ol>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Demonstrate how to use an accordion to structure products into a catalog and make use drag and drop for adding
them to a shopping cart, where they are sortable.</p>
</div><!-- End demo-description -->
</body>
</html>

View File

@ -11,7 +11,7 @@
<h4>Examples</h4> <h4>Examples</h4>
<ul> <ul>
<li class="demo-config-on"><a href="default.html">Effect showcase</a></li> <li class="demo-config-on"><a href="default.html">Effect showcase</a></li>
<li class="demo-config-on"><a href="easing.html">Easing showcase</a></li> <li><a href="easing.html">Easing showcase</a></li>
<!-- WIP <!-- WIP
<li class="demo-config-on"><a href="scale.html">Scale effect</a></li> <li class="demo-config-on"><a href="scale.html">Scale effect</a></li>
<li class="demo-config-on"><a href="size.html">Size effect</a></li> <li class="demo-config-on"><a href="size.html">Size effect</a></li>

57
demos/tabs/cookie.html Normal file
View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Tabs - Default functionality</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../external/jquery.cookie.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#tabs").tabs({
cookie: {
// store cookie for a day, without, it would be a session cookie
expires: 1
}
});
});
</script>
</head>
<body>
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>
<div id="tabs-2">
<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
</div>
<div id="tabs-3">
<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Looks the same as the default demo, but uses cookie to store the selected tab, and restore it when the page (re)loads.
The cookie is stored for a day, so tabs will be restored even after closing the browser. Use cookie: {} for using cookies with default options.</p>
</div><!-- End demo-description -->
</body>
</html>

View File

@ -17,6 +17,7 @@
<li><a href="sortable.html">Sortable</a></li> <li><a href="sortable.html">Sortable</a></li>
<li><a href="manipulation.html">Simple manipulation</a></li> <li><a href="manipulation.html">Simple manipulation</a></li>
<li><a href="bottom.html">Tabs below content</a></li> <li><a href="bottom.html">Tabs below content</a></li>
<li><a href="cookie.html">Cookie persistence</a></li>
</ul> </ul>
</div> </div>

56
external/qunit.js vendored
View File

@ -18,6 +18,7 @@ var QUnit = {
stats: { all: 0, bad: 0 }, stats: { all: 0, bad: 0 },
moduleStats: { all: 0, bad: 0 }, moduleStats: { all: 0, bad: 0 },
started: +new Date, started: +new Date,
updateRate: 1000,
blocking: false, blocking: false,
autorun: false, autorun: false,
assertions: [], assertions: [],
@ -578,7 +579,7 @@ function validTest( name ) {
function push(result, actual, expected, message) { function push(result, actual, expected, message) {
message = message || (result ? "okay" : "failed"); message = message || (result ? "okay" : "failed");
QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) ); QUnit.ok( result, result ? message + ": " + QUnit.jsDump.parse(expected) : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
} }
function synchronize( callback ) { function synchronize( callback ) {
@ -590,8 +591,16 @@ function synchronize( callback ) {
} }
function process() { function process() {
var start = (new Date()).getTime();
while ( config.queue.length && !config.blocking ) { while ( config.queue.length && !config.blocking ) {
if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) {
config.queue.shift()(); config.queue.shift()();
} else {
setTimeout( process, 13 );
break;
}
} }
} }
@ -679,6 +688,7 @@ QUnit.equiv = function () {
var innerEquiv; // the real equiv function var innerEquiv; // the real equiv function
var callers = []; // stack to decide between skip/abort functions var callers = []; // stack to decide between skip/abort functions
var parents = []; // stack to avoiding loops from circular referencing
// Determine what is o. // Determine what is o.
@ -788,7 +798,7 @@ QUnit.equiv = function () {
}, },
"array": function (b, a) { "array": function (b, a) {
var i; var i, j, loop;
var len; var len;
// b could be an object literal here // b could be an object literal here
@ -800,16 +810,27 @@ QUnit.equiv = function () {
if (len !== b.length) { // safe and faster if (len !== b.length) { // safe and faster
return false; return false;
} }
//track reference to avoid circular references
parents.push(a);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
if ( ! innerEquiv(a[i], b[i])) { loop = false;
for(j=0;j<parents.length;j++){
if(parents[j] === a[i]){
loop = true;//dont rewalk array
}
}
if (!loop && ! innerEquiv(a[i], b[i])) {
parents.pop();
return false; return false;
} }
} }
parents.pop();
return true; return true;
}, },
"object": function (b, a) { "object": function (b, a) {
var i; var i, j, loop;
var eq = true; // unless we can proove it var eq = true; // unless we can proove it
var aProperties = [], bProperties = []; // collection of strings var aProperties = [], bProperties = []; // collection of strings
@ -820,18 +841,25 @@ QUnit.equiv = function () {
// stack constructor before traversing properties // stack constructor before traversing properties
callers.push(a.constructor); callers.push(a.constructor);
//track reference to avoid circular references
parents.push(a);
for (i in a) { // be strict: don't ensures hasOwnProperty and go deep for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
loop = false;
for(j=0;j<parents.length;j++){
if(parents[j] === a[i])
loop = true; //don't go down the same path twice
}
aProperties.push(i); // collect a's properties aProperties.push(i); // collect a's properties
if ( ! innerEquiv(a[i], b[i])) { if (!loop && ! innerEquiv(a[i], b[i])) {
eq = false; eq = false;
break; break;
} }
} }
callers.pop(); // unstack, we are done callers.pop(); // unstack, we are done
parents.pop();
for (i in b) { for (i in b) {
bProperties.push(i); // collect b's properties bProperties.push(i); // collect b's properties
@ -925,16 +953,14 @@ QUnit.jsDump = (function() {
type = "date"; type = "date";
} else if (QUnit.is("Function", obj)) { } else if (QUnit.is("Function", obj)) {
type = "function"; type = "function";
} else if (QUnit.is("Array", obj)) { } else if (obj.setInterval && obj.document && !obj.nodeType) {
type = "array";
} else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
type = "window"; type = "window";
} else if (QUnit.is("HTMLDocument", obj)) { } else if (obj.nodeType === 9) {
type = "document"; type = "document";
} else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) { } else if (obj.nodeType) {
type = "nodelist";
} else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
type = "node"; type = "node";
} else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) {
type = "array";
} else { } else {
type = typeof obj; type = typeof obj;
} }
@ -1032,9 +1058,9 @@ QUnit.jsDump = (function() {
name:'name', name:'name',
'class':'className' 'class':'className'
}, },
HTML:true,//if true, entities are escaped ( <, >, \t, space and \n ) HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )
indentChar:' ',//indentation unit indentChar:' ',//indentation unit
multiline:true //if true, items in a collection, are separated by a \n, else just a space. multiline:false //if true, items in a collection, are separated by a \n, else just a space.
}; };
return jsDump; return jsDump;

View File

@ -16,6 +16,29 @@
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script> <script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript">
$.ui.accordion.prototype.options.animated = false;
function state(accordion) {
var args = $.makeArray(arguments).slice(1);
var result = [];
$.each(args, function(i, n) {
result.push( accordion.find(".ui-accordion-content").eq(i).filter(function() {
return $(this).css("display") != "none"
}).length ? 1 : 0 );
});
same(args, result)
}
function equalHeights(accordion, min, max) {
var sizes = [];
accordion.find(".ui-accordion-content").each(function() {
sizes.push($(this).outerHeight());
});
ok( sizes[0] >= min && sizes[0] <= max, "must be within " + min + " and " + max + ", was " + sizes[0] );
same(sizes[0], sizes[1]);
same(sizes[0], sizes[2]);
}
</script>
<script type="text/javascript" src="accordion_core.js"></script> <script type="text/javascript" src="accordion_core.js"></script>
<script type="text/javascript" src="accordion_defaults.js"></script> <script type="text/javascript" src="accordion_defaults.js"></script>
<script type="text/javascript" src="accordion_events.js"></script> <script type="text/javascript" src="accordion_events.js"></script>
@ -25,8 +48,7 @@
<style> <style>
#main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; } #main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }
#main h2 { margin: 0; } #list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; }
#main ul, #main li { padding: 0; }
</style> </style>
</head> </head>
<body> <body>
@ -39,9 +61,10 @@
<div id="main" style="position: absolute; top: -10000px; left: -10000px;"> <div id="main" style="position: absolute; top: -10000px; left: -10000px;">
<div id="list1">
<a>There is one obvious advantage:</a>
<div> <div>
<div id="list1" class="foo">
<a class="bar">There is one obvious advantage:</a>
<div class="foo">
<p> <p>
You've seen it coming! You've seen it coming!
<br/> <br/>
@ -50,8 +73,8 @@
Well, at least no free beer. Perhaps a bear, if you can afford it. Well, at least no free beer. Perhaps a bear, if you can afford it.
</p> </p>
</div> </div>
<a>Now that you've got...</a> <a class="bar">Now that you've got...</a>
<div> <div class="foo">
<p> <p>
your bear, you have to admit it! your bear, you have to admit it!
<br/> <br/>
@ -61,8 +84,8 @@
We could talk about renting one. We could talk about renting one.
</p> </p>
</div> </div>
<a>Rent one bear, ...</a> <a class="bar">Rent one bear, ...</a>
<div> <div class="foo">
<p> <p>
get two for three beer. get two for three beer.
</p> </p>
@ -71,6 +94,7 @@
</p> </p>
</div> </div>
</div> </div>
</div>
<div id="navigationWrapper"> <div id="navigationWrapper">
<ul id="navigation"> <ul id="navigation">

View File

@ -5,17 +5,6 @@
(function($) { (function($) {
$.ui.accordion.prototype.options.animated = false;
function state(accordion) {
var args = $.makeArray(arguments).slice(1);
var result = [];
$.each(args, function(i, n) {
result.push( accordion.find(".ui-accordion-content").eq(i).is(":visible") ? 1 : 0 );
});
same(args, result)
}
module("accordion: core"); module("accordion: core");
test("handle click on header-descendant", function() { test("handle click on header-descendant", function() {

View File

@ -3,15 +3,6 @@
*/ */
(function($) { (function($) {
function state(accordion) {
var expected = $.makeArray(arguments).slice(1);
var actual = [];
$.each(expected, function(i, n) {
actual.push( accordion.find(".ui-accordion-content").eq(i).is(":visible") ? 1 : 0 );
});
same(actual, expected)
}
module("accordion: methods"); module("accordion: methods");
test("init", function() { test("init", function() {
@ -40,21 +31,13 @@ test("init", function() {
}); });
test("destroy", function() { test("destroy", function() {
$("<div></div>").appendTo('body').accordion().accordion("destroy").remove(); var beforeHtml = $("#list1").find("div").css("font-style", "normal").end().parent().html();
ok(true, '.accordion("destroy") called on element'); var afterHtml = $("#list1").accordion().accordion("destroy").parent().html();
// Opera 9 outputs role="" instead of removing the attribute like everyone else
$([]).accordion().accordion("destroy").remove(); if ($.browser.opera) {
ok(true, '.accordion("destroy") called on empty collection'); afterHtml = afterHtml.replace(/ role=""/g, "");
}
$('<div></div>').accordion().accordion("destroy").remove(); equal( afterHtml, beforeHtml );
ok(true, '.accordion("destroy") called on disconnected DOMElement');
$('<div></div>').accordion().accordion("destroy").accordion("foo").remove();
ok(true, 'arbitrary method called after destroy');
var expected = $('<div></div>').accordion(),
actual = expected.accordion('destroy');
equals(actual, expected, 'destroy is chainable');
}); });
test("enable", function() { test("enable", function() {
@ -124,8 +107,7 @@ test("activate, string expression", function() {
ac.accordion("activate", ":last"); ac.accordion("activate", ":last");
state(ac, 0, 0, 1); state(ac, 0, 0, 1);
}); });
//[ 0, 1, 1 ] result: [ 0, 0, 1 ]
//[ 0, 1, 1] result: [ 0, 0, 1]
test("activate, jQuery or DOM element", function() { test("activate, jQuery or DOM element", function() {
var ac = $('#list1').accordion({ active: $("#list1 a:last") }); var ac = $('#list1').accordion({ active: $("#list1 a:last") });
state(ac, 0, 0, 1); state(ac, 0, 0, 1);
@ -136,24 +118,14 @@ test("activate, jQuery or DOM element", function() {
}); });
test("resize", function() { test("resize", function() {
var expected = $('#list1').accordion(); var expected = $('#navigation').parent().height(300).end().accordion({
fillSpace: true
var sizes = [];
expected.find(".ui-accordion-content").each(function() {
sizes.push($(this).outerHeight());
}); });
equalHeights(expected, 246, 258);
var actual = expected.accordion('resize'); expected.parent().height(500);
equals(actual, expected, 'resize is chainable'); expected.accordion("resize");
equalHeights(expected, 446, 458);
var sizes2 = [];
expected.find(".ui-accordion-content").each(function() {
sizes2.push($(this).outerHeight());
});
same(sizes, sizes2);
expected.find(".ui-accordion-content:first").height(500)
var sizes3 = [];
}); });
})(jQuery); })(jQuery);

View File

@ -3,16 +3,6 @@
*/ */
(function($) { (function($) {
function state(accordion) {
var expected = $.makeArray(arguments).slice(1);
var actual = [];
$.each(expected, function(i, n) {
actual.push( accordion.find(".ui-accordion-content").eq(i).is(":visible") ? 1 : 0 );
});
same(actual, expected)
}
module("accordion: options"); module("accordion: options");
test("{ active: first child }, default", function() { test("{ active: first child }, default", function() {
@ -76,17 +66,18 @@ test("{ active: Number }", function() {
}); });
test("{ autoHeight: true }, default", function() { test("{ autoHeight: true }, default", function() {
$('#navigation').accordion({ autoHeight: true }); equalHeights($('#navigation').accordion({ autoHeight: true }), 95, 130);
equals( $('#navigation > li:eq(0) > ul').height(), 126 );
equals( $('#navigation > li:eq(1) > ul').height(), 126 );
equals( $('#navigation > li:eq(2) > ul').height(), 126 );
}); });
test("{ autoHeight: false }", function() { test("{ autoHeight: false }", function() {
$('#navigation').accordion({ autoHeight: false }); var accordion = $('#navigation').accordion({ autoHeight: false });
equals( $('#navigation > li:eq(0) > ul').height(), 90 ); var sizes = [];
equals( $('#navigation > li:eq(1) > ul').height(), 126 ); accordion.find(".ui-accordion-content").each(function() {
equals( $('#navigation > li:eq(2) > ul').height(), 54 ); sizes.push($(this).height());
});
ok( sizes[0] >= 70 && sizes[0] <= 90, "was " + sizes[0] );
ok( sizes[1] >= 98 && sizes[1] <= 126, "was " + sizes[1] );
ok( sizes[2] >= 42 && sizes[2] <= 54, "was " + sizes[2] );
}); });
test("{ collapsible: false }, default", function() { test("{ collapsible: false }, default", function() {
@ -105,20 +96,10 @@ test("{ collapsible: true }", function() {
state(ac, 0, 0, 0); state(ac, 0, 0, 0);
}); });
test("{ fillSpace: false }, default", function() { // fillSpace: false == autoHeight: true, covered above
$("#navigationWrapper").height(500);
$('#navigation').accordion({ fillSpace: false });
equals( $('#navigation > li:eq(0) > ul').height(), 126 );
equals( $('#navigation > li:eq(1) > ul').height(), 126 );
equals( $('#navigation > li:eq(2) > ul').height(), 126 );
});
test("{ fillSpace: true }", function() { test("{ fillSpace: true }", function() {
$("#navigationWrapper").height(500); $("#navigationWrapper").height(500);
$('#navigation').accordion({ fillSpace: true }); equalHeights($('#navigation').accordion({ fillSpace: true }), 446, 458);
equals( $('#navigation > li:eq(0) > ul').height(), 362 );
equals( $('#navigation > li:eq(1) > ul').height(), 362 );
equals( $('#navigation > li:eq(2) > ul').height(), 362 );
}); });
test("{ header: '> li > :first-child,> :not(li):even' }, default", function() { test("{ header: '> li > :first-child,> :not(li):even' }, default", function() {

View File

@ -12,7 +12,7 @@ module("autocomplete: events", {
var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"]; var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];
test("all events", function() { test("all events", function() {
expect(11); expect(12);
var ac = $("#autocomplete").autocomplete({ var ac = $("#autocomplete").autocomplete({
delay: 0, delay: 0,
source: data, source: data,
@ -34,21 +34,39 @@ test("all events", function() {
same(event.type, "autocompleteselect"); same(event.type, "autocompleteselect");
same(ui.item, {label:"java", value:"java"}); same(ui.item, {label:"java", value:"java"});
}, },
change: function(event) { change: function(event, ui) {
same(event.type, "autocompletechange"); same(event.type, "autocompletechange");
same(ui.item, {label:"java", value:"java"});
same( $(".ui-menu:visible").length, 0 ); same( $(".ui-menu:visible").length, 0 );
start();
} }
}); });
stop(); stop();
ac.val("ja").keydown(); ac.focus().val("ja").keydown();
setTimeout(function() { setTimeout(function() {
same( $(".ui-menu:visible").length, 1 ); same( $(".ui-menu:visible").length, 1 );
ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN }); ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER }); ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
start(); $.browser.msie ? ac.simulate("blur") : ac.blur();
}, 50); }, 50);
}); });
test("change without selection", function() {
expect(2);
stop();
var ac = $("#autocomplete").autocomplete({
delay: 0,
source: data,
change: function(event, ui) {
same(event.type, "autocompletechange");
same(ui.item, null);
start();
}
});
ac.triggerHandler("focus");
ac.val("ja").triggerHandler("blur");
});
test("cancel search", function() { test("cancel search", function() {
expect(6); expect(6);
var first = true; var first = true;

View File

@ -13,8 +13,11 @@ module("autocomplete: methods", {
test("destroy", function() { test("destroy", function() {
var beforeHtml = $("#autocomplete").parent().html(); var beforeHtml = $("#autocomplete").parent().html();
var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html(); var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
// TODO can't use same, as that would insert the markup unescaped into the test results, screwing up other tests // Opera 9 outputs role="" instead of removing the attribute like everyone else
ok( beforeHtml == afterHtml ); if ($.browser.opera) {
afterHtml = afterHtml.replace(/ role=""/g, "");
}
equal( afterHtml, beforeHtml, "before/after html should be the same" );
}) })
var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"]; var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"];

View File

@ -120,7 +120,7 @@ function source_test(source, async) {
} }
if (async) { if (async) {
stop(); stop();
setTimeout(result, 100); $(document).one("ajaxStop", result);
} else { } else {
result(); result();
} }

View File

@ -9,7 +9,11 @@ module("button: methods");
test("destroy", function() { test("destroy", function() {
var beforeHtml = $("#button").parent().html(); var beforeHtml = $("#button").parent().html();
var afterHtml = $("#button").button().button("destroy").parent().html(); var afterHtml = $("#button").button().button("destroy").parent().html();
same( beforeHtml, afterHtml ); // Opera 9 outputs role="" instead of removing the attribute like everyone else
if ($.browser.opera) {
afterHtml = afterHtml.replace(/ role=""/g, "");
}
equal( afterHtml, beforeHtml );
}); });
})(jQuery); })(jQuery);

View File

@ -15,6 +15,18 @@
<script type="text/javascript" src="core.js"></script> <script type="text/javascript" src="core.js"></script>
<script type="text/javascript" src="selector.js"></script> <script type="text/javascript" src="selector.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("core", function() { ok(true, "disabled core testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
<style type="text/css"> <style type="text/css">
.zindex {z-index: 100} .zindex {z-index: 100}
.absolute {position: absolute} .absolute {position: absolute}

View File

@ -16,7 +16,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="datepicker_core.js"></script> <script type="text/javascript" src="datepicker_core.js"></script>
<script type="text/javascript" src="datepicker_defaults.js"></script> <script type="text/javascript" src="datepicker_defaults.js"></script>
@ -24,6 +23,18 @@
<script type="text/javascript" src="datepicker_methods.js"></script> <script type="text/javascript" src="datepicker_methods.js"></script>
<script type="text/javascript" src="datepicker_options.js"></script> <script type="text/javascript" src="datepicker_options.js"></script>
<script type="text/javascript" src="datepicker_tickets.js"></script> <script type="text/javascript" src="datepicker_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("datepicker", function() { ok(true, "disabled datepicker testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -19,7 +19,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="dialog_core.js"></script> <script type="text/javascript" src="dialog_core.js"></script>
<script type="text/javascript" src="dialog_defaults.js"></script> <script type="text/javascript" src="dialog_defaults.js"></script>
@ -27,6 +26,18 @@
<script type="text/javascript" src="dialog_methods.js"></script> <script type="text/javascript" src="dialog_methods.js"></script>
<script type="text/javascript" src="dialog_options.js"></script> <script type="text/javascript" src="dialog_options.js"></script>
<script type="text/javascript" src="dialog_tickets.js"></script> <script type="text/javascript" src="dialog_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("dialog", function() { ok(true, "disabled dialog testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -13,7 +13,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="draggable_core.js"></script> <script type="text/javascript" src="draggable_core.js"></script>
<script type="text/javascript" src="draggable_defaults.js"></script> <script type="text/javascript" src="draggable_defaults.js"></script>
@ -21,6 +20,18 @@
<script type="text/javascript" src="draggable_methods.js"></script> <script type="text/javascript" src="draggable_methods.js"></script>
<script type="text/javascript" src="draggable_options.js"></script> <script type="text/javascript" src="draggable_options.js"></script>
<script type="text/javascript" src="draggable_tickets.js"></script> <script type="text/javascript" src="draggable_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("draggable", function() { ok(true, "disabled draggable testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -14,7 +14,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="droppable_core.js"></script> <script type="text/javascript" src="droppable_core.js"></script>
<script type="text/javascript" src="droppable_defaults.js"></script> <script type="text/javascript" src="droppable_defaults.js"></script>
@ -22,6 +21,18 @@
<script type="text/javascript" src="droppable_methods.js"></script> <script type="text/javascript" src="droppable_methods.js"></script>
<script type="text/javascript" src="droppable_options.js"></script> <script type="text/javascript" src="droppable_options.js"></script>
<script type="text/javascript" src="droppable_tickets.js"></script> <script type="text/javascript" src="droppable_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("droppable", function() { ok(true, "disabled droppable testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -43,5 +43,9 @@
<div style="position: absolute; height: 5000px; width: 5000px;"></div> <div style="position: absolute; height: 5000px; width: 5000px;"></div>
<div id="bug-5280" style="height: 30px; width: 201px;">
<div style="width: 50px; height: 10px;"></div>
</div>
</body> </body>
</html> </html>

View File

@ -3,6 +3,8 @@
*/ */
(function($) { (function($) {
module("position");
test('my, at, of', function() { test('my, at, of', function() {
$('#elx').position({ $('#elx').position({
my: 'left top', my: 'left top',
@ -330,4 +332,22 @@ test("collision: none, with offset", function() {
}, { top: -13, left: -12 }, "left top, negative offset"); }, { top: -13, left: -12 }, "left top, negative offset");
}); });
//test('bug #5280: consistent results (avoid fractional values)', function() {
// var wrapper = $('#bug-5280'),
// elem = wrapper.children(),
// offset1 = elem.position({
// my: 'center',
// at: 'center',
// of: wrapper,
// collision: 'none'
// }).offset(),
// offset2 = elem.position({
// my: 'center',
// at: 'center',
// of: wrapper,
// collision: 'none'
// }).offset();
// same(offset1, offset2);
//});
})(jQuery); })(jQuery);

View File

@ -21,8 +21,8 @@ test("accessibility", function() {
el.progressbar("disable"); el.progressbar("disable");
equals(el.attr("aria-disabled"), "true", "aria-disabled on"); equals(el.attr("aria-disabled"), "true", "aria-disabled on");
el.progressbar("enable"); el.progressbar("enable");
// FAIL: for some reason IE6 returns a boolean false instead of the string // FAIL: for some reason IE6 and 7 return a boolean false instead of the string
equals(el.attr("aria-disabled"), "false", "aria-disabled off"); equals(el.attr("aria-disabled"), $.browser.msie && $.browser.version == 6 || $.browser.version == 7 ? false : "false", "aria-disabled off");
}); });
})(jQuery); })(jQuery);

View File

@ -15,7 +15,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="resizable_core.js"></script> <script type="text/javascript" src="resizable_core.js"></script>
<script type="text/javascript" src="resizable_defaults.js"></script> <script type="text/javascript" src="resizable_defaults.js"></script>
@ -23,6 +22,18 @@
<script type="text/javascript" src="resizable_methods.js"></script> <script type="text/javascript" src="resizable_methods.js"></script>
<script type="text/javascript" src="resizable_options.js"></script> <script type="text/javascript" src="resizable_options.js"></script>
<script type="text/javascript" src="resizable_tickets.js"></script> <script type="text/javascript" src="resizable_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("resizable", function() { ok(true, "disabled resizable testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -13,7 +13,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="selectable_core.js"></script> <script type="text/javascript" src="selectable_core.js"></script>
<script type="text/javascript" src="selectable_defaults.js"></script> <script type="text/javascript" src="selectable_defaults.js"></script>
@ -21,6 +20,18 @@
<script type="text/javascript" src="selectable_methods.js"></script> <script type="text/javascript" src="selectable_methods.js"></script>
<script type="text/javascript" src="selectable_options.js"></script> <script type="text/javascript" src="selectable_options.js"></script>
<script type="text/javascript" src="selectable_tickets.js"></script> <script type="text/javascript" src="selectable_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("selectable", function() { ok(true, "disabled selectable testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -3,45 +3,54 @@
*/ */
(function($) { (function($) {
var el;
module( "slider: events" ); module( "slider: events" );
test( "start", function() {
ok( false, "missing test - untested code is broken code." );
});
test( "slide", function() {
ok( false, "missing test - untested code is broken code." );
});
//Specs from http://wiki.jqueryui.com/Slider#specs //Specs from http://wiki.jqueryui.com/Slider#specs
//"change callback: triggers when the slider has stopped moving and has a new //"change callback: triggers when the slider has stopped moving and has a new
// value (even if same as previous value), via mouse(mouseup) or keyboard(keyup) // value (even if same as previous value), via mouse(mouseup) or keyboard(keyup)
// or value method/option" // or value method/option"
test( "change", function() { test( "mouse based interaction", function() {
expect(8); expect(4);
var handle; var el = $( "<div></div>" )
// Test mouseup at end of handle slide (mouse)
el = $( "<div></div>" )
.appendTo( "body" ) .appendTo( "body" )
.slider({ .slider({
start: function(event, ui) {
equals( event.originalEvent.type, "mousedown", "start triggered by mousedown" );
},
slide: function(event, ui) {
equals( event.originalEvent.type, "mousemove", "slider triggered by mousemove" );
},
stop: function(event, ui) {
equals( event.originalEvent.type, "mouseup", "stop triggered by mouseup" );
},
change: function(event, ui) { change: function(event, ui) {
ok( true, "change triggered by mouseup at end of handle slide (mouse)" ); equals( event.originalEvent.type, "mouseup", "change triggered by mouseup" );
} }
}); });
el.find( ".ui-slider-handle" ).eq( 0 ) el.find( ".ui-slider-handle" ).eq( 0 )
.simulate( "drag", { dx: 10, dy: 10 } ); .simulate( "drag", { dx: 10, dy: 10 } );
reset(); });
test( "keyboard based interaction", function() {
expect(3);
// Test keyup at end of handle slide (keyboard) // Test keyup at end of handle slide (keyboard)
el = $( "<div></div>" ) var el = $( "<div></div>" )
.appendTo( "body" ) .appendTo( "body" )
.slider({ .slider({
start: function(event, ui) {
equals( event.originalEvent.type, "keydown", "start triggered by keydown" );
},
slide: function(event, ui) {
ok( false, "Slider never triggered by keys" );
},
stop: function(event, ui) {
equals( event.originalEvent.type, "keyup", "stop triggered by keyup" );
},
change: function(event, ui) { change: function(event, ui) {
ok( true, "change triggered by keyup at end of handle slide (keyboard)" ); equals( event.originalEvent.type, "keyup", "change triggered by keyup" );
} }
}); });
@ -50,9 +59,12 @@ test( "change", function() {
.simulate( "keypress", { keyCode: $.ui.keyCode.LEFT } ) .simulate( "keypress", { keyCode: $.ui.keyCode.LEFT } )
.simulate( "keyup", { keyCode: $.ui.keyCode.LEFT } ); .simulate( "keyup", { keyCode: $.ui.keyCode.LEFT } );
reset(); });
test( "programmatic event triggers", function() {
expect(6);
// Test value method // Test value method
el = $( "<div></div>" ) var el = $( "<div></div>" )
.slider({ .slider({
change: function(event, ui) { change: function(event, ui) {
ok( true, "change triggered by value method" ); ok( true, "change triggered by value method" );
@ -94,8 +106,4 @@ test( "change", function() {
}); });
test( "stop", function() {
ok( false, "missing test - untested code is broken code." );
});
}( jQuery ) ); }( jQuery ) );

View File

@ -11,10 +11,6 @@ function handle() {
module("slider: options"); module("slider: options");
test("animate", function() {
ok(false, "missing test - untested code is broken code.");
});
test("max", function() { test("max", function() {
el = $('<div></div>'); el = $('<div></div>');
@ -92,8 +88,51 @@ test("range", function() {
ok(false, "missing test - untested code is broken code."); ok(false, "missing test - untested code is broken code.");
}); });
//spec: http://wiki.jqueryui.com/Slider#specs
// value option/method: the value option is not restricted by min/max/step.
// What is returned by the value method is restricted by min (>=), max (<=), and step (even multiple)
test("step", function() { test("step", function() {
ok(false, "missing test - untested code is broken code."); var el = $('<div></div>').slider({
min: 0,
value: 0,
step: 10,
max: 100,
});
equals( el.slider("value"), 0 );
el.slider("value", 1);
equals( el.slider("value"), 0 );
el.slider("value", 9);
equals( el.slider("value"), 10 );
el.slider("value", 11);
equals( el.slider("value"), 10 );
el.slider("value", 19);
equals( el.slider("value"), 20 );
el = $('<div></div>').slider({
min: 0,
value: 0,
step: 20,
max: 100,
});
el.slider("value", 0);
el.slider("option", "value", 1);
equals( el.slider("value"), 0 );
el.slider("option", "value", 9);
equals( el.slider("value"), 0 );
el.slider("option", "value", 11);
equals( el.slider("value"), 20 );
el.slider("option", "value", 19);
equals( el.slider("value"), 20 );
el.slider('destroy');
}); });
test("value", function() { test("value", function() {

View File

@ -13,7 +13,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="sortable_core.js"></script> <script type="text/javascript" src="sortable_core.js"></script>
<script type="text/javascript" src="sortable_defaults.js"></script> <script type="text/javascript" src="sortable_defaults.js"></script>
@ -21,6 +20,18 @@
<script type="text/javascript" src="sortable_methods.js"></script> <script type="text/javascript" src="sortable_methods.js"></script>
<script type="text/javascript" src="sortable_options.js"></script> <script type="text/javascript" src="sortable_options.js"></script>
<script type="text/javascript" src="sortable_tickets.js"></script> <script type="text/javascript" src="sortable_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("sortable", function() { ok(true, "disabled sortable testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -84,7 +84,7 @@ test("enable", function() {
}); });
test("disable", function() { test("disable", function() {
expect(6); expect(7);
el = $("#sortable").sortable({ disabled: false }); el = $("#sortable").sortable({ disabled: false });
sort($("li", el)[0], 0, 40, 2, '.sortable({ disabled: false })'); sort($("li", el)[0], 0, 40, 2, '.sortable({ disabled: false })');
@ -97,6 +97,7 @@ test("disable", function() {
sort($("li", el)[0], 0, 40, 2, '.sortable({ disabled: false })'); sort($("li", el)[0], 0, 40, 2, '.sortable({ disabled: false })');
el.sortable("option", "disabled", true); el.sortable("option", "disabled", true);
equals(el.sortable("option", "disabled"), true, "disabled option setter"); equals(el.sortable("option", "disabled"), true, "disabled option setter");
ok(el.sortable("widget").is(":not(.ui-state-disabled)"), "sortable element does not get ui-state-disabled since it's an interaction");
sort($("li", el)[0], 0, 40, 0, '.sortable("option", "disabled", true)'); sort($("li", el)[0], 0, 40, 0, '.sortable("option", "disabled", true)');
var expected = $('<div></div>').sortable(), var expected = $('<div></div>').sortable(),

View File

@ -15,7 +15,6 @@
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../../external/qunit.js"></script>
<script type="text/javascript" src="../../jquery.simulate.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="tabs_core.js"></script> <script type="text/javascript" src="tabs_core.js"></script>
<script type="text/javascript" src="tabs_defaults.js"></script> <script type="text/javascript" src="tabs_defaults.js"></script>
@ -23,6 +22,18 @@
<script type="text/javascript" src="tabs_methods.js"></script> <script type="text/javascript" src="tabs_methods.js"></script>
<script type="text/javascript" src="tabs_options.js"></script> <script type="text/javascript" src="tabs_options.js"></script>
<script type="text/javascript" src="tabs_tickets.js"></script> <script type="text/javascript" src="tabs_tickets.js"></script>
<script type="text/javascript">
// disable this stale testsuite for testswarm only
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( url && url.indexOf("http") == 0 ) {
// reset config to kill previous tests; make sure testsuite.js is loaded afterwards to init the testswarm script
QUnit.init();
test("tabs", function() { ok(true, "disabled tabs testsuite"); });
}
</script>
<script type="text/javascript" src="../testsuite.js"></script>
</head> </head>
<body> <body>

View File

@ -35,6 +35,7 @@ test('ajax', function() {
selected: 2, selected: 2,
load: function() { load: function() {
// spinner: default spinner // spinner: default spinner
setTimeout(function() {
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed"); equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed"); equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
el.tabs('destroy'); el.tabs('destroy');
@ -48,6 +49,7 @@ test('ajax', function() {
start(); start();
} }
}); });
}, 1);
} }
}); });

View File

@ -0,0 +1,552 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Button Visual push: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<style type="text/css">
#toolbar { margin-top: 2em; padding:0.2em; }
#ops1, #ops2, #format, #mode { margin-right: 1em }
</style>
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.metadata.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
<script type="text/javascript">
$(function() {
$("button").button();
});
</script>
</head>
<body>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
<button>Simple button, only text</button>
<button class="{button:{icons:{primary:'ui-icon-locked'},text:false}}">Button with icon only</button>
<button class="{button:{icons:{primary:'ui-icon-locked'}}}">Button with icon on the left</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}}}">Button with two icons</button>
<button class="{button:{icons:{primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'},text:false}}">Button with two icons</button>
</body>
</html>

View File

@ -8,93 +8,120 @@
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$.widget("ui.drilldown", { $.widget("ui.drilldown", {
_init: function() { _init: function() {
var self = this; var self = this;
this.active = this.element; this.active = this.element.find(">ul").attr("tabindex", 0);
// hide submenus and create indicator icons // hide submenus and create indicator icons
this.element.find("ul").hide().prev("a").prepend('<span class="ui-icon ui-icon-carat-1-e"></span>').end().filter(":first").show(); this.element.find("ul").hide().prev("a").prepend('<span class="ui-icon ui-icon-carat-1-e"></span>').end().filter(":first").show();
this.element.find("ul").menu({ this.element.find("ul").menu({
focus: function(event, ui) {
self.activeItem = ui.item;
},
selected: function(event, ui) { selected: function(event, ui) {
var nested = $(">ul", ui.item); if (this != self.active[0]) {
if (!nested.length) {
self.element.find("h3").text(ui.item.text());
self.options.selected.apply(this, arguments);
return; return;
} }
self.active = ui.item.parent(); var nested = $(">ul", ui.item);
// put a previous submenu back into its place and hide it
self.hideDown();
if (nested.length) { if (nested.length) {
// append to body in order to display the submenu above the parent menu, instead of inside of it self._open(nested);
nested.appendTo(document.body).menu("deactivate").show().position({ } else {
my: "left top", self.element.find("h3").text(ui.item.text());
at: "left top", self.options.selected.apply(this, arguments);
of: self.element.children("ul:first")
// store the current submenu
}).data("menuparent", ui.item);
self.active.data("submenu", nested);
} }
} }
}); });
this.back = this.element.children(":last").button({
icons: {
primary: "ui-icon-carat-1-w"
}
}).click(function() {
self.up();
return false;
}).hide();
},
_open: function(submenu) {
this.active = submenu.show().css({
top: 0,
left: 0,
opacity: 0
}).position({
my: "left top",
at: "right top",
of: this.widget()
}).position({
my: "left top",
at: "left top",
of: this.widget(),
using: function(to) {
$(this).animate({
left: to.left,
top: to.top,
opacity: 1
});
}
});
this.back.show();
}, },
up: function() { up: function() {
if (!this.active.data("menuparent")) if (this.active.parent()[0] == this.element[0]) {
return; return;
this.hideDown(); }
this.active.menu("deactivate"); this.active.position({
this.active = this.active.data("menuparent").parent(); my: "left top",
at: "right top",
of: this.widget(),
using: function(to) {
$(this).animate({
left: to.left,
top: to.top,
opacity: 0
});
}
});
this.active = this.active.parent().parent().show();
this.activeItem = this.active.data("menu").active;
if (!this.active.parent().parent().is(":ui-menu")) {
this.back.hide();
}
}, },
down: function() { down: function(event) {
var submenu = this.active.data("submenu"); var nested = this.activeItem.find(">ul");
if (!submenu) if (nested.length) {
return; this._open(nested);
submenu.data("menu").activate(submenu.children(":first")) nested.menu("activate", event, nested.children(":first"))
this.active = submenu; }
}, },
show: function() { show: function() {
this.element.menu("deactivate").show();
this.active = this.element;
}, },
hide: function() { hide: function() {
this.hideDown();
var child = this.active.hide(), parent;
while(child.data("menuparent")) {
parent = child.data("menuparent");
child.appendTo(parent).removeData("menuparent");
child = parent.parent().removeData("submenu").hide();
}
}, },
hideDown: function() { widget: function() {
var submenu = this.active.data("submenu"); return this.element.find(">ul");
while(submenu) {
var parent = submenu.data("menuparent");
submenu.appendTo(parent).hide().removeData("menuparent");
parent.parent().removeData("submenu");
submenu = submenu.data("submenu");
};
} }
}); });
var nestedmenu = $("#drilldown").drilldown({ var drilldown = $("#drilldown").drilldown({
selected: function(event, ui) { selected: function(event, ui) {
$("#log").append("<div>Selected " + ui.item.text() + "</div>"); $("#log").append("<div>Selected " + ui.item.text() + "</div>");
} }
}); });
$().keydown(function(event) { drilldown.drilldown("widget").keydown(function(event) {
var menu = nestedmenu.data("drilldown").active.data("menu"); var menu = drilldown.data("drilldown").active.data("menu");
if (menu.widget().is(":hidden")) if (menu.widget().is(":hidden"))
return; return;
event.stopPropagation(); event.stopPropagation();
@ -109,10 +136,10 @@
menu.previous(); menu.previous();
break; break;
case $.ui.keyCode.LEFT: case $.ui.keyCode.LEFT:
nestedmenu.nestedmenu("up"); drilldown.drilldown("up");
break; break;
case $.ui.keyCode.RIGHT: case $.ui.keyCode.RIGHT:
nestedmenu.nestedmenu("down"); drilldown.drilldown("down");
break; break;
case $.ui.keyCode.DOWN: case $.ui.keyCode.DOWN:
menu.next(); menu.next();
@ -121,11 +148,11 @@
case $.ui.keyCode.ENTER: case $.ui.keyCode.ENTER:
case $.ui.keyCode.TAB: case $.ui.keyCode.TAB:
menu.select(); menu.select();
nestedmenu.nestedmenu("hide"); drilldown.drilldown("hide");
event.preventDefault(); event.preventDefault();
break; break;
case $.ui.keyCode.ESCAPE: case $.ui.keyCode.ESCAPE:
nestedmenu.nestedmenu("hide"); drilldown.drilldown("hide", event);
break; break;
default: default:
clearTimeout(menu.filterTimer); clearTimeout(menu.filterTimer);
@ -149,7 +176,7 @@
}); });
} }
if (match.length) { if (match.length) {
menu.activate(match); menu.activate(event, match);
if (match.length > 1) { if (match.length > 1) {
menu.previousFilter = character; menu.previousFilter = character;
menu.filterTimer = setTimeout(function() { menu.filterTimer = setTimeout(function() {
@ -168,6 +195,7 @@
<style> <style>
body { font-size:62.5%; } body { font-size:62.5%; }
.ui-menu { width: 200px; height: 170px; } .ui-menu { width: 200px; height: 170px; }
.ui-menu .ui-menu { position: absolute; }
.ui-menu .ui-icon { float: right; } .ui-menu .ui-icon { float: right; }
</style> </style>
</head> </head>
@ -219,6 +247,7 @@
<li><a href="#">Utrecht</a></li> <li><a href="#">Utrecht</a></li>
<li><a href="#">Zurich</a></li> <li><a href="#">Zurich</a></li>
</ul> </ul>
<a href="#">Go back</a>
</div> </div>
<div class="ui-widget" style="margin-top:2em; font-family:Arial"> <div class="ui-widget" style="margin-top:2em; font-family:Arial">

View File

@ -9,8 +9,16 @@
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$.fn.themeswitcher && $('<div/>').css({
position: "absolute",
right: 10,
top: 10
}).appendTo(document.body).themeswitcher();
$.widget("ui.nestedmenu", { $.widget("ui.nestedmenu", {
_init: function() { _init: function() {
var self = this; var self = this;
@ -24,77 +32,46 @@
focus: function(event, ui) { focus: function(event, ui) {
self.active = ui.item.parent(); self.active = ui.item.parent();
self.activeItem = ui.item; self.activeItem = ui.item;
// put a previous submenu back into its place and hide it ui.item.parent().find("ul").hide();
self.hideDown();
var nested = $(">ul", ui.item); var nested = $(">ul", ui.item);
// only for mouse-events (should actually check event.originalEvent.type, but for keys, originalEvent is undefined...)
if (nested.length && /^mouse/.test(event.originalEvent.type)) { if (nested.length && /^mouse/.test(event.originalEvent.type)) {
self._openSubmenu(nested, ui.item); self._open(nested);
} }
} }
}) })
}, },
_openSubmenu: function(nested, item) { _open: function(submenu) {
// append to body in order to display the submenu above the parent menu, instead of inside of it submenu.show().css({
nested.appendTo(document.body).menu("deactivate").show().position({ top: 0,
left: 0
}).position({
my: "left top", my: "left top",
at: "right top", at: "right top",
of: item of: this.activeItem
// store the current submenu });
}).data("menuparent", item);
this.active.data("submenu", nested);
}, },
up: function(event) { up: function(event) {
if (!this.active.data("menuparent")) this.active = this.active.menu("deactivate").hide().parent().parent();
return;
this.active.menu("deactivate");
this.active = this.active.data("menuparent").parent();
this.activeItem = this.active.data("menu").active; this.activeItem = this.active.data("menu").active;
this.hideDown();
}, },
down: function(event) { down: function(event) {
var submenu = this.active.data("submenu"); var submenu = $(">ul", this.activeItem);
if (!submenu && this.activeItem) { this._open(submenu, this.activeItem);
// try to open submenu or return(?); only mouseover opens submenu directly, key doesn't submenu.menu("activate", event, submenu.children(":first"));
var item = this.activeItem,
nested = item.children("ul");
if (!nested.length)
return;
this._openSubmenu(nested, item);
submenu = this.active.data("submenu");
}
submenu.data("menu").activate(event, submenu.children(":first"))
this.active = submenu;
}, },
show: function() { show: function() {
this.element.menu("deactivate").show();
this.active = this.element; this.active = this.element;
this.element.show();
}, },
hide: function() { hide: function() {
this.hideDown(); this.element.find("ul").andSelf().menu("deactivate").hide();
var child = this.active.hide(), parent;
while(child.data("menuparent")) {
parent = child.data("menuparent");
child.appendTo(parent).removeData("menuparent");
child = parent.parent().removeData("submenu").hide();
} }
},
hideDown: function() {
var submenu = this.active.data("submenu");
while(submenu) {
var parent = submenu.data("menuparent");
submenu.appendTo(parent).hide().removeData("menuparent");
parent.parent().removeData("submenu");
submenu = submenu.data("submenu");
};
}
}); });
var nestedmenu = $("#menu").nestedmenu({ var nestedmenu = $("#menu").nestedmenu({
@ -200,6 +177,10 @@
<body> <body>
<button>Show context menu</button> <button>Show context menu</button>
<br/>
<select>
<option>some option with some text</option>
</select>
<ul id="menu"> <ul id="menu">
<li> <li>

View File

@ -1,103 +0,0 @@
<!doctype html>
<html>
<head>
<title>Menu Visual Test: Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript">
$(function() {
$.fn.position2 = function(options) {
return this.css({
top: 0,
left: 0
}).position(options);
}
var menus = $("#menu").menu().position2({
my: "left top",
at: "center bottom",
of: "button"
}).find("ul").menu().hide();
var sub1 = menus.filter(":first").show().position2({
my: "left top",
at: "right center",
of: "#menu"
});
sub1.find("ul:first").show().position2({
of: sub1,
offset: "-10 50"
});
});
</script>
<style>
body { font-size:62.5%; }
.ui-menu { width: 200px; position: absolute; }
.ui-menu .ui-icon { float: right; }
ul, li {margin: 0; padding: 0}
</style>
</head>
<body>
<button>Show context menu</button>
<br/>
<select>
<option>some option with some text</option>
</select>
<ul id="menu">
<li>
<a href="#">Amsterdam</a>
<ul>
<li><a href="#">Aberdeen</a></li>
<li><a href="#">Ada</a></li>
<li>
<a href="#">Adamsville</a>
<ul>
<li><a href="#">Anaheim</a></li>
<li>
<a href="#">Cologne</a>
<ul>
<li><a href="#">Mberdeen</a></li>
<li><a href="#">Mda</a></li>
<li><a href="#">Mdamsville</a></li>
<li><a href="#">Mddyston</a></li>
<li><a href="#">Mmesville</a></li>
</ul>
</li>
<li><a href="#">Frankfurt</a></li>
</ul>
</li>
<li><a href="#">Addyston</a></li>
<li><a href="#">Amesville</a></li>
</ul>
</li>
<li><a href="#">Anaheim</a></li>
<li><a href="#">Cologne</a></li>
<li><a href="#">Frankfurt</a></li>
<li>
<a href="#">Magdeburg</a>
<ul>
<li><a href="#">Mberdeen</a></li>
<li><a href="#">Mda</a></li>
<li><a href="#">Mdamsville</a></li>
<li><a href="#">Mddyston</a></li>
<li><a href="#">Mmesville</a></li>
</ul>
</li>
<li><a href="#">Munich</a></li>
<li><a href="#">Utrecht</a></li>
<li><a href="#">Zurich</a></li>
</ul>
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
</body>
</html>

View File

@ -4,6 +4,8 @@
.ui-accordion .ui-accordion-li-fix { display: inline; } .ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
/* IE7-/Win - Fix extra vertical space in lists */
.ui-accordion a { zoom: 1; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }

View File

@ -20,6 +20,10 @@
.ui-menu .ui-menu-item { .ui-menu .ui-menu-item {
margin:0; margin:0;
padding: 0; padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
} }
.ui-menu .ui-menu-item a { .ui-menu .ui-menu-item a {
text-decoration:none; text-decoration:none;
@ -30,5 +34,6 @@
} }
.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active { .ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px; margin: -1px;
} }

View File

@ -7,5 +7,5 @@
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; } .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; } .ui-tabs .ui-tabs-hide { display: none !important; }

View File

@ -10,7 +10,7 @@ jQuery(function($){
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
'Lip','Sie','Wrz','Pa','Lis','Gru'], 'Lip','Sie','Wrz','Pa','Lis','Gru'],
dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'], dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
weekHeader: 'Tydz', weekHeader: 'Tydz',

View File

@ -74,11 +74,6 @@ $.widget("ui.accordion", {
//Append icon elements //Append icon elements
this._createIcons(); this._createIcons();
// IE7-/Win - Extra vertical space in lists fixed
if ($.browser.msie) {
this.element.find('a').css('zoom', '1');
}
this.resize(); this.resize();
//ARIA //ARIA
@ -145,9 +140,9 @@ $.widget("ui.accordion", {
this.headers this.headers
.unbind(".accordion") .unbind(".accordion")
.removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top") .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
.removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex"); .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabindex"); this.headers.find("a").removeAttr("tabIndex");
this._destroyIcons(); this._destroyIcons();
var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active"); var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
if (o.autoHeight || o.fillHeight) { if (o.autoHeight || o.fillHeight) {

View File

@ -70,7 +70,7 @@ $.widget( "ui.autocomplete", {
case keyCode.RIGHT: case keyCode.RIGHT:
case keyCode.SHIFT: case keyCode.SHIFT:
case keyCode.CONTROL: case keyCode.CONTROL:
case 18: case keyCode.ALT:
// ignore metakeys (shift, ctrl, alt) // ignore metakeys (shift, ctrl, alt)
break; break;
default: default:
@ -83,6 +83,7 @@ $.widget( "ui.autocomplete", {
} }
}) })
.bind( "focus.autocomplete", function() { .bind( "focus.autocomplete", function() {
self.selectedItem = null;
self.previous = self.element.val(); self.previous = self.element.val();
}) })
.bind( "blur.autocomplete", function( event ) { .bind( "blur.autocomplete", function( event ) {
@ -91,6 +92,7 @@ $.widget( "ui.autocomplete", {
// TODO try to implement this without a timeout, see clearTimeout in search() // TODO try to implement this without a timeout, see clearTimeout in search()
self.closing = setTimeout(function() { self.closing = setTimeout(function() {
self.close( event ); self.close( event );
self._change( event );
}, 150 ); }, 150 );
}); });
this._initSource(); this._initSource();
@ -116,11 +118,13 @@ $.widget( "ui.autocomplete", {
self.element.val( item.value ); self.element.val( item.value );
} }
self.close( event ); self.close( event );
self.previous = self.element.val();
// only trigger when focus was lost (click on menu) // only trigger when focus was lost (click on menu)
var previous = self.previous;
if ( self.element[0] !== doc.activeElement ) { if ( self.element[0] !== doc.activeElement ) {
self.element.focus(); self.element.focus();
self.previous = previous;
} }
self.selectedItem = item;
}, },
blur: function( event, ui ) { blur: function( event, ui ) {
if ( self.menu.element.is(":visible") ) { if ( self.menu.element.is(":visible") ) {
@ -140,7 +144,7 @@ $.widget( "ui.autocomplete", {
destroy: function() { destroy: function() {
this.element this.element
.removeClass( "ui-autocomplete-input ui-widget ui-widget-content" ) .removeClass( "ui-autocomplete-input" )
.removeAttr( "autocomplete" ) .removeAttr( "autocomplete" )
.removeAttr( "role" ) .removeAttr( "role" )
.removeAttr( "aria-autocomplete" ) .removeAttr( "aria-autocomplete" )
@ -162,11 +166,7 @@ $.widget( "ui.autocomplete", {
if ( $.isArray(this.options.source) ) { if ( $.isArray(this.options.source) ) {
array = this.options.source; array = this.options.source;
this.source = function( request, response ) { this.source = function( request, response ) {
// escape regex characters response( $.ui.autocomplete.filter(array, request.term) );
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
response( $.grep( array, function(value) {
return matcher.test( value.label || value.value || value );
}) );
}; };
} else if ( typeof this.options.source === "string" ) { } else if ( typeof this.options.source === "string" ) {
url = this.options.source; url = this.options.source;
@ -219,8 +219,11 @@ $.widget( "ui.autocomplete", {
this.menu.element.hide(); this.menu.element.hide();
this.menu.deactivate(); this.menu.deactivate();
} }
},
_change: function( event ) {
if ( this.previous !== this.element.val() ) { if ( this.previous !== this.element.val() ) {
this._trigger( "change", event ); this._trigger( "change", event, { item: this.selectedItem } );
} }
}, },
@ -301,6 +304,12 @@ $.widget( "ui.autocomplete", {
$.extend( $.ui.autocomplete, { $.extend( $.ui.autocomplete, {
escapeRegex: function( value ) { escapeRegex: function( value ) {
return value.replace( /([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1" ); return value.replace( /([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1" );
},
filter: function(array, term) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
return $.grep( array, function(value) {
return matcher.test( value.label || value.value || value );
});
} }
}); });

View File

@ -70,6 +70,7 @@ $.ui = {
}, },
keyCode: { keyCode: {
ALT: 18,
BACKSPACE: 8, BACKSPACE: 8,
CAPS_LOCK: 20, CAPS_LOCK: 20,
COMMA: 188, COMMA: 188,
@ -117,15 +118,13 @@ $.fn.extend({
enableSelection: function() { enableSelection: function() {
return this return this
.attr('unselectable', 'off') .attr('unselectable', 'off')
.css('MozUserSelect', '') .css('MozUserSelect', '');
.unbind('selectstart.ui');
}, },
disableSelection: function() { disableSelection: function() {
return this return this
.attr('unselectable', 'on') .attr('unselectable', 'on')
.css('MozUserSelect', 'none') .css('MozUserSelect', 'none');
.bind('selectstart.ui', function() { return false; });
}, },
scrollParent: function() { scrollParent: function() {

View File

@ -622,8 +622,11 @@ $.widget("ui.dialog", {
// reset content sizing // reset content sizing
// hide for non content measurement because height: 0 doesn't work in IE quirks mode (see #4350) // hide for non content measurement because height: 0 doesn't work in IE quirks mode (see #4350)
this.element.css('width', 'auto') this.element.css({
.height(0); width: 'auto',
minHeight: 0,
height: 0
});
// reset wrapper sizing // reset wrapper sizing
// determine the height of all the non-content elements // determine the height of all the non-content elements

View File

@ -113,6 +113,10 @@ $.fn.position = function( options ) {
position.top -= elemHeight / 2; position.top -= elemHeight / 2;
} }
// prevent fractions (see #5280)
position.left = parseInt( position.left );
position.top = parseInt( position.top );
$.each( [ "left", "top" ], function( i, dir ) { $.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[i] ] ) { if ( $.ui.position[ collision[i] ] ) {
$.ui.position[ collision[i] ][ dir ]( position, { $.ui.position[ collision[i] ][ dir ]( position, {

643
ui/jquery.ui.slider.js vendored
View File

@ -13,28 +13,32 @@
* jquery.ui.widget.js * jquery.ui.widget.js
*/ */
(function($) { (function( $ ) {
// number of pages in a slider // number of pages in a slider
// (how many times can you page up/down to go through the whole range) // (how many times can you page up/down to go through the whole range)
var numPages = 5; var numPages = 5;
$.widget("ui.slider", $.ui.mouse, { $.widget( "ui.slider", $.ui.mouse, {
widgetEventPrefix: "slide", widgetEventPrefix: "slide",
options: { options: {
animate: false, animate: false,
distance: 0, distance: 0,
max: 100, max: 100,
min: 0, min: 0,
orientation: 'horizontal', orientation: "horizontal",
range: false, range: false,
step: 1, step: 1,
value: 0, value: 0,
values: null values: null
}, },
_create: function() {
var self = this, o = this.options; _create: function() {
var self = this,
o = this.options;
this._keySliding = false; this._keySliding = false;
this._mouseSliding = false; this._mouseSliding = false;
this._animateOff = true; this._animateOff = true;
@ -43,98 +47,105 @@ $.widget("ui.slider", $.ui.mouse, {
this._mouseInit(); this._mouseInit();
this.element this.element
.addClass("ui-slider" .addClass( "ui-slider" +
+ " ui-slider-" + this.orientation " ui-slider-" + this.orientation +
+ " ui-widget" " ui-widget" +
+ " ui-widget-content" " ui-widget-content" +
+ " ui-corner-all"); " ui-corner-all" );
if (o.disabled) { if ( o.disabled ) {
this.element.addClass('ui-slider-disabled ui-disabled'); this.element.addClass( "ui-slider-disabled ui-disabled" );
} }
this.range = $([]); this.range = $([]);
if (o.range) { if ( o.range ) {
if ( o.range === true ) {
if (o.range === true) { this.range = $( "<div></div>" );
this.range = $('<div></div>'); if ( !o.values ) {
if (!o.values) o.values = [this._valueMin(), this._valueMin()]; o.values = [ this._valueMin(), this._valueMin() ];
if (o.values.length && o.values.length != 2) { }
o.values = [o.values[0], o.values[0]]; if ( o.values.length && o.values.length !== 2 ) {
o.values = [ o.values[0], o.values[0] ];
} }
} else { } else {
this.range = $('<div></div>'); this.range = $( "<div></div>" );
} }
this.range this.range
.appendTo(this.element) .appendTo( this.element )
.addClass("ui-slider-range"); .addClass( "ui-slider-range" );
if (o.range == "min" || o.range == "max") { if ( o.range === "min" || o.range === "max" ) {
this.range.addClass("ui-slider-range-" + o.range); this.range.addClass( "ui-slider-range-" + o.range );
} }
// note: this isn't the most fittingly semantic framework class for this element, // note: this isn't the most fittingly semantic framework class for this element,
// but worked best visually with a variety of themes // but worked best visually with a variety of themes
this.range.addClass("ui-widget-header"); this.range.addClass( "ui-widget-header" );
} }
if ($(".ui-slider-handle", this.element).length == 0) if ( $( ".ui-slider-handle", this.element ).length === 0 ) {
$('<a href="#"></a>') $( "<a href='#'></a>" )
.appendTo(this.element) .appendTo( this.element )
.addClass("ui-slider-handle"); .addClass( "ui-slider-handle" );
if (o.values && o.values.length) {
while ($(".ui-slider-handle", this.element).length < o.values.length)
$('<a href="#"></a>')
.appendTo(this.element)
.addClass("ui-slider-handle");
} }
this.handles = $(".ui-slider-handle", this.element) if ( o.values && o.values.length ) {
.addClass("ui-state-default" while ( $(".ui-slider-handle", this.element).length < o.values.length ) {
+ " ui-corner-all"); $( "<a href='#'></a>" )
.appendTo( this.element )
.addClass( "ui-slider-handle" );
}
}
this.handle = this.handles.eq(0); this.handles = $( ".ui-slider-handle", this.element )
.addClass( "ui-state-default" +
" ui-corner-all" );
this.handles.add(this.range).filter("a") this.handle = this.handles.eq( 0 );
.click(function(event) {
this.handles.add( this.range ).filter( "a" )
.click(function( event ) {
event.preventDefault(); event.preventDefault();
}) })
.hover(function() { .hover(function() {
if (!o.disabled) { if ( !o.disabled ) {
$(this).addClass('ui-state-hover'); $( this ).addClass( "ui-state-hover" );
} }
}, function() { }, function() {
$(this).removeClass('ui-state-hover'); $( this ).removeClass( "ui-state-hover" );
}) })
.focus(function() { .focus(function() {
if (!o.disabled) { if ( !o.disabled ) {
$(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus'); $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
$( this ).addClass( "ui-state-focus" );
} else { } else {
$(this).blur(); $( this ).blur();
} }
}) })
.blur(function() { .blur(function() {
$(this).removeClass('ui-state-focus'); $( this ).removeClass( "ui-state-focus" );
}); });
this.handles.each(function(i) { this.handles.each(function( i ) {
$(this).data("index.ui-slider-handle", i); $( this ).data( "index.ui-slider-handle", i );
}); });
this.handles.keydown(function(event) { this.handles
.keydown(function( event ) {
var ret = true,
index = $( this ).data( "index.ui-slider-handle" ),
allowed,
curVal,
newVal,
step;
var ret = true; if ( self.options.disabled ) {
var index = $(this).data("index.ui-slider-handle");
if (self.options.disabled)
return; return;
}
switch (event.keyCode) { switch ( event.keyCode ) {
case $.ui.keyCode.HOME: case $.ui.keyCode.HOME:
case $.ui.keyCode.END: case $.ui.keyCode.END:
case $.ui.keyCode.PAGE_UP: case $.ui.keyCode.PAGE_UP:
@ -144,22 +155,25 @@ $.widget("ui.slider", $.ui.mouse, {
case $.ui.keyCode.DOWN: case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT: case $.ui.keyCode.LEFT:
ret = false; ret = false;
if (!self._keySliding) { if ( !self._keySliding ) {
self._keySliding = true; self._keySliding = true;
$(this).addClass("ui-state-active"); $( this ).addClass( "ui-state-active" );
self._start(event, index); allowed = self._start( event, index );
if ( allowed === false ) {
return;
}
} }
break; break;
} }
var curVal, newVal, step = self._step(); step = self.options.step;
if (self.options.values && self.options.values.length) { if ( self.options.values && self.options.values.length ) {
curVal = newVal = self.values(index); curVal = newVal = self.values( index );
} else { } else {
curVal = newVal = self.value(); curVal = newVal = self.value();
} }
switch (event.keyCode) { switch ( event.keyCode ) {
case $.ui.keyCode.HOME: case $.ui.keyCode.HOME:
newVal = self._valueMin(); newVal = self._valueMin();
break; break;
@ -167,36 +181,40 @@ $.widget("ui.slider", $.ui.mouse, {
newVal = self._valueMax(); newVal = self._valueMax();
break; break;
case $.ui.keyCode.PAGE_UP: case $.ui.keyCode.PAGE_UP:
newVal = curVal + ((self._valueMax() - self._valueMin()) / numPages); newVal = curVal + ( (self._valueMax() - self._valueMin()) / numPages );
break; break;
case $.ui.keyCode.PAGE_DOWN: case $.ui.keyCode.PAGE_DOWN:
newVal = curVal - ((self._valueMax() - self._valueMin()) / numPages); newVal = curVal - ( (self._valueMax() - self._valueMin()) / numPages );
break; break;
case $.ui.keyCode.UP: case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT: case $.ui.keyCode.RIGHT:
if(curVal == self._valueMax()) return; if ( curVal === self._valueMax() ) {
return;
}
newVal = curVal + step; newVal = curVal + step;
break; break;
case $.ui.keyCode.DOWN: case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT: case $.ui.keyCode.LEFT:
if(curVal == self._valueMin()) return; if ( curVal === self._valueMin() ) {
return;
}
newVal = curVal - step; newVal = curVal - step;
break; break;
} }
self._slide(event, index, newVal); self._slide( event, index, newVal );
return ret; return ret;
}).keyup(function(event) { })
.keyup(function( event ) {
var index = $( this ).data( "index.ui-slider-handle" );
var index = $(this).data("index.ui-slider-handle"); if ( self._keySliding ) {
if (self._keySliding) {
self._keySliding = false; self._keySliding = false;
self._stop(event, index); self._stop( event, index );
self._change(event, index); self._change( event, index );
$(this).removeClass("ui-state-active"); $( this ).removeClass( "ui-state-active" );
} }
}); });
@ -204,36 +222,43 @@ $.widget("ui.slider", $.ui.mouse, {
this._refreshValue(); this._refreshValue();
this._animateOff = false; this._animateOff = false;
}, },
destroy: function() { destroy: function() {
this.handles.remove(); this.handles.remove();
this.range.remove(); this.range.remove();
this.element this.element
.removeClass("ui-slider" .removeClass( "ui-slider" +
+ " ui-slider-horizontal" " ui-slider-horizontal" +
+ " ui-slider-vertical" " ui-slider-vertical" +
+ " ui-slider-disabled" " ui-slider-disabled" +
+ " ui-widget" " ui-widget" +
+ " ui-widget-content" " ui-widget-content" +
+ " ui-corner-all") " ui-corner-all" )
.removeData("slider") .removeData( "slider" )
.unbind(".slider"); .unbind( ".slider" );
this._mouseDestroy(); this._mouseDestroy();
return this; return this;
}, },
_mouseCapture: function(event) { _mouseCapture: function( event ) {
var o = this.options,
position,
normValue,
distance,
closestHandle,
self,
index,
allowed,
offset,
mouseOverHandle;
var o = this.options; if ( o.disabled ) {
if (o.disabled)
return false; return false;
}
this.elementSize = { this.elementSize = {
width: this.element.outerWidth(), width: this.element.outerWidth(),
@ -241,16 +266,15 @@ $.widget("ui.slider", $.ui.mouse, {
}; };
this.elementOffset = this.element.offset(); this.elementOffset = this.element.offset();
var position = { x: event.pageX, y: event.pageY }; position = { x: event.pageX, y: event.pageY };
var normValue = this._normValueFromMouse(position); normValue = this._normValueFromMouse( position );
distance = this._valueMax() - this._valueMin() + 1;
var distance = this._valueMax() - this._valueMin() + 1, closestHandle; self = this;
var self = this, index; this.handles.each(function( i ) {
this.handles.each(function(i) { var thisDistance = Math.abs( normValue - self.values(i) );
var thisDistance = Math.abs(normValue - self.values(i)); if ( distance > thisDistance ) {
if (distance > thisDistance) {
distance = thisDistance; distance = thisDistance;
closestHandle = $(this); closestHandle = $( this );
index = i; index = i;
} }
}); });
@ -258,216 +282,218 @@ $.widget("ui.slider", $.ui.mouse, {
// workaround for bug #3736 (if both handles of a range are at 0, // workaround for bug #3736 (if both handles of a range are at 0,
// the first is always used as the one with least distance, // the first is always used as the one with least distance,
// and moving it is obviously prevented by preventing negative ranges) // and moving it is obviously prevented by preventing negative ranges)
if(o.range == true && this.values(1) == o.min) { if( o.range === true && this.values(1) === o.min ) {
closestHandle = $(this.handles[++index]); index += 1;
closestHandle = $( this.handles[index] );
} }
this._start(event, index); allowed = this._start( event, index );
if ( allowed === false ) {
return false;
}
this._mouseSliding = true; this._mouseSliding = true;
self._handleIndex = index; self._handleIndex = index;
closestHandle closestHandle
.addClass("ui-state-active") .addClass( "ui-state-active" )
.focus(); .focus();
var offset = closestHandle.offset(); offset = closestHandle.offset();
var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle'); mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
left: event.pageX - offset.left - (closestHandle.width() / 2), left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
top: event.pageY - offset.top top: event.pageY - offset.top -
- (closestHandle.height() / 2) ( closestHandle.height() / 2 ) -
- (parseInt(closestHandle.css('borderTopWidth'),10) || 0) ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- (parseInt(closestHandle.css('borderBottomWidth'),10) || 0) ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
+ (parseInt(closestHandle.css('marginTop'),10) || 0) ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
}; };
normValue = this._normValueFromMouse(position); normValue = this._normValueFromMouse( position );
this._slide(event, index, normValue); this._slide( event, index, normValue );
this._animateOff = true; this._animateOff = true;
return true; return true;
}, },
_mouseStart: function(event) { _mouseStart: function( event ) {
return true; return true;
}, },
_mouseDrag: function(event) { _mouseDrag: function( event ) {
var position = { x: event.pageX, y: event.pageY },
normValue = this._normValueFromMouse( position );
var position = { x: event.pageX, y: event.pageY }; this._slide( event, this._handleIndex, normValue );
var normValue = this._normValueFromMouse(position);
this._slide(event, this._handleIndex, normValue);
return false; return false;
}, },
_mouseStop: function(event) { _mouseStop: function( event ) {
this.handles.removeClass( "ui-state-active" );
this.handles.removeClass("ui-state-active");
this._mouseSliding = false; this._mouseSliding = false;
this._stop(event, this._handleIndex);
this._change(event, this._handleIndex); this._stop( event, this._handleIndex );
this._change( event, this._handleIndex );
this._handleIndex = null; this._handleIndex = null;
this._clickOffset = null; this._clickOffset = null;
this._animateOff = false; this._animateOff = false;
return false;
return false;
}, },
_detectOrientation: function() { _detectOrientation: function() {
this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal'; this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
}, },
_normValueFromMouse: function(position) { _normValueFromMouse: function( position ) {
var pixelTotal,
pixelMouse,
percentMouse,
valueTotal,
valueMouse;
var pixelTotal, pixelMouse; if ( this.orientation === "horizontal" ) {
if ('horizontal' == this.orientation) {
pixelTotal = this.elementSize.width; pixelTotal = this.elementSize.width;
pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0); pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
} else { } else {
pixelTotal = this.elementSize.height; pixelTotal = this.elementSize.height;
pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0); pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
} }
var percentMouse = (pixelMouse / pixelTotal); percentMouse = ( pixelMouse / pixelTotal );
if (percentMouse > 1) percentMouse = 1; if ( percentMouse > 1 ) {
if (percentMouse < 0) percentMouse = 0; percentMouse = 1;
if ('vertical' == this.orientation) }
if ( percentMouse < 0 ) {
percentMouse = 0;
}
if ( this.orientation === "vertical" ) {
percentMouse = 1 - percentMouse; percentMouse = 1 - percentMouse;
}
var valueTotal = this._valueMax() - this._valueMin(), valueTotal = this._valueMax() - this._valueMin();
valueMouse = percentMouse * valueTotal, valueMouse = this._valueMin() + percentMouse * valueTotal;
valueMouseModStep = valueMouse % this.options.step,
normValue = this._valueMin() + valueMouse - valueMouseModStep;
if (valueMouseModStep > (this.options.step / 2))
normValue += this.options.step;
// Since JavaScript has problems with large floats, round
// the final value to 5 digits after the decimal point (see #4124)
return parseFloat(normValue.toFixed(5));
return this._trimAlignValue( valueMouse );
}, },
_start: function(event, index) { _start: function( event, index ) {
var uiHash = { var uiHash = {
handle: this.handles[index], handle: this.handles[ index ],
value: this.value() value: this.value()
}; };
if (this.options.values && this.options.values.length) { if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values(index); uiHash.value = this.values( index );
uiHash.values = this.values(); uiHash.values = this.values();
} }
this._trigger("start", event, uiHash); return this._trigger( "start", event, uiHash );
}, },
_slide: function(event, index, newVal) { _slide: function( event, index, newVal ) {
var otherVal,
newValues,
allowed;
var handle = this.handles[index]; if ( this.options.values && this.options.values.length ) {
otherVal = this.values( index ? 0 : 1 );
if (this.options.values && this.options.values.length) { if ( ( this.options.values.length === 2 && this.options.range === true ) &&
( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
var otherVal = this.values(index ? 0 : 1); ) {
if ((this.options.values.length == 2 && this.options.range === true) &&
((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){
newVal = otherVal; newVal = otherVal;
} }
if (newVal != this.values(index)) { if ( newVal !== this.values( index ) ) {
var newValues = this.values(); newValues = this.values();
newValues[index] = newVal; newValues[ index ] = newVal;
// A slide can be canceled by returning false from the slide callback // A slide can be canceled by returning false from the slide callback
var allowed = this._trigger("slide", event, { allowed = this._trigger( "slide", event, {
handle: this.handles[index], handle: this.handles[ index ],
value: newVal, value: newVal,
values: newValues values: newValues
}); } );
var otherVal = this.values(index ? 0 : 1); otherVal = this.values( index ? 0 : 1 );
if (allowed !== false) { if ( allowed !== false ) {
this.values(index, newVal, true); this.values( index, newVal, true );
} }
} }
} else { } else {
if ( newVal !== this.value() ) {
if (newVal != this.value()) {
// A slide can be canceled by returning false from the slide callback // A slide can be canceled by returning false from the slide callback
var allowed = this._trigger("slide", event, { allowed = this._trigger( "slide", event, {
handle: this.handles[index], handle: this.handles[ index ],
value: newVal value: newVal
}); } );
if (allowed !== false) { if ( allowed !== false ) {
this.value(newVal); this.value( newVal );
} }
} }
} }
}, },
_stop: function(event, index) { _stop: function( event, index ) {
var uiHash = { var uiHash = {
handle: this.handles[index], handle: this.handles[ index ],
value: this.value() value: this.value()
}; };
if (this.options.values && this.options.values.length) { if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values(index); uiHash.value = this.values( index );
uiHash.values = this.values(); uiHash.values = this.values();
} }
this._trigger("stop", event, uiHash);
this._trigger( "stop", event, uiHash );
}, },
_change: function(event, index) { _change: function( event, index ) {
if (!this._keySliding && !this._mouseSliding) { if ( !this._keySliding && !this._mouseSliding ) {
var uiHash = { var uiHash = {
handle: this.handles[index], handle: this.handles[ index ],
value: this.value() value: this.value()
}; };
if (this.options.values && this.options.values.length) { if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values(index); uiHash.value = this.values( index );
uiHash.values = this.values(); uiHash.values = this.values();
} }
this._trigger("change", event, uiHash);
this._trigger( "change", event, uiHash );
} }
}, },
value: function(newValue) { value: function( newValue ) {
if ( arguments.length ) {
if (arguments.length) { this.options.value = this._trimAlignValue( newValue );
this.options.value = this._trimValue(newValue);
this._refreshValue(); this._refreshValue();
this._change(null, 0); this._change( null, 0 );
} }
return this._value(); return this._value();
}, },
values: function(index, newValue) { values: function( index, newValue ) {
var vals,
newValues,
i;
if (arguments.length > 1) { if ( arguments.length > 1 ) {
this.options.values[index] = this._trimValue(newValue); this.options.values[ index ] = this._trimAlignValue( newValue );
this._refreshValue(); this._refreshValue();
this._change(null, index); this._change( null, index );
} }
if (arguments.length) { if ( arguments.length ) {
if ($.isArray(arguments[0])) { if ( $.isArray( arguments[ 0 ] ) ) {
var vals = this.options.values, newValues = arguments[0]; vals = this.options.values;
for (var i = 0, l = vals.length; i < l; i++) { newValues = arguments[ 0 ];
vals[i] = this._trimValue(newValues[i]); for ( i = 0; i < vals.length; i += 1 ) {
this._change(null, i); vals[ i ] = this._trimAlignValue( newValues[ i ] );
this._change( null, i );
} }
this._refreshValue(); this._refreshValue();
} else { } else {
if (this.options.values && this.options.values.length) { if ( this.options.values && this.options.values.length ) {
return this._values(index); return this._values( index );
} else { } else {
return this.value(); return this.value();
} }
@ -475,155 +501,182 @@ $.widget("ui.slider", $.ui.mouse, {
} else { } else {
return this._values(); return this._values();
} }
}, },
_setOption: function(key, value) { _setOption: function( key, value ) {
var i, var i,
valsLength = 0; valsLength = 0;
if ( jQuery.isArray(this.options.values) ) {
if ( $.isArray( this.options.values ) ) {
valsLength = this.options.values.length; valsLength = this.options.values.length;
}; }
$.Widget.prototype._setOption.apply(this, arguments); $.Widget.prototype._setOption.apply( this, arguments );
switch (key) { switch ( key ) {
case 'disabled': case "disabled":
if (value) { if ( value ) {
this.handles.filter(".ui-state-focus").blur(); this.handles.filter( ".ui-state-focus" ).blur();
this.handles.removeClass("ui-state-hover"); this.handles.removeClass( "ui-state-hover" );
this.handles.attr("disabled", "disabled"); this.handles.attr( "disabled", "disabled" );
this.element.addClass("ui-disabled"); this.element.addClass( "ui-disabled" );
} else { } else {
this.handles.removeAttr("disabled"); this.handles.removeAttr( "disabled" );
this.element.removeClass("ui-disabled"); this.element.removeClass( "ui-disabled" );
} }
case 'orientation': break;
case "orientation":
this._detectOrientation(); this._detectOrientation();
this.element this.element
.removeClass("ui-slider-horizontal ui-slider-vertical") .removeClass( "ui-slider-horizontal ui-slider-vertical" )
.addClass("ui-slider-" + this.orientation); .addClass( "ui-slider-" + this.orientation );
this._refreshValue(); this._refreshValue();
break; break;
case 'value': case "value":
this._animateOff = true; this._animateOff = true;
this._refreshValue(); this._refreshValue();
this._change(null, 0); this._change( null, 0 );
this._animateOff = false; this._animateOff = false;
break; break;
case 'values': case "values":
this._animateOff = true; this._animateOff = true;
this._refreshValue(); this._refreshValue();
for (i = 0; i < valsLength; i++) { for ( i = 0; i < valsLength; i += 1 ) {
this._change(null, i); this._change( null, i );
} }
this._animateOff = false; this._animateOff = false;
break; break;
} }
}, },
_step: function() {
var step = this.options.step;
return step;
},
_value: function() {
//internal value getter //internal value getter
// _value() returns value trimmed by min and max // _value() returns value trimmed by min and max, aligned by step
_value: function() {
var val = this.options.value; var val = this.options.value;
val = this._trimValue(val); val = this._trimAlignValue( val );
return val; return val;
}, },
_values: function(index) {
//internal values getter //internal values getter
// _values() returns array of values trimmed by min and max // _values() returns array of values trimmed by min and max, aligned by step
// _values(index) returns single value trimmed by min and max // _values( index ) returns single value trimmed by min and max, aligned by step
_values: function( index ) {
var val,
vals,
i;
if (arguments.length) { if ( arguments.length ) {
var val = this.options.values[index]; val = this.options.values[ index ];
val = this._trimValue(val); val = this._trimAlignValue( val );
return val; return val;
} else { } else {
// .slice() creates a copy of the array // .slice() creates a copy of the array
// this copy gets trimmed by min and max and then returned // this copy gets trimmed by min and max and then returned
var vals = this.options.values.slice(); vals = this.options.values.slice();
for (var i = 0, l = vals.length; i < l; i++) { for ( i = 0; i < vals.length; i+= 1) {
vals[i] = this._trimValue(vals[i]); vals[ i ] = this._trimAlignValue( vals[ i ] );
} }
return vals; return vals;
} }
}, },
_trimValue: function(val) { // returns the step-aligned value that val is closest to, between (inclusive) min and max
if (val < this._valueMin()) val = this._valueMin(); _trimAlignValue: function( val ) {
if (val > this._valueMax()) val = this._valueMax(); if ( val < this._valueMin() ) {
return this._valueMin();
}
if ( val > this._valueMax() ) {
return this._valueMax();
}
var step = this.options.step,
valModStep = val % step,
alignValue = val - valModStep;
return val; if ( valModStep >= ( step / 2 ) ) {
alignValue += step;
}
// Since JavaScript has problems with large floats, round
// the final value to 5 digits after the decimal point (see #4124)
return parseFloat( alignValue.toFixed(5) );
}, },
_valueMin: function() { _valueMin: function() {
var valueMin = this.options.min; return this.options.min;
return valueMin;
}, },
_valueMax: function() { _valueMax: function() {
var valueMax = this.options.max; return this.options.max;
return valueMax;
}, },
_refreshValue: function() { _refreshValue: function() {
var oRange = this.options.range,
o = this.options,
self = this,
animate = ( !this._animateOff ) ? o.animate : false,
valPercent,
_set = {},
lastValPercent,
value,
valueMin,
valueMax;
var oRange = this.options.range, o = this.options, self = this; if ( this.options.values && this.options.values.length ) {
var animate = (!this._animateOff) ? o.animate : false; this.handles.each(function( i, j ) {
valPercent = ( self.values(i) - self._valueMin() ) / ( self._valueMax() - self._valueMin() ) * 100;
if (this.options.values && this.options.values.length) { _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
var vp0, vp1; $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
this.handles.each(function(i, j) { if ( self.options.range === true ) {
var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100; if ( self.orientation === "horizontal" ) {
var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%'; if ( i === 0 ) {
$(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate); self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
if (self.options.range === true) { }
if (self.orientation == 'horizontal') { if ( i === 1 ) {
(i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate); self.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
(i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate }); }
} else { } else {
(i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate); if ( i === 0 ) {
(i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate }); self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
}
if ( i === 1 ) {
self.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
}
} }
} }
lastValPercent = valPercent; lastValPercent = valPercent;
}); });
} else { } else {
var value = this.value(), value = this.value();
valueMin = this._valueMin(), valueMin = this._valueMin();
valueMax = this._valueMax(), valueMax = this._valueMax();
valPercent = valueMax != valueMin valPercent = ( valueMax !== valueMin ) ?
? (value - valueMin) / (valueMax - valueMin) * 100 ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
: 0; 0;
var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%'; _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate); this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
(oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate); if ( oRange === "min" && this.orientation === "horizontal" ) {
(oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate }); this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
(oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate); }
(oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate }); if ( oRange === "max" && this.orientation === "horizontal" ) {
this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
}
if ( oRange === "min" && this.orientation === "vertical" ) {
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
}
if ( oRange === "max" && this.orientation === "vertical" ) {
this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
}
} }
} }
}); });
$.extend($.ui.slider, { $.extend( $.ui.slider, {
version: "@VERSION" version: "@VERSION"
}); });
})(jQuery); }(jQuery));

View File

@ -73,6 +73,18 @@ $.widget("ui.sortable", $.ui.mouse, {
return this; return this;
}, },
_setOption: function(key, value){
if ( key === "disabled" ) {
this.options[ key ] = value;
this.widget()
[ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
} else {
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
$.Widget.prototype._setOption.apply(self, arguments);
}
},
_mouseCapture: function(event, overrideHandle) { _mouseCapture: function(event, overrideHandle) {
if (this.reverting) { if (this.reverting) {

View File

@ -155,7 +155,7 @@ $.Widget.prototype = {
.removeAttr( "aria-disabled" ) .removeAttr( "aria-disabled" )
.removeClass( .removeClass(
this.widgetBaseClass + "-disabled " + this.widgetBaseClass + "-disabled " +
this.namespace + "-state-disabled" ); "ui-state-disabled" );
}, },
widget: function() { widget: function() {
@ -192,7 +192,7 @@ $.Widget.prototype = {
this.widget() this.widget()
[ value ? "addClass" : "removeClass"]( [ value ? "addClass" : "removeClass"](
this.widgetBaseClass + "-disabled" + " " + this.widgetBaseClass + "-disabled" + " " +
this.namespace + "-state-disabled" ) "ui-state-disabled" )
.attr( "aria-disabled", value ); .attr( "aria-disabled", value );
} }