Merge "Removes the jquery.example plugin."
This commit is contained in:
commit
f5c25a085c
|
@ -53,17 +53,18 @@ horizon.forms.prevent_multiple_submission = function (el) {
|
|||
horizon.forms.init_examples = function (el) {
|
||||
var $el = $(el);
|
||||
|
||||
// FIXME(gabriel): These should be moved into the forms themselves as help text, etc.
|
||||
// Generic examples.
|
||||
$el.find("#id_description").example(gettext("Additional information here..."));
|
||||
$el.find("#id_description").attr("placeholder", gettext("Additional information here..."));
|
||||
|
||||
// Update/create image form.
|
||||
$el.find("#create_image_form input#id_copy_from").example("http://example.com/image.iso");
|
||||
$el.find("#create_image_form input#id_copy_from").attr("placeholder", "http://example.com/image.iso");
|
||||
|
||||
// Table search box.
|
||||
$el.find(".table_search input").example(gettext("Filter"));
|
||||
$el.find(".table_search input").attr("placeholder", gettext("Filter"));
|
||||
|
||||
// Volume attachment form.
|
||||
$el.find("#attach_volume_form #id_device").example("/dev/vdc/");
|
||||
$el.find("#attach_volume_form #id_device").attr("placeholder", "/dev/vdc/");
|
||||
};
|
||||
|
||||
horizon.addInitFunction(function () {
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* jQuery Form Example Plugin 1.4.3
|
||||
* Populate form inputs with example text that disappears on focus.
|
||||
*
|
||||
* e.g.
|
||||
* $('input#name').example('Bob Smith');
|
||||
* $('input[@title]').example(function() {
|
||||
* return $(this).attr('title');
|
||||
* });
|
||||
* $('textarea#message').example('Type your message here', {
|
||||
* className: 'example_text'
|
||||
* });
|
||||
*
|
||||
* Copyright (c) Paul Mucur (http://mucur.name), 2007-2008.
|
||||
* Dual-licensed under the BSD (BSD-LICENSE.txt) and GPL (GPL-LICENSE.txt)
|
||||
* licenses.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
(function(a){a.fn.example=function(e,g){var d=a.isFunction(e),f=a.extend({},g,{example:e});return this.each(function(){var c=a(this),b=a.metadata?a.extend({},a.fn.example.defaults,c.metadata(),f):a.extend({},a.fn.example.defaults,f);if(!a.fn.example.boundClassNames[b.className]){a(window).unload(function(){a("."+b.className).val("")});a("form").submit(function(){a(this).find("."+b.className).val("")});a.fn.example.boundClassNames[b.className]=true}if(!c.attr("defaultValue")&&(d||c.val()==b.example))c.val("");
|
||||
if(c.val()==""&&this!=document.activeElement){c.addClass(b.className);c.val(d?b.example.call(this):b.example)}c.focus(function(){if(a(this).is("."+b.className)){a(this).val("");a(this).removeClass(b.className)}});c.change(function(){a(this).is("."+b.className)&&a(this).removeClass(b.className)});c.blur(function(){if(a(this).val()==""){a(this).addClass(b.className);a(this).val(d?b.example.call(this):b.example)}})})};a.fn.example.defaults={className:"example"};a.fn.example.boundClassNames=[]})(jQuery);
|
|
@ -8,7 +8,6 @@
|
|||
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.min.js' type='text/javascript' charset="utf-8"></script>
|
||||
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.cookie.js' type='text/javascript' charset="utf-8"></script>
|
||||
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.quicksearch.js' type='text/javascript' charset="utf-8"></script>
|
||||
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.example.min.js' type='text/javascript' charset="utf-8"></script>
|
||||
<script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.table-sorter.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="{{ STATIC_URL }}horizon/lib/spin.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="{{ STATIC_URL }}horizon/lib/spin.jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
|
Loading…
Reference in New Issue