留言板

Drag-n-drop loss in custom theme?

thumbnail
Jakub B,修改在13 年前。

Drag-n-drop loss in custom theme?

Junior Member 帖子: 82 加入日期: 09-8-12 最近的帖子
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,修改在13 年前。

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

Regular Member 帖子: 246 加入日期: 09-6-8 最近的帖子
Did you mess with portal.VM ?
thumbnail
Jakub B,修改在13 年前。

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

Junior Member 帖子: 82 加入日期: 09-8-12 最近的帖子
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,修改在13 年前。

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

Junior Member 帖子: 82 加入日期: 09-8-12 最近的帖子
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,修改在13 年前。

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

Junior Member 帖子: 82 加入日期: 09-8-12 最近的帖子
Anyone? Nobody has ran into this type of 'drag-n-drop' issue before?
Dave Stewart,修改在12 年前。

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

New Member 帖子: 12 加入日期: 11-8-9 最近的帖子
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,修改在12 年前。

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

New Member 发布: 1 加入日期: 11-10-25 最近的帖子
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,修改在12 年前。

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

Junior Member 帖子: 82 加入日期: 09-8-12 最近的帖子
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,修改在12 年前。

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

Junior Member 帖子: 69 加入日期: 11-8-31 最近的帖子
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,修改在12 年前。

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

Liferay Master 帖子: 679 加入日期: 09-4-17 最近的帖子
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,修改在12 年前。

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

Junior Member 帖子: 69 加入日期: 11-8-31 最近的帖子
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,修改在12 年前。

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

Liferay Master 帖子: 679 加入日期: 09-4-17 最近的帖子
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,修改在11 年前。

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

Junior Member 帖子: 35 加入日期: 12-6-21 最近的帖子
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,修改在11 年前。

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

Liferay Master 帖子: 679 加入日期: 09-4-17 最近的帖子
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,修改在10 年前。

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

Junior Member 帖子: 28 加入日期: 11-1-19 最近的帖子
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,修改在6 年前。

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

New Member 发布: 1 加入日期: 17-5-24 最近的帖子
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,修改在12 年前。

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

Regular Member 帖子: 191 加入日期: 11-11-25 最近的帖子
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,修改在12 年前。

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

Regular Member 帖子: 233 加入日期: 11-8-18 最近的帖子
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,修改在12 年前。

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

Regular Member 帖子: 191 加入日期: 11-11-25 最近的帖子
Hi,
Did you find any solutions in regard to get back the drag/drop in custom theme..

Thanks in advance.
thumbnail
Jevon Wright,修改在12 年前。

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

New Member 帖子: 8 加入日期: 11-12-6 最近的帖子
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).