Foren

Drag-n-drop loss in custom theme?

thumbnail
Jakub B, geändert vor 13 Jahren.

Drag-n-drop loss in custom theme?

Junior Member Beiträge: 82 Beitrittsdatum: 12.08.09 Neueste Beiträge
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.
thumbnail
Szymon Gołębiewski, geändert vor 13 Jahren.

RE: Drag-n-drop loss in custom theme?

Regular Member Beiträge: 246 Beitrittsdatum: 08.06.09 Neueste Beiträge
Did you mess with portal.VM ?
thumbnail
Jakub B, geändert vor 13 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 82 Beitrittsdatum: 12.08.09 Neueste Beiträge
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
<div class="portlet-layout">
	<div class="lcontent650 portlet-column portlet-column-first" id="column-1">
		$processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
	</div>

	<div class="rcontent250 portlet-column portlet-column-last" id="column-2">
		$processor.processColumn("column-2", "portlet-column-content portlet-column-content-last")
	</div>
</div>
thumbnail
Jakub B, geändert vor 13 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 82 Beitrittsdatum: 12.08.09 Neueste Beiträge
Hmm...

And more review I think I found the cause:


		#if ($selectable)
			$theme.include($content_include)
		#else
			$portletDisplay.recycle()

			$portletDisplay.setTitle($the_title)

			$theme.wrapPortlet("portlet.vm", $content_include)
		#end


The
$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:

			$portletDisplay.recycle()

			$portletDisplay.setTitle($the_title)

			$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.
thumbnail
Jakub B, geändert vor 13 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 82 Beitrittsdatum: 12.08.09 Neueste Beiträge
Anyone? Nobody has ran into this type of 'drag-n-drop' issue before?
Dave Stewart, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

New Member Beiträge: 12 Beitrittsdatum: 09.08.11 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

New Member Beitrag: 1 Beitrittsdatum: 25.10.11 Neueste Beiträge
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
thumbnail
Jakub B, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 82 Beitrittsdatum: 12.08.09 Neueste Beiträge
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.
thumbnail
Parag Negi, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 69 Beitrittsdatum: 31.08.11 Neueste Beiträge
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
thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
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
thumbnail
Parag Negi, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 69 Beitrittsdatum: 31.08.11 Neueste Beiträge
Hi Sagar,

Yes, it was the themes...
Managed to fix it...i had changed css in it...and bit more...
All good now, thanks...
thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 35 Beitrittsdatum: 21.06.12 Neueste Beiträge
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
thumbnail
Sagar A Vyas, geändert vor 11 Jahren.

RE: Drag-n-drop loss in custom theme?

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
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, geändert vor 10 Jahren.

RE: Drag-n-drop loss in custom theme?

Junior Member Beiträge: 28 Beitrittsdatum: 19.01.11 Neueste Beiträge
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.

/* Provide some hit area for drag and drop */
.aui-dragging .portlet-column {
	min-height: 20px;
}
Graham York, geändert vor 6 Jahren.

RE: Drag-n-drop loss in custom theme?

New Member Beitrag: 1 Beitrittsdatum: 24.05.17 Neueste Beiträge
I had a similar problem in a custom theme, and this fix worked for me too.

In my case, the drag and drop worked intermittently. Sometimes the blue drag target would appear, sometimes it wouldn't.

This fix made it appear all the time

Thanks!!
thumbnail
Mazhar Alam, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Regular Member Beiträge: 191 Beitrittsdatum: 25.11.11 Neueste Beiträge
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
thumbnail
Raja Seth, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Regular Member Beiträge: 233 Beitrittsdatum: 18.08.11 Neueste Beiträge
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
thumbnail
Mazhar Alam, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

Regular Member Beiträge: 191 Beitrittsdatum: 25.11.11 Neueste Beiträge
Hi,
Did you find any solutions in regard to get back the drag/drop in custom theme..

Thanks in advance.
thumbnail
Jevon Wright, geändert vor 12 Jahren.

RE: Drag-n-drop loss in custom theme?

New Member Beiträge: 8 Beitrittsdatum: 06.12.11 Neueste Beiträge
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).