Changeset 630205
- Timestamp:
- 11/26/2012 05:10:27 PM (13 years ago)
- Location:
- voce-post-widgets/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
js/voce-post-widgets.js (modified) (16 diffs)
-
voce-post-widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
voce-post-widgets/trunk/README.txt
r630182 r630205 5 5 Requires at least: 3.3 6 6 Tested up to: 3.4 7 Stable tag: . 47 Stable tag: .5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 56 56 == Changelog == 57 57 58 = 0.5 = 59 * Updated documentation 60 * Fixing JS error for undefined vars 61 58 62 = 0.2 = 59 63 * Updated documentation. -
voce-post-widgets/trunk/js/voce-post-widgets.js
r630146 r630205 1 /*global document, $, jQuery, ajaxurl */1 /*global document, $, jQuery, ajaxurl, widgetsAdmin*/ 2 2 (function(document, $) { 3 3 "use strict"; … … 9 9 sidebar: '', 10 10 originalSidebar: '', 11 11 12 /** 12 * Handle all of the events 13 */ 13 * Handle all of the events 14 * @method init 15 */ 14 16 init : function init() { 15 17 var the_id, rem, $first; … … 17 19 pageWidgets.sidebarWidgets = $.parseJSON(widgetsAdmin.sidebars_widgets.replace(/"/g, '"')); 18 20 19 // @todo: update h ight as widgets are added / expanded21 // @todo: update height as widgets are added / expanded 20 22 $('.sidebar').css('height', $('.column-1').height()); 21 23 … … 29 31 pageWidgets.originalSidebar = $first.closest('.widget').attr('data-sidebar'); 30 32 31 /**32 *33 */34 33 $('#sidebar_admin #widget-list, #sidebar_admin #sidebar-widget-list').children('.widget').draggable({ 35 34 connectToSortable: '.sidebar', … … 52 51 }); 53 52 54 /**55 *56 */57 53 $('.column-2 .sidebar').droppable({ 58 54 accept: '.widget', … … 61 57 }); 62 58 63 /**64 *65 */66 59 $('.column-2 .sidebar').sortable({ 67 60 placeholder: 'placeholder', … … 102 95 103 96 /** 104 * When the close link is clicked on a widget or a sidebar105 * hide the widget-inside element.106 */97 * When the close link is clicked on a widget or a sidebar 98 * hide the widget-inside element. 99 */ 107 100 $('a.widget-control-close').live('click', function(e){ 108 101 e.preventDefault(); … … 111 104 112 105 /** 113 * When an avilable widget is clicked, show the description114 */106 * When an avilable widget is clicked, show the description 107 */ 115 108 $('.column-1 .widget-action').live('click', function(e) { 116 109 e.preventDefault(); … … 119 112 120 113 /** 121 * When the arrown on an active widget is clicked, show the form options122 */114 * When the arrown on an active widget is clicked, show the form options 115 */ 123 116 $('.column-2 .widget-action').live('click', function(e) { 124 117 e.preventDefault(); … … 127 120 128 121 /** 129 * When the delete link is clicked on a widget, remove it from130 * the DOM and save the sidebar's state.131 */122 * When the delete link is clicked on a widget, remove it from 123 * the DOM and save the sidebar's state. 124 */ 132 125 $('.column-2 .widget-control-remove').live('click', function(e) { 133 126 e.preventDefault(); … … 137 130 138 131 /** 139 * When the save button of an active widget is clicked, make an140 * AJAX request and save the form data.141 */132 * When the save button of an active widget is clicked, make an 133 * AJAX request and save the form data. 134 */ 142 135 $('.column-2 .widget-control-save').live('click', function(e) { 143 136 e.preventDefault(); … … 146 139 147 140 /** 148 * When a sidebar is clicked set this objects sidebar and originalSidebar149 * attributes, and make an AJAX request to get the active widgets for that150 * sidebar.151 */141 * When a sidebar is clicked set this objects sidebar and originalSidebar 142 * attributes, and make an AJAX request to get the active widgets for that 143 * sidebar. 144 */ 152 145 $('.column-3 .widget-top').live('click', function(e) { 153 146 e.preventDefault(); … … 183 176 }); 184 177 185 /**186 * When the save button of a sidebar is clicked, do an AJAX request187 * and save the form data.188 */178 /** 179 * When the save button of a sidebar is clicked, do an AJAX request 180 * and save the form data. 181 */ 189 182 $('.column-3 .widget-control-save').live('click', function(e) { 190 183 e.preventDefault(); … … 211 204 }, 212 205 206 /** 207 *@method save 208 */ 213 209 save : function save(widget, del, animate, order) { 214 210 var data, a; … … 254 250 } 255 251 }, 256 252 253 /** 254 * When calling the widgets-order AJAX action, you must post 255 * ALL of the sidebars and widgets, not just the one(s) you are 256 * updating. 257 * @method saveOrder 258 */ 257 259 saveOrder : function saveOrder() { 258 var a; 259 /** 260 * When calling the widgets-order AJAX action, you must post 261 * ALL of the sidebars and widgets, not just the one(s) you are 262 * updating. 263 */ 260 var a, sidebar; 261 264 262 a = { 265 263 action: 'widgets-order', … … 284 282 ); 285 283 }, 286 284 285 /** 286 * @method close 287 */ 287 288 close : function close(widget) { 288 289 widget.children('.widget-inside').slideUp('fast', function(){ -
voce-post-widgets/trunk/voce-post-widgets.php
r630182 r630205 5 5 Description: A better interface for managing your widgets. 6 6 Author: johnciacia, markparolisi, voceplatforms 7 Version: 0. 47 Version: 0.5 8 8 Author URI: http://vocecommunications.com 9 License: GPLv2 or later 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 11 */ 10 12
Note: See TracChangeset
for help on using the changeset viewer.