Skip to content

Commit

Permalink
important bug fix in drag-n-drop
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjonsson committed Aug 28, 2014
1 parent f30f0e3 commit c0a4ff4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion arlima.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://github.com/victorjonsson/Arlima
Description: Manage the order of posts on your front page, or any page you want. This is a plugin suitable for online newspapers that's in need of a fully customizable front page.
Author: VK (<a href="http://twitter.com/chredd">@chredd</a>, <a href="http://twitter.com/znoid">@znoid</a>, <a href="http://twitter.com/victor_jonsson">@victor_jonsson</a>, <a href="http://twitter.com/lefalque">@lefalque</a>)
Version: 3.0.beta.45
Version: 3.0.beta.46
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
Expand Down
2 changes: 1 addition & 1 deletion constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
or define('ARLIMA_COMPILE_LESS_IN_BROWSER', ARLIMA_DEV_MODE);

// Plugin version (only edit this via grunt!)
define('ARLIMA_FILE_VERSION', '3.0.beta.45' .(ARLIMA_DEV_MODE ? '__'.time():''));
define('ARLIMA_FILE_VERSION', '3.0.beta.46' .(ARLIMA_DEV_MODE ? '__'.time():''));

// Which type of tag to use for images in Arlima RSS feeds
defined('ARLIMA_RSS_IMG_TAG')
Expand Down
4 changes: 2 additions & 2 deletions js/arlima/arlima.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions js/arlima/dev/ArlimaNestedSortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,6 @@ function arlimaNestedSortable(list) {
listContainerElem = ui.item.closest('.article-list').get(0),
itemIndex = ui.item.prevAll().length;

if ( ui.item[0].arlimaArticle.isDivider() && _nextIsChild(ui) ) {
$(this).sortable('cancel');
return false;
}

if( ui.item.hasClass('ui-draggable') ) {
// this item is taken care of in the recieve event
return;
Expand All @@ -257,6 +252,11 @@ function arlimaNestedSortable(list) {
return false;
}

if ( ui.item[0].arlimaArticle.isDivider() && _nextIsChild(ui) ) {
$(this).sortable('cancel');
return false;
}

if( list.data.isImported ) {
ui.item[0].arlimaArticle.listID = listContainerElem.arlimaList.data.id;
ui.item[0].arlimaArticle.addClickEvents( !list.data.isImported );
Expand Down Expand Up @@ -346,7 +346,7 @@ function arlimaNestedSortable(list) {

// Check if divider is inside a group, if so add
// red background to helper object
if ( ui.item[0].arlimaArticle.isDivider() ) {
if ( ui.item[0].arlimaArticle && ui.item[0].arlimaArticle.isDivider() ) {
ui.placeholder.css('background-color', _nextIsChild(ui) ? 'red' : '');
}

Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: @chredd, @znoid, @victor_jonsson, @lefalque, @aaslun
Tags: CMS, e-paper, e-magazine, magazine, newspaper, front page, wysiwyg
Requires at least: 3.8
Tested up to: 3.9.1
Stable tag: 3.0.beta.45
Stable tag: 3.0.beta.46
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down

0 comments on commit c0a4ff4

Please sign in to comment.