aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 15:31:14 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 15:31:14 +0000
commit53894a9dbe4f7a70794899292e5869303b402f3d (patch)
tree870776b5f2faa3ebf1a53d6eb270baa6deb9be25
parent7858fb3f2017b0d42c56cac16328c35f7d287b11 (diff)
downloadelgg-53894a9dbe4f7a70794899292e5869303b402f3d.tar.gz
elgg-53894a9dbe4f7a70794899292e5869303b402f3d.tar.bz2
updated js
git-svn-id: https://code.elgg.org/elgg/trunk@1295 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--javascript/initialise_elgg.js135
1 files changed, 47 insertions, 88 deletions
diff --git a/javascript/initialise_elgg.js b/javascript/initialise_elgg.js
index bde196913..220c19c6b 100644
--- a/javascript/initialise_elgg.js
+++ b/javascript/initialise_elgg.js
@@ -71,102 +71,18 @@ $(document).ready(function () {
accept: ".draggable_widget",
hoverClass: 'droppable-hover'
});
+
+}); /* end document ready function */
+
+
- /*
- // widget hover class
- $("table.draggable_widget").bind("mouseenter mouseleave", function(e){
- $(this).toggleClass("draggable_widget_over");
- });
-
-*/
-/*
-
- // remove widget button
- $('img.remove_me').click(function () {
- $(this.parentNode.parentNode.parentNode.parentNode.parentNode).fadeOut("medium", function () {
- $(this).remove();
- // updating hidden fields with new widget order
- var widgetNameMain = outputWidgetList('#main_widgets');
- document.getElementById('debugField1').value = widgetNameMain;
- var widgetNameRight = outputWidgetList('#rightsidebar_widgets');
- document.getElementById('debugField2').value = widgetNameRight;
- });
- return false;
- });
-*/
- // define draggable widgets from gallery
- //$("#widget_picker_gallery .draggable_widget").draggable({
- // helper: 'clone',
- // containment: '#customise_editpanel',
- // start: function(ev, ui) {
- // $('#rightsidebar_widgets').droppable("enable");
- // $('#main_widgets').droppable("enable");
- // }
- //});
-
- // define what happens when new widgets are dragged from the gallery
-/*
- $("#rightsidebar_widgets").droppable({
- accept: ".draggable_widget",
- hoverClass: 'droppable-hover',
- drop: function(ev, ui) {
- $(this).append($(ui.draggable).clone() );
- $(this).droppable("disable");
-
- $('img.remove_me').click(function () {
- $(this.parentNode.parentNode.parentNode.parentNode.parentNode).fadeOut("medium", function () {
- $(this).remove();
-
- var widgetNameRight = outputWidgetList('#rightsidebar_widgets');
- document.getElementById('debugField2').value = widgetNameRight;
- });
- return false;
- });
-
- widget_moreinfo();
-
- $els.sortable( "refresh" );
-
- var widgetNameRight = outputWidgetList('#rightsidebar_widgets');
- document.getElementById('debugField2').value = widgetNameRight;
- }
- });
-*/
-/*
- $("#main_widgets").droppable({
- accept: ".draggable_widget",
- hoverClass: 'droppable-hover',
- drop: function(ev, ui) {
- $(this).append($(ui.draggable).clone() );
- $(this).droppable("disable");
-
- $('img.remove_me').click(function () {
- $(this.parentNode.parentNode.parentNode.parentNode.parentNode).fadeOut("medium", function () {
- $(this).remove();
-
- var widgetNameMain = outputWidgetList('#main_widgets');
- document.getElementById('debugField1').value = widgetNameMain;
- });
- return false;
- });
-
- widget_moreinfo();
-
- $els.sortable( "refresh" );
-
- var widgetNameMain = outputWidgetList('#main_widgets');
- document.getElementById('debugField1').value = widgetNameMain;
- }
- });
-*/
-}); /* end document ready function */
jQuery.fn.makeDelimitedList = function(elementAttribute) {
@@ -189,11 +105,15 @@ jQuery.fn.makeDelimitedList = function(elementAttribute) {
}
+
+
function outputWidgetList(forElement) {
return( $("input[@name='handler'], input[@name='guid']", forElement ).makeDelimitedList("value") );
}
+
+
// toggle widget box contents
var toggleContent = function(e) {
var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode);
@@ -213,6 +133,8 @@ var toggleContent = function(e) {
};
+
+
// widget more info button
function setupMoreInfoButton() {
$('img.more_info').click(function () {
@@ -226,6 +148,8 @@ function setupMoreInfoButton() {
}
+
+
function widget_moreinfo() {
$("img.more_info").hover(function(e) {
@@ -261,3 +185,38 @@ function widget_moreinfo() {
};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+