modifying calendar (liferay 7.1, GA5)

bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
i got these buttons i need to remove:
<div class="col-xs-5 form-inline scheduler-base-views yui3-widget btn-group btn-group-content" id="yui_patched_v3_18_1_1_1521706870747_424" aria-multiselectable="false" role="listbox"><select class="form-control visible-xs"></select></div>

<-- those 3 buttons on right
and i cant find where they are coming from and what i should delete. I am on liferay 7 GA5 Any help is appericated!
thumbnail
Sushil Patidar,修改在8 年前。 Expert 帖子: 467 加入日期: 11-10-31 最近的帖子
Hi,

Easiest solution would be to hide it using css. The other would be to customize files jsp from where it is generated.

Regards
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Sushil Patidar:
Hi,

Easiest solution would be to hide it using css. The other would be to customize files jsp from where it is generated.

Regards



these automatically generated css'es arent really best way to delete suff... which css i should modify?
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Does anyone know which file creates calendar stuff?
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
bernie lameo:
Does anyone know which file creates calendar stuff?


You seem to have edited your original question. Could you edit it back to get some context?
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Olaf Kock:
bernie lameo:
Does anyone know which file creates calendar stuff?


You seem to have edited your original question. Could you edit it back to get some context?



made post better
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
bernie lameo:
these automatically generated css'es arent really best way to delete suff... which css i should modify?


You'll probably need to use a hierarchical description, e.g. use your browser's developer tools, find the buttons you want to hide, then inspect the DOM and its classes upwards from there.

Without looking at any actual DOM, it might end up similar to this (the following CSS is guaranteed not to be sufficient - it should only demonstrate the strategy):
.calendar-portlet .scheduler-base-views .form-control { display: none; }


As I don't know what else is on the page, you'll probably need to identify what exactly you need that doesn't hide any other elements that you want to keep. Where you change this CSS (page level, look&feel of this one portlet or theme) is up to you - depending on where want to remove those buttons.
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
none of my liferay files(master or portal) have line
.calendar-portlet .scheduler-base-views 
string in any file.
thumbnail
Sushil Patidar,修改在8 年前。 Expert 帖子: 467 加入日期: 11-10-31 最近的帖子
bernie lameo:
none of my liferay files(master or portal) have line
.calendar-portlet .scheduler-base-views 
string in any file.


Hint was to add css specific to portlet using
portlet class: calendar-portlet
view class:scheduler-base-views
control class:form-control

To be more specific you can add following css to your the theme which is applied on the page containing calendar portlet.

.calendar-portlet .scheduler-base-controls button.scheduler-base-icon-prev{display: none;}
.calendar-portlet .scheduler-base-controls button.scheduler-base-today{display: none;}
.calendar-portlet .scheduler-base-controls button.scheduler-base-icon-next{display: none;}

Regards
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
bernie lameo:
none of my liferay files(master or portal) have line
.calendar-portlet .scheduler-base-views 
string in any file.


That's exactly why I preceded the CSS I wrote with

Olaf Kock:
Without looking at any actual DOM, it might end up similar to this (the following CSS is guaranteed not to be sufficient - it should only demonstrate the strategy)
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Olaf Kock:
bernie lameo:
none of my liferay files(master or portal) have line
.calendar-portlet .scheduler-base-views 
string in any file.


That's exactly why I preceded the CSS I wrote with

Olaf Kock:
Without looking at any actual DOM, it might end up similar to this (the following CSS is guaranteed not to be sufficient - it should only demonstrate the strategy)



this worked! just had to shove it to scss
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
bernie lameo:
this worked! just had to shove it to scss


You mean I accidentally uttered not pseudo code (as declared) but usable code? Amazing. I'm afk for a while, recruiting an army of monkeys and buy typewriters to write the next Shakespeare novel. emoticon

Thanks for reporting back.
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Olaf Kock:
bernie lameo:
this worked! just had to shove it to scss


You mean I accidentally uttered not pseudo code (as declared) but usable code? Amazing. I'm afk for a while, recruiting an army of monkeys and buy typewriters to write the next Shakespeare novel. emoticon

Thanks for reporting back.



How can I do this to div's? heres example div's:
<div class="calendar-portlet-column-toggler" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnToggler">
 <i class="icon-caret-left" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnTogglerIcon"></i> </div>

and
<div class="calendar-portlet-list"> <div class="calendar-portlet-list-header toggler-header-expanded">
 <span class="calendar-portlet-list-arrow"></span> 
<span class="calendar-portlet-list-text">Liferay's Calendars</span>
 </div> <div class="calendar-portlet-calendar-list" id="_com_liferay_calendar_web_portlet_CalendarPortlet_siteCalendarList"></div>
 </div>
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
could you edit your post and
  • format the divs to be multiline instead of 4m wide
  • name which div you're trying to target

?
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Olaf Kock:
could you edit your post and
  • format the divs to be multiline instead of 4m wide
  • name which div you're trying to target

?



i added more specific divs and fixed lining. i want to target all of divs but some divs are inside other div...
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
bernie lameo:
i added more specific divs and fixed lining. i want to target all of divs but some divs are inside other div...


Thanks for the edit. I'm not sure I get it right, but you're aware that CSS can easily address nested divs? e.g. address class attributes with dot, id attributes with hash, separated with space?

E.g.

.outer-class .inner-class { background: green; }
#outer-id .inner-class {background: red; }
.calendar-portlet-list .calendar-portlet-list-text { color: blue; }
.calendar-portlet-list #_com_liferay_calendar_web_portlet_CalendarPortlet_siteCalendarList { border:5px red dotted; }
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Olaf Kock:
bernie lameo:
i added more specific divs and fixed lining. i want to target all of divs but some divs are inside other div...


Thanks for the edit. I'm not sure I get it right, but you're aware that CSS can easily address nested divs? e.g. address class attributes with dot, id attributes with hash, separated with space?

E.g.

.outer-class .inner-class { background: green; }
#outer-id .inner-class {background: red; }
.calendar-portlet-list .calendar-portlet-list-text { color: blue; }
.calendar-portlet-list #_com_liferay_calendar_web_portlet_CalendarPortlet_siteCalendarList { border:5px red dotted; }



worked on list-header, but cant get this to work to this:
<div class="calendar-portlet-column-toggler" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnToggler">
 <i class="icon-caret-left" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnTogglerIcon"></i> </div>
thumbnail
Olaf Kock,修改在8 年前。 Liferay Legend 帖子: 6441 加入日期: 08-9-23 最近的帖子
bernie lameo:
worked on list-header, but cant get this to work to this:
<div class="calendar-portlet-column-toggler" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnToggler">
 <i class="icon-caret-left" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnTogglerIcon"></i> </div>


experiment with the CSS selector in your browser's developer tools: You can enter new CSS there and see if it works. Sprinkle in !important if you think it should work but it doesn't. In the end it's best if you get along without !important, but it can help figuring out what's required - then be more specific in your CSS selector.
bernie lameo,修改在8 年前。 New Member 帖子: 22 加入日期: 18-3-20 最近的帖子
Olaf Kock:
bernie lameo:
worked on list-header, but cant get this to work to this:
<div class="calendar-portlet-column-toggler" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnToggler">
 <i class="icon-caret-left" id="_com_liferay_calendar_web_portlet_CalendarPortlet_columnTogglerIcon"></i> </div>


experiment with the CSS selector in your browser's developer tools: You can enter new CSS there and see if it works. Sprinkle in !important if you think it should work but it doesn't. In the end it's best if you get along without !important, but it can help figuring out what's required - then be more specific in your CSS selector.



Had to hide more stuff to get rid of it, solved now