| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/js.zip |
PK \_"]c?�VH H admin-modules-modal.min.jsnu &1i� document.addEventListener('DOMContentLoaded',function(){'use strict';var b,a=document.querySelectorAll('.js-module-insert'),c=document.querySelectorAll('.js-position-insert');for(b=0;a.length>b;b++)a[b].addEventListener('click',function(d){d.preventDefault();var e=d.target.getAttribute('data-module'),f=d.target.getAttribute('data-editor');window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(f)?window.parent.Joomla.editors.instances[f].replaceSelection('{loadmoduleid '+e+'}'):window.parent.jInsertEditorText('{loadmoduleid '+e+'}',f),window.parent.jModalClose()});for(b=0;c.length>b;b++)c[b].addEventListener('click',function(d){d.preventDefault();var e=d.target.getAttribute('data-position'),f=d.target.getAttribute('data-editor');window.Joomla&&window.Joomla.editors&&Joomla.editors.instances&&Joomla.editors.instances.hasOwnProperty(f)?Joomla.editors.instances[f].replaceSelection('{loadposition '+e+'}'):window.parent.jInsertEditorText('{loadposition '+e+'}',f),window.parent.jModalClose()})});
PK \_"]`ŭq q admin-modules-modal.jsnu &1i� /**
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
document.addEventListener('DOMContentLoaded', function() {
"use strict";
/** Get the elements **/
var modulesLinks = document.querySelectorAll('.js-module-insert'), i,
positionsLinks = document.querySelectorAll('.js-position-insert');
/** Assign listener for click event (for single module id insertion) **/
for (i= 0; modulesLinks.length > i; i++) {
modulesLinks[i].addEventListener('click', function(event) {
event.preventDefault();
var modid = event.target.getAttribute('data-module'),
editor = event.target.getAttribute('data-editor');
/** Use the API, if editor supports it **/
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection("{loadmoduleid " + modid + "}")
} else {
window.parent.jInsertEditorText("{loadmoduleid " + modid + "}", editor);
}
window.parent.jModalClose();
});
}
/** Assign listener for click event (for position insertion) **/
for (i= 0; positionsLinks.length > i; i++) {
positionsLinks[i].addEventListener('click', function(event) {
event.preventDefault();
var position = event.target.getAttribute('data-position'),
editor = event.target.getAttribute('data-editor');
/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection("{loadposition " + position + "}")
} else {
window.parent.jInsertEditorText("{loadposition " + position + "}", editor);
}
window.parent.jModalClose();
});
}
});
PK �`"]�U��{( {( tinymce-builder.jsnu &1i� /**
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
;(function($) {
"use strict";
/**
* Fake TinyMCE object to allow to use TinyMCE translation for the button labels
*
* @since 3.7.0
*/
window.tinymce = {
langCode: 'en',
langStrings: {},
addI18n: function (code, strings){
this.langCode = code;
this.langStrings = strings || {};
},
translate: function (string){
return this.langStrings[string] ? this.langStrings[string] : string;
}
};
/**
* Joomla TinyMCE Builder
*
* @param {HTMLElement} container
* @param {Object} options
* @constructor
*
* @since 3.7.0
*/
var JoomlaTinyMCEBuilder = function(container, options) {
this.$container = $(container);
this.options = options;
// Find source containers
this.$sourceMenu = this.$container.find('.tinymce-builder-menu.source');
this.$sourceToolbar = this.$container.find('.tinymce-builder-toolbar.source');
// Find target containers
this.$targetMenu = this.$container.find('.tinymce-builder-menu.target');
this.$targetToolbar = this.$container.find('.tinymce-builder-toolbar.target');
// Render Source elements
this.$sourceMenu.each(function(i, element){
this.renderBar(element, 'menu');
}.bind(this));
this.$sourceToolbar.each(function(i, element){
this.renderBar(element, 'toolbar');
}.bind(this));
// Render Target elements
this.$targetMenu.each(function(i, element){
this.renderBar(element, 'menu', null, true);
}.bind(this));
this.$targetToolbar.each(function(i, element){
this.renderBar(element, 'toolbar', null, true);
}.bind(this));
// Set up "drag&drop" stuff
var $copyHelper = null, removeIntent = false, self = this;
this.$sourceMenu.sortable({
connectWith: this.$targetMenu,
items: '.mce-btn',
cancel: '',
placeholder: 'mce-btn ui-state-highlight',
start: function(event, ui) {
self.$targetMenu.addClass('drop-area-highlight');
},
helper: function(event, el) {
$copyHelper = el.clone().insertAfter(el);
return el;
},
stop: function() {
$copyHelper && $copyHelper.remove();
self.$targetMenu.removeClass('drop-area-highlight');
}
});
this.$sourceToolbar.sortable({
connectWith: this.$targetToolbar,
items: '.mce-btn',
cancel: '',
placeholder: 'mce-btn ui-state-highlight',
start: function(event, ui) {
self.$targetToolbar.addClass('drop-area-highlight');
},
helper: function(event, el) {
$copyHelper = el.clone().insertAfter(el);
return el;
},
stop: function() {
$copyHelper && $copyHelper.remove();
self.$targetToolbar.removeClass('drop-area-highlight');
}
});
$().add(this.$targetMenu).add(this.$targetToolbar).sortable({
items: '.mce-btn',
cancel: '',
placeholder: 'mce-btn ui-state-highlight',
receive: function(event, ui) {
$copyHelper = null;
var $el = ui.item, $cont = $(this);
self.appendInput($el, $cont.data('group'), $cont.data('set'))
},
over: function (event, ui) {
removeIntent = false;
},
out: function (event, ui) {
removeIntent = true;
},
beforeStop: function (event, ui) {
if(removeIntent){
ui.item.remove();
}
}
});
// Bind actions buttons
this.$container.on('click', '.button-action', function(event){
var $btn = $(event.target), action = $btn.data('action'), options = $btn.data();
if (this[action]) {
this[action].call(this, options);
} else {
throw new Error('Unsupported action ' + action);
}
}.bind(this));
};
/**
* Render the toolbar/menubar
*
* @param {HTMLElement} container The toolbar container
* @param {String} type The type toolbar or menu
* @param {Array|null} value The value
* @param {Boolean} withInput Whether append input
*
* @since 3.7.0
*/
JoomlaTinyMCEBuilder.prototype.renderBar = function(container, type, value, withInput) {
var $container = $(container),
group = $container.data('group'),
set = $container.data('set'),
items = type === 'menu' ? this.options.menus : this.options.buttons,
value = value ? value : ($container.data('value') || []),
item, name, $btn;
for ( var i = 0, l = value.length; i < l; i++ ) {
name = value[i];
item = items[name];
if (!item) {
continue;
}
$btn = this.createButton(name, item, type);
$container.append($btn);
// Enable tooltip
if ($btn.tooltip) {
$btn.tooltip({trigger: 'hover'});
}
// Add input
if (withInput) {
this.appendInput($btn, group, set);
}
}
};
/**
* Create the element needed for renderBar()
* @param {String} name
* @param {Object} info
* @param {String} type
*
* @return {jQuery}
*
* @since 3.7.0
*/
JoomlaTinyMCEBuilder.prototype.createButton = function(name, info, type){
var $element = $('<div />', {
'class': 'mce-btn',
'data-name': name,
'data-toggle': 'tooltip',
'title': tinymce.translate(info.label)
});
var $btn = $('<button/>', {
'type': 'button'
});
$element.append($btn);
if (type === 'menu') {
$btn.html('<span class="mce-txt">' + tinymce.translate(info.label) + '</span> <i class="mce-caret"></i>');
} else {
$element.addClass('mce-btn-small');
$btn.html(info.text ? tinymce.translate(info.text) : '<i class="mce-ico mce-i-' + name + '"></i>');
}
return $element;
};
/**
* Append input to the button item
* @param {HTMLElement} element
* @param {String} group
* @param {String} set
*
* @since 3.7.0
*/
JoomlaTinyMCEBuilder.prototype.appendInput = function (element, group, set) {
var $el = $(element),
name = this.options.formControl + '[' + set + '][' + group + '][]',
$input = $('<input/>', {
type: 'hidden',
name: name,
value: $el.data('name')
});
$el.append($input);
};
/**
* Set Selected preset to specific set
* @param {Object} options Options {set: 1, preset: 'presetName'}
*/
JoomlaTinyMCEBuilder.prototype.setPreset = function (options) {
var set = options.set, preset = this.options.toolbarPreset[options.preset] || null;
if (!preset) {
throw new Error('Unknown Preset "' + options.preset + '"');
}
var $container, type;
for (var group in preset) {
if (!preset.hasOwnProperty(group)) {
continue;
}
// Find correct container for current set
if (group === 'menu') {
type = 'menu';
$container = this.$targetMenu.filter('[data-group="' + group + '"][data-set="' + set + '"]');
} else {
type = 'toolbar'
$container = this.$targetToolbar.filter('[data-group="' + group + '"][data-set="' + set + '"]');
}
// Reset existing values
$container.empty();
// Set new
this.renderBar($container, type, preset[group], true);
}
};
/**
* Clear the pane for specific set
* @param {Object} options Options {set: 1}
*/
JoomlaTinyMCEBuilder.prototype.clearPane = function (options) {
var set = options.set;
this.$targetMenu.filter('[data-set="' + set + '"]').empty();
this.$targetToolbar.filter('[data-set="' + set + '"]').empty();
};
// Init the builder
$(document).ready(function(){
var options = Joomla.getOptions ? Joomla.getOptions('plg_editors_tinymce_builder', {})
: (Joomla.optionsStorage.plg_editors_tinymce_builder || {});
new JoomlaTinyMCEBuilder($('#joomla-tinymce-builder'), options);
$("#set-tabs a").on('click', function (event) {
event.preventDefault();
$(this).tab("show");
});
// Allow to select the group only once per the set
var $accessSelects = $('#joomla-tinymce-builder').find('.access-select');
toggleAvailableOption();
$accessSelects.on('change', function () {
toggleAvailableOption();
});
function toggleAvailableOption () {
$accessSelects.find('option[disabled]').removeAttr('disabled');
// Disable already selected options
$accessSelects.each(function () {
var $select = $(this), val = $select.val() || [], query = [],
$options = $accessSelects.not(this).find('option');
for (var i = 0, l = val.length; i < l; i++ ) {
if (!val[i]) continue;
query.push('[value="' + val[i] + '"]');
}
if (query.length) {
$options.filter(query.join(',')).attr('disabled', 'disabled');
}
});
// Update Chosen
$accessSelects.trigger('liszt:updated');
}
});
}(jQuery));
PK �`"]��]� � tiny-close.min.jsnu &1i� document.addEventListener("DOMContentLoaded",function(){"undefined"==typeof window.jModalClose_no_tinyMCE&&(window.jModalClose_no_tinyMCE="function"==typeof jModalClose&&jModalClose,jModalClose=function(){window.jModalClose_no_tinyMCE&&window.jModalClose_no_tinyMCE.apply(this,arguments),tinyMCE.activeEditor.windowManager.close()}),"undefined"==typeof window.SqueezeBoxClose_no_tinyMCE&&("undefined"==typeof SqueezeBox&&(SqueezeBox={}),window.SqueezeBoxClose_no_tinyMCE="function"==typeof SqueezeBox.close&&SqueezeBox.close,SqueezeBox.close=function(){window.SqueezeBoxClose_no_tinyMCE&&window.SqueezeBoxClose_no_tinyMCE.apply(this,arguments),tinyMCE.activeEditor.windowManager.close()})});
PK �`"]Z\
�� � plugins/dragdrop/plugin.min.jsnu &1i� tinymce.PluginManager.add("jdragdrop",function(e){function t(t){var r=new FormData;r.append("Filedata",t),r.append("folder",tinyMCE.activeEditor.settings.mediaUploadPath);var n=new XMLHttpRequest;n.upload.onprogress=function(e){var t=e.loaded/e.total*100;document.querySelector(".bar").style.width=t+"%"},removeProgessBar=function(){setTimeout(function(){var t=document.querySelector("#jloader");t.parentNode.removeChild(t),e.contentAreaContainer.style.borderWidth="1px 0 0 0"},200)},n.onload=function(){var t=JSON.parse(n.responseText);if(200==n.status){if("0"==t.status&&(removeProgessBar(),e.windowManager.alert(t.message+": "+tinyMCE.activeEditor.settings.setCustomDir+t.location)),"1"==t.status){removeProgessBar();var r=tinyMCE.activeEditor.getDoc().createElement("img");r.src=tinyMCE.activeEditor.settings.setCustomDir+t.location,tinyMCE.activeEditor.execCommand("mceInsertContent",!1,r.outerHTML)}}else removeProgessBar()},n.onerror=function(){removeProgessBar()},n.open("POST",tinyMCE.activeEditor.settings.uploadUri,!0),n.send(r)}tinyMCE.DOM.bind(document,"dragleave",function(e){return e.stopPropagation(),e.preventDefault(),tinyMCE.activeEditor.contentAreaContainer.style.borderWidth="1px 0 0",!1}),"undefined"!=typeof FormData?(e.on("dragenter",function(e){return e.stopPropagation(),!1}),e.on("dragover",function(t){return t.preventDefault(),e.contentAreaContainer.style.borderStyle="dashed",e.contentAreaContainer.style.borderWidth="5px",!1}),e.on("drop",function(r){if(r.dataTransfer&&r.dataTransfer.files&&r.dataTransfer.files.length>0)for(var n,a=0;n=r.dataTransfer.files[a];a++){if(n.name.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)){var o,i,s="";(o=document.createElement("div")).id="jloader",(i=document.createElement("div")).classList.add("progress"),i.classList.add("progress-success"),i.classList.add("progress-striped"),i.classList.add("active"),i.style.width="100%",i.style.height="30px",(s=document.createElement("div")).classList.add("bar"),s.style.width="0",i.appendChild(s),o.appendChild(i),document.querySelector(".mce-toolbar-grp").appendChild(o),t(n)}r.preventDefault()}e.contentAreaContainer.style.borderWidth="1px 0 0"})):(Joomla.renderMessages({error:[Joomla.JText._("PLG_TINY_ERR_UNSUPPORTEDBROWSER")]}),e.on("drop",function(e){return e.preventDefault(),!1}))});PK �`"]���� plugins/dragdrop/plugin.jsnu &1i� tinymce.PluginManager.add('jdragdrop', function(editor) {
// Reset the drop area border
tinyMCE.DOM.bind(document, 'dragleave', function(e) {
e.stopPropagation();
e.preventDefault();
tinyMCE.activeEditor.contentAreaContainer.style.borderWidth = '1px 0 0';
return false;
});
// The upload logic
function UploadFile(file) {
var fd = new FormData();
fd.append('Filedata', file);
fd.append('folder', tinyMCE.activeEditor.settings.mediaUploadPath);
var xhr = new XMLHttpRequest();
xhr.upload.onprogress = function(e) {
var percentComplete = (e.loaded / e.total) * 100;
document.querySelector('.bar').style.width = percentComplete + '%';
};
removeProgessBar = function(){
setTimeout(function(){
var loader = document.querySelector('#jloader');
loader.parentNode.removeChild(loader);
editor.contentAreaContainer.style.borderWidth = '1px 0 0 0';
}, 200);
};
xhr.onload = function() {
var resp = JSON.parse(xhr.responseText);
if (xhr.status == 200) {
if (resp.status == '0') {
removeProgessBar();
editor.windowManager.alert(resp.message + ': ' + tinyMCE.activeEditor.settings.setCustomDir + resp.location);
}
if (resp.status == '1') {
removeProgessBar();
// Create the image tag
var newNode = tinyMCE.activeEditor.getDoc().createElement ('img');
newNode.src= tinyMCE.activeEditor.settings.setCustomDir + resp.location;
tinyMCE.activeEditor.execCommand('mceInsertContent', false, newNode.outerHTML);
}
} else {
removeProgessBar();
}
};
xhr.onerror = function() {
removeProgessBar();
};
xhr.open("POST", tinyMCE.activeEditor.settings.uploadUri, true);
xhr.send(fd);
}
// Listers for drag and drop
if (typeof FormData != 'undefined'){
// Fix for Chrome
editor.on('dragenter', function(e) {
e.stopPropagation();
return false;
});
// Notify user when file is over the drop area
editor.on('dragover', function(e) {
e.preventDefault();
editor.contentAreaContainer.style.borderStyle = 'dashed';
editor.contentAreaContainer.style.borderWidth = '5px';
return false;
});
// Logic for the dropped file
editor.on('drop', function(e) {
// We override only for files
if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length > 0) {
for (var i = 0, f; f = e.dataTransfer.files[i]; i++) {
// Only images allowed
if (f.name.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)) {
// Create and display the progress bar
var container, innerDiv, progressBar = '';
container = document.createElement('div');
container.id = 'jloader';
innerDiv = document.createElement('div');
innerDiv.classList.add('progress');
innerDiv.classList.add('progress-success');
innerDiv.classList.add('progress-striped');
innerDiv.classList.add('active');
innerDiv.style.width = '100%';
innerDiv.style.height = '30px';
progressBar = document.createElement('div');
progressBar.classList.add('bar');
progressBar.style.width = '0';
innerDiv.appendChild(progressBar);
container.appendChild(innerDiv);
document.querySelector('.mce-toolbar-grp').appendChild(container);
// Upload the file(s)
UploadFile(f);
}
e.preventDefault();
}
}
editor.contentAreaContainer.style.borderWidth = '1px 0 0';
});
} else {
Joomla.renderMessages({'error': [Joomla.JText._("PLG_TINY_ERR_UNSUPPORTEDBROWSER")]});
editor.on('drop', function(e) {
e.preventDefault();
return false;
});
}
});
PK �`"] F<*� �
tiny-close.jsnu &1i� /**
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* This is used by tinyMCE in order to allow both mootools and bootstrap modals
* to close correctly, more tinyMCE related functionality maybe added in the future
*
* @package Joomla
* @since 3.5.1
* @version 1.0
*/
document.addEventListener('DOMContentLoaded', function () {
if (typeof window.jModalClose_no_tinyMCE === 'undefined')
{
window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function' ? jModalClose : false;
jModalClose = function () {
if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments);
tinyMCE.activeEditor.windowManager.close();
};
}
if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined')
{
if (typeof(SqueezeBox) == 'undefined') SqueezeBox = {};
window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function' ? SqueezeBox.close : false;
SqueezeBox.close = function () {
if (window.SqueezeBoxClose_no_tinyMCE) window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments);
tinyMCE.activeEditor.windowManager.close();
};
}
});
PK �`"]�*P=^ ^
tinymce.jsnu &1i� /**
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
;(function(tinyMCE, Joomla, window, document){
"use strict";
// This line is for Mootools b/c
window.getSize = window.getSize || function(){return {x: window.innerWidth, y: window.innerHeight};};
// @deprecated 4.0 Use directly Joomla.editors.instances[editor].replaceSelection(text);
window.jInsertEditorText = function ( text, editor ) {
Joomla.editors.instances[editor].replaceSelection(text);
};
var JoomlaTinyMCE = {
/**
* Find all TinyMCE elements and initialize TinyMCE instance for each
*
* @param {HTMLElement} target Target Element where to search for the editor element
*
* @since 3.7.0
*/
setupEditors: function ( target ) {
target = target || document;
var pluginOptions = Joomla.getOptions ? Joomla.getOptions('plg_editor_tinymce', {})
: (Joomla.optionsStorage.plg_editor_tinymce || {}),
editors = target.querySelectorAll('.js-editor-tinymce');
for(var i = 0, l = editors.length; i < l; i++) {
var editor = editors[i].querySelector('textarea');
this.setupEditor(editor, pluginOptions);
}
},
/**
* Initialize TinyMCE editor instance
*
* @param {HTMLElement} element
* @param {Object} pluginOptions
*
* @since 3.7.0
*/
setupEditor: function ( element, pluginOptions ) {
var name = element ? element.getAttribute('name').replace(/\[\]|\]/g, '').split('[').pop() : 'default', // Get Editor name
tinyMCEOptions = pluginOptions ? pluginOptions.tinyMCE || {} : {},
defaultOptions = tinyMCEOptions['default'] || {},
options = tinyMCEOptions[name] ? tinyMCEOptions[name] : defaultOptions; // Check specific options by the name
// Avoid an unexpected changes, and copy the options object
if (options.joomlaMergeDefaults) {
options = Joomla.extend(Joomla.extend({}, defaultOptions), options);
} else {
options = Joomla.extend({}, options);
}
if (element) {
// We already have the Target, so reset the selector and assign given element as target
options.selector = null;
options.target = element;
var oldEditor = tinymce.get(element.id);
if (oldEditor) {
oldEditor.remove();
delete Joomla.editors.instances[element.id];
}
}
// @TODO: the ext-buttons should be as TinyMCE plugins, not the callback hack
if (options.joomlaExtButtons && options.joomlaExtButtons.names && options.joomlaExtButtons.names.length) {
options.toolbar1 += ' | ' + options.joomlaExtButtons.names.join(' ');
var callbackString = options.joomlaExtButtons.script.join(';');
options.setupCallbackString = options.setupCallbackString || '';
options.setupCallbackString = options.setupCallbackString + ';' + callbackString;
options.joomlaExtButtons = null;
}
if (options.setupCallbackString && !options.setup) {
options.setup = new Function('editor', options.setupCallbackString);
}
// Create a new instance
var ed = new tinyMCE.Editor(element.id, options, tinymce.EditorManager);
ed.render();
/** Register the editor's instance to Joomla Object */
Joomla.editors.instances[element.id] = {
// Required by Joomla's API for the XTD-Buttons
'getValue': function () { return this.instance.getContent(); },
'setValue': function (text) { return this.instance.setContent(text); },
'getSelection': function () { return this.instance.selection.getContent({format: 'text'}); },
'replaceSelection': function (text) { return this.instance.execCommand('mceInsertContent', false, text); },
// Some extra instance dependent
'id': element.id,
'instance': ed,
'onSave': function() { if (this.instance.isHidden()) { this.instance.show()}; return '';},
};
/** On save **/
document.getElementById(ed.id).form.addEventListener('submit', function() {
Joomla.editors.instances[ed.targetElm.id].onSave();
})
}
};
Joomla.JoomlaTinyMCE = JoomlaTinyMCE;
// Init on DOMContentLoaded
document.addEventListener('DOMContentLoaded', function () {
Joomla.JoomlaTinyMCE.setupEditors();
// Init in subform field
if(window.jQuery) {
jQuery(document).on('subform-row-add', function (event, row) {
Joomla.JoomlaTinyMCE.setupEditors(row);
});
// Watch on jQuery UI sortable,
// Browser will clear iframe content when DOM changes, so we need to re-init an editors in changed Element
jQuery(document).on('sortstop', function(event, ui){
if (ui.item[0]) {
Joomla.JoomlaTinyMCE.setupEditors(ui.item[0]);
}
});
}
});
}(tinyMCE, Joomla, window, document));
PK �`"]��0 0 tinymce.min.jsnu &1i� (function(l,c,t,d){"use strict";t.getSize=t.getSize||function(){return{x:t.innerWidth,y:t.innerHeight}};t.jInsertEditorText=function(t,e){c.editors.instances[e].replaceSelection(t)};var e={setupEditors:function(t){t=t||d;var e=c.getOptions?c.getOptions("plg_editor_tinymce",{}):c.optionsStorage.plg_editor_tinymce||{},n=t.querySelectorAll(".js-editor-tinymce");for(var i=0,o=n.length;i<o;i++){var r=n[i].querySelector("textarea");this.setupEditor(r,e)}},setupEditor:function(t,e){var n=t?t.getAttribute("name").replace(/\[\]|\]/g,"").split("[").pop():"default",i=e?e.tinyMCE||{}:{},o=i["default"]||{},r=i[n]?i[n]:o;if(r.joomlaMergeDefaults){r=c.extend(c.extend({},o),r)}else{r=c.extend({},r)}if(t){r.selector=null;r.target=t;var s=tinymce.get(t.id);if(s){s.remove();delete c.editors.instances[t.id]}}if(r.joomlaExtButtons&&r.joomlaExtButtons.names&&r.joomlaExtButtons.names.length){r.toolbar1+=" | "+r.joomlaExtButtons.names.join(" ");var a=r.joomlaExtButtons.script.join(";");r.setupCallbackString=r.setupCallbackString||"";r.setupCallbackString=r.setupCallbackString+";"+a;r.joomlaExtButtons=null}if(r.setupCallbackString&&!r.setup){r.setup=new Function("editor",r.setupCallbackString)}var u=new l.Editor(t.id,r,tinymce.EditorManager);u.render();c.editors.instances[t.id]={getValue:function(){return this.instance.getContent()},setValue:function(t){return this.instance.setContent(t)},getSelection:function(){return this.instance.selection.getContent({format:"text"})},replaceSelection:function(t){return this.instance.execCommand("mceInsertContent",false,t)},id:t.id,instance:u,onSave:function(){if(this.instance.isHidden()){this.instance.show()}return""}};d.getElementById(u.id).form.addEventListener("submit",function(){c.editors.instances[u.targetElm.id].onSave()})}};c.JoomlaTinyMCE=e;d.addEventListener("DOMContentLoaded",function(){c.JoomlaTinyMCE.setupEditors();if(t.jQuery){jQuery(d).on("subform-row-add",function(t,e){c.JoomlaTinyMCE.setupEditors(e)});jQuery(d).on("sortstop",function(t,e){if(e.item[0]){c.JoomlaTinyMCE.setupEditors(e.item[0])}})}})})(tinyMCE,Joomla,window,document);PK �a"]��J�� � none.min.jsnu &1i� !function(i,e,o){e.jInsertEditorText=function(e,t){i.editors.instances[t].replaceSelection(e)},o.addEventListener("DOMContentLoaded",function(){for(var e=o.querySelectorAll(".js-editor-none"),t=0,n=e.length;t<n;t++)i.editors.instances[e[t].childNodes[0].id]={id:e[t].childNodes[0].id,element:e[t].childNodes[0],getValue:function(){return this.element.value},setValue:function(e){return this.element.value=e},getSelection:function(){return e=this.element,o.selection?(e.focus(),o.selection.createRange()):e.selectionStart||0===e.selectionStart?e.value.substring(e.selectionStart,e.selectionEnd):e.value;var e},replaceSelection:function(e){return t=this.element,n=e,void(o.selection?(t.focus(),o.selection.createRange().text=n):t.selectionStart||0===t.selectionStart?t.value=t.value.substring(0,t.selectionStart)+n+t.value.substring(t.selectionEnd,t.value.length):t.value+=n);var t,n},onSave:function(){return""}}})}(Joomla,window,document);
PK �a"]ּ�� � none.jsnu &1i� /**
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* Editor None
*/
;(function(Joomla, window, document){
function insertAtCursor(myField, myValue) {
if (document.selection) {
// IE support
myField.focus();
var sel = document.selection.createRange();
sel.text = myValue;
} else if (myField.selectionStart || myField.selectionStart === 0) {
// MOZILLA/NETSCAPE support
myField.value = myField.value.substring(0, myField.selectionStart)
+ myValue
+ myField.value.substring(myField.selectionEnd, myField.value.length);
} else {
myField.value += myValue;
}
}
function getSelection(myField) {
if (document.selection) {
// IE support
myField.focus();
return document.selection.createRange();
} else if (myField.selectionStart || myField.selectionStart === 0) {
// MOZILLA/NETSCAPE support
return myField.value.substring(myField.selectionStart, myField.selectionEnd);
} else {
return myField.value;
}
}
// @deprecated 4.0 Use directly Joomla.editors.instances[editor].replaceSelection(text);
window.jInsertEditorText = function(text, editor) {
Joomla.editors.instances[editor].replaceSelection(text);
};
document.addEventListener('DOMContentLoaded', function() {
var editors = document.querySelectorAll('.js-editor-none');
for(var i = 0, l = editors.length; i < l; i++) {
/** Register Editor */
Joomla.editors.instances[editors[i].childNodes[0].id] = {
'id': editors[i].childNodes[0].id,
'element': editors[i].childNodes[0],
'getValue': function () { return this.element.value; },
'setValue': function (text) { return this.element.value = text; },
'getSelection': function () { return getSelection(this.element); },
'replaceSelection': function (text) { return insertAtCursor(this.element, text); },
'onSave': function() { return ''; }
};
}
});
}(Joomla, window, document));
PK Vf"]}��$҃ ҃ jquery.autocomplete.jsnu &1i� /**
* Ajax Autocomplete for jQuery, version 1.4.11
* (c) 2017 Tomas Kirda
*
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
*/
/*jslint browser: true, white: true, single: true, this: true, multivar: true */
/*global define, window, document, jQuery, exports, require */
// Expose plugin as an AMD module if AMD loader is present:
(function (factory) {
"use strict";
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof exports === 'object' && typeof require === 'function') {
// Browserify
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
'use strict';
var
utils = (function () {
return {
escapeRegExChars: function (value) {
return value.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
},
createNode: function (containerClass) {
var div = document.createElement('div');
div.className = containerClass;
div.style.position = 'absolute';
div.style.display = 'none';
return div;
}
};
}()),
keys = {
ESC: 27,
TAB: 9,
RETURN: 13,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40
},
noop = $.noop;
function Autocomplete(el, options) {
var that = this;
// Shared variables:
that.element = el;
that.el = $(el);
that.suggestions = [];
that.badQueries = [];
that.selectedIndex = -1;
that.currentValue = that.element.value;
that.timeoutId = null;
that.cachedResponse = {};
that.onChangeTimeout = null;
that.onChange = null;
that.isLocal = false;
that.suggestionsContainer = null;
that.noSuggestionsContainer = null;
that.options = $.extend(true, {}, Autocomplete.defaults, options);
that.classes = {
selected: 'autocomplete-selected',
suggestion: 'autocomplete-suggestion'
};
that.hint = null;
that.hintValue = '';
that.selection = null;
// Initialize and set options:
that.initialize();
that.setOptions(options);
}
Autocomplete.utils = utils;
$.Autocomplete = Autocomplete;
Autocomplete.defaults = {
ajaxSettings: {},
autoSelectFirst: false,
appendTo: 'body',
serviceUrl: null,
lookup: null,
onSelect: null,
onHint: null,
width: 'auto',
minChars: 1,
maxHeight: 300,
deferRequestBy: 0,
params: {},
formatResult: _formatResult,
formatGroup: _formatGroup,
delimiter: null,
zIndex: 9999,
type: 'GET',
noCache: false,
onSearchStart: noop,
onSearchComplete: noop,
onSearchError: noop,
preserveInput: false,
containerClass: 'autocomplete-suggestions',
tabDisabled: false,
dataType: 'text',
currentRequest: null,
triggerSelectOnValidInput: true,
preventBadQueries: true,
lookupFilter: _lookupFilter,
paramName: 'query',
transformResult: _transformResult,
showNoSuggestionNotice: false,
noSuggestionNotice: 'No results',
orientation: 'bottom',
forceFixPosition: false
};
function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
return suggestion.value.toLowerCase().indexOf(queryLowerCase) !== -1;
};
function _transformResult(response) {
return typeof response === 'string' ? $.parseJSON(response) : response;
};
function _formatResult(suggestion, currentValue) {
// Do not replace anything if the current value is empty
if (!currentValue) {
return suggestion.value;
}
var pattern = '(' + utils.escapeRegExChars(currentValue) + ')';
return suggestion.value
.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>')
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/<(\/?strong)>/g, '<$1>');
};
function _formatGroup(suggestion, category) {
return '<div class="autocomplete-group">' + category + '</div>';
};
Autocomplete.prototype = {
initialize: function () {
var that = this,
suggestionSelector = '.' + that.classes.suggestion,
selected = that.classes.selected,
options = that.options,
container;
that.element.setAttribute('autocomplete', 'off');
// html() deals with many types: htmlString or Element or Array or jQuery
that.noSuggestionsContainer = $('<div class="autocomplete-no-suggestion"></div>')
.html(this.options.noSuggestionNotice).get(0);
that.suggestionsContainer = Autocomplete.utils.createNode(options.containerClass);
container = $(that.suggestionsContainer);
container.appendTo(options.appendTo || 'body');
// Only set width if it was provided:
if (options.width !== 'auto') {
container.css('width', options.width);
}
// Listen for mouse over event on suggestions list:
container.on('mouseover.autocomplete', suggestionSelector, function () {
that.activate($(this).data('index'));
});
// Deselect active element when mouse leaves suggestions container:
container.on('mouseout.autocomplete', function () {
that.selectedIndex = -1;
container.children('.' + selected).removeClass(selected);
});
// Listen for click event on suggestions list:
container.on('click.autocomplete', suggestionSelector, function () {
that.select($(this).data('index'));
});
container.on('click.autocomplete', function () {
clearTimeout(that.blurTimeoutId);
})
that.fixPositionCapture = function () {
if (that.visible) {
that.fixPosition();
}
};
$(window).on('resize.autocomplete', that.fixPositionCapture);
that.el.on('keydown.autocomplete', function (e) { that.onKeyPress(e); });
that.el.on('keyup.autocomplete', function (e) { that.onKeyUp(e); });
that.el.on('blur.autocomplete', function () { that.onBlur(); });
that.el.on('focus.autocomplete', function () { that.onFocus(); });
that.el.on('change.autocomplete', function (e) { that.onKeyUp(e); });
that.el.on('input.autocomplete', function (e) { that.onKeyUp(e); });
},
onFocus: function () {
var that = this;
if (that.disabled) {
return;
}
that.fixPosition();
if (that.el.val().length >= that.options.minChars) {
that.onValueChange();
}
},
onBlur: function () {
var that = this,
options = that.options,
value = that.el.val(),
query = that.getQuery(value);
// If user clicked on a suggestion, hide() will
// be canceled, otherwise close suggestions
that.blurTimeoutId = setTimeout(function () {
that.hide();
if (that.selection && that.currentValue !== query) {
(options.onInvalidateSelection || $.noop).call(that.element);
}
}, 200);
},
abortAjax: function () {
var that = this;
if (that.currentRequest) {
that.currentRequest.abort();
that.currentRequest = null;
}
},
setOptions: function (suppliedOptions) {
var that = this,
options = $.extend({}, that.options, suppliedOptions);
that.isLocal = Array.isArray(options.lookup);
if (that.isLocal) {
options.lookup = that.verifySuggestionsFormat(options.lookup);
}
options.orientation = that.validateOrientation(options.orientation, 'bottom');
// Adjust height, width and z-index:
$(that.suggestionsContainer).css({
'max-height': options.maxHeight + 'px',
'width': options.width + 'px',
'z-index': options.zIndex
});
this.options = options;
},
clearCache: function () {
this.cachedResponse = {};
this.badQueries = [];
},
clear: function () {
this.clearCache();
this.currentValue = '';
this.suggestions = [];
},
disable: function () {
var that = this;
that.disabled = true;
clearTimeout(that.onChangeTimeout);
that.abortAjax();
},
enable: function () {
this.disabled = false;
},
fixPosition: function () {
// Use only when container has already its content
var that = this,
$container = $(that.suggestionsContainer),
containerParent = $container.parent().get(0);
// Fix position automatically when appended to body.
// In other cases force parameter must be given.
if (containerParent !== document.body && !that.options.forceFixPosition) {
return;
}
// Choose orientation
var orientation = that.options.orientation,
containerHeight = $container.outerHeight(),
height = that.el.outerHeight(),
offset = that.el.offset(),
styles = { 'top': offset.top, 'left': offset.left };
if (orientation === 'auto') {
var viewPortHeight = $(window).height(),
scrollTop = $(window).scrollTop(),
topOverflow = -scrollTop + offset.top - containerHeight,
bottomOverflow = scrollTop + viewPortHeight - (offset.top + height + containerHeight);
orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';
}
if (orientation === 'top') {
styles.top += -containerHeight;
} else {
styles.top += height;
}
// If container is not positioned to body,
// correct its position using offset parent offset
if(containerParent !== document.body) {
var opacity = $container.css('opacity'),
parentOffsetDiff;
if (!that.visible){
$container.css('opacity', 0).show();
}
parentOffsetDiff = $container.offsetParent().offset();
styles.top -= parentOffsetDiff.top;
styles.top += containerParent.scrollTop;
styles.left -= parentOffsetDiff.left;
if (!that.visible){
$container.css('opacity', opacity).hide();
}
}
if (that.options.width === 'auto') {
styles.width = that.el.outerWidth() + 'px';
}
$container.css(styles);
},
isCursorAtEnd: function () {
var that = this,
valLength = that.el.val().length,
selectionStart = that.element.selectionStart,
range;
if (typeof selectionStart === 'number') {
return selectionStart === valLength;
}
if (document.selection) {
range = document.selection.createRange();
range.moveStart('character', -valLength);
return valLength === range.text.length;
}
return true;
},
onKeyPress: function (e) {
var that = this;
// If suggestions are hidden and user presses arrow down, display suggestions:
if (!that.disabled && !that.visible && e.which === keys.DOWN && that.currentValue) {
that.suggest();
return;
}
if (that.disabled || !that.visible) {
return;
}
switch (e.which) {
case keys.ESC:
that.el.val(that.currentValue);
that.hide();
break;
case keys.RIGHT:
if (that.hint && that.options.onHint && that.isCursorAtEnd()) {
that.selectHint();
break;
}
return;
case keys.TAB:
if (that.hint && that.options.onHint) {
that.selectHint();
return;
}
if (that.selectedIndex === -1) {
that.hide();
return;
}
that.select(that.selectedIndex);
if (that.options.tabDisabled === false) {
return;
}
break;
case keys.RETURN:
if (that.selectedIndex === -1) {
that.hide();
return;
}
that.select(that.selectedIndex);
break;
case keys.UP:
that.moveUp();
break;
case keys.DOWN:
that.moveDown();
break;
default:
return;
}
// Cancel event if function did not return:
e.stopImmediatePropagation();
e.preventDefault();
},
onKeyUp: function (e) {
var that = this;
if (that.disabled) {
return;
}
switch (e.which) {
case keys.UP:
case keys.DOWN:
return;
}
clearTimeout(that.onChangeTimeout);
if (that.currentValue !== that.el.val()) {
that.findBestHint();
if (that.options.deferRequestBy > 0) {
// Defer lookup in case when value changes very quickly:
that.onChangeTimeout = setTimeout(function () {
that.onValueChange();
}, that.options.deferRequestBy);
} else {
that.onValueChange();
}
}
},
onValueChange: function () {
if (this.ignoreValueChange) {
this.ignoreValueChange = false;
return;
}
var that = this,
options = that.options,
value = that.el.val(),
query = that.getQuery(value);
if (that.selection && that.currentValue !== query) {
that.selection = null;
(options.onInvalidateSelection || $.noop).call(that.element);
}
clearTimeout(that.onChangeTimeout);
that.currentValue = value;
that.selectedIndex = -1;
// Check existing suggestion for the match before proceeding:
if (options.triggerSelectOnValidInput && that.isExactMatch(query)) {
that.select(0);
return;
}
if (query.length < options.minChars) {
that.hide();
} else {
that.getSuggestions(query);
}
},
isExactMatch: function (query) {
var suggestions = this.suggestions;
return (suggestions.length === 1 && suggestions[0].value.toLowerCase() === query.toLowerCase());
},
getQuery: function (value) {
var delimiter = this.options.delimiter,
parts;
if (!delimiter) {
return value;
}
parts = value.split(delimiter);
return $.trim(parts[parts.length - 1]);
},
getSuggestionsLocal: function (query) {
var that = this,
options = that.options,
queryLowerCase = query.toLowerCase(),
filter = options.lookupFilter,
limit = parseInt(options.lookupLimit, 10),
data;
data = {
suggestions: $.grep(options.lookup, function (suggestion) {
return filter(suggestion, query, queryLowerCase);
})
};
if (limit && data.suggestions.length > limit) {
data.suggestions = data.suggestions.slice(0, limit);
}
return data;
},
getSuggestions: function (q) {
var response,
that = this,
options = that.options,
serviceUrl = options.serviceUrl,
params,
cacheKey,
ajaxSettings;
options.params[options.paramName] = q;
if (options.onSearchStart.call(that.element, options.params) === false) {
return;
}
params = options.ignoreParams ? null : options.params;
if ($.isFunction(options.lookup)){
options.lookup(q, function (data) {
that.suggestions = data.suggestions;
that.suggest();
options.onSearchComplete.call(that.element, q, data.suggestions);
});
return;
}
if (that.isLocal) {
response = that.getSuggestionsLocal(q);
} else {
if ($.isFunction(serviceUrl)) {
serviceUrl = serviceUrl.call(that.element, q);
}
cacheKey = serviceUrl + '?' + $.param(params || {});
response = that.cachedResponse[cacheKey];
}
if (response && Array.isArray(response.suggestions)) {
that.suggestions = response.suggestions;
that.suggest();
options.onSearchComplete.call(that.element, q, response.suggestions);
} else if (!that.isBadQuery(q)) {
that.abortAjax();
ajaxSettings = {
url: serviceUrl,
data: params,
type: options.type,
dataType: options.dataType
};
$.extend(ajaxSettings, options.ajaxSettings);
that.currentRequest = $.ajax(ajaxSettings).done(function (data) {
var result;
that.currentRequest = null;
result = options.transformResult(data, q);
that.processResponse(result, q, cacheKey);
options.onSearchComplete.call(that.element, q, result.suggestions);
}).fail(function (jqXHR, textStatus, errorThrown) {
options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);
});
} else {
options.onSearchComplete.call(that.element, q, []);
}
},
isBadQuery: function (q) {
if (!this.options.preventBadQueries){
return false;
}
var badQueries = this.badQueries,
i = badQueries.length;
while (i--) {
if (q.indexOf(badQueries[i]) === 0) {
return true;
}
}
return false;
},
hide: function () {
var that = this,
container = $(that.suggestionsContainer);
if ($.isFunction(that.options.onHide) && that.visible) {
that.options.onHide.call(that.element, container);
}
that.visible = false;
that.selectedIndex = -1;
clearTimeout(that.onChangeTimeout);
$(that.suggestionsContainer).hide();
that.onHint(null);
},
suggest: function () {
if (!this.suggestions.length) {
if (this.options.showNoSuggestionNotice) {
this.noSuggestions();
} else {
this.hide();
}
return;
}
var that = this,
options = that.options,
groupBy = options.groupBy,
formatResult = options.formatResult,
value = that.getQuery(that.currentValue),
className = that.classes.suggestion,
classSelected = that.classes.selected,
container = $(that.suggestionsContainer),
noSuggestionsContainer = $(that.noSuggestionsContainer),
beforeRender = options.beforeRender,
html = '',
category,
formatGroup = function (suggestion, index) {
var currentCategory = suggestion.data[groupBy];
if (category === currentCategory){
return '';
}
category = currentCategory;
return options.formatGroup(suggestion, category);
};
if (options.triggerSelectOnValidInput && that.isExactMatch(value)) {
that.select(0);
return;
}
// Build suggestions inner HTML:
$.each(that.suggestions, function (i, suggestion) {
if (groupBy){
html += formatGroup(suggestion, value, i);
}
html += '<div class="' + className + '" data-index="' + i + '">' + formatResult(suggestion, value, i) + '</div>';
});
this.adjustContainerWidth();
noSuggestionsContainer.detach();
container.html(html);
if ($.isFunction(beforeRender)) {
beforeRender.call(that.element, container, that.suggestions);
}
that.fixPosition();
container.show();
// Select first value by default:
if (options.autoSelectFirst) {
that.selectedIndex = 0;
container.scrollTop(0);
container.children('.' + className).first().addClass(classSelected);
}
that.visible = true;
that.findBestHint();
},
noSuggestions: function() {
var that = this,
beforeRender = that.options.beforeRender,
container = $(that.suggestionsContainer),
noSuggestionsContainer = $(that.noSuggestionsContainer);
this.adjustContainerWidth();
// Some explicit steps. Be careful here as it easy to get
// noSuggestionsContainer removed from DOM if not detached properly.
noSuggestionsContainer.detach();
// clean suggestions if any
container.empty();
container.append(noSuggestionsContainer);
if ($.isFunction(beforeRender)) {
beforeRender.call(that.element, container, that.suggestions);
}
that.fixPosition();
container.show();
that.visible = true;
},
adjustContainerWidth: function() {
var that = this,
options = that.options,
width,
container = $(that.suggestionsContainer);
// If width is auto, adjust width before displaying suggestions,
// because if instance was created before input had width, it will be zero.
// Also it adjusts if input width has changed.
if (options.width === 'auto') {
width = that.el.outerWidth();
container.css('width', width > 0 ? width : 300);
} else if(options.width === 'flex') {
// Trust the source! Unset the width property so it will be the max length
// the containing elements.
container.css('width', '');
}
},
findBestHint: function () {
var that = this,
value = that.el.val().toLowerCase(),
bestMatch = null;
if (!value) {
return;
}
$.each(that.suggestions, function (i, suggestion) {
var foundMatch = suggestion.value.toLowerCase().indexOf(value) === 0;
if (foundMatch) {
bestMatch = suggestion;
}
return !foundMatch;
});
that.onHint(bestMatch);
},
onHint: function (suggestion) {
var that = this,
onHintCallback = that.options.onHint,
hintValue = '';
if (suggestion) {
hintValue = that.currentValue + suggestion.value.substr(that.currentValue.length);
}
if (that.hintValue !== hintValue) {
that.hintValue = hintValue;
that.hint = suggestion;
if ($.isFunction(onHintCallback)) {
onHintCallback.call(that.element, hintValue);
}
}
},
verifySuggestionsFormat: function (suggestions) {
// If suggestions is string array, convert them to supported format:
if (suggestions.length && typeof suggestions[0] === 'string') {
return $.map(suggestions, function (value) {
return { value: value, data: null };
});
}
return suggestions;
},
validateOrientation: function(orientation, fallback) {
orientation = $.trim(orientation || '').toLowerCase();
if($.inArray(orientation, ['auto', 'bottom', 'top']) === -1){
orientation = fallback;
}
return orientation;
},
processResponse: function (result, originalQuery, cacheKey) {
var that = this,
options = that.options;
result.suggestions = that.verifySuggestionsFormat(result.suggestions);
// Cache results if cache is not disabled:
if (!options.noCache) {
that.cachedResponse[cacheKey] = result;
if (options.preventBadQueries && !result.suggestions.length) {
that.badQueries.push(originalQuery);
}
}
// Return if originalQuery is not matching current query:
if (originalQuery !== that.getQuery(that.currentValue)) {
return;
}
that.suggestions = result.suggestions;
that.suggest();
},
activate: function (index) {
var that = this,
activeItem,
selected = that.classes.selected,
container = $(that.suggestionsContainer),
children = container.find('.' + that.classes.suggestion);
container.find('.' + selected).removeClass(selected);
that.selectedIndex = index;
if (that.selectedIndex !== -1 && children.length > that.selectedIndex) {
activeItem = children.get(that.selectedIndex);
$(activeItem).addClass(selected);
return activeItem;
}
return null;
},
selectHint: function () {
var that = this,
i = $.inArray(that.hint, that.suggestions);
that.select(i);
},
select: function (i) {
var that = this;
that.hide();
that.onSelect(i);
},
moveUp: function () {
var that = this;
if (that.selectedIndex === -1) {
return;
}
if (that.selectedIndex === 0) {
$(that.suggestionsContainer).children('.' + that.classes.suggestion).first().removeClass(that.classes.selected);
that.selectedIndex = -1;
that.ignoreValueChange = false;
that.el.val(that.currentValue);
that.findBestHint();
return;
}
that.adjustScroll(that.selectedIndex - 1);
},
moveDown: function () {
var that = this;
if (that.selectedIndex === (that.suggestions.length - 1)) {
return;
}
that.adjustScroll(that.selectedIndex + 1);
},
adjustScroll: function (index) {
var that = this,
activeItem = that.activate(index);
if (!activeItem) {
return;
}
var offsetTop,
upperBound,
lowerBound,
heightDelta = $(activeItem).outerHeight();
offsetTop = activeItem.offsetTop;
upperBound = $(that.suggestionsContainer).scrollTop();
lowerBound = upperBound + that.options.maxHeight - heightDelta;
if (offsetTop < upperBound) {
$(that.suggestionsContainer).scrollTop(offsetTop);
} else if (offsetTop > lowerBound) {
$(that.suggestionsContainer).scrollTop(offsetTop - that.options.maxHeight + heightDelta);
}
if (!that.options.preserveInput) {
// During onBlur event, browser will trigger "change" event,
// because value has changed, to avoid side effect ignore,
// that event, so that correct suggestion can be selected
// when clicking on suggestion with a mouse
that.ignoreValueChange = true;
that.el.val(that.getValue(that.suggestions[index].value));
}
that.onHint(null);
},
onSelect: function (index) {
var that = this,
onSelectCallback = that.options.onSelect,
suggestion = that.suggestions[index];
that.currentValue = that.getValue(suggestion.value);
if (that.currentValue !== that.el.val() && !that.options.preserveInput) {
that.el.val(that.currentValue);
}
that.onHint(null);
that.suggestions = [];
that.selection = suggestion;
if ($.isFunction(onSelectCallback)) {
onSelectCallback.call(that.element, suggestion);
}
},
getValue: function (value) {
var that = this,
delimiter = that.options.delimiter,
currentValue,
parts;
if (!delimiter) {
return value;
}
currentValue = that.currentValue;
parts = currentValue.split(delimiter);
if (parts.length === 1) {
return value;
}
return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value;
},
dispose: function () {
var that = this;
that.el.off('.autocomplete').removeData('autocomplete');
$(window).off('resize.autocomplete', that.fixPositionCapture);
$(that.suggestionsContainer).remove();
}
};
// Create chainable jQuery plugin:
$.fn.devbridgeAutocomplete = function (options, args) {
var dataKey = 'autocomplete';
// If function invoked without argument return
// instance of the first matched element:
if (!arguments.length) {
return this.first().data(dataKey);
}
return this.each(function () {
var inputElement = $(this),
instance = inputElement.data(dataKey);
if (typeof options === 'string') {
if (instance && typeof instance[options] === 'function') {
instance[options](args);
}
} else {
// If instance already exists, destroy it:
if (instance && instance.dispose) {
instance.dispose();
}
instance = new Autocomplete(this, options);
inputElement.data(dataKey, instance);
}
});
};
// Don't overwrite if it already exists
if (!$.fn.autocomplete) {
$.fn.autocomplete = $.fn.devbridgeAutocomplete;
}
}));
PK Vf"]ҩc�� � ! bootstrap-tooltip-extended.min.jsnu &1i� /*!
* bootstrap-tooltip-extended.js v1.0.0
* Copyright 2016 Cyril Rezé
* Licensed under the MIT license
*/
!function(t){"use strict";var e=t.fn.tooltip.Constructor.VERSION?t.fn.tooltip.Constructor.VERSION.split(".")[0]:"2",o=t.fn.tooltip,i=function(t,e){this.init("tooltip",t,e)};i.prototype=t.extend({},o.Constructor.prototype,{constructor:i,show:function(){var o,i,s,n,r,l,p=t.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(p),p.isDefaultPrevented())return;o=this.tip(),this.setContent(),this.options.animation&&o.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement;var a=/\s?auto-dir?\s?/i,h=a.test(r);h&&(r=r.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(r),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),i=this.getPosition(),s=o[0].offsetWidth,n=o[0].offsetHeight;var f="rtl"===jQuery(document.querySelector("html")).attr("dir")?!0:!1;if(h){var c=r,d=r.replace(/bottom-|top-/g,"")||"",g=r.replace(/left|right/g,"")||"";r="left"==d&&f?g+"right":"right"==d&&f?g+"left":r,o.removeClass(c).addClass(r)}switch(r){case"bottom":l={top:i.top+i.height,left:i.left+i.width/2-s/2};break;case"top":l={top:i.top-n,left:i.left+i.width/2-s/2};break;case"left":l={top:i.top+i.height/2-n/2,left:i.left-s};break;case"right":l={top:i.top+i.height/2-n/2,left:i.left+i.width};break;case"bottom-left":l={top:i.top+i.height,left:i.left};break;case"bottom-right":l={top:i.top+i.height,left:i.left+i.width-s};break;case"top-left":l={top:i.top-n,left:i.left};break;case"top-right":l={top:i.top-n,left:i.left+i.width-s}}this.applyPlacement(l,r),"3"===e&&this.newArrow(r,s,f),this.$element.trigger("shown")}},newArrow:function(t,e,o){var i=this.tip().find(".tooltip-arrow"),s=parseInt(i.css("width"),10),n=parseInt(i.css("height"),10),r=t.replace(/bottom-|top-/g,"")||"",l=t.replace(/left|right/g,"")||"";l&&"left"==r&&!o&&i.css("left",s/2),l&&"left"==r&&o&&i.css("right",e-s-s/2),l&&"right"==r&&i.css("left",e-s-s/2),"bottom-"==l&&i.css("top",n),"top-"==l&&i.css("bottom",n)}});var s=t.fn.tooltip;t.fn.tooltip=t.extend(function(e){return this.each(function(){var o=t(this),s=o.data("tooltip"),n=t.extend({},i.defaults,o.data(),"object"==typeof e&&e);s||o.data("tooltip",s=new i(this,n)),"string"==typeof e&&s[e]()})},t.fn.tooltip),t.fn.tooltip.noConflict=function(){return t.fn.tooltip=s,this}}(window.jQuery);
PK Vf"]hVFK�[ �[ jquery-migrate.jsnu &1i� /*!
* jQuery Migrate - v1.4.1 - 2016-05-19
* Copyright jQuery Foundation and other contributors
*/
(function( jQuery, window, undefined ) {
// See http://bugs.jquery.com/ticket/13335
// "use strict";
jQuery.migrateVersion = "1.4.1";
var warnedAbout = {};
// List of warnings already given; public read only
jQuery.migrateWarnings = [];
// Set to true to prevent console output; migrateWarnings still maintained
// jQuery.migrateMute = false;
// Show a message on the console so devs know we're active
if ( window.console && window.console.log ) {
window.console.log( "JQMIGRATE: Migrate is installed" +
( jQuery.migrateMute ? "" : " with logging active" ) +
", version " + jQuery.migrateVersion );
}
// 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 ) {
if ( Object.defineProperty ) {
// On ES5 browsers (non-oldIE), warn if the code tries to get prop;
// allow property to be overwritten in case some other plugin wants it
try {
Object.defineProperty( obj, prop, {
configurable: true,
enumerable: true,
get: function() {
migrateWarn( msg );
return value;
},
set: function( newValue ) {
migrateWarn( msg );
value = newValue;
}
});
return;
} catch( err ) {
// IE8 is a dope about Object.defineProperty, can't warn there
}
}
// Non-ES5 (or broken) browser; just set the property
jQuery._definePropertyBroken = true;
obj[ prop ] = value;
}
if ( document.compatMode === "BackCompat" ) {
// jQuery has never supported or tested Quirks Mode
migrateWarn( "jQuery is not compatible with Quirks Mode" );
}
var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
oldAttr = jQuery.attr,
valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
function() { return null; },
valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
function() { return undefined; },
rnoType = /^(?:input|button)$/i,
rnoAttrNodeType = /^[238]$/,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
ruseDefault = /^(?:checked|selected)$/i;
// jQuery.attrFn
migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
jQuery.attr = function( elem, name, value, pass ) {
var lowerName = name.toLowerCase(),
nType = elem && elem.nodeType;
if ( pass ) {
// Since pass is used internally, we only warn for new jQuery
// versions where there isn't a pass arg in the formal params
if ( oldAttr.length < 4 ) {
migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
}
if ( elem && !rnoAttrNodeType.test( nType ) &&
(attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
return jQuery( elem )[ name ]( value );
}
}
// Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
// for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
}
// Restore boolHook for boolean property/attribute synchronization
if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
jQuery.attrHooks[ lowerName ] = {
get: function( elem, name ) {
// Align boolean attributes with corresponding properties
// Fall back to attribute presence where some booleans are not supported
var attrNode,
property = jQuery.prop( elem, name );
return property === true || typeof property !== "boolean" &&
( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
name.toLowerCase() :
undefined;
},
set: function( elem, value, name ) {
var propName;
if ( value === false ) {
// Remove boolean attributes when set to false
jQuery.removeAttr( elem, name );
} else {
// value is true since we know at this point it's type boolean and not false
// Set boolean attributes to the same name and set the DOM property
propName = jQuery.propFix[ name ] || name;
if ( propName in elem ) {
// Only set the IDL specifically if it already exists on the element
elem[ propName ] = true;
}
elem.setAttribute( name, name.toLowerCase() );
}
return name;
}
};
// Warn only for attributes that can remain distinct from their properties post-1.9
if ( ruseDefault.test( lowerName ) ) {
migrateWarn( "jQuery.fn.attr('" + lowerName + "') might use property instead of attribute" );
}
}
return oldAttr.call( jQuery, elem, name, value );
};
// attrHooks: value
jQuery.attrHooks.value = {
get: function( elem, name ) {
var nodeName = ( elem.nodeName || "" ).toLowerCase();
if ( nodeName === "button" ) {
return valueAttrGet.apply( this, arguments );
}
if ( nodeName !== "input" && nodeName !== "option" ) {
migrateWarn("jQuery.fn.attr('value') no longer gets properties");
}
return name in elem ?
elem.value :
null;
},
set: function( elem, value ) {
var nodeName = ( elem.nodeName || "" ).toLowerCase();
if ( nodeName === "button" ) {
return valueAttrSet.apply( this, arguments );
}
if ( nodeName !== "input" && nodeName !== "option" ) {
migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
}
// Does not return so that setAttribute is also used
elem.value = value;
}
};
var matched, browser,
oldInit = jQuery.fn.init,
oldFind = jQuery.find,
oldParseJSON = jQuery.parseJSON,
rspaceAngle = /^\s*</,
rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
// Note: XSS check is done below after string is trimmed
rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
// $(html) "looks like html" rule change
jQuery.fn.init = function( selector, context, rootjQuery ) {
var match, ret;
if ( selector && typeof selector === "string" ) {
if ( !jQuery.isPlainObject( context ) &&
(match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
// This is an HTML string according to the "old" rules; is it still?
if ( !rspaceAngle.test( selector ) ) {
migrateWarn("$(html) HTML strings must start with '<' character");
}
if ( match[ 3 ] ) {
migrateWarn("$(html) HTML text after last tag is ignored");
}
// Consistently reject any HTML-like string starting with a hash (gh-9521)
// Note that this may break jQuery 1.6.x code that otherwise would work.
if ( match[ 0 ].charAt( 0 ) === "#" ) {
migrateWarn("HTML string cannot start with a '#' character");
jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
}
// Now process using loose rules; let pre-1.8 play too
// Is this a jQuery context? parseHTML expects a DOM element (#178)
if ( context && context.context && context.context.nodeType ) {
context = context.context;
}
if ( jQuery.parseHTML ) {
return oldInit.call( this,
jQuery.parseHTML( match[ 2 ], context && context.ownerDocument ||
context || document, true ), context, rootjQuery );
}
}
}
ret = oldInit.apply( this, arguments );
// Fill in selector and context properties so .live() works
if ( selector && selector.selector !== undefined ) {
// A jQuery object, copy its properties
ret.selector = selector.selector;
ret.context = selector.context;
} else {
ret.selector = typeof selector === "string" ? selector : "";
if ( selector ) {
ret.context = selector.nodeType? selector : context || document;
}
}
return ret;
};
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 ];
}
}
// Let $.parseJSON(falsy_value) return null
jQuery.parseJSON = function( json ) {
if ( !json ) {
migrateWarn("jQuery.parseJSON requires a valid JSON string");
return null;
}
return oldParseJSON.apply( this, arguments );
};
jQuery.uaMatch = function( ua ) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
/(msie) ([\w.]+)/.exec( ua ) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
// Don't clobber any existing jQuery.browser in case it's different
if ( !jQuery.browser ) {
matched = jQuery.uaMatch( navigator.userAgent );
browser = {};
if ( matched.browser ) {
browser[ matched.browser ] = true;
browser.version = matched.version;
}
// Chrome is Webkit, but Webkit is also Safari.
if ( browser.chrome ) {
browser.webkit = true;
} else if ( browser.webkit ) {
browser.safari = true;
}
jQuery.browser = browser;
}
// Warn if the code tries to get jQuery.browser
migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
// jQuery.boxModel deprecated in 1.3, jQuery.support.boxModel deprecated in 1.7
jQuery.boxModel = jQuery.support.boxModel = (document.compatMode === "CSS1Compat");
migrateWarnProp( jQuery, "boxModel", jQuery.boxModel, "jQuery.boxModel is deprecated" );
migrateWarnProp( jQuery.support, "boxModel", jQuery.support.boxModel, "jQuery.support.boxModel is deprecated" );
jQuery.sub = function() {
function jQuerySub( selector, context ) {
return new jQuerySub.fn.init( selector, context );
}
jQuery.extend( true, jQuerySub, this );
jQuerySub.superclass = this;
jQuerySub.fn = jQuerySub.prototype = this();
jQuerySub.fn.constructor = jQuerySub;
jQuerySub.sub = this.sub;
jQuerySub.fn.init = function init( selector, context ) {
var instance = jQuery.fn.init.call( this, selector, context, rootjQuerySub );
return instance instanceof jQuerySub ?
instance :
jQuerySub( instance );
};
jQuerySub.fn.init.prototype = jQuerySub.fn;
var rootjQuerySub = jQuerySub(document);
migrateWarn( "jQuery.sub() is deprecated" );
return jQuerySub;
};
// 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;
};
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;
};
// Ensure that $.ajax gets the new parseJSON defined in core.js
jQuery.ajaxSetup({
converters: {
"text json": jQuery.parseJSON
}
});
var oldFnData = jQuery.fn.data;
jQuery.fn.data = function( name ) {
var ret, evt,
elem = this[0];
// Handles 1.7 which has this behavior and 1.8 which doesn't
if ( elem && name === "events" && arguments.length === 1 ) {
ret = jQuery.data( elem, name );
evt = jQuery._data( elem, name );
if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
migrateWarn("Use of jQuery.fn.data('events') is deprecated");
return evt;
}
}
return oldFnData.apply( this, arguments );
};
var rscriptType = /\/(java|ecma)script/i;
// Since jQuery.clean is used internally on older versions, we only shim if it's missing
if ( !jQuery.clean ) {
jQuery.clean = function( elems, context, fragment, scripts ) {
// Set context per 1.8 logic
context = context || document;
context = !context.nodeType && context[0] || context;
context = context.ownerDocument || context;
migrateWarn("jQuery.clean() is deprecated");
var i, elem, handleScript, jsTags,
ret = [];
jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
// Complex logic lifted directly from jQuery 1.8
if ( fragment ) {
// Special handling of each script element
handleScript = function( elem ) {
// Check if we consider it executable
if ( !elem.type || rscriptType.test( elem.type ) ) {
// Detach the script and store it in the scripts array (if provided) or the fragment
// Return truthy to indicate that it has been handled
return scripts ?
scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
fragment.appendChild( elem );
}
};
for ( i = 0; (elem = ret[i]) != null; i++ ) {
// Check if we're done after handling an executable script
if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
// Append to fragment and handle embedded scripts
fragment.appendChild( elem );
if ( typeof elem.getElementsByTagName !== "undefined" ) {
// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
// Splice the scripts into ret after their former ancestor and advance our index beyond them
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
i += jsTags.length;
}
}
}
}
return ret;
};
}
var eventAdd = jQuery.event.add,
eventRemove = jQuery.event.remove,
eventTrigger = jQuery.event.trigger,
oldToggle = jQuery.fn.toggle,
oldLive = jQuery.fn.live,
oldDie = jQuery.fn.die,
oldLoad = jQuery.fn.load,
ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
hoverHack = function( events ) {
if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
return events;
}
if ( rhoverHack.test( events ) ) {
migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
}
return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
};
// Event props removed in 1.9, put them back if needed; no practical way to warn them
if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
}
// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
if ( jQuery.event.dispatch ) {
migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
}
// Support for 'hover' pseudo-event and ajax event warnings
jQuery.event.add = function( elem, types, handler, data, selector ){
if ( elem !== document && rajaxEvent.test( types ) ) {
migrateWarn( "AJAX events should be attached to document: " + types );
}
eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
};
jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
};
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.bind.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;
};
});
jQuery.fn.toggle = function( fn, fn2 ) {
// Don't mess with animation or css toggles
if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
return oldToggle.apply( this, arguments );
}
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
// Save reference to arguments for access in closure
var args = arguments,
guid = fn.guid || jQuery.guid++,
i = 0,
toggler = function( event ) {
// Figure out which function to execute
var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
// Make sure that clicks stop
event.preventDefault();
// and execute the function
return args[ lastToggle ].apply( this, arguments ) || false;
};
// link all the functions, so any of them can unbind this click handler
toggler.guid = guid;
while ( i < args.length ) {
args[ i++ ].guid = guid;
}
return this.click( toggler );
};
jQuery.fn.live = function( types, data, fn ) {
migrateWarn("jQuery.fn.live() is deprecated");
if ( oldLive ) {
return oldLive.apply( this, arguments );
}
jQuery( this.context ).on( types, this.selector, data, fn );
return this;
};
jQuery.fn.die = function( types, fn ) {
migrateWarn("jQuery.fn.die() is deprecated");
if ( oldDie ) {
return oldDie.apply( this, arguments );
}
jQuery( this.context ).off( types, this.selector || "**", fn );
return this;
};
// Turn global events into document-triggered events
jQuery.event.trigger = function( event, data, elem, onlyHandlers ){
if ( !elem && !rajaxEvent.test( event ) ) {
migrateWarn( "Global events are undocumented and deprecated" );
}
return eventTrigger.call( this, event, data, elem || document, onlyHandlers );
};
jQuery.each( ajaxEvents.split("|"),
function( _, name ) {
jQuery.event.special[ name ] = {
setup: function() {
var elem = this;
// The document needs no shimming; must be !== for oldIE
if ( elem !== document ) {
jQuery.event.add( document, name + "." + jQuery.guid, function() {
jQuery.event.trigger( name, Array.prototype.slice.call( arguments, 1 ), elem, true );
});
jQuery._data( this, name, jQuery.guid++ );
}
return false;
},
teardown: function() {
if ( this !== document ) {
jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
}
return false;
}
};
}
);
jQuery.event.special.ready = {
setup: function() {
if ( this === document ) {
migrateWarn( "'ready' event is deprecated" );
}
}
};
var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
oldFnFind = jQuery.fn.find;
jQuery.fn.andSelf = function() {
migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
return oldSelf.apply( this, arguments );
};
jQuery.fn.find = function( selector ) {
var ret = oldFnFind.apply( this, arguments );
ret.context = this.context;
ret.selector = this.selector ? this.selector + " " + selector : selector;
return ret;
};
// jQuery 1.6 did not support Callbacks, do not warn there
if ( jQuery.Callbacks ) {
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();
};
deferred.isResolved = function() {
migrateWarn( "deferred.isResolved is deprecated" );
return deferred.state() === "resolved";
};
deferred.isRejected = function() {
migrateWarn( "deferred.isRejected is deprecated" );
return deferred.state() === "rejected";
};
if ( func ) {
func.call( deferred, deferred );
}
return deferred;
};
}
})( jQuery, window );
PK Vf"]�Y#RH'