aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-17 03:33:06 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-17 03:33:06 +0000
commit7c41b1812fdbd8b8e4f7d2d04446107feb50fd22 (patch)
tree3bd194b5214072044d661a9d7416f13de2d5ff42 /js/lib
parent6c366e6a8306f43fefb6a0bccfb010aad61a3c3d (diff)
downloadelgg-7c41b1812fdbd8b8e4f7d2d04446107feb50fd22.tar.gz
elgg-7c41b1812fdbd8b8e4f7d2d04446107feb50fd22.tar.bz2
Refs #821 #1793 early widget layout - does not include edit settings, delete, collapsing, reloading, or adding widgets
git-svn-id: http://code.elgg.org/elgg/trunk@7329 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/ui.widgets.js53
1 files changed, 5 insertions, 48 deletions
diff --git a/js/lib/ui.widgets.js b/js/lib/ui.widgets.js
index bce5aea0f..cf13d6e95 100644
--- a/js/lib/ui.widgets.js
+++ b/js/lib/ui.widgets.js
@@ -1,45 +1,14 @@
elgg.provide('elgg.ui.widgets');
elgg.ui.widgets.init = function() {
- // COLLAPSABLE WIDGETS (on Dashboard & Profile pages)
- $('a.toggle_box_contents').live('click', elgg.ui.widgets.toggleContent);
- $('a.toggle_box_edit_panel').live('click', elgg.ui.widgets.toggleEditPanel);
- $('a.toggle_customise_edit_panel').live('click', elgg.ui.widgets.toggleCustomizeEditPanel);
-
- // WIDGET GALLERY EDIT PANEL
- // Sortable widgets
- var els = [
- '#leftcolumn_widgets',
- '#middlecolumn_widgets',
- '#rightcolumn_widgets',
- '#widget_picker_gallery'
- ].join(',');
-
- $(els).sortable({
- items: '.draggable_widget',
- handle: '.drag_handle',
+ $(".widget_column" ).sortable({
+ items: 'div.widget',
+ connectWith: '.widget_column',
+ handle: 'div.drag_handle',
forcePlaceholderSize: true,
- placeholder: 'ui-state-highlight',
- cursor: 'move',
- opacity: 0.9,
- appendTo: 'body',
- connectWith: els,
- stop: function(e, ui) {
- // refresh list before updating hidden fields with new widget order
- $(this).sortable("refresh");
-
- var widgetNamesLeft = elgg.ui.widgets.outputList('#leftcolumn_widgets'),
- widgetNamesMiddle = elgg.ui.widgets.outputList('#middlecolumn_widgets'),
- widgetNamesRight = elgg.ui.widgets.outputList('#rightcolumn_widgets');
-
- $('#debugField1').val(widgetNamesLeft);
- $('#debugField2').val(widgetNamesMiddle);
- $('#debugField3').val(widgetNamesRight);
- }
+ placeholder: 'widget_placeholder'
});
- // bind more info buttons - called when new widgets are created
- elgg.ui.widgets.moreinfo();
};
//List active widgets for each page column
@@ -109,18 +78,6 @@ elgg.ui.widgets.toggleContent = function(e) {
return false;
};
-// toggle widget box edit panel
-elgg.ui.widgets.toggleEditPanel = function () {
- $(this.parentNode.parentNode).children(".collapsable_box_editpanel").slideToggle("fast");
- return false;
-};
-
-// toggle customise edit panel
-elgg.ui.widgets.toggleCustomizeEditPanel = function () {
- $('#customise_editpanel').slideToggle("fast");
- return false;
-};
-
/**
* @deprecated Use elgg.ui.widgets.*
*/