/** This file is part of KCFinder project * * @desc Settings panel functionality * @package KCFinder * @version 3.12 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 * @link http://kcfinder.sunhater.com */ _.initSettings = function() { $('#settings fieldset').disableTextSelect(); if (!_.shows.length) $('#show input[type="checkbox"]').each(function(i) { _.shows[i] = this.name; }); var shows = _.shows; if (!$.$.kuki.isSet('showname')) { $.$.kuki.set('showname', "on"); $.each(shows, function (i, val) { if (val != "name") $.$.kuki.set('show' + val, "off"); }); } $('#show input[type="checkbox"]').click(function() { $.$.kuki.set('show' + this.name, this.checked ? "on" : "off") $('#files .file div.' + this.name).css('display', this.checked ? "block" : "none"); }); $.each(shows, function(i, val) { $('#show input[name="' + val + '"]').get(0).checked = ($.$.kuki.get('show' + val) == "on") ? "checked" : ""; }); if (!_.orders.length) $('#order input[type="radio"]').each(function(i) { _.orders[i] = this.value; }) var orders = _.orders; if (!$.$.kuki.isSet('order')) $.$.kuki.set('order', "name"); if (!$.$.kuki.isSet('orderDesc')) $.$.kuki.set('orderDesc', "off"); $('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true; $('#order input[name="desc"]').get(0).checked = ($.$.kuki.get('orderDesc') == "on"); $('#order input[type="radio"]').click(function() { $.$.kuki.set('order', this.value); _.orderFiles(); }); $('#order input[name="desc"]').click(function() { $.$.kuki.set('orderDesc', this.checked ? 'on' : "off"); _.orderFiles(); }); if (!$.$.kuki.isSet('view')) $.$.kuki.set('view', "thumbs"); if ($.$.kuki.get('view') == "list") $('#show').parent().hide(); $('#view input[value="' + $.$.kuki.get('view') + '"]').get(0).checked = true; $('#view input').click(function() { var view = this.value; if ($.$.kuki.get('view') != view) { $.$.kuki.set('view', view); if (view == "list") $('#show').parent().hide(); else $('#show').parent().show(); } _.fixFilesHeight(); _.refresh(); }); $('#settings fieldset, #settings input, #settings label').transForm(); _.initLangs(); }; _.initLangs = function() { $.each(_.langs, function(id, lng) { var opt = $('<option></option>'); opt.val(id).text(lng); if (id == _.lang) opt.attr({selected: true}); $('#lang').append(opt); }); $('#lang').change(function() { window.location = _.getURL("browser", this.value) + "&theme=" + encodeURIComponent(_.theme); }); }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
000._jquery.js | File | 94.12 KB | 0644 |
|
002._jqueryui.js | File | 223.18 KB | 0644 |
|
006.jquery.transForm.js | File | 36.02 KB | 0644 |
|
006.jquery.uniform.js | File | 35.26 KB | 0644 |
|
010.jquery.fixes.js | File | 1.09 KB | 0644 |
|
020.jquery.rightClick.js | File | 844 B | 0644 |
|
021.jquery.taphold.js | File | 4.55 KB | 0644 |
|
022.jquery.shDropUpload.js | File | 13.03 KB | 0644 |
|
029.jquery.agent.js | File | 2.96 KB | 0644 |
|
030.jquery.helper.js | File | 9.55 KB | 0644 |
|
031.jquery.md5.js | File | 9.27 KB | 0644 |
|
040.object.js | File | 569 B | 0644 |
|
041.dialogs.js | File | 5.89 KB | 0644 |
|
050.init.js | File | 8.69 KB | 0644 |
|
060.toolbar.js | File | 10.46 KB | 0644 |
|
070.settings.js | File | 3.02 KB | 0644 |
|
080.files.js | File | 8.06 KB | 0644 |
|
090.folders.js | File | 7.2 KB | 0644 |
|
091.menus.js | File | 20.64 KB | 0644 |
|
091.viewImage.js | File | 7.39 KB | 0644 |
|
100.clipboard.js | File | 6.2 KB | 0644 |
|
110.dropUpload.js | File | 5.51 KB | 0644 |
|
120.misc.js | File | 3.7 KB | 0644 |
|
index.php | File | 549 B | 0644 |
|