From 1589b1e0fc06979063d3a07bf34eca5c0ea22492 Mon Sep 17 00:00:00 2001 From: pete Date: Wed, 23 Jul 2008 16:19:10 +0000 Subject: new files for friends picker git-svn-id: https://code.elgg.org/elgg/trunk@1503 36083f99-b078-4883-b0ff-0f9b5a30f544 --- javascript/friendsPickerv1.js | 107 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100755 javascript/friendsPickerv1.js (limited to 'javascript') diff --git a/javascript/friendsPickerv1.js b/javascript/friendsPickerv1.js new file mode 100755 index 000000000..3ecf4bfc3 --- /dev/null +++ b/javascript/friendsPickerv1.js @@ -0,0 +1,107 @@ +// elgg friendsPicker jquery plugin + +// create a separate namespace for each picker - so we can have multiple pickers per page +var j = 0; + +jQuery.fn.friendsPicker = function(settings) { + + settings = $.extend({ easeFunc: "easeOutExpo", easeTime: 1000, toolTip: false }, settings); + + return this.each(function() { + + var container = $(this); + container.addClass("friendsPicker"); + // set panelwidth manually as it's hidden initially + var panelWidth = 755; + + // count the panels in the container + var panelCount = container.find("div.panel").size(); + // calculate the width of all the panels lined up end-to-end + var friendsPicker_containerWidth = panelWidth*panelCount; + // specify width for the friendsPicker_container + container.find("div.friendsPicker_container").css("width" , friendsPicker_containerWidth); + + // global variables for container.each function below + var friendsPickerNavigationWidth = 0; + var currentPanel = 1; + + // generate appropriate nav for each container + container.each(function(i) { + + // generate Left and Right arrows + $(this).before("
Left<\/div>"); + $(this).after("
Right<\/div>"); + + // generate a-z tabs + $(this).before("