-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #785 from AlaaN-Smadi/commonIcons
Common icons
- Loading branch information
Showing
25 changed files
with
2,972 additions
and
843 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
font-style: normal; | ||
font-weight: 400; | ||
src: url('../fonticons/MaterialIcons-Regular.eot'); | ||
src: url('../fonticons/Material Icons') format('embedded-opentype'), | ||
url('../fonticonsMaterialIcons-Regular') format('embedded-opentype'), | ||
src: url('../fonticons/Material Icons') format('embedded-opentype'), | ||
url('../fonticons/MaterialIcons-Regular') format('embedded-opentype'), | ||
url('../fonticons/MaterialIcons-Regular.woff2') format('woff2'), | ||
url('../fonticons/MaterialIcons-Regular.woff') format('woff'), | ||
url('../fonticons/MaterialIcons-Regular.ttf') format('truetype'), | ||
url('../fonticons/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); | ||
url('../../styles/icons/[email protected]/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); | ||
} | ||
|
||
.material-icons { | ||
|
@@ -34,4 +34,4 @@ | |
|
||
/* Support for IE. */ | ||
font-feature-settings: 'liga'; | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -863,6 +863,7 @@ var buildfire = { | |
var disableBootstrap = (buildfire.options && buildfire.options.disableBootstrap) ? buildfire.options.disableBootstrap : false; | ||
var disableTheme = (buildfire.options && buildfire.options.disableTheme) ? buildfire.options.disableTheme : false; | ||
var enableMDTheme = (buildfire.options && buildfire.options.enableMDTheme) ? buildfire.options.enableMDTheme : false; | ||
var disableFontIcons = (buildfire.options && buildfire.options.disableFontIcons) ? buildfire.options.disableFontIcons : false; | ||
|
||
if (!disableTheme && !enableMDTheme) { | ||
if(!disableTheme && !disableBootstrap){ | ||
|
@@ -901,6 +902,33 @@ var buildfire = { | |
} | ||
} | ||
|
||
const attachFontIcons = function(theme) { | ||
const fontIconLinkId = 'bfFontIcons'; | ||
|
||
let iconPack; | ||
if (theme && theme.icons && theme.icons.iconPack) { | ||
iconPack = theme.icons.iconPack; | ||
} else { | ||
iconPack = 'glyph'; | ||
} | ||
|
||
let fontFilePath = ''; | ||
|
||
switch (iconPack) { | ||
case 'bootstrap': | ||
fontFilePath = '/styles/icons/[email protected]/bf-bootstrap-icons.css'; | ||
break; | ||
default: | ||
fontFilePath = '/styles/icons/[email protected]/bf-glyph-icons.css'; | ||
break; | ||
} | ||
|
||
if (fontFilePath) { | ||
buildfire.appearance._attachAppCSSFiles(fontFilePath, fontIconLinkId); | ||
} | ||
}; | ||
|
||
|
||
buildfire.appearance.getWidgetTheme(function(err, theme) { | ||
if (err) return console.error(err); | ||
var bfWidgetTheme = document.createElement('style'); | ||
|
@@ -909,6 +937,13 @@ var buildfire = { | |
bfWidgetTheme.innerHTML = buildfire.appearance._getCommonCss(theme); | ||
(document.head || document.body).appendChild(bfWidgetTheme); | ||
files.push('styles/bfUIElements.css'); | ||
|
||
if (!disableFontIcons && | ||
((window.location.pathname.indexOf('/widget/') >= 0 && (disableTheme || enableMDTheme)) | ||
|| window.location.pathname.indexOf('/control/'))) { | ||
// if appTheme.css is loaded, common css will be referenced already | ||
attachFontIcons(theme); | ||
} | ||
}); | ||
|
||
if (enableMDTheme) { | ||
|
@@ -1093,7 +1128,7 @@ var buildfire = { | |
FastClick.attach(element); | ||
} | ||
, attachAppThemeCSSFiles: function (appId, liveMode, appHost) { | ||
const cssUrl = `${appHost}/api/app/styles/appTheme.css?appId=${appId}&liveMode=${liveMode}&v=${buildfire.appearance.CSSBusterCounter}`; | ||
const cssUrl = `${appHost}/api/app/styles/appTheme.css?appId=${appId}&liveMode=${liveMode}&v=${buildfire.appearance.CSSBusterCounter}&isWeb=true`; | ||
this._attachAppCSSFiles(cssUrl, 'appThemeCSS'); | ||
} | ||
, attachLocalAppThemeCSSFiles: function (appId) { | ||
|
@@ -4078,7 +4113,7 @@ var buildfire = { | |
if (typeof tinymce !== 'undefined' && tinymce.init && tinymce.isBuildfire) { | ||
var appContext = buildfire.getContext(); | ||
if (appContext && appContext.endPoints) { | ||
var appTheme = appContext.endPoints.appHost + '/api/app/styles/appTheme.css?appId=' + appContext.appId + '&liveMode=' + appContext.liveMode; | ||
var appTheme = appContext.endPoints.appHost + '/api/app/styles/appTheme.css?appId=' + appContext.appId + '&liveMode=' + appContext.liveMode + '&isWeb=true'; | ||
var originalTinymceInit = tinymce.init.bind(tinymce); | ||
|
||
tinymce.init = function(options) { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.