-
Tomaselli
-
-
Online
-
Elite Member
-
- Posts: 293
- Thank you received: 87
-
Karma: 46
-
|
for a better compatibility with other 3rd part extensions using already the bootstrap icons with the "icon-" prefix, I would just add a "glyphicon" class to the icon DOM element (it could be done in PHP at the output process for jcook-components OR by some JS script to fix existing icons in the page) and then modify the ROOT/administrator/components/com_mycomponent/dom/assets/glyphicon/css/icons.css in this way:
.glyphicon[class^="icon-"]:before,
.glyphicon[class*=" icon-"]:before{
content: none;
font-family: inherit;
}
.glyphicon[class^="icon-"],
.glyphicon[class*=" icon-"] {
background-image: url("../img/glyphicon.png") !important;
display: inline-block !important;
width: 14px !important;
height: 14px !important;
line-height: 14px !important;
vertical-align: text-top !important;
background-repeat: no-repeat !important;
// margin-top: 1px !important; /* NO NEEDED */
}
/* White icons */
.glyphicon.icon-white {
background-image: url("../img/glyphicon-white.png") !important;
}
/* Icons map */
.glyphicon.icon-glass{background-position:0 0;}
.glyphicon.icon-music{background-position:-24px 0;}
.glyphicon.icon-search{background-position:-48px 0;}
.glyphicon.icon-envelope{background-position:-72px 0;}
.glyphicon.icon-heart{background-position:-96px 0;}
.glyphicon.icon-star{background-position:-120px 0;}
.glyphicon.icon-star-empty{background-position:-144px 0;}
.glyphicon.icon-user{background-position:-168px 0;}
.glyphicon.icon-film{background-position:-192px 0;}
.glyphicon.icon-th-large{background-position:-216px 0;}
.glyphicon.icon-th{background-position:-240px 0;}
.glyphicon.icon-th-list{background-position:-264px 0;}
.glyphicon.icon-ok{background-position:-288px 0;}
.glyphicon.icon-remove{background-position:-312px 0;}
.glyphicon.icon-zoom-in{background-position:-336px 0;}
.glyphicon.icon-zoom-out{background-position:-360px 0;}
.glyphicon.icon-off{background-position:-384px 0;}
.glyphicon.icon-signal{background-position:-408px 0;}
.glyphicon.icon-cog{background-position:-432px 0;}
.glyphicon.icon-trash{background-position:-456px 0;}
.glyphicon.icon-home{background-position:0 -24px;}
.glyphicon.icon-file{background-position:-24px -24px;}
.glyphicon.icon-time{background-position:-48px -24px;}
.glyphicon.icon-road{background-position:-72px -24px;}
.glyphicon.icon-download-alt{background-position:-96px -24px;}
.glyphicon.icon-download{background-position:-120px -24px;}
.glyphicon.icon-upload{background-position:-144px -24px;}
.glyphicon.icon-inbox{background-position:-168px -24px;}
.glyphicon.icon-play-circle{background-position:-192px -24px;}
.glyphicon.icon-repeat{background-position:-216px -24px;}
.glyphicon.icon-refresh{background-position:-240px -24px;}
.glyphicon.icon-list-alt{background-position:-264px -24px;}
.glyphicon.icon-lock{background-position:-287px -24px;}
.glyphicon.icon-flag{background-position:-312px -24px;}
.glyphicon.icon-headphones{background-position:-336px -24px;}
.glyphicon.icon-volume-off{background-position:-360px -24px;}
.glyphicon.icon-volume-down{background-position:-384px -24px;}
.glyphicon.icon-volume-up{background-position:-408px -24px;}
.glyphicon.icon-qrcode{background-position:-432px -24px;}
.glyphicon.icon-barcode{background-position:-456px -24px;}
.glyphicon.icon-tag{background-position:0 -48px;}
.glyphicon.icon-tags{background-position:-25px -48px;}
.glyphicon.icon-book{background-position:-48px -48px;}
.glyphicon.icon-bookmark{background-position:-72px -48px;}
.glyphicon.icon-print{background-position:-96px -48px;}
.glyphicon.icon-camera{background-position:-120px -48px;}
.glyphicon.icon-font{background-position:-144px -48px;}
.glyphicon.icon-bold{background-position:-167px -48px;}
.glyphicon.icon-italic{background-position:-192px -48px;}
.glyphicon.icon-text-height{background-position:-216px -48px;}
.glyphicon.icon-text-width{background-position:-240px -48px;}
.glyphicon.icon-align-left{background-position:-264px -48px;}
.glyphicon.icon-align-center{background-position:-288px -48px;}
.glyphicon.icon-align-right{background-position:-312px -48px;}
.glyphicon.icon-align-justify{background-position:-336px -48px;}
.glyphicon.icon-list{background-position:-360px -48px;}
.glyphicon.icon-indent-left{background-position:-384px -48px;}
.glyphicon.icon-indent-right{background-position:-408px -48px;}
.glyphicon.icon-facetime-video{background-position:-432px -48px;}
.glyphicon.icon-picture{background-position:-456px -48px;}
.glyphicon.icon-pencil{background-position:0 -72px;}
.glyphicon.icon-map-marker{background-position:-24px -72px;}
.glyphicon.icon-adjust{background-position:-48px -72px;}
.glyphicon.icon-tint{background-position:-72px -72px;}
.glyphicon.icon-edit{background-position:-96px -72px;}
.glyphicon.icon-share{background-position:-120px -72px;}
.glyphicon.icon-check{background-position:-144px -72px;}
.glyphicon.icon-move{background-position:-168px -72px;}
.glyphicon.icon-step-backward{background-position:-192px -72px;}
.glyphicon.icon-fast-backward{background-position:-216px -72px;}
.glyphicon.icon-backward{background-position:-240px -72px;}
.glyphicon.icon-play{background-position:-264px -72px;}
.glyphicon.icon-pause{background-position:-288px -72px;}
.glyphicon.icon-stop{background-position:-312px -72px;}
.glyphicon.icon-forward{background-position:-336px -72px;}
.glyphicon.icon-fast-forward{background-position:-360px -72px;}
.glyphicon.icon-step-forward{background-position:-384px -72px;}
.glyphicon.icon-eject{background-position:-408px -72px;}
.glyphicon.icon-chevron-left{background-position:-432px -72px;}
.glyphicon.icon-chevron-right{background-position:-456px -72px;}
.glyphicon.icon-plus-sign{background-position:0 -96px;}
.glyphicon.icon-minus-sign{background-position:-24px -96px;}
.glyphicon.icon-remove-sign{background-position:-48px -96px;}
.glyphicon.icon-ok-sign{background-position:-72px -96px;}
.glyphicon.icon-question-sign{background-position:-96px -96px;}
.glyphicon.icon-info-sign{background-position:-120px -96px;}
.glyphicon.icon-screenshot{background-position:-144px -96px;}
.glyphicon.icon-remove-circle{background-position:-168px -96px;}
.glyphicon.icon-ok-circle{background-position:-192px -96px;}
.glyphicon.icon-ban-circle{background-position:-216px -96px;}
.glyphicon.icon-arrow-left{background-position:-240px -96px;}
.glyphicon.icon-arrow-right{background-position:-264px -96px;}
.glyphicon.icon-arrow-up{background-position:-289px -96px;}
.glyphicon.icon-arrow-down{background-position:-312px -96px;}
.glyphicon.icon-share-alt{background-position:-336px -96px;}
.glyphicon.icon-resize-full{background-position:-360px -96px;}
.glyphicon.icon-resize-small{background-position:-384px -96px;}
.glyphicon.icon-plus{background-position:-408px -96px;}
.glyphicon.icon-minus{background-position:-433px -96px;}
.glyphicon.icon-asterisk{background-position:-456px -96px;}
.glyphicon.icon-exclamation-sign{background-position:0 -120px;}
.glyphicon.icon-gift{background-position:-24px -120px;}
.glyphicon.icon-leaf{background-position:-48px -120px;}
.glyphicon.icon-fire{background-position:-72px -120px;}
.glyphicon.icon-eye-open{background-position:-96px -120px;}
.glyphicon.icon-eye-close{background-position:-120px -120px;}
.glyphicon.icon-warning-sign{background-position:-144px -120px;}
.glyphicon.icon-plane{background-position:-168px -120px;}
.glyphicon.icon-calendar{background-position:-192px -120px;}
.glyphicon.icon-random{background-position:-216px -120px;width:16px;}
.glyphicon.icon-comment{background-position:-240px -120px;}
.glyphicon.icon-magnet{background-position:-264px -120px;}
.glyphicon.icon-chevron-up{background-position:-288px -120px;}
.glyphicon.icon-chevron-down{background-position:-313px -119px;}
.glyphicon.icon-retweet{background-position:-336px -120px;}
.glyphicon.icon-shopping-cart{background-position:-360px -120px;}
.glyphicon.icon-folder-close{background-position:-384px -120px;}
.glyphicon.icon-folder-open{background-position:-408px -120px;width:16px;}
.glyphicon.icon-resize-vertical{background-position:-432px -119px;}
.glyphicon.icon-resize-horizontal{background-position:-456px -118px;}
.glyphicon.icon-hdd{background-position:0 -144px;}
.glyphicon.icon-bullhorn{background-position:-24px -144px;}
.glyphicon.icon-bell{background-position:-48px -144px;}
.glyphicon.icon-certificate{background-position:-72px -144px;}
.glyphicon.icon-thumbs-up{background-position:-96px -144px;}
.glyphicon.icon-thumbs-down{background-position:-120px -144px;}
.glyphicon.icon-hand-right{background-position:-144px -144px;}
.glyphicon.icon-hand-left{background-position:-168px -144px;}
.glyphicon.icon-hand-up{background-position:-192px -144px;}
.glyphicon.icon-hand-down{background-position:-216px -144px;}
.glyphicon.icon-circle-arrow-right{background-position:-240px -144px;}
.glyphicon.icon-circle-arrow-left{background-position:-264px -144px;}
.glyphicon.icon-circle-arrow-up{background-position:-288px -144px;}
.glyphicon.icon-circle-arrow-down{background-position:-312px -144px;}
.glyphicon.icon-globe{background-position:-336px -144px;}
.glyphicon.icon-wrench{background-position:-360px -144px;}
.glyphicon.icon-tasks{background-position:-384px -144px;}
.glyphicon.icon-filter{background-position:-408px -144px;}
.glyphicon.icon-briefcase{background-position:-432px -144px;}
.glyphicon.icon-fullscreen{background-position:-456px -144px;}
I would use the same technique for the icomoon.
In this way the integration with other Js plugins will be easier.
At the moment the icons system in joomla are a nightmare!
|
The following user(s) said Thank You: admin
|
-
Tomaselli
-
-
Online
-
Elite Member
-
- Posts: 293
- Thank you received: 87
-
Karma: 46
-
|
here the full modifications I made to fully integrate the bootstrap CSS with the JDOM icons generation and the JOOMLA default icons.
files to modify:
- dom\assets\bootstrap\css\bootstrap-legacy.css
- dom\assets\icomoon\css\icomoon-legacy.css
- dom\assets\glyphicon\css\icons.css
- dom\assets\icomoon\css\icomoon.css
- dom\framework\bootstrap\core.php
- dom\html\grid\task\state\default.php
- dom\html\grid\task\default.php
- dom\html\grid\task.php
- dom\html\icon.php
- dom\html\link\button\toolbar.php
search for /* hack */ to understand where the modifications are, OR compare with the original JDOM files to be sure about what I did.
dom\assets\bootstrap\css\bootstrap-legacy.css /* Compatibility for Joomla 1.6 to 2.5 : Tooltips fix*/
.tip-wrap {
max-width: inherit;
padding: inherit;
color: inherit;
text-align: inherit;
text-decoration: inherit;
background-color: inherit;
-webkit-border-radius: inherit;
-moz-border-radius: inherit;
border-radius: inherit;
z-index: inherit;
}
/* Some fixes to see correctly a drop-down menu included in btn-group or appended input */
.input-append i, .input-prepend i, .btn-group i{
font-size: 14px;
}
.input-append li, .input-prepend li, .btn-group li{
font-size: 12px !important;
padding:0;
}
#menu [class^="icon-"], #menu [class*=" icon-"]{
width:inherit !important;
}
/* hack */
div.modal.fade.in {
top: 50% !important;
}
/* hack */
dom\assets\icomoon\css\icomoon-legacy.css /* Desactivate .icon-* */
[class^="icon-"],
[class*=" icon-"] {
display: inherit;
width: inherit;
height: inherit;
*margin-right: inherit;
line-height: inherit;
}
/* Use a different name ._icon-* */
[class^="_icon-"],
[class*=" _icon-"] {
display: inline-block;
width: 14px;
height: 14px;
*margin-right: .3em;
line-height: 14px;
}
/* hack */
.btn-primary.active .icon-publish:before,
.btn-primary.active .icon-save:before,
.btn-primary.active .icon-ok:before,
.btn-primary.active .icon-checkmark:before,
.btn-warning.active .icon-publish:before,
.btn-warning.active .icon-save:before,
.btn-warning.active .icon-ok:before,
.btn-warning.active .icon-checkmark:before,
.btn-danger.active .icon-publish:before,
.btn-danger.active .icon-save:before,
.btn-danger.active .icon-ok:before,
.btn-danger.active .icon-checkmark:before,
.btn-success.active .icon-publish:before,
.btn-success.active .icon-save:before,
.btn-success.active .icon-ok:before,
.btn-success.active .icon-checkmark:before,
.btn-info.active .icon-publish:before,
.btn-info.active .icon-save:before,
.btn-info.active .icon-ok:before,
.btn-info.active .icon-checkmark:before,
.btn-inverse.active .icon-publish:before,
.btn-inverse.active .icon-save:before,
.btn-inverse.active .icon-ok:before,
.btn-inverse.active .icon-checkmark:before,
.btn-primary.active [class^="_icon-"]:before,
.btn-primary.active [class*=" _icon-"]:before,
.btn-warning.active [class^="_icon-"]:before,
.btn-warning.active [class*=" _icon-"]:before,
.btn-danger.active [class^="_icon-"]:before,
.btn-danger.active [class*=" _icon-"]:before,
.btn-success.active [class^="_icon-"]:before,
.btn-success.active [class*=" _icon-"]:before,
.btn-info.active [class^="_icon-"]:before,
.btn-info.active [class*=" _icon-"]:before,
.btn-inverse.active [class^="_icon-"]:before,
.btn-inverse.active [class*=" _icon-"]:before{
color: rgba(255, 255, 255, 0.95) !important;
}
/* fix for toolbar and status bar icons */
#status [class^="icon-"],
#status [class*=" icon-"],
#toolbar [class^="icon-"],
#toolbar [class*=" icon-"] {
background-image: none;
background-position: 0 0;
}
/* hack */
dom\assets\glyphicon\css\icons.css .glyphicon[class^="icon-"]:before,
.glyphicon[class*=" icon-"]:before{
content: none;
font-family: inherit;
}
.glyphicon[class^="icon-"],
.glyphicon[class*=" icon-"] {
background-image: url("../img/glyphicon.png") !important;
display: inline-block !important;
width: 14px !important;
height: 14px !important;
line-height: 14px !important;
vertical-align: text-top !important;
background-repeat: no-repeat !important;
}
/* White icons */
.glyphicon.icon-white {
background-image: url("../img/glyphicon-white.png") !important;
}
/* Icons map */
.glyphicon.icon-glass{background-position:0 0;}
.glyphicon.icon-music{background-position:-24px 0;}
.glyphicon.icon-search{background-position:-48px 0;}
.glyphicon.icon-envelope{background-position:-72px 0;}
.glyphicon.icon-heart{background-position:-96px 0;}
.glyphicon.icon-star{background-position:-120px 0;}
.glyphicon.icon-star-empty{background-position:-144px 0;}
.glyphicon.icon-user{background-position:-168px 0;}
.glyphicon.icon-film{background-position:-192px 0;}
.glyphicon.icon-th-large{background-position:-216px 0;}
.glyphicon.icon-th{background-position:-240px 0;}
.glyphicon.icon-th-list{background-position:-264px 0;}
.glyphicon.icon-ok{background-position:-288px 0;}
.glyphicon.icon-remove{background-position:-312px 0;}
.glyphicon.icon-zoom-in{background-position:-336px 0;}
.glyphicon.icon-zoom-out{background-position:-360px 0;}
.glyphicon.icon-off{background-position:-384px 0;}
.glyphicon.icon-signal{background-position:-408px 0;}
.glyphicon.icon-cog{background-position:-432px 0;}
.glyphicon.icon-trash{background-position:-456px 0;}
.glyphicon.icon-home{background-position:0 -24px;}
.glyphicon.icon-file{background-position:-24px -24px;}
.glyphicon.icon-time{background-position:-48px -24px;}
.glyphicon.icon-road{background-position:-72px -24px;}
.glyphicon.icon-download-alt{background-position:-96px -24px;}
.glyphicon.icon-download{background-position:-120px -24px;}
.glyphicon.icon-upload{background-position:-144px -24px;}
.glyphicon.icon-inbox{background-position:-168px -24px;}
.glyphicon.icon-play-circle{background-position:-192px -24px;}
.glyphicon.icon-repeat{background-position:-216px -24px;}
.glyphicon.icon-refresh{background-position:-240px -24px;}
.glyphicon.icon-list-alt{background-position:-264px -24px;}
.glyphicon.icon-lock{background-position:-287px -24px;}
.glyphicon.icon-flag{background-position:-312px -24px;}
.glyphicon.icon-headphones{background-position:-336px -24px;}
.glyphicon.icon-volume-off{background-position:-360px -24px;}
.glyphicon.icon-volume-down{background-position:-384px -24px;}
.glyphicon.icon-volume-up{background-position:-408px -24px;}
.glyphicon.icon-qrcode{background-position:-432px -24px;}
.glyphicon.icon-barcode{background-position:-456px -24px;}
.glyphicon.icon-tag{background-position:0 -48px;}
.glyphicon.icon-tags{background-position:-25px -48px;}
.glyphicon.icon-book{background-position:-48px -48px;}
.glyphicon.icon-bookmark{background-position:-72px -48px;}
.glyphicon.icon-print{background-position:-96px -48px;}
.glyphicon.icon-camera{background-position:-120px -48px;}
.glyphicon.icon-font{background-position:-144px -48px;}
.glyphicon.icon-bold{background-position:-167px -48px;}
.glyphicon.icon-italic{background-position:-192px -48px;}
.glyphicon.icon-text-height{background-position:-216px -48px;}
.glyphicon.icon-text-width{background-position:-240px -48px;}
.glyphicon.icon-align-left{background-position:-264px -48px;}
.glyphicon.icon-align-center{background-position:-288px -48px;}
.glyphicon.icon-align-right{background-position:-312px -48px;}
.glyphicon.icon-align-justify{background-position:-336px -48px;}
.glyphicon.icon-list{background-position:-360px -48px;}
.glyphicon.icon-indent-left{background-position:-384px -48px;}
.glyphicon.icon-indent-right{background-position:-408px -48px;}
.glyphicon.icon-facetime-video{background-position:-432px -48px;}
.glyphicon.icon-picture{background-position:-456px -48px;}
.glyphicon.icon-pencil{background-position:0 -72px;}
.glyphicon.icon-map-marker{background-position:-24px -72px;}
.glyphicon.icon-adjust{background-position:-48px -72px;}
.glyphicon.icon-tint{background-position:-72px -72px;}
.glyphicon.icon-edit{background-position:-96px -72px;}
.glyphicon.icon-share{background-position:-120px -72px;}
.glyphicon.icon-check{background-position:-144px -72px;}
.glyphicon.icon-move{background-position:-168px -72px;}
.glyphicon.icon-step-backward{background-position:-192px -72px;}
.glyphicon.icon-fast-backward{background-position:-216px -72px;}
.glyphicon.icon-backward{background-position:-240px -72px;}
.glyphicon.icon-play{background-position:-264px -72px;}
.glyphicon.icon-pause{background-position:-288px -72px;}
.glyphicon.icon-stop{background-position:-312px -72px;}
.glyphicon.icon-forward{background-position:-336px -72px;}
.glyphicon.icon-fast-forward{background-position:-360px -72px;}
.glyphicon.icon-step-forward{background-position:-384px -72px;}
.glyphicon.icon-eject{background-position:-408px -72px;}
.glyphicon.icon-chevron-left{background-position:-432px -72px;}
.glyphicon.icon-chevron-right{background-position:-456px -72px;}
.glyphicon.icon-plus-sign{background-position:0 -96px;}
.glyphicon.icon-minus-sign{background-position:-24px -96px;}
.glyphicon.icon-remove-sign{background-position:-48px -96px;}
.glyphicon.icon-ok-sign{background-position:-72px -96px;}
.glyphicon.icon-question-sign{background-position:-96px -96px;}
.glyphicon.icon-info-sign{background-position:-120px -96px;}
.glyphicon.icon-screenshot{background-position:-144px -96px;}
.glyphicon.icon-remove-circle{background-position:-168px -96px;}
.glyphicon.icon-ok-circle{background-position:-192px -96px;}
.glyphicon.icon-ban-circle{background-position:-216px -96px;}
.glyphicon.icon-arrow-left{background-position:-240px -96px;}
.glyphicon.icon-arrow-right{background-position:-264px -96px;}
.glyphicon.icon-arrow-up{background-position:-289px -96px;}
.glyphicon.icon-arrow-down{background-position:-312px -96px;}
.glyphicon.icon-share-alt{background-position:-336px -96px;}
.glyphicon.icon-resize-full{background-position:-360px -96px;}
.glyphicon.icon-resize-small{background-position:-384px -96px;}
.glyphicon.icon-plus{background-position:-408px -96px;}
.glyphicon.icon-minus{background-position:-433px -96px;}
.glyphicon.icon-asterisk{background-position:-456px -96px;}
.glyphicon.icon-exclamation-sign{background-position:0 -120px;}
.glyphicon.icon-gift{background-position:-24px -120px;}
.glyphicon.icon-leaf{background-position:-48px -120px;}
.glyphicon.icon-fire{background-position:-72px -120px;}
.glyphicon.icon-eye-open{background-position:-96px -120px;}
.glyphicon.icon-eye-close{background-position:-120px -120px;}
.glyphicon.icon-warning-sign{background-position:-144px -120px;}
.glyphicon.icon-plane{background-position:-168px -120px;}
.glyphicon.icon-calendar{background-position:-192px -120px;}
.glyphicon.icon-random{background-position:-216px -120px;width:16px;}
.glyphicon.icon-comment{background-position:-240px -120px;}
.glyphicon.icon-magnet{background-position:-264px -120px;}
.glyphicon.icon-chevron-up{background-position:-288px -120px;}
.glyphicon.icon-chevron-down{background-position:-313px -119px;}
.glyphicon.icon-retweet{background-position:-336px -120px;}
.glyphicon.icon-shopping-cart{background-position:-360px -120px;}
.glyphicon.icon-folder-close{background-position:-384px -120px;}
.glyphicon.icon-folder-open{background-position:-408px -120px;width:16px;}
.glyphicon.icon-resize-vertical{background-position:-432px -119px;}
.glyphicon.icon-resize-horizontal{background-position:-456px -118px;}
.glyphicon.icon-hdd{background-position:0 -144px;}
.glyphicon.icon-bullhorn{background-position:-24px -144px;}
.glyphicon.icon-bell{background-position:-48px -144px;}
.glyphicon.icon-certificate{background-position:-72px -144px;}
.glyphicon.icon-thumbs-up{background-position:-96px -144px;}
.glyphicon.icon-thumbs-down{background-position:-120px -144px;}
.glyphicon.icon-hand-right{background-position:-144px -144px;}
.glyphicon.icon-hand-left{background-position:-168px -144px;}
.glyphicon.icon-hand-up{background-position:-192px -144px;}
.glyphicon.icon-hand-down{background-position:-216px -144px;}
.glyphicon.icon-circle-arrow-right{background-position:-240px -144px;}
.glyphicon.icon-circle-arrow-left{background-position:-264px -144px;}
.glyphicon.icon-circle-arrow-up{background-position:-288px -144px;}
.glyphicon.icon-circle-arrow-down{background-position:-312px -144px;}
.glyphicon.icon-globe{background-position:-336px -144px;}
.glyphicon.icon-wrench{background-position:-360px -144px;}
.glyphicon.icon-tasks{background-position:-384px -144px;}
.glyphicon.icon-filter{background-position:-408px -144px;}
.glyphicon.icon-briefcase{background-position:-432px -144px;}
.glyphicon.icon-fullscreen{background-position:-456px -144px;}
dom\assets\icomoon\css\icomoon.css @font-face {
font-family: 'IcoMoon';
src: url('../fonts/IcoMoon.eot');
src: url('../fonts/IcoMoon.eot?#iefix') format('embedded-opentype'),
url('../fonts/IcoMoon.svg#IcoMoon') format('svg'),
url('../fonts/IcoMoon.woff') format('woff'),
url('../fonts/IcoMoon.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
[data-icon]:before {
font-family: 'IcoMoon';
content: attr(data-icon);
speak: none;
}
.icomoon[class^="icon-"],
.icomoon[class*=" icon-"] {
display: inline-block !important;
width: 14px !important;
height: 14px !important;
*margin-right: .3em !important;
line-height: 14px !important;
background-image: none !important; /* ADDED */
background-position: 0 0 !important; /* ADDED */
}
.icomoon[class^="icon-"]:before,
.icomoon[class*=" icon-"]:before {
font-family: 'IcoMoon' !important;
font-style: normal !important;
speak: none !important;
}
.icomoon.icon-home:before {
content: "\21";
}
.icomoon.icon-user:before {
content: "\22";
}
.icomoon.icon-checkedout:before,
.icomoon.icon-lock:before,
.icomoon.icon-locked:before {
content: "\23";
}
.icomoon.icon-comment:before,
.icomoon.icon-comments:before {
content: "\24";
}
.icomoon.icon-comments-2:before {
content: "\25";
}
.icomoon.icon-share-alt:before,
.icomoon.icon-out:before {
content: "\26";
}
.icomoon.icon-share:before,
.icomoon.icon-redo:before {
content: "\27";
}
.icomoon.icon-undo:before {
content: "\28";
}
.icomoon.icon-file-add:before {
content: "\29";
}
.icomoon.icon-new:before,
.icomoon.icon-plus:before {
content: "\2a";
}
.icomoon.icon-apply:before,
.icomoon.icon-edit:before,
.icomoon.icon-pencil:before {
content: "\2b";
}
.icomoon.icon-pencil-2:before {
content: "\2c";
}
.icomoon.icon-folder-open:before,
.icomoon.icon-folder:before {
content: "\2d";
}
.icomoon.icon-folder-close:before,
.icomoon.icon-folder-2:before {
content: "\2e";
}
.icomoon.icon-picture:before {
content: "\2f";
}
.icomoon.icon-pictures:before {
content: "\30";
}
.icomoon.icon-list:before,
.icomoon.icon-list-view:before {
content: "\31";
}
.icomoon.icon-power-cord:before {
content: "\32";
}
.icomoon.icon-cube:before {
content: "\33";
}
.icomoon.icon-puzzle:before {
content: "\34";
}
.icomoon.icon-flag:before {
content: "\35";
}
.icomoon.icon-tools:before {
content: "\36";
}
.icomoon.icon-cogs:before {
content: "\37";
}
.icomoon.icon-options:before,
.icomoon.icon-cog:before {
content: "\38";
}
.icomoon.icon-equalizer:before {
content: "\39";
}
.icomoon.icon-wrench:before {
content: "\3a";
}
.icomoon.icon-brush:before {
content: "\3b";
}
.icomoon.icon-eye-open:before,
.icomoon.icon-eye:before {
content: "\3c";
}
.icomoon.icon-checkbox-unchecked:before {
content: "\3d";
}
.icomoon.icon-checkin:before,
.icomoon.icon-checkbox:before {
content: "\3e";
}
.icomoon.icon-checkbox-partial:before {
content: "\3f";
}
.icomoon.icon-asterisk:before,
.icomoon.icon-star-empty:before {
content: "\40";
}
.icomoon.icon-star-2:before {
content: "\41";
}
.icomoon.icon-featured:before,
.icomoon.icon-star:before {
content: "\42";
}
.icomoon.icon-calendar:before {
content: "\43";
}
.icomoon.icon-calendar-2:before {
content: "\44";
}
.icomoon.icon-question-sign:before,
.icomoon.icon-help:before {
content: "\45";
}
.icomoon.icon-support:before {
content: "\46";
}
.icomoon.icon-pending:before,
.icomoon.icon-warning:before {
content: "\48";
}
.icomoon.icon-publish:before,
.icomoon.icon-save:before,
.icomoon.icon-ok:before,
.icomoon.icon-checkmark:before {
content: "\47";
}
.icomoon.icon-unpublish:before,
.icomoon.icon-cancel:before {
content: "\4a";
}
.icomoon.icon-eye-close:before,
.icomoon.icon-minus:before {
content: "\4b";
}
.icomoon.icon-purge:before,
.icomoon.icon-trash:before {
content: "\4c";
}
.icomoon.icon-envelope:before,
.icomoon.icon-mail:before {
content: "\4d";
}
.icomoon.icon-mail-2:before {
content: "\4e";
}
.icomoon.icon-unarchive:before,
.icomoon.icon-drawer:before {
content: "\4f";
}
.icomoon.icon-archive:before,
.icomoon.icon-drawer-2:before {
content: "\50";
}
.icomoon.icon-box-add:before {
content: "\51";
}
.icomoon.icon-box-remove:before {
content: "\52";
}
.icomoon.icon-search:before {
content: "\53";
}
.icomoon.icon-filter:before {
content: "\54";
}
.icomoon.icon-camera:before {
content: "\55";
}
.icomoon.icon-play:before {
content: "\56";
}
.icomoon.icon-music:before {
content: "\57";
}
.icomoon.icon-grid-view:before {
content: "\58";
}
.icomoon.icon-grid-view-2:before {
content: "\59";
}
.icomoon.icon-menu:before {
content: "\5a";
}
.icomoon.icon-thumbs-up:before {
content: "\5b";
}
.icomoon.icon-thumbs-down:before {
content: "\5c";
}
.icomoon.icon-delete:before,
.icomoon.icon-remove:before,
.icomoon.icon-cancel-2:before {
content: "\49";
}
.icomoon.icon-save-new:before,
.icomoon.icon-plus-2:before {
content: "\5d";
}
.icomoon.icon-ban-circle:before,
.icomoon.icon-minus-sign:before,
.icomoon.icon-minus-2:before {
content: "\5e";
}
.icomoon.icon-key:before {
content: "\5f";
}
.icomoon.icon-quote:before {
content: "\60";
}
.icomoon.icon-quote-2:before {
content: "\61";
}
.icomoon.icon-database:before {
content: "\62";
}
.icomoon.icon-location:before {
content: "\63";
}
.icomoon.icon-zoom-in:before {
content: "\64";
}
.icomoon.icon-zoom-out:before {
content: "\65";
}
.icomoon.icon-expand:before {
content: "\66";
}
.icomoon.icon-contract:before {
content: "\67";
}
.icomoon.icon-expand-2:before {
content: "\68";
}
.icomoon.icon-contract-2:before {
content: "\69";
}
.icomoon.icon-health:before {
content: "\6a";
}
.icomoon.icon-wand:before {
content: "\6b";
}
.icomoon.icon-unblock:before,
.icomoon.icon-refresh:before {
content: "\6c";
}
.icomoon.icon-vcard:before {
content: "\6d";
}
.icomoon.icon-clock:before {
content: "\6e";
}
.icomoon.icon-compass:before {
content: "\6f";
}
.icomoon.icon-address:before {
content: "\70";
}
.icomoon.icon-feed:before {
content: "\71";
}
.icomoon.icon-flag-2:before {
content: "\72";
}
.icomoon.icon-pin:before {
content: "\73";
}
.icomoon.icon-lamp:before {
content: "\74";
}
.icomoon.icon-chart:before {
content: "\75";
}
.icomoon.icon-bars:before {
content: "\76";
}
.icomoon.icon-pie:before {
content: "\77";
}
.icomoon.icon-dashboard:before {
content: "\78";
}
.icomoon.icon-lightning:before {
content: "\79";
}
.icomoon.icon-move:before {
content: "\7a";
}
.icomoon.icon-next:before {
content: "\7b";
}
.icomoon.icon-previous:before {
content: "\7c";
}
.icomoon.icon-first:before {
content: "\7d";
}
.icomoon.icon-last:before {
content: "\e000";
}
.icomoon.icon-loop:before {
content: "\e001";
}
.icomoon.icon-shuffle:before {
content: "\e002";
}
.icomoon.icon-arrow-first:before {
content: "\e003";
}
.icomoon.icon-arrow-last:before {
content: "\e004";
}
.icomoon.icon-chevron-up:before,
.icomoon.icon-uparrow:before,
.icomoon.icon-arrow-up:before {
content: "\e005";
}
.icomoon.icon-chevron-right:before,
.icomoon.icon-arrow-right:before {
content: "\e006";
}
.icomoon.icon-chevron-down:before,
.icomoon.icon-downarrow:before,
.icomoon.icon-arrow-down:before {
content: "\e007";
}
.icomoon.icon-chevron-left:before,
.icomoon.icon-arrow-left:before {
content: "\e008";
}
.icomoon.icon-arrow-up-2:before {
content: "\e009";
}
.icomoon.icon-arrow-right-2:before {
content: "\e00a";
}
.icomoon.icon-download:before,
.icomoon.icon-arrow-down-2:before {
content: "\e00b";
}
.icomoon.icon-arrow-left-2:before {
content: "\e00c";
}
.icomoon.icon-play-2:before {
content: "\e00d";
}
.icomoon.icon-menu-2:before {
content: "\e00e";
}
.icomoon.icon-arrow-up-3:before {
content: "\e00f";
}
.icomoon.icon-arrow-right-3:before {
content: "\e010";
}
.icomoon.icon-arrow-down-3:before {
content: "\e011";
}
.icomoon.icon-arrow-left-3:before {
content: "\e012";
}
.icomoon.icon-print:before,
.icomoon.icon-printer:before {
content: "\e013";
}
.icomoon.icon-color-palette:before {
content: "\e014";
}
.icomoon.icon-camera-2:before {
content: "\e015";
}
.icomoon.icon-file:before {
content: "\e016";
}
.icomoon.icon-file-remove:before {
content: "\e017";
}
.icomoon.icon-save-copy:before,
.icomoon.icon-copy:before {
content: "\e018";
}
.icomoon.icon-cart:before {
content: "\e019";
}
.icomoon.icon-basket:before {
content: "\e01a";
}
.icomoon.icon-broadcast:before {
content: "\e01b";
}
.icomoon.icon-screen:before {
content: "\e01c";
}
.icomoon.icon-tablet:before {
content: "\e01d";
}
.icomoon.icon-mobile:before {
content: "\e01e";
}
.icomoon.icon-users:before {
content: "\e01f";
}
.icomoon.icon-briefcase:before {
content: "\e020";
}
.icomoon.icon-download:before {
content: "\e021";
}
.icomoon.icon-upload:before {
content: "\e022";
}
.icomoon.icon-bookmark:before {
content: "\e023";
}
.icomoon.icon-out-2:before {
content: "\e024";
}
dom\framework\bootstrap\core.php <?php
/** ______________________________________________
* o O | |
* ((((( o < JDom Class - Cook Self Service library |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.6
* @package Cook Self Service
* @subpackage JDom
* @license GNU General Public License
* @author Jocelyn HUARD
*
* .oooO Oooo.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class JDomFrameworkBootstrapCore extends JDomFrameworkBootstrap
{
protected $loadCss;
protected $loadJs;
protected $cssRtl;
protected $hostedSource = '';
/*
* Constuctor
* @namespace : requested class
* @options : Configuration
*
*
*/
function __construct($args)
{
parent::__construct($args);
}
function build()
{
//Bootstrap should not be used
if (!$this->useFramework('bootstrap'))
return;
//Bootstrap is already in the core since Joomla 3.0. And already loaded.
if ($this->jVersion('3.0'))
return;
$jsFile = 'bootstrap.min.js';
$assetFile = $this->assetFilePath('js', $jsFile);
if (file_exists($assetFile))
$this->attachJs[] = $jsFile;
//Fallback
else
$this->addScript($this->hostedSource);
}
function buildCss()
{
//Bootstrap should not be used
if (!$this->useFramework('bootstrap'))
return;
/* hack */
// fix to add the FULL bootstrap CSS
$this->attachCss[] = 'bootstrap.min.css';
$this->attachCss[] = 'bootstrap-responsive.min.css';
$this->attachCss[] = 'bootstrap-extended.css';
/* hack */
//Some fixes and compatibility
$this->attachCss[] = 'bootstrap-legacy.css';
}
}
dom\html\grid\task\state\default.php <?php
/** ______________________________________________
* o O | |
* ((((( o < JDom Class - Cook Self Service library |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.6
* @package Cook Self Service
* @subpackage JDom
* @license GNU General Public License
* @author Jocelyn HUARD
*
* .oooO Oooo.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class JDomHtmlGridTaskStateDefault extends JDomHtmlGridTaskState
{
protected $task;
protected $strNO;
protected $strYES;
/*
* Constuctor
* @namespace : requested class
* @options : Configuration
* @dataKey : database field name
* @dataObject : complete object row (stdClass or Array)
* @dataValue : value default = dataObject->dataKey
* @num : Num position in list
*
* @commandAcl : ACL Command to see or not this
* @enabled : Determines if enabled
* @tooltip : Show the description in tooltip
* @ctrl : controller to call (prefix)
* @task : Task name (used also for the icon class if taskIcon is empty)
* @taskIcon : Task icon
* @label : Button title, Label text description
* @viewType : View mode (icon/text/both) default: icon
*
* @taskYes : task to execute when value is true
* @taskNo : task to execute when value is no
* @strYES : text to show when value is true
* @strNO : text to show when value is no
* @strUndefined : text to show when value is undefined
*/
function __construct($args)
{
parent::__construct($args);
$this->arg('task' , null, $args, 'default');
$this->arg('strNO' , null, $args);
$this->arg('strYES' , null, $args);
if ((bool)$this->dataValue)
$this->enabled = false;
if (!$this->enabled)
$this->tooltip = false;
$this->taskYes = null;
/* hack */
$icon = ' icomoon';
if(isset($this->library) AND $this->library != ''){
$icon = ' '. $this->library;
}
/* hack */
$icons = array(0=> 'star-empty'. $icon, 1=> 'star'. $icon); /* hack */
if (!$this->jVersion('3.0'))
$icons = array(0=> 'notdefault'. $icon, 1=> 'default'. $icon); /* hack */
if ($this->togglable)
{
if (empty($this->strYES))
$this->strYES = '';
if (empty($this->strNO))
$this->strNO = 'JDEFAULT';
}
//Add the descriptions in the tooltip. Same description is used for each state
if (!empty($this->strYES))
$this->strYES = JText::_($this->strYES) . '::' . $this->description;
if (!empty($this->strNO))
$this->strNO = JText::_($this->strNO) . '::' . $this->description;
// TODO : You can eventually customize your behaviors icons and strings here
$this->states = array(
// When value = 1
1 => array(
null, // Task to execute
$this->strYES, // Text
$this->strYES, // Tooltip description when boolean is enabled
$this->strYES, // Tooltip description when boolean is disabled
$this->tooltip, // Show tooltip ?
$icons[1], // Css class when active (enabled)
$icons[1]), // Css class when inactive (disabled)
// When value = 0 (see before)
0 => array($this->task, $this->strNO, $this->strNO, $this->strNO, $this->tooltip, $icons[0], $icons[0]),
'' => array($this->task, $this->strNO, $this->strNO, $this->strNO, $this->tooltip, $icons[0], $icons[0]),
);
}
function build()
{
$html = $this->buildHtml();
return $html;
}
}
dom\html\grid\task\default.php <?php
/** ______________________________________________
* o O | |
* ((((( o < JDom Class - Cook Self Service library |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.6
* @package Cook Self Service
* @subpackage JDom
* @license GNU General Public License
* @author Jocelyn HUARD
*
* .oooO Oooo.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class JDomHtmlGridTaskDefault extends JDomHtmlGridTask
{
var $level = 4; //Namespace position
var $last = true; //This class is last call
/*
* Constuctor
* @namespace : requested class
* @options : Configuration
* @dataKey : database field name
* @dataObject : complete object row (stdClass or Array)
* @dataValue : value default = dataObject->dataKey
* @num : Num position in list
* @commandAcl : ACL rights to toggle
*/
function __construct($args)
{
parent::__construct($args);
$this->arg('commandAcl' , null, $args, 'core.edit.state');
}
function build()
{
$html = '';
$ctrl = ($this->ctrl?$this->ctrl.'.':'');
/* hack */
$icon = ' icomoon';
if(isset($this->library) AND $this->library != ''){
$icon = ' '. $this->library;
}
/* hack */
if ($this->dataValue)
{
$this->taskIcon = 'default' . $icon; /* hack */
$html = $this->buildHtml();
}
else
{
$html = JDom::_('html.grid.task', array_merge($this->options, array(
'task' => $ctrl . 'default',
'taskIcon' => 'default_no' . $icon /* hack */
)));
}
return $html;
}
}
dom\html\grid\task.php <?php
/** ______________________________________________
* o O | |
* ((((( o < JDom Class - Cook Self Service library |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.6
* @package Cook Self Service
* @subpackage JDom
* @license GNU General Public License
* @author Jocelyn HUARD
*
* .oooO Oooo.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class JDomHtmlGridTask extends JDomHtmlGrid
{
var $fallback = 'task';
protected $commandAcl;
protected $enabled;
protected $tooltip;
protected $ctrl;
protected $task;
protected $taskIcon;
protected $label;
protected $viewType;
protected $target;
protected $description;
/*
* Constuctor
* @namespace : requested class
* @options : Configuration
* @dataKey : database field name
* @dataObject : complete object row (stdClass or Array)
* @dataValue : value default = dataObject->dataKey
* @num : Num position in list
*
* @commandAcl : ACL Command to see or not this
* @enabled : Determines if enabled
* @tooltip : Show the description in tooltip
* @ctrl : controller to call (prefix)
* @task : Task name (used also for the icon class if taskIcon is empty)
* @taskIcon : Task icon
* @label : Button title, Label text description
* @description : Description of the task. (in tooltip)
* @viewType : View mode (icon/text/both) default: icon
* @target : target when a link
*
*
*/
function __construct($args)
{
parent::__construct($args);
$this->arg('commandAcl' , null, $args);
$this->arg('enabled' , null, $args, true);
$this->arg('tooltip' , null, $args);
$this->arg('ctrl' , null, $args);
$this->arg('task' , null, $args);
$this->arg('taskIcon' , null, $args);
$this->arg('label' , null, $args);
$this->arg('description' , null, $args);
$this->arg('viewType' , null, $args, 'both');
$this->arg('target' , null, $args);
//Default tooltip value (depending on viewType)
if ($this->tooltip === null)
{
if ($this->viewType == 'icon')
$this->tooltip = false;
else
$this->tooltip = true;
}
//Uset tasks if ACL does not permit
if ($this->commandAcl && !$this->access($this->commandAcl))
$this->enabled = false;
if (!$this->enabled)
$this->tooltip = false;
$this->getIconName();
}
/* hack */
function getIconName()
{
if (empty($this->taskIcon)){
$this->taskIcon = $this->getTaskExec();
}
$name = $this->taskIcon = $this->getTaskExec();
$icon = ' icomoon';
if(isset($this->library) AND $this->library != ''){
$icon = ' '. $this->library;
}
$this->taskIcon = $this->taskIcon .$icon;
return $name;
}
/* hack */
function getTaskExec($ctrl = false)
{
//Get the task behind the controller alias (Joomla 2.5)
if (!$task = $this->task)
return;
$ctrlName = "";
$parts = explode(".", $task);
$len = count($parts);
$taskName = $parts[$len - 1]; //Last
if ($len > 1)
$ctrlName = $parts[0];
if ($ctrl)
return $ctrlName . "." . $taskName;
return $taskName;
}
}
dom\html\icon.php <?php
/** ______________________________________________
* o O | |
* ((((( o < JDom Class - Cook Self Service library |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.6
* @package Cook Self Service
* @subpackage JDom
* @license GNU General Public License
* @author Jocelyn HUARD
*
* .oooO Oooo.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class JDomHtmlIcon extends JDomHtml
{
protected $icon;
protected $tooltip;
protected $title;
protected $color;
protected $size;
protected $library;
protected $availableLibraries = array('icomoon', 'glyphicon');
/*
* Constuctor
* @namespace : requested class
* @options : Configuration
* @dataKey : database field name
* @dataObject : complete object row (stdClass or Array)
* @dataValue : value default = dataObject->dataKey
*
* @icon : Icon name see : http://icomoon.io/#preview-free
* @tooltip : Has a tooltip
* @tilte : Title for Tooltip
* @library : Icon library
*/
function __construct($args)
{
parent::__construct($args);
$this->arg('icon', null, $args);
$this->arg('tooltip', null, $args);
$this->arg('title', null, $args);
$this->arg('color', null, $args);
$this->arg('size', null, $args);
$this->arg('library', null, $args);
$parts = explode('-', $this->icon);
if ((count($parts) > 1) && in_array($parts[0], $this->availableLibraries))
{
$this->library = array_shift($parts);
$this->icon = implode('-', $parts);
}
}
function build()
{
if ($this->library)
{
switch($this->library)
{
case '':
$icons = $this->getIcons();
break;
case 'icomoon':
JDom::_('html.icon.icomoon');
$this->buildFont();
break;
case 'glyphicon':
JDom::_('html.icon.glyphicon');
break;
}
}
$this->addClass($this->getIconClass());
$html = '<i <%STYLE%><%CLASS%><%SELECTORS%>></i>';
return $html;
}
public function getIconClass()
{
if ($this->library)
{
switch($this->library)
{
case '':
$icons = $this->getIcons();
break;
case 'icomoon':
JDom::_('html.icon.icomoon');
$this->buildFont();
break;
case 'glyphicon':
JDom::_('html.icon.glyphicon');
break;
}
return 'icon-' . $this->icon .' '. $this->library; /* hack */
}
return 'icon-' . $this->icon . ($this->library?' ' . $this->library :' icomoon'); /* hack */
}
protected function buildFont()
{
if ($color = $this->color)
switch($color)
{
case 'default':
case 'primary':
case 'info':
case 'success':
case 'warning':
case 'danger':
$this->addClass('color-' . $color);
break;
default:
$this->addStyle('color', '#' . ltrim($color, '#'));
break;
}
if ($size = $this->size)
{
$this->addStyle('font-size', $size);
$this->addStyle('width', 'inherit');
$this->addStyle('height', 'inherit');
}
}
protected function parseVars($vars)
{
return parent::parseVars(array_merge(array(
'STYLE' => $this->buildDomStyles(),
'CLASS' => $this->buildDomClass(), //With attrib name
'SELECTORS' => $this->buildSelectors(),
), $vars));
}
}
dom\html\link\button\toolbar.php <?php
/** ______________________________________________
* o O | |
* ((((( o < JDom Class - Cook Self Service library |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.6
* @package Cook Self Service
* @subpackage JDom
* @license GNU General Public License
* @author Jocelyn HUARD
*
* .oooO Oooo.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class JDomHtmlLinkButtonToolbar extends JDomHtmlLinkButton
{
var $fallback = 'standard';
protected $item;
protected $name;
protected $text;
protected $task;
protected $message;
protected $checkList;
protected $align;
protected $ui;
protected $display;
protected $alertConfirm;
/*
* Constuctor
* @namespace : Requested class
* @options : Parameters
* //@bar : Joomla Toolbar
*
*
* @item : Joomla Toolbar Item arguments (array) (Overwrite $bar parameter)
* @align : Item alignement (float)
* @alertConfirm : Alert a Confirm box
* @checkList : Check in list
* @ui : Rendering type (default : bootstrap)
* @display : Display of the button (all/icon/text)
*
*/
function __construct($args)
{
parent::__construct($args);
$this->arg('item' , null, $args);
$this->arg('checkList' , null, $args);
$this->arg('align' , null, $args);
$this->arg('ui' , null, $args, 'bootstrap');
$this->arg('display', null, $args, 'all');
}
function getIconFromTask()
{
if ($this->icon)
return $this->icon;
$icon = $this->name;
if ($this->ui == 'bootstrap')
{
switch($icon)
{
case 'preview': return 'eye';
}
}
return $icon;
}
function setStylesFromTask()
{
//Define the button styles (color, width)
if ($this->ui == 'bootstrap')
{
switch($this->name)
{
case 'new':
case 'apply':
$this->addClass('btn-success');
$this->addClass('input-medium');
break;
}
}
}
function build()
{
$this->setStylesFromTask();
if ($this->ui == 'bootstrap')
{
$this->addClass('btn btn-small');
}
else
{
$this->addClass('button');
}
if ($this->href || $this->route)
{
//Special treatment when the item is a direct link
$this->content = $this->buildContent();
//Handle the click in a 'a' markup. li transfers its styles to the link markup
$html = '<li id="<%LI_ID%>">'.LN
. $this->buildLink()
. '</li>' .LN;
return $html;
}
// Handle the click in the li element
$html = '<li<%CLASS%> style="<%LI_STYLE%>" id="<%LI_ID%>" onclick="<%COMMAND%>">'.LN
. $this->buildContent()
. '</li>' .LN;
return $html;
}
function buildContent()
{
$html = '<div class="<%CONTENT_CLASS%>" style="cursor:pointer">'.LN
. $this->buildIconText() .LN
. '</div>';
return $html;
}
function buildIconText()
{
$icon = $this->getIconFromTask();
$html = '';
if ($this->ui == 'bootstrap')
{
// Icon
if (in_array($this->display, array('all', 'icon')))
$html .= '<i class="icon-' . $icon . ($this->library?' ' . $this->library :' icomoon') . '"></i>'.LN; /* hack */
// Caption
if (in_array($this->display, array('all', 'text')))
$html .= '<span class="text" style="white-space:nowrap"><%TEXT%></span>'.LN;
}
else
{
// Icon
if (in_array($this->display, array('all', 'icon')))
$html .= '<span class="' . 'icon-16 ' . $icon . '"></span>' .LN;
// Caption
if (in_array($this->display, array('all', 'text')))
$html .= '<span class="text" style="white-space:nowrap"><%TEXT%></span>' .LN;
}
return $html;
}
protected function parseVars($vars)
{
$alignStyle = null;
switch($this->align)
{
case 'left':
case 'right':
$alignStyle = "float: " . $this->align . ";";
break;
case 'center':
$alignStyle = "display: inline-block;";
break;
}
$this->jsCommand();
$contentClass = 'task';
if ($this->ui == 'bootstrap')
$contentClass = '';
return parent::parseVars(array_merge(array(
'LI_STYLE' => "list-style:none; " . $alignStyle,
'LI_ID' => 'toolbar-' . $this->task,
'CONTENT_CLASS' => $contentClass,
'COMMAND' => ($this->link_js?htmlspecialchars($this->link_js):""),
'TEXT' => $this->JText($this->text),
'CLASS' => $this->buildDomClass(),
), $vars));
}
function getTaskExec($ctrl = false)
{
//Get the task behind the controller alias (Joomla 2.5)
if (!$task = $this->task)
return;
$ctrlName = "";
$parts = explode(".", $task);
$len = count($parts);
$taskName = $parts[$len - 1]; //Last
if ($len > 1)
$ctrlName = $parts[0];
if ($ctrl)
return $ctrlName . "." . $taskName;
return $taskName;
}
}
|
|
-
jcbenton
-
-
Offline
-
Premium Member
-
- Posts: 125
- Thank you received: 9
-
Karma: 3
-
|
Thank you for posting this. I did apply all of the hacks, but in my case it does not help. The items still display incorrectly on the backend. Hopefully admin will get this fixed in the builder soon.
|
|
-
Tomaselli
-
-
Online
-
Elite Member
-
- Posts: 293
- Thank you received: 87
-
Karma: 46
-
|
this mainly fix the icons full compatibility. and the modal bootstrap.
are you using a fresh default joomla 3.x installation? or there are extra things installed (BE templates, plugins)?
It is a quick workaround, surely the admin will find a better solution. let me know if I can help you in some way.
|
The following user(s) said Thank You: admin
|
-
jcbenton
-
-
Offline
-
Premium Member
-
- Posts: 125
- Thank you received: 9
-
Karma: 3
-
|
Joomla 2.5 actually.
The component has the same problem in J-Cooks sandbox, so I doubt it has to do with any extension.
|
|
-
Tomaselli
-
-
Online
-
Elite Member
-
- Posts: 293
- Thank you received: 87
-
Karma: 46
-
|
I see, I'm sure the Admin will fix that soon.
|
|
-
admin
-
-
Offline
-
Administrator
-
-
Chef
- Posts: 3711
- Thank you received: 987
-
Karma: 140
-
|
Your wishes are granted.
Included, fixed, and many thanks.
I have reviewed this aspects many times and I must admit your CSS is excellent.
For the moment it seems to looks perfect cross compatible.
I have changed few things, and added some also...
There are now a lot of Joomla fixes in Cook...
|
Coding is now a piece of cake
The following user(s) said Thank You: Tomaselli
|
-
Tomaselli
-
-
Online
-
Elite Member
-
- Posts: 293
- Thank you received: 87
-
Karma: 46
-
|
thanks for the kind words, however I just added the css for what I've seen, including also the default bootstrap modal, broken by the default backend joomla template.
This means, other fixes maybe needed.
|
|
|