/** * (c) Copyright by authors of the Tiki Wiki CMS Groupware Project * * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. * $Id$ * * Handles list plugin GUI */ // event for plugin list $(document) .off('plugin_list_ready') .on('plugin_list_ready', function (params) { var $textarea = params.modal.find("textarea[name=content]"); jqueryTiki.plugins.list.setup($textarea); }); $(document).ready(function () { jqueryTiki.plugins = jqueryTiki.plugins || {}; jqueryTiki.plugins.list = { /** * Local data */ current: {}, fields: {}, plugins: {}, objectType: null, $editor: null, /** * Main GUI setup * * @param $textarea */ setup: function ($textarea) { var gui = this; gui.current = {}; gui.fields = {}; gui.plugins = {}; gui.trackers = {}; gui.objectType = null; gui.sortableOptions = { listType: "ul", maxLevels: 2, handle: "div:first", items: "li", disableNesting: "no-nesting" }; // display GUI interface here gui.$editor = $("