Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
js/sortablelist.js 0000666 00000022651 15077702720 0010246 0 ustar 00 /**
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(function ($) {
$.JSortableList = function (tableWrapper, formId, sortDir, saveOrderingUrl, options, nestedList) {
var root = this;
var disabledOrderingElements = '';
var sortableGroupId = '';
var sortableRange;
var childrenNodes;
var sameLevelNodes;
if (sortDir != 'desc') {
sortDir = 'asc';
}
var ops = $.extend({
orderingIcon:'add-on', //class name of order icon
orderingWrapper:'input-prepend', //ordering control wrapper class name
orderingGroup:'sortable-group-id', //sortable-group-id
sortableClassName:'dndlist-sortable',
placeHolderClassName:'dnd-list-highlight dndlist-place-holder',
sortableHandle:'.sortable-handler'
}, options);
$('tr', tableWrapper).removeClass(ops.sortableClassName).addClass(ops.sortableClassName);
//make wrapper table position be relative, to fix y-axis drag problem on Safari
$(tableWrapper).parents('table').css('position', 'relative');
$(ops.sortableHandle, tableWrapper).css('cursor', 'move');
$('#' + formId).attr('autocomplete', 'off');
var _handle = $(ops.sortableHandle, $(tableWrapper)).length > 0 ? ops.sortableHandle : '';
$(tableWrapper).sortable({
axis:'y',
cursor:'move',
handle:_handle,
items:'tr.' + ops.sortableClassName,
placeholder:ops.placeHolderClassName,
helper:function (e, ui) {
//hard set left position to fix y-axis drag problem on Safari
$(ui).css({'left':'0px'})
ui.children().each(function () {
$(this).width($(this).width());
});
$(ui).children('td').addClass('dndlist-dragged-row');
return ui;
},
start:function (e, ui) {
root.sortableGroupId = ui.item.attr(ops.orderingGroup);
if (root.sortableGroupId) {
root.sortableRange = $('tr[' + ops.orderingGroup + '=' + root.sortableGroupId + ']');
} else {
root.sortableRange = $('.' + ops.sortableClassName);
}
//Disable sortable for other group's records
root.disableOtherGroupSort(e, ui);
//Proceed nested list
if (nestedList){
root.hideChidlrenNodes(ui.item.attr('item-id'));
root.hideSameLevelChildrenNodes(ui.item.attr('level'));
$(tableWrapper).sortable('refresh');
}
},
stop:function (e, ui) {
$('td', $(this)).removeClass('dndlist-dragged-row');
$(ui.item).css({opacity:0});
$(ui.item).animate({
opacity:1,
}, 800, function (){
$(ui.item).css('opacity','');
});
root.enableOtherGroupSort(e, ui);
root.rearrangeOrderingValues(root.sortableGroupId, ui);
if (saveOrderingUrl) {
//clone and check all the checkboxes in sortable range to post
root.cloneMarkedCheckboxes();
// Detach task field if exists
var f = $('#' + formId);
var ft = $('input[name|="task"]', f);
if (ft.length) ft.detach();
//serialize form then post to callback url
$.post(saveOrderingUrl, f.serialize());
// Re-Append original task field
if (ft.length) ft.appendTo(f);
//remove cloned checkboxes
root.removeClonedCheckboxes();
}
root.disabledOrderingElements = '';
//Proceed nested list
if (nestedList){
root.showChildrenNodes(ui.item);
root.showSameLevelChildrenNodes(ui.item);
$(tableWrapper).sortable('refresh');
}
}
});
this.hideChidlrenNodes = function (itemId) {
root.childrenNodes = root.getChildrenNodes(itemId);
root.childrenNodes.hide();
}
this.showChildrenNodes = function (item) {
item.after(root.childrenNodes)
root.childrenNodes.show();
root.childrenNodes="";
}
this.hideSameLevelChildrenNodes = function (level) {
root.sameLevelNodes = root.getSameLevelNodes(level);
root.sameLevelNodes.each(function (){
_childrenNodes = root.getChildrenNodes($(this).attr('item-id'));
_childrenNodes.addClass('child-nodes-tmp-hide');
_childrenNodes.hide();
});
}
this.showSameLevelChildrenNodes = function (item) {
prevItem = item.prev();
prevItemChildrenNodes = root.getChildrenNodes(prevItem.attr('item-id'));
prevItem.after(prevItemChildrenNodes);
$('tr.child-nodes-tmp-hide').show().removeClass('child-nodes-tmp-hide');
root.sameLevelNodes = "";
}
this.disableOtherGroupSort = function (e, ui) {
if (root.sortableGroupId) {
var _tr = $('tr[' + ops.orderingGroup + '!=' + root.sortableGroupId + ']', $(tableWrapper));
_tr.removeClass(ops.sortableClassName).addClass('dndlist-group-disabled');
$(tableWrapper).sortable('refresh');
}
}
this.enableOtherGroupSort = function (e, ui) {
var _tr = $('tr', $(tableWrapper)).removeClass(ops.sortableClassName);
_tr.addClass(ops.sortableClassName)
.removeClass('dndlist-group-disabled');
$(tableWrapper).sortable('refresh');
}
this.disableOrderingControl = function () {
$('.' + ops.orderingWrapper + ' .add-on a', root.sortableRange).hide();
}
this.enableOrderingControl = function () {
$('.' + ops.orderingWrapper + ' .add-on a', root.disabledOrderingElements).show();
}
this.rearrangeOrderingControl = function (sortableGroupId, ui) {
var range;
if (sortableGroupId) {
root.sortableRange = $('tr[' + ops.orderingGroup + '=' + sortableGroupId + ']');
} else {
root.sortableRange = $('.' + ops.sortableClassName);
}
range = root.sortableRange;
var count = range.length;
var i = 0;
if (count > 1) {
range.each(function () {
//firstible, add both ordering icons for missing-icon item
var upIcon = $('.' + ops.orderingWrapper + ' .add-on:first a', $(this)); //get orderup icon of current dropped item
var downIcon = $('.' + ops.orderingWrapper + ' .add-on:last a', $(this)); //get orderup icon of current dropped item
if (upIcon.get(0) && downIcon.get(0)) {
//do nothing
} else if (upIcon.get(0)) {
upIcon.removeAttr('title');
upIcon = $('.' + ops.orderingWrapper + ' .add-on:first', $(this)).html();
downIcon = upIcon.replace('icon-uparrow', 'icon-downarrow');
downIcon = downIcon.replace('.orderup', '.orderdown');
$('.' + ops.orderingWrapper + ' .add-on:last', $(this)).html(downIcon);
} else if (downIcon.get(0)) {
downIcon.removeAttr('title');
downIcon = $('.' + ops.orderingWrapper + ' .add-on:last', $(this)).html();
upIcon = downIcon.replace('icon-downarrow', 'icon-uparrow');
upIcon = upIcon.replace('.orderdown', '.orderup');
$('.' + ops.orderingWrapper + ' .add-on:first', $(this)).html(upIcon);
}
});
//remove orderup icon for first record
$('.' + ops.orderingWrapper + ' .add-on:first a', range[0]).remove();
//remove order down icon for last record
$('.' + ops.orderingWrapper + ' .add-on:last a', range[(count - 1)]).remove();
}
}
this.rearrangeOrderingValues = function (sortableGroupId, ui) {
var range;
if (sortableGroupId) {
root.sortableRange = $('tr[' + ops.orderingGroup + '=' + sortableGroupId + ']');
} else {
root.sortableRange = $('.' + ops.sortableClassName);
}
range = root.sortableRange;
var count = range.length;
var i = 0;
if (count > 1) {
//recalculate order number
if (ui.originalPosition.top > ui.position.top) //if item moved up
{
if (ui.item.position().top != ui.originalPosition.top){
$('[type=text]', ui.item).attr('value', parseInt($('[type=text]', ui.item.next()).attr('value')));
}
$(range).each(function () {
var _top = $(this).position().top;
if ( ui.item.get(0) !== $(this).get(0)){
if (_top > ui.item.position().top && _top <= ui.originalPosition.top) {
if (sortDir == 'asc') {
var newValue = parseInt($('[type=text]', $(this)).attr('value')) + 1;
} else {
var newValue = parseInt($('[type=text]', $(this)).attr('value')) - 1;
}
$('[type=text]', $(this)).attr('value', newValue);
}
}
});
} else if (ui.originalPosition.top < ui.position.top) {
if (ui.item.position().top != ui.originalPosition.top){
$('[type=text]', ui.item).attr('value', parseInt($('[type=text]', ui.item.prev()).attr('value')));
}
$(range).each(function () {
var _top = $(this).position().top;
if ( ui.item.get(0) !== $(this).get(0)){
if (_top < ui.item.position().top && _top >= ui.originalPosition.top) {
if (sortDir == 'asc') {
var newValue = parseInt($('[type=text]', $(this)).attr('value')) - 1;
} else {
var newValue = parseInt($('[type=text]', $(this)).attr('value')) + 1;
}
$('[type=text]', $(this)).attr('value', newValue);
}
}
});
}
}
}
this.cloneMarkedCheckboxes = function () {
$('[name="order[]"]', $(tableWrapper)).attr('name', 'order-tmp');
$('[type=checkbox]', root.sortableRange).each(function () {
var _shadow = $(this).clone();
$(_shadow).attr({'checked':'checked', 'shadow':'shadow', 'id':''});
$('#' + formId).append($(_shadow));
$('[name="order-tmp"]', $(this).parents('tr')).attr('name', 'order[]');
});
}
this.removeClonedCheckboxes = function () {
$('[shadow=shadow]').remove();
$('[name="order-tmp"]', $(tableWrapper)).attr('name', 'order[]');
}
this.getChildrenNodes = function (parentId) {
return $('tr[parents*=" '+parentId+'"]');
}
this.getSameLevelNodes = function (level) {
return $('tr[level='+level+']');
}
}
})(jQuery);
js/icomoon-lte-ie7.js 0000666 00000023256 15077702720 0010450 0 ustar 00 /* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
window.onload = function() {
function addIcon(el, entity) {
var html = el.innerHTML;
el.innerHTML = '' + entity + '' + html;
}
var icons = {
'icon-joomla' : '',
'icon-chevron-up' : '',
'icon-uparrow' : '',
'icon-arrow-up' : '',
'icon-chevron-right' : '',
'icon-rightarrow' : '',
'icon-arrow-right' : '',
'icon-chevron-down' : '',
'icon-downarrow' : '',
'icon-arrow-down' : '',
'icon-chevron-left' : '',
'icon-leftarrow' : '',
'icon-arrow-left' : '',
'icon-arrow-first' : '',
'icon-arrow-last' : '',
'icon-arrow-up-2' : '',
'icon-arrow-right-2' : '',
'icon-arrow-down-2' : '',
'icon-arrow-left-2' : '',
'icon-arrow-up-3' : '',
'icon-arrow-right-3' : '',
'icon-arrow-down-3' : '',
'icon-arrow-left-3' : '',
'icon-menu-2' : '',
'icon-arrow-up-4' : '',
'icon-arrow-right-4' : '',
'icon-arrow-down-4' : '',
'icon-arrow-left-4' : '',
'icon-share' : ''',
'icon-redo' : ''',
'icon-undo' : '(',
'icon-forward-2' : '',
'icon-backward-2' : '',
'icon-reply' : '',
'icon-unblock' : 'l',
'icon-refresh' : 'l',
'icon-redo-2' : 'l',
'icon-undo-2' : '',
'icon-move' : 'z',
'icon-expand' : 'f',
'icon-contract' : 'g',
'icon-expand-2' : 'h',
'icon-contract-2' : 'i',
'icon-play' : '',
'icon-pause' : '',
'icon-stop' : '',
'icon-previous' : '|',
'icon-backward' : '|',
'icon-next' : '{',
'icon-forward' : '{',
'icon-first' : '}',
'icon-last' : '',
'icon-play-circle' : '',
'icon-pause-circle' : '',
'icon-stop-circle' : '',
'icon-backward-circle' : '',
'icon-forward-circle' : '',
'icon-loop' : '',
'icon-shuffle' : '',
'icon-search' : 'S',
'icon-zoom-in' : 'd',
'icon-zoom-out' : 'e',
'icon-apply' : '+',
'icon-edit' : '+',
'icon-pencil' : '+',
'icon-pencil-2' : ',',
'icon-brush' : ';',
'icon-save-new' : ']',
'icon-plus-2 ' : ']',
'icon-ban-circle' : '^',
'icon-minus-sign' : '^',
'icon-minus-2' : '^',
'icon-delete' : 'I',
'icon-remove' : 'I',
'icon-cancel-2' : 'I',
'icon-publish' : 'G',
'icon-save' : 'G',
'icon-ok' : 'G',
'icon-checkmark' : 'G',
'icon-new' : '*',
'icon-plus' : '*',
'icon-plus-circle' : '',
'icon-minus' : 'K',
'icon-not-ok' : 'K',
'icon-minus-circle' : '',
'icon-unpublish' : 'J',
'icon-cancel' : 'J',
'icon-cancel-circle' : '',
'icon-checkmark-2' : '',
'icon-checkmark-circle' : '',
'icon-info' : '',
'icon-info-2' : '',
'icon-info-circle' : '',
'icon-question' : 'E',
'icon-question-sign' : 'E',
'icon-help' : 'E',
'icon-question-2' : '',
'icon-question-circle' : '',
'icon-notification' : '',
'icon-notification-2' : '',
'icon-notification-circle' : '',
'icon-pending' : 'H',
'icon-warning' : 'H',
'icon-warning-2' : '',
'icon-warning-circle' : '',
'icon-checkbox-unchecked' : '=',
'icon-checkin' : '>',
'icon-checkbox' : '>',
'icon-checkbox-checked' : '>',
'icon-checkbox-partial' : '?',
'icon-square' : '',
'icon-radio-unchecked' : '',
'icon-radio-checked' : '',
'icon-circle' : '',
'icon-signup' : '',
'icon-grid' : 'X',
'icon-grid-view' : 'X',
'icon-grid-2' : 'Y',
'icon-grid-view-2' : 'Y',
'icon-menu' : 'Z',
'icon-list' : '1',
'icon-list-view' : '1',
'icon-list-2' : '',
'icon-menu-3' : '',
'icon-folder-open' : '-',
'icon-folder' : '-',
'icon-folder-close' : '.',
'icon-folder-2' : '.',
'icon-folder-plus' : '',
'icon-folder-minus' : '',
'icon-folder-3' : '',
'icon-folder-plus-2' : '',
'icon-folder-remove' : '',
'icon-file' : '',
'icon-file-2' : '',
'icon-file-add' : ')',
'icon-file-plus' : ')',
'icon-file-remove' : '',
'icon-file-minus' : '',
'icon-file-check' : '',
'icon-file-remove' : '',
'icon-save-copy' : '',
'icon-copy' : '',
'icon-stack' : '',
'icon-tree' : '',
'icon-tree-2' : '',
'icon-paragraph-left' : '',
'icon-paragraph-center' : '',
'icon-paragraph-right' : '',
'icon-paragraph-justify' : '',
'icon-screen' : '',
'icon-tablet' : '',
'icon-mobile' : '',
'icon-box-add' : 'Q',
'icon-box-remove' : 'R',
'icon-download' : '',
'icon-upload' : '',
'icon-home' : '!',
'icon-home-2' : '',
'icon-out-2' : '',
'icon-new-tab' : '',
'icon-out-3' : '',
'icon-new-tab-2' : '',
'icon-link' : '',
'icon-picture' : '/',
'icon-image' : '/',
'icon-pictures' : '0',
'icon-images' : '0',
'icon-palette' : '',
'icon-color-palette' : '',
'icon-camera' : 'U',
'icon-camera-2' : '',
'icon-video' : '',
'icon-play-2' : 'V',
'icon-video-2' : 'V',
'icon-youtube' : 'V',
'icon-music' : 'W',
'icon-user' : '"',
'icon-users' : '',
'icon-vcard' : 'm',
'icon-address' : 'p',
'icon-share-alt' : '&',
'icon-out' : '&',
'icon-enter' : '',
'icon-exit' : '',
'icon-comment' : '$',
'icon-comments' : '$',
'icon-comments-2' : '%',
'icon-quote' : '`',
'icon-quotes-left' : '`',
'icon-quote-2' : 'a',
'icon-quotes-right' : 'a',
'icon-quote-3' : '',
'icon-bubble-quote' : '',
'icon-phone' : '',
'icon-phone-2' : '',
'icon-envelope' : 'M',
'icon-mail' : 'M',
'icon-envelope-opened' : 'N',
'icon-mail-2' : 'N',
'icon-unarchive' : 'O',
'icon-drawer' : 'O',
'icon-archive' : 'P',
'icon-drawer-2' : 'P',
'icon-briefcase' : '',
'icon-tag' : '',
'icon-tag-2' : '',
'icon-tags' : '',
'icon-tags-2' : '',
'icon-options' : '8',
'icon-cog' : '8',
'icon-cogs' : '7',
'icon-screwdriver' : '6',
'icon-tools' : '6',
'icon-wrench' : ':',
'icon-equalizer' : '9',
'icon-dashboard' : 'x',
'icon-switch' : '',
'icon-filter' : 'T',
'icon-purge' : 'L',
'icon-trash' : 'L',
'icon-checkedout' : '#',
'icon-lock' : '#',
'icon-locked' : '#',
'icon-unlock' : '',
'icon-key' : '_',
'icon-support' : 'F',
'icon-database' : 'b',
'icon-scissors' : '',
'icon-health' : 'j',
'icon-wand' : 'k',
'icon-eye-open' : '<',
'icon-eye' : '<',
'icon-eye-close' : '',
'icon-eye-blocked' : '',
'icon-eye-2' : '',
'icon-clock' : 'n',
'icon-compass' : 'o',
'icon-broadcast' : '',
'icon-connection' : '',
'icon-wifi' : '',
'icon-book' : '',
'icon-lightning' : 'y',
'icon-flash' : 'y',
'icon-print' : '',
'icon-printer' : '',
'icon-feed' : 'q',
'icon-calendar' : 'C',
'icon-calendar-2' : 'D',
'icon-calendar-3' : '',
'icon-pie' : 'w',
'icon-bars' : 'v',
'icon-chart' : 'u',
'icon-power-cord' : '2',
'icon-cube' : '3',
'icon-puzzle' : '4',
'icon-attachment' : 'r',
'icon-paperclip' : 'r',
'icon-flag-2' : 'r',
'icon-lamp' : 't',
'icon-pin' : 's',
'icon-pushpin' : 's',
'icon-location' : 'c',
'icon-shield' : '',
'icon-flag' : '5',
'icon-flag-3' : '',
'icon-bookmark' : '',
'icon-bookmark-2' : '',
'icon-heart' : '',
'icon-heart-2' : '',
'icon-thumbs-up' : '[',
'icon-thumbs-down' : '\',
'icon-unfeatured' : '@',
'icon-asterisk' : '@',
'icon-star-empty' : '@',
'icon-star-2' : 'A',
'icon-featured' : 'B',
'icon-default' : 'B',
'icon-star' : 'B',
'icon-smiley' : '',
'icon-smiley-happy' : '',
'icon-smiley-2' : '',
'icon-smiley-happy-2' : '',
'icon-smiley-sad' : '',
'icon-smiley-sad-2' : '',
'icon-smiley-neutral' : '',
'icon-smiley-neutral-2' : '',
'icon-cart' : '',
'icon-basket' : '',
'icon-credit' : '',
'icon-credit-2' : ''
},
els = document.getElementsByTagName('*'),
i, attr, c, el;
for (i = 0; ; i += 1) {
el = els[i];
if(!el) {
break;
}
attr = el.getAttribute('data-icon');
if (attr) {
addIcon(el, attr);
}
c = el.className;
c = c.match(/icon-[^\s'"]+/);
if (c && icons[c[0]]) {
addIcon(el, icons[c[0]]);
}
}
};
js/jquery.simplecolors.js 0000666 00000011411 15077702720 0011560 0 ustar 00 /**
* LOOSELY BASED ON:
* Very simple jQuery Color Picker
* Copyright (C) 2012 Tanguy Krotoff
* Licensed under the MIT license
*
* ADAPTED BY:
* Copyright (C) 2013 Peter van Westen
*/
(function($) {
var SimpleColorPicker = function(element, options) {
this.select = $(element);
this.options = $.extend({}, $.fn.simplecolors.defaults, options);
this.select.hide();
// Build the list of colors
var list = '';
$('option', this.select).each(function() {
var option = $(this);
var color = option.val();
if (option.text() == '-') {
list += ' ';
} else {
var clss = 'simplecolors-swatch';
if (color == 'none') {
clss += ' nocolor';
color = 'transparent';
}
if (option.attr('selected')) {
clss += ' active';
}
list += '';
}
});
var color = this.select.val();
var clss = 'simplecolors-swatch';
if (color == 'none') {
clss += ' nocolor';
color = 'transparent';
}
this.icon = $('').insertAfter(this.select);
this.icon.on('click', $.proxy(this.show, this));
this.panel = $('').appendTo(document.body);
this.panel.html(list);
this.panel.on('click', $.proxy(this.click, this));
// Hide panel when clicking outside
$(document).on('mousedown', $.proxy(this.hide, this));
this.panel.on('mousedown', $.proxy(this.mousedown, this));
};
/**
* SimpleColorPicker class
*/
SimpleColorPicker.prototype = {
constructor: SimpleColorPicker,
show: function() {
var panelpadding = 7; // Empirical value
var pos = this.icon.offset();
switch (this.select.attr('data-position')) {
case 'top':
this.panel.css({
left: pos.left - panelpadding,
top: pos.top - this.panel.outerHeight() - 1
});
break;
case 'bottom':
this.panel.css({
left: pos.left - panelpadding,
top: pos.top + this.icon.outerHeight()
});
break;
case 'left':
this.panel.css({
left: pos.left - this.panel.outerWidth(),
top: pos.top - ( (this.panel.outerHeight() - this.icon.outerHeight() ) / 2 ) - 1
});
break;
case 'right':
default:
this.panel.css({
left: pos.left + this.icon.outerWidth(),
top: pos.top - ( (this.panel.outerHeight() - this.icon.outerHeight() ) / 2 ) - 1
});
break;
}
this.panel.show(this.options.delay);
},
hide: function() {
if (this.panel.css('display') != 'none') {
this.panel.hide(this.options.delay);
}
},
click: function(e) {
var target = $(e.target);
if (target.length === 1) {
if (target[0].nodeName.toLowerCase() === 'span') {
// When you click on a color
var color = '';
var bgcolor = '';
var clss = '';
if (target.parent().hasClass('nocolor')) {
color = 'none';
bgcolor = 'transparent';
clss = 'nocolor';
} else {
color = this.rgb2hex(target.css('background-color'));
bgcolor = color;
}
// Mark this div as the selected one
target.parent().siblings().removeClass('active');
target.parent().addClass('active');
this.icon.removeClass('nocolor').addClass(clss);
this.icon.find('span').css('background-color', bgcolor);
// Hide the panel
this.hide();
// Change select value
this.select.val(color).change();
}
}
},
/**
* Prevents the mousedown event from "eating" the click event.
*/
mousedown: function(e) {
e.stopPropagation();
e.preventDefault();
},
/**
* Converts a RGB color to its hexadecimal value.
*
* See http://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-$
*/
rgb2hex: function(rgb) {
function hex(x) {
return ("0" + parseInt(x, 10).toString(16)).slice(-2);
}
var matches = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
if (matches === null) {
// Fix for Internet Explorer < 9
// Variable rgb is already a hexadecimal value
return rgb;
} else {
return '#' + hex(matches[1]) + hex(matches[2]) + hex(matches[3]);
}
}
};
/**
* Plugin definition.
*/
$.fn.simplecolors = function(option) {
// For HTML element passed to the plugin
return this.each(function() {
var $this = $(this),
data = $this.data('simplecolors'),
options = typeof option === 'object' && option;
if (!data) {
$this.data('simplecolors', (data = new SimpleColorPicker(this, options)));
}
if (typeof option === 'string') {
data[option]();
}
});
};
$.fn.simplecolors.Constructor = SimpleColorPicker;
/**
* Default options.
*/
$.fn.simplecolors.defaults = {
// Animation delay
delay: 0
};
})(jQuery);
js/chosen.jquery.js 0000666 00000123440 15077702720 0010332 0 ustar 00 // Chosen, a Select Box Enhancer for jQuery and Prototype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 0.14.0
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `grunt build`, do not edit it by hand.
//
// Modified for Joomla! UI:
// - fix zero width, based on https://github.com/harvesthq/chosen/pull/1439
// - allow to add a custom value on fly, based on https://github.com/harvesthq/chosen/pull/749
//
(function() {
var $, AbstractChosen, Chosen, SelectParser, _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
SelectParser = (function() {
function SelectParser() {
this.options_index = 0;
this.parsed = [];
}
SelectParser.prototype.add_node = function(child) {
if (child.nodeName.toUpperCase() === "OPTGROUP") {
return this.add_group(child);
} else {
return this.add_option(child);
}
};
SelectParser.prototype.add_group = function(group) {
var group_position, option, _i, _len, _ref, _results;
group_position = this.parsed.length;
this.parsed.push({
array_index: group_position,
group: true,
label: this.escapeExpression(group.label),
children: 0,
disabled: group.disabled
});
_ref = group.childNodes;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
_results.push(this.add_option(option, group_position, group.disabled));
}
return _results;
};
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
if (option.nodeName.toUpperCase() === "OPTION") {
if (option.text !== "") {
if (group_position != null) {
this.parsed[group_position].children += 1;
}
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
value: option.value,
text: option.text,
html: option.innerHTML,
selected: option.selected,
disabled: group_disabled === true ? group_disabled : option.disabled,
group_array_index: group_position,
classes: option.className,
style: option.style.cssText
});
} else {
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
empty: true
});
}
return this.options_index += 1;
}
};
SelectParser.prototype.escapeExpression = function(text) {
var map, unsafe_chars;
if ((text == null) || text === false) {
return "";
}
if (!/[\&\<\>\"\'\`]/.test(text)) {
return text;
}
map = {
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`"
};
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
return text.replace(unsafe_chars, function(chr) {
return map[chr] || "&";
});
};
return SelectParser;
})();
SelectParser.select_to_array = function(select) {
var child, parser, _i, _len, _ref;
parser = new SelectParser();
_ref = select.childNodes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i];
parser.add_node(child);
}
return parser.parsed;
};
AbstractChosen = (function() {
function AbstractChosen(form_field, options) {
this.form_field = form_field;
this.options = options != null ? options : {};
if (!AbstractChosen.browser_is_supported()) {
return;
}
this.is_multiple = this.form_field.multiple;
this.set_default_text();
this.set_default_values();
this.setup();
this.set_up_html();
this.register_observers();
this.finish_setup();
}
AbstractChosen.prototype.set_default_values = function() {
var _this = this;
this.click_test_action = function(evt) {
return _this.test_active_click(evt);
};
this.activate_action = function(evt) {
return _this.activate_field(evt);
};
this.active_field = false;
this.mouse_on_container = false;
this.results_showing = false;
this.result_highlighted = null;
this.result_single_selected = null;
/**/
/* Original: not exist */
this.allow_custom_value = false;
/**/
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
this.disable_search_threshold = this.options.disable_search_threshold || 0;
this.disable_search = this.options.disable_search || false;
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
this.group_search = this.options.group_search != null ? this.options.group_search : true;
this.search_contains = this.options.search_contains || false;
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
this.max_selected_options = this.options.max_selected_options || Infinity;
this.inherit_select_classes = this.options.inherit_select_classes || false;
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
return this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
};
AbstractChosen.prototype.set_default_text = function() {
if (this.form_field.getAttribute("data-placeholder")) {
this.default_text = this.form_field.getAttribute("data-placeholder");
} else if (this.is_multiple) {
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
} else {
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
}
/**/
/* Original: not exist */
this.custom_group_text = this.form_field.getAttribute("data-custom_group_text") || this.options.custom_group_text || "Custom Value";
/**/
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
};
AbstractChosen.prototype.mouse_enter = function() {
return this.mouse_on_container = true;
};
AbstractChosen.prototype.mouse_leave = function() {
return this.mouse_on_container = false;
};
AbstractChosen.prototype.input_focus = function(evt) {
var _this = this;
if (this.is_multiple) {
if (!this.active_field) {
return setTimeout((function() {
return _this.container_mousedown();
}), 50);
}
} else {
if (!this.active_field) {
return this.activate_field();
}
}
};
AbstractChosen.prototype.input_blur = function(evt) {
var _this = this;
if (!this.mouse_on_container) {
this.active_field = false;
return setTimeout((function() {
return _this.blur_test();
}), 100);
}
};
AbstractChosen.prototype.results_option_build = function(options) {
var content, data, _i, _len, _ref;
content = '';
_ref = this.results_data;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
data = _ref[_i];
if (data.group) {
content += this.result_add_group(data);
} else {
content += this.result_add_option(data);
}
if (options != null ? options.first : void 0) {
if (data.selected && this.is_multiple) {
this.choice_build(data);
} else if (data.selected && !this.is_multiple) {
this.single_set_selected_text(data.text);
}
}
}
return content;
};
AbstractChosen.prototype.result_add_option = function(option) {
var classes, style;
if (!option.search_match) {
return '';
}
if (!this.include_option_in_results(option)) {
return '';
}
classes = [];
if (!option.disabled && !(option.selected && this.is_multiple)) {
classes.push("active-result");
}
if (option.disabled && !(option.selected && this.is_multiple)) {
classes.push("disabled-result");
}
if (option.selected) {
classes.push("result-selected");
}
if (option.group_array_index != null) {
classes.push("group-option");
}
if (option.classes !== "") {
classes.push(option.classes);
}
style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : "";
return "