Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
J B
Drag-n-drop loss in custom theme?
February 3, 2011 1:47 PM
Answer

J B

Rank: Junior Member

Posts: 82

Join Date: August 12, 2009

Recent Posts

Maybe it is me, but I used the 7cogs theme as reference, and find that my portlets are not drag and drop capable. What am I missing do you think? What should I look for, I have left the base portlet.css file alone, as well as the structure intact (javascript related).

Are there some JS dependancies that I am missing perhaps? I have no way to know.

Would appreciate any suggestions for getting the drag-n-drop ability back.
Szymon Gołębiewski
RE: Drag-n-drop loss in custom theme?
February 4, 2011 7:39 AM
Answer

Szymon Gołębiewski

Rank: Regular Member

Posts: 247

Join Date: June 8, 2009

Recent Posts

Did you mess with portal.VM ?
J B
RE: Drag-n-drop loss in custom theme?
February 10, 2011 1:29 PM
Answer

J B

Rank: Junior Member

Posts: 82

Join Date: August 12, 2009

Recent Posts

I'm assuming you mean 'portlet.vm' ?

And no I didn't touch it, I'm kinda stumped what the problem is, no drag and drop. I am not getting any JS errors either. Maybe my usage of jQuery is interfereing with AUI... hmmm... I'll have to dig a little more.

After comparing the standard '2_columns_iii.tpl' layouttpl. I find that my custom tpl is no different (save for me using a defined width vs aui-w70, etc.

I can enable drag & drop by using a 'standard' template, but as soon as I enable my custom one, I get d&d disabled (no drag icon either).

My code for my template:

fngp-2-col.tpl
 1<div class="portlet-layout">
 2    <div class="lcontent650 portlet-column portlet-column-first" id="column-1">
 3        $processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
 4    </div>
 5
 6    <div class="rcontent250 portlet-column portlet-column-last" id="column-2">
 7        $processor.processColumn("column-2", "portlet-column-content portlet-column-content-last")
 8    </div>
 9</div>
J B
RE: Drag-n-drop loss in custom theme?
February 10, 2011 1:32 PM
Answer

J B

Rank: Junior Member

Posts: 82

Join Date: August 12, 2009

Recent Posts

Hmm...

And more review I think I found the cause:

 1
 2        #if ($selectable)
 3            $theme.include($content_include)
 4        #else
 5            $portletDisplay.recycle()
 6
 7            $portletDisplay.setTitle($the_title)
 8
 9            $theme.wrapPortlet("portlet.vm", $content_include)
10        #end


The
1$theme.include($content_include)
piece seems to make it NON drag&dropable. So what does 'selectable' do for me? What sets this?

I tried removing the if wrap around it and just leaving it:

1            $portletDisplay.recycle()
2
3            $portletDisplay.setTitle($the_title)
4
5            $theme.wrapPortlet("portlet.vm", $content_include)


And it works fine, I can now do drag & drop again.

Thoughts? I'm missing something here why this is in place in the theme.
J B
RE: Drag-n-drop loss in custom theme?
February 24, 2011 6:44 AM
Answer

J B

Rank: Junior Member

Posts: 82

Join Date: August 12, 2009

Recent Posts

Anyone? Nobody has ran into this type of 'drag-n-drop' issue before?
Dave S
RE: Drag-n-drop loss in custom theme?
September 28, 2011 11:45 AM
Answer

Dave S

Rank: New Member

Posts: 11

Join Date: August 9, 2011

Recent Posts

What worked for me:

Make sure your layouts include the following general structure (if using Liferay 6)--

<div id="main-content" role="main">
<div class="portlet-layout">
<div id="container_query">
<div id="content_query" class="clearfix">
<div class="portlet-column" id="column-1">
$processor.processColumn("column-1")
</div>
<div class="portlet-column" id="column-2">
$processor.processColumn("column-2")
</div>
</div>
</div>

When I left out the <div id="main-content" role="main"> around everything, the drag-and-drop seemed to break.
Hendrik Jablonski
RE: Drag-n-drop loss in custom theme?
October 25, 2011 3:55 AM
Answer

Hendrik Jablonski

Rank: New Member

Posts: 1

Join Date: October 25, 2011

Recent Posts

Hi Jakub,

i missed the following line in my portal_normal.vm (bottom)

$theme.include($bottom_include)

After that I was able to do D&D and was also capable to drag new portlets to the page from the menu
J B
RE: Drag-n-drop loss in custom theme?
October 31, 2011 8:25 AM
Answer

J B

Rank: Junior Member

Posts: 82

Join Date: August 12, 2009

Recent Posts

I'm still running into this issue using a custom layout.
My structure is identical but still I loose the ability to drag and drop (the move icon is missing!?)

There is no JS issue (firebug / chrome debugger doesn't show anything).
I'm not sure whats going on, its like the custom layout breaks the movement.
Parag Negi
RE: Drag-n-drop loss in custom theme?
November 29, 2011 7:48 AM
Answer

Parag Negi

Rank: Junior Member

Posts: 71

Join Date: August 31, 2011

Recent Posts

Hi Jakub,

I am having same issue.
Can't see drag drop for portlets and also controls to max/min/cingof. etc...
Please advise

Thanks
Sagar A Vyas
RE: Drag-n-drop loss in custom theme?
November 29, 2011 8:32 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Parag Negi:
Hi Jakub,

I am having same issue.
Can't see drag drop for portlets and also controls to max/min/cingof. etc...
Please advise

Thanks


HI Parag,

Did you change anything in theme ?

Which version you are using ?

Thanks,
Sagar Vyas
Jevon Wright
RE: Drag-n-drop loss in custom theme?
December 14, 2011 6:31 PM
Answer

Jevon Wright

Rank: New Member

Posts: 8

Join Date: December 5, 2011

Recent Posts

Dave S:
What worked for me:

...

When I left out the <div id="main-content" role="main"> around everything, the drag-and-drop seemed to break.


The "main-content" ID seems especially critical to enable drag-drop (Liferay 6.1 here).
Mazhar Alam
RE: Drag-n-drop loss in custom theme?
December 14, 2011 11:14 PM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 201

Join Date: November 25, 2011

Recent Posts

Hi parag,
Did you find any solution regarding the drag/drop controls,which was not showing up in custom theme..?

Appreciate ur quick response.

Thanks
Raja Seth
RE: Drag-n-drop loss in custom theme?
December 15, 2011 3:31 AM
Answer

Raja Seth

Rank: Regular Member

Posts: 217

Join Date: August 18, 2011

Recent Posts

HI Jakub,

I faced the same issue. My problem was due to change in css. Try to find out what exactly the change is there in css for the portlet.

Regards,
Raja
Mazhar Alam
RE: Drag-n-drop loss in custom theme?
December 15, 2011 4:06 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 201

Join Date: November 25, 2011

Recent Posts

Hi,
Did you find any solutions in regard to get back the drag/drop in custom theme..

Thanks in advance.
Parag Negi
RE: Drag-n-drop loss in custom theme?
December 16, 2011 6:59 AM
Answer

Parag Negi

Rank: Junior Member

Posts: 71

Join Date: August 31, 2011

Recent Posts

Hi Sagar,

Yes, it was the themes...
Managed to fix it...i had changed css in it...and bit more...
All good now, thanks...
Sagar A Vyas
RE: Drag-n-drop loss in custom theme?
December 16, 2011 7:37 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Parag Negi:
Hi Sagar,

Yes, it was the themes...
Managed to fix it...i had changed css in it...and bit more...
All good now, thanks...



Hi Parag .

Yap As I guess emoticon

Good to here its working now emoticon

Thanks for update,
Sagar Vyas
Jawwad Farooq
RE: Drag-n-drop loss in custom theme?
July 10, 2012 6:17 AM
Answer

Jawwad Farooq

Rank: Junior Member

Posts: 35

Join Date: June 21, 2012

Recent Posts

Parag Negi:
Hi Sagar,

Yes, it was the themes...
Managed to fix it...i had changed css in it...and bit more...
All good now, thanks...



What did you do? Please share the steps
Sagar A Vyas
RE: Drag-n-drop loss in custom theme?
July 10, 2012 6:33 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Hi Jawwad,

Would you please revert the changes you have made in theme ?

And redeploy it again,

Basically this kind of problem comes cause of some malfunction in jQuery id conflicting.

You might see some js error on error console of your browser .

You solve this problem by trial and error method only.

Hope this make sense.

Thanks,
Sagar Vyas
Richard Lee
RE: Drag-n-drop loss in custom theme?
March 10, 2014 10:40 PM
Answer

Richard Lee

Rank: Junior Member

Posts: 28

Join Date: January 18, 2011

Recent Posts

Jawwad Farooq:
Parag Negi:
Hi Sagar,

Yes, it was the themes...
Managed to fix it...i had changed css in it...and bit more...
All good now, thanks...



What did you do? Please share the steps


Default LR layouts uses display:table-cell for columns which will give you a "hit area" to drag things into. If you change your columns to float with display: block (as with Bootstrap grid) you will lose this hit area so you will need to add min-height so they're not collapsed and have a hit area to drag into.

1/* Provide some hit area for drag and drop */
2.aui-dragging .portlet-column {
3    min-height: 20px;
4}