Merge branch 'master' into issue_12262
This commit is contained in:
commit
d3d973f782
14
ChangeLog
14
ChangeLog
@ -37,6 +37,10 @@ phpMyAdmin - ChangeLog
|
||||
- issue #12713 Correctly handle HTTP status when doing requests
|
||||
- issue #12247 Add option to delete settings from browser storage
|
||||
- issue #12783 Remove unused PMA_addJSCode function
|
||||
- issue #12069 Add table filtering to database structure
|
||||
- issue #12799 Allow to configure signon session parameters
|
||||
- issue #12854 Drop database is broken
|
||||
- issue #12863 Can't toggle Event Scheduler on
|
||||
|
||||
4.6.6 (not yet released)
|
||||
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'
|
||||
@ -52,11 +56,21 @@ phpMyAdmin - ChangeLog
|
||||
- issue #12786 Fixed database searching
|
||||
- issue #12792 Fixed javascript error on new version link
|
||||
- issue #12785 Add information about required and suggested extensions to composer.json
|
||||
- issue #12801 Custom header shown twice with cookie login form
|
||||
- issue #12802 Custom footer not shown with auth_type http login failure
|
||||
- issue #12434 Improve documentation for servers running with Suhosin
|
||||
- issue #12800 Updated embedded phpSecLib to 2.0.4
|
||||
- issue #12800 Fixed various issues with PHP 7.1
|
||||
- issue #11816 Fixed operation with lower_case_table_names=2
|
||||
- issue #12813 Fixed stored procedure execution
|
||||
- issue #12826 Honor user configured connection collation
|
||||
- issue #12293 Correctly report OpenSSL errors from cookie encryption
|
||||
- issue #12814 DateTime won't allow to input length in Routine editor
|
||||
- issue #12841 Fixed moving of columns with whitespace in name
|
||||
- issue #12847 Fixed editing of virtual columns
|
||||
- issue #12859 Changed WHERE condition to 0 instead of 1 for SQL query window to avoid accidents
|
||||
- issue #12872 Use same query for display and execution when dropping index
|
||||
- issue #12868 Fix check for user groups freatures being enabled
|
||||
|
||||
4.6.5.2 (2016-12-05)
|
||||
- issue #12765 Fixed SQL export with newlines
|
||||
|
||||
@ -42,6 +42,10 @@ If you prefer to follow the git repository, the following branch and tag names m
|
||||
* ``master`` is the development branch.
|
||||
* Releases are tagged, for example version 4.0.1 was tagged as ``RELEASE_4_0_1``.
|
||||
|
||||
Note that phpMyAdmin uses Composer to manage library dependencies, when using git
|
||||
development versions you must manually run Composer.
|
||||
Please see `the documentation <https://docs.phpmyadmin.net/en/latest/setup.html#installing-from-git>`_ for details.
|
||||
|
||||
More Information
|
||||
----------------
|
||||
|
||||
|
||||
@ -165,9 +165,12 @@ class ConfigFileDomain(Domain):
|
||||
}
|
||||
|
||||
def clear_doc(self, docname):
|
||||
toremove = []
|
||||
for key, (fn, _) in self.data['objects'].items():
|
||||
if fn == docname:
|
||||
del self.data['objects'][key]
|
||||
toremove.append(key)
|
||||
for key in toremove:
|
||||
del self.data['objects'][key]
|
||||
|
||||
def resolve_xref(self, env, fromdocname, builder,
|
||||
typ, target, node, contnode):
|
||||
|
||||
@ -1349,6 +1349,23 @@ Server connection settings
|
||||
|
||||
.. seealso:: :ref:`auth_signon`
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['SignonCookieParams']
|
||||
|
||||
:type: array
|
||||
:default: ``array()``
|
||||
|
||||
.. versionadded:: 4.7.0
|
||||
|
||||
An associative array of session cookie parameters of other authentication system.
|
||||
It is not needed if the other system doesn't use session_set_cookie_params().
|
||||
Keys should include 'lifetime', 'path', 'domain', 'secure' or 'httponly'.
|
||||
Valid values are mentioned in `session_get_cookie_params <https://php.net/manual/en/
|
||||
function.session-get-cookie-params.php>`_, they should be set to same values as the
|
||||
other application uses. Takes effect only if
|
||||
:config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
|
||||
|
||||
.. seealso:: :ref:`auth_signon`
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['SignonURL']
|
||||
|
||||
:type: string
|
||||
@ -2411,7 +2428,7 @@ Languages
|
||||
.. config:option:: $cfg['DefaultConnectionCollation']
|
||||
|
||||
:type: string
|
||||
:default: ``'utf8_general_ci'``
|
||||
:default: ``'utf8mb4_general_ci'``
|
||||
|
||||
Defines the default connection collation to use, if not user-defined.
|
||||
See the `MySQL documentation for charsets
|
||||
|
||||
@ -146,7 +146,7 @@ The MySQL manual explains how to `reset the permissions
|
||||
1.15 I have problems with *mysql.user* column names.
|
||||
----------------------------------------------------
|
||||
|
||||
In previous MySQL versions, the ``User`` and ``Password``columns were
|
||||
In previous MySQL versions, the ``User`` and ``Password`` columns were
|
||||
named ``user`` and ``password``. Please modify your column names to
|
||||
align with current standards.
|
||||
|
||||
|
||||
@ -154,8 +154,13 @@ download it using:
|
||||
docker pull phpmyadmin/phpmyadmin
|
||||
|
||||
The phpMyAdmin server will be executed on port 80. It supports several ways of
|
||||
configuring the link to the database server, which you can manage using
|
||||
environment variables:
|
||||
configuring the link to the database server, either by Docker's link feature
|
||||
by linking your database container to ``db`` for phpMyAdmin (by specifying
|
||||
``--link your_db_host:db``) or by environment variables (in this case it's up
|
||||
to you to setup networking in Docker to allow phpMyAdmin container to access
|
||||
the database container over network).
|
||||
|
||||
You can configure several phpMyAdmin features using environment variables:
|
||||
|
||||
.. envvar:: PMA_ARBITRARY
|
||||
|
||||
@ -816,7 +821,8 @@ Signon authentication mode
|
||||
application to authenticate to phpMyAdmin to implement single signon
|
||||
solution.
|
||||
* The other application has to store login information into session
|
||||
data (see :config:option:`$cfg['Servers'][$i]['SignonSession']`) or you
|
||||
data (see :config:option:`$cfg['Servers'][$i]['SignonSession']` and
|
||||
:config:option:`$cfg['Servers'][$i]['SignonCookieParams']`) or you
|
||||
need to implement script to return the credentials (see
|
||||
:config:option:`$cfg['Servers'][$i]['SignonScript']`).
|
||||
* When no credentials are available, the user is being redirected to
|
||||
@ -846,6 +852,7 @@ in :file:`examples/signon-script.php`:
|
||||
.. seealso::
|
||||
:config:option:`$cfg['Servers'][$i]['auth_type']`,
|
||||
:config:option:`$cfg['Servers'][$i]['SignonSession']`,
|
||||
:config:option:`$cfg['Servers'][$i]['SignonCookieParams']`,
|
||||
:config:option:`$cfg['Servers'][$i]['SignonScript']`,
|
||||
:config:option:`$cfg['Servers'][$i]['SignonURL']`,
|
||||
:ref:`example-signon`
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* "Echo" service to allow force downloading server status monitor settings
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
define('PMA_MINIMUM_COMMON', true);
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
if (isset($_REQUEST['monitorconfig'])) {
|
||||
/* For monitor chart config export */
|
||||
PMA_downloadHeader('monitor.cfg', 'application/json; charset=UTF-8');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
|
||||
echo urldecode($_REQUEST['monitorconfig']);
|
||||
|
||||
} else if (isset($_REQUEST['import'])) {
|
||||
/* For monitor chart config import */
|
||||
header('Content-Type: application/json; charset=UTF-8');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
|
||||
if (!file_exists($_FILES['file']['tmp_name'])) {
|
||||
exit();
|
||||
}
|
||||
echo file_get_contents($_FILES['file']['tmp_name']);
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (C) 2015 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
Copyright (C) 2016 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
2
js/codemirror/addon/hint/show-hint.css
vendored
2
js/codemirror/addon/hint/show-hint.css
vendored
@ -25,8 +25,6 @@
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
max-width: 19em;
|
||||
overflow: hidden;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
|
||||
147
js/codemirror/addon/hint/show-hint.js
vendored
147
js/codemirror/addon/hint/show-hint.js
vendored
@ -25,8 +25,18 @@
|
||||
};
|
||||
|
||||
CodeMirror.defineExtension("showHint", function(options) {
|
||||
// We want a single cursor position.
|
||||
if (this.listSelections().length > 1 || this.somethingSelected()) return;
|
||||
options = parseOptions(this, this.getCursor("start"), options);
|
||||
var selections = this.listSelections()
|
||||
if (selections.length > 1) return;
|
||||
// By default, don't allow completion when something is selected.
|
||||
// A hint function can have a `supportsSelection` property to
|
||||
// indicate that it can handle selections.
|
||||
if (this.somethingSelected()) {
|
||||
if (!options.hint.supportsSelection) return;
|
||||
// Don't try with cross-line selections
|
||||
for (var i = 0; i < selections.length; i++)
|
||||
if (selections[i].head.line != selections[i].anchor.line) return;
|
||||
}
|
||||
|
||||
if (this.state.completionActive) this.state.completionActive.close();
|
||||
var completion = this.state.completionActive = new Completion(this, options);
|
||||
@ -38,12 +48,12 @@
|
||||
|
||||
function Completion(cm, options) {
|
||||
this.cm = cm;
|
||||
this.options = this.buildOptions(options);
|
||||
this.options = options;
|
||||
this.widget = null;
|
||||
this.debounce = 0;
|
||||
this.tick = 0;
|
||||
this.startPos = this.cm.getCursor();
|
||||
this.startLen = this.cm.getLine(this.startPos.line).length;
|
||||
this.startPos = this.cm.getCursor("start");
|
||||
this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
|
||||
|
||||
var self = this;
|
||||
cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });
|
||||
@ -98,23 +108,22 @@
|
||||
},
|
||||
|
||||
update: function(first) {
|
||||
if (this.tick == null) return;
|
||||
if (this.data) CodeMirror.signal(this.data, "update");
|
||||
if (!this.options.hint.async) {
|
||||
this.finishUpdate(this.options.hint(this.cm, this.options), first);
|
||||
} else {
|
||||
var myTick = ++this.tick, self = this;
|
||||
this.options.hint(this.cm, function(data) {
|
||||
if (self.tick == myTick) self.finishUpdate(data, first);
|
||||
}, this.options);
|
||||
}
|
||||
if (this.tick == null) return
|
||||
var self = this, myTick = ++this.tick
|
||||
fetchHints(this.options.hint, this.cm, this.options, function(data) {
|
||||
if (self.tick == myTick) self.finishUpdate(data, first)
|
||||
})
|
||||
},
|
||||
|
||||
finishUpdate: function(data, first) {
|
||||
this.data = data;
|
||||
if (this.data) CodeMirror.signal(this.data, "update");
|
||||
|
||||
var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle);
|
||||
if (this.widget) this.widget.close();
|
||||
|
||||
if (data && this.data && isNewCompletion(this.data, data)) return;
|
||||
this.data = data;
|
||||
|
||||
if (data && data.list.length) {
|
||||
if (picked && data.list.length == 1) {
|
||||
this.pick(data, 0);
|
||||
@ -123,20 +132,26 @@
|
||||
CodeMirror.signal(data, "shown");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
buildOptions: function(options) {
|
||||
var editor = this.cm.options.hintOptions;
|
||||
var out = {};
|
||||
for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
|
||||
if (editor) for (var prop in editor)
|
||||
if (editor[prop] !== undefined) out[prop] = editor[prop];
|
||||
if (options) for (var prop in options)
|
||||
if (options[prop] !== undefined) out[prop] = options[prop];
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
function isNewCompletion(old, nw) {
|
||||
var moved = CodeMirror.cmpPos(nw.from, old.from)
|
||||
return moved > 0 && old.to.ch - old.from.ch != nw.to.ch - nw.from.ch
|
||||
}
|
||||
|
||||
function parseOptions(cm, pos, options) {
|
||||
var editor = cm.options.hintOptions;
|
||||
var out = {};
|
||||
for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
|
||||
if (editor) for (var prop in editor)
|
||||
if (editor[prop] !== undefined) out[prop] = editor[prop];
|
||||
if (options) for (var prop in options)
|
||||
if (options[prop] !== undefined) out[prop] = options[prop];
|
||||
if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)
|
||||
return out;
|
||||
}
|
||||
|
||||
function getText(completion) {
|
||||
if (typeof completion == "string") return completion;
|
||||
else return completion.text;
|
||||
@ -214,6 +229,9 @@
|
||||
var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
|
||||
(completion.options.container || document.body).appendChild(hints);
|
||||
var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
|
||||
var scrolls = hints.scrollHeight > hints.clientHeight + 1
|
||||
var startScroll = cm.getScrollInfo();
|
||||
|
||||
if (overlapY > 0) {
|
||||
var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
|
||||
if (curTop - height > 0) { // Fits above cursor
|
||||
@ -238,6 +256,8 @@
|
||||
}
|
||||
hints.style.left = (left = pos.left - overlapX) + "px";
|
||||
}
|
||||
if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
|
||||
node.style.paddingRight = cm.display.nativeBarWidth + "px"
|
||||
|
||||
cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
|
||||
moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },
|
||||
@ -255,7 +275,6 @@
|
||||
cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); });
|
||||
}
|
||||
|
||||
var startScroll = cm.getScrollInfo();
|
||||
cm.on("scroll", this.onScroll = function() {
|
||||
var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
|
||||
var newTop = top + startScroll.top - curScroll.top;
|
||||
@ -335,34 +354,70 @@
|
||||
}
|
||||
};
|
||||
|
||||
CodeMirror.registerHelper("hint", "auto", function(cm, options) {
|
||||
var helpers = cm.getHelpers(cm.getCursor(), "hint"), words;
|
||||
if (helpers.length) {
|
||||
for (var i = 0; i < helpers.length; i++) {
|
||||
var cur = helpers[i](cm, options);
|
||||
if (cur && cur.list.length) return cur;
|
||||
}
|
||||
} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
|
||||
if (words) return CodeMirror.hint.fromList(cm, {words: words});
|
||||
} else if (CodeMirror.hint.anyword) {
|
||||
return CodeMirror.hint.anyword(cm, options);
|
||||
function applicableHelpers(cm, helpers) {
|
||||
if (!cm.somethingSelected()) return helpers
|
||||
var result = []
|
||||
for (var i = 0; i < helpers.length; i++)
|
||||
if (helpers[i].supportsSelection) result.push(helpers[i])
|
||||
return result
|
||||
}
|
||||
|
||||
function fetchHints(hint, cm, options, callback) {
|
||||
if (hint.async) {
|
||||
hint(cm, callback, options)
|
||||
} else {
|
||||
var result = hint(cm, options)
|
||||
if (result && result.then) result.then(callback)
|
||||
else callback(result)
|
||||
}
|
||||
}
|
||||
|
||||
function resolveAutoHints(cm, pos) {
|
||||
var helpers = cm.getHelpers(pos, "hint"), words
|
||||
if (helpers.length) {
|
||||
var resolved = function(cm, callback, options) {
|
||||
var app = applicableHelpers(cm, helpers);
|
||||
function run(i) {
|
||||
if (i == app.length) return callback(null)
|
||||
fetchHints(app[i], cm, options, function(result) {
|
||||
if (result && result.list.length > 0) callback(result)
|
||||
else run(i + 1)
|
||||
})
|
||||
}
|
||||
run(0)
|
||||
}
|
||||
resolved.async = true
|
||||
resolved.supportsSelection = true
|
||||
return resolved
|
||||
} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
|
||||
return function(cm) { return CodeMirror.hint.fromList(cm, {words: words}) }
|
||||
} else if (CodeMirror.hint.anyword) {
|
||||
return function(cm, options) { return CodeMirror.hint.anyword(cm, options) }
|
||||
} else {
|
||||
return function() {}
|
||||
}
|
||||
}
|
||||
|
||||
CodeMirror.registerHelper("hint", "auto", {
|
||||
resolve: resolveAutoHints
|
||||
});
|
||||
|
||||
CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
|
||||
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
|
||||
var to = CodeMirror.Pos(cur.line, token.end);
|
||||
if (token.string && /\w/.test(token.string[token.string.length - 1])) {
|
||||
var term = token.string, from = CodeMirror.Pos(cur.line, token.start);
|
||||
} else {
|
||||
var term = "", from = to;
|
||||
}
|
||||
var found = [];
|
||||
for (var i = 0; i < options.words.length; i++) {
|
||||
var word = options.words[i];
|
||||
if (word.slice(0, token.string.length) == token.string)
|
||||
if (word.slice(0, term.length) == term)
|
||||
found.push(word);
|
||||
}
|
||||
|
||||
if (found.length) return {
|
||||
list: found,
|
||||
from: CodeMirror.Pos(cur.line, token.start),
|
||||
to: CodeMirror.Pos(cur.line, token.end)
|
||||
};
|
||||
if (found.length) return {list: found, from: from, to: to};
|
||||
});
|
||||
|
||||
CodeMirror.commands.autocomplete = CodeMirror.showHint;
|
||||
@ -373,7 +428,7 @@
|
||||
alignWithWord: true,
|
||||
closeCharacters: /[\s()\[\]{};:>,]/,
|
||||
closeOnUnfocus: true,
|
||||
completeOnSingleClick: false,
|
||||
completeOnSingleClick: true,
|
||||
container: null,
|
||||
customKeys: null,
|
||||
extraKeys: null
|
||||
|
||||
83
js/codemirror/addon/hint/sql-hint.js
vendored
83
js/codemirror/addon/hint/sql-hint.js
vendored
@ -18,7 +18,9 @@
|
||||
QUERY_DIV: ";",
|
||||
ALIAS_KEYWORD: "AS"
|
||||
};
|
||||
var Pos = CodeMirror.Pos;
|
||||
var Pos = CodeMirror.Pos, cmpPos = CodeMirror.cmpPos;
|
||||
|
||||
function isArray(val) { return Object.prototype.toString.call(val) == "[object Array]" }
|
||||
|
||||
function getKeywords(editor) {
|
||||
var mode = editor.doc.modeOption;
|
||||
@ -30,10 +32,28 @@
|
||||
return typeof item == "string" ? item : item.text;
|
||||
}
|
||||
|
||||
function getItem(list, item) {
|
||||
if (!list.slice) return list[item];
|
||||
for (var i = list.length - 1; i >= 0; i--) if (getText(list[i]) == item)
|
||||
return list[i];
|
||||
function wrapTable(name, value) {
|
||||
if (isArray(value)) value = {columns: value}
|
||||
if (!value.text) value.text = name
|
||||
return value
|
||||
}
|
||||
|
||||
function parseTables(input) {
|
||||
var result = {}
|
||||
if (isArray(input)) {
|
||||
for (var i = input.length - 1; i >= 0; i--) {
|
||||
var item = input[i]
|
||||
result[getText(item).toUpperCase()] = wrapTable(getText(item), item)
|
||||
}
|
||||
} else if (input) {
|
||||
for (var name in input)
|
||||
result[name.toUpperCase()] = wrapTable(name, input[name])
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
function getTable(name) {
|
||||
return tables[name.toUpperCase()]
|
||||
}
|
||||
|
||||
function shallowClone(object) {
|
||||
@ -50,11 +70,18 @@
|
||||
}
|
||||
|
||||
function addMatches(result, search, wordlist, formatter) {
|
||||
for (var word in wordlist) {
|
||||
if (!wordlist.hasOwnProperty(word)) continue;
|
||||
if (wordlist.slice) word = wordlist[word];
|
||||
|
||||
if (match(search, word)) result.push(formatter(word));
|
||||
if (isArray(wordlist)) {
|
||||
for (var i = 0; i < wordlist.length; i++)
|
||||
if (match(search, wordlist[i])) result.push(formatter(wordlist[i]))
|
||||
} else {
|
||||
for (var word in wordlist) if (wordlist.hasOwnProperty(word)) {
|
||||
var val = wordlist[word]
|
||||
if (!val || val === true)
|
||||
val = word
|
||||
else
|
||||
val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text
|
||||
if (match(search, val)) result.push(formatter(val))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,7 +105,7 @@
|
||||
}
|
||||
|
||||
function nameCompletion(cur, token, result, editor) {
|
||||
// Try to complete table, colunm names and return start position of completion
|
||||
// Try to complete table, column names and return start position of completion
|
||||
var useBacktick = false;
|
||||
var nameParts = [];
|
||||
var start = token.start;
|
||||
@ -115,13 +142,13 @@
|
||||
var alias = false;
|
||||
var aliasTable = table;
|
||||
// Check if table is available. If not, find table by Alias
|
||||
if (!getItem(tables, table)) {
|
||||
if (!getTable(table)) {
|
||||
var oldTable = table;
|
||||
table = findTableByAlias(table, editor);
|
||||
if (table !== oldTable) alias = true;
|
||||
}
|
||||
|
||||
var columns = getItem(tables, table);
|
||||
var columns = getTable(table);
|
||||
if (columns && columns.columns)
|
||||
columns = columns.columns;
|
||||
|
||||
@ -151,15 +178,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function convertCurToNumber(cur) {
|
||||
// max characters of a line is 999,999.
|
||||
return cur.line + cur.ch / Math.pow(10, 6);
|
||||
}
|
||||
|
||||
function convertNumberToCur(num) {
|
||||
return Pos(Math.floor(num), +num.toString().split('.').pop());
|
||||
}
|
||||
|
||||
function findTableByAlias(alias, editor) {
|
||||
var doc = editor.doc;
|
||||
var fullQuery = doc.getValue();
|
||||
@ -182,15 +200,14 @@
|
||||
separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length));
|
||||
|
||||
//find valid range
|
||||
var prevItem = 0;
|
||||
var current = convertCurToNumber(editor.getCursor());
|
||||
for (var i=0; i< separator.length; i++) {
|
||||
var _v = convertCurToNumber(separator[i]);
|
||||
if (current > prevItem && current <= _v) {
|
||||
validRange = { start: convertNumberToCur(prevItem), end: convertNumberToCur(_v) };
|
||||
var prevItem = null;
|
||||
var current = editor.getCursor()
|
||||
for (var i = 0; i < separator.length; i++) {
|
||||
if ((prevItem == null || cmpPos(current, prevItem) > 0) && cmpPos(current, separator[i]) <= 0) {
|
||||
validRange = {start: prevItem, end: separator[i]};
|
||||
break;
|
||||
}
|
||||
prevItem = _v;
|
||||
prevItem = separator[i];
|
||||
}
|
||||
|
||||
var query = doc.getRange(validRange.start, validRange.end, false);
|
||||
@ -199,7 +216,7 @@
|
||||
var lineText = query[i];
|
||||
eachWord(lineText, function(word) {
|
||||
var wordUpperCase = word.toUpperCase();
|
||||
if (wordUpperCase === aliasUpperCase && getItem(tables, previousWord))
|
||||
if (wordUpperCase === aliasUpperCase && getTable(previousWord))
|
||||
table = previousWord;
|
||||
if (wordUpperCase !== CONS.ALIAS_KEYWORD)
|
||||
previousWord = word;
|
||||
@ -210,11 +227,11 @@
|
||||
}
|
||||
|
||||
CodeMirror.registerHelper("hint", "sql", function(editor, options) {
|
||||
tables = (options && options.tables) || {};
|
||||
tables = parseTables(options && options.tables)
|
||||
var defaultTableName = options && options.defaultTable;
|
||||
var disableKeywords = options && options.disableKeywords;
|
||||
defaultTable = defaultTableName && getItem(tables, defaultTableName);
|
||||
keywords = keywords || getKeywords(editor);
|
||||
defaultTable = defaultTableName && getTable(defaultTableName);
|
||||
keywords = getKeywords(editor);
|
||||
|
||||
if (defaultTableName && !defaultTable)
|
||||
defaultTable = findTableByAlias(defaultTableName, editor);
|
||||
|
||||
10
js/codemirror/addon/lint/lint.css
vendored
10
js/codemirror/addon/lint/lint.css
vendored
@ -4,10 +4,11 @@
|
||||
}
|
||||
|
||||
.CodeMirror-lint-tooltip {
|
||||
background-color: infobackground;
|
||||
background-color: #ffd;
|
||||
border: 1px solid black;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
color: infotext;
|
||||
color: black;
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
overflow: hidden;
|
||||
padding: 2px 5px;
|
||||
@ -24,11 +25,6 @@
|
||||
-ms-transition: opacity .4s;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-tooltip code {
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
|
||||
background-position: left bottom;
|
||||
background-repeat: repeat-x;
|
||||
|
||||
54
js/codemirror/addon/lint/lint.js
vendored
54
js/codemirror/addon/lint/lint.js
vendored
@ -1,5 +1,6 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
@ -60,6 +61,7 @@
|
||||
this.timeout = null;
|
||||
this.hasGutter = hasGutter;
|
||||
this.onMouseOver = function(e) { onMouseOver(cm, e); };
|
||||
this.waitingFor = 0
|
||||
}
|
||||
|
||||
function parseOptions(_cm, options) {
|
||||
@ -111,21 +113,35 @@
|
||||
var tip = document.createElement("div");
|
||||
tip.className = "CodeMirror-lint-message-" + severity;
|
||||
tip.appendChild(document.createTextNode(ann.message));
|
||||
// Unescaping only the <code> tag.
|
||||
tip.innerHTML = tip.innerHTML.replace("<code>", "<code>")
|
||||
.replace("</code>", "</code>");
|
||||
return tip;
|
||||
}
|
||||
|
||||
function lintAsync(cm, getAnnotations, passOptions) {
|
||||
var state = cm.state.lint
|
||||
var id = ++state.waitingFor
|
||||
function abort() {
|
||||
id = -1
|
||||
cm.off("change", abort)
|
||||
}
|
||||
cm.on("change", abort)
|
||||
getAnnotations(cm.getValue(), function(annotations, arg2) {
|
||||
cm.off("change", abort)
|
||||
if (state.waitingFor != id) return
|
||||
if (arg2 && annotations instanceof CodeMirror) annotations = arg2
|
||||
updateLinting(cm, annotations)
|
||||
}, passOptions, cm);
|
||||
}
|
||||
|
||||
function startLinting(cm) {
|
||||
var state = cm.state.lint, options = state.options;
|
||||
var passOptions = options.options || options; // Support deprecated passing of `options` property in options
|
||||
var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
|
||||
if (!getAnnotations) return;
|
||||
if (options.async || getAnnotations.async)
|
||||
getAnnotations(cm.getValue(), updateLinting, passOptions, cm);
|
||||
else
|
||||
if (options.async || getAnnotations.async) {
|
||||
lintAsync(cm, getAnnotations, passOptions)
|
||||
} else {
|
||||
updateLinting(cm, getAnnotations(cm.getValue(), passOptions, cm));
|
||||
}
|
||||
}
|
||||
|
||||
function updateLinting(cm, annotationsNotSorted) {
|
||||
@ -170,9 +186,14 @@
|
||||
state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500);
|
||||
}
|
||||
|
||||
function popupSpanTooltip(ann, e) {
|
||||
function popupTooltips(annotations, e) {
|
||||
var target = e.target || e.srcElement;
|
||||
showTooltipFor(e, annotationTooltip(ann), target);
|
||||
var tooltip = document.createDocumentFragment();
|
||||
for (var i = 0; i < annotations.length; i++) {
|
||||
var ann = annotations[i];
|
||||
tooltip.appendChild(annotationTooltip(ann));
|
||||
}
|
||||
showTooltipFor(e, tooltip, target);
|
||||
}
|
||||
|
||||
function onMouseOver(cm, e) {
|
||||
@ -180,16 +201,20 @@
|
||||
if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
|
||||
var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
|
||||
var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
|
||||
|
||||
var annotations = [];
|
||||
for (var i = 0; i < spans.length; ++i) {
|
||||
var ann = spans[i].__annotation;
|
||||
if (ann) return popupSpanTooltip(ann, e);
|
||||
if (ann) annotations.push(ann);
|
||||
}
|
||||
if (annotations.length) popupTooltips(annotations, e);
|
||||
}
|
||||
|
||||
CodeMirror.defineOption("lint", false, function(cm, val, old) {
|
||||
if (old && old != CodeMirror.Init) {
|
||||
clearMarks(cm);
|
||||
cm.off("change", onChange);
|
||||
if (cm.state.lint.options.lintOnChange !== false)
|
||||
cm.off("change", onChange);
|
||||
CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
|
||||
clearTimeout(cm.state.lint.timeout);
|
||||
delete cm.state.lint;
|
||||
@ -199,11 +224,16 @@
|
||||
var gutters = cm.getOption("gutters"), hasLintGutter = false;
|
||||
for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
|
||||
var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
|
||||
cm.on("change", onChange);
|
||||
if (state.options.tooltips != false)
|
||||
if (state.options.lintOnChange !== false)
|
||||
cm.on("change", onChange);
|
||||
if (state.options.tooltips != false && state.options.tooltips != "gutter")
|
||||
CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
|
||||
|
||||
startLinting(cm);
|
||||
}
|
||||
});
|
||||
|
||||
CodeMirror.defineExtension("performLint", function() {
|
||||
if (this.state.lint) startLinting(this);
|
||||
});
|
||||
});
|
||||
|
||||
2
js/codemirror/addon/runmode/runmode.js
vendored
2
js/codemirror/addon/runmode/runmode.js
vendored
@ -16,7 +16,7 @@ CodeMirror.runMode = function(string, modespec, callback, options) {
|
||||
var ie = /MSIE \d/.test(navigator.userAgent);
|
||||
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
|
||||
|
||||
if (callback.nodeType == 1) {
|
||||
if (callback.appendChild) {
|
||||
var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;
|
||||
var node = callback, col = 0;
|
||||
node.innerHTML = "";
|
||||
|
||||
72
js/codemirror/lib/codemirror.css
vendored
72
js/codemirror/lib/codemirror.css
vendored
@ -41,19 +41,21 @@
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@ -63,30 +65,37 @@
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@ -162,7 +171,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actuall scrolling happens, thus preventing shaking and
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
@ -188,21 +197,26 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
height: 100%;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
@ -235,6 +249,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
@ -277,19 +293,22 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
@ -297,17 +316,14 @@ div.CodeMirror-cursors {
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror ::selection { background: #d7d4f0; }
|
||||
.CodeMirror ::-moz-selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
|
||||
16929
js/codemirror/lib/codemirror.js
vendored
16929
js/codemirror/lib/codemirror.js
vendored
File diff suppressed because it is too large
Load Diff
227
js/codemirror/mode/javascript/javascript.js
vendored
227
js/codemirror/mode/javascript/javascript.js
vendored
@ -1,8 +1,6 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
// TODO actually recognize syntax of TypeScript constructs
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
@ -13,6 +11,11 @@
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
function expressionAllowed(stream, state, backUp) {
|
||||
return /^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
|
||||
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var statementIndent = parserConfig.statementIndent;
|
||||
@ -30,14 +33,15 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
|
||||
var jsKeywords = {
|
||||
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
||||
"return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, "debugger": C,
|
||||
"return": C, "break": C, "continue": C, "new": kw("new"), "delete": C, "throw": C, "debugger": C,
|
||||
"var": kw("var"), "const": kw("var"), "let": kw("var"),
|
||||
"function": kw("function"), "catch": kw("catch"),
|
||||
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
|
||||
"in": operator, "typeof": operator, "instanceof": operator,
|
||||
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
||||
"this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"),
|
||||
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C
|
||||
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
|
||||
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
||||
"await": C, "async": kw("async")
|
||||
};
|
||||
|
||||
// Extend the 'normal' keywords with the TypeScript language extensions
|
||||
@ -45,18 +49,24 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var type = {type: "variable", style: "variable-3"};
|
||||
var tsKeywords = {
|
||||
// object-like things
|
||||
"interface": kw("interface"),
|
||||
"extends": kw("extends"),
|
||||
"constructor": kw("constructor"),
|
||||
"interface": kw("class"),
|
||||
"implements": C,
|
||||
"namespace": C,
|
||||
"module": kw("module"),
|
||||
"enum": kw("module"),
|
||||
"type": kw("type"),
|
||||
|
||||
// scope modifiers
|
||||
"public": kw("public"),
|
||||
"private": kw("private"),
|
||||
"protected": kw("protected"),
|
||||
"static": kw("static"),
|
||||
"public": kw("modifier"),
|
||||
"private": kw("modifier"),
|
||||
"protected": kw("modifier"),
|
||||
"abstract": kw("modifier"),
|
||||
|
||||
// operators
|
||||
"as": operator,
|
||||
|
||||
// types
|
||||
"string": type, "number": type, "bool": type, "any": type
|
||||
"string": type, "number": type, "boolean": type, "any": type
|
||||
};
|
||||
|
||||
for (var attr in tsKeywords) {
|
||||
@ -105,6 +115,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
} else if (ch == "0" && stream.eat(/x/i)) {
|
||||
stream.eatWhile(/[\da-f]/i);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "0" && stream.eat(/o/i)) {
|
||||
stream.eatWhile(/[0-7]/i);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "0" && stream.eat(/b/i)) {
|
||||
stream.eatWhile(/[01]/i);
|
||||
return ret("number", "number");
|
||||
} else if (/\d/.test(ch)) {
|
||||
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
||||
return ret("number", "number");
|
||||
@ -115,8 +131,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
} else if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ret("comment", "comment");
|
||||
} else if (state.lastType == "operator" || state.lastType == "keyword c" ||
|
||||
state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) {
|
||||
} else if (expressionAllowed(stream, state, 1)) {
|
||||
readRegexp(stream);
|
||||
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
|
||||
return ret("regexp", "string-2");
|
||||
@ -131,7 +146,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
stream.skipToEnd();
|
||||
return ret("error", "error");
|
||||
} else if (isOperatorChar.test(ch)) {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
if (ch != ">" || !state.lexical || state.lexical.type != ">")
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", "operator", stream.current());
|
||||
} else if (wordRE.test(ch)) {
|
||||
stream.eatWhile(wordRE);
|
||||
@ -194,13 +210,18 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var arrow = stream.string.indexOf("=>", stream.start);
|
||||
if (arrow < 0) return;
|
||||
|
||||
if (isTS) { // Try to skip TypeScript return type declarations after the arguments
|
||||
var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
|
||||
if (m) arrow = m.index
|
||||
}
|
||||
|
||||
var depth = 0, sawSomething = false;
|
||||
for (var pos = arrow - 1; pos >= 0; --pos) {
|
||||
var ch = stream.string.charAt(pos);
|
||||
var bracket = brackets.indexOf(ch);
|
||||
if (bracket >= 0 && bracket < 3) {
|
||||
if (!depth) { ++pos; break; }
|
||||
if (--depth == 0) break;
|
||||
if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
|
||||
} else if (bracket >= 3 && bracket < 6) {
|
||||
++depth;
|
||||
} else if (wordRE.test(ch)) {
|
||||
@ -275,8 +296,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
return false;
|
||||
}
|
||||
var state = cx.state;
|
||||
cx.marked = "def";
|
||||
if (state.context) {
|
||||
cx.marked = "def";
|
||||
if (inList(state.localVars)) return;
|
||||
state.localVars = {name: varname, next: state.localVars};
|
||||
} else {
|
||||
@ -329,28 +350,30 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
|
||||
function statement(type, value) {
|
||||
if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "{") return cont(pushlex("}"), block, poplex);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") {
|
||||
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
||||
cx.state.cc.pop()();
|
||||
return cont(pushlex("form"), expression, statement, poplex, maybeelse);
|
||||
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
|
||||
}
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
||||
if (type == "variable") return cont(pushlex("stat"), maybelabel);
|
||||
if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
|
||||
if (type == "switch") return cont(pushlex("form"), parenExpr, pushlex("}", "switch"), expect("{"),
|
||||
block, poplex, poplex);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
|
||||
statement, poplex, popcontext);
|
||||
if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex);
|
||||
if (type == "class") return cont(pushlex("form"), className, poplex);
|
||||
if (type == "export") return cont(pushlex("form"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("form"), afterImport, poplex);
|
||||
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
||||
if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex)
|
||||
if (type == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
||||
if (type == "async") return cont(statement)
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function expression(type) {
|
||||
@ -359,6 +382,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
function expressionNoComma(type) {
|
||||
return expressionInner(type, true);
|
||||
}
|
||||
function parenExpr(type) {
|
||||
if (type != "(") return pass()
|
||||
return cont(pushlex(")"), expression, expect(")"), poplex)
|
||||
}
|
||||
function expressionInner(type, noComma) {
|
||||
if (cx.state.fatArrowAt == cx.stream.start) {
|
||||
var body = noComma ? arrowBodyNoComma : arrowBody;
|
||||
@ -369,12 +396,14 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
||||
if (type == "function") return cont(functiondef, maybeop);
|
||||
if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
|
||||
if (type == "class") return cont(pushlex("form"), classExpression, poplex);
|
||||
if (type == "keyword c" || type == "async") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
||||
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
|
||||
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
||||
if (type == "quasi") { return pass(quasi, maybeop); }
|
||||
if (type == "quasi") return pass(quasi, maybeop);
|
||||
if (type == "new") return cont(maybeTarget(noComma));
|
||||
return cont();
|
||||
}
|
||||
function maybeexpression(type) {
|
||||
@ -425,6 +454,18 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expressionNoComma);
|
||||
}
|
||||
function maybeTarget(noComma) {
|
||||
return function(type) {
|
||||
if (type == ".") return cont(noComma ? targetNoComma : target);
|
||||
else return pass(noComma ? expressionNoComma : expression);
|
||||
};
|
||||
}
|
||||
function target(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
|
||||
}
|
||||
function targetNoComma(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
|
||||
}
|
||||
function maybelabel(type) {
|
||||
if (type == ":") return cont(poplex, statement);
|
||||
return pass(maybeoperatorComma, expect(";"), poplex);
|
||||
@ -433,7 +474,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
if (type == "variable") {cx.marked = "property"; return cont();}
|
||||
}
|
||||
function objprop(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
if (type == "async") {
|
||||
cx.marked = "property";
|
||||
return cont(objprop);
|
||||
} else if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(getterSetter);
|
||||
return cont(afterprop);
|
||||
@ -442,8 +486,14 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
return cont(afterprop);
|
||||
} else if (type == "jsonld-keyword") {
|
||||
return cont(afterprop);
|
||||
} else if (type == "modifier") {
|
||||
return cont(objprop)
|
||||
} else if (type == "[") {
|
||||
return cont(expression, expect("]"), afterprop);
|
||||
} else if (type == "spread") {
|
||||
return cont(expression);
|
||||
} else if (type == ":") {
|
||||
return pass(afterprop)
|
||||
}
|
||||
}
|
||||
function getterSetter(type) {
|
||||
@ -456,17 +506,20 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
if (type == "(") return pass(functiondef);
|
||||
}
|
||||
function commasep(what, end) {
|
||||
function proceed(type) {
|
||||
function proceed(type, value) {
|
||||
if (type == ",") {
|
||||
var lex = cx.state.lexical;
|
||||
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
||||
return cont(what, proceed);
|
||||
return cont(function(type, value) {
|
||||
if (type == end || value == end) return pass()
|
||||
return pass(what)
|
||||
}, proceed);
|
||||
}
|
||||
if (type == end) return cont();
|
||||
if (type == end || value == end) return cont();
|
||||
return cont(expect(end));
|
||||
}
|
||||
return function(type) {
|
||||
if (type == end) return cont();
|
||||
return function(type, value) {
|
||||
if (type == end || value == end) return cont();
|
||||
return pass(what, proceed);
|
||||
};
|
||||
}
|
||||
@ -479,20 +532,45 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
if (type == "}") return cont();
|
||||
return pass(statement, block);
|
||||
}
|
||||
function maybetype(type) {
|
||||
if (isTS && type == ":") return cont(typedef);
|
||||
function maybetype(type, value) {
|
||||
if (isTS) {
|
||||
if (type == ":") return cont(typeexpr);
|
||||
if (value == "?") return cont(maybetype);
|
||||
}
|
||||
}
|
||||
function maybedefault(_, value) {
|
||||
if (value == "=") return cont(expressionNoComma);
|
||||
function typeexpr(type) {
|
||||
if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);}
|
||||
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
||||
if (type == "{") return cont(commasep(typeprop, "}"))
|
||||
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
||||
}
|
||||
function typedef(type) {
|
||||
if (type == "variable") {cx.marked = "variable-3"; return cont();}
|
||||
function maybeReturnType(type) {
|
||||
if (type == "=>") return cont(typeexpr)
|
||||
}
|
||||
function typeprop(type) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property"
|
||||
return cont(typeprop)
|
||||
} else if (type == ":") {
|
||||
return cont(typeexpr)
|
||||
}
|
||||
}
|
||||
function typearg(type) {
|
||||
if (type == "variable") return cont(typearg)
|
||||
else if (type == ":") return cont(typeexpr)
|
||||
}
|
||||
function afterType(type, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
||||
if (value == "|" || type == ".") return cont(typeexpr)
|
||||
if (type == "[") return cont(expect("]"), afterType)
|
||||
}
|
||||
function vardef() {
|
||||
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
||||
}
|
||||
function pattern(type, value) {
|
||||
if (type == "modifier") return cont(pattern)
|
||||
if (type == "variable") { register(value); return cont(); }
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "[") return contCommasep(pattern, "]");
|
||||
if (type == "{") return contCommasep(proppattern, "}");
|
||||
}
|
||||
@ -502,6 +580,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
return cont(maybeAssign);
|
||||
}
|
||||
if (type == "variable") cx.marked = "property";
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "}") return pass();
|
||||
return cont(expect(":"), pattern, maybeAssign);
|
||||
}
|
||||
function maybeAssign(_type, value) {
|
||||
@ -537,28 +617,34 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
function functiondef(type, value) {
|
||||
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
||||
if (type == "variable") {register(value); return cont(functiondef);}
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext);
|
||||
}
|
||||
function funarg(type) {
|
||||
if (type == "spread") return cont(funarg);
|
||||
return pass(pattern, maybetype, maybedefault);
|
||||
return pass(pattern, maybetype, maybeAssign);
|
||||
}
|
||||
function classExpression(type, value) {
|
||||
// Class expressions may have an optional name.
|
||||
if (type == "variable") return className(type, value);
|
||||
return classNameAfter(type, value);
|
||||
}
|
||||
function className(type, value) {
|
||||
if (type == "variable") {register(value); return cont(classNameAfter);}
|
||||
}
|
||||
function classNameAfter(type, value) {
|
||||
if (value == "extends") return cont(expression, classNameAfter);
|
||||
if (value == "extends" || value == "implements") return cont(isTS ? typeexpr : expression, classNameAfter);
|
||||
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
||||
}
|
||||
function classBody(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
if (value == "static") {
|
||||
if ((value == "static" || value == "get" || value == "set" ||
|
||||
(isTS && (value == "public" || value == "private" || value == "protected" || value == "readonly" || value == "abstract"))) &&
|
||||
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false)) {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
|
||||
return cont(functiondef, classBody);
|
||||
return cont(isTS ? classfield : functiondef, classBody);
|
||||
}
|
||||
if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
@ -567,23 +653,24 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
if (type == ";") return cont(classBody);
|
||||
if (type == "}") return cont();
|
||||
}
|
||||
function classGetterSetter(type) {
|
||||
if (type != "variable") return pass();
|
||||
cx.marked = "property";
|
||||
return cont();
|
||||
function classfield(type, value) {
|
||||
if (value == "?") return cont(classfield)
|
||||
if (type == ":") return cont(typeexpr, maybeAssign)
|
||||
return pass(functiondef)
|
||||
}
|
||||
function afterModule(type, value) {
|
||||
if (type == "string") return cont(statement);
|
||||
if (type == "variable") { register(value); return cont(maybeFrom); }
|
||||
}
|
||||
function afterExport(_type, value) {
|
||||
function afterExport(type, value) {
|
||||
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
|
||||
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
|
||||
if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
|
||||
return pass(statement);
|
||||
}
|
||||
function exportField(type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
|
||||
if (type == "variable") return pass(expressionNoComma, exportField);
|
||||
}
|
||||
function afterImport(type) {
|
||||
if (type == "string") return cont();
|
||||
return pass(importSpec, maybeFrom);
|
||||
return pass(importSpec, maybeMoreImports, maybeFrom);
|
||||
}
|
||||
function importSpec(type, value) {
|
||||
if (type == "{") return contCommasep(importSpec, "}");
|
||||
@ -591,6 +678,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
if (value == "*") cx.marked = "keyword";
|
||||
return cont(maybeAs);
|
||||
}
|
||||
function maybeMoreImports(type) {
|
||||
if (type == ",") return cont(importSpec, maybeMoreImports)
|
||||
}
|
||||
function maybeAs(_type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
|
||||
}
|
||||
@ -599,17 +689,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
}
|
||||
function arrayLiteral(type) {
|
||||
if (type == "]") return cont();
|
||||
return pass(expressionNoComma, maybeArrayComprehension);
|
||||
}
|
||||
function maybeArrayComprehension(type) {
|
||||
if (type == "for") return pass(comprehension, expect("]"));
|
||||
if (type == ",") return cont(commasep(maybeexpressionNoComma, "]"));
|
||||
return pass(commasep(expressionNoComma, "]"));
|
||||
}
|
||||
function comprehension(type) {
|
||||
if (type == "for") return cont(forspec, comprehension);
|
||||
if (type == "if") return cont(expression, comprehension);
|
||||
}
|
||||
|
||||
function isContinuedStatement(state, textAfter) {
|
||||
return state.lastType == "operator" || state.lastType == "," ||
|
||||
@ -628,7 +709,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
context: parserConfig.localVars && {vars: parserConfig.localVars},
|
||||
indented: 0
|
||||
indented: basecolumn || 0
|
||||
};
|
||||
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
||||
state.globalVars = parserConfig.globalVars;
|
||||
@ -652,14 +733,18 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize == tokenComment) return CodeMirror.Pass;
|
||||
if (state.tokenize != tokenBase) return 0;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
|
||||
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
||||
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
|
||||
var c = state.cc[i];
|
||||
if (c == poplex) lexical = lexical.prev;
|
||||
else if (c != maybeelse) break;
|
||||
}
|
||||
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
|
||||
while ((lexical.type == "stat" || lexical.type == "form") &&
|
||||
(firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
|
||||
(top == maybeoperatorComma || top == maybeoperatorNoComma) &&
|
||||
!/^[,\.=+\-*:?[\(]/.test(textAfter))))
|
||||
lexical = lexical.prev;
|
||||
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
||||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
@ -684,7 +769,13 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
|
||||
helperType: jsonMode ? "json" : "javascript",
|
||||
jsonldMode: jsonldMode,
|
||||
jsonMode: jsonMode
|
||||
jsonMode: jsonMode,
|
||||
|
||||
expressionAllowed: expressionAllowed,
|
||||
skipExpression: function(state) {
|
||||
var top = state.cc[state.cc.length - 1]
|
||||
if (top == expression || top == expressionNoComma) state.cc.pop()
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
44
js/codemirror/mode/sql/sql.js
vendored
44
js/codemirror/mode/sql/sql.js
vendored
File diff suppressed because one or more lines are too long
150
js/codemirror/mode/xml/xml.js
vendored
150
js/codemirror/mode/xml/xml.js
vendored
@ -11,54 +11,56 @@
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1;
|
||||
var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag;
|
||||
if (multilineTagIndentPastTag == null) multilineTagIndentPastTag = true;
|
||||
var htmlConfig = {
|
||||
autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
|
||||
'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
|
||||
'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
|
||||
'track': true, 'wbr': true, 'menuitem': true},
|
||||
implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
|
||||
'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
|
||||
'th': true, 'tr': true},
|
||||
contextGrabbers: {
|
||||
'dd': {'dd': true, 'dt': true},
|
||||
'dt': {'dd': true, 'dt': true},
|
||||
'li': {'li': true},
|
||||
'option': {'option': true, 'optgroup': true},
|
||||
'optgroup': {'optgroup': true},
|
||||
'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
|
||||
'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
|
||||
'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
|
||||
'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
|
||||
'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
|
||||
'rp': {'rp': true, 'rt': true},
|
||||
'rt': {'rp': true, 'rt': true},
|
||||
'tbody': {'tbody': true, 'tfoot': true},
|
||||
'td': {'td': true, 'th': true},
|
||||
'tfoot': {'tbody': true},
|
||||
'th': {'td': true, 'th': true},
|
||||
'thead': {'tbody': true, 'tfoot': true},
|
||||
'tr': {'tr': true}
|
||||
},
|
||||
doNotIndent: {"pre": true},
|
||||
allowUnquoted: true,
|
||||
allowMissing: true,
|
||||
caseFold: true
|
||||
}
|
||||
|
||||
var Kludges = parserConfig.htmlMode ? {
|
||||
autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
|
||||
'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
|
||||
'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
|
||||
'track': true, 'wbr': true, 'menuitem': true},
|
||||
implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
|
||||
'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
|
||||
'th': true, 'tr': true},
|
||||
contextGrabbers: {
|
||||
'dd': {'dd': true, 'dt': true},
|
||||
'dt': {'dd': true, 'dt': true},
|
||||
'li': {'li': true},
|
||||
'option': {'option': true, 'optgroup': true},
|
||||
'optgroup': {'optgroup': true},
|
||||
'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
|
||||
'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
|
||||
'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
|
||||
'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
|
||||
'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
|
||||
'rp': {'rp': true, 'rt': true},
|
||||
'rt': {'rp': true, 'rt': true},
|
||||
'tbody': {'tbody': true, 'tfoot': true},
|
||||
'td': {'td': true, 'th': true},
|
||||
'tfoot': {'tbody': true},
|
||||
'th': {'td': true, 'th': true},
|
||||
'thead': {'tbody': true, 'tfoot': true},
|
||||
'tr': {'tr': true}
|
||||
},
|
||||
doNotIndent: {"pre": true},
|
||||
allowUnquoted: true,
|
||||
allowMissing: true,
|
||||
caseFold: true
|
||||
} : {
|
||||
autoSelfClosers: {},
|
||||
implicitlyClosed: {},
|
||||
contextGrabbers: {},
|
||||
doNotIndent: {},
|
||||
allowUnquoted: false,
|
||||
allowMissing: false,
|
||||
caseFold: false
|
||||
};
|
||||
var alignCDATA = parserConfig.alignCDATA;
|
||||
var xmlConfig = {
|
||||
autoSelfClosers: {},
|
||||
implicitlyClosed: {},
|
||||
contextGrabbers: {},
|
||||
doNotIndent: {},
|
||||
allowUnquoted: false,
|
||||
allowMissing: false,
|
||||
caseFold: false
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("xml", function(editorConf, config_) {
|
||||
var indentUnit = editorConf.indentUnit
|
||||
var config = {}
|
||||
var defaults = config_.htmlMode ? htmlConfig : xmlConfig
|
||||
for (var prop in defaults) config[prop] = defaults[prop]
|
||||
for (var prop in config_) config[prop] = config_[prop]
|
||||
|
||||
// Return variables for tokenizers
|
||||
var type, setStyle;
|
||||
@ -109,6 +111,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
inText.isInText = true;
|
||||
|
||||
function inTag(stream, state) {
|
||||
var ch = stream.next();
|
||||
@ -187,7 +190,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
this.tagName = tagName;
|
||||
this.indent = state.indented;
|
||||
this.startOfLine = startOfLine;
|
||||
if (Kludges.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
|
||||
if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
|
||||
this.noIndent = true;
|
||||
}
|
||||
function popContext(state) {
|
||||
@ -200,8 +203,8 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
return;
|
||||
}
|
||||
parentTagName = state.context.tagName;
|
||||
if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
|
||||
!Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
||||
if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
|
||||
!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
||||
return;
|
||||
}
|
||||
popContext(state);
|
||||
@ -232,9 +235,9 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
if (type == "word") {
|
||||
var tagName = stream.current();
|
||||
if (state.context && state.context.tagName != tagName &&
|
||||
Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
||||
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
||||
popContext(state);
|
||||
if (state.context && state.context.tagName == tagName) {
|
||||
if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
|
||||
setStyle = "tag";
|
||||
return closeState;
|
||||
} else {
|
||||
@ -268,7 +271,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
var tagName = state.tagName, tagStart = state.tagStart;
|
||||
state.tagName = state.tagStart = null;
|
||||
if (type == "selfcloseTag" ||
|
||||
Kludges.autoSelfClosers.hasOwnProperty(tagName)) {
|
||||
config.autoSelfClosers.hasOwnProperty(tagName)) {
|
||||
maybePopContext(state, tagName);
|
||||
} else {
|
||||
maybePopContext(state, tagName);
|
||||
@ -281,12 +284,12 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
}
|
||||
function attrEqState(type, stream, state) {
|
||||
if (type == "equals") return attrValueState;
|
||||
if (!Kludges.allowMissing) setStyle = "error";
|
||||
if (!config.allowMissing) setStyle = "error";
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
function attrValueState(type, stream, state) {
|
||||
if (type == "string") return attrContinuedState;
|
||||
if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return attrState;}
|
||||
if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
|
||||
setStyle = "error";
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
@ -296,12 +299,14 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function() {
|
||||
return {tokenize: inText,
|
||||
state: baseState,
|
||||
indented: 0,
|
||||
tagName: null, tagStart: null,
|
||||
context: null};
|
||||
startState: function(baseIndent) {
|
||||
var state = {tokenize: inText,
|
||||
state: baseState,
|
||||
indented: baseIndent || 0,
|
||||
tagName: null, tagStart: null,
|
||||
context: null}
|
||||
if (baseIndent != null) state.baseIndent = baseIndent
|
||||
return state
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
@ -334,19 +339,19 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
||||
// Indent the starts of attribute names.
|
||||
if (state.tagName) {
|
||||
if (multilineTagIndentPastTag)
|
||||
if (config.multilineTagIndentPastTag !== false)
|
||||
return state.tagStart + state.tagName.length + 2;
|
||||
else
|
||||
return state.tagStart + indentUnit * multilineTagIndentFactor;
|
||||
return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
|
||||
}
|
||||
if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
|
||||
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
|
||||
var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
|
||||
if (tagAfter && tagAfter[1]) { // Closing tag spotted
|
||||
while (context) {
|
||||
if (context.tagName == tagAfter[2]) {
|
||||
context = context.prev;
|
||||
break;
|
||||
} else if (Kludges.implicitlyClosed.hasOwnProperty(context.tagName)) {
|
||||
} else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
|
||||
context = context.prev;
|
||||
} else {
|
||||
break;
|
||||
@ -354,25 +359,30 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
}
|
||||
} else if (tagAfter) { // Opening tag spotted
|
||||
while (context) {
|
||||
var grabbers = Kludges.contextGrabbers[context.tagName];
|
||||
var grabbers = config.contextGrabbers[context.tagName];
|
||||
if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
|
||||
context = context.prev;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (context && !context.startOfLine)
|
||||
while (context && context.prev && !context.startOfLine)
|
||||
context = context.prev;
|
||||
if (context) return context.indent + indentUnit;
|
||||
else return 0;
|
||||
else return state.baseIndent || 0;
|
||||
},
|
||||
|
||||
electricInput: /<\/[\s\w:]+>$/,
|
||||
blockCommentStart: "<!--",
|
||||
blockCommentEnd: "-->",
|
||||
|
||||
configuration: parserConfig.htmlMode ? "html" : "xml",
|
||||
helperType: parserConfig.htmlMode ? "html" : "xml"
|
||||
configuration: config.htmlMode ? "html" : "xml",
|
||||
helperType: config.htmlMode ? "html" : "xml",
|
||||
|
||||
skipAttribute: function(state) {
|
||||
if (state.state == attrValueState)
|
||||
state.state = attrState
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@ -585,10 +585,10 @@ function setTab(tab_id)
|
||||
{
|
||||
$('ul.tabs').each(function() {
|
||||
var $this = $(this);
|
||||
if (!$this.find('li a[href=#' + tab_id + ']').length) {
|
||||
if (!$this.find('li a[href="#' + tab_id + '"]').length) {
|
||||
return;
|
||||
}
|
||||
$this.find('li').removeClass('active').find('a[href=#' + tab_id + ']').parent().addClass('active');
|
||||
$this.find('li').removeClass('active').find('a[href="#' + tab_id + '"]').parent().addClass('active');
|
||||
$this.parent().find('div.tabs_contents fieldset').hide().filter('#' + tab_id).show();
|
||||
var hashValue = 'tab_' + tab_id;
|
||||
location.hash = hashValue;
|
||||
|
||||
@ -190,7 +190,7 @@ var PMA_console = {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var data = $.parseJSON(xhr.responseText);
|
||||
var data = JSON.parse(xhr.responseText);
|
||||
PMA_console.ajaxCallback(data);
|
||||
} catch (e) {
|
||||
console.log("Invalid JSON!" + e.message);
|
||||
|
||||
@ -30,6 +30,7 @@ AJAX.registerTeardown('db_structure.js', function () {
|
||||
$('a.real_row_count').off('click');
|
||||
$('a.row_count_sum').off('click');
|
||||
$('select[name=submit_mult]').unbind('change');
|
||||
$("#filterText").unbind('keyup');
|
||||
});
|
||||
|
||||
/**
|
||||
@ -210,6 +211,26 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Filtering tables on table listing of particular database
|
||||
*
|
||||
*/
|
||||
$("#filterText").keyup(function() {
|
||||
var filterInput = $(this).val().toUpperCase();
|
||||
var structureTable = $('#structureTable')[0];
|
||||
$('#structureTable tbody tr').each(function() {
|
||||
var tr = $(this);
|
||||
var a = tr.find('a')[0];
|
||||
if (a) {
|
||||
if (a.text.trim().toUpperCase().indexOf(filterInput) > -1) {
|
||||
tr[0].style.display = "";
|
||||
} else {
|
||||
tr[0].style.display = "none";
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Event handler on select of "Make consistent with central list"
|
||||
*/
|
||||
|
||||
@ -126,7 +126,7 @@ function loadTemplate(id)
|
||||
$.post('tbl_export.php', params, function (response) {
|
||||
if (response.success === true) {
|
||||
var $form = $('form[name="dump"]');
|
||||
var options = $.parseJSON(response.data);
|
||||
var options = JSON.parse(response.data);
|
||||
$.each(options, function (key, value) {
|
||||
var $element = $form.find('[name="' + key + '"]');
|
||||
if ($element.length) {
|
||||
|
||||
@ -1212,7 +1212,7 @@ function insertQuery(queryType)
|
||||
} else if (queryType == "update") {
|
||||
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
|
||||
} else if (queryType == "delete") {
|
||||
query = "DELETE FROM `" + table + "` WHERE 1";
|
||||
query = "DELETE FROM `" + table + "` WHERE 0";
|
||||
}
|
||||
setQuery(query);
|
||||
sql_box_locked = false;
|
||||
@ -1951,7 +1951,7 @@ function codemirrorAutocompleteOnInputRead(instance) {
|
||||
data: params,
|
||||
success: function (data) {
|
||||
if (data.success) {
|
||||
var tables = $.parseJSON(data.tables);
|
||||
var tables = JSON.parse(data.tables);
|
||||
sql_autocomplete_default_table = PMA_commonParams.get('table');
|
||||
sql_autocomplete = [];
|
||||
for (var table in tables) {
|
||||
@ -3520,7 +3520,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
url: href,
|
||||
data: params,
|
||||
success: function (data) {
|
||||
central_column_list[db + '_' + table] = $.parseJSON(data.message);
|
||||
central_column_list[db + '_' + table] = JSON.parse(data.message);
|
||||
},
|
||||
async:false
|
||||
});
|
||||
@ -4049,7 +4049,9 @@ var toggleButton = function ($obj) {
|
||||
removeClass = 'off';
|
||||
addClass = 'on';
|
||||
}
|
||||
$.post(url, {'ajax_request': true}, function (data) {
|
||||
|
||||
var params = {'ajax_request': true, 'token': PMA_commonParams.get('token')};
|
||||
$.post(url, params, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
$container
|
||||
|
||||
@ -5,12 +5,12 @@
|
||||
*
|
||||
* About: Version
|
||||
*
|
||||
* version: 1.0.8
|
||||
* revision: 1250
|
||||
* version: 1.0.9
|
||||
* revision: d96a669
|
||||
*
|
||||
* About: Copyright & License
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT and GPL version 2.0 licenses. This means that you can
|
||||
* choose the license that best suits your project and use it accordingly.
|
||||
@ -244,8 +244,8 @@
|
||||
}
|
||||
};
|
||||
|
||||
$.jqplot.version = "1.0.8";
|
||||
$.jqplot.revision = "1250";
|
||||
$.jqplot.version = "1.0.9";
|
||||
$.jqplot.revision = "d96a669";
|
||||
|
||||
$.jqplot.targetCounter = 1;
|
||||
|
||||
@ -295,6 +295,25 @@
|
||||
if ($.jqplot.use_excanvas) {
|
||||
return window.G_vmlCanvasManager.initElement(canvas);
|
||||
}
|
||||
|
||||
var cctx = canvas.getContext('2d');
|
||||
|
||||
var canvasBackingScale = 1;
|
||||
if (window.devicePixelRatio > 1 && (cctx.webkitBackingStorePixelRatio === undefined ||
|
||||
cctx.webkitBackingStorePixelRatio < 2)) {
|
||||
canvasBackingScale = window.devicePixelRatio;
|
||||
}
|
||||
var oldWidth = canvas.width;
|
||||
var oldHeight = canvas.height;
|
||||
|
||||
canvas.width = canvasBackingScale * canvas.width;
|
||||
canvas.height = canvasBackingScale * canvas.height;
|
||||
canvas.style.width = oldWidth + 'px';
|
||||
canvas.style.height = oldHeight + 'px';
|
||||
cctx.save();
|
||||
|
||||
cctx.scale(canvasBackingScale, canvasBackingScale);
|
||||
|
||||
return canvas;
|
||||
};
|
||||
|
||||
@ -1307,6 +1326,7 @@
|
||||
this._sumy = 0;
|
||||
this._sumx = 0;
|
||||
this._type = '';
|
||||
this.step = false;
|
||||
}
|
||||
|
||||
Series.prototype = new $.jqplot.ElemContainer();
|
||||
@ -3113,9 +3133,34 @@
|
||||
}
|
||||
|
||||
var fb = this.fillBetween;
|
||||
if (fb.fill && fb.series1 !== fb.series2 && fb.series1 < seriesLength && fb.series2 < seriesLength && series[fb.series1]._type === 'line' && series[fb.series2]._type === 'line') {
|
||||
if(typeof fb.series1 == 'number'){
|
||||
if(fb.fill&&fb.series1!==fb.series2&&fb.series1<seriesLength&&fb.series2<seriesLength&&series[fb.series1]._type==="line"&&series[fb.series2]._type==="line")
|
||||
this.doFillBetweenLines();
|
||||
}
|
||||
else{
|
||||
if(fb.series1 != null && fb.series2 != null){
|
||||
var doFb = false;
|
||||
if(fb.series1.length === fb.series2.length){
|
||||
var tempSeries1 = 0;
|
||||
var tempSeries2 = 0;
|
||||
|
||||
for(var cnt = 0; cnt < fb.series1.length; cnt++){
|
||||
tempSeries1 = fb.series1[cnt];
|
||||
tempSeries2 = fb.series2[cnt];
|
||||
if(tempSeries1!==tempSeries2&&tempSeries1<seriesLength&&tempSeries2<seriesLength&&series[tempSeries1]._type==="line"&&series[tempSeries2]._type==="line"){
|
||||
doFb = true;
|
||||
}
|
||||
else{
|
||||
doFb = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(fb.fill && doFb){
|
||||
this.doFillBetweenLines();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var i=0, l=$.jqplot.postDrawHooks.length; i<l; i++) {
|
||||
$.jqplot.postDrawHooks[i].call(this);
|
||||
@ -3156,37 +3201,47 @@
|
||||
|
||||
jqPlot.prototype.doFillBetweenLines = function () {
|
||||
var fb = this.fillBetween;
|
||||
var series = this.series;
|
||||
var sid1 = fb.series1;
|
||||
var sid2 = fb.series2;
|
||||
// first series should always be lowest index
|
||||
var id1 = (sid1 < sid2) ? sid1 : sid2;
|
||||
var id2 = (sid2 > sid1) ? sid2 : sid1;
|
||||
var id1 = 0, id2 = 0;
|
||||
|
||||
var series1 = this.series[id1];
|
||||
var series2 = this.series[id2];
|
||||
|
||||
if (series2.renderer.smooth) {
|
||||
var tempgd = series2.renderer._smoothedData.slice(0).reverse();
|
||||
}
|
||||
else {
|
||||
var tempgd = series2.gridData.slice(0).reverse();
|
||||
function fill(id1, id2){
|
||||
var series1 = series[id1];
|
||||
var series2 = series[id2];
|
||||
if (series2.renderer.smooth)
|
||||
var tempgd = series2.renderer._smoothedData.slice(0).reverse();
|
||||
else
|
||||
var tempgd = series2.gridData.slice(0).reverse();
|
||||
if (series1.renderer.smooth)
|
||||
var gd = series1.renderer._smoothedData.concat(tempgd);
|
||||
else
|
||||
var gd = series1.gridData.concat(tempgd);
|
||||
var color = fb.color !== null ? fb.color : series[sid1].fillColor;
|
||||
var baseSeries = fb.baseSeries !== null ? fb.baseSeries : id1;
|
||||
var sr =
|
||||
series[baseSeries].renderer.shapeRenderer;
|
||||
var opts =
|
||||
{
|
||||
fillStyle : color,
|
||||
fill : true,
|
||||
closePath : true
|
||||
};
|
||||
sr.draw(series1.shadowCanvas._ctx, gd, opts)
|
||||
}
|
||||
|
||||
if (series1.renderer.smooth) {
|
||||
var gd = series1.renderer._smoothedData.concat(tempgd);
|
||||
if(typeof sid1 == 'number' && typeof sid2 == 'number'){
|
||||
id1 = sid1 < sid2 ? sid1 : sid2;
|
||||
id2 = sid2 > sid1 ? sid2 : sid1;
|
||||
fill(id1, id2);
|
||||
}
|
||||
else {
|
||||
var gd = series1.gridData.concat(tempgd);
|
||||
else{
|
||||
for(var cnt = 0; cnt < sid1.length ; cnt++){
|
||||
id1 = sid1[cnt] < sid2[cnt] ? sid1[cnt] : sid2[cnt];
|
||||
id2 = sid2[cnt] > sid1[cnt] ? sid2[cnt] : sid1[cnt];
|
||||
fill(id1, id2);
|
||||
}
|
||||
}
|
||||
|
||||
var color = (fb.color !== null) ? fb.color : this.series[sid1].fillColor;
|
||||
var baseSeries = (fb.baseSeries !== null) ? fb.baseSeries : id1;
|
||||
|
||||
// now apply a fill to the shape on the lower series shadow canvas,
|
||||
// so it is behind both series.
|
||||
var sr = this.series[baseSeries].renderer.shapeRenderer;
|
||||
var opts = {fillStyle: color, fill: true, closePath: true};
|
||||
sr.draw(series1.shadowCanvas._ctx, gd, opts);
|
||||
};
|
||||
|
||||
this.bindCustomEvents = function() {
|
||||
@ -3243,7 +3298,7 @@
|
||||
for (j=0; j<s._barPoints.length; j++) {
|
||||
points = s._barPoints[j];
|
||||
p = s.gridData[j];
|
||||
if (x>points[0][0] && x<points[2][0] && y>points[2][1] && y<points[0][1]) {
|
||||
if (x>points[0][0] && x<points[2][0] && (y>points[2][1] && y<points[0][1] || y<points[2][1] && y>points[0][1])) {
|
||||
return {seriesIndex:s.index, pointIndex:j, gridData:p, data:s.data[j], points:s._barPoints[j]};
|
||||
}
|
||||
}
|
||||
@ -5624,6 +5679,9 @@
|
||||
for (var i=0; i<data.length; i++) {
|
||||
// if not a line series or if no nulls in data, push the converted point onto the array.
|
||||
if (data[i][0] != null && data[i][1] != null) {
|
||||
if (this.step && i>0) {
|
||||
gd.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i-1][1])]);
|
||||
}
|
||||
gd.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1])]);
|
||||
}
|
||||
// else if there is a null, preserve it.
|
||||
@ -9327,7 +9385,7 @@
|
||||
* @author Chris Leonello
|
||||
* @date #date#
|
||||
* @version #VERSION#
|
||||
* @copyright (c) 2010-2013 Chris Leonello
|
||||
* @copyright (c) 2010-2015 Chris Leonello
|
||||
* jsDate is currently available for use in all personal or commercial projects
|
||||
* under both the MIT and GPL version 2.0 licenses. This means that you can
|
||||
* choose the license that best suits your project and use it accordingly.
|
||||
@ -10034,10 +10092,18 @@
|
||||
|
||||
'sv': {
|
||||
monthNames: ['januari','februari','mars','april','maj','juni','juli','augusti','september','oktober','november','december'],
|
||||
monthNamesShort: ['jan','feb','mar','apr','maj','jun','jul','aug','sep','okt','nov','dec'],
|
||||
monthNamesShort: ['jan','feb','mar','apr','maj','jun','jul','aug','sep','okt','nov','dec'],
|
||||
dayNames: ['söndag','måndag','tisdag','onsdag','torsdag','fredag','lördag'],
|
||||
dayNamesShort: ['sön','mån','tis','ons','tor','fre','lör'],
|
||||
formatString: '%Y-%m-%d %H:%M:%S'
|
||||
},
|
||||
|
||||
'it': {
|
||||
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
||||
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic'],
|
||||
dayNames: ['Domenica','Lunedi','Martedi','Mercoledi','Giovedi','Venerdi','Sabato'],
|
||||
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
|
||||
formatString: '%d-%m-%Y %H:%M:%S'
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
@ -342,7 +342,7 @@
|
||||
this._dataColors = [];
|
||||
this._barPoints = [];
|
||||
|
||||
if (this.barWidth == null) {
|
||||
if (this.barWidth == null || this.rendererOptions.barWidth == null) {//check pull request https://bitbucket.org/cleonello/jqplot/pull-request/61/fix-for-issue-513/diff
|
||||
this.renderer.setBarWidth.call(this);
|
||||
}
|
||||
|
||||
@ -798,4 +798,4 @@
|
||||
}
|
||||
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
@ -29,7 +29,7 @@
|
||||
*
|
||||
* included jsDate library by Chris Leonello:
|
||||
*
|
||||
* Copyright (c) 2010-2013 Chris Leonello
|
||||
* Copyright (c) 2010-2015 Chris Leonello
|
||||
*
|
||||
* jsDate is currently available for use in all personal or commercial projects
|
||||
* under both the MIT and GPL version 2.0 licenses. This means that you can
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
@ -60,9 +60,13 @@
|
||||
*
|
||||
* 'jqplotDataMouseOver' - triggered when user mouseing over a slice.
|
||||
* 'jqplotDataHighlight' - triggered the first time user mouses over a slice,
|
||||
* if highlighting is enabled.
|
||||
* if highlighting is enabled.
|
||||
* 'jqplotDataUnhighlight' - triggered when a user moves the mouse out of
|
||||
* a highlighted slice.
|
||||
* a highlighted slice.
|
||||
* 'jqplotLegendHighlight' - triggered the first time user mouses over a legend,
|
||||
* if highlighting is enabled.
|
||||
* 'jqplotLegendUnhighlight' - triggered when a user moves the mouse out of
|
||||
* a highlighted legend.
|
||||
* 'jqplotDataClick' - triggered when the user clicks on a slice.
|
||||
* 'jqplotDataRightClick' - tiggered when the user right clicks on a slice if
|
||||
* the "captureRightClick" option is set to true on the plot.
|
||||
@ -146,6 +150,10 @@
|
||||
// 180 or - 180 = on the negative x axis.
|
||||
this.startAngle = 0;
|
||||
this.tickRenderer = $.jqplot.PieTickRenderer;
|
||||
// prop: showSlice
|
||||
// Array for whether the pie chart slice for a data element should be displayed.
|
||||
// Containsg true or false for each data element. If not specified, defaults to true.
|
||||
this.showSlice = [];
|
||||
// Used as check for conditions where pie shouldn't be drawn.
|
||||
this._drawData = true;
|
||||
this._type = 'pie';
|
||||
@ -207,6 +215,9 @@
|
||||
if (this.data[i][1] != 0) {
|
||||
// we have data, O.K. to draw.
|
||||
this._drawData = true;
|
||||
if (this.showSlice[i] === undefined) {
|
||||
this.showSlice[i] = true;
|
||||
}
|
||||
}
|
||||
stack.push(this.data[i][1]);
|
||||
td.push([this.data[i][0]]);
|
||||
@ -357,6 +368,8 @@
|
||||
var offy = 0;
|
||||
var trans = 1;
|
||||
var colorGenerator = new $.jqplot.ColorGenerator(this.seriesColors);
|
||||
var sliceColor;
|
||||
|
||||
if (options.legendInfo && options.legendInfo.placement == 'insideGrid') {
|
||||
var li = options.legendInfo;
|
||||
switch (li.location) {
|
||||
@ -395,8 +408,12 @@
|
||||
|
||||
var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
|
||||
var fill = (opts.fill != undefined) ? opts.fill : this.fill;
|
||||
var cw = ctx.canvas.width;
|
||||
var ch = ctx.canvas.height;
|
||||
|
||||
//see http://stackoverflow.com/questions/20221461/hidpi-retina-plot-drawing
|
||||
var cw = parseInt(ctx.canvas.style.width);
|
||||
var ch = parseInt(ctx.canvas.style.height);
|
||||
//
|
||||
|
||||
var w = cw - offx - 2 * this.padding;
|
||||
var h = ch - offy - 2 * this.padding;
|
||||
var mindim = Math.min(w,h);
|
||||
@ -457,46 +474,50 @@
|
||||
}
|
||||
|
||||
for (var i=0; i<gd.length; i++) {
|
||||
|
||||
this.renderer.drawSlice.call (this, ctx, this._sliceAngles[i][0], this._sliceAngles[i][1], colorGenerator.next(), false);
|
||||
|
||||
if (this.showDataLabels && gd[i][2]*100 >= this.dataLabelThreshold) {
|
||||
var fstr, avgang = (this._sliceAngles[i][0] + this._sliceAngles[i][1])/2, label;
|
||||
|
||||
sliceColor = colorGenerator.next();
|
||||
|
||||
if (this.showSlice[i]) {
|
||||
this.renderer.drawSlice.call (this, ctx, this._sliceAngles[i][0], this._sliceAngles[i][1], sliceColor, false);
|
||||
|
||||
if (this.dataLabels == 'label') {
|
||||
fstr = this.dataLabelFormatString || '%s';
|
||||
label = $.jqplot.sprintf(fstr, gd[i][0]);
|
||||
if (this.showDataLabels && gd[i][2]*100 >= this.dataLabelThreshold) {
|
||||
var fstr, avgang = (this._sliceAngles[i][0] + this._sliceAngles[i][1])/2, label;
|
||||
|
||||
if (this.dataLabels == 'label') {
|
||||
fstr = this.dataLabelFormatString || '%s';
|
||||
label = $.jqplot.sprintf(fstr, gd[i][0]);
|
||||
}
|
||||
else if (this.dataLabels == 'value') {
|
||||
fstr = this.dataLabelFormatString || '%d';
|
||||
label = $.jqplot.sprintf(fstr, this.data[i][1]);
|
||||
}
|
||||
else if (this.dataLabels == 'percent') {
|
||||
fstr = this.dataLabelFormatString || '%d%%';
|
||||
label = $.jqplot.sprintf(fstr, gd[i][2]*100);
|
||||
}
|
||||
else if (this.dataLabels.constructor == Array) {
|
||||
fstr = this.dataLabelFormatString || '%s';
|
||||
label = $.jqplot.sprintf(fstr, this.dataLabels[i]);
|
||||
}
|
||||
|
||||
var fact = (this._radius ) * this.dataLabelPositionFactor + this.sliceMargin + this.dataLabelNudge;
|
||||
|
||||
var x = this._center[0] + Math.cos(avgang) * fact + this.canvas._offsets.left;
|
||||
var y = this._center[1] + Math.sin(avgang) * fact + this.canvas._offsets.top;
|
||||
|
||||
var labelelem = $('<div class="jqplot-pie-series jqplot-data-label" style="position:absolute;">' + label + '</div>').insertBefore(plot.eventCanvas._elem);
|
||||
if (this.dataLabelCenterOn) {
|
||||
x -= labelelem.width()/2;
|
||||
y -= labelelem.height()/2;
|
||||
}
|
||||
else {
|
||||
x -= labelelem.width() * Math.sin(avgang/2);
|
||||
y -= labelelem.height()/2;
|
||||
}
|
||||
x = Math.round(x);
|
||||
y = Math.round(y);
|
||||
labelelem.css({left: x, top: y});
|
||||
}
|
||||
else if (this.dataLabels == 'value') {
|
||||
fstr = this.dataLabelFormatString || '%d';
|
||||
label = $.jqplot.sprintf(fstr, this.data[i][1]);
|
||||
}
|
||||
else if (this.dataLabels == 'percent') {
|
||||
fstr = this.dataLabelFormatString || '%d%%';
|
||||
label = $.jqplot.sprintf(fstr, gd[i][2]*100);
|
||||
}
|
||||
else if (this.dataLabels.constructor == Array) {
|
||||
fstr = this.dataLabelFormatString || '%s';
|
||||
label = $.jqplot.sprintf(fstr, this.dataLabels[i]);
|
||||
}
|
||||
|
||||
var fact = (this._radius ) * this.dataLabelPositionFactor + this.sliceMargin + this.dataLabelNudge;
|
||||
|
||||
var x = this._center[0] + Math.cos(avgang) * fact + this.canvas._offsets.left;
|
||||
var y = this._center[1] + Math.sin(avgang) * fact + this.canvas._offsets.top;
|
||||
|
||||
var labelelem = $('<div class="jqplot-pie-series jqplot-data-label" style="position:absolute;">' + label + '</div>').insertBefore(plot.eventCanvas._elem);
|
||||
if (this.dataLabelCenterOn) {
|
||||
x -= labelelem.width()/2;
|
||||
y -= labelelem.height()/2;
|
||||
}
|
||||
else {
|
||||
x -= labelelem.width() * Math.sin(avgang/2);
|
||||
y -= labelelem.height()/2;
|
||||
}
|
||||
x = Math.round(x);
|
||||
y = Math.round(y);
|
||||
labelelem.css({left: x, top: y});
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -554,6 +575,9 @@
|
||||
// prop: numberColumns
|
||||
// Maximum number of columns in the legend. 0 or null for unlimited.
|
||||
this.numberColumns = null;
|
||||
// prop: width
|
||||
// Fixed with of legend. 0 or null for auto size
|
||||
this.width = null;
|
||||
$.extend(true, this, options);
|
||||
};
|
||||
|
||||
@ -630,7 +654,7 @@
|
||||
|
||||
var i, j;
|
||||
var tr, td1, td2;
|
||||
var lt, rs, color;
|
||||
var lt, tt, rs, color;
|
||||
var idx = 0;
|
||||
var div0, div1;
|
||||
|
||||
@ -647,8 +671,21 @@
|
||||
}
|
||||
|
||||
for (j=0; j<nc; j++) {
|
||||
if (idx < pd.length){
|
||||
lt = this.labels[idx] || pd[idx][0].toString();
|
||||
if (idx < pd.length) {
|
||||
tt = '';
|
||||
if (this.labels[idx]) {
|
||||
lt = this.labels[idx];
|
||||
}
|
||||
else {
|
||||
if (typeof pd[idx][0] === 'object') {
|
||||
lt = pd[idx][0][0].toString();
|
||||
tt = pd[idx][0][1].toString();
|
||||
}
|
||||
else {
|
||||
lt = pd[idx][0].toString();
|
||||
}
|
||||
}
|
||||
//lt = this.labels[idx] || pd[idx][0].toString();
|
||||
color = colorGenerator.next();
|
||||
if (!reverse){
|
||||
if (i>0){
|
||||
@ -676,6 +713,9 @@
|
||||
|
||||
div0 = $(document.createElement('div'));
|
||||
div0.addClass('jqplot-table-legend-swatch-outline');
|
||||
if (tt !== '') {
|
||||
div0.attr("title", tt);
|
||||
}
|
||||
div1 = $(document.createElement('div'));
|
||||
div1.addClass('jqplot-table-legend-swatch');
|
||||
div1.css({backgroundColor: color, borderColor: color});
|
||||
@ -689,7 +729,7 @@
|
||||
td2.text(lt);
|
||||
}
|
||||
else {
|
||||
td2.html(lt);
|
||||
td2.html('<a title="' + tt + '">' + lt + "</a>");
|
||||
}
|
||||
if (reverse) {
|
||||
td2.prependTo(tr);
|
||||
@ -748,7 +788,7 @@
|
||||
|
||||
if (setopts) {
|
||||
options.axesDefaults.renderer = $.jqplot.PieAxisRenderer;
|
||||
options.legend.renderer = $.jqplot.PieLegendRenderer;
|
||||
options.legend.renderer = options.legend.renderer || $.jqplot.PieLegendRenderer;
|
||||
options.legend.preDraw = true;
|
||||
options.seriesDefaults.pointLabels = {show: false};
|
||||
}
|
||||
@ -774,12 +814,14 @@
|
||||
}
|
||||
|
||||
function highlight (plot, sidx, pidx) {
|
||||
var s = plot.series[sidx];
|
||||
var canvas = plot.plugins.pieRenderer.highlightCanvas;
|
||||
canvas._ctx.clearRect(0,0,canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
||||
s._highlightedPoint = pidx;
|
||||
plot.plugins.pieRenderer.highlightedSeriesIndex = sidx;
|
||||
s.renderer.drawSlice.call(s, canvas._ctx, s._sliceAngles[pidx][0], s._sliceAngles[pidx][1], s.highlightColorGenerator.get(pidx), false);
|
||||
if (plot.series[sidx].showSlice[pidx]) {
|
||||
var s = plot.series[sidx];
|
||||
var canvas = plot.plugins.pieRenderer.highlightCanvas;
|
||||
canvas._ctx.clearRect(0,0,canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
||||
s._highlightedPoint = pidx;
|
||||
plot.plugins.pieRenderer.highlightedSeriesIndex = sidx;
|
||||
s.renderer.drawSlice.call(s, canvas._ctx, s._sliceAngles[pidx][0], s._sliceAngles[pidx][1], s.highlightColorGenerator.get(pidx), false);
|
||||
}
|
||||
}
|
||||
|
||||
function unhighlight (plot) {
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* jqPlot
|
||||
* Pure JavaScript plotting plugin using jQuery
|
||||
*
|
||||
* Version: 1.0.8
|
||||
* Revision: 1250
|
||||
* Version: 1.0.9
|
||||
* Revision: d96a669
|
||||
*
|
||||
* Copyright (c) 2009-2013 Chris Leonello
|
||||
* Copyright (c) 2009-2016 Chris Leonello
|
||||
* jqPlot is currently available for use in all personal or commercial projects
|
||||
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||
@ -273,7 +273,9 @@
|
||||
for (var i=0; i<p._elems.length; i++) {
|
||||
// Memory Leaks patch
|
||||
// p._elems[i].remove();
|
||||
p._elems[i].emptyForce();
|
||||
if(p._elems[i]) {
|
||||
p._elems[i].emptyForce();
|
||||
}
|
||||
}
|
||||
p._elems.splice(0, p._elems.length);
|
||||
|
||||
@ -294,7 +296,7 @@
|
||||
for (var i=0, l=p._labels.length; i < l; i++) {
|
||||
var label = p._labels[i];
|
||||
|
||||
if (label == null || (p.hideZeros && parseInt(label, 10) == 0)) {
|
||||
if (label == null || (p.hideZeros && parseFloat(label) == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -374,4 +376,4 @@
|
||||
|
||||
$.jqplot.postSeriesInitHooks.push($.jqplot.PointLabels.init);
|
||||
$.jqplot.postDrawSeriesHooks.push($.jqplot.PointLabels.draw);
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
||||
1299
js/jquery/additional-methods.js
vendored
1299
js/jquery/additional-methods.js
vendored
File diff suppressed because it is too large
Load Diff
4
js/jquery/jquery-2.1.4.min.js
vendored
4
js/jquery/jquery-2.1.4.min.js
vendored
File diff suppressed because one or more lines are too long
540
js/jquery/jquery-migrate-3.0.0.js
Normal file
540
js/jquery/jquery-migrate-3.0.0.js
Normal file
@ -0,0 +1,540 @@
|
||||
/*!
|
||||
* jQuery Migrate - v3.0.0 - 2016-06-09
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
*/
|
||||
(function( jQuery, window ) {
|
||||
"use strict";
|
||||
|
||||
|
||||
jQuery.migrateVersion = "3.0.0";
|
||||
|
||||
|
||||
( function() {
|
||||
|
||||
// Support: IE9 only
|
||||
// IE9 only creates console object when dev tools are first opened
|
||||
// Also, avoid Function#bind here to simplify PhantomJS usage
|
||||
var log = window.console && window.console.log &&
|
||||
function() { window.console.log.apply( window.console, arguments ); },
|
||||
rbadVersions = /^[12]\./;
|
||||
|
||||
if ( !log ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Need jQuery 3.0.0+ and no older Migrate loaded
|
||||
if ( !jQuery || rbadVersions.test( jQuery.fn.jquery ) ) {
|
||||
log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
|
||||
}
|
||||
if ( jQuery.migrateWarnings ) {
|
||||
log( "JQMIGRATE: Migrate plugin loaded multiple times" );
|
||||
}
|
||||
|
||||
// Show a message on the console so devs know we're active
|
||||
log( "JQMIGRATE: Migrate is installed" +
|
||||
( jQuery.migrateMute ? "" : " with logging active" ) +
|
||||
", version " + jQuery.migrateVersion );
|
||||
|
||||
} )();
|
||||
|
||||
var warnedAbout = {};
|
||||
|
||||
// List of warnings already given; public read only
|
||||
jQuery.migrateWarnings = [];
|
||||
|
||||
// Set to false to disable traces that appear with warnings
|
||||
if ( jQuery.migrateTrace === undefined ) {
|
||||
jQuery.migrateTrace = true;
|
||||
}
|
||||
|
||||
// Forget any warnings we've already given; public
|
||||
jQuery.migrateReset = function() {
|
||||
warnedAbout = {};
|
||||
jQuery.migrateWarnings.length = 0;
|
||||
};
|
||||
|
||||
function migrateWarn( msg ) {
|
||||
var console = window.console;
|
||||
if ( !warnedAbout[ msg ] ) {
|
||||
warnedAbout[ msg ] = true;
|
||||
jQuery.migrateWarnings.push( msg );
|
||||
if ( console && console.warn && !jQuery.migrateMute ) {
|
||||
console.warn( "JQMIGRATE: " + msg );
|
||||
if ( jQuery.migrateTrace && console.trace ) {
|
||||
console.trace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function migrateWarnProp( obj, prop, value, msg ) {
|
||||
Object.defineProperty( obj, prop, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
migrateWarn( msg );
|
||||
return value;
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
if ( document.compatMode === "BackCompat" ) {
|
||||
|
||||
// JQuery has never supported or tested Quirks Mode
|
||||
migrateWarn( "jQuery is not compatible with Quirks Mode" );
|
||||
}
|
||||
|
||||
|
||||
var oldInit = jQuery.fn.init,
|
||||
oldIsNumeric = jQuery.isNumeric,
|
||||
oldFind = jQuery.find,
|
||||
rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
|
||||
rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
|
||||
|
||||
jQuery.fn.init = function( arg1 ) {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
|
||||
if ( typeof arg1 === "string" && arg1 === "#" ) {
|
||||
|
||||
// JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0
|
||||
migrateWarn( "jQuery( '#' ) is not a valid selector" );
|
||||
args[ 0 ] = [];
|
||||
}
|
||||
|
||||
return oldInit.apply( this, args );
|
||||
};
|
||||
jQuery.fn.init.prototype = jQuery.fn;
|
||||
|
||||
jQuery.find = function( selector ) {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
|
||||
// Support: PhantomJS 1.x
|
||||
// String#match fails to match when used with a //g RegExp, only on some strings
|
||||
if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
|
||||
|
||||
// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
|
||||
// First see if qS thinks it's a valid selector, if so avoid a false positive
|
||||
try {
|
||||
document.querySelector( selector );
|
||||
} catch ( err1 ) {
|
||||
|
||||
// Didn't *look* valid to qSA, warn and try quoting what we think is the value
|
||||
selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
|
||||
return "[" + attr + op + "\"" + value + "\"]";
|
||||
} );
|
||||
|
||||
// If the regexp *may* have created an invalid selector, don't update it
|
||||
// Note that there may be false alarms if selector uses jQuery extensions
|
||||
try {
|
||||
document.querySelector( selector );
|
||||
migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
|
||||
args[ 0 ] = selector;
|
||||
} catch ( err2 ) {
|
||||
migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oldFind.apply( this, args );
|
||||
};
|
||||
|
||||
// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
|
||||
var findProp;
|
||||
for ( findProp in oldFind ) {
|
||||
if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
|
||||
jQuery.find[ findProp ] = oldFind[ findProp ];
|
||||
}
|
||||
}
|
||||
|
||||
// The number of elements contained in the matched element set
|
||||
jQuery.fn.size = function() {
|
||||
migrateWarn( "jQuery.fn.size() is deprecated; use the .length property" );
|
||||
return this.length;
|
||||
};
|
||||
|
||||
jQuery.parseJSON = function() {
|
||||
migrateWarn( "jQuery.parseJSON is deprecated; use JSON.parse" );
|
||||
return JSON.parse.apply( null, arguments );
|
||||
};
|
||||
|
||||
jQuery.isNumeric = function( val ) {
|
||||
|
||||
// The jQuery 2.2.3 implementation of isNumeric
|
||||
function isNumeric2( obj ) {
|
||||
var realStringObj = obj && obj.toString();
|
||||
return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
|
||||
}
|
||||
|
||||
var newValue = oldIsNumeric( val ),
|
||||
oldValue = isNumeric2( val );
|
||||
|
||||
if ( newValue !== oldValue ) {
|
||||
migrateWarn( "jQuery.isNumeric() should not be called on constructed objects" );
|
||||
}
|
||||
|
||||
return oldValue;
|
||||
};
|
||||
|
||||
migrateWarnProp( jQuery, "unique", jQuery.uniqueSort,
|
||||
"jQuery.unique is deprecated, use jQuery.uniqueSort" );
|
||||
|
||||
// Now jQuery.expr.pseudos is the standard incantation
|
||||
migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos,
|
||||
"jQuery.expr.filters is now jQuery.expr.pseudos" );
|
||||
migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos,
|
||||
"jQuery.expr[\":\"] is now jQuery.expr.pseudos" );
|
||||
|
||||
|
||||
var oldAjax = jQuery.ajax;
|
||||
|
||||
jQuery.ajax = function( ) {
|
||||
var jQXHR = oldAjax.apply( this, arguments );
|
||||
|
||||
// Be sure we got a jQXHR (e.g., not sync)
|
||||
if ( jQXHR.promise ) {
|
||||
migrateWarnProp( jQXHR, "success", jQXHR.done,
|
||||
"jQXHR.success is deprecated and removed" );
|
||||
migrateWarnProp( jQXHR, "error", jQXHR.fail,
|
||||
"jQXHR.error is deprecated and removed" );
|
||||
migrateWarnProp( jQXHR, "complete", jQXHR.always,
|
||||
"jQXHR.complete is deprecated and removed" );
|
||||
}
|
||||
|
||||
return jQXHR;
|
||||
};
|
||||
|
||||
|
||||
var oldRemoveAttr = jQuery.fn.removeAttr,
|
||||
oldToggleClass = jQuery.fn.toggleClass,
|
||||
rmatchNonSpace = /\S+/g;
|
||||
|
||||
jQuery.fn.removeAttr = function( name ) {
|
||||
var self = this;
|
||||
|
||||
jQuery.each( name.match( rmatchNonSpace ), function( i, attr ) {
|
||||
if ( jQuery.expr.match.bool.test( attr ) ) {
|
||||
migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
|
||||
self.prop( attr, false );
|
||||
}
|
||||
} );
|
||||
|
||||
return oldRemoveAttr.apply( this, arguments );
|
||||
};
|
||||
|
||||
jQuery.fn.toggleClass = function( state ) {
|
||||
|
||||
// Only deprecating no-args or single boolean arg
|
||||
if ( state !== undefined && typeof state !== "boolean" ) {
|
||||
return oldToggleClass.apply( this, arguments );
|
||||
}
|
||||
|
||||
migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" );
|
||||
|
||||
// Toggle entire class name of each element
|
||||
return this.each( function() {
|
||||
var className = this.getAttribute && this.getAttribute( "class" ) || "";
|
||||
|
||||
if ( className ) {
|
||||
jQuery.data( this, "__className__", className );
|
||||
}
|
||||
|
||||
// If the element has a class name or if we're passed `false`,
|
||||
// then remove the whole classname (if there was one, the above saved it).
|
||||
// Otherwise bring back whatever was previously saved (if anything),
|
||||
// falling back to the empty string if nothing was stored.
|
||||
if ( this.setAttribute ) {
|
||||
this.setAttribute( "class",
|
||||
className || state === false ?
|
||||
"" :
|
||||
jQuery.data( this, "__className__" ) || ""
|
||||
);
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
|
||||
var internalSwapCall = false;
|
||||
|
||||
// If this version of jQuery has .swap(), don't false-alarm on internal uses
|
||||
if ( jQuery.swap ) {
|
||||
jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
|
||||
var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
|
||||
|
||||
if ( oldHook ) {
|
||||
jQuery.cssHooks[ name ].get = function() {
|
||||
var ret;
|
||||
|
||||
internalSwapCall = true;
|
||||
ret = oldHook.apply( this, arguments );
|
||||
internalSwapCall = false;
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
jQuery.swap = function( elem, options, callback, args ) {
|
||||
var ret, name,
|
||||
old = {};
|
||||
|
||||
if ( !internalSwapCall ) {
|
||||
migrateWarn( "jQuery.swap() is undocumented and deprecated" );
|
||||
}
|
||||
|
||||
// Remember the old values, and insert the new ones
|
||||
for ( name in options ) {
|
||||
old[ name ] = elem.style[ name ];
|
||||
elem.style[ name ] = options[ name ];
|
||||
}
|
||||
|
||||
ret = callback.apply( elem, args || [] );
|
||||
|
||||
// Revert the old values
|
||||
for ( name in options ) {
|
||||
elem.style[ name ] = old[ name ];
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
var oldData = jQuery.data;
|
||||
|
||||
jQuery.data = function( elem, name, value ) {
|
||||
var curData;
|
||||
|
||||
// If the name is transformed, look for the un-transformed name in the data object
|
||||
if ( name && name !== jQuery.camelCase( name ) ) {
|
||||
curData = jQuery.hasData( elem ) && oldData.call( this, elem );
|
||||
if ( curData && name in curData ) {
|
||||
migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name );
|
||||
if ( arguments.length > 2 ) {
|
||||
curData[ name ] = value;
|
||||
}
|
||||
return curData[ name ];
|
||||
}
|
||||
}
|
||||
|
||||
return oldData.apply( this, arguments );
|
||||
};
|
||||
|
||||
var oldTweenRun = jQuery.Tween.prototype.run;
|
||||
|
||||
jQuery.Tween.prototype.run = function( percent ) {
|
||||
if ( jQuery.easing[ this.easing ].length > 1 ) {
|
||||
migrateWarn(
|
||||
"easing function " +
|
||||
"\"jQuery.easing." + this.easing.toString() +
|
||||
"\" should use only first argument"
|
||||
);
|
||||
|
||||
jQuery.easing[ this.easing ] = jQuery.easing[ this.easing ].bind(
|
||||
jQuery.easing,
|
||||
percent, this.options.duration * percent, 0, 1, this.options.duration
|
||||
);
|
||||
}
|
||||
|
||||
oldTweenRun.apply( this, arguments );
|
||||
};
|
||||
|
||||
var oldLoad = jQuery.fn.load,
|
||||
originalFix = jQuery.event.fix;
|
||||
|
||||
jQuery.event.props = [];
|
||||
jQuery.event.fixHooks = {};
|
||||
|
||||
jQuery.event.fix = function( originalEvent ) {
|
||||
var event,
|
||||
type = originalEvent.type,
|
||||
fixHook = this.fixHooks[ type ],
|
||||
props = jQuery.event.props;
|
||||
|
||||
if ( props.length ) {
|
||||
migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() );
|
||||
while ( props.length ) {
|
||||
jQuery.event.addProp( props.pop() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( fixHook && !fixHook._migrated_ ) {
|
||||
fixHook._migrated_ = true;
|
||||
migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type );
|
||||
if ( ( props = fixHook.props ) && props.length ) {
|
||||
while ( props.length ) {
|
||||
jQuery.event.addProp( props.pop() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
event = originalFix.call( this, originalEvent );
|
||||
|
||||
return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
|
||||
};
|
||||
|
||||
jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
|
||||
|
||||
jQuery.fn[ name ] = function() {
|
||||
var args = Array.prototype.slice.call( arguments, 0 );
|
||||
|
||||
// If this is an ajax load() the first arg should be the string URL;
|
||||
// technically this could also be the "Anything" arg of the event .load()
|
||||
// which just goes to show why this dumb signature has been deprecated!
|
||||
// jQuery custom builds that exclude the Ajax module justifiably die here.
|
||||
if ( name === "load" && typeof args[ 0 ] === "string" ) {
|
||||
return oldLoad.apply( this, args );
|
||||
}
|
||||
|
||||
migrateWarn( "jQuery.fn." + name + "() is deprecated" );
|
||||
|
||||
args.splice( 0, 0, name );
|
||||
if ( arguments.length ) {
|
||||
return this.on.apply( this, args );
|
||||
}
|
||||
|
||||
// Use .triggerHandler here because:
|
||||
// - load and unload events don't need to bubble, only applied to window or image
|
||||
// - error event should not bubble to window, although it does pre-1.7
|
||||
// See http://bugs.jquery.com/ticket/11820
|
||||
this.triggerHandler.apply( this, args );
|
||||
return this;
|
||||
};
|
||||
|
||||
} );
|
||||
|
||||
// Trigger "ready" event only once, on document ready
|
||||
jQuery( function() {
|
||||
jQuery( document ).triggerHandler( "ready" );
|
||||
} );
|
||||
|
||||
jQuery.event.special.ready = {
|
||||
setup: function() {
|
||||
if ( this === document ) {
|
||||
migrateWarn( "'ready' event is deprecated" );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
jQuery.fn.extend( {
|
||||
|
||||
bind: function( types, data, fn ) {
|
||||
migrateWarn( "jQuery.fn.bind() is deprecated" );
|
||||
return this.on( types, null, data, fn );
|
||||
},
|
||||
unbind: function( types, fn ) {
|
||||
migrateWarn( "jQuery.fn.unbind() is deprecated" );
|
||||
return this.off( types, null, fn );
|
||||
},
|
||||
delegate: function( selector, types, data, fn ) {
|
||||
migrateWarn( "jQuery.fn.delegate() is deprecated" );
|
||||
return this.on( types, selector, data, fn );
|
||||
},
|
||||
undelegate: function( selector, types, fn ) {
|
||||
migrateWarn( "jQuery.fn.undelegate() is deprecated" );
|
||||
return arguments.length === 1 ?
|
||||
this.off( selector, "**" ) :
|
||||
this.off( types, selector || "**", fn );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
var oldOffset = jQuery.fn.offset;
|
||||
|
||||
jQuery.fn.offset = function() {
|
||||
var docElem,
|
||||
elem = this[ 0 ],
|
||||
origin = { top: 0, left: 0 };
|
||||
|
||||
if ( !elem || !elem.nodeType ) {
|
||||
migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
|
||||
return origin;
|
||||
}
|
||||
|
||||
docElem = ( elem.ownerDocument || document ).documentElement;
|
||||
if ( !jQuery.contains( docElem, elem ) ) {
|
||||
migrateWarn( "jQuery.fn.offset() requires an element connected to a document" );
|
||||
return origin;
|
||||
}
|
||||
|
||||
return oldOffset.apply( this, arguments );
|
||||
};
|
||||
|
||||
|
||||
var oldParam = jQuery.param;
|
||||
|
||||
jQuery.param = function( data, traditional ) {
|
||||
var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
|
||||
|
||||
if ( traditional === undefined && ajaxTraditional ) {
|
||||
|
||||
migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
|
||||
traditional = ajaxTraditional;
|
||||
}
|
||||
|
||||
return oldParam.call( this, data, traditional );
|
||||
};
|
||||
|
||||
var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
|
||||
|
||||
jQuery.fn.andSelf = function() {
|
||||
migrateWarn( "jQuery.fn.andSelf() replaced by jQuery.fn.addBack()" );
|
||||
return oldSelf.apply( this, arguments );
|
||||
};
|
||||
|
||||
|
||||
var oldDeferred = jQuery.Deferred,
|
||||
tuples = [
|
||||
|
||||
// Action, add listener, callbacks, .then handlers, final state
|
||||
[ "resolve", "done", jQuery.Callbacks( "once memory" ),
|
||||
jQuery.Callbacks( "once memory" ), "resolved" ],
|
||||
[ "reject", "fail", jQuery.Callbacks( "once memory" ),
|
||||
jQuery.Callbacks( "once memory" ), "rejected" ],
|
||||
[ "notify", "progress", jQuery.Callbacks( "memory" ),
|
||||
jQuery.Callbacks( "memory" ) ]
|
||||
];
|
||||
|
||||
jQuery.Deferred = function( func ) {
|
||||
var deferred = oldDeferred(),
|
||||
promise = deferred.promise();
|
||||
|
||||
deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
|
||||
var fns = arguments;
|
||||
|
||||
migrateWarn( "deferred.pipe() is deprecated" );
|
||||
|
||||
return jQuery.Deferred( function( newDefer ) {
|
||||
jQuery.each( tuples, function( i, tuple ) {
|
||||
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
|
||||
|
||||
// Deferred.done(function() { bind to newDefer or newDefer.resolve })
|
||||
// deferred.fail(function() { bind to newDefer or newDefer.reject })
|
||||
// deferred.progress(function() { bind to newDefer or newDefer.notify })
|
||||
deferred[ tuple[ 1 ] ]( function() {
|
||||
var returned = fn && fn.apply( this, arguments );
|
||||
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
||||
returned.promise()
|
||||
.done( newDefer.resolve )
|
||||
.fail( newDefer.reject )
|
||||
.progress( newDefer.notify );
|
||||
} else {
|
||||
newDefer[ tuple[ 0 ] + "With" ](
|
||||
this === promise ? newDefer.promise() : this,
|
||||
fn ? [ returned ] : arguments
|
||||
);
|
||||
}
|
||||
} );
|
||||
} );
|
||||
fns = null;
|
||||
} ).promise();
|
||||
|
||||
};
|
||||
|
||||
if ( func ) {
|
||||
func.call( deferred, deferred );
|
||||
}
|
||||
|
||||
return deferred;
|
||||
};
|
||||
|
||||
|
||||
|
||||
})( jQuery, window );
|
||||
13
js/jquery/jquery-ui-1.11.4.min.js
vendored
13
js/jquery/jquery-ui-1.11.4.min.js
vendored
File diff suppressed because one or more lines are too long
256
js/jquery/jquery-ui-timepicker-addon.js
vendored
256
js/jquery/jquery-ui-timepicker-addon.js
vendored
@ -1,7 +1,13 @@
|
||||
/*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
|
||||
/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
|
||||
* http://trentrichardson.com/examples/timepicker
|
||||
* Copyright (c) 2014 Trent Richardson; Licensed MIT */
|
||||
(function ($) {
|
||||
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', 'jquery-ui'], factory);
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
/*
|
||||
* Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
|
||||
@ -16,11 +22,11 @@
|
||||
*/
|
||||
$.extend($.ui, {
|
||||
timepicker: {
|
||||
version: "1.5.0"
|
||||
version: "1.6.3"
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
/*
|
||||
* Timepicker manager.
|
||||
* Use the singleton instance of this class, $.timepicker, to interact with the time picker.
|
||||
* Settings for (groups of) time pickers are maintained in an instance object,
|
||||
@ -101,8 +107,10 @@
|
||||
addSliderAccess: false,
|
||||
sliderAccessArgs: null,
|
||||
controlType: 'slider',
|
||||
oneLine: false,
|
||||
defaultValue: null,
|
||||
parse: 'strict'
|
||||
parse: 'strict',
|
||||
afterInject: null
|
||||
};
|
||||
$.extend(this._defaults, this.regional['']);
|
||||
};
|
||||
@ -145,7 +153,7 @@
|
||||
support: {},
|
||||
control: null,
|
||||
|
||||
/*
|
||||
/*
|
||||
* Override the default settings for all instances of the time picker.
|
||||
* @param {Object} settings object - the new settings to use as defaults (anonymous object)
|
||||
* @return {Object} the manager object
|
||||
@ -185,7 +193,7 @@
|
||||
},
|
||||
onChangeMonthYear: function (year, month, dp_inst) {
|
||||
// Update the time as well : this prevents the time from disappearing from the $input field.
|
||||
tp_inst._updateDateTime(dp_inst);
|
||||
// tp_inst._updateDateTime(dp_inst);
|
||||
if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
|
||||
tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
|
||||
}
|
||||
@ -201,7 +209,7 @@
|
||||
};
|
||||
for (i in overrides) {
|
||||
if (overrides.hasOwnProperty(i)) {
|
||||
fns[i] = opts[i] || null;
|
||||
fns[i] = opts[i] || this._defaults[i] || null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -218,7 +226,7 @@
|
||||
|
||||
// detect which units are supported
|
||||
tp_inst.support = detectSupport(
|
||||
tp_inst._defaults.timeFormat +
|
||||
tp_inst._defaults.timeFormat +
|
||||
(tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') +
|
||||
(tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : ''));
|
||||
|
||||
@ -307,11 +315,12 @@
|
||||
* add our sliders to the calendar
|
||||
*/
|
||||
_addTimePicker: function (dp_inst) {
|
||||
var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();
|
||||
var currDT = $.trim((this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val());
|
||||
|
||||
this.timeDefined = this._parseTime(currDT);
|
||||
this._limitMinMaxDateTime(dp_inst, false);
|
||||
this._injectTimePicker();
|
||||
this._afterInject();
|
||||
},
|
||||
|
||||
/*
|
||||
@ -348,6 +357,16 @@
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Handle callback option after injecting timepicker
|
||||
*/
|
||||
_afterInject: function() {
|
||||
var o = this.inst.settings;
|
||||
if ($.isFunction(o.afterInject)) {
|
||||
o.afterInject.call(this);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* generate and inject html for timepicker into ui datepicker
|
||||
*/
|
||||
@ -366,9 +385,9 @@
|
||||
|
||||
// Prevent displaying twice
|
||||
if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
|
||||
var noDisplay = ' style="display:none;"',
|
||||
html = '<div class="ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + '"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
|
||||
'<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
|
||||
var noDisplay = ' ui_tpicker_unit_hide',
|
||||
html = '<div class="ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + (o.oneLine && o.controlType === 'select' ? ' ui-timepicker-oneLine' : '') + '"><dl>' + '<dt class="ui_tpicker_time_label' + ((o.showTime) ? '' : noDisplay) + '">' + o.timeText + '</dt>' +
|
||||
'<dd class="ui_tpicker_time '+ ((o.showTime) ? '' : noDisplay) + '"><input class="ui_tpicker_time_input" ' + (o.timeInput ? '' : 'disabled') + '/></dd>';
|
||||
|
||||
// Create the markup
|
||||
for (i = 0, l = this.units.length; i < l; i++) {
|
||||
@ -382,8 +401,8 @@
|
||||
max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10);
|
||||
gridSize[litem] = 0;
|
||||
|
||||
html += '<dt class="ui_tpicker_' + litem + '_label"' + (show ? '' : noDisplay) + '>' + o[litem + 'Text'] + '</dt>' +
|
||||
'<dd class="ui_tpicker_' + litem + '"><div class="ui_tpicker_' + litem + '_slider"' + (show ? '' : noDisplay) + '></div>';
|
||||
html += '<dt class="ui_tpicker_' + litem + '_label' + (show ? '' : noDisplay) + '">' + o[litem + 'Text'] + '</dt>' +
|
||||
'<dd class="ui_tpicker_' + litem + (show ? '' : noDisplay) + '"><div class="ui_tpicker_' + litem + '_slider' + (show ? '' : noDisplay) + '"></div>';
|
||||
|
||||
if (show && o[litem + 'Grid'] > 0) {
|
||||
html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
||||
@ -406,11 +425,11 @@
|
||||
}
|
||||
html += '</dd>';
|
||||
}
|
||||
|
||||
|
||||
// Timezone
|
||||
var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone;
|
||||
html += '<dt class="ui_tpicker_timezone_label"' + (showTz ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
|
||||
html += '<dd class="ui_tpicker_timezone" ' + (showTz ? '' : noDisplay) + '></dd>';
|
||||
html += '<dt class="ui_tpicker_timezone_label' + (showTz ? '' : noDisplay) + '">' + o.timezoneText + '</dt>';
|
||||
html += '<dd class="ui_tpicker_timezone' + (showTz ? '' : noDisplay) + '"></dd>';
|
||||
|
||||
// Create the elements from string
|
||||
html += '</dl></div>';
|
||||
@ -421,7 +440,7 @@
|
||||
$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
|
||||
$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
|
||||
}
|
||||
|
||||
|
||||
// add sliders, adjust grids, add events
|
||||
for (i = 0, l = tp_inst.units.length; i < l; i++) {
|
||||
litem = tp_inst.units[i];
|
||||
@ -456,7 +475,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n);
|
||||
|
||||
tp_inst._onTimeChange();
|
||||
@ -493,9 +512,10 @@
|
||||
this.timezone_select.change(function () {
|
||||
tp_inst._onTimeChange();
|
||||
tp_inst._onSelectHandler();
|
||||
tp_inst._afterInject();
|
||||
});
|
||||
// End timezone options
|
||||
|
||||
|
||||
// inject timepicker into datepicker
|
||||
var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
|
||||
if ($buttonPanel.length) {
|
||||
@ -504,7 +524,21 @@
|
||||
$dp.append($tp);
|
||||
}
|
||||
|
||||
this.$timeObj = $tp.find('.ui_tpicker_time');
|
||||
this.$timeObj = $tp.find('.ui_tpicker_time_input');
|
||||
this.$timeObj.change(function () {
|
||||
var timeFormat = tp_inst.inst.settings.timeFormat;
|
||||
var parsedTime = $.datepicker.parseTime(timeFormat, this.value);
|
||||
var update = new Date();
|
||||
if (parsedTime) {
|
||||
update.setHours(parsedTime.hour);
|
||||
update.setMinutes(parsedTime.minute);
|
||||
update.setSeconds(parsedTime.second);
|
||||
$.datepicker._setTime(tp_inst.inst, update);
|
||||
} else {
|
||||
this.value = tp_inst.formattedTime;
|
||||
this.blur();
|
||||
}
|
||||
});
|
||||
|
||||
if (this.inst !== null) {
|
||||
var timeDefined = this.timeDefined;
|
||||
@ -517,7 +551,7 @@
|
||||
var sliderAccessArgs = this._defaults.sliderAccessArgs,
|
||||
rtl = this._defaults.isRTL;
|
||||
sliderAccessArgs.isRTL = rtl;
|
||||
|
||||
|
||||
setTimeout(function () { // fix for inline mode
|
||||
if ($tp.find('.ui-slider-access').length === 0) {
|
||||
$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
|
||||
@ -669,44 +703,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (dp_inst.settings.minTime!==null) {
|
||||
var tempMinTime=new Date("01/01/1970 " + dp_inst.settings.minTime);
|
||||
if (dp_inst.settings.minTime!==null) {
|
||||
var tempMinTime=new Date("01/01/1970 " + dp_inst.settings.minTime);
|
||||
if (this.hour<tempMinTime.getHours()) {
|
||||
this.hour=this._defaults.hourMin=tempMinTime.getHours();
|
||||
this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
} else if (this.hour===tempMinTime.getHours() && this.minute<tempMinTime.getMinutes()) {
|
||||
this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
} else {
|
||||
} else {
|
||||
if (this._defaults.hourMin<tempMinTime.getHours()) {
|
||||
this._defaults.hourMin=tempMinTime.getHours();
|
||||
this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
} else if (this._defaults.hourMin===tempMinTime.getHours()===this.hour && this._defaults.minuteMin<tempMinTime.getMinutes()) {
|
||||
this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
this._defaults.minuteMin=tempMinTime.getMinutes();
|
||||
} else {
|
||||
this._defaults.minuteMin=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dp_inst.settings.maxTime!==null) {
|
||||
|
||||
if (dp_inst.settings.maxTime!==null) {
|
||||
var tempMaxTime=new Date("01/01/1970 " + dp_inst.settings.maxTime);
|
||||
if (this.hour>tempMaxTime.getHours()) {
|
||||
this.hour=this._defaults.hourMax=tempMaxTime.getHours();
|
||||
this.hour=this._defaults.hourMax=tempMaxTime.getHours();
|
||||
this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
} else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) {
|
||||
this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
} else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) {
|
||||
this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
} else {
|
||||
if (this._defaults.hourMax>tempMaxTime.getHours()) {
|
||||
this._defaults.hourMax=tempMaxTime.getHours();
|
||||
this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
} else if (this._defaults.hourMax===tempMaxTime.getHours()===this.hour && this._defaults.minuteMax>tempMaxTime.getMinutes()) {
|
||||
this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
this._defaults.minuteMax=tempMaxTime.getMinutes();
|
||||
} else {
|
||||
this._defaults.minuteMax=59;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (adjustSliders !== undefined && adjustSliders === true) {
|
||||
var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
|
||||
minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
|
||||
@ -800,11 +834,11 @@
|
||||
// If the update was done using the sliders, update the input field.
|
||||
var hasChanged = (
|
||||
hour !== parseInt(this.hour,10) || // sliders should all be numeric
|
||||
minute !== parseInt(this.minute,10) ||
|
||||
second !== parseInt(this.second,10) ||
|
||||
millisec !== parseInt(this.millisec,10) ||
|
||||
microsec !== parseInt(this.microsec,10) ||
|
||||
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
|
||||
minute !== parseInt(this.minute,10) ||
|
||||
second !== parseInt(this.second,10) ||
|
||||
millisec !== parseInt(this.millisec,10) ||
|
||||
microsec !== parseInt(this.microsec,10) ||
|
||||
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
|
||||
(this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString()
|
||||
);
|
||||
|
||||
@ -843,10 +877,15 @@
|
||||
this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
|
||||
if (this.$timeObj) {
|
||||
if (pickerTimeFormat === o.timeFormat) {
|
||||
this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
|
||||
this.$timeObj.val(this.formattedTime + pickerTimeSuffix);
|
||||
}
|
||||
else {
|
||||
this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
|
||||
this.$timeObj.val($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
|
||||
}
|
||||
if (this.$timeObj[0].setSelectionRange) {
|
||||
var sPos = this.$timeObj[0].selectionStart;
|
||||
var ePos = this.$timeObj[0].selectionEnd;
|
||||
this.$timeObj[0].setSelectionRange(sPos, ePos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -874,8 +913,8 @@
|
||||
*/
|
||||
_updateDateTime: function (dp_inst) {
|
||||
dp_inst = this.inst || dp_inst;
|
||||
var dtTmp = (dp_inst.currentYear > 0?
|
||||
new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) :
|
||||
var dtTmp = (dp_inst.currentYear > 0?
|
||||
new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) :
|
||||
new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
|
||||
dt = $.datepicker._daylightSavingAdjust(dtTmp),
|
||||
//dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
|
||||
@ -885,7 +924,7 @@
|
||||
timeAvailable = dt !== null && this.timeDefined;
|
||||
this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
|
||||
var formattedDateTime = this.formattedDate;
|
||||
|
||||
|
||||
// if a slider was changed but datepicker doesn't have a value yet, set it
|
||||
if (dp_inst.lastVal === "") {
|
||||
dp_inst.currentYear = dp_inst.selectedYear;
|
||||
@ -895,7 +934,7 @@
|
||||
|
||||
/*
|
||||
* remove following lines to force every changes in date picker to change the input value
|
||||
* Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.
|
||||
* Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.
|
||||
* If the user manually empty the value in the input field, the date picker will never change selected value.
|
||||
*/
|
||||
//if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {
|
||||
@ -920,7 +959,7 @@
|
||||
var altFormattedDateTime = '',
|
||||
altSeparator = this._defaults.altSeparator !== null ? this._defaults.altSeparator : this._defaults.separator,
|
||||
altTimeSuffix = this._defaults.altTimeSuffix !== null ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
|
||||
|
||||
|
||||
if (!this._defaults.timeOnly) {
|
||||
if (this._defaults.altFormat) {
|
||||
altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
|
||||
@ -987,7 +1026,7 @@
|
||||
stop: function (event, ui) {
|
||||
tp_inst._onSelectHandler();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
options: function (tp_inst, obj, unit, opts, val) {
|
||||
if (tp_inst._defaults.isRTL) {
|
||||
@ -1000,7 +1039,7 @@
|
||||
}
|
||||
return obj.slider(opts);
|
||||
}
|
||||
var min = opts.min,
|
||||
var min = opts.min,
|
||||
max = opts.max;
|
||||
opts.min = opts.max = null;
|
||||
if (min !== undefined) {
|
||||
@ -1051,6 +1090,7 @@
|
||||
$(sel).appendTo(obj).change(function (e) {
|
||||
tp_inst._onTimeChange();
|
||||
tp_inst._onSelectHandler();
|
||||
tp_inst._afterInject();
|
||||
});
|
||||
|
||||
return obj;
|
||||
@ -1062,10 +1102,10 @@
|
||||
if (val === undefined) {
|
||||
return $t.data(opts);
|
||||
}
|
||||
o[opts] = val;
|
||||
o[opts] = val;
|
||||
}
|
||||
else { o = opts; }
|
||||
return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
|
||||
return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min>=0 ? o.min : $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
|
||||
},
|
||||
value: function (tp_inst, obj, unit, val) {
|
||||
var $t = obj.children('select');
|
||||
@ -1229,7 +1269,7 @@
|
||||
ampm = '';
|
||||
resTime.ampm = '';
|
||||
} else {
|
||||
ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM';
|
||||
ampm = $.inArray(treg[order.t].toUpperCase(), $.map(o.amNames, function (x,i) { return x.toUpperCase(); })) !== -1 ? 'AM' : 'PM';
|
||||
resTime.ampm = o[ampm === 'AM' ? 'amNames' : 'pmNames'][0];
|
||||
}
|
||||
}
|
||||
@ -1297,11 +1337,11 @@
|
||||
}
|
||||
catch (err2) {
|
||||
$.timepicker.log("Unable to parse \ntimeString: " + s + "\ntimeFormat: " + f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}; // end looseParse
|
||||
|
||||
|
||||
if (typeof o.parse === "function") {
|
||||
return o.parse(timeFormat, timeString, o);
|
||||
}
|
||||
@ -1450,11 +1490,11 @@
|
||||
.replace(/tT/g, ampm ? 'AaPpMm' : '')
|
||||
.replace(/T/g, ampm ? 'AP' : '')
|
||||
.replace(/tt/g, ampm ? 'apm' : '')
|
||||
.replace(/t/g, ampm ? 'ap' : '') +
|
||||
" " + tp_inst._defaults.separator +
|
||||
tp_inst._defaults.timeSuffix +
|
||||
(tz ? tp_inst._defaults.timezoneList.join('') : '') +
|
||||
(tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
|
||||
.replace(/t/g, ampm ? 'ap' : '') +
|
||||
" " + tp_inst._defaults.separator +
|
||||
tp_inst._defaults.timeSuffix +
|
||||
(tz ? tp_inst._defaults.timezoneList.join('') : '') +
|
||||
(tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
|
||||
dateChars,
|
||||
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
|
||||
return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
|
||||
@ -1477,11 +1517,11 @@
|
||||
var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,
|
||||
date = this._getDate(inst),
|
||||
formatCfg = $.datepicker._getFormatConfig(inst),
|
||||
altFormattedDateTime = '',
|
||||
altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
|
||||
altFormattedDateTime = '',
|
||||
altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
|
||||
altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
|
||||
altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
|
||||
|
||||
|
||||
altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;
|
||||
if (!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null) {
|
||||
if (tp_inst._defaults.altFormat) {
|
||||
@ -1495,7 +1535,7 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.datepicker._base_updateAlternate(inst);
|
||||
$.datepicker._base_updateAlternate(inst);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1521,18 +1561,23 @@
|
||||
};
|
||||
|
||||
/*
|
||||
* override "Today" button to also grab the time.
|
||||
* override "Today" button to also grab the time and set it to input field.
|
||||
*/
|
||||
$.datepicker._base_gotoToday = $.datepicker._gotoToday;
|
||||
$.datepicker._gotoToday = function (id) {
|
||||
var inst = this._getInst($(id)[0]),
|
||||
$dp = inst.dpDiv;
|
||||
var inst = this._getInst($(id)[0]);
|
||||
this._base_gotoToday(id);
|
||||
var tp_inst = this._get(inst, 'timepicker');
|
||||
selectLocalTimezone(tp_inst);
|
||||
if (!tp_inst) {
|
||||
return;
|
||||
}
|
||||
|
||||
var tzoffset = $.timepicker.timezoneOffsetNumber(tp_inst.timezone);
|
||||
var now = new Date();
|
||||
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + parseInt(tzoffset, 10));
|
||||
this._setTime(inst, now);
|
||||
this._setDate(inst, now);
|
||||
tp_inst._onSelectHandler();
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1584,7 +1629,7 @@
|
||||
tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
|
||||
tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;
|
||||
|
||||
//check if within min/max times..
|
||||
//check if within min/max times..
|
||||
tp_inst._limitMinMaxDateTime(inst, true);
|
||||
|
||||
tp_inst._onTimeChange();
|
||||
@ -1652,9 +1697,9 @@
|
||||
} else {
|
||||
tp_date = date;
|
||||
}
|
||||
|
||||
// This is important if you are using the timezone option, javascript's Date
|
||||
// object will only return the timezone offset for the current locale, so we
|
||||
|
||||
// This is important if you are using the timezone option, javascript's Date
|
||||
// object will only return the timezone offset for the current locale, so we
|
||||
// adjust it accordingly. If not using timezone option this won't matter..
|
||||
// If a timezone is different in tp, keep the timezone as is
|
||||
if (tp_inst && tp_date) {
|
||||
@ -1662,8 +1707,8 @@
|
||||
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
|
||||
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
|
||||
}
|
||||
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
|
||||
tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone);
|
||||
date = $.timepicker.timezoneAdjust(date, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()), tp_inst.timezone);
|
||||
tp_date = $.timepicker.timezoneAdjust(tp_date, $.timepicker.timezoneOffsetString(-tp_date.getTimezoneOffset()), tp_inst.timezone);
|
||||
}
|
||||
|
||||
this._updateDatepicker(inst);
|
||||
@ -1690,19 +1735,39 @@
|
||||
}
|
||||
|
||||
var date = this._getDate(inst);
|
||||
if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) {
|
||||
|
||||
var currDT = null;
|
||||
|
||||
if (tp_inst.$altInput && tp_inst._defaults.altFieldTimeOnly) {
|
||||
currDT = tp_inst.$input.val() + ' ' + tp_inst.$altInput.val();
|
||||
}
|
||||
else if (tp_inst.$input.get(0).tagName !== 'INPUT' && tp_inst.$altInput) {
|
||||
/**
|
||||
* in case the datetimepicker has been applied to a non-input tag for inline UI,
|
||||
* and the user has not configured the plugin to display only time in altInput,
|
||||
* pick current date time from the altInput (and hope for the best, for now, until "ER1" is applied)
|
||||
*
|
||||
* @todo ER1. Since altInput can have a totally difference format, convert it to standard format by reading input format from "altFormat" and "altTimeFormat" option values
|
||||
*/
|
||||
currDT = tp_inst.$altInput.val();
|
||||
}
|
||||
else {
|
||||
currDT = tp_inst.$input.val();
|
||||
}
|
||||
|
||||
if (date && tp_inst._parseTime(currDT, !inst.settings.timeOnly)) {
|
||||
date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
|
||||
date.setMicroseconds(tp_inst.microsec);
|
||||
|
||||
// This is important if you are using the timezone option, javascript's Date
|
||||
// object will only return the timezone offset for the current locale, so we
|
||||
// This is important if you are using the timezone option, javascript's Date
|
||||
// object will only return the timezone offset for the current locale, so we
|
||||
// adjust it accordingly. If not using timezone option this won't matter..
|
||||
if (tp_inst.timezone != null) {
|
||||
// look out for DST if tz wasn't specified
|
||||
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
|
||||
tp_inst.timezone = date.getTimezoneOffset() * -1;
|
||||
}
|
||||
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
|
||||
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()));
|
||||
}
|
||||
}
|
||||
return date;
|
||||
@ -1826,8 +1891,8 @@
|
||||
tp_inst._defaults.onSelect = onselect;
|
||||
}
|
||||
|
||||
// Datepicker will override our date when we call _base_optionDatepicker when
|
||||
// calling minDate/maxDate, so we will first grab the value, call
|
||||
// Datepicker will override our date when we call _base_optionDatepicker when
|
||||
// calling minDate/maxDate, so we will first grab the value, call
|
||||
// _base_optionDatepicker, then set our value back.
|
||||
if(min || max){
|
||||
$target = $(target);
|
||||
@ -1842,7 +1907,7 @@
|
||||
}
|
||||
return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,
|
||||
* it will return false for all objects
|
||||
@ -2000,7 +2065,7 @@
|
||||
hours = (off - minutes) / 60,
|
||||
iso = iso8601 ? ':' : '',
|
||||
tz = (off >= 0 ? '+' : '-') + ('0' + Math.abs(hours)).slice(-2) + iso + ('0' + Math.abs(minutes)).slice(-2);
|
||||
|
||||
|
||||
if (tz === '+00:00') {
|
||||
return 'Z';
|
||||
}
|
||||
@ -2020,7 +2085,7 @@
|
||||
}
|
||||
|
||||
if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back
|
||||
return tzString;
|
||||
return parseInt(tzString, 10);
|
||||
}
|
||||
|
||||
return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus
|
||||
@ -2031,13 +2096,15 @@
|
||||
/**
|
||||
* No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)
|
||||
* @param {Date} date
|
||||
* @param {string} fromTimezone formatted like "+0500", "-1245"
|
||||
* @param {string} toTimezone formatted like "+0500", "-1245"
|
||||
* @return {Date}
|
||||
*/
|
||||
$.timepicker.timezoneAdjust = function (date, toTimezone) {
|
||||
$.timepicker.timezoneAdjust = function (date, fromTimezone, toTimezone) {
|
||||
var fromTz = $.timepicker.timezoneOffsetNumber(fromTimezone);
|
||||
var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);
|
||||
if (!isNaN(toTz)) {
|
||||
date.setMinutes(date.getMinutes() + -date.getTimezoneOffset() - toTz);
|
||||
date.setMinutes(date.getMinutes() + (-fromTz) - (-toTz));
|
||||
}
|
||||
return date;
|
||||
};
|
||||
@ -2144,7 +2211,7 @@
|
||||
date.setMilliseconds(date.getMilliseconds() - options.minInterval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (date.getTime) {
|
||||
other[method].call(other, 'option', option, date);
|
||||
}
|
||||
@ -2170,7 +2237,7 @@
|
||||
}, options, options.end));
|
||||
|
||||
checkDates(startTime, endTime);
|
||||
|
||||
|
||||
selected(startTime, endTime, 'minDate');
|
||||
selected(endTime, startTime, 'maxDate');
|
||||
|
||||
@ -2183,7 +2250,8 @@
|
||||
* @return {void}
|
||||
*/
|
||||
$.timepicker.log = function () {
|
||||
if (window.console) {
|
||||
// Older IE (9, maybe 10) throw error on accessing `window.console.log.apply`, so check first.
|
||||
if (window.console && window.console.log && window.console.log.apply) {
|
||||
window.console.log.apply(window.console, Array.prototype.slice.call(arguments));
|
||||
}
|
||||
};
|
||||
@ -2218,6 +2286,6 @@
|
||||
/*
|
||||
* Keep up with the version
|
||||
*/
|
||||
$.timepicker.version = "1.5.0";
|
||||
$.timepicker.version = "1.6.3";
|
||||
|
||||
})(jQuery);
|
||||
}));
|
||||
|
||||
13
js/jquery/jquery-ui.min.js
vendored
Normal file
13
js/jquery/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,60 +1,184 @@
|
||||
// jQuery.FullScreen plugin
|
||||
/**
|
||||
* @preserve jquery.fullscreen 1.1.5
|
||||
* https://github.com/kayahr/jquery-fullscreen-plugin
|
||||
* Copyright (C) 2012-2013 Klaus Reimer <k@ailis.de>
|
||||
* Licensed under the MIT license
|
||||
* (See http://www.opensource.org/licenses/mit-license)
|
||||
*/
|
||||
|
||||
(function(jQuery) {
|
||||
|
||||
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy!
|
||||
|
||||
(function($) {
|
||||
function isFullScreen() {
|
||||
return document[!prefix ? 'fullScreen' :
|
||||
'webkit' === prefix ? 'webkitIsFullScreen' :
|
||||
prefix + 'FullScreen'];
|
||||
}
|
||||
function cancelFullScreen() {
|
||||
return document[prefix ? prefix + 'CancelFullScreen'
|
||||
: 'cancelFullScreen']();
|
||||
}
|
||||
|
||||
var supported = typeof document.cancelFullScreen !== 'undefined'
|
||||
, prefixes = ['webkit', 'moz', 'o', 'ms', 'khtml']
|
||||
, prefix = ''
|
||||
, noop = function() {}
|
||||
, i
|
||||
;
|
||||
|
||||
if (!supported) {
|
||||
for (i = 0; prefix = prefixes[i]; i++) {
|
||||
if (typeof document[prefix + 'CancelFullScreen'] !== 'undefined') {
|
||||
supported = true;
|
||||
break;
|
||||
}
|
||||
/**
|
||||
* Sets or gets the fullscreen state.
|
||||
*
|
||||
* @param {boolean=} state
|
||||
* True to enable fullscreen mode, false to disable it. If not
|
||||
* specified then the current fullscreen state is returned.
|
||||
* @return {boolean|Element|jQuery|null}
|
||||
* When querying the fullscreen state then the current fullscreen
|
||||
* element (or true if browser doesn't support it) is returned
|
||||
* when browser is currently in full screen mode. False is returned
|
||||
* if browser is not in full screen mode. Null is returned if
|
||||
* browser doesn't support fullscreen mode at all. When setting
|
||||
* the fullscreen state then the current jQuery selection is
|
||||
* returned for chaining.
|
||||
* @this {jQuery}
|
||||
*/
|
||||
function fullScreen(state)
|
||||
{
|
||||
var e, func, doc;
|
||||
|
||||
// Do nothing when nothing was selected
|
||||
if (!this.length) return this;
|
||||
|
||||
// We only use the first selected element because it doesn't make sense
|
||||
// to fullscreen multiple elements.
|
||||
e = (/** @type {Element} */ this[0]);
|
||||
|
||||
// Find the real element and the document (Depends on whether the
|
||||
// document itself or a HTML element was selected)
|
||||
if (e.ownerDocument)
|
||||
{
|
||||
doc = e.ownerDocument;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
doc = e;
|
||||
e = doc.documentElement;
|
||||
}
|
||||
|
||||
// When no state was specified then return the current state.
|
||||
if (state == null)
|
||||
{
|
||||
// When fullscreen mode is not supported then return null
|
||||
if (!((/** @type {?Function} */ doc["exitFullscreen"])
|
||||
|| (/** @type {?Function} */ doc["webkitExitFullscreen"])
|
||||
|| (/** @type {?Function} */ doc["webkitCancelFullScreen"])
|
||||
|| (/** @type {?Function} */ doc["msExitFullscreen"])
|
||||
|| (/** @type {?Function} */ doc["mozCancelFullScreen"])))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check fullscreen state
|
||||
state = !!doc["fullscreenElement"]
|
||||
|| !!doc["msFullscreenElement"]
|
||||
|| !!doc["webkitIsFullScreen"]
|
||||
|| !!doc["mozFullScreen"];
|
||||
if (!state) return state;
|
||||
|
||||
// Return current fullscreen element or "true" if browser doesn't
|
||||
// support this
|
||||
return (/** @type {?Element} */ doc["fullscreenElement"])
|
||||
|| (/** @type {?Element} */ doc["webkitFullscreenElement"])
|
||||
|| (/** @type {?Element} */ doc["webkitCurrentFullScreenElement"])
|
||||
|| (/** @type {?Element} */ doc["msFullscreenElement"])
|
||||
|| (/** @type {?Element} */ doc["mozFullScreenElement"])
|
||||
|| state;
|
||||
}
|
||||
|
||||
// When state was specified then enter or exit fullscreen mode.
|
||||
if (state)
|
||||
{
|
||||
// Enter fullscreen
|
||||
func = (/** @type {?Function} */ e["requestFullscreen"])
|
||||
|| (/** @type {?Function} */ e["webkitRequestFullscreen"])
|
||||
|| (/** @type {?Function} */ e["webkitRequestFullScreen"])
|
||||
|| (/** @type {?Function} */ e["msRequestFullscreen"])
|
||||
|| (/** @type {?Function} */ e["mozRequestFullScreen"]);
|
||||
if (func)
|
||||
{
|
||||
func.call(e);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Exit fullscreen
|
||||
func = (/** @type {?Function} */ doc["exitFullscreen"])
|
||||
|| (/** @type {?Function} */ doc["webkitExitFullscreen"])
|
||||
|| (/** @type {?Function} */ doc["webkitCancelFullScreen"])
|
||||
|| (/** @type {?Function} */ doc["msExitFullscreen"])
|
||||
|| (/** @type {?Function} */ doc["mozCancelFullScreen"]);
|
||||
if (func) func.call(doc);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the fullscreen mode.
|
||||
*
|
||||
* @return {!jQuery}
|
||||
* The jQuery selection for chaining.
|
||||
* @this {jQuery}
|
||||
*/
|
||||
function toggleFullScreen()
|
||||
{
|
||||
return (/** @type {!jQuery} */ fullScreen.call(this,
|
||||
!fullScreen.call(this)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the browser-specific fullscreenchange event and triggers
|
||||
* a jquery event for it.
|
||||
*
|
||||
* @param {?Event} event
|
||||
* The fullscreenchange event.
|
||||
*/
|
||||
function fullScreenChangeHandler(event)
|
||||
{
|
||||
jQuery(document).trigger(new jQuery.Event("fullscreenchange"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the browser-specific fullscreenerror event and triggers
|
||||
* a jquery event for it.
|
||||
*
|
||||
* @param {?Event} event
|
||||
* The fullscreenerror event.
|
||||
*/
|
||||
function fullScreenErrorHandler(event)
|
||||
{
|
||||
jQuery(document).trigger(new jQuery.Event("fullscreenerror"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Installs the fullscreenchange event handler.
|
||||
*/
|
||||
function installFullScreenHandlers()
|
||||
{
|
||||
var e, change, error;
|
||||
|
||||
// Determine event name
|
||||
e = document;
|
||||
if (e["webkitCancelFullScreen"])
|
||||
{
|
||||
change = "webkitfullscreenchange";
|
||||
error = "webkitfullscreenerror";
|
||||
}
|
||||
else if (e["msExitFullscreen"])
|
||||
{
|
||||
change = "MSFullscreenChange";
|
||||
error = "MSFullscreenError";
|
||||
}
|
||||
else if (e["mozCancelFullScreen"])
|
||||
{
|
||||
change = "mozfullscreenchange";
|
||||
error = "mozfullscreenerror";
|
||||
}
|
||||
else
|
||||
{
|
||||
change = "fullscreenchange";
|
||||
error = "fullscreenerror";
|
||||
}
|
||||
|
||||
// Install the event handlers
|
||||
jQuery(document).bind(change, fullScreenChangeHandler);
|
||||
jQuery(document).bind(error, fullScreenErrorHandler);
|
||||
}
|
||||
|
||||
jQuery.fn["fullScreen"] = fullScreen;
|
||||
jQuery.fn["toggleFullScreen"] = toggleFullScreen;
|
||||
installFullScreenHandlers();
|
||||
|
||||
if (supported) {
|
||||
$.fn.requestFullScreen = function() {
|
||||
return this.each(function() {
|
||||
return this[prefix ? prefix + 'RequestFullScreen'
|
||||
: 'requestFullScreen']();
|
||||
});
|
||||
};
|
||||
$.fn.fullScreenChange = function(fn) {
|
||||
var ar = [prefix + 'fullscreenchange'].concat([].slice.call(arguments, 0))
|
||||
, $e = $(this);
|
||||
return $e.bind.apply($e, ar);
|
||||
};
|
||||
$.FullScreen =
|
||||
{ isFullScreen: isFullScreen
|
||||
, cancelFullScreen: cancelFullScreen
|
||||
, prefix: prefix
|
||||
, supported: supported
|
||||
};
|
||||
}
|
||||
else {
|
||||
$.fn.requestFullScreen = $.fn.fullScreenChange = noop;
|
||||
$.FullScreen =
|
||||
{ isFullScreen: function() { return false; }
|
||||
, cancelFullScreen: noop
|
||||
, prefix: prefix
|
||||
, supported: supported
|
||||
};
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
4
js/jquery/jquery.min.js
vendored
Normal file
4
js/jquery/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,9 +1,9 @@
|
||||
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
|
||||
* Licensed under the MIT License (LICENSE.txt).
|
||||
/*!
|
||||
* jQuery Mousewheel 3.1.13
|
||||
*
|
||||
* Version: 3.1.12
|
||||
*
|
||||
* Requires: jQuery 1.2.2+
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
(function (factory) {
|
||||
|
||||
2843
js/jquery/jquery.validate.js
vendored
2843
js/jquery/jquery.validate.js
vendored
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,6 @@
|
||||
"expr": true,
|
||||
"immed": true,
|
||||
"noarg": true,
|
||||
"onevar": true,
|
||||
"quotmark": "double",
|
||||
"smarttabs": true,
|
||||
"trailing": true,
|
||||
|
||||
411
js/jquery/src/jquery-ui/button.js
vendored
411
js/jquery/src/jquery-ui/button.js
vendored
@ -1,411 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Button 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/button/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./core",
|
||||
"./widget"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
var lastActive,
|
||||
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
|
||||
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
|
||||
formResetHandler = function() {
|
||||
var form = $( this );
|
||||
setTimeout(function() {
|
||||
form.find( ":ui-button" ).button( "refresh" );
|
||||
}, 1 );
|
||||
},
|
||||
radioGroup = function( radio ) {
|
||||
var name = radio.name,
|
||||
form = radio.form,
|
||||
radios = $( [] );
|
||||
if ( name ) {
|
||||
name = name.replace( /'/g, "\\'" );
|
||||
if ( form ) {
|
||||
radios = $( form ).find( "[name='" + name + "'][type=radio]" );
|
||||
} else {
|
||||
radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
|
||||
.filter(function() {
|
||||
return !this.form;
|
||||
});
|
||||
}
|
||||
}
|
||||
return radios;
|
||||
};
|
||||
|
||||
$.widget( "ui.button", {
|
||||
version: "1.11.4",
|
||||
defaultElement: "<button>",
|
||||
options: {
|
||||
disabled: null,
|
||||
text: true,
|
||||
label: null,
|
||||
icons: {
|
||||
primary: null,
|
||||
secondary: null
|
||||
}
|
||||
},
|
||||
_create: function() {
|
||||
this.element.closest( "form" )
|
||||
.unbind( "reset" + this.eventNamespace )
|
||||
.bind( "reset" + this.eventNamespace, formResetHandler );
|
||||
|
||||
if ( typeof this.options.disabled !== "boolean" ) {
|
||||
this.options.disabled = !!this.element.prop( "disabled" );
|
||||
} else {
|
||||
this.element.prop( "disabled", this.options.disabled );
|
||||
}
|
||||
|
||||
this._determineButtonType();
|
||||
this.hasTitle = !!this.buttonElement.attr( "title" );
|
||||
|
||||
var that = this,
|
||||
options = this.options,
|
||||
toggleButton = this.type === "checkbox" || this.type === "radio",
|
||||
activeClass = !toggleButton ? "ui-state-active" : "";
|
||||
|
||||
if ( options.label === null ) {
|
||||
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
|
||||
}
|
||||
|
||||
this._hoverable( this.buttonElement );
|
||||
|
||||
this.buttonElement
|
||||
.addClass( baseClasses )
|
||||
.attr( "role", "button" )
|
||||
.bind( "mouseenter" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
if ( this === lastActive ) {
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
}
|
||||
})
|
||||
.bind( "mouseleave" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return;
|
||||
}
|
||||
$( this ).removeClass( activeClass );
|
||||
})
|
||||
.bind( "click" + this.eventNamespace, function( event ) {
|
||||
if ( options.disabled ) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
// Can't use _focusable() because the element that receives focus
|
||||
// and the element that gets the ui-state-focus class are different
|
||||
this._on({
|
||||
focus: function() {
|
||||
this.buttonElement.addClass( "ui-state-focus" );
|
||||
},
|
||||
blur: function() {
|
||||
this.buttonElement.removeClass( "ui-state-focus" );
|
||||
}
|
||||
});
|
||||
|
||||
if ( toggleButton ) {
|
||||
this.element.bind( "change" + this.eventNamespace, function() {
|
||||
that.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
if ( this.type === "checkbox" ) {
|
||||
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else if ( this.type === "radio" ) {
|
||||
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
that.buttonElement.attr( "aria-pressed", "true" );
|
||||
|
||||
var radio = that.element[ 0 ];
|
||||
radioGroup( radio )
|
||||
.not( radio )
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", "false" );
|
||||
});
|
||||
} else {
|
||||
this.buttonElement
|
||||
.bind( "mousedown" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
lastActive = this;
|
||||
that.document.one( "mouseup", function() {
|
||||
lastActive = null;
|
||||
});
|
||||
})
|
||||
.bind( "mouseup" + this.eventNamespace, function() {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
})
|
||||
.bind( "keydown" + this.eventNamespace, function(event) {
|
||||
if ( options.disabled ) {
|
||||
return false;
|
||||
}
|
||||
if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
|
||||
$( this ).addClass( "ui-state-active" );
|
||||
}
|
||||
})
|
||||
// see #8559, we bind to blur here in case the button element loses
|
||||
// focus between keydown and keyup, it would be left in an "active" state
|
||||
.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
});
|
||||
|
||||
if ( this.buttonElement.is("a") ) {
|
||||
this.buttonElement.keyup(function(event) {
|
||||
if ( event.keyCode === $.ui.keyCode.SPACE ) {
|
||||
// TODO pass through original event correctly (just as 2nd argument doesn't work)
|
||||
$( this ).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this._setOption( "disabled", options.disabled );
|
||||
this._resetButton();
|
||||
},
|
||||
|
||||
_determineButtonType: function() {
|
||||
var ancestor, labelSelector, checked;
|
||||
|
||||
if ( this.element.is("[type=checkbox]") ) {
|
||||
this.type = "checkbox";
|
||||
} else if ( this.element.is("[type=radio]") ) {
|
||||
this.type = "radio";
|
||||
} else if ( this.element.is("input") ) {
|
||||
this.type = "input";
|
||||
} else {
|
||||
this.type = "button";
|
||||
}
|
||||
|
||||
if ( this.type === "checkbox" || this.type === "radio" ) {
|
||||
// we don't search against the document in case the element
|
||||
// is disconnected from the DOM
|
||||
ancestor = this.element.parents().last();
|
||||
labelSelector = "label[for='" + this.element.attr("id") + "']";
|
||||
this.buttonElement = ancestor.find( labelSelector );
|
||||
if ( !this.buttonElement.length ) {
|
||||
ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
|
||||
this.buttonElement = ancestor.filter( labelSelector );
|
||||
if ( !this.buttonElement.length ) {
|
||||
this.buttonElement = ancestor.find( labelSelector );
|
||||
}
|
||||
}
|
||||
this.element.addClass( "ui-helper-hidden-accessible" );
|
||||
|
||||
checked = this.element.is( ":checked" );
|
||||
if ( checked ) {
|
||||
this.buttonElement.addClass( "ui-state-active" );
|
||||
}
|
||||
this.buttonElement.prop( "aria-pressed", checked );
|
||||
} else {
|
||||
this.buttonElement = this.element;
|
||||
}
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.buttonElement;
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
this.element
|
||||
.removeClass( "ui-helper-hidden-accessible" );
|
||||
this.buttonElement
|
||||
.removeClass( baseClasses + " ui-state-active " + typeClasses )
|
||||
.removeAttr( "role" )
|
||||
.removeAttr( "aria-pressed" )
|
||||
.html( this.buttonElement.find(".ui-button-text").html() );
|
||||
|
||||
if ( !this.hasTitle ) {
|
||||
this.buttonElement.removeAttr( "title" );
|
||||
}
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
this._super( key, value );
|
||||
if ( key === "disabled" ) {
|
||||
this.widget().toggleClass( "ui-state-disabled", !!value );
|
||||
this.element.prop( "disabled", !!value );
|
||||
if ( value ) {
|
||||
if ( this.type === "checkbox" || this.type === "radio" ) {
|
||||
this.buttonElement.removeClass( "ui-state-focus" );
|
||||
} else {
|
||||
this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
this._resetButton();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
//See #8237 & #8828
|
||||
var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
|
||||
|
||||
if ( isDisabled !== this.options.disabled ) {
|
||||
this._setOption( "disabled", isDisabled );
|
||||
}
|
||||
if ( this.type === "radio" ) {
|
||||
radioGroup( this.element[0] ).each(function() {
|
||||
if ( $( this ).is( ":checked" ) ) {
|
||||
$( this ).button( "widget" )
|
||||
.addClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", "true" );
|
||||
} else {
|
||||
$( this ).button( "widget" )
|
||||
.removeClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", "false" );
|
||||
}
|
||||
});
|
||||
} else if ( this.type === "checkbox" ) {
|
||||
if ( this.element.is( ":checked" ) ) {
|
||||
this.buttonElement
|
||||
.addClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", "true" );
|
||||
} else {
|
||||
this.buttonElement
|
||||
.removeClass( "ui-state-active" )
|
||||
.attr( "aria-pressed", "false" );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_resetButton: function() {
|
||||
if ( this.type === "input" ) {
|
||||
if ( this.options.label ) {
|
||||
this.element.val( this.options.label );
|
||||
}
|
||||
return;
|
||||
}
|
||||
var buttonElement = this.buttonElement.removeClass( typeClasses ),
|
||||
buttonText = $( "<span></span>", this.document[0] )
|
||||
.addClass( "ui-button-text" )
|
||||
.html( this.options.label )
|
||||
.appendTo( buttonElement.empty() )
|
||||
.text(),
|
||||
icons = this.options.icons,
|
||||
multipleIcons = icons.primary && icons.secondary,
|
||||
buttonClasses = [];
|
||||
|
||||
if ( icons.primary || icons.secondary ) {
|
||||
if ( this.options.text ) {
|
||||
buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
|
||||
}
|
||||
|
||||
if ( icons.primary ) {
|
||||
buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
|
||||
}
|
||||
|
||||
if ( icons.secondary ) {
|
||||
buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
|
||||
}
|
||||
|
||||
if ( !this.options.text ) {
|
||||
buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
|
||||
|
||||
if ( !this.hasTitle ) {
|
||||
buttonElement.attr( "title", $.trim( buttonText ) );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
buttonClasses.push( "ui-button-text-only" );
|
||||
}
|
||||
buttonElement.addClass( buttonClasses.join( " " ) );
|
||||
}
|
||||
});
|
||||
|
||||
$.widget( "ui.buttonset", {
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
this.element.addClass( "ui-buttonset" );
|
||||
},
|
||||
|
||||
_init: function() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
_setOption: function( key, value ) {
|
||||
if ( key === "disabled" ) {
|
||||
this.buttons.button( "option", key, value );
|
||||
}
|
||||
|
||||
this._super( key, value );
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var rtl = this.element.css( "direction" ) === "rtl",
|
||||
allButtons = this.element.find( this.options.items ),
|
||||
existingButtons = allButtons.filter( ":ui-button" );
|
||||
|
||||
// Initialize new buttons
|
||||
allButtons.not( ":ui-button" ).button();
|
||||
|
||||
// Refresh existing buttons
|
||||
existingButtons.button( "refresh" );
|
||||
|
||||
this.buttons = allButtons
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
|
||||
.filter( ":first" )
|
||||
.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
|
||||
.end()
|
||||
.filter( ":last" )
|
||||
.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
|
||||
.end()
|
||||
.end();
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
this.element.removeClass( "ui-buttonset" );
|
||||
this.buttons
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-corner-left ui-corner-right" )
|
||||
.end()
|
||||
.button( "destroy" );
|
||||
}
|
||||
});
|
||||
|
||||
return $.ui.button;
|
||||
|
||||
}));
|
||||
325
js/jquery/src/jquery-ui/core.js
vendored
325
js/jquery/src/jquery-ui/core.js
vendored
@ -1,304 +1,21 @@
|
||||
/*!
|
||||
* jQuery UI Core 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/category/ui-core/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
// $.ui might exist from components with no dependencies, e.g., $.ui.position
|
||||
$.ui = $.ui || {};
|
||||
|
||||
$.extend( $.ui, {
|
||||
version: "1.11.4",
|
||||
|
||||
keyCode: {
|
||||
BACKSPACE: 8,
|
||||
COMMA: 188,
|
||||
DELETE: 46,
|
||||
DOWN: 40,
|
||||
END: 35,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
HOME: 36,
|
||||
LEFT: 37,
|
||||
PAGE_DOWN: 34,
|
||||
PAGE_UP: 33,
|
||||
PERIOD: 190,
|
||||
RIGHT: 39,
|
||||
SPACE: 32,
|
||||
TAB: 9,
|
||||
UP: 38
|
||||
}
|
||||
});
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
scrollParent: function( includeHidden ) {
|
||||
var position = this.css( "position" ),
|
||||
excludeStaticParent = position === "absolute",
|
||||
overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
|
||||
scrollParent = this.parents().filter( function() {
|
||||
var parent = $( this );
|
||||
if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
|
||||
return false;
|
||||
}
|
||||
return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
|
||||
}).eq( 0 );
|
||||
|
||||
return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
|
||||
},
|
||||
|
||||
uniqueId: (function() {
|
||||
var uuid = 0;
|
||||
|
||||
return function() {
|
||||
return this.each(function() {
|
||||
if ( !this.id ) {
|
||||
this.id = "ui-id-" + ( ++uuid );
|
||||
}
|
||||
});
|
||||
};
|
||||
})(),
|
||||
|
||||
removeUniqueId: function() {
|
||||
return this.each(function() {
|
||||
if ( /^ui-id-\d+$/.test( this.id ) ) {
|
||||
$( this ).removeAttr( "id" );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// selectors
|
||||
function focusable( element, isTabIndexNotNaN ) {
|
||||
var map, mapName, img,
|
||||
nodeName = element.nodeName.toLowerCase();
|
||||
if ( "area" === nodeName ) {
|
||||
map = element.parentNode;
|
||||
mapName = map.name;
|
||||
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
||||
return false;
|
||||
}
|
||||
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
|
||||
return !!img && visible( img );
|
||||
}
|
||||
return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
|
||||
!element.disabled :
|
||||
"a" === nodeName ?
|
||||
element.href || isTabIndexNotNaN :
|
||||
isTabIndexNotNaN) &&
|
||||
// the element and all of its ancestors must be visible
|
||||
visible( element );
|
||||
}
|
||||
|
||||
function visible( element ) {
|
||||
return $.expr.filters.visible( element ) &&
|
||||
!$( element ).parents().addBack().filter(function() {
|
||||
return $.css( this, "visibility" ) === "hidden";
|
||||
}).length;
|
||||
}
|
||||
|
||||
$.extend( $.expr[ ":" ], {
|
||||
data: $.expr.createPseudo ?
|
||||
$.expr.createPseudo(function( dataName ) {
|
||||
return function( elem ) {
|
||||
return !!$.data( elem, dataName );
|
||||
};
|
||||
}) :
|
||||
// support: jQuery <1.8
|
||||
function( elem, i, match ) {
|
||||
return !!$.data( elem, match[ 3 ] );
|
||||
},
|
||||
|
||||
focusable: function( element ) {
|
||||
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
|
||||
},
|
||||
|
||||
tabbable: function( element ) {
|
||||
var tabIndex = $.attr( element, "tabindex" ),
|
||||
isTabIndexNaN = isNaN( tabIndex );
|
||||
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
|
||||
}
|
||||
});
|
||||
|
||||
// support: jQuery <1.8
|
||||
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
|
||||
$.each( [ "Width", "Height" ], function( i, name ) {
|
||||
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
||||
type = name.toLowerCase(),
|
||||
orig = {
|
||||
innerWidth: $.fn.innerWidth,
|
||||
innerHeight: $.fn.innerHeight,
|
||||
outerWidth: $.fn.outerWidth,
|
||||
outerHeight: $.fn.outerHeight
|
||||
};
|
||||
|
||||
function reduce( elem, size, border, margin ) {
|
||||
$.each( side, function() {
|
||||
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
|
||||
if ( border ) {
|
||||
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
|
||||
}
|
||||
if ( margin ) {
|
||||
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
|
||||
}
|
||||
});
|
||||
return size;
|
||||
}
|
||||
|
||||
$.fn[ "inner" + name ] = function( size ) {
|
||||
if ( size === undefined ) {
|
||||
return orig[ "inner" + name ].call( this );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this ).css( type, reduce( this, size ) + "px" );
|
||||
});
|
||||
};
|
||||
|
||||
$.fn[ "outer" + name] = function( size, margin ) {
|
||||
if ( typeof size !== "number" ) {
|
||||
return orig[ "outer" + name ].call( this, size );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
// support: jQuery <1.8
|
||||
if ( !$.fn.addBack ) {
|
||||
$.fn.addBack = function( selector ) {
|
||||
return this.add( selector == null ?
|
||||
this.prevObject : this.prevObject.filter( selector )
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
|
||||
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
|
||||
$.fn.removeData = (function( removeData ) {
|
||||
return function( key ) {
|
||||
if ( arguments.length ) {
|
||||
return removeData.call( this, $.camelCase( key ) );
|
||||
} else {
|
||||
return removeData.call( this );
|
||||
}
|
||||
};
|
||||
})( $.fn.removeData );
|
||||
}
|
||||
|
||||
// deprecated
|
||||
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
|
||||
|
||||
$.fn.extend({
|
||||
focus: (function( orig ) {
|
||||
return function( delay, fn ) {
|
||||
return typeof delay === "number" ?
|
||||
this.each(function() {
|
||||
var elem = this;
|
||||
setTimeout(function() {
|
||||
$( elem ).focus();
|
||||
if ( fn ) {
|
||||
fn.call( elem );
|
||||
}
|
||||
}, delay );
|
||||
}) :
|
||||
orig.apply( this, arguments );
|
||||
};
|
||||
})( $.fn.focus ),
|
||||
|
||||
disableSelection: (function() {
|
||||
var eventType = "onselectstart" in document.createElement( "div" ) ?
|
||||
"selectstart" :
|
||||
"mousedown";
|
||||
|
||||
return function() {
|
||||
return this.bind( eventType + ".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
};
|
||||
})(),
|
||||
|
||||
enableSelection: function() {
|
||||
return this.unbind( ".ui-disableSelection" );
|
||||
},
|
||||
|
||||
zIndex: function( zIndex ) {
|
||||
if ( zIndex !== undefined ) {
|
||||
return this.css( "zIndex", zIndex );
|
||||
}
|
||||
|
||||
if ( this.length ) {
|
||||
var elem = $( this[ 0 ] ), position, value;
|
||||
while ( elem.length && elem[ 0 ] !== document ) {
|
||||
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
||||
// This makes behavior of this function consistent across browsers
|
||||
// WebKit always returns auto if the element is positioned
|
||||
position = elem.css( "position" );
|
||||
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
||||
// IE returns 0 when zIndex is not specified
|
||||
// other browsers return a string
|
||||
// we ignore the case of nested elements with an explicit value of 0
|
||||
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
||||
value = parseInt( elem.css( "zIndex" ), 10 );
|
||||
if ( !isNaN( value ) && value !== 0 ) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
elem = elem.parent();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
|
||||
$.ui.plugin = {
|
||||
add: function( module, option, set ) {
|
||||
var i,
|
||||
proto = $.ui[ module ].prototype;
|
||||
for ( i in set ) {
|
||||
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
||||
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
||||
}
|
||||
},
|
||||
call: function( instance, name, args, allowDisconnected ) {
|
||||
var i,
|
||||
set = instance.plugins[ name ];
|
||||
|
||||
if ( !set ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; i < set.length; i++ ) {
|
||||
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
||||
set[ i ][ 1 ].apply( instance.element, args );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}));
|
||||
// This file is deprecated in 1.12.0 to be removed in 1.13
|
||||
( function() {
|
||||
define( [
|
||||
"jquery",
|
||||
"./data",
|
||||
"./disable-selection",
|
||||
"./focusable",
|
||||
"./form",
|
||||
"./ie",
|
||||
"./keycode",
|
||||
"./labels",
|
||||
"./jquery-1-7",
|
||||
"./plugin",
|
||||
"./safe-active-element",
|
||||
"./safe-blur",
|
||||
"./scroll-parent",
|
||||
"./tabbable",
|
||||
"./unique-id",
|
||||
"./version"
|
||||
] );
|
||||
} )();
|
||||
|
||||
39
js/jquery/src/jquery-ui/data.js
vendored
Normal file
39
js/jquery/src/jquery-ui/data.js
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* jQuery UI :data 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: :data Selector
|
||||
//>>group: Core
|
||||
//>>description: Selects elements which have data stored under the specified key.
|
||||
//>>docs: http://api.jqueryui.com/data-selector/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery", "./version" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
} ( function( $ ) {
|
||||
return $.extend( $.expr[ ":" ], {
|
||||
data: $.expr.createPseudo ?
|
||||
$.expr.createPseudo( function( dataName ) {
|
||||
return function( elem ) {
|
||||
return !!$.data( elem, dataName );
|
||||
};
|
||||
} ) :
|
||||
|
||||
// Support: jQuery <1.8
|
||||
function( elem, i, match ) {
|
||||
return !!$.data( elem, match[ 3 ] );
|
||||
}
|
||||
} );
|
||||
} ) );
|
||||
2084
js/jquery/src/jquery-ui/datepicker.js
vendored
2084
js/jquery/src/jquery-ui/datepicker.js
vendored
File diff suppressed because it is too large
Load Diff
46
js/jquery/src/jquery-ui/disable-selection.js
vendored
Normal file
46
js/jquery/src/jquery-ui/disable-selection.js
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* jQuery UI Disable Selection 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: disableSelection
|
||||
//>>group: Core
|
||||
//>>description: Disable selection of text content within the set of matched elements.
|
||||
//>>docs: http://api.jqueryui.com/disableSelection/
|
||||
|
||||
// This file is deprecated
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery", "./version" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
} ( function( $ ) {
|
||||
|
||||
return $.fn.extend( {
|
||||
disableSelection: ( function() {
|
||||
var eventType = "onselectstart" in document.createElement( "div" ) ?
|
||||
"selectstart" :
|
||||
"mousedown";
|
||||
|
||||
return function() {
|
||||
return this.on( eventType + ".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
} );
|
||||
};
|
||||
} )(),
|
||||
|
||||
enableSelection: function() {
|
||||
return this.off( ".ui-disableSelection" );
|
||||
}
|
||||
} );
|
||||
|
||||
} ) );
|
||||
90
js/jquery/src/jquery-ui/effect-blind.js
vendored
90
js/jquery/src/jquery-ui/effect-blind.js
vendored
@ -1,90 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Blind 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/blind-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.blind = function( o, done ) {
|
||||
// Create element
|
||||
var el = $( this ),
|
||||
rvertical = /up|down|vertical/,
|
||||
rpositivemotion = /up|left|vertical|horizontal/,
|
||||
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
||||
mode = $.effects.setMode( el, o.mode || "hide" ),
|
||||
direction = o.direction || "up",
|
||||
vertical = rvertical.test( direction ),
|
||||
ref = vertical ? "height" : "width",
|
||||
ref2 = vertical ? "top" : "left",
|
||||
motion = rpositivemotion.test( direction ),
|
||||
animation = {},
|
||||
show = mode === "show",
|
||||
wrapper, distance, margin;
|
||||
|
||||
// if already wrapped, the wrapper's properties are my property. #6245
|
||||
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
|
||||
$.effects.save( el.parent(), props );
|
||||
} else {
|
||||
$.effects.save( el, props );
|
||||
}
|
||||
el.show();
|
||||
wrapper = $.effects.createWrapper( el ).css({
|
||||
overflow: "hidden"
|
||||
});
|
||||
|
||||
distance = wrapper[ ref ]();
|
||||
margin = parseFloat( wrapper.css( ref2 ) ) || 0;
|
||||
|
||||
animation[ ref ] = show ? distance : 0;
|
||||
if ( !motion ) {
|
||||
el
|
||||
.css( vertical ? "bottom" : "right", 0 )
|
||||
.css( vertical ? "top" : "left", "auto" )
|
||||
.css({ position: "absolute" });
|
||||
|
||||
animation[ ref2 ] = show ? margin : distance + margin;
|
||||
}
|
||||
|
||||
// start at 0 if we are showing
|
||||
if ( show ) {
|
||||
wrapper.css( ref, 0 );
|
||||
if ( !motion ) {
|
||||
wrapper.css( ref2, margin + distance );
|
||||
}
|
||||
}
|
||||
|
||||
// Animate
|
||||
wrapper.animate( animation, {
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
queue: false,
|
||||
complete: function() {
|
||||
if ( mode === "hide" ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
123
js/jquery/src/jquery-ui/effect-bounce.js
vendored
123
js/jquery/src/jquery-ui/effect-bounce.js
vendored
@ -1,123 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Bounce 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/bounce-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.bounce = function( o, done ) {
|
||||
var el = $( this ),
|
||||
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
||||
|
||||
// defaults:
|
||||
mode = $.effects.setMode( el, o.mode || "effect" ),
|
||||
hide = mode === "hide",
|
||||
show = mode === "show",
|
||||
direction = o.direction || "up",
|
||||
distance = o.distance,
|
||||
times = o.times || 5,
|
||||
|
||||
// number of internal animations
|
||||
anims = times * 2 + ( show || hide ? 1 : 0 ),
|
||||
speed = o.duration / anims,
|
||||
easing = o.easing,
|
||||
|
||||
// utility:
|
||||
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
||||
motion = ( direction === "up" || direction === "left" ),
|
||||
i,
|
||||
upAnim,
|
||||
downAnim,
|
||||
|
||||
// we will need to re-assemble the queue to stack our animations in place
|
||||
queue = el.queue(),
|
||||
queuelen = queue.length;
|
||||
|
||||
// Avoid touching opacity to prevent clearType and PNG issues in IE
|
||||
if ( show || hide ) {
|
||||
props.push( "opacity" );
|
||||
}
|
||||
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
$.effects.createWrapper( el ); // Create Wrapper
|
||||
|
||||
// default distance for the BIGGEST bounce is the outer Distance / 3
|
||||
if ( !distance ) {
|
||||
distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
|
||||
}
|
||||
|
||||
if ( show ) {
|
||||
downAnim = { opacity: 1 };
|
||||
downAnim[ ref ] = 0;
|
||||
|
||||
// if we are showing, force opacity 0 and set the initial position
|
||||
// then do the "first" animation
|
||||
el.css( "opacity", 0 )
|
||||
.css( ref, motion ? -distance * 2 : distance * 2 )
|
||||
.animate( downAnim, speed, easing );
|
||||
}
|
||||
|
||||
// start at the smallest distance if we are hiding
|
||||
if ( hide ) {
|
||||
distance = distance / Math.pow( 2, times - 1 );
|
||||
}
|
||||
|
||||
downAnim = {};
|
||||
downAnim[ ref ] = 0;
|
||||
// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
|
||||
for ( i = 0; i < times; i++ ) {
|
||||
upAnim = {};
|
||||
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
|
||||
|
||||
el.animate( upAnim, speed, easing )
|
||||
.animate( downAnim, speed, easing );
|
||||
|
||||
distance = hide ? distance * 2 : distance / 2;
|
||||
}
|
||||
|
||||
// Last Bounce when Hiding
|
||||
if ( hide ) {
|
||||
upAnim = { opacity: 0 };
|
||||
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
|
||||
|
||||
el.animate( upAnim, speed, easing );
|
||||
}
|
||||
|
||||
el.queue(function() {
|
||||
if ( hide ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
});
|
||||
|
||||
// inject all the animations we just queued to be first in line (after "inprogress")
|
||||
if ( queuelen > 1) {
|
||||
queue.splice.apply( queue,
|
||||
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
|
||||
}
|
||||
el.dequeue();
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
77
js/jquery/src/jquery-ui/effect-clip.js
vendored
77
js/jquery/src/jquery-ui/effect-clip.js
vendored
@ -1,77 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Clip 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/clip-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.clip = function( o, done ) {
|
||||
// Create element
|
||||
var el = $( this ),
|
||||
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
||||
mode = $.effects.setMode( el, o.mode || "hide" ),
|
||||
show = mode === "show",
|
||||
direction = o.direction || "vertical",
|
||||
vert = direction === "vertical",
|
||||
size = vert ? "height" : "width",
|
||||
position = vert ? "top" : "left",
|
||||
animation = {},
|
||||
wrapper, animate, distance;
|
||||
|
||||
// Save & Show
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
|
||||
// Create Wrapper
|
||||
wrapper = $.effects.createWrapper( el ).css({
|
||||
overflow: "hidden"
|
||||
});
|
||||
animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
|
||||
distance = animate[ size ]();
|
||||
|
||||
// Shift
|
||||
if ( show ) {
|
||||
animate.css( size, 0 );
|
||||
animate.css( position, distance / 2 );
|
||||
}
|
||||
|
||||
// Create Animation Object:
|
||||
animation[ size ] = show ? distance : 0;
|
||||
animation[ position ] = show ? 0 : distance / 2;
|
||||
|
||||
// Animate
|
||||
animate.animate( animation, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
complete: function() {
|
||||
if ( !show ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
75
js/jquery/src/jquery-ui/effect-drop.js
vendored
75
js/jquery/src/jquery-ui/effect-drop.js
vendored
@ -1,75 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Drop 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/drop-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.drop = function( o, done ) {
|
||||
|
||||
var el = $( this ),
|
||||
props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
|
||||
mode = $.effects.setMode( el, o.mode || "hide" ),
|
||||
show = mode === "show",
|
||||
direction = o.direction || "left",
|
||||
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
||||
motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
|
||||
animation = {
|
||||
opacity: show ? 1 : 0
|
||||
},
|
||||
distance;
|
||||
|
||||
// Adjust
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
$.effects.createWrapper( el );
|
||||
|
||||
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
|
||||
|
||||
if ( show ) {
|
||||
el
|
||||
.css( "opacity", 0 )
|
||||
.css( ref, motion === "pos" ? -distance : distance );
|
||||
}
|
||||
|
||||
// Animation
|
||||
animation[ ref ] = ( show ?
|
||||
( motion === "pos" ? "+=" : "-=" ) :
|
||||
( motion === "pos" ? "-=" : "+=" ) ) +
|
||||
distance;
|
||||
|
||||
// Animate
|
||||
el.animate( animation, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
complete: function() {
|
||||
if ( mode === "hide" ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
107
js/jquery/src/jquery-ui/effect-explode.js
vendored
107
js/jquery/src/jquery-ui/effect-explode.js
vendored
@ -1,107 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Explode 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/explode-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.explode = function( o, done ) {
|
||||
|
||||
var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
|
||||
cells = rows,
|
||||
el = $( this ),
|
||||
mode = $.effects.setMode( el, o.mode || "hide" ),
|
||||
show = mode === "show",
|
||||
|
||||
// show and then visibility:hidden the element before calculating offset
|
||||
offset = el.show().css( "visibility", "hidden" ).offset(),
|
||||
|
||||
// width and height of a piece
|
||||
width = Math.ceil( el.outerWidth() / cells ),
|
||||
height = Math.ceil( el.outerHeight() / rows ),
|
||||
pieces = [],
|
||||
|
||||
// loop
|
||||
i, j, left, top, mx, my;
|
||||
|
||||
// children animate complete:
|
||||
function childComplete() {
|
||||
pieces.push( this );
|
||||
if ( pieces.length === rows * cells ) {
|
||||
animComplete();
|
||||
}
|
||||
}
|
||||
|
||||
// clone the element for each row and cell.
|
||||
for ( i = 0; i < rows ; i++ ) { // ===>
|
||||
top = offset.top + i * height;
|
||||
my = i - ( rows - 1 ) / 2 ;
|
||||
|
||||
for ( j = 0; j < cells ; j++ ) { // |||
|
||||
left = offset.left + j * width;
|
||||
mx = j - ( cells - 1 ) / 2 ;
|
||||
|
||||
// Create a clone of the now hidden main element that will be absolute positioned
|
||||
// within a wrapper div off the -left and -top equal to size of our pieces
|
||||
el
|
||||
.clone()
|
||||
.appendTo( "body" )
|
||||
.wrap( "<div></div>" )
|
||||
.css({
|
||||
position: "absolute",
|
||||
visibility: "visible",
|
||||
left: -j * width,
|
||||
top: -i * height
|
||||
})
|
||||
|
||||
// select the wrapper - make it overflow: hidden and absolute positioned based on
|
||||
// where the original was located +left and +top equal to the size of pieces
|
||||
.parent()
|
||||
.addClass( "ui-effects-explode" )
|
||||
.css({
|
||||
position: "absolute",
|
||||
overflow: "hidden",
|
||||
width: width,
|
||||
height: height,
|
||||
left: left + ( show ? mx * width : 0 ),
|
||||
top: top + ( show ? my * height : 0 ),
|
||||
opacity: show ? 0 : 1
|
||||
}).animate({
|
||||
left: left + ( show ? 0 : mx * width ),
|
||||
top: top + ( show ? 0 : my * height ),
|
||||
opacity: show ? 1 : 0
|
||||
}, o.duration || 500, o.easing, childComplete );
|
||||
}
|
||||
}
|
||||
|
||||
function animComplete() {
|
||||
el.css({
|
||||
visibility: "visible"
|
||||
});
|
||||
$( pieces ).remove();
|
||||
if ( !show ) {
|
||||
el.hide();
|
||||
}
|
||||
done();
|
||||
}
|
||||
};
|
||||
|
||||
}));
|
||||
40
js/jquery/src/jquery-ui/effect-fade.js
vendored
40
js/jquery/src/jquery-ui/effect-fade.js
vendored
@ -1,40 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Fade 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/fade-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.fade = function( o, done ) {
|
||||
var el = $( this ),
|
||||
mode = $.effects.setMode( el, o.mode || "toggle" );
|
||||
|
||||
el.animate({
|
||||
opacity: mode
|
||||
}, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
complete: done
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
86
js/jquery/src/jquery-ui/effect-fold.js
vendored
86
js/jquery/src/jquery-ui/effect-fold.js
vendored
@ -1,86 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Fold 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/fold-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.fold = function( o, done ) {
|
||||
|
||||
// Create element
|
||||
var el = $( this ),
|
||||
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
||||
mode = $.effects.setMode( el, o.mode || "hide" ),
|
||||
show = mode === "show",
|
||||
hide = mode === "hide",
|
||||
size = o.size || 15,
|
||||
percent = /([0-9]+)%/.exec( size ),
|
||||
horizFirst = !!o.horizFirst,
|
||||
widthFirst = show !== horizFirst,
|
||||
ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
|
||||
duration = o.duration / 2,
|
||||
wrapper, distance,
|
||||
animation1 = {},
|
||||
animation2 = {};
|
||||
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
|
||||
// Create Wrapper
|
||||
wrapper = $.effects.createWrapper( el ).css({
|
||||
overflow: "hidden"
|
||||
});
|
||||
distance = widthFirst ?
|
||||
[ wrapper.width(), wrapper.height() ] :
|
||||
[ wrapper.height(), wrapper.width() ];
|
||||
|
||||
if ( percent ) {
|
||||
size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
|
||||
}
|
||||
if ( show ) {
|
||||
wrapper.css( horizFirst ? {
|
||||
height: 0,
|
||||
width: size
|
||||
} : {
|
||||
height: size,
|
||||
width: 0
|
||||
});
|
||||
}
|
||||
|
||||
// Animation
|
||||
animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
|
||||
animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
|
||||
|
||||
// Animate
|
||||
wrapper
|
||||
.animate( animation1, duration, o.easing )
|
||||
.animate( animation2, duration, o.easing, function() {
|
||||
if ( hide ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
60
js/jquery/src/jquery-ui/effect-highlight.js
vendored
60
js/jquery/src/jquery-ui/effect-highlight.js
vendored
@ -1,60 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Highlight 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/highlight-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.highlight = function( o, done ) {
|
||||
var elem = $( this ),
|
||||
props = [ "backgroundImage", "backgroundColor", "opacity" ],
|
||||
mode = $.effects.setMode( elem, o.mode || "show" ),
|
||||
animation = {
|
||||
backgroundColor: elem.css( "backgroundColor" )
|
||||
};
|
||||
|
||||
if (mode === "hide") {
|
||||
animation.opacity = 0;
|
||||
}
|
||||
|
||||
$.effects.save( elem, props );
|
||||
|
||||
elem
|
||||
.show()
|
||||
.css({
|
||||
backgroundImage: "none",
|
||||
backgroundColor: o.color || "#ffff99"
|
||||
})
|
||||
.animate( animation, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
complete: function() {
|
||||
if ( mode === "hide" ) {
|
||||
elem.hide();
|
||||
}
|
||||
$.effects.restore( elem, props );
|
||||
done();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
60
js/jquery/src/jquery-ui/effect-puff.js
vendored
60
js/jquery/src/jquery-ui/effect-puff.js
vendored
@ -1,60 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Puff 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/puff-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect",
|
||||
"./effect-scale"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.puff = function( o, done ) {
|
||||
var elem = $( this ),
|
||||
mode = $.effects.setMode( elem, o.mode || "hide" ),
|
||||
hide = mode === "hide",
|
||||
percent = parseInt( o.percent, 10 ) || 150,
|
||||
factor = percent / 100,
|
||||
original = {
|
||||
height: elem.height(),
|
||||
width: elem.width(),
|
||||
outerHeight: elem.outerHeight(),
|
||||
outerWidth: elem.outerWidth()
|
||||
};
|
||||
|
||||
$.extend( o, {
|
||||
effect: "scale",
|
||||
queue: false,
|
||||
fade: true,
|
||||
mode: mode,
|
||||
complete: done,
|
||||
percent: hide ? percent : 100,
|
||||
from: hide ?
|
||||
original :
|
||||
{
|
||||
height: original.height * factor,
|
||||
width: original.width * factor,
|
||||
outerHeight: original.outerHeight * factor,
|
||||
outerWidth: original.outerWidth * factor
|
||||
}
|
||||
});
|
||||
|
||||
elem.effect( o );
|
||||
};
|
||||
|
||||
}));
|
||||
73
js/jquery/src/jquery-ui/effect-pulsate.js
vendored
73
js/jquery/src/jquery-ui/effect-pulsate.js
vendored
@ -1,73 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Pulsate 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/pulsate-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.pulsate = function( o, done ) {
|
||||
var elem = $( this ),
|
||||
mode = $.effects.setMode( elem, o.mode || "show" ),
|
||||
show = mode === "show",
|
||||
hide = mode === "hide",
|
||||
showhide = ( show || mode === "hide" ),
|
||||
|
||||
// showing or hiding leaves of the "last" animation
|
||||
anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
|
||||
duration = o.duration / anims,
|
||||
animateTo = 0,
|
||||
queue = elem.queue(),
|
||||
queuelen = queue.length,
|
||||
i;
|
||||
|
||||
if ( show || !elem.is(":visible")) {
|
||||
elem.css( "opacity", 0 ).show();
|
||||
animateTo = 1;
|
||||
}
|
||||
|
||||
// anims - 1 opacity "toggles"
|
||||
for ( i = 1; i < anims; i++ ) {
|
||||
elem.animate({
|
||||
opacity: animateTo
|
||||
}, duration, o.easing );
|
||||
animateTo = 1 - animateTo;
|
||||
}
|
||||
|
||||
elem.animate({
|
||||
opacity: animateTo
|
||||
}, duration, o.easing);
|
||||
|
||||
elem.queue(function() {
|
||||
if ( hide ) {
|
||||
elem.hide();
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
// We just queued up "anims" animations, we need to put them next in the queue
|
||||
if ( queuelen > 1 ) {
|
||||
queue.splice.apply( queue,
|
||||
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
|
||||
}
|
||||
elem.dequeue();
|
||||
};
|
||||
|
||||
}));
|
||||
89
js/jquery/src/jquery-ui/effect-scale.js
vendored
89
js/jquery/src/jquery-ui/effect-scale.js
vendored
@ -1,89 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Scale 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/scale-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect",
|
||||
"./effect-size"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.scale = function( o, done ) {
|
||||
|
||||
// Create element
|
||||
var el = $( this ),
|
||||
options = $.extend( true, {}, o ),
|
||||
mode = $.effects.setMode( el, o.mode || "effect" ),
|
||||
percent = parseInt( o.percent, 10 ) ||
|
||||
( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
|
||||
direction = o.direction || "both",
|
||||
origin = o.origin,
|
||||
original = {
|
||||
height: el.height(),
|
||||
width: el.width(),
|
||||
outerHeight: el.outerHeight(),
|
||||
outerWidth: el.outerWidth()
|
||||
},
|
||||
factor = {
|
||||
y: direction !== "horizontal" ? (percent / 100) : 1,
|
||||
x: direction !== "vertical" ? (percent / 100) : 1
|
||||
};
|
||||
|
||||
// We are going to pass this effect to the size effect:
|
||||
options.effect = "size";
|
||||
options.queue = false;
|
||||
options.complete = done;
|
||||
|
||||
// Set default origin and restore for show/hide
|
||||
if ( mode !== "effect" ) {
|
||||
options.origin = origin || [ "middle", "center" ];
|
||||
options.restore = true;
|
||||
}
|
||||
|
||||
options.from = o.from || ( mode === "show" ? {
|
||||
height: 0,
|
||||
width: 0,
|
||||
outerHeight: 0,
|
||||
outerWidth: 0
|
||||
} : original );
|
||||
options.to = {
|
||||
height: original.height * factor.y,
|
||||
width: original.width * factor.x,
|
||||
outerHeight: original.outerHeight * factor.y,
|
||||
outerWidth: original.outerWidth * factor.x
|
||||
};
|
||||
|
||||
// Fade option to support puff
|
||||
if ( options.fade ) {
|
||||
if ( mode === "show" ) {
|
||||
options.from.opacity = 0;
|
||||
options.to.opacity = 1;
|
||||
}
|
||||
if ( mode === "hide" ) {
|
||||
options.from.opacity = 1;
|
||||
options.to.opacity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Animate
|
||||
el.effect( options );
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
84
js/jquery/src/jquery-ui/effect-shake.js
vendored
84
js/jquery/src/jquery-ui/effect-shake.js
vendored
@ -1,84 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Shake 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/shake-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.shake = function( o, done ) {
|
||||
|
||||
var el = $( this ),
|
||||
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
||||
mode = $.effects.setMode( el, o.mode || "effect" ),
|
||||
direction = o.direction || "left",
|
||||
distance = o.distance || 20,
|
||||
times = o.times || 3,
|
||||
anims = times * 2 + 1,
|
||||
speed = Math.round( o.duration / anims ),
|
||||
ref = (direction === "up" || direction === "down") ? "top" : "left",
|
||||
positiveMotion = (direction === "up" || direction === "left"),
|
||||
animation = {},
|
||||
animation1 = {},
|
||||
animation2 = {},
|
||||
i,
|
||||
|
||||
// we will need to re-assemble the queue to stack our animations in place
|
||||
queue = el.queue(),
|
||||
queuelen = queue.length;
|
||||
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
$.effects.createWrapper( el );
|
||||
|
||||
// Animation
|
||||
animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
|
||||
animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
|
||||
animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
|
||||
|
||||
// Animate
|
||||
el.animate( animation, speed, o.easing );
|
||||
|
||||
// Shakes
|
||||
for ( i = 1; i < times; i++ ) {
|
||||
el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
|
||||
}
|
||||
el
|
||||
.animate( animation1, speed, o.easing )
|
||||
.animate( animation, speed / 2, o.easing )
|
||||
.queue(function() {
|
||||
if ( mode === "hide" ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
});
|
||||
|
||||
// inject all the animations we just queued to be first in line (after "inprogress")
|
||||
if ( queuelen > 1) {
|
||||
queue.splice.apply( queue,
|
||||
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
|
||||
}
|
||||
el.dequeue();
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
233
js/jquery/src/jquery-ui/effect-size.js
vendored
233
js/jquery/src/jquery-ui/effect-size.js
vendored
@ -1,233 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Size 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/size-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.size = function( o, done ) {
|
||||
|
||||
// Create element
|
||||
var original, baseline, factor,
|
||||
el = $( this ),
|
||||
props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
|
||||
|
||||
// Always restore
|
||||
props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
|
||||
|
||||
// Copy for children
|
||||
props2 = [ "width", "height", "overflow" ],
|
||||
cProps = [ "fontSize" ],
|
||||
vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
|
||||
hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
|
||||
|
||||
// Set options
|
||||
mode = $.effects.setMode( el, o.mode || "effect" ),
|
||||
restore = o.restore || mode !== "effect",
|
||||
scale = o.scale || "both",
|
||||
origin = o.origin || [ "middle", "center" ],
|
||||
position = el.css( "position" ),
|
||||
props = restore ? props0 : props1,
|
||||
zero = {
|
||||
height: 0,
|
||||
width: 0,
|
||||
outerHeight: 0,
|
||||
outerWidth: 0
|
||||
};
|
||||
|
||||
if ( mode === "show" ) {
|
||||
el.show();
|
||||
}
|
||||
original = {
|
||||
height: el.height(),
|
||||
width: el.width(),
|
||||
outerHeight: el.outerHeight(),
|
||||
outerWidth: el.outerWidth()
|
||||
};
|
||||
|
||||
if ( o.mode === "toggle" && mode === "show" ) {
|
||||
el.from = o.to || zero;
|
||||
el.to = o.from || original;
|
||||
} else {
|
||||
el.from = o.from || ( mode === "show" ? zero : original );
|
||||
el.to = o.to || ( mode === "hide" ? zero : original );
|
||||
}
|
||||
|
||||
// Set scaling factor
|
||||
factor = {
|
||||
from: {
|
||||
y: el.from.height / original.height,
|
||||
x: el.from.width / original.width
|
||||
},
|
||||
to: {
|
||||
y: el.to.height / original.height,
|
||||
x: el.to.width / original.width
|
||||
}
|
||||
};
|
||||
|
||||
// Scale the css box
|
||||
if ( scale === "box" || scale === "both" ) {
|
||||
|
||||
// Vertical props scaling
|
||||
if ( factor.from.y !== factor.to.y ) {
|
||||
props = props.concat( vProps );
|
||||
el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
|
||||
el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
|
||||
}
|
||||
|
||||
// Horizontal props scaling
|
||||
if ( factor.from.x !== factor.to.x ) {
|
||||
props = props.concat( hProps );
|
||||
el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
|
||||
el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
|
||||
}
|
||||
}
|
||||
|
||||
// Scale the content
|
||||
if ( scale === "content" || scale === "both" ) {
|
||||
|
||||
// Vertical props scaling
|
||||
if ( factor.from.y !== factor.to.y ) {
|
||||
props = props.concat( cProps ).concat( props2 );
|
||||
el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
|
||||
el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
|
||||
}
|
||||
}
|
||||
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
$.effects.createWrapper( el );
|
||||
el.css( "overflow", "hidden" ).css( el.from );
|
||||
|
||||
// Adjust
|
||||
if (origin) { // Calculate baseline shifts
|
||||
baseline = $.effects.getBaseline( origin, original );
|
||||
el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
|
||||
el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
|
||||
el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
|
||||
el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
|
||||
}
|
||||
el.css( el.from ); // set top & left
|
||||
|
||||
// Animate
|
||||
if ( scale === "content" || scale === "both" ) { // Scale the children
|
||||
|
||||
// Add margins/font-size
|
||||
vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
|
||||
hProps = hProps.concat([ "marginLeft", "marginRight" ]);
|
||||
props2 = props0.concat(vProps).concat(hProps);
|
||||
|
||||
el.find( "*[width]" ).each( function() {
|
||||
var child = $( this ),
|
||||
c_original = {
|
||||
height: child.height(),
|
||||
width: child.width(),
|
||||
outerHeight: child.outerHeight(),
|
||||
outerWidth: child.outerWidth()
|
||||
};
|
||||
if (restore) {
|
||||
$.effects.save(child, props2);
|
||||
}
|
||||
|
||||
child.from = {
|
||||
height: c_original.height * factor.from.y,
|
||||
width: c_original.width * factor.from.x,
|
||||
outerHeight: c_original.outerHeight * factor.from.y,
|
||||
outerWidth: c_original.outerWidth * factor.from.x
|
||||
};
|
||||
child.to = {
|
||||
height: c_original.height * factor.to.y,
|
||||
width: c_original.width * factor.to.x,
|
||||
outerHeight: c_original.height * factor.to.y,
|
||||
outerWidth: c_original.width * factor.to.x
|
||||
};
|
||||
|
||||
// Vertical props scaling
|
||||
if ( factor.from.y !== factor.to.y ) {
|
||||
child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
|
||||
child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
|
||||
}
|
||||
|
||||
// Horizontal props scaling
|
||||
if ( factor.from.x !== factor.to.x ) {
|
||||
child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
|
||||
child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
|
||||
}
|
||||
|
||||
// Animate children
|
||||
child.css( child.from );
|
||||
child.animate( child.to, o.duration, o.easing, function() {
|
||||
|
||||
// Restore children
|
||||
if ( restore ) {
|
||||
$.effects.restore( child, props2 );
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Animate
|
||||
el.animate( el.to, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
complete: function() {
|
||||
if ( el.to.opacity === 0 ) {
|
||||
el.css( "opacity", el.from.opacity );
|
||||
}
|
||||
if ( mode === "hide" ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
if ( !restore ) {
|
||||
|
||||
// we need to calculate our new positioning based on the scaling
|
||||
if ( position === "static" ) {
|
||||
el.css({
|
||||
position: "relative",
|
||||
top: el.to.top,
|
||||
left: el.to.left
|
||||
});
|
||||
} else {
|
||||
$.each([ "top", "left" ], function( idx, pos ) {
|
||||
el.css( pos, function( _, str ) {
|
||||
var val = parseInt( str, 10 ),
|
||||
toRef = idx ? el.to.left : el.to.top;
|
||||
|
||||
// if original was "auto", recalculate the new value from wrapper
|
||||
if ( str === "auto" ) {
|
||||
return toRef + "px";
|
||||
}
|
||||
|
||||
return val + toRef + "px";
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
74
js/jquery/src/jquery-ui/effect-slide.js
vendored
74
js/jquery/src/jquery-ui/effect-slide.js
vendored
@ -1,74 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Slide 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/slide-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.slide = function( o, done ) {
|
||||
|
||||
// Create element
|
||||
var el = $( this ),
|
||||
props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
|
||||
mode = $.effects.setMode( el, o.mode || "show" ),
|
||||
show = mode === "show",
|
||||
direction = o.direction || "left",
|
||||
ref = (direction === "up" || direction === "down") ? "top" : "left",
|
||||
positiveMotion = (direction === "up" || direction === "left"),
|
||||
distance,
|
||||
animation = {};
|
||||
|
||||
// Adjust
|
||||
$.effects.save( el, props );
|
||||
el.show();
|
||||
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
|
||||
|
||||
$.effects.createWrapper( el ).css({
|
||||
overflow: "hidden"
|
||||
});
|
||||
|
||||
if ( show ) {
|
||||
el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
|
||||
}
|
||||
|
||||
// Animation
|
||||
animation[ ref ] = ( show ?
|
||||
( positiveMotion ? "+=" : "-=") :
|
||||
( positiveMotion ? "-=" : "+=")) +
|
||||
distance;
|
||||
|
||||
// Animate
|
||||
el.animate( animation, {
|
||||
queue: false,
|
||||
duration: o.duration,
|
||||
easing: o.easing,
|
||||
complete: function() {
|
||||
if ( mode === "hide" ) {
|
||||
el.hide();
|
||||
}
|
||||
$.effects.restore( el, props );
|
||||
$.effects.removeWrapper( el );
|
||||
done();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
57
js/jquery/src/jquery-ui/effect-transfer.js
vendored
57
js/jquery/src/jquery-ui/effect-transfer.js
vendored
@ -1,57 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI Effects Transfer 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/transfer-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.transfer = function( o, done ) {
|
||||
var elem = $( this ),
|
||||
target = $( o.to ),
|
||||
targetFixed = target.css( "position" ) === "fixed",
|
||||
body = $("body"),
|
||||
fixTop = targetFixed ? body.scrollTop() : 0,
|
||||
fixLeft = targetFixed ? body.scrollLeft() : 0,
|
||||
endPosition = target.offset(),
|
||||
animation = {
|
||||
top: endPosition.top - fixTop,
|
||||
left: endPosition.left - fixLeft,
|
||||
height: target.innerHeight(),
|
||||
width: target.innerWidth()
|
||||
},
|
||||
startPosition = elem.offset(),
|
||||
transfer = $( "<div class='ui-effects-transfer'></div>" )
|
||||
.appendTo( document.body )
|
||||
.addClass( o.className )
|
||||
.css({
|
||||
top: startPosition.top - fixTop,
|
||||
left: startPosition.left - fixLeft,
|
||||
height: elem.innerHeight(),
|
||||
width: elem.innerWidth(),
|
||||
position: targetFixed ? "fixed" : "absolute"
|
||||
})
|
||||
.animate( animation, o.duration, o.easing, function() {
|
||||
transfer.remove();
|
||||
done();
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
900
js/jquery/src/jquery-ui/effect.js
vendored
900
js/jquery/src/jquery-ui/effect.js
vendored
File diff suppressed because it is too large
Load Diff
70
js/jquery/src/jquery-ui/effects/effect-blind.js
vendored
Normal file
70
js/jquery/src/jquery-ui/effects/effect-blind.js
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
/*!
|
||||
* jQuery UI Effects Blind 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Blind Effect
|
||||
//>>group: Effects
|
||||
//>>description: Blinds the element.
|
||||
//>>docs: http://api.jqueryui.com/blind-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "blind", "hide", function( options, done ) {
|
||||
var map = {
|
||||
up: [ "bottom", "top" ],
|
||||
vertical: [ "bottom", "top" ],
|
||||
down: [ "top", "bottom" ],
|
||||
left: [ "right", "left" ],
|
||||
horizontal: [ "right", "left" ],
|
||||
right: [ "left", "right" ]
|
||||
},
|
||||
element = $( this ),
|
||||
direction = options.direction || "up",
|
||||
start = element.cssClip(),
|
||||
animate = { clip: $.extend( {}, start ) },
|
||||
placeholder = $.effects.createPlaceholder( element );
|
||||
|
||||
animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
|
||||
|
||||
if ( options.mode === "show" ) {
|
||||
element.cssClip( animate.clip );
|
||||
if ( placeholder ) {
|
||||
placeholder.css( $.effects.clipToBox( animate ) );
|
||||
}
|
||||
|
||||
animate.clip = start;
|
||||
}
|
||||
|
||||
if ( placeholder ) {
|
||||
placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
|
||||
}
|
||||
|
||||
element.animate( animate, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: done
|
||||
} );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
110
js/jquery/src/jquery-ui/effects/effect-bounce.js
vendored
Normal file
110
js/jquery/src/jquery-ui/effects/effect-bounce.js
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
/*!
|
||||
* jQuery UI Effects Bounce 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Bounce Effect
|
||||
//>>group: Effects
|
||||
//>>description: Bounces an element horizontally or vertically n times.
|
||||
//>>docs: http://api.jqueryui.com/bounce-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "bounce", function( options, done ) {
|
||||
var upAnim, downAnim, refValue,
|
||||
element = $( this ),
|
||||
|
||||
// Defaults:
|
||||
mode = options.mode,
|
||||
hide = mode === "hide",
|
||||
show = mode === "show",
|
||||
direction = options.direction || "up",
|
||||
distance = options.distance,
|
||||
times = options.times || 5,
|
||||
|
||||
// Number of internal animations
|
||||
anims = times * 2 + ( show || hide ? 1 : 0 ),
|
||||
speed = options.duration / anims,
|
||||
easing = options.easing,
|
||||
|
||||
// Utility:
|
||||
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
||||
motion = ( direction === "up" || direction === "left" ),
|
||||
i = 0,
|
||||
|
||||
queuelen = element.queue().length;
|
||||
|
||||
$.effects.createPlaceholder( element );
|
||||
|
||||
refValue = element.css( ref );
|
||||
|
||||
// Default distance for the BIGGEST bounce is the outer Distance / 3
|
||||
if ( !distance ) {
|
||||
distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
|
||||
}
|
||||
|
||||
if ( show ) {
|
||||
downAnim = { opacity: 1 };
|
||||
downAnim[ ref ] = refValue;
|
||||
|
||||
// If we are showing, force opacity 0 and set the initial position
|
||||
// then do the "first" animation
|
||||
element
|
||||
.css( "opacity", 0 )
|
||||
.css( ref, motion ? -distance * 2 : distance * 2 )
|
||||
.animate( downAnim, speed, easing );
|
||||
}
|
||||
|
||||
// Start at the smallest distance if we are hiding
|
||||
if ( hide ) {
|
||||
distance = distance / Math.pow( 2, times - 1 );
|
||||
}
|
||||
|
||||
downAnim = {};
|
||||
downAnim[ ref ] = refValue;
|
||||
|
||||
// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
|
||||
for ( ; i < times; i++ ) {
|
||||
upAnim = {};
|
||||
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
|
||||
|
||||
element
|
||||
.animate( upAnim, speed, easing )
|
||||
.animate( downAnim, speed, easing );
|
||||
|
||||
distance = hide ? distance * 2 : distance / 2;
|
||||
}
|
||||
|
||||
// Last Bounce when Hiding
|
||||
if ( hide ) {
|
||||
upAnim = { opacity: 0 };
|
||||
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
|
||||
|
||||
element.animate( upAnim, speed, easing );
|
||||
}
|
||||
|
||||
element.queue( done );
|
||||
|
||||
$.effects.unshift( element, queuelen, anims + 1 );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
65
js/jquery/src/jquery-ui/effects/effect-clip.js
vendored
Normal file
65
js/jquery/src/jquery-ui/effects/effect-clip.js
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/*!
|
||||
* jQuery UI Effects Clip 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Clip Effect
|
||||
//>>group: Effects
|
||||
//>>description: Clips the element on and off like an old TV.
|
||||
//>>docs: http://api.jqueryui.com/clip-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "clip", "hide", function( options, done ) {
|
||||
var start,
|
||||
animate = {},
|
||||
element = $( this ),
|
||||
direction = options.direction || "vertical",
|
||||
both = direction === "both",
|
||||
horizontal = both || direction === "horizontal",
|
||||
vertical = both || direction === "vertical";
|
||||
|
||||
start = element.cssClip();
|
||||
animate.clip = {
|
||||
top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
|
||||
right: horizontal ? ( start.right - start.left ) / 2 : start.right,
|
||||
bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
|
||||
left: horizontal ? ( start.right - start.left ) / 2 : start.left
|
||||
};
|
||||
|
||||
$.effects.createPlaceholder( element );
|
||||
|
||||
if ( options.mode === "show" ) {
|
||||
element.cssClip( animate.clip );
|
||||
animate.clip = start;
|
||||
}
|
||||
|
||||
element.animate( animate, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: done
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
} ) );
|
||||
69
js/jquery/src/jquery-ui/effects/effect-drop.js
vendored
Normal file
69
js/jquery/src/jquery-ui/effects/effect-drop.js
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
/*!
|
||||
* jQuery UI Effects Drop 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Drop Effect
|
||||
//>>group: Effects
|
||||
//>>description: Moves an element in one direction and hides it at the same time.
|
||||
//>>docs: http://api.jqueryui.com/drop-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "drop", "hide", function( options, done ) {
|
||||
|
||||
var distance,
|
||||
element = $( this ),
|
||||
mode = options.mode,
|
||||
show = mode === "show",
|
||||
direction = options.direction || "left",
|
||||
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
||||
motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
|
||||
oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
|
||||
animation = {
|
||||
opacity: 0
|
||||
};
|
||||
|
||||
$.effects.createPlaceholder( element );
|
||||
|
||||
distance = options.distance ||
|
||||
element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
|
||||
|
||||
animation[ ref ] = motion + distance;
|
||||
|
||||
if ( show ) {
|
||||
element.css( animation );
|
||||
|
||||
animation[ ref ] = oppositeMotion + distance;
|
||||
animation.opacity = 1;
|
||||
}
|
||||
|
||||
// Animate
|
||||
element.animate( animation, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: done
|
||||
} );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
111
js/jquery/src/jquery-ui/effects/effect-explode.js
vendored
Normal file
111
js/jquery/src/jquery-ui/effects/effect-explode.js
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
/*!
|
||||
* jQuery UI Effects Explode 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Explode Effect
|
||||
//>>group: Effects
|
||||
// jscs:disable maximumLineLength
|
||||
//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
|
||||
// jscs:enable maximumLineLength
|
||||
//>>docs: http://api.jqueryui.com/explode-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "explode", "hide", function( options, done ) {
|
||||
|
||||
var i, j, left, top, mx, my,
|
||||
rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
|
||||
cells = rows,
|
||||
element = $( this ),
|
||||
mode = options.mode,
|
||||
show = mode === "show",
|
||||
|
||||
// Show and then visibility:hidden the element before calculating offset
|
||||
offset = element.show().css( "visibility", "hidden" ).offset(),
|
||||
|
||||
// Width and height of a piece
|
||||
width = Math.ceil( element.outerWidth() / cells ),
|
||||
height = Math.ceil( element.outerHeight() / rows ),
|
||||
pieces = [];
|
||||
|
||||
// Children animate complete:
|
||||
function childComplete() {
|
||||
pieces.push( this );
|
||||
if ( pieces.length === rows * cells ) {
|
||||
animComplete();
|
||||
}
|
||||
}
|
||||
|
||||
// Clone the element for each row and cell.
|
||||
for ( i = 0; i < rows; i++ ) { // ===>
|
||||
top = offset.top + i * height;
|
||||
my = i - ( rows - 1 ) / 2;
|
||||
|
||||
for ( j = 0; j < cells; j++ ) { // |||
|
||||
left = offset.left + j * width;
|
||||
mx = j - ( cells - 1 ) / 2;
|
||||
|
||||
// Create a clone of the now hidden main element that will be absolute positioned
|
||||
// within a wrapper div off the -left and -top equal to size of our pieces
|
||||
element
|
||||
.clone()
|
||||
.appendTo( "body" )
|
||||
.wrap( "<div></div>" )
|
||||
.css( {
|
||||
position: "absolute",
|
||||
visibility: "visible",
|
||||
left: -j * width,
|
||||
top: -i * height
|
||||
} )
|
||||
|
||||
// Select the wrapper - make it overflow: hidden and absolute positioned based on
|
||||
// where the original was located +left and +top equal to the size of pieces
|
||||
.parent()
|
||||
.addClass( "ui-effects-explode" )
|
||||
.css( {
|
||||
position: "absolute",
|
||||
overflow: "hidden",
|
||||
width: width,
|
||||
height: height,
|
||||
left: left + ( show ? mx * width : 0 ),
|
||||
top: top + ( show ? my * height : 0 ),
|
||||
opacity: show ? 0 : 1
|
||||
} )
|
||||
.animate( {
|
||||
left: left + ( show ? 0 : mx * width ),
|
||||
top: top + ( show ? 0 : my * height ),
|
||||
opacity: show ? 1 : 0
|
||||
}, options.duration || 500, options.easing, childComplete );
|
||||
}
|
||||
}
|
||||
|
||||
function animComplete() {
|
||||
element.css( {
|
||||
visibility: "visible"
|
||||
} );
|
||||
$( pieces ).remove();
|
||||
done();
|
||||
}
|
||||
} );
|
||||
|
||||
} ) );
|
||||
47
js/jquery/src/jquery-ui/effects/effect-fade.js
vendored
Normal file
47
js/jquery/src/jquery-ui/effects/effect-fade.js
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* jQuery UI Effects Fade 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Fade Effect
|
||||
//>>group: Effects
|
||||
//>>description: Fades the element.
|
||||
//>>docs: http://api.jqueryui.com/fade-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "fade", "toggle", function( options, done ) {
|
||||
var show = options.mode === "show";
|
||||
|
||||
$( this )
|
||||
.css( "opacity", show ? 0 : 1 )
|
||||
.animate( {
|
||||
opacity: show ? 1 : 0
|
||||
}, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: done
|
||||
} );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
89
js/jquery/src/jquery-ui/effects/effect-fold.js
vendored
Normal file
89
js/jquery/src/jquery-ui/effects/effect-fold.js
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
/*!
|
||||
* jQuery UI Effects Fold 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Fold Effect
|
||||
//>>group: Effects
|
||||
//>>description: Folds an element first horizontally and then vertically.
|
||||
//>>docs: http://api.jqueryui.com/fold-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "fold", "hide", function( options, done ) {
|
||||
|
||||
// Create element
|
||||
var element = $( this ),
|
||||
mode = options.mode,
|
||||
show = mode === "show",
|
||||
hide = mode === "hide",
|
||||
size = options.size || 15,
|
||||
percent = /([0-9]+)%/.exec( size ),
|
||||
horizFirst = !!options.horizFirst,
|
||||
ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
|
||||
duration = options.duration / 2,
|
||||
|
||||
placeholder = $.effects.createPlaceholder( element ),
|
||||
|
||||
start = element.cssClip(),
|
||||
animation1 = { clip: $.extend( {}, start ) },
|
||||
animation2 = { clip: $.extend( {}, start ) },
|
||||
|
||||
distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
|
||||
|
||||
queuelen = element.queue().length;
|
||||
|
||||
if ( percent ) {
|
||||
size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
|
||||
}
|
||||
animation1.clip[ ref[ 0 ] ] = size;
|
||||
animation2.clip[ ref[ 0 ] ] = size;
|
||||
animation2.clip[ ref[ 1 ] ] = 0;
|
||||
|
||||
if ( show ) {
|
||||
element.cssClip( animation2.clip );
|
||||
if ( placeholder ) {
|
||||
placeholder.css( $.effects.clipToBox( animation2 ) );
|
||||
}
|
||||
|
||||
animation2.clip = start;
|
||||
}
|
||||
|
||||
// Animate
|
||||
element
|
||||
.queue( function( next ) {
|
||||
if ( placeholder ) {
|
||||
placeholder
|
||||
.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
|
||||
.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
|
||||
}
|
||||
|
||||
next();
|
||||
} )
|
||||
.animate( animation1, duration, options.easing )
|
||||
.animate( animation2, duration, options.easing )
|
||||
.queue( done );
|
||||
|
||||
$.effects.unshift( element, queuelen, 4 );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
57
js/jquery/src/jquery-ui/effects/effect-highlight.js
vendored
Normal file
57
js/jquery/src/jquery-ui/effects/effect-highlight.js
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/*!
|
||||
* jQuery UI Effects Highlight 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Highlight Effect
|
||||
//>>group: Effects
|
||||
//>>description: Highlights the background of an element in a defined color for a custom duration.
|
||||
//>>docs: http://api.jqueryui.com/highlight-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "highlight", "show", function( options, done ) {
|
||||
var element = $( this ),
|
||||
animation = {
|
||||
backgroundColor: element.css( "backgroundColor" )
|
||||
};
|
||||
|
||||
if ( options.mode === "hide" ) {
|
||||
animation.opacity = 0;
|
||||
}
|
||||
|
||||
$.effects.saveStyle( element );
|
||||
|
||||
element
|
||||
.css( {
|
||||
backgroundImage: "none",
|
||||
backgroundColor: options.color || "#ffff99"
|
||||
} )
|
||||
.animate( animation, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: done
|
||||
} );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
42
js/jquery/src/jquery-ui/effects/effect-puff.js
vendored
Normal file
42
js/jquery/src/jquery-ui/effects/effect-puff.js
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/*!
|
||||
* jQuery UI Effects Puff 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Puff Effect
|
||||
//>>group: Effects
|
||||
//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
|
||||
//>>docs: http://api.jqueryui.com/puff-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect",
|
||||
"./effect-scale"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "puff", "hide", function( options, done ) {
|
||||
var newOptions = $.extend( true, {}, options, {
|
||||
fade: true,
|
||||
percent: parseInt( options.percent, 10 ) || 150
|
||||
} );
|
||||
|
||||
$.effects.effect.scale.call( this, newOptions, done );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
64
js/jquery/src/jquery-ui/effects/effect-pulsate.js
vendored
Normal file
64
js/jquery/src/jquery-ui/effects/effect-pulsate.js
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/*!
|
||||
* jQuery UI Effects Pulsate 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Pulsate Effect
|
||||
//>>group: Effects
|
||||
//>>description: Pulsates an element n times by changing the opacity to zero and back.
|
||||
//>>docs: http://api.jqueryui.com/pulsate-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "pulsate", "show", function( options, done ) {
|
||||
var element = $( this ),
|
||||
mode = options.mode,
|
||||
show = mode === "show",
|
||||
hide = mode === "hide",
|
||||
showhide = show || hide,
|
||||
|
||||
// Showing or hiding leaves off the "last" animation
|
||||
anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
|
||||
duration = options.duration / anims,
|
||||
animateTo = 0,
|
||||
i = 1,
|
||||
queuelen = element.queue().length;
|
||||
|
||||
if ( show || !element.is( ":visible" ) ) {
|
||||
element.css( "opacity", 0 ).show();
|
||||
animateTo = 1;
|
||||
}
|
||||
|
||||
// Anims - 1 opacity "toggles"
|
||||
for ( ; i < anims; i++ ) {
|
||||
element.animate( { opacity: animateTo }, duration, options.easing );
|
||||
animateTo = 1 - animateTo;
|
||||
}
|
||||
|
||||
element.animate( { opacity: animateTo }, duration, options.easing );
|
||||
|
||||
element.queue( done );
|
||||
|
||||
$.effects.unshift( element, queuelen, anims + 1 );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
56
js/jquery/src/jquery-ui/effects/effect-scale.js
vendored
Normal file
56
js/jquery/src/jquery-ui/effects/effect-scale.js
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/*!
|
||||
* jQuery UI Effects Scale 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Scale Effect
|
||||
//>>group: Effects
|
||||
//>>description: Grows or shrinks an element and its content.
|
||||
//>>docs: http://api.jqueryui.com/scale-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect",
|
||||
"./effect-size"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "scale", function( options, done ) {
|
||||
|
||||
// Create element
|
||||
var el = $( this ),
|
||||
mode = options.mode,
|
||||
percent = parseInt( options.percent, 10 ) ||
|
||||
( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
|
||||
|
||||
newOptions = $.extend( true, {
|
||||
from: $.effects.scaledDimensions( el ),
|
||||
to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
|
||||
origin: options.origin || [ "middle", "center" ]
|
||||
}, options );
|
||||
|
||||
// Fade option to support puff
|
||||
if ( options.fade ) {
|
||||
newOptions.from.opacity = 1;
|
||||
newOptions.to.opacity = 0;
|
||||
}
|
||||
|
||||
$.effects.effect.size.call( this, newOptions, done );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
74
js/jquery/src/jquery-ui/effects/effect-shake.js
vendored
Normal file
74
js/jquery/src/jquery-ui/effects/effect-shake.js
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
/*!
|
||||
* jQuery UI Effects Shake 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Shake Effect
|
||||
//>>group: Effects
|
||||
//>>description: Shakes an element horizontally or vertically n times.
|
||||
//>>docs: http://api.jqueryui.com/shake-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "shake", function( options, done ) {
|
||||
|
||||
var i = 1,
|
||||
element = $( this ),
|
||||
direction = options.direction || "left",
|
||||
distance = options.distance || 20,
|
||||
times = options.times || 3,
|
||||
anims = times * 2 + 1,
|
||||
speed = Math.round( options.duration / anims ),
|
||||
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
||||
positiveMotion = ( direction === "up" || direction === "left" ),
|
||||
animation = {},
|
||||
animation1 = {},
|
||||
animation2 = {},
|
||||
|
||||
queuelen = element.queue().length;
|
||||
|
||||
$.effects.createPlaceholder( element );
|
||||
|
||||
// Animation
|
||||
animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
|
||||
animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
|
||||
animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
|
||||
|
||||
// Animate
|
||||
element.animate( animation, speed, options.easing );
|
||||
|
||||
// Shakes
|
||||
for ( ; i < times; i++ ) {
|
||||
element
|
||||
.animate( animation1, speed, options.easing )
|
||||
.animate( animation2, speed, options.easing );
|
||||
}
|
||||
|
||||
element
|
||||
.animate( animation1, speed, options.easing )
|
||||
.animate( animation, speed / 2, options.easing )
|
||||
.queue( done );
|
||||
|
||||
$.effects.unshift( element, queuelen, anims + 1 );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
191
js/jquery/src/jquery-ui/effects/effect-size.js
vendored
Normal file
191
js/jquery/src/jquery-ui/effects/effect-size.js
vendored
Normal file
@ -0,0 +1,191 @@
|
||||
/*!
|
||||
* jQuery UI Effects Size 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Size Effect
|
||||
//>>group: Effects
|
||||
//>>description: Resize an element to a specified width and height.
|
||||
//>>docs: http://api.jqueryui.com/size-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "size", function( options, done ) {
|
||||
|
||||
// Create element
|
||||
var baseline, factor, temp,
|
||||
element = $( this ),
|
||||
|
||||
// Copy for children
|
||||
cProps = [ "fontSize" ],
|
||||
vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
|
||||
hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
|
||||
|
||||
// Set options
|
||||
mode = options.mode,
|
||||
restore = mode !== "effect",
|
||||
scale = options.scale || "both",
|
||||
origin = options.origin || [ "middle", "center" ],
|
||||
position = element.css( "position" ),
|
||||
pos = element.position(),
|
||||
original = $.effects.scaledDimensions( element ),
|
||||
from = options.from || original,
|
||||
to = options.to || $.effects.scaledDimensions( element, 0 );
|
||||
|
||||
$.effects.createPlaceholder( element );
|
||||
|
||||
if ( mode === "show" ) {
|
||||
temp = from;
|
||||
from = to;
|
||||
to = temp;
|
||||
}
|
||||
|
||||
// Set scaling factor
|
||||
factor = {
|
||||
from: {
|
||||
y: from.height / original.height,
|
||||
x: from.width / original.width
|
||||
},
|
||||
to: {
|
||||
y: to.height / original.height,
|
||||
x: to.width / original.width
|
||||
}
|
||||
};
|
||||
|
||||
// Scale the css box
|
||||
if ( scale === "box" || scale === "both" ) {
|
||||
|
||||
// Vertical props scaling
|
||||
if ( factor.from.y !== factor.to.y ) {
|
||||
from = $.effects.setTransition( element, vProps, factor.from.y, from );
|
||||
to = $.effects.setTransition( element, vProps, factor.to.y, to );
|
||||
}
|
||||
|
||||
// Horizontal props scaling
|
||||
if ( factor.from.x !== factor.to.x ) {
|
||||
from = $.effects.setTransition( element, hProps, factor.from.x, from );
|
||||
to = $.effects.setTransition( element, hProps, factor.to.x, to );
|
||||
}
|
||||
}
|
||||
|
||||
// Scale the content
|
||||
if ( scale === "content" || scale === "both" ) {
|
||||
|
||||
// Vertical props scaling
|
||||
if ( factor.from.y !== factor.to.y ) {
|
||||
from = $.effects.setTransition( element, cProps, factor.from.y, from );
|
||||
to = $.effects.setTransition( element, cProps, factor.to.y, to );
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust the position properties based on the provided origin points
|
||||
if ( origin ) {
|
||||
baseline = $.effects.getBaseline( origin, original );
|
||||
from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
|
||||
from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
|
||||
to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
|
||||
to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
|
||||
}
|
||||
element.css( from );
|
||||
|
||||
// Animate the children if desired
|
||||
if ( scale === "content" || scale === "both" ) {
|
||||
|
||||
vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
|
||||
hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
|
||||
|
||||
// Only animate children with width attributes specified
|
||||
// TODO: is this right? should we include anything with css width specified as well
|
||||
element.find( "*[width]" ).each( function() {
|
||||
var child = $( this ),
|
||||
childOriginal = $.effects.scaledDimensions( child ),
|
||||
childFrom = {
|
||||
height: childOriginal.height * factor.from.y,
|
||||
width: childOriginal.width * factor.from.x,
|
||||
outerHeight: childOriginal.outerHeight * factor.from.y,
|
||||
outerWidth: childOriginal.outerWidth * factor.from.x
|
||||
},
|
||||
childTo = {
|
||||
height: childOriginal.height * factor.to.y,
|
||||
width: childOriginal.width * factor.to.x,
|
||||
outerHeight: childOriginal.height * factor.to.y,
|
||||
outerWidth: childOriginal.width * factor.to.x
|
||||
};
|
||||
|
||||
// Vertical props scaling
|
||||
if ( factor.from.y !== factor.to.y ) {
|
||||
childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
|
||||
childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
|
||||
}
|
||||
|
||||
// Horizontal props scaling
|
||||
if ( factor.from.x !== factor.to.x ) {
|
||||
childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
|
||||
childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
|
||||
}
|
||||
|
||||
if ( restore ) {
|
||||
$.effects.saveStyle( child );
|
||||
}
|
||||
|
||||
// Animate children
|
||||
child.css( childFrom );
|
||||
child.animate( childTo, options.duration, options.easing, function() {
|
||||
|
||||
// Restore children
|
||||
if ( restore ) {
|
||||
$.effects.restoreStyle( child );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
// Animate
|
||||
element.animate( to, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: function() {
|
||||
|
||||
var offset = element.offset();
|
||||
|
||||
if ( to.opacity === 0 ) {
|
||||
element.css( "opacity", from.opacity );
|
||||
}
|
||||
|
||||
if ( !restore ) {
|
||||
element
|
||||
.css( "position", position === "static" ? "relative" : position )
|
||||
.offset( offset );
|
||||
|
||||
// Need to save style here so that automatic style restoration
|
||||
// doesn't restore to the original styles from before the animation.
|
||||
$.effects.saveStyle( element );
|
||||
}
|
||||
|
||||
done();
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
} ) );
|
||||
76
js/jquery/src/jquery-ui/effects/effect-slide.js
vendored
Normal file
76
js/jquery/src/jquery-ui/effects/effect-slide.js
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
/*!
|
||||
* jQuery UI Effects Slide 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Slide Effect
|
||||
//>>group: Effects
|
||||
//>>description: Slides an element in and out of the viewport.
|
||||
//>>docs: http://api.jqueryui.com/slide-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.effects.define( "slide", "show", function( options, done ) {
|
||||
var startClip, startRef,
|
||||
element = $( this ),
|
||||
map = {
|
||||
up: [ "bottom", "top" ],
|
||||
down: [ "top", "bottom" ],
|
||||
left: [ "right", "left" ],
|
||||
right: [ "left", "right" ]
|
||||
},
|
||||
mode = options.mode,
|
||||
direction = options.direction || "left",
|
||||
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
|
||||
positiveMotion = ( direction === "up" || direction === "left" ),
|
||||
distance = options.distance ||
|
||||
element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
|
||||
animation = {};
|
||||
|
||||
$.effects.createPlaceholder( element );
|
||||
|
||||
startClip = element.cssClip();
|
||||
startRef = element.position()[ ref ];
|
||||
|
||||
// Define hide animation
|
||||
animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
|
||||
animation.clip = element.cssClip();
|
||||
animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
|
||||
|
||||
// Reverse the animation if we're showing
|
||||
if ( mode === "show" ) {
|
||||
element.cssClip( animation.clip );
|
||||
element.css( ref, animation[ ref ] );
|
||||
animation.clip = startClip;
|
||||
animation[ ref ] = startRef;
|
||||
}
|
||||
|
||||
// Actually animate
|
||||
element.animate( animation, {
|
||||
queue: false,
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: done
|
||||
} );
|
||||
} );
|
||||
|
||||
} ) );
|
||||
40
js/jquery/src/jquery-ui/effects/effect-transfer.js
vendored
Normal file
40
js/jquery/src/jquery-ui/effects/effect-transfer.js
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* jQuery UI Effects Transfer 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Transfer Effect
|
||||
//>>group: Effects
|
||||
//>>description: Displays a transfer effect from one element to another.
|
||||
//>>docs: http://api.jqueryui.com/transfer-effect/
|
||||
//>>demos: http://jqueryui.com/effect/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"../version",
|
||||
"../effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
var effect;
|
||||
if ( $.uiBackCompat !== false ) {
|
||||
effect = $.effects.define( "transfer", function( options, done ) {
|
||||
$( this ).transfer( options, done );
|
||||
} );
|
||||
}
|
||||
return effect;
|
||||
|
||||
} ) );
|
||||
21
js/jquery/src/jquery-ui/escape-selector.js
vendored
Normal file
21
js/jquery/src/jquery-ui/escape-selector.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery", "./version" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
} ( function( $ ) {
|
||||
|
||||
// Internal use only
|
||||
return $.ui.escapeSelector = ( function() {
|
||||
var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;
|
||||
return function( selector ) {
|
||||
return selector.replace( selectorEscape, "\\$1" );
|
||||
};
|
||||
} )();
|
||||
|
||||
} ) );
|
||||
84
js/jquery/src/jquery-ui/focusable.js
vendored
Normal file
84
js/jquery/src/jquery-ui/focusable.js
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/*!
|
||||
* jQuery UI Focusable 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: :focusable Selector
|
||||
//>>group: Core
|
||||
//>>description: Selects elements which can be focused.
|
||||
//>>docs: http://api.jqueryui.com/focusable-selector/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery", "./version" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
} ( function( $ ) {
|
||||
|
||||
// Selectors
|
||||
$.ui.focusable = function( element, hasTabindex ) {
|
||||
var map, mapName, img, focusableIfVisible, fieldset,
|
||||
nodeName = element.nodeName.toLowerCase();
|
||||
|
||||
if ( "area" === nodeName ) {
|
||||
map = element.parentNode;
|
||||
mapName = map.name;
|
||||
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
||||
return false;
|
||||
}
|
||||
img = $( "img[usemap='#" + mapName + "']" );
|
||||
return img.length > 0 && img.is( ":visible" );
|
||||
}
|
||||
|
||||
if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
|
||||
focusableIfVisible = !element.disabled;
|
||||
|
||||
if ( focusableIfVisible ) {
|
||||
|
||||
// Form controls within a disabled fieldset are disabled.
|
||||
// However, controls within the fieldset's legend do not get disabled.
|
||||
// Since controls generally aren't placed inside legends, we skip
|
||||
// this portion of the check.
|
||||
fieldset = $( element ).closest( "fieldset" )[ 0 ];
|
||||
if ( fieldset ) {
|
||||
focusableIfVisible = !fieldset.disabled;
|
||||
}
|
||||
}
|
||||
} else if ( "a" === nodeName ) {
|
||||
focusableIfVisible = element.href || hasTabindex;
|
||||
} else {
|
||||
focusableIfVisible = hasTabindex;
|
||||
}
|
||||
|
||||
return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
|
||||
};
|
||||
|
||||
// Support: IE 8 only
|
||||
// IE 8 doesn't resolve inherit to visible/hidden for computed values
|
||||
function visible( element ) {
|
||||
var visibility = element.css( "visibility" );
|
||||
while ( visibility === "inherit" ) {
|
||||
element = element.parent();
|
||||
visibility = element.css( "visibility" );
|
||||
}
|
||||
return visibility !== "hidden";
|
||||
}
|
||||
|
||||
$.extend( $.expr[ ":" ], {
|
||||
focusable: function( element ) {
|
||||
return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
|
||||
}
|
||||
} );
|
||||
|
||||
return $.ui.focusable;
|
||||
|
||||
} ) );
|
||||
77
js/jquery/src/jquery-ui/form-reset-mixin.js
vendored
Normal file
77
js/jquery/src/jquery-ui/form-reset-mixin.js
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* jQuery UI Form Reset Mixin 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: Form Reset Mixin
|
||||
//>>group: Core
|
||||
//>>description: Refresh input widgets when their form is reset
|
||||
//>>docs: http://api.jqueryui.com/form-reset-mixin/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"./form",
|
||||
"./version"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
return $.ui.formResetMixin = {
|
||||
_formResetHandler: function() {
|
||||
var form = $( this );
|
||||
|
||||
// Wait for the form reset to actually happen before refreshing
|
||||
setTimeout( function() {
|
||||
var instances = form.data( "ui-form-reset-instances" );
|
||||
$.each( instances, function() {
|
||||
this.refresh();
|
||||
} );
|
||||
} );
|
||||
},
|
||||
|
||||
_bindFormResetHandler: function() {
|
||||
this.form = this.element.form();
|
||||
if ( !this.form.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var instances = this.form.data( "ui-form-reset-instances" ) || [];
|
||||
if ( !instances.length ) {
|
||||
|
||||
// We don't use _on() here because we use a single event handler per form
|
||||
this.form.on( "reset.ui-form-reset", this._formResetHandler );
|
||||
}
|
||||
instances.push( this );
|
||||
this.form.data( "ui-form-reset-instances", instances );
|
||||
},
|
||||
|
||||
_unbindFormResetHandler: function() {
|
||||
if ( !this.form.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var instances = this.form.data( "ui-form-reset-instances" );
|
||||
instances.splice( $.inArray( this, instances ), 1 );
|
||||
if ( instances.length ) {
|
||||
this.form.data( "ui-form-reset-instances", instances );
|
||||
} else {
|
||||
this.form
|
||||
.removeData( "ui-form-reset-instances" )
|
||||
.off( "reset.ui-form-reset" );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} ) );
|
||||
20
js/jquery/src/jquery-ui/form.js
vendored
Normal file
20
js/jquery/src/jquery-ui/form.js
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery", "./version" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
} ( function( $ ) {
|
||||
|
||||
// Support: IE8 Only
|
||||
// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
|
||||
// with a string, so we need to find the proper form.
|
||||
return $.fn.form = function() {
|
||||
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
|
||||
};
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-af.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-af.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Afrikaans initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Renier Pretorius. */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.af = {
|
||||
closeText: "Selekteer",
|
||||
prevText: "Vorige",
|
||||
nextText: "Volgende",
|
||||
currentText: "Vandag",
|
||||
monthNames: [ "Januarie","Februarie","Maart","April","Mei","Junie",
|
||||
"Julie","Augustus","September","Oktober","November","Desember" ],
|
||||
monthNamesShort: [ "Jan", "Feb", "Mrt", "Apr", "Mei", "Jun",
|
||||
"Jul", "Aug", "Sep", "Okt", "Nov", "Des" ],
|
||||
dayNames: [ "Sondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag" ],
|
||||
dayNamesShort: [ "Son", "Maa", "Din", "Woe", "Don", "Vry", "Sat" ],
|
||||
dayNamesMin: [ "So","Ma","Di","Wo","Do","Vr","Sa" ],
|
||||
weekHeader: "Wk",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.af );
|
||||
|
||||
return datepicker.regional.af;
|
||||
|
||||
} ) );
|
||||
39
js/jquery/src/jquery-ui/i18n/datepicker-ar-DZ.js
vendored
Normal file
39
js/jquery/src/jquery-ui/i18n/datepicker-ar-DZ.js
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/* Algerian Arabic Translation for jQuery UI date picker plugin.
|
||||
/* Used in most of Maghreb countries, primarily in Algeria, Tunisia, Morocco.
|
||||
/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
|
||||
/* Mohamed Amine HADDAD -- zatamine@gmail.com */
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional[ "ar-DZ" ] = {
|
||||
closeText: "إغلاق",
|
||||
prevText: "<السابق",
|
||||
nextText: "التالي>",
|
||||
currentText: "اليوم",
|
||||
monthNames: [ "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان",
|
||||
"جويلية", "أوت", "سبتمبر","أكتوبر", "نوفمبر", "ديسمبر" ],
|
||||
monthNamesShort: [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ],
|
||||
dayNames: [ "الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ],
|
||||
dayNamesShort: [ "الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ],
|
||||
dayNamesMin: [ "ح", "ن", "ث", "ر", "خ", "ج", "س" ],
|
||||
weekHeader: "أسبوع",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 6,
|
||||
isRTL: true,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional[ "ar-DZ" ] );
|
||||
|
||||
return datepicker.regional[ "ar-DZ" ];
|
||||
|
||||
} ) );
|
||||
39
js/jquery/src/jquery-ui/i18n/datepicker-ar.js
vendored
Normal file
39
js/jquery/src/jquery-ui/i18n/datepicker-ar.js
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/* Arabic Translation for jQuery UI date picker plugin. */
|
||||
/* Used in most of Arab countries, primarily in Bahrain, */
|
||||
/* Kuwait, Oman, Qatar, Saudi Arabia and the United Arab Emirates, Egypt, Sudan and Yemen. */
|
||||
/* Written by Mohammed Alshehri -- m@dralshehri.com */
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.ar = {
|
||||
closeText: "إغلاق",
|
||||
prevText: "<السابق",
|
||||
nextText: "التالي>",
|
||||
currentText: "اليوم",
|
||||
monthNames: [ "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو",
|
||||
"يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر" ],
|
||||
monthNamesShort: [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ],
|
||||
dayNames: [ "الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ],
|
||||
dayNamesShort: [ "أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت" ],
|
||||
dayNamesMin: [ "ح", "ن", "ث", "ر", "خ", "ج", "س" ],
|
||||
weekHeader: "أسبوع",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 0,
|
||||
isRTL: true,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.ar );
|
||||
|
||||
return datepicker.regional.ar;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-az.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-az.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Jamil Najafov (necefov33@gmail.com). */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.az = {
|
||||
closeText: "Bağla",
|
||||
prevText: "<Geri",
|
||||
nextText: "İrəli>",
|
||||
currentText: "Bugün",
|
||||
monthNames: [ "Yanvar","Fevral","Mart","Aprel","May","İyun",
|
||||
"İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr" ],
|
||||
monthNamesShort: [ "Yan","Fev","Mar","Apr","May","İyun",
|
||||
"İyul","Avq","Sen","Okt","Noy","Dek" ],
|
||||
dayNames: [ "Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə" ],
|
||||
dayNamesShort: [ "B","Be","Ça","Ç","Ca","C","Ş" ],
|
||||
dayNamesMin: [ "B","B","Ç","С","Ç","C","Ş" ],
|
||||
weekHeader: "Hf",
|
||||
dateFormat: "dd.mm.yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.az );
|
||||
|
||||
return datepicker.regional.az;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-be.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-be.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Belarusian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Pavel Selitskas <p.selitskas@gmail.com> */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.be = {
|
||||
closeText: "Зачыніць",
|
||||
prevText: "←Папяр.",
|
||||
nextText: "Наст.→",
|
||||
currentText: "Сёньня",
|
||||
monthNames: [ "Студзень","Люты","Сакавік","Красавік","Травень","Чэрвень",
|
||||
"Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Сьнежань" ],
|
||||
monthNamesShort: [ "Сту","Лют","Сак","Кра","Тра","Чэр",
|
||||
"Ліп","Жні","Вер","Кас","Ліс","Сьн" ],
|
||||
dayNames: [ "нядзеля","панядзелак","аўторак","серада","чацьвер","пятніца","субота" ],
|
||||
dayNamesShort: [ "ндз","пнд","аўт","срд","чцв","птн","сбт" ],
|
||||
dayNamesMin: [ "Нд","Пн","Аў","Ср","Чц","Пт","Сб" ],
|
||||
weekHeader: "Тд",
|
||||
dateFormat: "dd.mm.yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.be );
|
||||
|
||||
return datepicker.regional.be;
|
||||
|
||||
} ) );
|
||||
38
js/jquery/src/jquery-ui/i18n/datepicker-bg.js
vendored
Normal file
38
js/jquery/src/jquery-ui/i18n/datepicker-bg.js
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/* Bulgarian initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Stoyan Kyosev (http://svest.org). */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.bg = {
|
||||
closeText: "затвори",
|
||||
prevText: "<назад",
|
||||
nextText: "напред>",
|
||||
nextBigText: ">>",
|
||||
currentText: "днес",
|
||||
monthNames: [ "Януари","Февруари","Март","Април","Май","Юни",
|
||||
"Юли","Август","Септември","Октомври","Ноември","Декември" ],
|
||||
monthNamesShort: [ "Яну","Фев","Мар","Апр","Май","Юни",
|
||||
"Юли","Авг","Сеп","Окт","Нов","Дек" ],
|
||||
dayNames: [ "Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота" ],
|
||||
dayNamesShort: [ "Нед","Пон","Вто","Сря","Чет","Пет","Съб" ],
|
||||
dayNamesMin: [ "Не","По","Вт","Ср","Че","Пе","Съ" ],
|
||||
weekHeader: "Wk",
|
||||
dateFormat: "dd.mm.yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.bg );
|
||||
|
||||
return datepicker.regional.bg;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-bs.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-bs.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Bosnian i18n for the jQuery UI date picker plugin. */
|
||||
/* Written by Kenan Konjo. */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.bs = {
|
||||
closeText: "Zatvori",
|
||||
prevText: "<",
|
||||
nextText: ">",
|
||||
currentText: "Danas",
|
||||
monthNames: [ "Januar","Februar","Mart","April","Maj","Juni",
|
||||
"Juli","August","Septembar","Oktobar","Novembar","Decembar" ],
|
||||
monthNamesShort: [ "Jan","Feb","Mar","Apr","Maj","Jun",
|
||||
"Jul","Aug","Sep","Okt","Nov","Dec" ],
|
||||
dayNames: [ "Nedelja","Ponedeljak","Utorak","Srijeda","Četvrtak","Petak","Subota" ],
|
||||
dayNamesShort: [ "Ned","Pon","Uto","Sri","Čet","Pet","Sub" ],
|
||||
dayNamesMin: [ "Ne","Po","Ut","Sr","Če","Pe","Su" ],
|
||||
weekHeader: "Wk",
|
||||
dateFormat: "dd.mm.yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.bs );
|
||||
|
||||
return datepicker.regional.bs;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-ca.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-ca.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
|
||||
/* Writers: (joan.leon@gmail.com). */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.ca = {
|
||||
closeText: "Tanca",
|
||||
prevText: "Anterior",
|
||||
nextText: "Següent",
|
||||
currentText: "Avui",
|
||||
monthNames: [ "gener","febrer","març","abril","maig","juny",
|
||||
"juliol","agost","setembre","octubre","novembre","desembre" ],
|
||||
monthNamesShort: [ "gen","feb","març","abr","maig","juny",
|
||||
"jul","ag","set","oct","nov","des" ],
|
||||
dayNames: [ "diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte" ],
|
||||
dayNamesShort: [ "dg","dl","dt","dc","dj","dv","ds" ],
|
||||
dayNamesMin: [ "dg","dl","dt","dc","dj","dv","ds" ],
|
||||
weekHeader: "Set",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.ca );
|
||||
|
||||
return datepicker.regional.ca;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-cs.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-cs.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Czech initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Tomas Muller (tomas@tomas-muller.net). */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.cs = {
|
||||
closeText: "Zavřít",
|
||||
prevText: "<Dříve",
|
||||
nextText: "Později>",
|
||||
currentText: "Nyní",
|
||||
monthNames: [ "leden","únor","březen","duben","květen","červen",
|
||||
"červenec","srpen","září","říjen","listopad","prosinec" ],
|
||||
monthNamesShort: [ "led","úno","bře","dub","kvě","čer",
|
||||
"čvc","srp","zář","říj","lis","pro" ],
|
||||
dayNames: [ "neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota" ],
|
||||
dayNamesShort: [ "ne", "po", "út", "st", "čt", "pá", "so" ],
|
||||
dayNamesMin: [ "ne","po","út","st","čt","pá","so" ],
|
||||
weekHeader: "Týd",
|
||||
dateFormat: "dd.mm.yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.cs );
|
||||
|
||||
return datepicker.regional.cs;
|
||||
|
||||
} ) );
|
||||
45
js/jquery/src/jquery-ui/i18n/datepicker-cy-GB.js
vendored
Normal file
45
js/jquery/src/jquery-ui/i18n/datepicker-cy-GB.js
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by William Griffiths. */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional[ "cy-GB" ] = {
|
||||
closeText: "Done",
|
||||
prevText: "Prev",
|
||||
nextText: "Next",
|
||||
currentText: "Today",
|
||||
monthNames: [ "Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin",
|
||||
"Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr" ],
|
||||
monthNamesShort: [ "Ion", "Chw", "Maw", "Ebr", "Mai", "Meh",
|
||||
"Gor", "Aws", "Med", "Hyd", "Tac", "Rha" ],
|
||||
dayNames: [
|
||||
"Dydd Sul",
|
||||
"Dydd Llun",
|
||||
"Dydd Mawrth",
|
||||
"Dydd Mercher",
|
||||
"Dydd Iau",
|
||||
"Dydd Gwener",
|
||||
"Dydd Sadwrn"
|
||||
],
|
||||
dayNamesShort: [ "Sul", "Llu", "Maw", "Mer", "Iau", "Gwe", "Sad" ],
|
||||
dayNamesMin: [ "Su","Ll","Ma","Me","Ia","Gw","Sa" ],
|
||||
weekHeader: "Wy",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional[ "cy-GB" ] );
|
||||
|
||||
return datepicker.regional[ "cy-GB" ];
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-da.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-da.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Danish initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Jan Christensen ( deletestuff@gmail.com). */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.da = {
|
||||
closeText: "Luk",
|
||||
prevText: "<Forrige",
|
||||
nextText: "Næste>",
|
||||
currentText: "Idag",
|
||||
monthNames: [ "Januar","Februar","Marts","April","Maj","Juni",
|
||||
"Juli","August","September","Oktober","November","December" ],
|
||||
monthNamesShort: [ "Jan","Feb","Mar","Apr","Maj","Jun",
|
||||
"Jul","Aug","Sep","Okt","Nov","Dec" ],
|
||||
dayNames: [ "Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag" ],
|
||||
dayNamesShort: [ "Søn","Man","Tir","Ons","Tor","Fre","Lør" ],
|
||||
dayNamesMin: [ "Sø","Ma","Ti","On","To","Fr","Lø" ],
|
||||
weekHeader: "Uge",
|
||||
dateFormat: "dd-mm-yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.da );
|
||||
|
||||
return datepicker.regional.da;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-de.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-de.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* German initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Milian Wolff (mail@milianw.de). */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.de = {
|
||||
closeText: "Schließen",
|
||||
prevText: "<Zurück",
|
||||
nextText: "Vor>",
|
||||
currentText: "Heute",
|
||||
monthNames: [ "Januar","Februar","März","April","Mai","Juni",
|
||||
"Juli","August","September","Oktober","November","Dezember" ],
|
||||
monthNamesShort: [ "Jan","Feb","Mär","Apr","Mai","Jun",
|
||||
"Jul","Aug","Sep","Okt","Nov","Dez" ],
|
||||
dayNames: [ "Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag" ],
|
||||
dayNamesShort: [ "So","Mo","Di","Mi","Do","Fr","Sa" ],
|
||||
dayNamesMin: [ "So","Mo","Di","Mi","Do","Fr","Sa" ],
|
||||
weekHeader: "KW",
|
||||
dateFormat: "dd.mm.yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.de );
|
||||
|
||||
return datepicker.regional.de;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-el.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-el.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional.el = {
|
||||
closeText: "Κλείσιμο",
|
||||
prevText: "Προηγούμενος",
|
||||
nextText: "Επόμενος",
|
||||
currentText: "Σήμερα",
|
||||
monthNames: [ "Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος",
|
||||
"Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος" ],
|
||||
monthNamesShort: [ "Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν",
|
||||
"Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ" ],
|
||||
dayNames: [ "Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο" ],
|
||||
dayNamesShort: [ "Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ" ],
|
||||
dayNamesMin: [ "Κυ","Δε","Τρ","Τε","Πε","Πα","Σα" ],
|
||||
weekHeader: "Εβδ",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional.el );
|
||||
|
||||
return datepicker.regional.el;
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-en-AU.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-en-AU.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* English/Australia initialisation for the jQuery UI date picker plugin. */
|
||||
/* Based on the en-GB initialisation. */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional[ "en-AU" ] = {
|
||||
closeText: "Done",
|
||||
prevText: "Prev",
|
||||
nextText: "Next",
|
||||
currentText: "Today",
|
||||
monthNames: [ "January","February","March","April","May","June",
|
||||
"July","August","September","October","November","December" ],
|
||||
monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ],
|
||||
dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
|
||||
dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
|
||||
dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ],
|
||||
weekHeader: "Wk",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional[ "en-AU" ] );
|
||||
|
||||
return datepicker.regional[ "en-AU" ];
|
||||
|
||||
} ) );
|
||||
37
js/jquery/src/jquery-ui/i18n/datepicker-en-GB.js
vendored
Normal file
37
js/jquery/src/jquery-ui/i18n/datepicker-en-GB.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* English/UK initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Stuart. */
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "../widgets/datepicker" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery.datepicker );
|
||||
}
|
||||
}( function( datepicker ) {
|
||||
|
||||
datepicker.regional[ "en-GB" ] = {
|
||||
closeText: "Done",
|
||||
prevText: "Prev",
|
||||
nextText: "Next",
|
||||
currentText: "Today",
|
||||
monthNames: [ "January","February","March","April","May","June",
|
||||
"July","August","September","October","November","December" ],
|
||||
monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ],
|
||||
dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
|
||||
dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
|
||||
dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ],
|
||||
weekHeader: "Wk",
|
||||
dateFormat: "dd/mm/yy",
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: "" };
|
||||
datepicker.setDefaults( datepicker.regional[ "en-GB" ] );
|
||||
|
||||
return datepicker.regional[ "en-GB" ];
|
||||
|
||||
} ) );
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user