mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-15 12:36:05 +00:00
Initial commit
This commit is contained in:
33
app/static/global/plugins/fuelux/COPYING
Normal file
33
app/static/global/plugins/fuelux/COPYING
Normal file
@ -0,0 +1,33 @@
|
||||
Copyright (C) 2012, ExactTarget, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====================================================================
|
||||
|
||||
The above license does not apply to the following bundled components:
|
||||
|
||||
• jQuery located at lib/jquery.js
|
||||
• Bootstrap Apache 2.0 Located under lib/bootstrap
|
||||
• RequireJS located at lib/require.js
|
||||
• QUnit located under lib/qunit
|
||||
• Grunt located under node-modules/grunt
|
||||
• Grunt-contrib located under node-modules/grunt-contrib
|
||||
• Grunt-recess located under node-modules/grunt-recess
|
||||
|
||||
Licensing information regarding the above packages can be found in the THIRD-PARTY file.
|
225
app/static/global/plugins/fuelux/README.md
Normal file
225
app/static/global/plugins/fuelux/README.md
Normal file
@ -0,0 +1,225 @@
|
||||
[](http://exacttarget.github.com/fuelux)
|
||||
|
||||
Fuel UX extends Twitter Bootstrap with additional lightweight JavaScript controls.
|
||||
Other benefits include easy installation into web projects, integrated scripts for customizing Bootstrap and Fuel UX,
|
||||
simple updates, and solid optimization for deployment. All functionality is covered by live documentation and unit tests.
|
||||
|
||||
[](https://saucelabs.com/u/fuelux)
|
||||
|
||||
[](http://travis-ci.org/ExactTarget/fuelux)
|
||||
|
||||
## Features
|
||||
|
||||
Fuel UX provides all of the styles and plugins from the revolutionary [Twitter Bootstrap](http://twitter.github.com/bootstrap) project, with the following additions:
|
||||
|
||||
* Fuel UX JavaScript controls (with unit tests) [see them live](http://exacttarget.github.com/fuelux)
|
||||
* Checkbox - _consistent cross-browser cross-platform look and feel for checkbox elements_
|
||||
* Combobox - _combines input and dropdown for easy and flexible data selection_
|
||||
* Datagrid - _renders data in a table with paging, sorting, and searching_
|
||||
* Pillbox - _manages selected items with color-coded text labels_
|
||||
* Radio - _consistent cross-browser cross-platform look and feel for radio elements_
|
||||
* Search - _combines input and button for integrated search interaction_
|
||||
* Select - _extends button dropdown with the ability to set and retrieve the selected item_
|
||||
* Spinner - _provides convenient numeric input with increment and decrement buttons_
|
||||
* Tree - _renders data in a tree, supporting caching and optional multi-selection_
|
||||
* Wizard - _displays a multi-step process to be completed in a specific order_
|
||||
<p>
|
||||
* One-step installation and updates through [volo](https://github.com/volojs/volo)
|
||||
* [AMD](http://requirejs.org/docs/whyamd.html) compatibility for modular structure and deployment optimization
|
||||
* [Grunt](https://github.com/cowboy/grunt)-based build script to easily create custom distribution files
|
||||
* Namespaced CSS (just add a `fuelux` class) for safe use on existing sites
|
||||
|
||||
## Getting Started
|
||||
* `git clone git://github.com/ExactTarget/fuelux.git`
|
||||
* Default Fuel UX files for production use are located in the [dist](https://github.com/ExactTarget/fuelux/tree/master/dist) directory
|
||||
* To customize, modify the JS and LESS files under [src](https://github.com/ExactTarget/fuelux/tree/master/src) then run `grunt` to regenerate your [dist](https://github.com/ExactTarget/fuelux/tree/master/dist) directory (more below)
|
||||
|
||||
## Documentation and Examples
|
||||
|
||||
### Live docs and demos
|
||||
|
||||
Hosted on GitHub pages: http://exacttarget.github.com/fuelux
|
||||
|
||||
### Rich documentation
|
||||
|
||||
Hosted on our [Developer Community](http://code.exacttarget.com/devcenter/home): http://code.exacttarget.com/devcenter/fuel-ux
|
||||
|
||||
## Issues and Feature Requests
|
||||
|
||||
### Search for or report a bug
|
||||
|
||||
Use GitHub issues: https://github.com/ExactTarget/fuelux/issues
|
||||
|
||||
### View the roadmap and suggest new ideas
|
||||
|
||||
Visit our UserVoice community: https://fuelux.uservoice.com
|
||||
|
||||
## Release History
|
||||
|
||||
_Fuel UX is semantically versioned: <http://semver.org>_
|
||||
|
||||
### Version 2.3.1 `2013-08-02`
|
||||
|
||||
* Reset datagrid to first page on filter change
|
||||
* Fix datagrid operation inside HTML form
|
||||
* Fix datagrid header wrapping for narrow columns
|
||||
* Improve datagrid class specificity for inner controls
|
||||
* Fix datagrid race condition with next and previous buttons
|
||||
* Improve datagrid fault tolerance around paging operations
|
||||
* Improve sample datasource to handle null values when searching
|
||||
* Fix select control value selection when value contains spaces
|
||||
* Fix checkbox operation inside datagrid
|
||||
* Fix checkbox operation inside form-inline
|
||||
* Fix checkbox operation for IE8
|
||||
* Fix tree text wrapping issue
|
||||
* Fix spinner issue when passing a string as a value
|
||||
* Fix button group operation inside wizard step
|
||||
* Backport tooltip options fix from Bootstrap 3
|
||||
* Upgrade Bootstrap from 2.3.0 to 2.3.2
|
||||
|
||||
### Version 2.3.0 `2013-02-18`
|
||||
|
||||
* Add custom filter support to datagrid
|
||||
* Use select control for datagrid page size dropdown
|
||||
* Add stepclick event to wizard to support canceling clicks on steps
|
||||
* Improve rounded corners of combobox button to match Bootstrap
|
||||
* Improve support for installation within Yeoman
|
||||
* Upgrade Bootstrap from 2.2.2 to 2.3.0
|
||||
|
||||
### Version 2.2.1 `2013-02-13`
|
||||
|
||||
* Fix whitespace issue in wizard
|
||||
* Improve encapsulation of AMD globals
|
||||
* Introduce Testem for cross-browser testing
|
||||
* Fix tree datasource reference for local development
|
||||
* Upgrade unit tests to be compatible with jQuery 1.9
|
||||
|
||||
### Version 2.2.0 `2013-01-04`
|
||||
|
||||
* _New Control_ - checkbox
|
||||
* _New Control_ - radio
|
||||
* _New Control_ - select
|
||||
* _New Control_ - tree
|
||||
* _New Control_ - wizard
|
||||
* Add stretchHeight option to datagrid
|
||||
* Add reload method to datagrid
|
||||
* Add enable and disable methods to search control
|
||||
* Add enable and disable methods to combobox
|
||||
* Add rich methods for getting/setting selected item to combobox
|
||||
* Fix triggering of superfluous spinner events
|
||||
* Upgrade Bootstrap from 2.2.1 to 2.2.2
|
||||
|
||||
### Version 2.1.1 `2012-11-10`
|
||||
|
||||
* Allow setting spinner value to zero
|
||||
* Fix search control keyboard operation in IE8
|
||||
|
||||
### Version 2.1.0 `2012-10-31`
|
||||
|
||||
* Upgrade Bootstrap from 2.1.1 to 2.2.1
|
||||
|
||||
### Version 2.0.2 `2012-10-30`
|
||||
|
||||
* Ignore click on disabled search button
|
||||
* Make cursor consistent on disabled spinner buttons
|
||||
* Improve live docs to show disabled states where available
|
||||
* Complete datagrid unit test coverage
|
||||
|
||||
### Version 2.0.1 `2012-10-05`
|
||||
|
||||
* Fix loader.js (used for non-AMD pages) to be synchronous
|
||||
|
||||
### Version 2.0.0 `2012-09-28`
|
||||
|
||||
* First public release of Fuel UX
|
||||
|
||||
## Contributing
|
||||
Before writing code, we suggest you [search for issues](https://github.com/ExactTarget/fuelux/issues?state=open)
|
||||
or [create a new one](https://github.com/ExactTarget/fuelux/issues/new) to confirm where your contribution fits into
|
||||
our roadmap.
|
||||
|
||||
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
|
||||
|
||||
More about [Contributing to Fuel UX](https://github.com/ExactTarget/fuelux/wiki/Contributing-to-Fuel-UX)
|
||||
|
||||
### Important notes
|
||||
Please don't edit files in the `dist` directory as they are generated via grunt. You'll find source code in the `src` directory!
|
||||
|
||||
While grunt can run the included unit tests via PhantomJS, this isn't a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in real browsers as well.
|
||||
|
||||
More about [Installing grunt and PhantomJS](https://github.com/ExactTarget/fuelux/wiki/Installing-grunt-and-PhantomJS)
|
||||
|
||||
## The Fuel UX Philosophy
|
||||
|
||||
Our aim is to provide a suite of related but independent projects that help web developers integrate, manage, and customize quality libraries and utilities to more efficiently develop, maintain, test, and distribute their projects. Any improvements or fixes we make to the open source projects we use will be contributed upstream if they are useful to the rest of the community.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
We are grateful to the maintainers, contributors, and sponsors of the following technologies which make FuelUX possible:
|
||||
|
||||
* [jQuery](http://jquery.com) (Library for DOM, events, animation, and AJAX)
|
||||
|
||||
* [Twitter Bootstrap](http://twitter.github.com/bootstrap) (Modern UI components and interactions)
|
||||
|
||||
* [LESS](http://lesscss.org) and [recess](http://twitter.github.com/recess) (Stylesheet definition and management)
|
||||
|
||||
* [RequireJS](http://requirejs.org) and [volo](https://github.com/volojs/volo) (Tools for managing modular JavaScript)
|
||||
|
||||
* [grunt](https://github.com/cowboy/grunt) (Build tool for JavaScript projects)
|
||||
|
||||
##Authors
|
||||
|
||||
**Adam Alexander**
|
||||
|
||||
+ http://twitter.com/adamalex
|
||||
+ http://github.com/adamalex
|
||||
|
||||
**Matt Beard**
|
||||
|
||||
+ http://github.com/mbeard
|
||||
|
||||
**Bryan Kohlmeier**
|
||||
|
||||
+ http://github.com/bkohlmeier
|
||||
|
||||
**Kevin Parkerson**
|
||||
|
||||
+ http://github.com/kevinparkerson
|
||||
|
||||
**Christopher McCulloh**
|
||||
|
||||
+ http://github.com/cmcculloh
|
||||
|
||||
**David Waltz**
|
||||
|
||||
+ https://github.com/dwaltz
|
||||
|
||||
**Dustin McCormick**
|
||||
|
||||
+ http://twitter.com/djmccormick
|
||||
+ http://github.com/djmccormick
|
||||
|
||||
**Scott Plumlee**
|
||||
|
||||
+ http://twitter.com/scottplumlee
|
||||
+ http://github.com/plumlee
|
||||
|
||||
**Marvin Pribble**
|
||||
|
||||
+ http://github.com/marvinpribble
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Copyright (c) 2012 ExactTarget
|
||||
|
||||
Licensed under the MIT License (the "License");
|
||||
you may not use this work except in compliance with the License.
|
||||
You may obtain a copy of the License in the COPYING file.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
[](http://githalytics.com/ExactTarget/fuelux)
|
207
app/static/global/plugins/fuelux/js/spinner.js
Normal file
207
app/static/global/plugins/fuelux/js/spinner.js
Normal file
@ -0,0 +1,207 @@
|
||||
/*
|
||||
* Fuel UX Spinner
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
*
|
||||
* Copyright (c) 2012 ExactTarget
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
!function ($) {
|
||||
// SPINNER CONSTRUCTOR AND PROTOTYPE
|
||||
|
||||
var Spinner = function (element, options) {
|
||||
this.$element = $(element);
|
||||
this.options = $.extend({}, $.fn.spinner.defaults, options);
|
||||
this.$input = this.$element.find('.spinner-input');
|
||||
this.$element.on('keyup', this.$input, $.proxy(this.change, this));
|
||||
|
||||
if (this.options.hold) {
|
||||
this.$element.on('mousedown', '.spinner-up', $.proxy(function() { this.startSpin(true); } , this));
|
||||
this.$element.on('mouseup', '.spinner-up, .spinner-down', $.proxy(this.stopSpin, this));
|
||||
this.$element.on('mouseout', '.spinner-up, .spinner-down', $.proxy(this.stopSpin, this));
|
||||
this.$element.on('mousedown', '.spinner-down', $.proxy(function() {this.startSpin(false);} , this));
|
||||
} else {
|
||||
this.$element.on('click', '.spinner-up', $.proxy(function() { this.step(true); } , this));
|
||||
this.$element.on('click', '.spinner-down', $.proxy(function() { this.step(false); }, this));
|
||||
}
|
||||
|
||||
this.switches = {
|
||||
count: 1,
|
||||
enabled: true
|
||||
};
|
||||
|
||||
if (this.options.speed === 'medium') {
|
||||
this.switches.speed = 300;
|
||||
} else if (this.options.speed === 'fast') {
|
||||
this.switches.speed = 100;
|
||||
} else {
|
||||
this.switches.speed = 500;
|
||||
}
|
||||
|
||||
this.lastValue = null;
|
||||
|
||||
this.render();
|
||||
|
||||
if (this.options.disabled) {
|
||||
this.disable();
|
||||
}
|
||||
};
|
||||
|
||||
Spinner.prototype = {
|
||||
constructor: Spinner,
|
||||
|
||||
render: function () {
|
||||
var inputValue = this.$input.val();
|
||||
|
||||
if (inputValue) {
|
||||
this.value(inputValue);
|
||||
} else {
|
||||
this.$input.val(this.options.value);
|
||||
}
|
||||
|
||||
this.$input.attr('maxlength', (this.options.max + '').split('').length);
|
||||
},
|
||||
|
||||
change: function () {
|
||||
var newVal = this.$input.val();
|
||||
|
||||
if(newVal/1){
|
||||
this.options.value = newVal/1;
|
||||
}else{
|
||||
newVal = newVal.replace(/[^0-9]/g,'');
|
||||
this.$input.val(newVal);
|
||||
this.options.value = newVal/1;
|
||||
}
|
||||
|
||||
this.triggerChangedEvent();
|
||||
},
|
||||
|
||||
stopSpin: function () {
|
||||
clearTimeout(this.switches.timeout);
|
||||
this.switches.count = 1;
|
||||
this.triggerChangedEvent();
|
||||
},
|
||||
|
||||
triggerChangedEvent: function () {
|
||||
var currentValue = this.value();
|
||||
if (currentValue === this.lastValue) return;
|
||||
|
||||
this.lastValue = currentValue;
|
||||
|
||||
// Primary changed event
|
||||
this.$element.trigger('changed', currentValue);
|
||||
|
||||
// Undocumented, kept for backward compatibility
|
||||
this.$element.trigger('change');
|
||||
},
|
||||
|
||||
startSpin: function (type) {
|
||||
|
||||
if (!this.options.disabled) {
|
||||
var divisor = this.switches.count;
|
||||
|
||||
if (divisor === 1) {
|
||||
this.step(type);
|
||||
divisor = 1;
|
||||
} else if (divisor < 3){
|
||||
divisor = 1.5;
|
||||
} else if (divisor < 8){
|
||||
divisor = 2.5;
|
||||
} else {
|
||||
divisor = 4;
|
||||
}
|
||||
|
||||
this.switches.timeout = setTimeout($.proxy(function() {this.iterator(type);} ,this),this.switches.speed/divisor);
|
||||
this.switches.count++;
|
||||
}
|
||||
},
|
||||
|
||||
iterator: function (type) {
|
||||
this.step(type);
|
||||
this.startSpin(type);
|
||||
},
|
||||
|
||||
step: function (dir) {
|
||||
var curValue = this.options.value;
|
||||
var limValue = dir ? this.options.max : this.options.min;
|
||||
|
||||
if ((dir ? curValue < limValue : curValue > limValue)) {
|
||||
var newVal = curValue + (dir ? 1 : -1) * this.options.step;
|
||||
|
||||
if (dir ? newVal > limValue : newVal < limValue) {
|
||||
this.value(limValue);
|
||||
} else {
|
||||
this.value(newVal);
|
||||
}
|
||||
} else if (this.options.cycle) {
|
||||
var cycleVal = dir ? this.options.min : this.options.max;
|
||||
this.value(cycleVal);
|
||||
}
|
||||
},
|
||||
|
||||
value: function (value) {
|
||||
if (!isNaN(parseFloat(value)) && isFinite(value)) {
|
||||
value = parseFloat(value);
|
||||
this.options.value = value;
|
||||
this.$input.val(value);
|
||||
return this;
|
||||
} else {
|
||||
return this.options.value;
|
||||
}
|
||||
},
|
||||
|
||||
disable: function () {
|
||||
this.options.disabled = true;
|
||||
this.$input.attr('disabled','');
|
||||
this.$element.find('button').addClass('disabled');
|
||||
},
|
||||
|
||||
enable: function () {
|
||||
this.options.disabled = false;
|
||||
this.$input.removeAttr("disabled");
|
||||
this.$element.find('button').removeClass('disabled');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// SPINNER PLUGIN DEFINITION
|
||||
|
||||
$.fn.spinner = function (option,value) {
|
||||
var methodReturn;
|
||||
|
||||
var $set = this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data('spinner');
|
||||
var options = typeof option === 'object' && option;
|
||||
|
||||
if (!data) $this.data('spinner', (data = new Spinner(this, options)));
|
||||
if (typeof option === 'string') methodReturn = data[option](value);
|
||||
});
|
||||
|
||||
return (methodReturn === undefined) ? $set : methodReturn;
|
||||
};
|
||||
|
||||
$.fn.spinner.defaults = {
|
||||
value: 1,
|
||||
min: 1,
|
||||
max: 999,
|
||||
step: 1,
|
||||
hold: true,
|
||||
speed: 'medium',
|
||||
disabled: false
|
||||
};
|
||||
|
||||
$.fn.spinner.Constructor = Spinner;
|
||||
|
||||
|
||||
// SPINNER DATA-API
|
||||
|
||||
$(function () {
|
||||
$('body').on('mousedown.spinner.data-api', '.spinner', function () {
|
||||
var $this = $(this);
|
||||
if ($this.data('spinner')) return;
|
||||
$this.spinner($this.data());
|
||||
});
|
||||
});
|
||||
|
||||
}(window.jQuery);
|
9
app/static/global/plugins/fuelux/js/spinner.min.js
vendored
Normal file
9
app/static/global/plugins/fuelux/js/spinner.min.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Fuel UX Spinner
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
*
|
||||
* Copyright (c) 2012 ExactTarget
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
!function(e){var t=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.spinner.defaults,i),this.$input=this.$element.find(".spinner-input"),this.$element.on("keyup",this.$input,e.proxy(this.change,this)),this.options.hold?(this.$element.on("mousedown",".spinner-up",e.proxy(function(){this.startSpin(!0)},this)),this.$element.on("mouseup",".spinner-up, .spinner-down",e.proxy(this.stopSpin,this)),this.$element.on("mouseout",".spinner-up, .spinner-down",e.proxy(this.stopSpin,this)),this.$element.on("mousedown",".spinner-down",e.proxy(function(){this.startSpin(!1)},this))):(this.$element.on("click",".spinner-up",e.proxy(function(){this.step(!0)},this)),this.$element.on("click",".spinner-down",e.proxy(function(){this.step(!1)},this))),this.switches={count:1,enabled:!0},this.switches.speed="medium"===this.options.speed?300:"fast"===this.options.speed?100:500,this.lastValue=null,this.render(),this.options.disabled&&this.disable()};t.prototype={constructor:t,render:function(){var e=this.$input.val();e?this.value(e):this.$input.val(this.options.value),this.$input.attr("maxlength",(this.options.max+"").split("").length)},change:function(){var e=this.$input.val();e/1?this.options.value=e/1:(e=e.replace(/[^0-9]/g,""),this.$input.val(e),this.options.value=e/1),this.triggerChangedEvent()},stopSpin:function(){clearTimeout(this.switches.timeout),this.switches.count=1,this.triggerChangedEvent()},triggerChangedEvent:function(){var e=this.value();e!==this.lastValue&&(this.lastValue=e,this.$element.trigger("changed",e),this.$element.trigger("change"))},startSpin:function(t){if(!this.options.disabled){var i=this.switches.count;1===i?(this.step(t),i=1):i=3>i?1.5:8>i?2.5:4,this.switches.timeout=setTimeout(e.proxy(function(){this.iterator(t)},this),this.switches.speed/i),this.switches.count++}},iterator:function(e){this.step(e),this.startSpin(e)},step:function(e){var t=this.options.value,i=e?this.options.max:this.options.min;if(e?i>t:t>i){var s=t+(e?1:-1)*this.options.step;(e?s>i:i>s)?this.value(i):this.value(s)}else if(this.options.cycle){var n=e?this.options.min:this.options.max;this.value(n)}},value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)?(e=parseFloat(e),this.options.value=e,this.$input.val(e),this):this.options.value},disable:function(){this.options.disabled=!0,this.$input.attr("disabled",""),this.$element.find("button").addClass("disabled")},enable:function(){this.options.disabled=!1,this.$input.removeAttr("disabled"),this.$element.find("button").removeClass("disabled")}},e.fn.spinner=function(i,s){var n,a=this.each(function(){var a=e(this),o=a.data("spinner"),r="object"==typeof i&&i;o||a.data("spinner",o=new t(this,r)),"string"==typeof i&&(n=o[i](s))});return void 0===n?a:n},e.fn.spinner.defaults={value:1,min:1,max:999,step:1,hold:!0,speed:"medium",disabled:!1},e.fn.spinner.Constructor=t,e(function(){e("body").on("mousedown.spinner.data-api",".spinner",function(){var t=e(this);t.data("spinner")||t.spinner(t.data())})})}(window.jQuery);
|
Reference in New Issue
Block a user