掲示板

Drag-n-drop loss in custom theme?

thumbnail
13年前 に Jakub B によって更新されました。

Drag-n-drop loss in custom theme?

Junior Member 投稿: 82 参加年月日: 09/08/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
13年前 に Szymon Gołębiewski によって更新されました。

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

Regular Member 投稿: 246 参加年月日: 09/06/08 最新の投稿
Did you mess with portal.VM ?
thumbnail
13年前 に Jakub B によって更新されました。

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

Junior Member 投稿: 82 参加年月日: 09/08/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
13年前 に Jakub B によって更新されました。

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

Junior Member 投稿: 82 参加年月日: 09/08/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
13年前 に Jakub B によって更新されました。

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

Junior Member 投稿: 82 参加年月日: 09/08/12 最新の投稿
Anyone? Nobody has ran into this type of 'drag-n-drop' issue before?
12年前 に Dave Stewart によって更新されました。

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

New Member 投稿: 12 参加年月日: 11/08/09 最新の投稿
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.
12年前 に Hendrik Jablonski によって更新されました。

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
12年前 に Jakub B によって更新されました。

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

Junior Member 投稿: 82 参加年月日: 09/08/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
12年前 に Parag Negi によって更新されました。

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

Junior Member 投稿: 69 参加年月日: 11/08/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
12年前 に Sagar A Vyas によって更新されました。

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

Liferay Master 投稿: 679 参加年月日: 09/04/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
12年前 に Parag Negi によって更新されました。

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

Junior Member 投稿: 69 参加年月日: 11/08/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
12年前 に Sagar A Vyas によって更新されました。

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

Liferay Master 投稿: 679 参加年月日: 09/04/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
11年前 に Jawwad Farooq によって更新されました。

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

Junior Member 投稿: 35 参加年月日: 12/06/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
11年前 に Sagar A Vyas によって更新されました。

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

Liferay Master 投稿: 679 参加年月日: 09/04/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
10年前 に Richard Lee によって更新されました。

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

Junior Member 投稿: 28 参加年月日: 11/01/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;
}
6年前 に Graham York によって更新されました。

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

New Member 投稿: 1 参加年月日: 17/05/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
12年前 に Mazhar Alam によって更新されました。

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
12年前 に Raja Seth によって更新されました。

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

Regular Member 投稿: 233 参加年月日: 11/08/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
12年前 に Mazhar Alam によって更新されました。

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
12年前 に Jevon Wright によって更新されました。

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

New Member 投稿: 8 参加年月日: 11/12/06 最新の投稿
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).