-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,42 @@ PrimeFacesExt = { | |
$(document).trigger("PrimeFacesExt.themeChanged", newValue); | ||
}, | ||
|
||
/** | ||
* Gets the currently loaded PF Theme. | ||
*/ | ||
getTheme : function() { | ||
var themeLink = $('link[href*="' + PrimeFaces.RESOURCE_IDENTIFIER + '/theme.css"]'); | ||
// portlet | ||
if (themeLink.length === 0) { | ||
themeLink = $('link[href*="' + PrimeFaces.RESOURCE_IDENTIFIER + '=theme.css"]'); | ||
} | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
cocorossello
|
||
var themeURL = themeLink.attr('href'), | ||
plainURL = themeURL.split('&')[0], | ||
oldTheme = plainURL.split('ln=primefaces-')[1]; | ||
|
||
return oldTheme; | ||
}, | ||
|
||
/** | ||
* Does this theme use Prime Icons? | ||
*/ | ||
isPrimeIconTheme: function(theme) { | ||
var theme = PrimeFacesExt.getTheme(); | ||
switch (theme) { | ||
case "nova-light": | ||
case "nova-dark": | ||
case "nova-colored": | ||
case "luna-blue": | ||
case "luna-amber": | ||
case "luna-green": | ||
case "luna-pink": | ||
return true; | ||
default: | ||
return false; | ||
}; | ||
}, | ||
|
||
/** | ||
* The name of the PrimeFaces Extensions resource library. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,33 @@ | |
.pe-timepicker-trigger .ui-icon-clock { | ||
left: 50%; | ||
} | ||
|
||
body .ui-prime-icons .ui-icon { | ||
This comment has been minimized.
Sorry, something went wrong.
jepsar
Member
|
||
font-family: 'primeicons'; | ||
speak: none; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
text-transform: none; | ||
line-height: 1; | ||
display: inline-block; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-indent: 0px !important; | ||
text-align: center; | ||
background: none; | ||
display: inline-block; | ||
font-size: 1.25em; | ||
} | ||
|
||
body .ui-prime-icons .ui-icon-clock:before { | ||
content: "\e940"; | ||
} | ||
|
||
body .ui-prime-icons .ui-icon-triangle-1-n:before { | ||
content: "\e933"; | ||
} | ||
|
||
body .ui-prime-icons .ui-icon-triangle-1-s:before { | ||
content: "\e930"; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,18 @@ PrimeFaces.widget.ExtTimePicker = PrimeFaces.widget.BaseWidget.extend({ | |
init : function(cfg) { | ||
this.id = cfg.id; | ||
this.jqId = PrimeFaces.escapeClientId(cfg.id); | ||
this.container = $(this.jqId); | ||
this.jqEl = cfg.modeInline ? this.jqId + '_inline' : this.jqId + '_input'; | ||
this.jq = $(this.jqEl); | ||
|
||
// configure localized text | ||
this.cfg = PrimeFacesExt.configureLocale('TimePicker', cfg); | ||
|
||
// GitHub #723: Fix for PrimeIcon themes | ||
if (PrimeFacesExt.isPrimeIconTheme()) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
melloware
Author
Member
|
||
this.container.addClass('ui-prime-icons'); | ||
} | ||
|
||
if (this.cfg.showPeriod) { | ||
this.amHours = {}; | ||
this.pmHours = {}; | ||
|
Hi, this fails with omnifaces combined resource handler. Is there any workaround?